/* =====================================================================
   Design-System v3 – Tokens. Alle Farben nur hier; Module nutzen var(--…).
   Identität: Fotopapier (kühles Grau-Grün), Tinte, Fettstift-Rot für Auswahl/Handlungsbedarf,
   Filmrand (dunkle Leiste) mit gelben Bildnummern. Details, kein Kostüm.
   ===================================================================== */
:root {
  --paper: #eef0ec;          /* Seitenhintergrund (Fotopapier) */
  --sheet: #fbfcfa;          /* Panels, Tabellen, Dialoge */
  --sheet-2: #f3f5f1;        /* Hover-Zeilen, Eingabefelder, Sub-Flächen */
  --ink: #1b211f;            /* Text */
  --ink-2: #5a645f;          /* Nebentext */
  --ink-3: #8c948f;          /* Platzhalter, stille Hinweise */
  --line: #d9ded7;           /* Trennlinien */
  --line-2: #b9c1ba;         /* betonte Linien, Rahmen bei Hover */
  --film: #1c2220;           /* Seitenleiste / Filmrand */
  --film-2: #262d2a;         /* aktive Zeile in der Leiste */
  --film-ink: #e4e8e2;
  --film-mark: #e3b53f;      /* Bildnummern auf Filmrand */
  --grease: #c8372a;         /* Fettstift-Rot: Auswahl / Achtung */
  --grease-soft: #c8372a17;
  --ok: #2d7a4f;   --ok-soft: #2d7a4f18;
  --warn: #9c6307; --warn-soft: #9c630718;
  --focus: #2457d6;
  --shadow: 0 10px 30px -12px #1b211f3d, 0 2px 6px -2px #1b211f1f;
  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-body: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 8px; --r-s: 5px; --r-l: 14px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 36px; --s7: 56px;
  --rail-w: 232px;
  /* Marke: Nachtblau (Mappe) + Lichtgelb (Lichtstrahl) – identisch in site.css */
  --night: #1f2a44; --night-2: #2a3758; --night-ink: #e9ecf3; --light: #f2c14e; --light-ink: #6b4d00; --light-soft: #f2c14e2b;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #111514; --sheet: #191e1c; --sheet-2: #1f2522; --ink: #e6e9e5; --ink-2: #a0a9a3; --ink-3: #6d756f;
  --line: #2a312d; --line-2: #3d4641; --film: #0c0f0e; --film-2: #1a1f1d; --film-ink: #d6dbd4; --film-mark: #dcae3a;
  --grease: #ee6453; --grease-soft: #ee645326; --ok: #5fc08a; --ok-soft: #5fc08a22;
  --warn: #e0a742; --warn-soft: #e0a74222; --focus: #7ea3ff;
  --shadow: 0 12px 34px -12px #00000099, 0 2px 6px -2px #00000066; color-scheme: dark; --night: #141b2e; --night-2: #1d2640; --night-ink: #e6e9f1; --light: #f2c14e; --light-ink: #6b4d00; --light-soft: #f2c14e22; } }
:root[data-theme="dark"] {
  --paper: #111514; --sheet: #191e1c; --sheet-2: #1f2522; --ink: #e6e9e5; --ink-2: #a0a9a3; --ink-3: #6d756f;
  --line: #2a312d; --line-2: #3d4641; --film: #0c0f0e; --film-2: #1a1f1d; --film-ink: #d6dbd4; --film-mark: #dcae3a;
  --grease: #ee6453; --grease-soft: #ee645326; --ok: #5fc08a; --ok-soft: #5fc08a22;
  --warn: #e0a742; --warn-soft: #e0a74222; --focus: #7ea3ff;
  --shadow: 0 12px 34px -12px #00000099, 0 2px 6px -2px #00000066; color-scheme: dark; --night: #141b2e; --night-2: #1d2640; --night-ink: #e6e9f1; --light: #f2c14e; --light-ink: #6b4d00; --light-soft: #f2c14e22; }

/* ---------- Basis ---------- */
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 14.5px; line-height: 1.5; font-feature-settings: "ss01", "cv05"; }
* { box-sizing: border-box; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.022em; }
h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; }
h2 { font-size: 19px; }
h3 { font-size: 15.5px; letter-spacing: -.012em; }
p { margin: 0; }
.mono, code { font-family: var(--f-mono); font-size: .88em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.eyebrow { font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; text-transform: none; }
.eyebrow .fr, .fr { font-family: var(--f-mono); font-size: 11px; color: var(--film-mark); letter-spacing: .04em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--grease-soft); }
img { max-width: 100%; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- App-Rahmen ---------- */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100%; }
.rail { background: var(--film); color: var(--film-ink); position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: var(--s5) var(--s3) var(--s4); overflow-y: auto; }
.rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: repeating-linear-gradient(to bottom, transparent 0 9px, var(--film-ink) 9px 15px, transparent 15px 24px); opacity: .07; }
.brand { padding: 2px var(--s3) var(--s5); display: flex; align-items: center; gap: 10px; color: var(--film-ink); }
.brand-mark { flex-shrink: 0; }
.brand-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand b { display: block; font-family: var(--f-serif, var(--f-display)); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--film-ink); }
.brand span { font-size: 12px; color: var(--film-ink); opacity: .5; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: var(--s3); padding: 8px 10px; border-radius: var(--r-s); text-decoration: none; font-weight: 500; font-size: 14px; color: var(--film-ink); opacity: .72; }
.nav a .fr { width: 26px; flex: none; opacity: .9; }
.nav-group { font-size: 11.5px; font-weight: 600; color: var(--film-ink); opacity: .42; padding: 14px 10px 4px; }
.nav .nav-group:first-child { padding-top: 0; }
.nav a:hover { opacity: 1; background: #ffffff0d; }
.nav a[aria-current="page"] { opacity: 1; background: var(--film-2); box-shadow: inset 2px 0 0 var(--film-mark); }
.nav a .badge, .tabbar .badge { margin-left: auto; background: var(--grease); color: #fff; font-family: var(--f-mono); font-size: 10.5px; line-height: 17px; min-width: 17px; text-align: center; border-radius: 9px; padding: 0 5px; }
.rail-foot { margin-top: auto; padding: var(--s4) var(--s3) 0; font-size: 12px; color: var(--film-ink); opacity: .55; line-height: 1.5; }

.main { min-width: 0; padding-block: var(--s5) 96px; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.view { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s5); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); padding-bottom: var(--s2); }
.head > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.head > div.row { flex-direction: row; gap: var(--s2); }
.head h1 + .muted { font-size: 14px; }

/* ---------- Bausteine ---------- */
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); min-width: 0; }
.panel > h2:first-child, .panel > .row:first-child h2 { font-size: 17px; }
.grid { display: grid; gap: var(--s4); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.spacer { flex: 1; }

.btn { appearance: none; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); font: 600 13.5px/1 var(--f-body); letter-spacing: -.005em; padding: 0 14px; height: 36px; border-radius: var(--r-s); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; white-space: nowrap; transition: background-color .12s, border-color .12s; }
.btn:hover { background: var(--sheet-2); border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink); opacity: .9; }
.btn.danger { color: var(--grease); border-color: transparent; background: var(--grease-soft); }
.btn.danger:hover { border-color: var(--grease); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--sheet-2); border-color: transparent; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); min-width: 0; }
input, select, textarea { font: 400 14.5px/1.35 var(--f-body); color: var(--ink); background: var(--sheet-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; width: 100%; min-width: 0; transition: border-color .12s, background-color .12s; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { background: var(--sheet); border-color: var(--ink-2); outline: 2px solid var(--focus); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--grease); margin: 0; }
input[type="date"], input[type="number"] { font-variant-numeric: tabular-nums; }
.form { display: grid; gap: var(--s3) var(--s4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form .wide { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sheet-2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--sheet-2); }
tr.click:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-body); font-size: 11.5px; font-weight: 600; letter-spacing: 0; padding: 2px 8px 2px 7px; border-radius: 20px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink-2); white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill.red { color: var(--grease); background: var(--grease-soft); border-color: transparent; }
.pill.idle { color: var(--ink-2); }

