/* ═══════════════════════════════════════════════════════════════════════
   KraftstoffTanken.de – Basis-Stylesheet (ersetzt Tailwind komplett)
   Reset · Design-Tokens (hell/dunkel) · Layout · Komponenten.
   Effekte/Animationen (Magic UI) liegen in magic.css, Verhalten in magic.js.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
    --bg: #fafafa;
    --fg: #09090b;
    --fg-2: #3f3f46;
    --muted: #71717a;
    --faint: #a1a1aa;
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: #ffffff;
    --surface-2: #f4f4f5;
    --field: #ffffff;
    --line: rgba(9, 9, 11, .08);
    --line-2: rgba(9, 9, 11, .14);
    --brand: #4f46e5;
    --brand-fg: #4f46e5;
    --brand-soft: rgba(99, 102, 241, .1);
    --ok: #16a34a;
    --ok-soft: rgba(34, 197, 94, .12);
    --bad: #dc2626;
    --bad-soft: rgba(239, 68, 68, .1);
    --warn: #b45309;
    --warn-soft: rgba(245, 158, 11, .12);
    --info: #4338ca;
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.18);
    --shadow-lg: 0 30px 80px -30px rgba(79,70,229,.35), 0 12px 30px -18px rgba(0,0,0,.25);
    --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dark {
    --bg: #111114;
    --fg: #fafafa;
    --fg-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #71717a;
    --surface: rgba(27, 27, 32, .66);
    --surface-solid: #1b1b20;
    --surface-2: rgba(255, 255, 255, .04);
    --field: rgba(255, 255, 255, .04);
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --brand-fg: #a5b4fc;
    --brand-soft: rgba(129, 140, 248, .14);
    --ok: #4ade80;
    --ok-soft: rgba(34, 197, 94, .14);
    --bad: #f87171;
    --bad-soft: rgba(239, 68, 68, .14);
    --warn: #fbbf24;
    --warn-soft: rgba(245, 158, 11, .14);
    --info: #c7d2fe;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.8);
    --shadow-lg: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--line); margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { font-family: var(--font); font-size: 15px; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video, canvas { display: block; max-width: 100%; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; letter-spacing: inherit; }
button, [role=button], label[for], summary { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
hr { border-top-width: 1px; border-color: var(--line-2); }
b, strong { font-weight: 650; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Typografie ──────────────────────────────────────────────────────── */
.display { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.015em; }
.h3 { font-size: 1rem; font-weight: 650; }
.eyebrow { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.08rem; line-height: 1.65; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 650; }
.center { text-align: center; }
.t-ok { color: var(--ok); } .t-bad { color: var(--bad); } .t-warn { color: var(--warn); } .t-brand { color: var(--brand-fg); }
.link { color: var(--brand-fg); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }
.link-plain { color: var(--brand-fg); font-weight: 600; }
.link-plain:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.container.md { max-width: 900px; } .container.sm { max-width: 700px; } .container.xs { max-width: 460px; }
@media (min-width: 640px) { .container { padding-inline: 24px; } }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.stack.sm { --gap: 8px; } .stack.lg { --gap: 20px; } .stack.xl { --gap: 28px; }
.row { display: flex; align-items: center; gap: var(--gap, 8px); }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap, 12px); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid.sm-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.sm-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .grid.md-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.md-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.md-c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sep-top { border-top-width: 1px; border-color: var(--line); padding-top: 16px; }
.divider { position: relative; text-align: center; font-size: .75rem; color: var(--faint); }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.divider span { position: relative; padding: 0 10px; background: var(--surface-solid); }

