/* Lizenzserver NeueMedienBecker – gemeinsames Stylesheet (Anmeldung + Verwaltung).
   Statusfarben folgen der EU-Energieskala: grün = läuft, gelb/orange = bald fällig, rot = abgelaufen. */
:root {
  --paper: #f6f8f7; --surface: #ffffff; --ink: #22313a; --muted: #5c6b70; --line: #d5dcda;
  --accent: #0a7a3d; --accent-ink: #ffffff; --danger: #b3261e;
  --a: #00a651; --b: #50b848; --c: #bed630; --d: #fff200; --e: #fdb913; --f: #f37021; --g: #ed1c24; --off: #8a9499;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141b1e; --surface: #1b2428; --ink: #e6ecea; --muted: #9aa8ac; --line: #2c383c;
    --accent: #3ec27a; --accent-ink: #0d1a12; --danger: #ff8a80; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }

/* Energiepfeil als Status – das wiedererkennbare Element der Oberfläche */
.st {
  display: inline-block; padding: 2px 18px 2px 9px; font-weight: 700; font-size: .85rem; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  color: #fff; background: var(--off);
}
.st-active { background: var(--a); }
.st-trial { background: var(--c); color: #1d2a00; }
.st-soon { background: var(--e); color: #2a1d00; }
.st-expired, .st-trial_expired { background: var(--g); }
.st-blocked { background: var(--off); }

/* Skala neben der Anmeldung */
.scale { display: grid; gap: 6px; align-content: start; }
.scale span {
  display: block; height: 30px; color: #fff; font-weight: 800; padding-left: 10px; line-height: 30px;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
}
.scale span:nth-child(1) { width: 45%; background: var(--a); } .scale span:nth-child(2) { width: 53%; background: var(--b); }
.scale span:nth-child(3) { width: 61%; background: var(--c); color: #1d2a00; } .scale span:nth-child(4) { width: 69%; background: var(--d); color: #2a2600; }
.scale span:nth-child(5) { width: 77%; background: var(--e); color: #2a1d00; } .scale span:nth-child(6) { width: 85%; background: var(--f); }
.scale span:nth-child(7) { width: 93%; background: var(--g); }

/* Formulare */
form.box, .box { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
label { display: block; font-weight: 600; margin: 0 0 4px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit;
}
textarea { min-height: 70px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
button, .btn {
  display: inline-block; border: 0; border-radius: 4px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
}
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--danger); color: #fff; }
.hp { position: absolute; left: -9999px; }
.flash { padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--surface); margin-bottom: 16px; }
.flash.err { border-color: var(--danger); }

/* Anmeldeseite */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
@media (max-width: 760px) { .signup { grid-template-columns: 1fr; } .scale { display: none; } }

/* Verwaltung */
.top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 12px 20px; background: var(--surface); }
.top strong { margin-right: auto; }
.top a { text-decoration: none; color: var(--ink); }
.top a.on { color: var(--accent); font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.filters a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.filters a.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 20px 0; }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline .field { margin: 0; }
.key { font-family: Consolas, "Courier New", monospace; font-size: 1.05rem; user-select: all; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
