/* ==========================================================================
   Feuerwehrverwaltung – app.css v1.0 (abgeleitet aus prototype/design.css)
   Eigenes schlankes CSS, keine externen Abhängigkeiten, keine Webfonts.
   Aufbau: 1 Tokens · 2 Basis · 3 Layout/Shell · 4 Komponenten · 5 Kiosk · 6 Utilities
   ========================================================================== */

/* 1 ─ Tokens ------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Marke: Feuerwehrrot (nahe RAL 3000), nur als Akzent */
  --brand-600: #b91c1c;   /* Primär, weißer Text 6,5:1 */
  --brand-700: #991b1b;   /* Hover/aktiv */
  --brand-50:  #fef2f2;   /* Flächen, aktive Navigation */
  --brand-100: #fee2e2;

  /* Neutrale (Slate) */
  --n-0:   #ffffff;
  --n-50:  #f6f7f9;
  --n-100: #eef0f3;
  --n-200: #dfe3e8;
  --n-300: #c5ccd5;
  --n-500: #66707d;   /* Sekundärtext auf Weiß 4,9:1 */
  --n-700: #374151;
  --n-900: #111827;

  /* Semantisch */
  --ok-600:   #15803d;  --ok-50:   #ecfdf3;
  --warn-600: #a15c07;  --warn-50: #fff7e6;
  --err-600:  #b91c1c;  --err-50:  #fef2f2;
  --info-600: #1d4ed8;  --info-50: #eff4ff;

  /* Rollen-Tokens (werden im Dark-Mode umgeschaltet) */
  --bg:          var(--n-50);
  --surface:     var(--n-0);
  --surface-2:   var(--n-100);
  --border:      var(--n-200);
  --border-strong: var(--n-300);
  --text:        var(--n-900);
  --text-muted:  var(--n-500);
  --accent:      var(--brand-600);
  --accent-hover:var(--brand-700);
  --accent-soft: var(--brand-50);
  --accent-text: var(--brand-600);     /* Rot als Textfarbe */
  --on-accent:   #ffffff;
  --positive:    var(--ok-600);
  --negative:    var(--err-600);
  --focus:       #2563eb;

  /* Typografie */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: .8125rem;  /* 13 */
  --fs-sm: .875rem;   /* 14 */
  --fs-md: 1rem;      /* 16 */
  --fs-lg: 1.125rem;  /* 18 */
  --fs-xl: 1.375rem;  /* 22 */
  --fs-2xl: 1.75rem;  /* 28 */
  --fs-3xl: 2.25rem;  /* 36 */
  --lh: 1.5;

  /* Abstände (4er-Raster) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem;

  /* Form */
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --radius-full: 999px;
  --shadow-1: 0 1px 2px rgba(17,24,39,.06), 0 1px 3px rgba(17,24,39,.08);
  --shadow-2: 0 4px 12px rgba(17,24,39,.08), 0 2px 4px rgba(17,24,39,.06);

  /* Touch */
  --touch: 48px;        /* Mindestgröße interaktiver Elemente */
  --touch-kiosk: 64px;  /* Kiosk-Buttons */

  --sidebar-w: 248px;
  --bottomnav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0f1115;
    --surface:     #181b21;
    --surface-2:   #22262e;
    --border:      #2e333d;
    --border-strong: #3d4450;
    --text:        #eef0f3;
    --text-muted:  #a3abb8;   /* auf surface 7,4:1 */
    --accent:      #dc2626;   /* weißer Text 4,8:1 */
    --accent-hover:#ef4444;
    --accent-soft: rgba(239,68,68,.14);
    --accent-text: #f87171;   /* Rot als Text auf Dunkel 6,1:1 */
    --positive:    #4ade80;
    --negative:    #f87171;
    --ok-50:   rgba(74,222,128,.12);
    --warn-50: rgba(251,191,36,.12);  --warn-600: #fbbf24;
    --err-50:  rgba(248,113,113,.12); --err-600:  #f87171;
    --info-50: rgba(96,165,250,.12);  --info-600: #93b4fd;
    --ok-600:  #4ade80;
    --focus:   #93b4fd;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 4px 12px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --bg:          #0f1115;
  --surface:     #181b21;
  --surface-2:   #22262e;
  --border:      #2e333d;
  --border-strong: #3d4450;
  --text:        #eef0f3;
  --text-muted:  #a3abb8;   /* auf surface 7,4:1 */
  --accent:      #dc2626;   /* weißer Text 4,8:1 */
  --accent-hover:#ef4444;
  --accent-soft: rgba(239,68,68,.14);
  --accent-text: #f87171;   /* Rot als Text auf Dunkel 6,1:1 */
  --positive:    #4ade80;
  --negative:    #f87171;
  --ok-50:   rgba(74,222,128,.12);
  --warn-50: rgba(251,191,36,.12);  --warn-600: #fbbf24;
  --err-50:  rgba(248,113,113,.12); --err-600:  #f87171;
  --info-50: rgba(96,165,250,.12);  --info-600: #93b4fd;
  --ok-600:  #4ade80;
  --focus:   #93b4fd;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 4px 12px rgba(0,0,0,.45);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* 2 ─ Basis -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: var(--lh);
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 var(--s-3); line-height: 1.25; font-weight: 650; }
h1 { font-size: var(--fs-2xl); letter-spacing: -.01em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--s-4); }
a  { color: var(--accent-text); text-underline-offset: 2px; }
small, .small { font-size: var(--fs-sm); }
img, svg { display: block; max-width: 100%; }
.num, td.num, .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .95em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--surface);
  color: var(--text); padding: var(--s-3) var(--s-4); border-radius: var(--radius); box-shadow: var(--shadow-2); }
.skip-link:focus { top: var(--s-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 3 ─ Layout / App-Shell -------------------------------------------------
   Mobil: Topbar + Bottom-Nav.  ≥1024px: Sidebar links.                   */
.app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: var(--s-2) var(--s-4); background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .title { font-weight: 650; font-size: var(--fs-lg); margin: 0; }
.topbar .spacer { flex: 1; }

.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--text); text-decoration: none; font-weight: 700; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--brand-600); color: #fff;
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand small { display: block; font-weight: 500; color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.2; }

.main { padding: var(--s-4) var(--s-4) calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + var(--s-8)); max-width: 1200px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); margin-bottom: var(--s-5); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--text-muted); margin: var(--s-1) 0 0; font-size: var(--fs-sm); }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--s-2); }

.sidebar { display: none; }
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--touch); color: var(--text-muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--accent-text); }
.bottom-nav a[aria-current="page"] svg { stroke-width: 2.4; }

