/* ══════════════════════════════════════════════════════════════════════════
   "Engineered Premium" — DARK. Überschreibt app.css. Ink-Flächen, hoher Kontrast,
   White-Label-Akzent (var --blue) nur als Glow/Linie. Archivo + Hanken Grotesk.
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  --font-display: 'Archivo', 'Hanken Grotesk', sans-serif;
  --font-ui: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;

  --accent: var(--blue, #3b82f6);
  --accent-press: var(--blue-dark, #2f6ae0);
  --accent-tint: color-mix(in srgb, var(--accent) 22%, #161922);
  --accent-quiet: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 80%, #eaf2ff);

  --bg: #0a0b0f;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --surface-3: #232733;
  --text: #eceef3;
  --text-2: #a9b0bd;
  --muted: #767e8d;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);

  --r-sm: 12px; --r: 18px; --r-lg: 24px; --r-pill: 999px;
  --sh-1: 0 1px 3px rgba(0,0,0,.5);
  --sh-2: 0 18px 44px -18px rgba(0,0,0,.7);
  --sh-3: 0 36px 90px -24px rgba(0,0,0,.85);
  --hl: inset 0 1px 0 rgba(255,255,255,.05);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ── Base ── */
html { height: 100%; }
body {
  font-family: var(--font-ui); color: var(--text); min-height: 100vh; min-height: 100dvh;
  letter-spacing: -.01em; -webkit-font-smoothing: antialiased;
  /* Gestaffelte Farbstopps statt eines direkten Sprungs auf transparent: Der harte
     Übergang erzeugte auf dem dunklen Grund sichtbares Banding — eine Kante quer über
     den Screen, etwa auf Höhe der unteren Kacheln (gemeldet 2026-09-01).
     `fixed` hängt die Verläufe an den Viewport statt an die Dokumenthöhe; sonst wandert
     ihr Ende bei langen Seiten mitten in den Inhalt. */
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 55% at 50% -8%,
      color-mix(in srgb, var(--accent) 16%, transparent) 0%,
      color-mix(in srgb, var(--accent) 10%, transparent) 22%,
      color-mix(in srgb, var(--accent) 5%, transparent) 42%,
      color-mix(in srgb, var(--accent) 2%, transparent) 62%,
      transparent 85%),
    radial-gradient(90% 50% at 100% 0%,
      color-mix(in srgb, var(--accent) 8%, transparent) 0%,
      color-mix(in srgb, var(--accent) 4%, transparent) 30%,
      color-mix(in srgb, var(--accent) 1.5%, transparent) 55%,
      transparent 80%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -.02em; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.req { color: #ff7a7a; }
.link { color: var(--accent-soft); cursor: pointer; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; line-height: 1.6; }

/* ── Shell ── */
.app-header {
  position: sticky; top: 0; z-index: 40; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(16px); backdrop-filter: saturate(1.3) blur(16px);
  border-bottom: 1px solid var(--line);
}
.app-header img { max-height: 28px; border-radius: 6px; }
#app-logo.is-placeholder { display: none; }
#app-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; color: var(--text); }
.header-spacer { flex: 1; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 1.15rem; display: grid; place-items: center; transition: .15s var(--ease); }
.icon-btn:active { transform: scale(.94); background: var(--surface-3); }
body[data-screen="auth"] .app-header { display: none; }
body[data-screen="onboarding"] #btn-home, body[data-screen="home"] #btn-home { display: none; }

#app-root { flex: 1 1 auto; }
.screen { width: 100%; max-width: 780px; margin: 0 auto; padding: 22px 18px calc(96px + env(safe-area-inset-bottom)); }
.screen h2 { font-size: 1.55rem; font-weight: 800; line-height: 1.12; margin-bottom: 12px; }
.screen h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 10px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.screen > * { animation: rise .5s var(--ease) both; }
.screen > *:nth-child(2){animation-delay:.05s} .screen > *:nth-child(3){animation-delay:.1s}
.screen > *:nth-child(4){animation-delay:.15s} .screen > *:nth-child(5){animation-delay:.2s}
.screen > *:nth-child(n+6){animation-delay:.24s}
@media (prefers-reduced-motion: reduce) { .screen > * { animation: none; } }

.ic { width: 22px; height: 22px; display: inline-block; vertical-align: middle; flex: none; }

/* ── Buttons ── */
.btn { min-height: 50px; padding: 13px 20px; border-radius: 14px; border: 1px solid transparent; font-family: var(--font-ui); font-size: .98rem; font-weight: 600; letter-spacing: -.01em; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; transition: transform .12s var(--ease), filter .2s, background .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px) scale(.992); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff 12%), var(--accent)); color: #fff; box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 75%, transparent), var(--hl); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:active { background: var(--surface-3); }
.btn-dark { background: #fff; color: #0a0b0f; }              /* auf Dark = heller Kontrast-Button */
.btn-light { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.btn-danger { background: color-mix(in srgb, #ff5a5a 14%, var(--surface)); color: #ff8a8a; border-color: color-mix(in srgb, #ff5a5a 30%, transparent); }
.btn-link { background: none; color: var(--accent-soft); border: none; min-height: 44px; }
.btn-block { width: 100%; }
.btn-block + .btn-block { margin-top: 10px; }

/* ── Inputs ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea,
.screen input[type=text], .screen input[type=number], .screen input[type=date],
.screen input[type=time], .screen input[type=tel], .screen input[type=email], .screen input:not([type]), .screen select,
.kilian-input input {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 12px; transition: .16s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.screen input::placeholder, .kilian-input input::placeholder { color: var(--muted); }
.screen input:focus, .screen select:focus, .form-group input:focus, .kilian-input input:focus {
  outline: none; border-color: var(--accent); background: var(--surface-3);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.screen input.invalid, .form-group input.invalid { border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255,107,107,.18); }
.screen input[type=date], .screen input[type=time] { color-scheme: dark; }
input[type=color] { padding: 4px; min-height: 48px; cursor: pointer; background: var(--surface-2); }

/* ── Cards / sections ── */
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--sh-1), var(--hl); }
.form-section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.info-banner { background: var(--accent-quiet); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: .9rem; margin-bottom: 16px; }
.badge-erkannt { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: color-mix(in srgb, #2ecc71 22%, var(--surface)); color: #5fe39a; padding: 2px 7px; border-radius: 6px; }
.radio-group { display: flex; flex-direction: column; gap: 2px; }
.radio-group > label { display: flex; align-items: center; gap: 10px; padding: 11px 0; font-size: .96rem; cursor: pointer; }
.radio-group input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
.kaution-detail { display: none; padding: 4px 0 8px 30px; }
.kaution-detail.visible { display: block; }

.back-link { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--muted); font-size: .92rem; font-weight: 600; cursor: pointer; padding: 4px 0; margin-bottom: 10px; }
.back-link:active { color: var(--text); }
.nav-footer { display: flex; gap: 12px; margin-top: 24px; background: transparent; border: 0; padding: 0; }
.nav-footer-inline { display: flex; gap: 12px; margin-top: 22px; }
.nav-footer .spacer { flex: 1; }
.nav-footer-inline .btn { flex: 1; }

.loading-overlay { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: color-mix(in srgb, var(--bg) 60%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.loading-overlay.hidden { display: none; }
.loading-spinner { width: 38px; height: 38px; border: 3px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { color: var(--text-2); font-size: .92rem; }

/* ── Splash ── */
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; transition: opacity .45s var(--ease); background: radial-gradient(130% 100% at 50% 0%, #181b24, #07080b 70%); }
#splash.hidden { opacity: 0; pointer-events: none; }
.splash-mark img { width: 180px; color: var(--accent); filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 50%, transparent)); animation: rise .7s var(--ease) both; }

/* ── Auth (Hero) ── */
.auth-screen { min-height: 100vh; max-width: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 26px; padding: 64px 26px calc(40px + env(safe-area-inset-bottom)); color: #fff; position: relative; overflow: hidden; }
.auth-screen::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(95% 60% at 12% 6%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 60%), radial-gradient(80% 55% at 100% 100%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 55%), linear-gradient(180deg, #111521, #07080b); }
.auth-screen::after { content: ''; position: absolute; inset: 0; z-index: 0; opacity: .5; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.auth-screen > * { position: relative; z-index: 1; }
.auth-hero { margin-top: auto; }
.auth-logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 26%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; margin-bottom: 22px; }
.auth-logo .ic { width: 30px; height: 30px; }
.auth-hero h2 { color: #fff; font-size: 2.15rem; font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.auth-hero p { color: rgba(255,255,255,.66); margin: 14px 0 0; font-size: 1.02rem; line-height: 1.5; max-width: 34ch; }
.auth-actions { display: flex; flex-direction: column; gap: 11px; }
.auth-screen .btn-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.auth-legal { color: rgba(255,255,255,.42); text-align: center; }
.auth-email-link { display: block; margin: 4px auto 0; background: none; border: none; color: rgba(255,255,255,.72); font: inherit; font-size: .92rem; padding: 8px; cursor: pointer; text-decoration: underline; }
/* Web-Version (Browser): nur Bestandskunden — Hinweis auf Registrierung/Abo in der nativen App */
.auth-webnote { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 12px 14px; text-align: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.auth-webnote p { margin: 0; font-size: .88rem; line-height: 1.5; color: rgba(255,255,255,.78); }
.auth-webnote b { color: #fff; font-weight: 600; }
.auth-webnote.warn { background: color-mix(in srgb, #f0a500 16%, rgba(255,255,255,.05)); border-color: color-mix(in srgb, #f0a500 45%, transparent); }
.auth-webnote .webnote-warn { color: #f6c560; font-weight: 600; margin-bottom: 8px; }
.eo-webnote { text-align: center; margin: 10px 0 0; line-height: 1.45; }
.otp-input { text-align: center; font-size: 1.8rem; font-weight: 700; letter-spacing: .45em; padding-left: .45em; font-variant-numeric: tabular-nums; }
.op-auth { max-width: 440px; margin: 0 auto; }
.op-auth .ad-card { margin-top: 14px; }
.mfa-qr { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: var(--r); margin: 12px 0; }
.mfa-qr svg, .mfa-qr-img { width: 200px; height: 200px; }
.mfa-secret { display: inline-block; margin-top: 6px; padding: 7px 11px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; letter-spacing: 1px; word-break: break-all; color: var(--text); }

/* ── Login-Overlay (Anmeldefläche) ── */
.auth-overlay { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(5,6,9,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.auth-overlay.open { display: flex; }
.auth-sheet { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 24px; position: relative; box-shadow: var(--sh-3); animation: rise .28s var(--ease); }
.auth-sheet h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.auth-sheet > p { margin-bottom: 16px; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.eo-error, .t-error { color: #ff8a8a; font-size: .85rem; min-height: 18px; margin: 2px 0 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.pw-field { position: relative; }
.pw-field input { padding-right: 46px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-eye.on { color: var(--accent-soft); }
.pw-reqs { list-style: none; margin: 8px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pw-reqs li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); transition: color .15s var(--ease); }
.pw-reqs li::before { content: '○'; font-size: .92rem; line-height: 1; }
.pw-reqs li.ok { color: #5fe39a; }
.pw-reqs li.ok::before { content: '✓'; font-weight: 800; }
.pw-match { margin: 4px 0 10px; min-height: 1.1em; font-size: .82rem; color: var(--muted); }
.pw-match.ok { color: #5fe39a; }
.pw-match.err { color: #ff8a8a; }

/* ── Team / Nutzer ── */
.domain-row { display: flex; align-items: center; gap: 8px; }
.domain-row .at { color: var(--muted); font-weight: 700; font-size: 1.1rem; }
.domain-row input { flex: 1; }
.domain-row .btn, .add-row .btn { min-height: 48px; padding: 12px 16px; white-space: nowrap; }
.member-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.member-info strong { font-weight: 600; word-break: break-all; }
.member-info small { display: block; color: var(--muted); font-size: .8rem; }
.role-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-soft); background: var(--accent-quiet); padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; }

/* ── Rechtliches ── */
.auth-legal .legal-link { color: rgba(255,255,255,.82); text-decoration: underline; cursor: pointer; }
.legal-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.legal-tabs button { flex: 1; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; transition: .15s var(--ease); }
.legal-tabs button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.legal-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1); }
.legal-body h4 { font-size: 1rem; font-weight: 700; margin: 18px 0 6px; color: var(--text); }
.legal-body h4:first-of-type { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--text-2); font-size: .92rem; line-height: 1.6; }
.legal-body ul { margin: 4px 0 8px 18px; }
.legal-body b { color: var(--text); }

/* ── Home ── */
.home-greeting { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.home-greeting h2 { font-size: 1.7rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.greeting-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.upgrade-pill { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; border: none; font-size: .72rem; font-weight: 700; letter-spacing: -.01em; padding: 6px 13px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .12s var(--ease); }
.upgrade-pill:active { transform: scale(.94); }
.tier-badge { font-family: inherit; cursor: pointer; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.tier-badge.pro { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; border: none; }
.usage-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-1), var(--hl); }
.chip-num { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.chip-label { font-size: .8rem; color: var(--muted); }
.big-action { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer; border: none; color: #fff; border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #07080b)); box-shadow: 0 22px 50px -18px color-mix(in srgb, var(--accent) 70%, transparent), var(--hl); transition: transform .14s var(--ease); }
.big-action::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 85% -30%, rgba(255,255,255,.3), transparent 55%); pointer-events: none; }
.big-action:active { transform: scale(.985); }
.big-action .ba-icon { width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.big-action .ba-icon .ic { width: 26px; height: 26px; }
.big-action .ba-text strong { display: block; font-family: var(--font-display); font-size: 1.18rem; font-weight: 800; }
.big-action .ba-text small { opacity: .88; font-size: .9rem; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; cursor: pointer; font-family: var(--font-ui); font-size: .98rem; font-weight: 600; color: var(--text); box-shadow: var(--sh-1), var(--hl); transition: transform .14s var(--ease), border-color .2s; }
.tile:active { transform: translateY(1px) scale(.99); }
.tile .tile-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-soft); }
.tile .tile-icon .ic { width: 21px; height: 21px; }
.tile-upgrade { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-soft); box-shadow: var(--sh-1), 0 0 30px -10px color-mix(in srgb, var(--accent) 50%, transparent); }
.tile-upgrade .tile-icon { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; }

/* ── Onboarding ── */
.ob-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.ob-progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .3s; }
.ob-progress span.on { background: var(--accent); }
.choice-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.choice { display: flex; gap: 13px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; transition: .16s var(--ease); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-quiet); }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.choice strong { display: block; font-weight: 700; }
.choice small { color: var(--muted); }
.onboarding-screen h2 { font-size: 1.25rem; margin-bottom: 14px; }
.kilian-guide { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 20px; }
.kg-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.kg-avatar .k-ava { width: 100%; height: 100%; display: block; }
.kg-bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; border-top-left-radius: 4px; padding: 12px 14px; font-size: .92rem; line-height: 1.5; color: var(--text); }

/* ── Paywall ── */
.paywall-reason { background: color-mix(in srgb, #f0a500 16%, var(--surface)); border: 1px solid color-mix(in srgb, #f0a500 36%, transparent); color: #f6c560; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; }
.feature-list { list-style: none; margin: 0 0 20px; padding: 0; }
.feature-list li { padding: 9px 0 9px 32px; position: relative; font-size: 1rem; }
.feature-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 21px; height: 21px; border-radius: 6px; background: var(--accent-tint); }
.feature-list li::after { content: ''; position: absolute; left: 6.5px; top: 11px; width: 8px; height: 5px; border-left: 2px solid var(--accent-soft); border-bottom: 2px solid var(--accent-soft); transform: rotate(-45deg); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.plan { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 20px 14px; cursor: pointer; text-align: center; transition: .16s var(--ease); box-shadow: var(--sh-1); color: var(--text); }
.plan:active { transform: translateY(1px); }
.plan strong { display: block; font-family: var(--font-display); font-size: 1.95rem; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.plan-best strong { color: var(--accent-soft); }
.plan:disabled { cursor: default; }
.plan-current { border-color: #2ecc71; box-shadow: 0 0 28px -12px color-mix(in srgb, #2ecc71 60%, transparent); }
.current-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #2ecc71; color: #06140c; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }

.current-plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.cp-label { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.current-plan strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); }
.cp-status { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 5px 11px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.cp-status.pro { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; }
.plan span { display: block; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.plan small { color: var(--muted); font-size: .8rem; }
.plan-best { border-color: var(--accent); box-shadow: 0 0 40px -12px color-mix(in srgb, var(--accent) 65%, transparent); }
.best-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: .92rem; }
.cmp th, .cmp td { padding: 12px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp thead th { font-family: var(--font-display); font-weight: 800; color: var(--text); background: var(--surface-2); }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--text-2); font-weight: 500; }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp .col-pro { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-soft); font-weight: 700; border-left: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); border-right: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.cmp .col-ent { background: color-mix(in srgb, #d9b44a 13%, var(--surface)); color: #e6cd7f; font-weight: 700; }
.cmp .yes { color: var(--accent-soft); font-weight: 700; }
.cmp .no { color: var(--muted); }
/* Pro = hervorgehobene Bestseller-Spalte: durchgezogener Akzent-Rahmen + Ribbon */
.cmp-ribbon th { padding: 0; border: 0; background: transparent; height: 23px; vertical-align: bottom; }
.cmp-ribbon .col-pro { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-top: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); border-top-left-radius: 12px; border-top-right-radius: 12px; padding-bottom: 6px; }
.cmp .cmp-cta .col-pro { border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.ribbon { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; box-shadow: 0 4px 12px -4px var(--accent); }
.cmp-3 { font-size: .82rem; }
.cmp-3 th { white-space: nowrap; }
.cmp-3 th, .cmp-3 td { padding: 9px 5px; }
.cmp-3 th:first-child, .cmp-3 td:first-child { padding-left: 12px; }
.cmp tfoot td { padding: 8px 5px; border-bottom: 0; vertical-align: top; }
.cmp-price td { border-top: 1px solid var(--line); padding-top: 11px; }
/* Abo-Pflichtangaben (Apple 3.1.2 / Google): Titel, Laufzeit, Preis je Zeitraum, Auto-Verlängerung, AGB + Datenschutz + EULA */
.sub-terms { margin-top: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .82rem; color: var(--text-2); line-height: 1.5; }
.sub-terms h4 { font-size: .92rem; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.sub-terms ul { margin: 0 0 8px 18px; padding: 0; }
.sub-terms li { margin-bottom: 4px; }
.sub-terms b { color: var(--text); }
.sub-terms p { margin: 0 0 8px; }
.sub-terms-links { margin-bottom: 0 !important; }
.sub-terms-links a { color: var(--accent-soft); text-decoration: underline; cursor: pointer; }
.cmp-price strong { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.05rem; line-height: 1; }
.cmp-price small { display: block; color: var(--muted); font-size: .62rem; margin-top: 2px; }
.cmp-price .col-pro strong { color: var(--accent-soft); }
.cmp-price .col-ent strong { color: #e6cd7f; font-size: .8rem; }
.cmp-cta td { padding-bottom: 11px; }
.cell-cta { display: block; width: 100%; font-size: .64rem; font-weight: 700; line-height: 1.12; border: none; border-radius: 8px; padding: 8px 4px; cursor: pointer; transition: transform .12s var(--ease); }
.cell-cta.up { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; box-shadow: 0 5px 14px -7px var(--accent); }
.cell-cta.down { background: var(--surface-3); color: var(--text-2); }
.cell-cta:active { transform: scale(.95); }
.cell-current { display: block; text-align: center; font-size: .64rem; font-weight: 700; color: #5fe39a; padding: 8px 2px; }
.cell-app { display: block; text-align: center; font-size: .64rem; font-weight: 700; line-height: 1.12; color: var(--text-2); padding: 8px 2px; }
/* Web-Version: kein Kaufweg im Browser, Abo kommt aus der nativen App */
.paywall-webnote { background: var(--accent-quiet); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text-2); border-radius: 14px; padding: 12px 14px; font-size: .88rem; line-height: 1.5; margin: 0 0 14px; }
.paywall-webnote b { color: var(--text); font-weight: 600; }
.paywall-webnote a { color: var(--accent-soft); text-decoration: underline; }
.ent-cta { display: block; font-size: .64rem; font-weight: 700; line-height: 1.12; color: #1a1c22; background: linear-gradient(135deg, #f0d987, #d9b44a); border-radius: 8px; padding: 8px 4px; text-align: center; text-decoration: none; }
.ent-cta:active { filter: brightness(1.06); }

.billing-toggle { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.billing-toggle button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: none; background: none; color: var(--text-2); font-weight: 600; font-size: .9rem; border-radius: 9px; cursor: pointer; transition: .15s var(--ease); }
.billing-toggle button.on { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.billing-toggle .save { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); }
.billing-toggle button:not(.on) .save { background: var(--accent-quiet); color: var(--accent-soft); }

.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 46px; height: 42px; min-width: 46px; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type=color]::-webkit-color-swatch { border: none; border-radius: 6px; }
.hex-input { flex: 1; min-width: 0; text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.hex-input.invalid { border-color: #ff5a5a !important; }
input.plz-unknown::placeholder { color: #e0a341; opacity: 1; }
.logo-preview { margin-top: 8px; display: flex; }
.logo-preview img { max-height: 56px; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 5px; object-fit: contain; }

/* ── Betreiber-Dashboard ── */
.admin-screen { padding-bottom: 40px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-tag { font-size: .72rem; font-weight: 700; color: var(--accent-soft); background: var(--accent-quiet); padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--sh-1); }
.kpi-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--text); letter-spacing: -.02em; }
.kpi-label { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.kpi-accent { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.kpi-accent .kpi-num { color: var(--accent-soft); }
.admin-search { width: 100%; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: .95rem; margin-bottom: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; cursor: pointer; transition: .14s var(--ease); }
.admin-row:active { transform: scale(.99); }
.ar-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-main strong { font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-main small { color: var(--muted); font-size: .76rem; }
.ar-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ar-mrr { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem; color: var(--text-2); }
.plan-chip { font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.plan-chip.monthly, .plan-chip.yearly { background: var(--accent-quiet); color: var(--accent-soft); }
.plan-chip.enterprise { background: color-mix(in srgb, #d9b44a 16%, var(--surface)); color: #e6cd7f; }
.status-dot { font-size: .68rem; font-weight: 600; white-space: nowrap; }
.status-dot.ok { color: #5fe39a; }
.status-dot.warn { color: #e0a341; }
.status-dot.muted { color: var(--muted); }
.admin-detail { display: flex; flex-direction: column; gap: 12px; }
.ad-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; box-shadow: var(--sh-1); }
.ad-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.ad-card p { margin: 0 0 4px; line-height: 1.45; }
.inv-list { display: flex; flex-direction: column; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: 0; }
.inv-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.inv-info small { color: var(--muted); font-size: .74rem; }
.inv-right { display: flex; align-items: center; gap: 12px; flex: none; }
.inv-sum { font-variant-numeric: tabular-nums; font-weight: 700; }
.admin-head .btn { flex: none; padding: 9px 14px; font-size: .85rem; }
.ad-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; word-break: break-all; color: var(--accent-soft); }
.ad-actions { display: flex; gap: 10px; margin-top: 14px; }
.ad-actions .btn { flex: 1; }

/* ── Vorgang-Umschalter (Probefahrt/Vermietung) ── */
.seg-toggle { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg-toggle label { flex: 1; margin: 0; }
.seg-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.seg-toggle span { display: block; text-align: center; padding: 9px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--text-2); cursor: pointer; transition: .15s var(--ease); }
.seg-toggle input:checked + span { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.scan-typ { margin-bottom: 16px; }
.scan-typ span { font-size: .82rem; padding-left: 4px; padding-right: 4px; }
/* Fahrzeug-Abwesenheiten */
.vehicle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.vehicle-card .vehicle-row { border: none; background: none; margin: 0; border-radius: 0; }
.vrow-actions { display: flex; gap: 2px; align-items: center; }
.abs-panel { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.abs-panel h4 { font-size: .82rem; margin: 12px 0 8px; color: var(--text-2); font-weight: 700; }
.abs-panel h4 small { font-weight: 400; color: var(--muted); }
.abs-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.abs-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; font-size: .82rem; color: var(--text-2); }
.abs-add { display: flex; flex-direction: column; gap: 8px; }
/* Home Wochen-Vorschau */
.week-preview { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; cursor: pointer; }
.wp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; font-size: .9rem; color: var(--text); }
.wp-count { font-size: .74rem; font-weight: 600; color: var(--muted); }
.wp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wp-day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border-radius: 9px; background: var(--surface-2); position: relative; }
.wp-wd { font-size: .58rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.wp-num { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.wp-day.today { outline: 1.5px solid var(--accent); outline-offset: -1px; }
.wp-day.has-miete { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.wp-day.has-miete .wp-num, .wp-day.has-miete .wp-wd { color: #fff; }
.wp-day.has-fahrt::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.fz-status { font-size: .82rem; font-weight: 600; margin: -2px 0 12px; padding: 8px 12px; border-radius: 10px; }
.fz-status.free { color: #34c759; background: color-mix(in srgb, #34c759 13%, var(--surface)); border: 1px solid color-mix(in srgb, #34c759 30%, transparent); }
.fz-status.soft { color: #f2c94c; background: color-mix(in srgb, #f2c94c 12%, var(--surface)); border: 1px solid color-mix(in srgb, #f2c94c 30%, transparent); }
.fz-status.busy { color: #e0a341; background: color-mix(in srgb, #e0a341 12%, var(--surface)); border: 1px solid color-mix(in srgb, #e0a341 30%, transparent); }
.domain-fill { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.domain-fill > label { font-size: .82rem; font-weight: 700; color: var(--text); display: block; margin-bottom: 8px; }
.domain-row { display: flex; gap: 8px; }
.domain-row input { flex: 1; }
.domain-row .btn { flex: none; white-space: nowrap; }
.dom-prog { margin-top: 10px; }
.dom-bar-track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.dom-bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .35s ease-out; }
.dom-prog span { font-size: .76rem; color: var(--muted); display: block; margin-top: 6px; }
.ob-cal { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ob-cal h3 { font-size: .95rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.ob-cal .opt { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: var(--r-pill); }
.connect-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.connect-btn { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer; transition: .15s var(--ease); }
.connect-btn:active { transform: scale(.98); }
.connect-btn.on { border-color: var(--accent); background: var(--accent-quiet); color: var(--accent-soft); }
/* KI-lian erst nach dem Login — nicht auf Login/Onboarding */
body[data-screen="auth"] .kilian-fab, body[data-screen="auth"] .kilian-bubble,
body[data-screen="onboarding"] .kilian-fab, body[data-screen="onboarding"] .kilian-bubble { display: none !important; }
.rental-warn { color: #e0a341; font-size: .82rem; background: color-mix(in srgb, #e0a341 12%, var(--surface)); border: 1px solid color-mix(in srgb, #e0a341 32%, transparent); border-radius: 10px; padding: 9px 12px; margin: 0 0 12px; }

/* ── Kalender ── */
.cal-screen { padding-bottom: 40px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.cal-nav button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.cal-nav span { min-width: 118px; text-align: center; }
.cal-active { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 12px; }
.cal-wd { text-align: center; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-day { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--text-2); font-size: .85rem; cursor: pointer; padding: 0; }
.cal-day.empty { border: none; background: none; cursor: default; }
.cal-day.today { border-color: var(--accent); color: var(--text); font-weight: 700; }
.cal-day.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-day.has-miete { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); color: #fff; font-weight: 600; }
.cal-day.has-fahrt::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.cal-legend { display: flex; gap: 16px; margin-bottom: 14px; font-size: .76rem; color: var(--muted); }
.cal-legend .lg { display: flex; align-items: center; gap: 6px; }
.cal-legend .lg::before { content: ''; width: 12px; height: 12px; }
.cal-legend .miete::before { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); border-radius: 4px; }
.cal-legend .fahrt::before { background: var(--muted); border-radius: 50%; }
.cal-agenda { display: flex; flex-direction: column; gap: 8px; }
.cal-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 12px; padding: 11px 14px; }
.cal-item.ausleihe, .cal-item.ersatzfahrzeug { border-left-color: var(--accent); }
.ci-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ci-main strong { color: var(--text); font-weight: 700; }
.ci-main small { color: var(--muted); font-size: .76rem; }
.ci-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.ci-range { font-size: .8rem; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-badge { font-size: .64rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.ci-badge.ausleihe, .ci-badge.ersatzfahrzeug { background: var(--accent-quiet); color: var(--accent-soft); }
.cal-item { flex-direction: column; align-items: stretch; }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-month-h { font-weight: 700; color: var(--text-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.cal-modes { max-width: 210px; margin-bottom: 0; }
.cal-filter { width: 100%; margin-bottom: 14px; }
.cal-add { display: flex; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cal-addbtn { flex: 1; text-align: center; font-size: .72rem; font-weight: 600; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); text-decoration: none; cursor: pointer; }
.cal-addbtn:active { transform: scale(.96); }
.cal-connect { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.cal-connect h3 { font-size: .9rem; margin: 0 0 6px; color: var(--text); }
.feed-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.feed-row .ad-link { flex: 1; min-width: 0; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.feed-row .btn { flex: none; }

.ent-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; padding: 18px; border-radius: var(--r); box-shadow: var(--sh-1); background: linear-gradient(180deg, color-mix(in srgb, #d9b44a 11%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, #d9b44a 32%, var(--line)); }
.ent-info { display: flex; flex-direction: column; gap: 5px; }
.ent-badge { align-self: flex-start; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #1a1c22; background: linear-gradient(135deg, #f0d987, #d9b44a); padding: 3px 11px; border-radius: var(--r-pill); }
.ent-info strong { font-family: var(--font-display); font-size: 1.18rem; }

/* ── Listen ── */
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.count { background: var(--surface-2); color: var(--text); padding: 5px 12px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.contract-add { display: flex; flex-direction: column; margin-bottom: 20px; }
.vehicle-list, .contract-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.vehicle-row, .contract-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; width: 100%; text-align: left; cursor: pointer; box-shadow: var(--sh-1); }
.contract-info strong { color: var(--text); font-weight: 600; }
.search-input { width: 100%; padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); color: var(--text); border: 1.5px solid var(--line); border-radius: 12px; font-size: .95rem; -webkit-appearance: none; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--accent); background: var(--surface-3); }

/* KI-lian-Walkthrough (geführte Tour) */
.tour-overlay { position: fixed; inset: 0; z-index: 4000; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(7,9,13,.76); outline: 2px solid var(--accent); outline-offset: 3px; pointer-events: none; transition: top .32s var(--ease), left .32s var(--ease), width .32s var(--ease), height .32s var(--ease); }
.tour-tip { position: fixed; z-index: 4002; width: min(330px, calc(100vw - 24px)); background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 18px; padding: 16px 16px 12px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.6); transition: top .3s var(--ease), left .3s var(--ease); }
.tour-tip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.tour-ava { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; }
.tour-ava svg, .tour-ava .k-ava { width: 100%; height: 100%; display: block; }
.tour-tip-head strong { font-size: 1.04rem; color: var(--text); }
.tour-tip p { margin: 0 0 14px; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.tour-btns { display: flex; gap: 8px; }
.tour-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: .86rem; cursor: pointer; }
.tour-ghost:active { background: var(--surface-3); }
.tour-primary { background: var(--accent); color: #fff; border: none; border-radius: 10px; padding: 8px 15px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.tour-primary:active { transform: scale(.96); }
.tour-skip { display: block; width: 100%; margin-top: 6px; background: none; border: none; color: var(--muted); font-size: .8rem; cursor: pointer; padding: 6px; }
.tour-skip:active { color: var(--text-2); }
.k-chip-tour { border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; color: var(--text) !important; }
.vehicle-row small, .contract-info small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.contract-date { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.btn-icon { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 1rem; }
.btn-icon.delete:active { color: #ff7a7a; border-color: color-mix(in srgb, #ff5a5a 35%, transparent); }
.add-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sh-1), var(--hl); }
.limit-hint { color: #f6c560; background: color-mix(in srgb, #f0a500 14%, var(--surface)); border: 1px solid color-mix(in srgb, #f0a500 32%, transparent); padding: 12px; border-radius: 12px; }

/* ── Signatur (Pad bleibt HELL — Unterschrift dunkel, passend zum PDF) ── */
.sig-notice { margin-bottom: 18px; line-height: 1.55; color: var(--text-2); }
.sig-block { margin-bottom: 20px; }
.sig-label { font-weight: 700; margin-bottom: 8px; }
.sig-pad { width: 100%; height: 168px; background: #f7f8fa; border: 1.5px solid var(--line-strong); border-radius: var(--r); touch-action: none; display: block; }
.sig-clear { float: right; padding: 6px 0; }

/* ── Scan ── */
.scan-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.scan-steps .ss { flex: 1; font-size: .76rem; font-weight: 600; color: var(--muted); padding-top: 10px; border-top: 3px solid var(--surface-3); transition: .2s; }
.scan-steps .ss.active { color: var(--accent-soft); border-top-color: var(--accent); }
.sub { display: none; }
.sub.visible { display: block; }
/* Termin: Datum- und Uhrzeit-Gruppen mit Symbol-Überschrift (Scan-Schritt 3) */
.termin-grp { margin-bottom: 10px; padding: 10px 12px 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.termin-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--text); margin-bottom: 8px; }
.termin-head svg { width: 18px; height: 18px; color: var(--accent-soft); flex: none; }
/* Art.-13-Hinweis für den Endkunden (Scan-Schritt 1) */
.privacy-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; margin-bottom: 16px; }
.privacy-note summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 600; font-size: .92rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.privacy-note summary::-webkit-details-marker { display: none; }
.privacy-note summary::after { content: '›'; margin-left: auto; font-size: 1.2rem; color: var(--muted); transition: transform .15s var(--ease); }
.privacy-note[open] summary::after { transform: rotate(90deg); }
.privacy-note summary svg { width: 18px; height: 18px; flex: none; color: var(--accent-soft); }
.privacy-note > p { margin: 0 0 8px; }
.privacy-note-body { padding-bottom: 12px; }
.privacy-note-body p { font-size: .84rem; line-height: 1.5; color: var(--text-2); margin: 0 0 7px; }
.privacy-note-body b { color: var(--text); }
.upload-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.upload-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-side-label { font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.upload-side-hint { color: var(--muted); font-weight: 400; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 14px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r); transition: .18s var(--ease); }
.drop-zone.dragover { border-color: var(--accent); background: var(--accent-quiet); }
.drop-zone-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-soft); }
.drop-zone-icon .ic { width: 28px; height: 28px; }
.drop-zone-text { font-size: .82rem; color: var(--muted); }
.drop-zone-buttons { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.drop-zone-buttons .btn { min-height: 42px; padding: 8px 12px; font-size: .86rem; }
.upload-preview { display: none; text-align: center; }
.upload-preview.visible { display: block; }
.upload-preview img { max-width: 100%; max-height: 300px; width: auto; height: auto; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); }
.change-link { display: inline-block; margin-top: 8px; color: var(--accent-soft); font-size: .85rem; font-weight: 600; cursor: pointer; }
.ocr-status { display: none; flex-direction: column; align-items: stretch; gap: 9px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; }
.ocr-status.visible { display: flex; }
.ocr-bar { width: 100%; height: 7px; border-radius: var(--r-pill); background: var(--bg); overflow: hidden; }
.ocr-status.error .ocr-bar { display: none; }
.ocr-bar-fill { height: 100%; width: 0; border-radius: var(--r-pill); background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent); }
.ocr-status.success .ocr-bar-fill { background: #2ecc71; }
.ocr-status.loading { background: var(--surface-2); color: var(--accent-soft); }
.ocr-status.success { background: color-mix(in srgb, #2ecc71 14%, var(--surface)); color: #5fe39a; }
.ocr-status.error { background: color-mix(in srgb, #ff5a5a 14%, var(--surface)); color: #ff8a8a; }

/* ── Bestandskunde-Picker ── */
.cust-picker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 18px; box-shadow: var(--sh-1); }
.cust-picker .cust-head { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .92rem; margin-bottom: 10px; color: var(--text-2); }
.cust-picker .cust-head .ic { width: 18px; height: 18px; color: var(--accent-soft); }
.cust-search { position: relative; }
.cust-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; margin-top: 10px; }
.cust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; text-align: left; }
.cust-row:active { border-color: var(--accent); }
.cust-row small { display: block; color: var(--muted); font-size: .78rem; }
.cust-row .del { color: var(--muted); border: none; background: none; padding: 6px; cursor: pointer; }

/* ── Einwilligung (Consent) ── */
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--accent-quiet); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 14px; cursor: pointer; }
.consent input { width: 21px; height: 21px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.consent span { font-size: .9rem; color: var(--text-2); line-height: 1.45; }
.consent .legal-link { color: var(--accent-soft); text-decoration: underline; cursor: pointer; }
.consent-sm { padding: 11px 12px; margin: 2px 0 10px; }
.consent-sm span { font-size: .84rem; }
.terms-links { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 16px; }
.onboarding-screen .consent { margin-bottom: 18px; }

/* ── Vertrag ── */
.contract-screen h2 { margin-bottom: 16px; }
.pdf-preview-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 64vh; padding: 8px; margin-bottom: 18px; box-shadow: var(--sh-2); }
.pdf-page { width: 100%; height: auto; display: block; border-radius: 4px; background: #fff; }
.pdf-page + .pdf-page { margin-top: 8px; }
.contract-actions { display: flex; flex-direction: column; }

/* ── Toast ── */
#toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px); z-index: 1100; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong); padding: 13px 20px; border-radius: 14px; font-size: .92rem; font-weight: 500; max-width: 88%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .22s var(--ease), transform .22s var(--ease); box-shadow: var(--sh-3); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: #3a1414; border-color: #6a2a2a; color: #ffb4b4; }

/* ══ KIlian — Assistent (FAB + Panel) ══ */
.kilian-fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 1050; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; padding: 0; overflow: hidden; background: none; box-shadow: 0 16px 40px -10px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 0 1px var(--line-strong); transition: transform .16s var(--ease); }
.kilian-fab:active { transform: scale(.9); }
.kilian-bubble { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 1049; max-width: 216px; padding: 11px 14px; text-align: left; font-size: .85rem; font-weight: 500; line-height: 1.3; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px 16px 4px 16px; box-shadow: 0 14px 34px -12px rgba(0,0,0,.55); cursor: pointer; opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; }
.kilian-bubble.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.kilian-bubble::after { content: ''; position: absolute; right: 20px; bottom: -7px; width: 13px; height: 13px; background: var(--surface-2); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transform: rotate(45deg); }
.kilian-fab .k-ava, .kilian-avatar .k-ava { width: 100%; height: 100%; display: block; }
.k-ava .k-acc { fill: var(--accent); }
.k-ava .k-acc-soft { fill: var(--accent); opacity: .18; }
body[data-screen="onboarding"] .kilian-fab, body[data-screen="onboarding"] .kilian-bubble,
body[data-screen="scan"] .kilian-fab, body[data-screen="scan"] .kilian-bubble,
body[data-screen="signature"] .kilian-fab, body[data-screen="signature"] .kilian-bubble,
body[data-screen="preview"] .kilian-fab, body[data-screen="preview"] .kilian-bubble,
body[data-screen="contract"] .kilian-fab, body[data-screen="contract"] .kilian-bubble,
body[data-screen="admin"] .kilian-fab, body[data-screen="admin"] .kilian-bubble,
body.auth-overlay-open .kilian-fab, body.auth-overlay-open .kilian-bubble { display: none; }

.kilian-backdrop { position: fixed; inset: 0; z-index: 1058; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.kilian-backdrop.open { opacity: 1; pointer-events: auto; }
.kilian-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060; width: 100%; max-width: 540px; margin: 0 auto; height: min(78vh, 660px); background: var(--surface); border: 1px solid var(--line-strong); border-bottom: none; border-radius: 24px 24px 0 0; box-shadow: var(--sh-3); display: flex; flex-direction: column; transform: translateY(103%); transition: transform .34s var(--ease); }
.kilian-panel.open { transform: none; }
.kilian-head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.kilian-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.kilian-head strong { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.kilian-head .sub { color: var(--muted); font-size: .76rem; }
.kilian-close { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 1.1rem; cursor: pointer; }
.kilian-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.k-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.k-msg.k-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.k-msg.k-bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.k-msg.k-bot.typing { color: var(--muted); }
.kilian-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.k-chip { font-size: .8rem; padding: 8px 13px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); cursor: pointer; }
.k-chip:active { border-color: var(--accent); }
.kilian-input { display: flex; gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.kilian-input button { width: 50px; flex: none; border: none; border-radius: 12px; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.kilian-input button .ic { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .screen h2 { font-size: 1.45rem; }
  .auth-hero h2 { font-size: 1.95rem; }
}

/* Einstellungen — ausklappbare Sektionen + Vorlageverträge */
.acc-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.acc-head h3 { margin: 0; }
.acc-chev { color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .2s var(--ease); }
.acc.open .acc-chev { transform: rotate(90deg); }
.acc .acc-body { display: none; }
.acc.open .acc-body { display: block; margin-top: 14px; }
.tpl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.tpl-row:first-of-type { border-top: none; }
.tpl-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tpl-info strong { color: var(--text); }
.tpl-info small { color: var(--muted); font-size: .76rem; }
.tpl-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.scan-steps .ss { cursor: pointer; }
/* Fahrzeug-Fotos (Zustandsdoku) */
.photo-panel { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.photo-panel h4 { font-size: .82rem; margin: 12px 0 8px; color: var(--text-2); font-weight: 700; }
.photo-panel h4 small { font-weight: 400; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.photo-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-ts { position: absolute; bottom: 0; left: 0; right: 0; font-size: .58rem; color: #fff; background: rgba(0,0,0,.55); padding: 2px 4px; text-align: center; }
.photo-item .btn-icon { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 6px; font-size: .75rem; background: rgba(0,0,0,.5); color: #fff; }
