/* EASA Portal, Modul 1: Oberfläche im Look von Prototyp D. Dunkel als Standard, Hell per Knopf.
   Schriften selbst gehostet (SIL OFL), keine externen Anfragen. Keine Dauer-Animationen, kein Weichzeichner über Vollbild. */

@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url('/fonts/InstrumentSans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url('/fonts/InstrumentSans-latin.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: 'Newsreader'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/fonts/Newsreader-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/fonts/Newsreader-latin.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: 'Newsreader'; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url('/fonts/Newsreader-italic-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url('/fonts/Newsreader-italic-latin.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; }

:root {
  --z: 1; --card: rgba(11,12,16,.62); --cardS: rgba(10,11,14,.74); --paper: rgba(255,255,255,.08); --paper2: rgba(255,255,255,.05); --solid: #0d0e12;
  --ink: #f4f5f7; --mid: #d6d9df; --dim: #c2c6ce; --hair: rgba(255,255,255,.13); --line: rgba(255,255,255,.26);
  --rail: #14161b; --or: #ff7a45; --orT: #ffa27e; --orSoft: rgba(255,122,69,.2);
  --ac: #5aa7ff; --acInk: #06121f; --acSoft: rgba(90,167,255,.22);
  --mint: #2d5546; --mintInk: #9fe0c6; --mintTxt: #d0f4e4; --warn: #f4c063; --err: #ffa49c; --errBg: rgba(255,90,80,.16);
  --barc: rgba(255,255,255,.3);
  --hi: inset 0 1px 0 rgba(255,255,255,.14); --sh: 0 18px 40px rgba(0,0,0,.34);
  --field: rgba(6,8,12,.42); --fieldSh: inset 0 0 0 1px rgba(255,255,255,.12); --hov: rgba(255,255,255,.09);
  --veil: none;
  --blur: blur(10px) saturate(1.1);
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--sans);
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
}
[data-theme=light] {
  --card: rgba(255,255,255,.72); --cardS: rgba(255,255,255,.86); --paper: rgba(255,255,255,.62); --paper2: rgba(255,255,255,.42); --solid: #f4f5f7;
  --ink: #16181d; --mid: #363a43; --dim: #484d57; --hair: rgba(20,22,28,.14); --line: rgba(20,22,28,.3);
  --rail: #1c1e24; --or: #e8561f; --orT: #a8330e; --orSoft: rgba(232,86,31,.14);
  --ac: #1f6fd6; --acInk: #fff; --acSoft: rgba(31,111,214,.14);
  --mint: #a6d9c5; --mintInk: #17654a; --mintTxt: #0f3a2a; --warn: #7d5100; --err: #9b1c13; --errBg: rgba(190,40,30,.1);
  --barc: rgba(20,22,28,.3);
  --hi: inset 0 1px 0 rgba(255,255,255,.8); --sh: 0 16px 36px rgba(20,24,34,.18);
  --field: rgba(255,255,255,.72); --fieldSh: inset 0 0 0 1px rgba(20,22,28,.16); --hov: rgba(255,255,255,.55);
  --veil: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { overflow: clip; }
body { font-family: var(--sans); color: var(--ink); font-size: 15px; line-height: 1.45; overflow: hidden; background: var(--solid); }
/* Hintergrund: ein statisches Foto, keine Animation. Weichzeichner nur auf den Flächen darüber. */
body::before { content: ""; position: fixed; inset: 0; z-index: -3; background: radial-gradient(120vh 90vh at 22% 92%, #7a3410, #1a120d 62%, #0b0c0f); } /* ruhiger Rückfall ohne WebGL */
[data-theme=light] body::before { background: radial-gradient(120vh 90vh at 22% 92%, #f6c9a4, #eef0f3 62%); }
.bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; transition: opacity .26s; pointer-events: none; }
.bgfx.swap { opacity: 0; }
@media print { .bgfx { display: none; } }
.fx-lite { --blur: none; } .fx-lite .topnav, .fx-lite .tright, .fx-lite .logo, .fx-lite .dock, .fx-lite .panel, .fx-lite .main, .fx-lite .gc { background: var(--cardS); }
/* Größere Darstellung auf großen Bildschirmen */
body { zoom: var(--z); }
@media (min-width: 1280px) { :root { --z: 1.07; } }
@media (min-width: 1600px) { :root { --z: 1.15; } }
@media print { :root { --z: 1; } }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--veil); }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; }
button { cursor: pointer; }
a { color: inherit; }
::placeholder { color: var(--dim); opacity: 1; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 8px; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-weight: 400; font-variant-numeric: lining-nums; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { display: grid; place-items: center; height: 100%; }
.boot-msg { font-family: var(--serif); font-size: 40px; color: var(--dim); }

/* ---------------------------------------------------------------- Rahmen */
.app { height: calc(100vh / var(--z)); height: calc(100dvh / var(--z)); display: grid; grid-template-columns: 60px 284px minmax(0, 1fr); grid-template-rows: 58px minmax(0, 1fr); gap: 14px; padding: 14px 18px 18px; }
.app.nopanel { grid-template-columns: 60px minmax(0, 1fr); }
.app.nopanel .panel { display: none; }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.tleft, .tright { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tmid { display: flex; justify-content: center; min-width: 0; }
.logo { font-weight: 700; font-size: 15px; letter-spacing: .16em; text-decoration: none; color: var(--ink); height: 50px; padding: 0 20px 0 6px; border-radius: 25px; display: inline-flex; align-items: center; gap: 10px; }
.siegel { display: block; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.18); }
.logo .siegel { width: 38px; height: 38px; }
.logo:hover .siegel { box-shadow: 0 3px 12px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.3); }
.topnav { display: flex; gap: 4px; padding: 4px; border-radius: 26px; }
.topnav a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 21px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background-color .15s; }
.topnav a:hover { background: var(--hov); }
.topnav a[aria-current=page] { background: var(--ink); color: var(--solid); }
.tright button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink); transition: background-color .15s; }
.tright button:hover { background: var(--hov); }
.navbtn { width: 42px; height: 42px; border-radius: 50%; display: none; place-items: center; color: var(--ink); }
.ic { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(140deg, #ffb35c, #f0702e); display: grid; place-items: center; color: #2a1405; font-size: 14px; font-weight: 700; flex: none; }
.dock { align-self: center; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 30px; width: 60px; align-items: center; }
.dock a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); position: relative; text-decoration: none; transition: background-color .15s; }
.dock a:hover { background: var(--hov); }
.dock a[aria-current=page] { background: var(--ink); color: var(--solid); }
.dock a::after { content: attr(data-tip); position: absolute; left: 54px; top: 50%; transform: translateY(-50%); background: var(--rail); color: #f4f5f7; font-size: 12.5px; padding: 5px 10px; border-radius: 9px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; }
.dock a:hover::after, .dock a:focus-visible::after { opacity: 1; }
.dock .dot { position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--or); color: #1b0d05; font: 700 10.5px var(--sans); display: grid; place-items: center; padding: 0 4px; }

/* Glasflächen: Weichzeichner nur hier, nie über Vollbild */
.topnav, .tright, .logo, .dock, .panel, .main, .gc, .authcard { background: var(--card); box-shadow: var(--sh), var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.tright { padding: 4px; border-radius: 26px; justify-self: end; justify-content: flex-end; }
@media (prefers-reduced-transparency: reduce) { .topnav, .tright, .logo, .dock, .panel, .main, .gc, .authcard { background: var(--solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.panel { border-radius: 26px; padding: 16px 12px 12px; display: flex; flex-direction: column; min-height: 0; }
.pscroll { overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; margin-right: -4px; }
.grp { padding: 10px 0; border-top: 1px solid var(--hair); }
.grp:first-child { border-top: 0; padding-top: 0; }
.grp > small, .lab { display: block; color: var(--dim); font-size: 12px; letter-spacing: .04em; margin: 0 6px 6px; }
.it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 13px; font-size: 14px; color: var(--ink); text-align: left; text-decoration: none; }
.it:hover { background: var(--hov); }
.it[aria-current=true] { background: var(--paper); box-shadow: 0 6px 14px rgba(0,0,0,.14), var(--hi), 0 0 0 1px var(--hair); }
.it .c { margin-left: auto; min-width: 26px; height: 22px; border-radius: 11px; background: var(--hair); display: grid; place-items: center; font-size: 11px; color: var(--mid); padding: 0 7px; font-family: var(--mono); }
.it .cd { font-family: var(--mono); font-size: 11px; color: var(--mid); width: 54px; flex: none; white-space: nowrap; }
.it .tx { min-width: 0; overflow-wrap: anywhere; }
.sub { margin: 2px 0 6px 12px; padding-left: 8px; border-left: 1px solid var(--hair); display: none; }
.sub.open { display: block; }
.sub .it { font-size: 13px; padding: 6px 8px; }
.chev { width: 12px; height: 12px; stroke: var(--dim); fill: none; stroke-width: 2; flex: none; }
.it[aria-expanded=true] .chev { transform: rotate(90deg); }
.pfoot { margin-top: 10px; font-size: 11.5px; color: var(--dim); padding: 8px 6px 0; border-top: 1px solid var(--hair); }

.main { background: var(--cardS); border-radius: 26px; min-width: 0; min-height: 0; display: flex; overflow: hidden; position: relative; }
.mscroll { overflow-y: auto; flex: 1; min-width: 0; min-height: 0; padding: 30px 36px 60px; position: relative; }
.drawer { display: none; width: min(500px, 46%); flex: none; border-left: 1px solid var(--line); background: var(--paper2); overflow-y: auto; min-height: 0; }
.main.hasdr .drawer { display: block; }

/* ---------------------------------------------------------------- Bausteine */
.mhead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
h1.serif { font-size: 52px; line-height: 1; letter-spacing: -.01em; font-weight: 400; }
h1 em { color: var(--orT); font-style: italic; }
.count { color: var(--mid); font-size: 14px; margin-top: 8px; }
.count b { color: var(--ink); font-weight: 600; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 38px; padding: 0 15px; border-radius: 12px; background: var(--paper); box-shadow: var(--hi), 0 4px 10px rgba(0,0,0,.12); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { filter: brightness(1.1); }
.btn.dark { background: #ececee; color: #111; }
[data-theme=light] .btn.dark { background: var(--rail); color: #fff; }
.btn.or { background: var(--or); color: #141414; font-weight: 600; }
.btn.danger { background: #b3261e; color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border: 1px solid var(--line); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.iconbtn { width: 34px; height: 34px; border-radius: 10px; color: var(--mid); display: inline-grid; place-items: center; }
.iconbtn:hover { background: var(--hov); color: var(--ink); }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin: 22px 0 8px; }
.filters > .fl:first-child { grid-column: span 2; }
.fl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fl label, .fl .l { font-size: 12px; color: var(--dim); letter-spacing: .03em; padding-left: 4px; }
.fl input, .fl select, .fi, .fs, .fl textarea { height: 40px; border-radius: 12px; background: var(--field); padding: 0 12px; box-shadow: var(--fieldSh); width: 100%; font-size: 14px; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c9ca3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
select option, select optgroup { background: var(--paper); color: var(--ink); }
.fl textarea, textarea.fi { height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.fl .hint { font-size: 12px; color: var(--dim); padding-left: 4px; }
.fl .err, .errtext { font-size: 12.5px; color: var(--err); padding-left: 4px; }
.fl.bad input, .fl.bad select, .fl.bad textarea { box-shadow: var(--fieldSh), 0 0 0 1.5px var(--err); }
.chk { display: flex; align-items: center; gap: 9px; font-size: 14px; min-height: 32px; cursor: pointer; }
.chk input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: none; border-radius: 6px; background: var(--field); box-shadow: var(--fieldSh), 0 0 0 1px var(--line); display: grid; place-items: center; cursor: pointer; }
.chk input:checked { background: var(--or); box-shadow: 0 0 0 1px var(--or); }
.chk input:checked::after { content: ""; width: 5px; height: 10px; border: solid #141414; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chk.tight { min-height: 26px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; min-height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--orSoft); color: var(--orT); font-size: 12.5px; font-weight: 500; }
.chip button { color: inherit; font-size: 14px; line-height: 1; }
.note { font-size: 12.5px; color: var(--dim); margin-top: 14px; }
.empty { padding: 50px 0; text-align: center; color: var(--mid); }
.more { display: block; margin: 16px auto 0; }
.badge { display: inline-block; font: 600 11px var(--sans); padding: 2px 8px; border-radius: 999px; background: var(--hair); color: var(--mid); white-space: nowrap; }
.badge.or { background: var(--orSoft); color: var(--orT); }
.badge.ok { background: var(--mint); color: var(--mintTxt); }
.badge.err { background: var(--errBg); color: var(--err); }
.banner { padding: 12px 14px; border-radius: 14px; background: var(--paper); box-shadow: var(--hi), 0 0 0 1px var(--hair); font-size: 13.5px; color: var(--mid); margin: 16px 0 0; }
.banner.warn { box-shadow: 0 0 0 1px var(--warn); color: var(--ink); }
.banner.bad { background: var(--errBg); color: var(--err); box-shadow: none; }

/* Statussiegel */
.code, .seal { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.g-P { background: var(--mint); color: var(--mintTxt); }
.g-F { background: transparent; box-shadow: inset 0 0 0 1px var(--dim); color: var(--mid); }
.g-N { background: var(--or); color: #141414; }
.g-X { background: var(--rail); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
[data-theme=light] .g-X { box-shadow: none; }
.strip { display: flex; gap: 3px; align-items: flex-end; }
.strip s { display: block; width: 13px; height: 18px; border-radius: 2px; text-decoration: none; }
.strip .p { background: var(--mintInk); }
.strip .o { background: var(--or); }
.strip .f { border: 1.5px dotted var(--dim); background: transparent; }
.strip .n { background: var(--hair); }

/* A bis Z und Register */
.azbar { display: flex; flex-wrap: wrap; gap: 2px; margin: 14px 0 4px; }
.azbar button { min-width: 28px; height: 30px; padding: 0 6px; border-radius: 8px; font: 500 13px var(--mono); color: var(--ink); }
.azbar button:hover { background: var(--hov); }
.azbar button[aria-pressed=true] { background: var(--ink); color: var(--bg2); }
.azbar button[disabled] { color: var(--dim); opacity: .6; cursor: default; background: none; }
.ledger { margin-top: 10px; border-top: 2px solid var(--ink); }
.lh, .row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 90px 100px; gap: 12px; align-items: center; padding: 0 6px; }
.lh { font-size: 12px; letter-spacing: .05em; color: var(--dim); padding-top: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); text-transform: uppercase; }
.letter { position: sticky; top: -1px; z-index: 3; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 6px; background: var(--paper2); border-bottom: 1px solid var(--hair); font-family: var(--serif); font-size: 22px; }
.row { width: 100%; text-align: left; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); border-radius: 0; text-decoration: none; color: inherit; }
.row:hover { background: var(--hov); }
.row[aria-current=true] { background: var(--paper); box-shadow: inset 3px 0 0 var(--or); }
.row .ix { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.row .nm { font-family: var(--serif); font-size: 22px; line-height: 1.12; min-width: 0; font-weight: 450; }
.row .nm small { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--mid); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kurzakte (Seitenpanel) */
.dr { padding: 22px 22px 28px; }
.dr .top { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.dr .az { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.dr h2 { font-family: var(--serif); font-weight: 450; font-size: 32px; line-height: 1.08; margin: 6px 0 8px; }
.dr .meta { color: var(--mid); font-size: 13.5px; }
.dstamp { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; padding: 14px 16px; border-radius: 18px; background: var(--paper); box-shadow: var(--hi); }
.dstamp .big { font-family: var(--serif); font-size: 46px; line-height: .95; font-variant-numeric: lining-nums; }
.dstamp small { display: block; color: var(--mid); font-size: 12.5px; }
.dstamp b { font-weight: 500; font-size: 14.5px; display: block; }
.dsec { margin-top: 20px; }
.dsec > h3 { font-family: var(--serif); font-weight: 450; font-size: 21px; margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--dim); }
.kv dd { overflow-wrap: anywhere; }
.vt { list-style: none; border-left: 2px solid var(--line); margin-left: 6px; }
.vt li { position: relative; padding: 0 0 12px 16px; font-size: 13.5px; }
.vt li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 10px; height: 10px; border-radius: 3px; background: var(--paper2); box-shadow: inset 0 0 0 2px var(--ink); transform: rotate(45deg); }
.vt li.warn::before { box-shadow: inset 0 0 0 2px var(--or); background: var(--orSoft); }
.vt li.money::before { background: var(--mint); box-shadow: inset 0 0 0 2px var(--mintInk); }
.vt li.now::before { background: var(--or); box-shadow: 0 0 0 4px var(--orSoft); }
.vt time { font: 11.5px var(--mono); color: var(--dim); display: block; }
.vt b, .vt span { display: block; }
.vt span { color: var(--mid); }
.dact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* Akte (Vollansicht) */
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--mid); font-size: 14px; margin-bottom: 18px; text-decoration: none; }
.back:hover { color: var(--ink); }
.dh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.dh .az { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.dh h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.02; margin: 10px 0 12px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.dh .meta { color: var(--mid); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.stamp { text-align: right; }
.stamp .big { font-family: var(--serif); font-size: 84px; line-height: .9; display: block; font-variant-numeric: lining-nums; }
.big.g-P { background: none; color: var(--mintInk); }
.big.g-N { background: none; color: var(--orT); }
.big.g-F { background: none; box-shadow: none; color: var(--mid); }
.big.g-X { background: none; box-shadow: none; color: var(--ink); }
.stamp small { display: block; color: var(--mid); font-size: 12.5px; margin-top: 6px; }
.stamp .lab { margin: 0 0 4px; text-align: right; }
.sec { margin-top: 34px; }
.sec > h2 { display: flex; align-items: baseline; gap: 12px; font-family: var(--serif); font-weight: 450; font-size: 30px; margin-bottom: 14px; flex-wrap: wrap; }
.sec > h2 span { font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .08em; font-weight: 400; }
.paper { background: var(--paper); border-radius: 22px; box-shadow: var(--hi), 0 8px 20px rgba(0,0,0,.1); padding: 22px 24px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 0; }
.subnav a { font-size: 13px; color: var(--mid); padding: 5px 11px; border-radius: 999px; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.subnav a:hover { color: var(--ink); background: var(--paper); }
.tl { overflow-x: auto; padding: 6px 6px 14px; margin: 0 -6px; }
.track { display: flex; min-width: max-content; position: relative; }
.ev { width: 176px; flex: none; position: relative; padding-top: 40px; padding-right: 16px; }
.ev::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: var(--hair); }
.ev.past::before { background: var(--ink); }
.ev:last-child::before { right: auto; width: 30px; }
.ev .nd { position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 5px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); transform: rotate(45deg) scale(.82); }
.ev .nd.life { background: var(--ink); }
.ev .nd.warn { box-shadow: inset 0 0 0 2px var(--or); background: var(--orSoft); }
.ev .nd.now { background: var(--or); box-shadow: 0 0 0 5px var(--orSoft); }
.ev .nd.money { background: var(--mint); box-shadow: inset 0 0 0 2px var(--mintInk); }
.ev time { font: 11.5px var(--mono); color: var(--dim); display: block; }
.ev b { display: block; font-weight: 500; font-size: 14px; margin: 2px 0; }
.ev span { font-size: 12.5px; color: var(--mid); }
.matrix { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mcell { background: var(--paper2); border-radius: 16px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.mcell .l { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.mcell b { display: block; font-family: var(--serif); font-weight: 450; font-size: 21px; margin: 6px 0 4px; line-height: 1.15; overflow-wrap: anywhere; }
.mcell small { color: var(--mid); font-size: 12.5px; display: block; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.facts h3 { font-family: var(--serif); font-weight: 450; font-size: 20px; margin-bottom: 8px; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); font-weight: 500; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.tbl tr:hover td { background: var(--hov); }
.tblwrap { overflow-x: auto; }
.steps { display: inline-flex; gap: 4px; align-items: center; }
.steps i { width: 12px; height: 12px; border-radius: 4px; background: var(--hair); display: block; }
.steps i.done { background: var(--mintInk); }
.steps i.prep { background: var(--warn); }
.steps i.due { background: var(--or); }

/* Heute */
.todaygrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 34px; margin-top: 8px; }
.stage { margin-top: 22px; }
.stage > h3 { font-family: var(--serif); font-weight: 450; font-size: 24px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stage > h3 span { font: 12px var(--mono); color: var(--dim); letter-spacing: .06em; }
.work { border-top: 2px solid var(--ink); margin-top: 10px; }
.work .it2 { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--hair); }
.work .it2 .nm { font-family: var(--serif); font-size: 19px; line-height: 1.15; text-decoration: none; color: inherit; }
.work .it2 .nm:hover { text-decoration: underline; }
.work .it2 small { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--mid); }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.side h3 { font-family: var(--serif); font-weight: 450; font-size: 22px; margin: 0 0 8px; }
.side section + section { margin-top: 26px; }
.side ul { list-style: none; }
.side li { padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.side li a { text-decoration: none; }
.side li a:hover { text-decoration: underline; }

/* Katalog */
.cattbl td input { height: 34px; border-radius: 9px; background: var(--field); box-shadow: var(--fieldSh); padding: 0 8px; width: 100%; min-width: 70px; font-variant-numeric: tabular-nums; text-align: right; }
.cattbl td.grp-h { font-family: var(--serif); font-size: 20px; padding-top: 22px; border-bottom: 2px solid var(--ink); }
.cattbl tr.off td { opacity: .55; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* Dialoge */
.dlgback { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.dlg { background: var(--card); color: var(--ink); border-radius: 26px; box-shadow: var(--sh), var(--hi); width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.dlg.wide { width: min(860px, 100%); }
.dlg > header { padding: 22px 26px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dlg > header h2 { font-family: var(--serif); font-weight: 450; font-size: 28px; line-height: 1.1; }
.dlg .body { padding: 6px 26px 8px; overflow-y: auto; }
.dlg > footer { padding: 14px 26px 22px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.formgrid .full { grid-column: 1 / -1; }
.formgrid h3 { grid-column: 1 / -1; font-family: var(--serif); font-weight: 450; font-size: 20px; margin-top: 14px; border-bottom: 1px solid var(--hair); padding-bottom: 4px; }
.fieldlist { max-height: 170px; overflow-y: auto; background: var(--field); border-radius: 12px; box-shadow: var(--fieldSh); padding: 6px 10px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font: 500 16px var(--mono); margin: 14px 0; padding: 16px; border-radius: 14px; background: var(--field); box-shadow: var(--fieldSh); }

/* Anmeldung */
.authwrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.authcard { width: min(440px, 100%); background: var(--card); border-radius: 30px; box-shadow: var(--sh), var(--hi); padding: 34px 32px 30px; }
.brandmark { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px; text-align: center; }
.brandmark .siegel { width: 112px; height: 112px; box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.2); }
.authcard .brand { font-size: 12.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--mid); }
.authcard h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.04; margin: 0 0 18px; text-align: center; }
.authcard p { color: var(--mid); font-size: 14px; margin-bottom: 14px; }
.authcard form { display: grid; gap: 14px; }
.authcard .linkbtn { color: var(--mid); font-size: 13.5px; text-decoration: underline; text-align: left; justify-self: start; }
.secret { font: 500 17px var(--mono); letter-spacing: .08em; padding: 12px 14px; border-radius: 12px; background: var(--field); box-shadow: var(--fieldSh); overflow-wrap: anywhere; user-select: all; }
.authtools { position: fixed; top: 16px; right: 16px; display: flex; gap: 6px; }
.authtools button { height: 34px; min-width: 38px; border-radius: 10px; background: var(--card); box-shadow: var(--hi), 0 4px 10px rgba(0,0,0,.2); font-size: 12px; font-weight: 600; color: var(--mid); display: grid; place-items: center; padding: 0 10px; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 12px; }
.toast { background: var(--rail); color: #f3f3f5; padding: 11px 18px; border-radius: 14px; font-size: 14px; box-shadow: var(--sh); max-width: min(520px, 92vw); pointer-events: auto; }
.toast.err { background: #8c241d; }

@media print { body { overflow: visible; background: #fff; } body::before, body::after, .topbar, .dock, .panel, .drawer { display: none; } }

/* ---------------------------------------------------------------- Glas: Typografie und Akzent */
h1.serif, .dh h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.row .nm { font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.work .it2 .nm { font-size: 15.5px; font-weight: 500; }
.dr h2 { font-size: 24px; font-weight: 600; }
.dsec > h3, .sec > h2, .stage > h3, .side h3, .facts h3, .dlg > header h2 { font-size: 17px; font-weight: 600; }
.cattbl td.grp-h { font-size: 16px; font-weight: 600; }
.cattbl td .mono { white-space: nowrap; }
.mcell b { font-size: 16px; font-weight: 600; }
.stamp .big, .dstamp .big { font-weight: 700; letter-spacing: -.02em; }
.stamp .big { font-size: 60px; }
.dstamp .big { font-size: 36px; }
.authcard { border-radius: 26px; }
.authcard h1 { font-size: 30px; font-weight: 600; }
.btn.or { background: var(--ac); color: var(--acInk); box-shadow: none; }
.chk input:checked { background: var(--ac); }
.dlg { background: var(--solid); }
.drawer { background: rgba(0,0,0,.14); }
[data-theme=light] .drawer { background: rgba(255,255,255,.3); }
.letter { background: var(--solid); }
select option, select optgroup { background: var(--solid); }
.toast { background: #14161b; }
.btn, .iconbtn, .row, .it { transition: background-color .12s; }

/* ---------------------------------------------------------------- Übersicht */
.main.isdash { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; overflow: visible; }
.main.isdash .mscroll { padding: 0 2px; display: flex; flex-direction: column; }
.dash { flex: 1 1 0; min-height: 640px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; }
.gc { border-radius: 20px; padding: 14px 18px; min-width: 0; text-decoration: none; color: var(--ink); display: block; animation: rise .32s ease-out backwards; }
.dhead { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 12px; }
.dhead .dseal { width: 46px; height: 46px; }
.dtitle { flex: 1; min-width: 0; }
.dhead h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.dhead p { font-size: 13.5px; color: var(--mid); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { transition: transform .16s ease-out; }
.kpi:hover { transform: translateY(-2px); }
.kpis .gc:nth-child(2) { animation-delay: .04s; } .kpis .gc:nth-child(3) { animation-delay: .08s; } .kpis .gc:nth-child(4) { animation-delay: .12s; }
.dgrid .gc:nth-child(1) { animation-delay: .14s; } .dgrid .gc:nth-child(2) { animation-delay: .18s; } .dgrid .gc:nth-child(n+3) { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gc { animation: none; } .kpi:hover { transform: none; } }
.kt { display: flex; align-items: center; gap: 10px; }
.kl { font-size: 13px; color: var(--mid); font-weight: 500; }
.chipi { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.chipi .ic { width: 16px; height: 16px; }
.chipi { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.kv2 { font-size: 28px; font-weight: 600; letter-spacing: -.015em; margin: 8px 0 4px; line-height: 1.1; }
.kb { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.kb small { font-size: 12.5px; color: var(--mid); }
.kb svg { width: 84px; flex: none; }
.spark { height: 28px; }
.spark-l { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-a { fill: var(--hair); }
.meter { height: 6px; display: block; }
.meter-b { fill: var(--hair); } .meter-f.bl { fill: var(--ac); } .meter-f.or { fill: var(--or); }
.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.75fr) minmax(0, 1fr); gap: 12px; min-height: 0; }
.dgrid .chart { grid-column: span 9; display: flex; flex-direction: column; } .dgrid .todayc { grid-column: span 3; } .dgrid .gc:nth-child(n+3) { grid-column: span 4; }
.ch { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ch h2 { font-size: 15px; font-weight: 600; }
.ch small { display: block; font-size: 12.5px; color: var(--mid); }
.lnk { font-size: 13px; color: var(--ink); }
.ch .badge { font-size: 12px; font-weight: 500; padding: 3px 10px; }

/* Zahlungseingänge: Säulen füllen die Karte, rechts die Details des gewählten Monats */
.chart { container-type: inline-size; min-height: 0; }
.ctools { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--paper2); box-shadow: inset 0 0 0 1px var(--hair); }
.seg button { height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--mid); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--solid); font-weight: 600; }
.cwrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; }
.plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; min-height: 0; min-width: 0; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 28px; margin-top: -7px; margin-bottom: -7px; font-size: 11.5px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: 0; }
.ygrid { position: absolute; inset: 0 0 28px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ygrid i { display: block; border-top: 1px solid var(--hair); }
.ygrid i:last-child { border-top-color: var(--line); }
.bcol { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) 28px; min-width: 0; border-radius: 10px; cursor: pointer; }
.bcol:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.bcol:hover { background: var(--paper2); }
.bcol[aria-pressed=true] { background: var(--paper); }
.bplot { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 0; height: 100%; }
.bfill { position: relative; display: block; width: 44%; max-width: 44px; min-height: 0; border-radius: 7px 7px 2px 2px; background: var(--barc); transition: height .28s cubic-bezier(.2,.7,.2,1), background-color .14s; }
.bprev { position: absolute; bottom: 0; left: 50%; width: 62%; max-width: 62px; transform: translateX(-50%); border-radius: 7px 7px 2px 2px; box-shadow: inset 0 0 0 1px var(--line); transition: height .28s cubic-bezier(.2,.7,.2,1); }
.blab { font-size: 12px; color: var(--mid); text-align: center; align-self: center; white-space: nowrap; }
.bcol:hover .bfill { background: var(--ink); }
.bcol[aria-pressed=true] .bfill { background: var(--ac); }
.bcol[aria-pressed=true] .blab { color: var(--ink); font-weight: 600; }
.btip { position: absolute; z-index: 5; bottom: 34px; left: 50%; transform: translate(-50%, 0); display: grid; gap: 1px; padding: 8px 12px; border-radius: 11px; background: var(--solid); box-shadow: var(--sh), inset 0 0 0 1px var(--line); font-size: 12.5px; white-space: nowrap; text-align: left; opacity: 0; pointer-events: none; transition: opacity .1s; }
.bcol.first .btip { left: 0; transform: none; } .bcol.last .btip { left: auto; right: 0; transform: none; }
.bcol:hover .btip, .bcol:focus-visible .btip { opacity: 1; }
.btip .dim { color: var(--mid); }
.cdetail { min-height: 0; min-width: 0; overflow-y: auto; scrollbar-width: thin; padding-left: 26px; border-left: 1px solid var(--hair); display: grid; align-content: start; gap: 14px; }
.cd-l { display: grid; gap: 4px; min-width: 0; }
.cd-m { font-size: 13px; color: var(--mid); }
.cd-v { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.cd-s { font-size: 12.5px; color: var(--mid); }
.cd-s b { color: var(--ink); font-weight: 600; } .cd-s b.up { color: var(--mintInk); } .cd-s b.down { color: var(--orT); }
.cd-b { margin-top: 12px; min-width: 0; } .cd-r { margin-top: 0; }
.cd-b h3 { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.cd-meth, .cd-top { list-style: none; display: grid; gap: 6px; font-size: 13px; }
.cd-meth li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.cd-meth .meter { grid-column: 1 / -1; width: 100%; height: 4px; }
.cd-top li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.cd-top a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; } .cd-top a:hover { text-decoration: underline; }
.cd-top .num { font-weight: 600; }
@container (min-width: 1200px) {
  .cwrap { grid-template-columns: minmax(0, 1fr) 500px; }
  .cdetail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
}
@container (max-width: 760px) {
  .cwrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: 230px auto; gap: 16px; }
  .cdetail { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--hair); overflow: visible; }
}

.tl2 { display: grid; gap: 6px; }
.tli { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 12px; background: var(--paper2); text-decoration: none; color: var(--ink); font-size: 13.5px; transition: background-color .12s; }
.tli:hover { background: var(--hov); }
.tli .tn { min-width: 38px; font-size: 18px; font-weight: 600; }
.tli .badge { margin-left: auto; }
.tli.warn .tn { color: var(--orT); }
.pay, .cls { list-style: none; }
.pay li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.pay li:last-child { border-bottom: 0; }
.pay a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay a:hover { text-decoration: underline; }
.pay small { color: var(--mid); font-size: 12px; }
.pay .num { font-weight: 600; }
.cls li { padding: 3px 0; }
.cls a { display: flex; gap: 10px; align-items: baseline; text-decoration: none; font-size: 13px; margin-bottom: 3px; }
.cls a:hover .cn { text-decoration: underline; }
.cls .cc { font-family: var(--mono); font-size: 11.5px; color: var(--mid); width: 26px; flex: none; }
.cls .cn { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls .meter { width: 100%; height: 4px; }
.qb { display: flex; align-items: center; gap: 16px; }
.qb p { font-size: 13.5px; color: var(--mid); }
.ring { width: 124px; height: 124px; flex: none; }
.ring-b, .ring-f { fill: none; stroke-width: 10; }
.ring-b { stroke: var(--hair); } .ring-f { stroke: var(--ac); stroke-linecap: round; }
.ring-t { font-size: 20px; font-weight: 600; fill: var(--ink); font-family: var(--sans); }

/* Vorschau-Hinweis: immer sichtbar, blockiert nichts */
.demobanner { position: fixed; left: 18px; bottom: 14px; z-index: 70; padding: 8px 14px; border-radius: 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #2a1405; background: var(--warn); box-shadow: var(--sh); pointer-events: none; max-width: calc(100vw - 36px); }
@media (min-width: 1181px) { .demobanner { left: 170px; top: 27px; bottom: auto; padding: 5px 12px; border-radius: 11px; font-size: 12px; opacity: .92; } }
@media print { .demobanner { display: none; } }

/* ---------------------------------------------------------------- Responsiv */
@media (max-width: 1180px) {
  .app { grid-template-columns: 60px minmax(0, 1fr); }
  .panel { position: fixed; z-index: 40; left: 92px; top: 86px; bottom: 18px; width: min(320px, calc(100vw - 110px)); display: none; background: var(--solid); }
  .app.panelopen:not(.nopanel) .panel { display: flex; }
  .app:not(.nopanel) .navbtn { display: grid; }
  .topnav a span { display: none; }
  .topnav a { padding: 0 13px; }
  .drawer { position: absolute; z-index: 5; inset: 0 0 0 auto; width: min(520px, 100%); box-shadow: var(--sh); }
  .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todaygrid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { flex: 1 0 auto; min-height: 0; grid-template-rows: auto; }
  .dgrid { grid-template-rows: none; }
  .dgrid .chart, .dgrid .todayc { grid-column: 1 / -1; }
  .dgrid .gc:nth-child(n+3) { grid-column: span 6; }
  .dgrid .quota { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .demobanner { left: 10px; right: 10px; bottom: 8px; text-align: center; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dgrid .gc:nth-child(n+3) { grid-column: 1 / -1; }
  .gc { padding: 14px 16px; }
  .kv2 { font-size: 25px; }
  .kb { flex-direction: column; align-items: flex-start; gap: 6px; }
  .dhead { flex-wrap: wrap; }
  .dhead h1 { font-size: 19px; }
  .bars { gap: 3px; }
  .blab { font-size: 10.5px; }
  html { overflow: visible; }
  body { overflow: auto; }
  .app { display: block; height: auto; min-height: 100dvh; padding: 10px; }
  .topbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
  .tmid { order: 3; width: 100%; }
  .topnav { width: 100%; justify-content: space-around; }
  .logo { padding: 0 14px; height: 44px; }
  .tright button { width: 36px; height: 36px; }
  .av { width: 36px; height: 36px; font-size: 12.5px; }
  .dock { flex-direction: row; width: 100%; justify-content: space-around; margin-bottom: 10px; padding: 4px; }
  .dock a::after { display: none; }
  .panel { left: 10px; right: 10px; top: 118px; bottom: 10px; width: auto; }
  .main { display: block; border-radius: 22px; overflow: visible; }
  .mscroll { padding: 20px 16px 40px; overflow: visible; }
  .drawer { position: fixed; z-index: 45; inset: 0; width: 100%; border-left: 0; border-radius: 0; }
  h1.serif { font-size: 38px; }
  .dh { grid-template-columns: 1fr; gap: 14px; }
  .dh h1 { font-size: 38px; }
  .stamp { text-align: left; }
  .stamp .lab { text-align: left; }
  .stamp .big { font-size: 64px; }
  .matrix, .facts, .formgrid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters > .fl:first-child { grid-column: 1 / -1; }
  .lh { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .row .ix { display: none; }
  .row .strip { grid-column: 1 / -1; }
  .row .nm { font-size: 21px; }
  .kv { grid-template-columns: 110px 1fr; }
  .dlg { border-radius: 20px; }
  .dlg > header, .dlg .body, .dlg > footer { padding-left: 18px; padding-right: 18px; }
  .codes { grid-template-columns: 1fr; }
  .work .it2 { grid-template-columns: 26px minmax(0, 1fr); }
  .work .it2 > :last-child { grid-column: 2; }
  .authcard { padding: 26px 20px 24px; }
}
.qrbox { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 16px; width: fit-content; max-width: 100%; }
.qr { width: min(224px, 62vw); height: auto; display: block; }
.dgrid .gc:nth-child(n+3) { display: flex; flex-direction: column; }
.dgrid .gc:nth-child(n+3) .pay, .dgrid .gc:nth-child(n+3) .cls { flex: 1; display: grid; grid-auto-rows: 1fr; align-content: stretch; }
.quota .qb, .quota .note { flex: 1; }

/* ---------------------------------------------------------------- Feinschliff: Seitenrahmen, Abstände, Kontraste */
#view[data-route=security] > *, #view[data-route=run] > *, #view[data-route=profile] > *, #view[data-route=approvals] > * { max-width: 980px; }
.mhead { padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.mhead .count { margin-top: 4px; }
.banner { margin: 16px 0 0; line-height: 1.5; }
.sec { margin-top: 24px; }
.sec > h2 { margin-bottom: 10px; }
.sec > h2 span { color: var(--mid); }
.paper { border-radius: 18px; padding: 18px 22px; }
.btn { box-shadow: var(--hi), 0 0 0 1px var(--hair), 0 4px 10px rgba(0,0,0,.1); }
.btn.or, .btn.dark, .btn.danger { box-shadow: 0 4px 10px rgba(0,0,0,.14); }
.btn.ghost { box-shadow: none; }
.formgrid .bar { justify-content: flex-start; }
.formgrid .fl.bar { flex-direction: row; }
#view[data-route=run] .filters { grid-template-columns: minmax(160px, 220px) auto; align-items: end; justify-content: start; }
#view[data-route=run] .filters .fl:first-child { grid-column: auto; }
.authwrap { height: calc(100dvh / var(--z)); min-height: 0; }
.authcard p { line-height: 1.5; }

/* Heute: Seitenspalte als ruhige Karten */
.todaygrid { gap: 24px; }
.todaygrid > div > h2.serif { font-size: 17px; font-weight: 600; }
.side section { background: var(--paper2); border-radius: 18px; padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--hair); }
.side section + section { margin-top: 14px; }
.side li:last-child { border-bottom: 0; }
.stage > h3 span { color: var(--mid); }
.work .it2 { padding: 10px 4px; }
.dgrid .gc:nth-child(n+3) .pay, .dgrid .gc:nth-child(n+3) .cls { grid-template-columns: minmax(0, 1fr); }
.ch { flex-wrap: wrap; }
@media (max-width: 760px) {
  .bcol:not(:nth-child(3n)) .blab { visibility: hidden; }
  .yaxis { display: none; } .plot { grid-template-columns: minmax(0, 1fr); }
}
/* Ab Desktop: Klassen zweispaltig, damit die untere Reihe niedrig bleibt */
@media (min-width: 1181px) {
  .dgrid .gc:nth-child(n+3) .cls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
  .dgrid .gc:nth-child(3) { grid-column: span 4; } .dgrid .classes { grid-column: span 5; } .dgrid .quota { grid-column: span 3; }
}
.dgrid .gc:nth-child(n+3) { min-height: 0; overflow-y: auto; scrollbar-width: thin; }

/* ---------------------------------------------------------------- Optik: Auswahl des Hintergrunds */
.optik { position: fixed; z-index: 80; top: 78px; right: 18px; width: min(392px, calc(100vw - 20px)); padding: 16px; border-radius: 22px; background: var(--solid); box-shadow: var(--sh), inset 0 0 0 1px var(--line); animation: rise .18s ease-out; }
.optik h2 { font-size: 15px; font-weight: 600; }
.optik p { font-size: 12.5px; color: var(--mid); margin: 2px 0 12px; }
.otg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ot { display: grid; gap: 6px; padding: 5px 5px 7px; border-radius: 14px; text-align: center; color: var(--ink); }
.ot:hover { background: var(--hov); }
.ot:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; }
.ot .sw { display: block; height: 66px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hair); }
.ot[aria-checked=true] { background: var(--paper); }
.ot[aria-checked=true] .sw { box-shadow: 0 0 0 2px var(--ac); }
.ot .on { font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.sw-glut { background: radial-gradient(90% 95% at 18% 100%, #99240b 0, #ff6a10 46%, #ffe6bd 66%, #161616 86%); }
.sw-gold { background: radial-gradient(circle at 26% 62%, #f7c15a 0, #a35a12 15%, transparent 21%), radial-gradient(circle at 70% 34%, #ffe0a0 0, #c98020 19%, transparent 29%), radial-gradient(circle at 92% 90%, #e9a53c 0, #7a4210 11%, transparent 17%), #060504; }
.sw-akademie { background: radial-gradient(circle at 15% 72%, #ffe58a 0, #e8a81d 13%, transparent 21%), radial-gradient(95% 100% at 82% 18%, #05133a 0, #0b5a82 46%, #f4ce4a 66%, #05070d 86%); }
.sw-nordlicht { background: linear-gradient(172deg, transparent 22%, rgba(30,226,170,.8) 40%, transparent 58%), linear-gradient(186deg, transparent 42%, rgba(126,70,255,.8) 62%, transparent 82%), #03050b; }
.sw-mond { background: radial-gradient(85% 95% at 80% 16%, #2b2c2f 0, #77797e 46%, #fffdf6 66%, #0a0a0a 86%); }
.sw-netz { background: radial-gradient(circle at 30% 34%, #fff 0, transparent 2.6%), radial-gradient(circle at 62% 26%, #fff 0, transparent 2.2%), radial-gradient(circle at 72% 62%, #fff 0, transparent 2.6%), radial-gradient(circle at 42% 70%, #fff 0, transparent 2.2%), radial-gradient(circle at 52% 48%, rgba(255,255,255,.34) 0, transparent 46%), #000; }