@media (min-width: 1024px) {
  .app.has-nav { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    padding: var(--s-4) var(--s-3); background: var(--surface); border-right: 1px solid var(--border);
  }
  .sidebar .brand { padding: var(--s-1) var(--s-2) var(--s-5); }
  .bottom-nav, .topbar .menu-btn, .has-nav .topbar .brand { display: none; }
  .main { padding: var(--s-8) var(--s-10) var(--s-12); }
  .topbar { padding: var(--s-2) var(--s-10); }
}
.nav-group { margin: var(--s-4) 0 var(--s-1); padding: 0 var(--s-3); font-size: var(--fs-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.nav-link {
  display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-3);
  border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 550;
}
.nav-link svg { width: 20px; height: 20px; color: var(--text-muted); flex: none; }
.nav-link:hover { background: var(--surface-2); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-link[aria-current="page"] svg { color: var(--accent-text); }
.nav-link .badge { margin-left: auto; }
.nav-link.is-disabled { color: var(--text-muted); }
.sidebar .user-box { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--border); }

/* Grid-Helfer */
.grid { display: grid; gap: var(--s-4); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stack > * + * { margin-top: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* 4 ─ Komponenten -------------------------------------------------------- */

/* Karte */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card-body { padding: var(--s-5); }
.card-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--fs-lg); }
.card-head .actions { margin-left: auto; display: flex; gap: var(--s-2); }
.card-foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-sm); }

/* Kennzahl */
.stat { padding: var(--s-4) var(--s-5); }
.stat .label { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 550; }
.stat .value { font-size: var(--fs-2xl); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: var(--s-1); }
.stat .hint { color: var(--text-muted); font-size: var(--fs-xs); margin-top: var(--s-1); }
.pos { color: var(--positive); }
.neg { color: var(--negative); }

/* Saldo-Hero */
.balance-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: var(--s-6);
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%); color: #fff; box-shadow: var(--shadow-2);
}
.balance-hero::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 6px; height: 100%; background: var(--brand-600); }
.balance-hero .label { color: #cbd2dc; font-size: var(--fs-sm); font-weight: 600; }
.balance-hero .value { font-size: var(--fs-3xl); font-weight: 750; font-variant-numeric: tabular-nums; margin: var(--s-1) 0 var(--s-2); }
.balance-hero .value.neg { color: #fca5a5; }
.balance-hero .meta { color: #cbd2dc; font-size: var(--fs-sm); }
.balance-hero .cluster { margin-top: var(--s-4); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--touch); padding: 0 var(--s-5); border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--n-900); color: #fff; border-color: var(--n-900); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-outline { color: var(--accent-text); border-color: currentColor; background: transparent; }
.btn-sm { min-height: 40px; padding: 0 var(--s-3); font-size: var(--fs-sm); } /* nur in dichten Tabellen am Desktop */
.btn-lg { min-height: 56px; font-size: var(--fs-lg); padding: 0 var(--s-6); }
.btn-block { width: 100%; }
.btn-icon { width: var(--touch); padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-4); }
.field label, .label-text { font-weight: 600; font-size: var(--fs-sm); }
.field .help { color: var(--text-muted); font-size: var(--fs-xs); }
.field .error { color: var(--err-600); font-size: var(--fs-xs); font-weight: 600; }
.input, .select, textarea.input {
  width: 100%; min-height: var(--touch); padding: 0 var(--s-4); font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
textarea.input { padding: var(--s-3) var(--s-4); min-height: 96px; }
.select { appearance: none; padding-right: var(--s-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2366707d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--err-600); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .addon { display: grid; place-items: center; padding: 0 var(--s-4); border: 1px solid var(--border-strong);
  border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); color: var(--text-muted); font-weight: 600; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--text-muted); pointer-events: none; }
.search .input { padding-left: 44px; }
.check { display: flex; align-items: center; gap: var(--s-3); min-height: var(--touch); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

/* OTP-Eingabe (2FA) */
.otp { display: flex; gap: var(--s-2); justify-content: space-between; }
.otp input { width: 100%; max-width: 52px; height: 60px; text-align: center; font-size: var(--fs-2xl); font-weight: 700;
  font-variant-numeric: tabular-nums; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.otp input:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }

/* Segmented Control / Tabs */
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: var(--radius); }
.segmented a, .segmented button { min-height: 40px; padding: 0 var(--s-4); display: inline-flex; align-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.segmented [aria-current="page"], .segmented [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 var(--s-2); border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 650; background: var(--surface-2); color: var(--text-muted); white-space: nowrap; }
.badge-ok   { background: var(--ok-50);   color: var(--ok-600); }
.badge-warn { background: var(--warn-50); color: var(--warn-600); }
.badge-err  { background: var(--err-50);  color: var(--err-600); }
.badge-info { background: var(--info-50); color: var(--info-600); }
.badge-brand{ background: var(--accent); color: var(--on-accent); }

/* Hinweisboxen */
.alert { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); font-size: var(--fs-sm); }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-info { background: var(--info-50); border-color: transparent; }
.alert-info svg { color: var(--info-600); }
.alert-warn { background: var(--warn-50); border-color: transparent; }
.alert-warn svg { color: var(--warn-600); }
.alert-ok { background: var(--ok-50); border-color: transparent; }
.alert-ok svg { color: var(--ok-600); }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 650; color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: .04em; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { text-align: right; }
.table td.actions { text-align: right; white-space: nowrap; }

/* Listen (mobil statt Tabelle) */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .t2 { color: var(--text-muted); font-size: var(--fs-xs); }
.list-item .amount { font-weight: 650; }
.icon-circle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-muted); }
.icon-circle svg { width: 20px; height: 20px; }
.icon-circle.in  { background: var(--ok-50); color: var(--ok-600); }
.icon-circle.out { background: var(--surface-2); color: var(--text); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700;
  background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); }

/* Datei-Drop */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); text-align: center;
  padding: var(--s-8) var(--s-5); border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; }
.dropzone svg { width: 40px; height: 40px; color: var(--accent-text); }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Stepper (Prozessschritte) */
.steps { display: flex; gap: var(--s-2); list-style: none; margin: 0 0 var(--s-5); padding: 0; counter-reset: step; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: var(--s-2); color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); }
.steps li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); }
.steps li + li::after { order: -1; content: ""; width: 20px; height: 2px; background: var(--border-strong); }
.steps li[aria-current="step"] { color: var(--text); }
.steps li[aria-current="step"]::before { background: var(--accent); color: var(--on-accent); }
.steps li.done::before { content: "✓"; background: var(--ok-50); color: var(--ok-600); }