.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: var(--s6) var(--s5); text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: var(--s3); align-items: center; background: transparent; }
.empty h2 { color: var(--ink); }
.empty p { max-width: 52ch; }
.note { font-size: 13px; color: var(--ink-2); border-left: 2px solid var(--line-2); padding-left: var(--s3); line-height: 1.5; }
.note.legal { border-color: var(--warn); }
details.note summary, details > summary.q { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; gap: 6px; align-items: center; }
details.note summary::before, details > summary.q::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 4px 0 1px; }
details[open] > summary::before { transform: rotate(45deg); }
details.note summary::-webkit-details-marker { display: none; }

/* ---------- Dialog, Toast, Banner ---------- */
.scrim { position: fixed; inset: 0; background: #0a0d0c80; backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.dialog { background: var(--sheet); color: var(--ink); border-radius: var(--r-l); width: min(720px, 100%); max-height: 100%; overflow: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dialog > .row:first-child { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.dialog > .row:first-child h2 { font-size: 18px; }
.dialog > .row:last-child { padding-top: var(--s3); border-top: 1px solid var(--line); position: sticky; bottom: calc(-1 * var(--s5)); background: var(--sheet); margin-bottom: calc(-1 * var(--s5)); padding-bottom: var(--s5); }
.dialog.wide { width: min(1040px, 100%); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r); font-weight: 600; font-size: 13.5px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.banner { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); border-radius: var(--r); padding: 9px 14px; font-size: 13px; }