/* ── Fläche / Karte ──────────────────────────────────────────────────── */
.card {
    position: relative; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.card.sm { border-radius: var(--r-lg); padding: 16px; }
.card.flat { -webkit-backdrop-filter: none; backdrop-filter: none; }
.card.raised { box-shadow: var(--shadow-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.inset { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
@media (max-width: 480px) { .card { padding: 18px; } }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 16px; border-radius: 12px; font-size: .88rem; font-weight: 600; white-space: nowrap;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--fg);
    transition: background-color .2s, border-color .2s, transform .15s, box-shadow .3s, filter .2s;
}
.btn:hover { border-color: rgba(99,102,241,.45); background: var(--brand-soft); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.sm { height: 32px; padding: 0 12px; font-size: .8rem; border-radius: 10px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: .74rem; border-radius: 999px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: .95rem; border-radius: 14px; }
.btn.pill { border-radius: 999px; }
.btn.block { display: flex; width: 100%; }
.btn.square { padding: 0; width: 40px; }
.btn-primary {
    position: relative; overflow: hidden; isolation: isolate; color: #fff; border-color: transparent;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 60%, #8b5cf6 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 24px -12px rgba(99,102,241,.85);
}
.btn-primary:hover { background: linear-gradient(135deg, #6366f1 0%, #7c3aed 60%, #8b5cf6 100%); filter: brightness(1.08) saturate(1.1); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 14px 30px -12px rgba(124,58,237,.9); }
.btn-primary::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.38) 50%, transparent 70%);
    transform: translateX(-130%); transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.btn-primary:hover::before { transform: translateX(130%); }
.btn-primary:disabled { filter: grayscale(.35) opacity(.7); cursor: progress; }
.btn-danger { color: #fff; border-color: transparent; background: linear-gradient(135deg, #ef4444, #e11d48); box-shadow: 0 10px 24px -12px rgba(239,68,68,.7); }
.btn-danger:hover { background: linear-gradient(135deg, #ef4444, #e11d48); filter: brightness(1.08); border-color: transparent; }
.btn-text { border-color: transparent; background: transparent; }
.btn-text:hover { background: var(--brand-soft); border-color: transparent; }
.btn-text.danger { color: var(--bad); } .btn-text.danger:hover { background: var(--bad-soft); }
.linkbtn { color: var(--brand-fg); font-size: .8rem; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--bad); }
.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 1.1rem; flex: none;
    color: var(--muted); transition: background-color .2s, color .2s, transform .15s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--fg); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .85rem; }
@media (max-width: 480px) { .icon-btn { width: 32px; height: 32px; } }

/* ── Formulare ───────────────────────────────────────────────────────── */
.input {
    display: block; width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; font-size: .9rem;
    background: var(--field); border: 1px solid var(--line-2); color: var(--fg); outline: none;
    transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 34px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.dark select.input option { background: #1b1b20; }
.input.sm { height: 34px; font-size: .8rem; padding: 0 10px; border-radius: 10px; }
select.input.sm { padding-right: 28px; background-position: right 9px center; }
.input.pill { border-radius: 999px; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.16); }
.input[readonly] { background: var(--surface-2); }
.label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.label.sub { font-weight: 500; color: var(--muted); font-size: .75rem; }
.field + .field { margin-top: 14px; }
.hint { font-size: .72rem; color: var(--faint); margin-top: 5px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; cursor: pointer; user-select: none; }
.check input { margin-top: .22em; flex: none; width: 16px; height: 16px; }
.check.center { align-items: center; } .check.center input { margin-top: 0; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: #6366f1; }
input[type=range] { height: 6px; }
.form-msg { font-size: .88rem; text-align: center; }
.form-msg.err { color: var(--bad); }

/* ── Hinweise / Badges ───────────────────────────────────────────────── */
.notice { display: flex; gap: 12px; border-radius: var(--r-lg); padding: 14px 16px; font-size: .82rem; line-height: 1.55;
    background: rgba(254, 243, 199, .6); border: 1px solid rgba(245, 158, 11, .35); color: #78350f; }
.dark .notice { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .28); color: #fde68a; }
.notice a { text-decoration: underline; }
.alert { border-radius: var(--r); padding: 14px 16px; font-size: .88rem; line-height: 1.5; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert.info { background: var(--brand-soft); color: var(--info); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 650; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--brand-soft); color: var(--brand-fg); }
.tag.n { background: var(--surface-2); color: var(--muted); }
.tag.sq { border-radius: 6px; padding: 1px 6px; }

/* ── Tabellen ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: .85rem; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--brand-soft); }
.table .r { text-align: right; }
.table.xs { font-size: .75rem; }
.table tr.click { cursor: pointer; }
.nowrap { white-space: nowrap; }

/* ── Kennzahl ────────────────────────────────────────────────────────── */
.stat { border-radius: var(--r-lg); padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.stat.soft { background: linear-gradient(135deg, var(--surface-2), transparent); }
.stat-label { font-size: .75rem; color: var(--muted); }
.stat-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value.sm { font-size: .95rem; letter-spacing: -.01em; }
.stat-sub { font-size: .72rem; color: var(--faint); margin-top: 3px; }
.stat.center { text-align: center; }
.stat.tight { padding: 10px; }

/* ── Kopfzeile ───────────────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 100; height: 56px; flex: none;
    display: flex; align-items: center; gap: 10px; padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
@media (min-width: 640px) { .topbar { padding: 0 24px; gap: 12px; } }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.02em; flex: none; }
.brand-name { font-size: 15px; }
/* Wortmarke laut Logo-Design: „kraftstoff“ dunkel, „tanken“ in Markenfarbe, „.de“ dezent */
.wordmark { font-weight: 800; letter-spacing: -.045em; color: #1e1b4b; white-space: nowrap; }
.wordmark b { font-weight: 800; color: #4f46e5; }
.wordmark i { font-style: normal; font-weight: 600; letter-spacing: -.02em; color: var(--faint); }
.dark .wordmark, .footer.dark-band .wordmark { color: #fff; }
.dark .wordmark b, .footer.dark-band .wordmark b { color: #a5b4fc; }
.brand-sub { font-size: .75rem; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.navlinks { display: flex; align-items: center; gap: 2px; }
.navlinks a { padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--fg-2); transition: background-color .2s, color .2s; }
.navlinks a:hover { background: var(--brand-soft); color: var(--fg); }
@media (max-width: 420px) { .navlinks a { padding: 6px 8px; font-size: .8rem; } }

/* Segmented Tabs (Pill-Leiste) */
.tabs { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; color: var(--muted); transition: color .2s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); }
.tabs:not(.mu-tabs-ready) .tab.active { background: var(--surface-solid); box-shadow: var(--shadow); }
@media (max-width: 480px) { .tab { padding: 6px 8px; font-size: .74rem; } }
.tabs.seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.tabs.seg .tab { font-size: .76rem; font-weight: 700; text-align: center; }
.tabs.seg .tab.active-pill { color: #fff; }
.tabs.seg:not(.mu-tabs-ready) .tab.active-pill { background: #4f46e5; }

/* ── Fußzeile ────────────────────────────────────────────────────────── */
.footer { position: relative; margin-top: auto; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(99,102,241,.6), transparent); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-block: 28px; font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); }
.footer-links a:hover { color: var(--fg); }
.footer-copy { text-align: center; font-size: .7rem; color: var(--faint); padding: 0 16px 22px; }
.footer.dark-band { background: #09090b; color: #a1a1aa; border-color: rgba(255,255,255,.08); }
.footer.dark-band .footer-links a:hover { color: #fff; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dark .modal { background: rgba(0,0,0,.6); }
.modal.top { align-items: flex-start; overflow-y: auto; }
.modal.z2 { z-index: 210; }
.modal-panel { position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; padding: 24px;
    background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-panel.lg { max-width: 520px; }
.modal.top .modal-panel { max-height: none; margin: 32px 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-title { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.close { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px -4px 0 0; border-radius: 999px; font-size: 1.2rem; flex: none;
    color: var(--muted); transition: background-color .2s, transform .25s cubic-bezier(.16,1,.3,1), color .2s; }
.close:hover { background: var(--brand-soft); color: var(--fg); transform: rotate(90deg); }

/* ── Leerzustand / Laden ─────────────────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 200px; padding: 24px; color: var(--faint); font-size: .88rem; }
.empty .ico { font-size: 2.6rem; margin-bottom: 6px; }
.empty .ttl { font-size: 1.05rem; font-weight: 650; color: var(--muted); }
.empty .btn { margin-top: 12px; }
.empty.sm { min-height: 120px; }
.spin { animation: kt-spin .8s linear infinite; }
@keyframes kt-spin { to { transform: rotate(360deg); } }
.chart-box { position: relative; height: 224px; }
.chart-box.sm { height: 190px; }

/* ── Hero (Unterseiten) ──────────────────────────────────────────────── */
.hero { position: relative; padding-block: 56px 32px; }
@media (min-width: 768px) { .hero { padding-block: 72px 36px; } }
.hero-inner { position: relative; }
.hero .display, .hero .h1 { margin: 18px 0 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--fg); }
.back span { transition: transform .2s; } .back:hover span { transform: translateX(-2px); }

/* ── Zeilen-Listen ───────────────────────────────────────────────────── */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.list-item .ico { font-size: 1.3rem; }
.list-item.compact { padding: 7px 10px; border-radius: var(--r-sm); font-size: .78rem; gap: 8px; background: var(--surface-2); }
.list-item.selectable { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.list-item.is-active { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Scrollbars ──────────────────────────────────────────────────────── */
.scroll { scrollbar-width: thin; scrollbar-color: rgba(113,113,122,.35) transparent; }
.scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(113,113,122,.35); border-radius: 999px; }

/* ═══════════════════════════════════════════════════════════════════════
   App (index.html)
   ═══════════════════════════════════════════════════════════════════════ */
body.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-main { flex: 1 1 auto; display: flex; overflow: hidden; min-height: 0; }
.view-map { display: flex; width: 100%; height: 100%; }
.view-scroll { width: 100%; height: 100%; overflow-y: auto; padding: 24px 16px 40px; }
@media (min-width: 768px) { .view-scroll { padding: 32px 32px 48px; } }
.page { max-width: 1024px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page.narrow { max-width: 680px; gap: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.page-head .h1 { margin-top: 12px; }
.app .brand-name { display: none; }
@media (min-width: 1024px) { .app .brand-name { display: block; } }
@media (max-width: 430px) { .app .brand { display: none; } }
.only-mobile { display: none; }
@media (max-width: 767px) { .only-mobile { display: inline-grid; } }
.hide-sm { display: none !important; }
@media (min-width: 1280px) { .hide-sm { display: inline-flex !important; } }
.last-update:empty { display: none !important; }

/* Seitenleiste */
.sidebar { position: relative; z-index: 20; width: 400px; flex: none; display: flex; flex-direction: column;
    background: color-mix(in srgb, var(--bg) 82%, transparent); border-right: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
@media (max-width: 767px) {
    .sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 100%; max-width: 420px; z-index: 50;
        transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1); background: var(--bg); }
    .sidebar.open { transform: translateX(0); }
}
.sb-controls { flex: none; padding: 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.sb-stats { flex: none; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: .74rem; font-weight: 500; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.forecast { flex: none; padding: 8px 12px; font-size: .74rem; border-bottom: 1px solid var(--line); }
.forecast.down { color: var(--ok); background: var(--ok-soft); }
.forecast.up { color: var(--warn); background: var(--warn-soft); }
.forecast.flat { color: var(--muted); }
.station-list { flex: 1 1 auto; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.route-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 500; color: var(--brand-fg); align-self: flex-start; }
.route-toggle .chev { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 999px; background: var(--brand-soft); font-size: 8px; }
.radius-row { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--muted); }
.radius-row input[type=range] { flex: 1 1 auto; }
.radius-val { width: 42px; text-align: right; font-family: var(--mono); font-weight: 600; color: var(--fg); }
.brand-select { flex: none; max-width: 40%; font-size: .76rem; }

/* Autovervollständigung */
.ac-host { position: relative; }
.ac-drop { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; padding: 4px; z-index: 9999; max-height: 224px; overflow-y: auto;
    background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.ac-item { padding: 8px 12px; font-size: .86rem; border-radius: 10px; cursor: pointer; color: var(--fg-2); transition: background-color .15s; }
.ac-item:hover { background: var(--brand-soft); color: var(--fg); }

/* Stationskarte */
.station { position: relative; padding: 10px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.station.is-selected { border-color: #818cf8; box-shadow: 0 0 0 1px #818cf8, 0 12px 30px -16px rgba(99,102,241,.7); }
.station-row { display: flex; align-items: flex-start; gap: 10px; }
.station-logo { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: .88rem; font-weight: 700; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.05); }
.station-body { flex: 1 1 auto; min-width: 0; }
.station-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.station-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 650; font-size: .88rem; }
.station-meta { display: flex; align-items: center; gap: 6px; flex: none; font-size: .74rem; color: var(--faint); }
.station-addr { font-size: .7rem; color: var(--muted); margin-bottom: 6px; }
.dot-open { color: var(--ok); font-weight: 700; } .dot-closed { color: var(--bad); font-weight: 700; }
.prices { display: flex; align-items: center; gap: 2px; }
.price { display: flex; flex-direction: column; align-items: center; padding: 2px 6px; border-radius: 8px; }
.price .lbl { font-size: 9px; color: var(--faint); }
.price .val { font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: -.02em; color: var(--fg-2); }
.price .val.none { color: var(--faint); }
.price .arr { font-size: 8px; margin-left: 2px; }
.price.hi { background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(99,102,241,.2); }
.price.hi .val { color: var(--brand-fg); }
.spark { margin-left: 4px; opacity: .85; }
.mini-btn { padding: 4px; border-radius: 6px; font-size: .78rem; color: var(--faint); transition: background-color .15s, color .15s; }
.mini-btn:hover { background: var(--brand-soft); color: var(--brand-fg); }
.mini-btn.on-fav { color: #eab308; font-size: .9rem; } .mini-btn.fav { font-size: .9rem; }
.mini-btn.on { color: var(--brand-fg); }
.mini-btn.warn:hover { color: var(--bad); }
.cheap-badge { flex: none; white-space: nowrap; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; color: var(--ok); box-shadow: inset 0 0 0 1px rgba(34,197,94,.3); }
.arrow-down { color: #22c55e; } .arrow-up { color: #ef4444; }

/* Karte */
.map-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
#map { position: absolute; inset: 0; z-index: 1; }
.dock { position: absolute; right: 16px; bottom: 20px; z-index: 15; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.15rem; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 16px 34px -18px rgba(79,70,229,.45);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.fab.on { box-shadow: 0 0 0 2px #6366f1, 0 16px 34px -18px rgba(79,70,229,.6); }
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); }
@media (min-width: 768px) { .backdrop { display: none !important; } }

/* Analyse */
.week-grid { overflow-x: auto; font-size: 10px; }
.cheap-cell { font-family: var(--mono); font-weight: 700; color: var(--ok); text-align: right; }
.delta { font-size: .74rem; font-weight: 650; }

/* Toasts */
.toast-wrap { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; text-align: center; color: #fff; font-size: .86rem; font-weight: 600; padding: 10px 16px; border-radius: 16px; background: rgba(17,17,20,.9); }
.dark .toast { background: rgba(46,46,53,.92); }
.toast.ok { background: linear-gradient(135deg, #10b981, #16a34a); }
.toast.warn { background: linear-gradient(135deg, #f59e0b, #ea580c); }

/* Bewertungen */
.stars-pick { font-size: 1.9rem; text-align: center; user-select: none; margin-bottom: 12px; }
.rating-list { font-size: .86rem; display: flex; flex-direction: column; gap: 8px; }
.star { color: #f59e0b; }
.report-btn { margin-left: 4px; font-size: 10px; color: var(--faint); text-decoration: underline; }
.report-btn:hover { color: var(--bad); }

/* Leaflet */
html.dark .leaflet-tile { filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(85%); }
html.dark .leaflet-control-zoom-in, html.dark .leaflet-control-zoom-out, html.dark .leaflet-control-attribution { filter: invert(100%) hue-rotate(180deg); }
.leaflet-container a:focus-visible { outline-offset: 0; }
.kt-marker { border: none; background: transparent; }
.kt-pip { font-weight: 700; font-size: 12px; padding: 3px 8px; border: 2px solid rgba(255,255,255,.85); cursor: pointer; color: #fff; line-height: 1.3; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.kt-pip:hover { transform: scale(1.12); }
.kt-pip.sel { transform: scale(1.2); border-color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════
   Unterseiten (Recht, Portal, Admin)
   ═══════════════════════════════════════════════════════════════════════ */
body.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; width: 100%; }

/* Rechtliches: Dokument-Navigation */
.docnav { position: sticky; top: 56px; z-index: 40; padding: 8px 0; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.docnav .tabs { font-size: .86rem; }
.docnav .tab { font-weight: 500; }
.doc-card { padding: 28px; }
@media (min-width: 768px) { .doc-card { padding: 44px; } }
.doc-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-link { display: flex; align-items: flex-start; gap: 16px; padding: 20px; }
.doc-link .ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(6,182,212,.1)); box-shadow: inset 0 0 0 1px rgba(99,102,241,.15); }
.doc-link .ttl { display: block; font-weight: 650; }
.doc-link .sub { display: block; font-size: .85rem; color: var(--muted); }
.doc-link .go { align-self: center; font-size: 1.2rem; color: var(--faint); transition: transform .2s, color .2s; }
.doc-link:hover .go { transform: translateX(3px); color: #6366f1; }

/* Portal */
.portal-hero { position: relative; overflow: hidden; }
.portal-grid { position: relative; display: grid; gap: 40px; align-items: center; padding-block: 56px 44px; }
@media (min-width: 1024px) { .portal-grid { grid-template-columns: 1.15fr 1fr; gap: 56px; padding-block: 80px 48px; } }
.portal-grid .display { margin: 22px 0 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; margin-top: 30px; }
.kpis .stat-value { font-size: 1.45rem; }
.keybox { display: flex; gap: 8px; }
.meter { height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.meter > div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee); transition: width 1s cubic-bezier(.16,1,.3,1); }
.ep { display: inline-block; vertical-align: middle; margin-right: 6px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, #6366f1, #7c3aed); }
.ep.post { background: linear-gradient(135deg, #10b981, #059669); }
.doc code { font-family: var(--mono); font-size: .85em; background: var(--brand-soft); padding: 1px 5px; border-radius: 6px; }
.doc pre code { background: none; padding: 0; }
.doc pre { font-size: .8rem; overflow-x: auto; line-height: 1.55; }
.params td:first-child { font-family: var(--mono); white-space: nowrap; padding-right: 16px; }
.params td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; font-size: .88rem; }
.params tr:first-child td { border-top: 0; }
.params th { text-align: left; color: var(--faint); font-weight: 500; font-size: .8rem; padding-bottom: 6px; }

/* Admin */
.admin-layout { display: flex; flex-direction: column; gap: 22px; padding-block: 24px; }
@media (min-width: 768px) { .admin-layout { flex-direction: row; } }
.admin-nav { flex: none; }
@media (min-width: 768px) { .admin-nav { width: 224px; } .admin-nav .navbox { position: sticky; top: 80px; flex-direction: column; } }
.navbox { display: flex; gap: 4px; padding: 8px; border-radius: var(--r-lg); overflow-x: auto; }
.navlink { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 12px; font-size: .88rem; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .2s; }
.navlink:hover { color: var(--fg); }
.navlink.active { color: #fff; }
.navbox:not(.mu-tabs-ready) .navlink.active { background: #4f46e5; }
.navbox.mu-tabs-ready .mu-tab-ind { border-radius: 12px; }
.admin-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.toolbar .input { width: auto; }
.pre { font-family: var(--mono); font-size: .75rem; overflow-x: auto; white-space: pre; }
details > summary { font-size: .78rem; font-weight: 500; color: var(--brand-fg); }
.log-line { padding: 5px 0; border-bottom: 1px solid var(--line); }

/* Hilfen Unterseiten */
.hide-xs { display: inline; }
@media (max-width: 520px) { .hide-xs { display: none !important; } }
.hero-bg { position: absolute; inset: -32px -96px 0; pointer-events: none; }
.section-end { padding-bottom: 64px; }
.gap-top { margin-top: 28px; }

/* Rechtstexte: Zusatzbausteine im Dokument */
.legal-doc div > * + * { margin-top: .75rem; }
.legal-doc .callout { border-radius: var(--r-lg); padding: 14px 16px; background: rgba(254,243,199,.6); border: 1px solid rgba(245,158,11,.35); color: #78350f; }
.dark .legal-doc .callout { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.28); color: #fde68a; }
.legal-doc .table-wrap { overflow-x: auto; }
.legal-doc .fine { font-size: .85rem; color: var(--muted); }
.legal-doc .sep { border-top: 1px solid var(--line-2); padding-top: 1rem; }
.legal-doc strong, .legal-doc b { color: var(--fg); }
.mu-meteors-host { position: absolute; inset: 0; pointer-events: none; }

/* Feinschliff */
.stat-value { overflow-wrap: anywhere; }
.grid.md-c6 .stat-value { font-size: 1.25rem; }
.check.small { font-size: .82rem; }
.check.tiny { font-size: .74rem; }
.brand-label { font-weight: 800; letter-spacing: -.03em; color: #4f46e5; }
.dark .brand-label { color: #a5b4fc; }