/* QR-Platzhalter */
.qr { width: 144px; height: 144px; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); flex: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.copy-row { display: flex; align-items: center; gap: var(--s-2); }

/* Auth-Seiten */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: var(--s-6) var(--s-4);
  background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent), var(--bg); }
.auth .card { width: 100%; max-width: 420px; }
.auth .card-body { padding: var(--s-8) var(--s-6); }
.auth .brand { justify-content: center; margin-bottom: var(--s-6); }
.auth .brand-mark { width: 48px; height: 48px; border-radius: 12px; }

/* 5 ─ Kiosk (Tablet-Modus) ----------------------------------------------- */
.kiosk { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); user-select: none; -webkit-user-select: none; }
.kiosk-bar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-6); background: var(--surface); border-bottom: 1px solid var(--border); min-height: 72px; }
.kiosk-bar .clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; font-size: var(--fs-lg); color: var(--text-muted); }
.kiosk-main { flex: 1; padding: var(--s-6); }
.kiosk-title { font-size: var(--fs-2xl); margin: 0 0 var(--s-4); }
.kiosk .btn { min-height: var(--touch-kiosk); font-size: var(--fs-lg); border-radius: 14px; padding: 0 var(--s-6); }
.kiosk .search .input { min-height: var(--touch-kiosk); font-size: var(--fs-lg); border-radius: 14px; padding-left: 52px; }
.kiosk .search svg { left: 18px; width: 24px; height: 24px; }

.alpha { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--s-4) 0; }
.alpha button { min-width: 52px; min-height: 52px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; font-size: var(--fs-lg); cursor: pointer; }
.alpha button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.tiles { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 120px; padding: var(--s-4); border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  color: var(--text); font: inherit; text-align: center; cursor: pointer; box-shadow: var(--shadow-1); transition: transform .08s, border-color .15s;
}
.tile:active { transform: scale(.97); }
.tile:hover { border-color: var(--border-strong); }
.tile .avatar { width: 56px; height: 56px; font-size: var(--fs-lg); }
.tile .name { font-size: var(--fs-lg); font-weight: 650; line-height: 1.2; }
.tile .sub { color: var(--text-muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.tile .price { font-size: var(--fs-xl); font-weight: 750; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.tile .emoji { font-size: 34px; line-height: 1; }
.tile .qty { position: absolute; top: 10px; right: 10px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 17px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: var(--fs-md); }
.tile.selected { border: 2px solid var(--accent); }
.tile.product { min-height: 150px; }

.kiosk-split { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .kiosk-split { grid-template-columns: 1fr 360px; } }
.cart { position: sticky; top: var(--s-6); align-self: start; }
.cart .line { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.cart .line .n { flex: 1; font-weight: 600; }
.qty-ctrl { display: inline-flex; align-items: center; gap: var(--s-2); }
.qty-ctrl button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-size: 24px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.qty-ctrl output { min-width: 28px; text-align: center; font-weight: 750; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.cart .total { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s-4) 0; font-size: var(--fs-lg); font-weight: 650; }
.cart .total .amount { font-size: var(--fs-2xl); font-weight: 800; }

.pin-wrap { max-width: 400px; margin: 0 auto; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: var(--s-4); margin: var(--s-5) 0 var(--s-6); }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.pinpad button { height: 80px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--fs-3xl); font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); font-variant-numeric: tabular-nums; }
.pinpad button:active { background: var(--surface-2); transform: scale(.97); }
.pinpad button.fn { font-size: var(--fs-md); font-weight: 650; color: var(--text-muted); box-shadow: none; background: transparent; }

.confirm { max-width: 560px; margin: var(--s-8) auto; text-align: center; }
.confirm .check-big { width: 96px; height: 96px; margin: 0 auto var(--s-5); border-radius: 50%; display: grid; place-items: center; background: var(--ok-50); color: var(--ok-600); }
.confirm .check-big svg { width: 56px; height: 56px; }
.countdown { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: var(--s-4) 0; }
.countdown > i { display: block; height: 100%; width: 70%; background: var(--warn-600); }

/* Prototyp-Hilfen */
.proto-note { font-size: var(--fs-xs); color: var(--text-muted); }
[hidden] { display: none !important; }

/* 6 ─ Utilities ---------------------------------------------------------- */
.muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 } .mt-2 { margin-top: var(--s-2) } .mt-4 { margin-top: var(--s-4) } .mt-6 { margin-top: var(--s-6) }
.mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: var(--s-2) } .mb-4 { margin-bottom: var(--s-4) } .mb-6 { margin-bottom: var(--s-6) }
.p-0 { padding: 0 } .w-100 { width: 100% }
.flex { display: flex } .items-center { align-items: center } .gap-2 { gap: var(--s-2) } .gap-4 { gap: var(--s-4) } .ml-auto { margin-left: auto }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: revert; } .show-mobile { display: none !important; } }

/* 7 ─ Kiosk-Ergänzungen: Offline-Status, Freiverkauf, Auswahlkarten ------ */
.sync-pill { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); margin-left: auto;
  border-radius: var(--radius-full); background: var(--warn-50); color: var(--warn-600); font-size: var(--fs-sm); font-weight: 650; }
