/* AndNext Admin – Stil der App (andnext/public/style.css): schwarzer Grund, dunkle Flächen, große Radien, Pill-Knöpfe,
   Symbol-Leiste links ohne Fläche, Seitentitel in Versalien mit lila Symbol, große Zahlen in American Typewriter,
   Kennzahlen auf der Verlaufsfläche wie die Übersicht der App. Ohne Schatten. */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 200 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 200 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --text: #fff; --muted: rgba(235, 235, 245, .7); --faint: rgba(235, 235, 245, .4); --line: rgba(255, 255, 255, .08);
  --glass: rgba(40, 40, 46, .72);
  --green: #34d77b; --red: #ff5a5f; --lila: #8f84ea; --lila-hell: #b3a8ff;
  /* Diagramm-Reihen (geprüft gegen #1c1c1e: Farbsehschwäche ΔE 17, Kontrast ≥ 3:1) */
  --s-mac: #9085e9; --s-win: #199e70;
  --grid: rgba(255, 255, 255, .07); --axis: rgba(235, 235, 245, .55);
  --radius: 32px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --amount-font: "American Typewriter", "Courier New", monospace;
  /* Verlaufsfläche der Übersicht (wie .hero.tint in der App) */
  --hero: radial-gradient(70% 120% at 0% 0%, #5446dc 0%, transparent 70%), radial-gradient(45% 80% at 100% 110%, rgb(170 222 140 / .75) 0%, transparent 70%), linear-gradient(120deg, #4c49d8 0%, #5a86ec 55%, #58ade0 100%);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.nic { fill: currentColor; }

/* Leiste links: App-Icon oben, darunter die Bereiche mit Symbol und Namen (Symbole im Stil der App-Leiste) */
.sidenav { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: 232px; display: flex; flex-direction: column; gap: 4px; padding: 26px 16px 22px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .16); }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.brand span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.sidenav .unten { margin-top: auto; }
.sidenav a, .sidenav button { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 999px;
  background: none; color: rgb(255 255 255 / .88); font-size: 15px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.sidenav a:hover:not(.on), .sidenav button:hover { background: rgb(255 255 255 / .06); color: var(--text); }
.sidenav a.on { background: var(--surface); color: var(--text); }
.sidenav a.on .nic { color: var(--lila-hell); }
.sidenav .nic { width: 22px; height: 22px; flex: none; }

main { padding: 36px 32px 60px 264px; max-width: 1500px; margin: 0 auto; }

/* Kopfzeile: Seitentitel in Versalien mit lila Symbol, darunter der Zeitraum, rechts der Umschalter */
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 50px; margin-bottom: 22px; }
.head .spacer { flex: 1; }
.page-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.page-title .nic { width: 16px; height: 16px; fill: var(--lila); flex: none; }
.head .zeitraum { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Umschalter wie „1 J | 2 J | 5 J“ in der App */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--surface-2); }
.seg button { appearance: none; padding: 7px 16px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-2); border-color: var(--surface-3); color: var(--text); }

/* Aktualisieren: dezenter Pill-Knopf mit Stand-Uhrzeit, Symbol dreht sich beim Laden */
.neu-laden { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.neu-laden:hover { background: var(--surface); color: var(--text); }
.neu-laden .nic { width: 18px; height: 18px; }
.neu-laden.laedt .nic { animation: drehen .8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .neu-laden.laedt .nic { animation: none; opacity: .5; } }

/* Kennzahlen auf der Verlaufsfläche, durch feine Linien getrennt */
.hero { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; border-radius: var(--radius); background: var(--hero); color: #fff; overflow: hidden; }
.kennzahl { padding: 22px 26px 24px; }
.kennzahl + .kennzahl { border-left: 1px solid rgb(255 255 255 / .16); }
.kennzahl .label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.kennzahl .label i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .7); }
.kennzahl .value { margin: 12px 0 8px; font-family: var(--amount-font); font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.kennzahl .sub { font-size: 13px; color: rgb(255 255 255 / .72); }
.kennzahl .sub b { color: #fff; font-weight: 700; }

/* Karten */
.card { padding: 24px 26px; border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.card-head h2 { margin: 0; }
.card-head .muted { font-size: 13.5px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.zwei .card { margin-bottom: 0; }
.zwei h2 { margin-bottom: 14px; }

/* Legende + Diagramm */
.legende { display: flex; gap: 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.legende i { width: 16px; height: 3px; border-radius: 2px; }
.diagramm { position: relative; margin-top: 14px; }
.diagramm svg { display: block; width: 100%; overflow: visible; }
.diagramm text { fill: var(--axis); font: 600 12.5px var(--font); font-variant-numeric: tabular-nums; }
.diagramm .lbl { fill: var(--text); font-size: 13.5px; font-weight: 700; }
.diagramm .gitter { stroke: var(--grid); }
.diagramm .linie { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .fadenkreuz { stroke: rgba(255, 255, 255, .25); stroke-width: 1; }
.diagramm .punkt { stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; top: 0; z-index: 2; min-width: 170px; padding: 12px 14px; border-radius: 18px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgb(255 255 255 / .1); pointer-events: none; font-size: 14px; }
.tip b { display: block; margin-bottom: 6px; }
.tip div { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.tip div i { width: 9px; height: 9px; border-radius: 50%; }
.tip div span { margin-left: auto; padding-left: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tabellen wie .tbl in der App */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; text-align: left; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
td { border-top: 1px solid var(--line); }
td.n, th.n { text-align: right; }
td.n { font-weight: 600; }
.balken { display: block; height: 5px; margin-top: 7px; border-radius: 5px; background: var(--lila); opacity: .75; }
details.als-tabelle { margin-top: 14px; }
details.als-tabelle summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; }
details.als-tabelle summary:hover { color: var(--text); }
details.als-tabelle .scroll { max-height: 300px; overflow: auto; margin-top: 10px; }

.leer { padding: 30px 0 10px; margin: 0; text-align: center; color: var(--muted); }
.fehler { padding: 16px 20px; border-radius: 20px; background: rgb(255 90 95 / .14); margin-bottom: 20px; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: min(400px, 100%); display: grid; gap: 16px; padding: 34px 32px; border-radius: var(--radius); background: var(--surface); }
.login-icon { width: 56px; height: 56px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .16); margin-bottom: 4px; }
.login h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.login p { margin: 0; }
.login input { width: 100%; padding: 13px 18px; border: 0; border-radius: 999px; background: var(--surface-2); outline: none; }
.login input:focus { outline: 2px solid var(--lila); }
.login button { padding: 12px 20px; border: 0; border-radius: 999px; background: #fff; color: #000; font-weight: 600; cursor: pointer; transition: background .2s, transform .12s; }
.login button:hover { background: #e8e8ed; }
.login button:active { transform: scale(.97); }
.login .falsch { color: var(--red); font-size: 14px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .kennzahl:nth-child(3) { border-left: 0; }
  .kennzahl:nth-child(n+3) { border-top: 1px solid rgb(255 255 255 / .16); }
}
@media (max-width: 900px) {
  .sidenav { top: auto; bottom: 0; width: auto; right: 0; flex-direction: row; justify-content: center; padding: 8px; background: rgb(0 0 0 / .85); backdrop-filter: blur(20px); }
  .brand { display: none; }
  .sidenav a, .sidenav button { width: auto; }
  .sidenav .unten { margin: 0; }
  main { padding: 24px 16px 90px; }
  .zwei { grid-template-columns: 1fr; }
  .kennzahl .value { font-size: 34px; }
}