/* ---------- Navigation Handy: untere Tab-Leiste ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
  .main { padding-block: max(var(--s4), env(safe-area-inset-top, 0px)) calc(84px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .view { gap: var(--s4); }
  .panel { padding: var(--s4); border-radius: var(--r); }
  .head { padding-bottom: 0; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--film); color: var(--film-ink); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); border-top: 1px solid #ffffff14; }
  .tabbar[hidden] { display: none; }
  .tabbar a, .tabbar summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 6px 2px; border-radius: var(--r-s); color: var(--film-ink); text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: 0; opacity: .66; position: relative; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar a .fr, .tabbar summary .fr { font-size: 10.5px; }
  .tabbar a[aria-current="page"], .tabbar summary[aria-current="page"], .tabbar details[open] summary { opacity: 1; background: var(--film-2); }
  .tabbar a[aria-current="page"] .fr, .tabbar summary[aria-current="page"] .fr { color: var(--film-mark); }
  .tabbar .badge { position: absolute; top: 4px; right: calc(50% - 26px); margin: 0; }
  .tabbar details { position: static; }
  .tabbar .more-list { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); background: var(--film); border: 1px solid #ffffff1f; border-radius: var(--r); padding: 6px; display: grid; gap: 2px; box-shadow: var(--shadow); max-height: calc(100dvh - 110px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
  .tabbar .more-list .nav-group { padding: 10px 12px 2px; }
  .tabbar .more-list .nav-group:first-child { padding-top: 4px; }
  .tabbar .more-list a { flex-direction: row; justify-content: flex-start; gap: var(--s3); min-height: 44px; padding: 8px 12px; font-size: 14px; font-weight: 500; }
  .tabbar .more-list a .fr { width: 26px; }
  .tabbar .more-list .badge { position: static; margin-left: auto; }
  .dialog { border-radius: var(--r); padding: var(--s4); }
  .dialog > .row:last-child { bottom: calc(-1 * var(--s4)); margin-bottom: calc(-1 * var(--s4)); padding-bottom: var(--s4); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
/* Kundenportal: keine Seitenleiste, volle Breite, ruhige Lesebreite */
:root[data-role="kunde"] .app { grid-template-columns: 1fr; }
:root[data-role="kunde"] .rail { display: none; }
:root[data-role="kunde"] .main { padding-block: 0 calc(56px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
:root[data-role="kunde"] .view { max-width: 1240px; }
:root[data-role="kunde"] .tabbar { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Auth-Seiten (login, register, bestaetigen, reset, onboarding) – v2: Formular links, Markenfläche rechts ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); }
.auth [hidden] { display: none !important; }
.auth-main { display: flex; flex-direction: column; padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); min-width: 0; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: min(460px, 100%); margin: 0 auto; }
.auth-top .brand { padding: 0; color: var(--ink); gap: 9px; text-decoration: none; }
.auth-top .brand b { color: var(--ink); font-size: 19px; }
.auth-top .brand span { color: var(--ink-2); opacity: 1; }
.auth-top .brand .brand-mark { color: var(--night); }
.auth-top a.alt { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.auth-card { width: min(460px, 100%); margin: clamp(28px, 8vh, 72px) auto 0; display: flex; flex-direction: column; gap: var(--s4); }
.auth-card.wide { width: min(640px, 100%); }
.auth-card h1 { font-size: clamp(26px, 3vw, 30px); }
.auth-card > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.auth-card .form { grid-template-columns: 1fr; }
.auth-card .btn.primary { width: 100%; height: 44px; font-size: 14.5px; }
.auth-card .sub { color: var(--ink-2); font-size: 14px; }
.auth-foot { width: min(460px, 100%); margin: auto auto 0; padding-top: var(--s6); font-size: 12px; color: var(--ink-3); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.auth-foot a { color: inherit; }
.auth-card.wide + .auth-foot { width: min(640px, 100%); }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.auth-links a, .auth-links button.link { color: var(--ink); }
button.link { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.auth-err { background: var(--grease-soft); color: var(--grease); border: 1px solid transparent; border-radius: var(--r-s); padding: 9px 12px; font-size: 13.5px; font-weight: 500; }
.auth-err:empty { display: none; }
.auth-err .row, .auth-ok .row { margin-top: 6px; }
.auth-ok { background: var(--ok-soft); color: var(--ok); border-radius: var(--r-s); padding: 9px 12px; font-size: 13.5px; font-weight: 500; }
.auth-ok:empty { display: none; }
.auth-info { background: var(--sheet-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); }
.auth-info:empty { display: none; }
.auth-info b { color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.check input { margin-top: 2px; flex: none; }
.check a { color: var(--ink); }
.check.req > span::after { content: " *"; color: var(--grease); }
.req-note { font-size: 12px; color: var(--ink-3); }
/* Passwortfeld mit Anzeigen-Knopf + Caps-Lock-Hinweis */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); appearance: none; border: 0; background: transparent; color: var(--ink-2); width: 34px; height: 30px; border-radius: var(--r-s); display: grid; place-items: center; cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--sheet); }
.pw-eye svg { width: 18px; height: 18px; }
.pw-caps { display: none; font-size: 12.5px; color: var(--warn); font-weight: 500; }
.pw-caps.on { display: block; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 4px; }
.pw-meter i { background: var(--line); border-radius: 2px; }
.pw-meter[data-score="1"] i:nth-child(-n+1), .pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: var(--ok); }
.pw-meter[data-score="4"] i { background: var(--ok); }
.pw-hint { font-size: 12.5px; color: var(--ink-2); }
.f .hint { font-weight: 400; color: var(--ink-3); }
/* 2FA-Code-Feld */
.otp { font-family: var(--f-mono); font-size: 22px; letter-spacing: .32em; text-align: center; padding: 10px; }
/* Slug */
.slug-box { display: flex; flex-wrap: wrap; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sheet-2); overflow: hidden; }
.slug-box span { padding: 8px 0 8px 10px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.slug-box input { border: 0; background: transparent; border-radius: 0; font-family: var(--f-mono); font-size: 14px; padding-left: 2px; flex: 1 1 140px; }
.slug-box input:focus { outline: none; background: transparent; }
.slug-box:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink-2); background: var(--sheet); }
.slug-state { font-size: 12.5px; min-height: 18px; }
.slug-state.ok { color: var(--ok); } .slug-state.bad { color: var(--grease); }
.slug-preview { font-family: var(--f-mono); font-size: 13px; color: var(--ink); background: var(--sheet-2); border: 1px dashed var(--line-2); border-radius: var(--r-s); padding: 8px 10px; word-break: break-all; }
.slug-preview b { color: var(--night); font-weight: 600; }
/* Schritt-Assistent (Onboarding) */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--light); }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: st; }
.stepper li { font-size: 12.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; }
.stepper li::before { content: ""; height: 3px; border-radius: 2px; background: var(--line); }
.stepper li.done::before, .stepper li.on::before { background: var(--light); }
.stepper li.on { color: var(--ink); font-weight: 600; }
.stepper li.done { color: var(--ink-2); }
.step[hidden] { display: none; }
.step { display: flex; flex-direction: column; gap: var(--s4); }
.step-nav { display: flex; gap: var(--s2); align-items: center; }
.step-nav .btn.primary { width: auto; flex: 1; }
.step-nav .btn.ghost { width: auto; }
.logo-pick { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.logo-pick img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sheet-2); }
.logo-pick input[type="file"] { width: auto; flex: 1; }
/* Markenfläche rechts (Nachtblau, Lichtstrahl) */
.auth-side { display: none; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); }
  .auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s6); background: var(--night); color: var(--night-ink); padding: max(36px, env(safe-area-inset-top, 0px)) 40px 36px; position: relative; overflow: hidden; }
  .auth-side::before { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, transparent 0 55%, #f2c14e14 55% 68%, transparent 68%); pointer-events: none; }
  .auth-side .brand { padding: 0; color: var(--night-ink); }
  .auth-side .brand b { color: var(--night-ink); }
  .auth-side .brand span { color: var(--night-ink); opacity: .6; }
  .auth-side .brand .brand-mark { color: var(--night-ink); opacity: .9; }
  .auth-side-mark { width: min(260px, 60%); height: auto; margin: 0 0 var(--s5); display: block; }
  .auth-side h2 { font-family: var(--f-serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.012em; max-width: 18ch; }
  .auth-side p { font-size: 15px; opacity: .78; max-width: 40ch; }
  .auth-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
  .auth-side li { display: flex; gap: 12px; align-items: baseline; }
  .auth-side li .fr { width: 28px; flex: none; color: var(--light); }
  .auth-side .facts { display: flex; flex-wrap: wrap; gap: 8px; }
  .auth-side .fact { font-size: 12.5px; font-weight: 600; border: 1px solid #ffffff2e; border-radius: 20px; padding: 4px 10px; color: var(--night-ink); background: #ffffff0a; }
  .auth-side .fact::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--light); margin-right: 7px; vertical-align: 1px; }
  .auth-side .auth-side-foot { font-size: 12px; opacity: .55; display: flex; gap: 12px; flex-wrap: wrap; }
  .auth-side .auth-side-foot a { color: inherit; }
  .auth-side > div { position: relative; }
}
@media (max-width: 899px) { .auth-card { margin-top: clamp(20px, 5vh, 40px); } }