.sync-pill svg { width: 18px; height: 18px; }
.sync-pill + .clock { margin-left: var(--s-2); }
@media (max-width: 700px) { .sync-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

.fv-banner { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5);
  border-radius: var(--radius-lg); background: repeating-linear-gradient(-45deg, var(--brand-600) 0 22px, var(--brand-700) 22px 44px); color: #fff; box-shadow: var(--shadow-2); }
.fv-banner > svg { width: 36px; height: 36px; flex: none; }
.fv-banner strong { display: block; font-size: var(--fs-xl); line-height: 1.25; }
.fv-banner span { display: block; font-size: var(--fs-sm); opacity: .92; }
.fv-banner .btn { margin-left: auto; background: #fff; color: var(--brand-700); border-color: #fff; min-height: 56px; font-size: var(--fs-md); flex: none; }

.fs { border: 0; padding: 0; margin: 0 0 var(--s-6); }
.fs legend { font-weight: 700; font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.choices { display: grid; gap: var(--s-3); grid-template-columns: repeat(3, 1fr); }
.choices-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr; } .choices-5 { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 112px; padding: var(--s-3);
  border: 2px solid var(--border); border-radius: 18px; background: var(--surface); font-size: var(--fs-lg); text-align: center; }
.choice-sm > span { min-height: 72px; }
.choice > span svg { width: 32px; height: 32px; color: var(--text-muted); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.choice input:checked + span svg { color: var(--accent-text); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.countdown > i { width: 100%; background: var(--text-muted); transform-origin: left; }
.countdown > i.run { animation: shrink 10s linear forwards; }
@keyframes shrink { to { transform: scaleX(0); } }
.steps li a { color: inherit; text-decoration: none; }
@media (max-width: 1279px) { [data-stack-mobile] { grid-template-columns: 1fr !important; } }
.tile.product .name { padding: 0 var(--s-6); }
@media (min-width: 1024px) {
  .app.has-nav { background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
}
.last-booking { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-5); margin-bottom: var(--s-5);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-size: var(--fs-md); }
.last-booking > svg { width: 24px; height: 24px; color: var(--text-muted); flex: none; }
.last-booking .btn { margin-left: auto; min-height: 56px; font-size: var(--fs-md); flex: none; }
@media (max-width: 600px) {
  .kiosk-main { padding: var(--s-4); }
  .kiosk-bar { padding: var(--s-2) var(--s-4); }
  .tile.product .name { padding: 0 var(--s-5); }
  .fv-banner, .last-booking { flex-wrap: wrap; }
  .fv-banner > div, .last-booking > div { flex: 1; min-width: 0; }
  .fv-banner strong { font-size: var(--fs-lg); }
  .fv-banner .btn, .last-booking .btn { width: 100%; margin-left: 0; }
  [data-person-initials] { display: none !important; }
}

/* 8 ─ Avatar (Foto / Initialen) & Profil --------------------------------- */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; color: #fff;
  font-weight: 750; letter-spacing: .02em; line-height: 1; background: var(--n-700); }
.av-photo { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.av-photo svg { width: 100%; height: 100%; }
#people { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#people .tile { min-height: 168px; gap: var(--s-3); padding: var(--s-5) var(--s-3) var(--s-4); }
.tile .nick { font-size: var(--fs-md); font-weight: 600; color: var(--text-muted); }
.hide-names #people .nick { display: none; }
.hide-names #people .tile { min-height: 136px; }
@media (max-width: 600px) { #people { grid-template-columns: repeat(2, 1fr); } }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch span { display: block; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--text); }
.swatch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.tablet-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: var(--s-3); padding: var(--s-4);
  border-radius: var(--radius-lg); background: var(--bg); border: 1px dashed var(--border-strong); }
.tablet-preview .tile { min-height: 168px; cursor: default; }
.consent { align-items: flex-start; min-height: 0; padding: var(--s-3); border-radius: var(--radius); background: var(--surface-2); }
.consent input { margin-top: 2px; flex: none; }
label.btn { cursor: pointer; }

/* 9 ─ Datei-Upload (Partial) ---------------------------------------------
   Natives <input type=file> nur visuell versteckt (.sr-only), Bedienung über Label-Buttons. */
.upload .req { color: var(--accent-text); }
.upload-drop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2) var(--s-3);
  padding: var(--s-4); border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.upload-drop .upload-ico { width: 28px; height: 28px; color: var(--accent-text); }
.upload-droptext { color: var(--text-muted); font-size: var(--fs-sm); }
.upload-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.upload-cam { display: none; }
@media (pointer: coarse) {            /* Touch: kein Drag & Drop, dafür Kamera */
  .upload-droptext, .upload-drop .upload-ico { display: none; }
  .upload-cam { display: inline-flex; }
  .upload-drop { border-style: solid; border-width: 1px; padding: var(--s-3); }
  .upload-btns { width: 100%; } .upload-btns .btn { flex: 1; }
}
.upload input[type=file]:focus-visible ~ .upload-drop label.btn:first-child { outline: 3px solid var(--focus); outline-offset: 2px; }
.upload-status { display: flex; align-items: center; gap: var(--s-2); min-height: 40px; font-size: var(--fs-sm); color: var(--text-muted); }
.upload-status > svg { width: 18px; height: 18px; flex: none; }
.upload-status [data-upload-name] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload.is-selected .upload-status { color: var(--text); }
.upload.is-selected .upload-drop { border-style: solid; border-color: var(--ok-600); }
.upload-remove { margin-left: auto; flex: none; }
.upload-remove svg { width: 16px; height: 16px; }
.upload-error, .field-error { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; color: var(--err-600); font-size: var(--fs-sm); font-weight: 600; }
.upload-error svg, .field-error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.upload.is-invalid .upload-drop, .input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--err-600); }

/* ==========================================================================
   10 ─ App (Phase 2): CSP-konform, keine style-Attribute → Klassen
   ========================================================================== */
svg.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 16px !important; height: 16px !important; }
.ic-lg { width: 28px !important; height: 28px !important; }
.ic-xl { width: 40px !important; height: 40px !important; }

/* Avatar-Größen & Palette (FRONTEND_CONTRACT §7, weiße Schrift ≥ 4,5:1) */
.av-sm { width: 32px; height: 32px; font-size: 12px; }
.av-md { width: 40px; height: 40px; font-size: 15px; }
.av-lg { width: 64px; height: 64px; font-size: 24px; }
.av-xl { width: 96px; height: 96px; font-size: 36px; }
.av-xxl { width: 128px; height: 128px; font-size: 46px; }
.av.av-3 { letter-spacing: 0; }
.av-sm.av-3 { font-size: 10px; } .av-md.av-3 { font-size: 12px; } .av-lg.av-3 { font-size: 19px; }
.av-xl.av-3 { font-size: 30px; } .av-xxl.av-3 { font-size: 38px; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-c0 { background: #B3261E; } .av-c1 { background: #8E3B00; } .av-c2 { background: #7A5900; } .av-c3 { background: #1F6F5C; }
.av-c4 { background: #1D5C96; } .av-c5 { background: #5B3F9E; } .av-c6 { background: #8A2E68; } .av-c7 { background: #4A5560; }
.swatch .av-c0, .swatch .av-c1, .swatch .av-c2, .swatch .av-c3, .swatch .av-c4, .swatch .av-c5, .swatch .av-c6, .swatch .av-c7 { display: block; }

/* Layout-Hilfen statt Inline-Styles */
.grid-main-aside { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1280px) { .grid-main-aside { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }
.span-all { grid-column: 1 / -1; }
.w-auto { width: auto; }
.w-120 { width: 120px; flex: none; }
.fs-sm { font-size: var(--fs-sm); } .fs-lg { font-size: var(--fs-lg); } .fs-xl { font-size: var(--fs-xl); } .fs-2xl { font-size: var(--fs-2xl); }
.fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap { flex-wrap: wrap; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; min-width: 200px; }
.items-start { align-items: flex-start; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mw-sm { max-width: 420px; } .mw-md { max-width: 560px; } .mw-lg { max-width: 760px; }
.text-strong { color: var(--text); }
.warn-text { color: var(--warn-600); }
.stat-accent { border-left: 4px solid var(--accent); }
.page-head .back { margin: 0 0 var(--s-1); font-size: var(--fs-sm); }
.inline-form { display: inline; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; min-height: 0; }
.nav-link.btn-link-nav { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.table tr.is-reversed td { color: var(--text-muted); }
.table tr.is-reversed td .desc { text-decoration: line-through; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
.segmented.w-100 > * { flex: 1; justify-content: center; }
.input-group .addon.addon-left { border-left: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.input-group .addon-left + .input { border-radius: 0 var(--radius) var(--radius) 0; }
.qr-box { width: 160px; height: 160px; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); flex: none; }
.qr-box svg { width: 100%; height: 100%; }
.secret { font-family: var(--font-mono); font-size: var(--fs-lg); letter-spacing: .08em; word-break: break-all; }
.codes { columns: 2; font-family: var(--font-mono); padding-left: 1.2rem; }
.pagination { display: flex; gap: var(--s-2); align-items: center; justify-content: center; padding: var(--s-4); }
.empty { padding: var(--s-8) var(--s-4); text-align: center; color: var(--text-muted); }
.empty svg.ic { width: 40px; height: 40px; margin: 0 auto var(--s-2); display: block; }
.flash-stack { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.alert-error { background: var(--err-50); border-color: transparent; }
.alert-error svg { color: var(--err-600); }
details.confirm-box > summary { list-style: none; cursor: pointer; }
details.confirm-box > summary::-webkit-details-marker { display: none; }
details.confirm-box[open] > summary { margin-bottom: var(--s-2); }
.confirm-box .confirm-panel { padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 260px; }
.error-page { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: var(--s-6); }
.error-page .code { font-size: 4rem; font-weight: 800; color: var(--accent-text); line-height: 1; }
.month-picker { display: flex; gap: var(--s-2); align-items: center; }
.month-picker .btn-icon { flex: none; }
.chart-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 120px; }
.chart-bars span { display: block; background: var(--n-300); border-radius: 4px 4px 0 0; min-height: 2px; }

/* ── Kiosk (Phase 2) ── */
.kiosk-body { overscroll-behavior: none; touch-action: manipulation; }
.kiosk [data-screen][hidden] { display: none !important; }
.kiosk-status { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); margin-left: auto;
  border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 650; background: var(--ok-50); color: var(--ok-600); }
.kiosk-status.is-offline, .kiosk-status.is-pending { background: var(--warn-50); color: var(--warn-600); }
.kiosk-status.is-blocked { background: var(--err-50); color: var(--err-600); }
.kiosk-status + .clock { margin-left: var(--s-2); }
.offline-banner { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-5); margin-bottom: var(--s-4);
  border-radius: var(--radius-lg); background: var(--err-50); color: var(--err-600); font-weight: 650; }
.kiosk-toast { position: fixed; left: 50%; bottom: var(--s-6); transform: translateX(-50%); z-index: 50; max-width: min(92vw, 640px);
  padding: var(--s-4) var(--s-5); border-radius: var(--radius-lg); background: var(--n-900); color: #fff; font-weight: 600; box-shadow: var(--shadow-2); }
.kiosk-toast.is-error { background: var(--err-600); }
.person-head { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.person-head h1 { margin: 0; font-size: var(--fs-2xl); }
.person-head .saldo { color: var(--text-muted); font-size: var(--fs-lg); }
.person-head .saldo strong { color: var(--text); }
.cat-title { margin: var(--s-4) 0 var(--s-2); font-size: var(--fs-md); color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.cat-title:first-child { margin-top: 0; }
.cart-empty { color: var(--text-muted); padding: var(--s-4) 0; }
.cart .saldo-after { display: flex; justify-content: space-between; color: var(--text-muted); font-size: var(--fs-sm); padding-bottom: var(--s-3); }
.cart .actions { display: grid; gap: var(--s-2); }
.btn-xl { min-height: 72px !important; font-size: var(--fs-xl) !important; }
.kiosk .tile[disabled] { opacity: .5; }
.users-list { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.pin-dots.var span { width: 16px; height: 16px; }
.fs-text { width: 100%; }
.countdown > i.run-5 { animation: shrink 5s linear forwards; }
.countdown > i.run-10 { animation: shrink 10s linear forwards; }
.fv-banner .fv-actions { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.fv-banner .fv-actions .btn { margin-left: 0; }
.fv-banner.ending-soon { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.15); } }
.setup-card { max-width: 480px; margin: var(--s-10) auto; }
.code-input { font-family: var(--font-mono); font-size: var(--fs-2xl); letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.fullscreen-hint { font-size: var(--fs-sm); color: var(--text-muted); }
/* Mobil: Sidebar als Vollbild-Menü über #menu (ohne JS) */
.menu-close { display: none; }
@media (max-width: 1023.98px) {
  .sidebar:target { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 60; overflow-y: auto;
    padding: var(--s-4); background: var(--surface); }
  .sidebar:target .menu-close { display: inline-flex; position: absolute; top: var(--s-3); right: var(--s-3); }
  .sidebar:target .brand { padding-bottom: var(--s-4); }
}
@media (min-width: 1024px) { .logout-mobile { display: none; } }
.h-0 { height: 2%; } .h-1 { height: 10%; } .h-2 { height: 20%; } .h-3 { height: 30%; } .h-4 { height: 40%; } .h-5 { height: 50%; }
.h-6 { height: 60%; } .h-7 { height: 70%; } .h-8 { height: 80%; } .h-9 { height: 90%; } .h-10 { height: 100%; }
.btn.on-dark { color: #fff; } .btn.on-dark:hover { background: rgba(255,255,255,.12); }
.seg-radio { flex: 1; position: relative; }
.seg-radio input { position: absolute; opacity: 0; inset: 0; }
.seg-radio span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 7px; color: var(--text-muted); font-weight: 600; cursor: pointer; }
.seg-radio input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg-radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.table .sum-row th, .table .sum-row td { border-top: 2px solid var(--border-strong); font-weight: 700; }
.table .sub-head { background: var(--surface-2); text-transform: none; font-size: var(--fs-sm); letter-spacing: 0; }
.check-big.is-error { background: var(--err-50); color: var(--err-600); }
.icon-xl { width: 72px; height: 72px; }
.text-left { text-align: left; }
.justify-center { justify-content: center; }
.pinpad button.fn-ok { color: #fff; background: var(--accent); border-color: var(--accent); font-size: var(--fs-xl); }
.pinpad button.fn-ok[disabled] { opacity: .4; }
.users-list .tile { min-height: 140px; }
.kiosk .tile.is-active { border: 2px solid var(--accent); }
.tile .av { flex: none; }
.cart .line .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   11 ─ Phase 2: Verwaltung, Installer, Kiosk-Zustände
   ========================================================================== */
.sep { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }
.danger-zone { border-color: var(--err-600); }
.danger-zone h2 { color: var(--err-600); }
.secret-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }
.ok-text { color: var(--ok-600); font-weight: 600; }
.register-box > summary { list-style: none; display: inline-flex; width: max-content; }
.register-box > summary::-webkit-details-marker { display: none; }
.kiosk-status.is-sync { background: var(--info-50); color: var(--info-600); }
.person-head.is-freesale .av { font-size: 28px; }
.btn-danger { background: var(--err-600); border-color: var(--err-600); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
:root[data-theme="dark"] .btn-danger { color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger { color: #111; } }
.kiosk-status.is-blocked, .kiosk-status.is-sync { transition: background .2s; }
a.card, a.alert { text-decoration: none; color: inherit; }
a.card.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
a.alert:hover strong { text-decoration: underline; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.kiosk h1[tabindex="-1"]:focus { outline: none; }
.quick-actions { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick-actions .btn { min-height: 56px; justify-content: flex-start; }
a.fv-banner { text-decoration: none; color: inherit; }
.list-item .t1, .list-item .t2 { display: block; }
.fs > legend.label-text { font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-2); }
@media (max-width: 640px) {
  .fv-banner { flex-wrap: wrap; }
  .fv-banner .fv-actions { flex: 1 1 100%; width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fv-banner .fv-actions .btn { width: 100%; min-height: 48px; padding: 0 var(--s-2); font-size: var(--fs-sm); white-space: normal; line-height: 1.2; }
  .fv-banner .fv-actions .btn svg { display: none; }
}
.audit-details { display: block; max-width: 420px; font-size: var(--fs-xs); white-space: pre-wrap; word-break: break-word; color: var(--text-muted); }
/* Datums-Partial / Kalender */
.date-field { position: relative; }
.date-field .addon-btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; min-height: 44px; }
.datepicker { position: absolute; z-index: 40; top: 100%; left: 0; margin-top: var(--s-1); width: 300px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: var(--s-3); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.dp-head .btn { font-size: 22px; line-height: 1; }
.dp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dp-grid th { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; padding: 4px 0; text-align: center; }
.dp-grid td { padding: 1px; text-align: center; }
.dp-grid button { width: 100%; aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.dp-grid button:hover { background: var(--surface-2); }
.dp-grid button.dp-out { color: var(--text-muted); opacity: .55; }
.dp-grid button.dp-today { box-shadow: inset 0 0 0 1px var(--accent); }
.dp-grid button.dp-sel { background: var(--accent); color: #fff; }
.dp-foot { display: flex; justify-content: space-between; margin-top: var(--s-2); }
.month-picker .is-disabled { opacity: .35; pointer-events: none; }
/* Beleg-Erkennung */
.recog { margin: calc(-1 * var(--s-2)) 0 var(--s-4); padding: var(--s-3); border-radius: var(--radius); background: var(--info-50); }
.recog-row { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.recog-text { flex: 1; font-size: var(--fs-sm); font-weight: 600; color: var(--info-600); }
.recog-progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.recog-progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 4px; }
.recog-progress::-webkit-progress-value { background: var(--info-600); border-radius: 4px; }
.recog-progress::-moz-progress-bar { background: var(--info-600); }
.recog-hint { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); padding: var(--s-2) var(--s-3); border-radius: var(--radius);
  background: var(--warn-50); color: var(--text); margin: 0 0 var(--s-4); }
.recog-hint svg { color: var(--warn-600); margin-top: 2px; }
.recog-hint.is-low { background: var(--err-50); }
.input.is-recognized { border-color: var(--warn-600); box-shadow: 0 0 0 3px var(--warn-50); }
.input-group .input { flex: 1 1 auto; min-width: 0; width: 100%; }
.input-group > .btn, .input-group > .addon { flex: none; }
.grid-main-aside > *, .stack > * { min-width: 0; }
.problem-banner { background: var(--err-50); color: var(--err-600); }
.limit-title { font-size: clamp(28px, 5vw, 44px); line-height: 1.2; }
.split-row { display: flex; gap: var(--s-2); margin-bottom: var(--s-2); } .split-row .select { flex: 1; min-width: 0; }
tr:target { background: var(--warn-50); }
/* Export-Menüs */
.export-menu { position: relative; display: inline-block; }
.export-menu > summary { list-style: none; } .export-menu > summary::-webkit-details-marker { display: none; }
.export-panel { position: absolute; right: 0; z-index: 35; margin-top: var(--s-1); padding: var(--s-3); min-width: 240px; display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-2); align-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-2); }
form.export-panel { grid-template-columns: auto auto; }
.period-range { display: contents; } .period-range label { color: var(--text-muted); }
.select-sm { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.order-last { order: 2; }
.page-head .actions { flex-wrap: wrap; }
.old-date-confirm { margin-top: calc(-1 * var(--s-2)); margin-bottom: var(--s-3); }

/* ===================================================================== Termine / Abwesenheiten (v0.10) */
.cat-dot { width: 10px; height: 10px; flex: none; display: inline-block; vertical-align: middle; }
.cat-dot-lg { width: 14px; height: 14px; }
.cat-dot.is-cancelled { opacity: .35; }
.fw-normal { font-weight: 400; }
.w-80 { width: 80px; } .w-100 { width: 100%; }
.mt-0 { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.scroll-x { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x > * { flex: none; white-space: nowrap; }

.termine-bar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-4); }
.filter-box { position: relative; }
.filter-box > summary { list-style: none; } .filter-box > summary::-webkit-details-marker { display: none; }
.filter-form { margin-top: var(--s-2); display: grid; gap: var(--s-3); min-width: min(100%, 340px); }
@media (min-width: 768px) { .filter-box[open] .filter-form { position: absolute; z-index: 30; width: 360px; } }
.filter-checks { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.filter-inline { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.filter-inline .field { margin: 0; min-width: 0; }
.filter-inline .date-field { width: 190px; }

/* Agenda */
.termin-week-head { margin: 0; padding: var(--s-3) var(--s-5); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.termine-list { list-style: none; margin: 0; padding: 0; }
.termin { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.termin:last-child { border-bottom: 0; }
.termin-main { flex: 1 1 260px; min-width: 0; display: flex; gap: var(--s-3); color: var(--text); text-decoration: none; min-height: 48px; }
.termin-main:hover .t, .termin-main:focus-visible .t { text-decoration: underline; }
.termin-time { flex: none; width: 64px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.termin-time strong { font-size: var(--fs-sm); } .termin-time span { color: var(--text-muted); font-size: var(--fs-sm); }
.termin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.termin-title { display: flex; align-items: center; gap: var(--s-2); font-weight: 650; min-width: 0; }
.termin-title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.termin-meta { color: var(--text-muted); font-size: var(--fs-xs); }
.termin-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: 2px; }
.termin-rsvp { display: flex; gap: var(--s-2); margin-left: auto; }
.termin-rsvp .btn { min-width: 64px; }
.termin.is-cancelled .t, .termin-h1.is-cancelled span { text-decoration: line-through; color: var(--text-muted); }
.termine-list.compact .termin { padding: var(--s-2) 0; }
.termine-list.compact .termin-time { width: 44px; } .termine-list.compact .termin-time strong { display: none; }
@media (max-width: 479px) { .termin-rsvp { width: 100%; } .termin-rsvp .btn { flex: 1; min-height: var(--touch); } }

/* Monat */
.cal-nav { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.cal-title { margin: 0; font-size: var(--fs-lg); min-width: 0; flex: 0 1 auto; }
.cal-month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: var(--s-2) 0; text-align: center; font-size: var(--fs-xs); font-weight: 650; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.cal-head abbr { text-decoration: none; }
.cal-cell { min-height: 56px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-row .cal-cell:nth-child(7n) { border-right: 0; }
.cal-month > .cal-row:last-child .cal-cell { border-bottom: 0; }
.cal-cell.is-other { background: var(--surface-2); color: var(--text-muted); }
.cal-cell:hover { background: var(--accent-soft); }
.cal-cell.is-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-num { font-size: var(--fs-sm); font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.is-today .cal-num { background: var(--accent); color: var(--on-accent); }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; padding-left: 4px; }
.cal-items { display: none; }
.cal-item { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-item.is-cancelled { text-decoration: line-through; color: var(--text-muted); }
.cal-item.is-open { font-weight: 650; }
.cal-more { font-size: var(--fs-xs); color: var(--text-muted); }
@media (min-width: 768px) {
  .cal-cell { min-height: 108px; padding: 6px; }
  .cal-dots { display: none; }
  .cal-items { display: flex; flex-direction: column; gap: 2px; }
}

/* Woche */
.cal-week { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.cal-week-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); min-width: 0; }
.cal-week-day.is-today { border-color: var(--accent); }
.cal-week-day h3 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); font-size: var(--fs-sm); }
.cal-week-day h3 span:first-child { font-weight: 750; }
.cal-week-day h3 .btn { margin-left: auto; }
.btn-xs { min-height: 32px; min-width: 32px; padding: 0 6px; }
@media (min-width: 1024px) { .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cal-week .termin-rsvp { width: 100%; } .cal-week .termin-rsvp .btn { flex: 1; min-width: 0; } }

/* Detail */
.termin-h1 { display: flex; align-items: center; gap: var(--s-3); }
.rsvp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.rsvp-buttons .btn { min-height: 64px; }
@media (max-width: 479px) { .rsvp-buttons .btn-xl { font-size: var(--fs-lg) !important; } }
.rsvp-counts { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.rsvp-counts div { display: flex; flex-direction: column; } .rsvp-counts strong { font-size: var(--fs-2xl); line-height: 1.1; font-variant-numeric: tabular-nums; } .rsvp-counts span { color: var(--text-muted); font-size: var(--fs-xs); }
.kv-lg { font-size: var(--fs-md); row-gap: var(--s-3); }
.termin-desc { white-space: normal; overflow-wrap: anywhere; }
.collapsible > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary h2 { margin: 0; }
.collapsible > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.collapsible[open] > summary { margin-bottom: var(--s-4); } .collapsible[open] > summary::after { transform: rotate(-135deg); }
.choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .choices-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.check-list { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.pick-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 var(--s-3); display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pick-list { grid-template-columns: 1fr 1fr; } }
.input-sm { min-height: 40px; }
.form-actions { display: grid; gap: var(--s-2); }

/* Anwesenheit */
.att-summary { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); color: var(--text-muted); }
.att-summary strong { color: var(--text); font-size: var(--fs-lg); }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-row { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.att-row.is-pending { background: var(--warn-50); }
.att-name { display: flex; flex-direction: column; min-width: 0; }
.att-meta { color: var(--text-muted); font-size: var(--fs-xs); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.att-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.att-choice .segmented { display: flex; width: 100%; }
.att-choice .seg-radio span { min-height: var(--touch); gap: 4px; }
.att-present input:checked + span { background: var(--ok-50); color: var(--ok-600); }
.att-excused input:checked + span { background: var(--info-50); color: var(--info-600); }
.att-unexcused input:checked + span { background: var(--err-50); color: var(--err-600); }
.att-extra { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.att-foot { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; position: sticky; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); background: var(--surface); }
@media (min-width: 1024px) { .att-foot { bottom: 0; } }
@media (min-width: 900px) { .att-row { grid-template-columns: minmax(180px, 1fr) minmax(360px, 1.4fr) auto; align-items: center; } }

/* Abwesenheiten / Verfügbarkeit */
.kept-list { margin: var(--s-2) 0 0; padding-left: var(--s-4); } .kept-list li { margin-bottom: var(--s-2); }
.avail-bar { width: 100%; height: 8px; margin-top: var(--s-2); -webkit-appearance: none; appearance: none; border: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.avail-bar::-webkit-progress-bar { background: var(--surface-2); } .avail-bar::-webkit-progress-value { background: var(--ok-600); } .avail-bar::-moz-progress-bar { background: var(--ok-600); }
.avail-quals { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .avail-quals { grid-template-columns: 1fr 1fr; } }
.avail-quals li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--radius); }
.avail-quals li .avail-bar, .avail-quals li .badge { grid-column: 1 / -1; justify-self: start; }
.avail-quals li.is-warn { border-color: var(--err-600); }
.avail-quals li.is-warn .avail-bar::-webkit-progress-value { background: var(--err-600); } .avail-quals li.is-warn .avail-bar::-moz-progress-bar { background: var(--err-600); }
.timeline { font-size: var(--fs-xs); }
.timeline th, .timeline td { padding: 4px; text-align: center; }
.timeline .tl-name { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.timeline .tl-day abbr { text-decoration: none; }
.timeline .is-weekend { background: var(--surface-2); }
.timeline .tl-cell.is-absent { background: var(--err-50); color: var(--err-600); font-weight: 700; }

/* Stammdaten */
.md-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; width: 100%; }
.md-row .input:first-of-type { flex: 1 1 180px; }
.block-item { display: block; }
.cat-sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); cursor: pointer; min-height: 40px; }
.cat-form { margin-top: var(--s-3); }
.input-color { padding: 4px; height: var(--touch); width: 72px; }
.qual-list { list-style: none; margin: 0; padding: 0; } .qual-list li { display: grid; grid-template-columns: 1fr; gap: 0 var(--s-3); border-bottom: 1px solid var(--border); padding: var(--s-2) 0; }
@media (min-width: 640px) { .qual-list li { grid-template-columns: 1fr 200px; align-items: end; } }
.qual-list .field { margin: 0; }
[data-member-form] [data-subgroups][disabled] { opacity: .5; }

/* öffentliche Link-Seiten */
.link-page { display: grid; gap: var(--s-3); }
.link-page .icon-circle { width: 56px; height: 56px; background: var(--accent-soft); color: var(--accent-text); }
.link-event { display: grid; gap: var(--s-1); }

/* Kiosk: Modus Anwesenheit */
.att-banner { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); border: 0; border-radius: var(--radius-lg);
  background: var(--accent); color: var(--on-accent); font: inherit; font-size: var(--fs-lg); text-align: left; cursor: pointer; min-height: 72px; }
.att-banner strong { display: block; font-size: var(--fs-xl); }
.att-banner .ic { width: 32px; height: 32px; flex: none; }
.att-banner + .att-banner { margin-top: calc(-1 * var(--s-2)); }
.tile.is-checked { outline: 3px solid var(--ok-600); outline-offset: -3px; }
.tile .tile-check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-600); color: #fff; display: grid; place-items: center; }
.att-done-title { font-size: var(--fs-3xl); margin: var(--s-4) 0 var(--s-2); }
[data-att-people] .tile { position: relative; min-height: 168px; gap: var(--s-3); padding: var(--s-5) var(--s-3) var(--s-4); }
[data-att-people] .tile:disabled { opacity: 1; cursor: default; }
.hide-names [data-att-people] .tile { min-height: 136px; }
.table tbody th { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
.segmented.scroll-x { display: flex; width: max-content; max-width: 100%; }
.card-head { flex-wrap: wrap; } .card-head .actions { min-width: 0; max-width: 100%; }
.att-choice .seg-radio { min-width: 0; }
.att-choice .seg-radio span .hide-mobile { display: none; } .att-choice .seg-radio span .show-mobile { display: inline; }
@media (min-width: 768px) { .att-choice .seg-radio span .hide-mobile { display: inline; } .att-choice .seg-radio span .show-mobile { display: none; } }
.segmented a, .segmented button { gap: 6px; }
.att-choice .seg-radio span span { min-height: 0; border-radius: 0; box-shadow: none; background: none; color: inherit; }
[data-att-people] { margin-top: var(--s-4); }
.termin-rsvp .btn[value="no"][aria-pressed="true"], .rsvp-buttons .btn[value="no"].btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }

/* 2FA-Ersteinrichtung (Kundenfeedback iPhone/Dark): Kasten mit Innenabstand, QR zentriert mit weißem Rand, Schlüssel in 4er-Gruppen */
.totp-setup { margin: 0 0 var(--s-5); padding: var(--s-5) var(--s-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.totp-setup h2 { margin: 0 0 var(--s-2); }
.totp-setup > p { margin: 0 0 var(--s-4); }
.totp-qr { width: 100%; max-width: 220px; margin: 0 auto var(--s-4); padding: 12px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); box-sizing: border-box; }
.totp-qr svg, .totp-qr img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.totp-manual { display: grid; justify-items: center; gap: var(--s-2); }
.totp-secret { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: var(--s-2) var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: var(--fs-lg); letter-spacing: .06em; user-select: all; max-width: 100%; }
.totp-secret span { white-space: nowrap; }
.backup-entry > summary { list-style: none; cursor: pointer; display: inline-flex; min-height: var(--touch); align-items: center; }
.backup-entry > summary::-webkit-details-marker { display: none; }

/* Kassabuch: „Kassa buchen“ und „Person gutschreiben“ ab 900 px nebeneinander (gleiche Höhe, Buttons bündig), mobil Tabs */
.kb-forms-grid { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.kb-form { display: flex; flex-direction: column; min-width: 0; }
.kb-form > .kb-submit { margin-top: auto; }
.kb-form > .field:last-of-type { margin-bottom: var(--s-4); }
.kb-tablist { margin-bottom: var(--s-3); }
.kb-tablist [role="tab"] { flex: 1; justify-content: center; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text-muted); border-radius: 7px; cursor: pointer; }
.kb-tablist [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
@media (max-width: 899px) { .kb-tabs-js [data-kb-panel]:not(.is-active) { display: none; } }
@media (min-width: 900px) { .kb-forms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kb-tablist { display: none !important; } }
.kb-rows { max-width: 100%; overflow: hidden; } .kb-forms { min-width: 0; }
.app > .app-col { min-width: 0; }
@media (max-width: 639px) {
  .kb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .kb-stats .stat { padding: var(--s-3); } .kb-stats .stat .value { font-size: var(--fs-xl); } .kb-stats .stat .hint { display: none; }
}
.kb-tablist [role="tab"] { white-space: nowrap; padding: 0 var(--s-2); }

/* Import: Zuordnung prominent (Kunden-Feedback) */
.assign-callout { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--radius-lg);
  background: var(--warn-50); border: 1px solid var(--warn-600); }
.assign-callout .icon-circle { background: var(--surface); color: var(--warn-600); }
.assign-callout > div { flex: 1 1 240px; }
.assign-callout .btn { margin-left: auto; }
@media (max-width: 639px) { .assign-callout .btn { width: 100%; } }
.inline-assign { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.inline-assign .select { min-width: 160px; flex: 1 1 160px; }
.inline-assign .check { min-height: 32px; }
.card-foot .cluster { flex-wrap: wrap; max-width: 100%; min-width: 0; }
.card-foot .btn { white-space: normal; text-align: center; max-width: 100%; }

/* Step-up: welche Aktion danach passiert */
.stepup-icon { width: 56px; height: 56px; background: var(--accent-soft); color: var(--accent-text); }
.stepup-icon.is-ok { background: var(--ok-50); color: var(--ok-600); }
.stepup-action { display: grid; gap: 2px; text-align: center; margin: var(--s-4) 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.stepup-action strong { font-size: var(--fs-lg); }
.device-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.auth .btn { white-space: normal; text-align: center; }
.person-search { margin-bottom: var(--s-2); width: 100%; }