/* ---------- Teilen-Box mit persönlichem Link + QR (Studio) ---------- */
.share { display: flex; flex-direction: column; gap: var(--s4); }
.share-link { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet-2); padding: var(--s3) var(--s4); }
.share-link .url { font-family: var(--f-mono); font-size: 13px; word-break: break-all; color: var(--ink); }
.share-link .url b { color: var(--night); font-weight: 600; }
.share-link .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.share-fallback { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: 13px; color: var(--ink-2); }
.share-fallback .code { font-family: var(--f-mono); font-size: 18px; letter-spacing: .14em; color: var(--ink); font-weight: 600; }
.share-qr { display: grid; justify-items: center; gap: var(--s3); text-align: center; }
.share-qr .qr { background: #fff; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); display: inline-block; line-height: 0; }
.share-qr .qr img, .share-qr .qr canvas { display: block; }
.share-qr .qr-title { font-family: var(--f-serif); font-size: 20px; color: var(--ink); }
.share-qr .qr-url { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); word-break: break-all; max-width: 320px; }
.share-qr .qr-code { font-family: var(--f-mono); font-size: 15px; letter-spacing: .14em; color: var(--ink); }
.kd-links { display: flex; flex-direction: column; gap: 8px; }
.kd-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kd-link:last-child { border-bottom: 0; }
.kd-link .what { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kd-link .what small { color: var(--ink-2); font-family: var(--f-mono); font-size: 11.5px; word-break: break-all; }
@media print {
  body.print-qr > *:not(.scrim) { display: none !important; }
  body.print-qr .scrim { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  body.print-qr .dialog { box-shadow: none; border: 0; width: 100%; max-height: none; }
  body.print-qr .dialog > .row:first-child, body.print-qr .dialog > .row:last-child { display: none; }
}
.konto-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.konto-row:last-child { border-bottom: 0; }
.konto-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.konto-row small { color: var(--ink-2); }
.topline { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--sheet); }
.topline .brand { flex: 1 1 auto; min-width: 0; }
.topline .brand { padding: 0; color: var(--ink); gap: 8px; }
.topline .brand b { color: var(--ink); font-size: 18px; }
.topline .brand span { color: var(--ink-2); opacity: 1; }
.page { max-width: 760px; margin: 0 auto; padding: var(--s5) max(16px, env(safe-area-inset-right, 0px)) var(--s7) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: var(--s5); }
.plan-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--film); color: var(--film-ink); border-radius: 20px; padding: 3px 10px 3px 8px; font-size: 12px; font-weight: 600; }
.plan-pill .fr { color: var(--film-mark); }
.rail-plan { margin: 0 var(--s3) var(--s3); padding: 10px 12px; border-radius: var(--r-s); background: var(--film-2); font-size: 12.5px; color: var(--film-ink); display: flex; flex-direction: column; gap: 4px; }
.rail-plan b { color: var(--film-mark); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; }
.rail-plan a { color: var(--film-ink); opacity: .8; font-size: 12px; }
.rail-user { padding: 0 var(--s3); font-size: 12.5px; color: var(--film-ink); opacity: .7; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.rail-user a { color: inherit; }
.upgrade { border: 1px dashed var(--line-2); border-radius: var(--r); padding: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; background: var(--sheet); }
.upgrade b { display: block; }
.upgrade .muted { font-size: 13px; }
