/* Spritlog – eigener Stil: ruhiges Werkstatt-Dashboard, hell und dunkel */
:root {
  color-scheme: light;
  --gold: #c9930a; --gold-soft: #fff3cf; --gold-ink: #6b4d00;
  --bg: #f4f5f2; --card: #ffffff; --card2: #f8f9f6; --line: #dfe2dc; --line2: #eceee9;
  --ink: #15201b; --ink2: #4a554f; --muted: #6f7a73;
  --brand: #0d7a5f; --brand-ink: #ffffff; --brand-soft: #e2f3ec; --brand-dk: #0a5f4a;
  --gelb: #f2b705; --rot: #d03b3b; --rot-soft: #fbe9e9; --ok: #0ca30c; --warn-soft: #fff4d6;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --grid: #e6e8e3; --surface: #ffffff;
  --schatten: 0 1px 2px rgba(21, 32, 27, .06), 0 4px 16px rgba(21, 32, 27, .05);
  --r: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --gold: #f2c14e; --gold-soft: #3a3016; --gold-ink: #f7d98b;
  --bg: #111513; --card: #1a201d; --card2: #1f2622; --line: #2e3833; --line2: #252d29;
  --ink: #ecf1ee; --ink2: #b7c2bc; --muted: #8d9993;
  --brand: #2fb38e; --brand-ink: #08130f; --brand-soft: #173329; --brand-dk: #4cc9a5;
  --rot: #e66767; --rot-soft: #3a1f1f; --warn-soft: #3a3118;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #2a322e; --surface: #1a201d;
  --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand-dk); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
.zahl, td.r, .kpi b { font-variant-numeric: tabular-nums; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); }
.kopf-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.marke svg { width: 30px; height: 30px; }
.marke span em { font-style: normal; color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav a { text-decoration: none; color: var(--ink2); padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.nav a:hover { background: var(--card2); color: var(--ink); }
.nav a.aktiv { background: var(--brand-soft); color: var(--brand-dk); }
.kopf-rechts { display: flex; align-items: center; gap: 8px; }
.wer { color: var(--muted); font-size: .9rem; }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--ink2); border-radius: 8px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--card2); }
.icon-btn svg { width: 18px; height: 18px; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }
.fuss { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; color: var(--muted); font-size: .85rem; display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.fuss a { color: var(--muted); }

/* Bausteine */
.karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--schatten); }
.karte + .karte { margin-top: 16px; }
.raster > .karte + .karte { margin-top: 0; }
.raster { display: grid; gap: 16px; }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.fz { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zeile.ende { justify-content: flex-end; }
.zwischen { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.leise { color: var(--muted); }
.klein { font-size: .86rem; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--card2); }
.btn.haupt { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.haupt:hover { filter: brightness(1.07); }
.btn.gefahr { color: var(--rot); border-color: color-mix(in srgb, var(--rot) 40%, var(--line)); }
.btn.gefahr:hover { background: var(--rot-soft); }
.btn.klein { padding: 5px 10px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: .8rem; color: var(--ink2); white-space: nowrap; }
.chip.gruen { background: var(--brand-soft); border-color: transparent; color: var(--brand-dk); }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.chip.rot { background: var(--rot-soft); border-color: transparent; color: var(--rot); }
.meldung { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-weight: 500; }
.meldung.fehler { background: var(--rot-soft); color: var(--rot); }
.meldung.ok { background: var(--brand-soft); color: var(--brand-dk); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 99; box-shadow: var(--schatten); max-width: calc(100% - 32px); }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi span { display: block; color: var(--muted); font-size: .82rem; }
.kpi b { display: block; font-size: 1.28rem; font-weight: 700; margin-top: 2px; }
.kpi small { color: var(--muted); }
.held { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.held small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* Fahrzeugkarten */
.fzkarte { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--schatten); transition: border-color .15s, transform .15s; }
.fzkarte:hover { border-color: var(--brand); transform: translateY(-1px); }
.fzkarte .oben { display: flex; gap: 12px; align-items: center; }
.fzicon { width: 46px; height: 46px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dk); display: grid; place-items: center; flex: none; }
.fzicon svg { width: 28px; height: 28px; }
.fzkarte h3 { margin: 0; font-size: 1.05rem; }
.fzkarte .werte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); }
.fzkarte .werte span { display: block; font-size: .75rem; color: var(--muted); }
.fzkarte .werte b { font-size: .98rem; font-variant-numeric: tabular-nums; }
.neu-karte { display: grid; place-items: center; text-align: center; min-height: 170px; border-style: dashed; color: var(--muted); box-shadow: none; }

/* Fahrzeugkopf + Reiter */
.fzkopf { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.fzkopf .fzicon { width: 54px; height: 54px; }
.fzkopf h1 { margin: 0; }
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.reiter a { padding: 10px 14px; text-decoration: none; color: var(--ink2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter a.aktiv { color: var(--brand-dk); border-bottom-color: var(--brand); }

/* Tabellen */
.tabwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line2); white-space: nowrap; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--card2); position: sticky; top: 0; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--ink); }
td.r, th.r { text-align: right; }
tbody tr:hover { background: var(--card2); }
tbody tr.klickbar { cursor: pointer; }
tr:last-child td { border-bottom: none; }
td.aktion { text-align: right; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .75rem; font-weight: 700; background: var(--card2); border: 1px solid var(--line); color: var(--ink2); }
.badge.teil { background: var(--warn-soft); border-color: transparent; }
.badge.fehlt { background: var(--rot-soft); color: var(--rot); border-color: transparent; }

/* Formulare */
.formular { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.feld { grid-column: span 6; display: flex; flex-direction: column; gap: 5px; }
.feld.s3 { grid-column: span 3; } .feld.s4 { grid-column: span 4; } .feld.s8 { grid-column: span 8; } .feld.s12 { grid-column: span 12; }
label, .lbl { font-size: .85rem; font-weight: 600; color: var(--ink2); }
.hilfe { font-size: .78rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
textarea { min-height: 70px; resize: vertical; }
.einheit { position: relative; }
.einheit input { padding-right: 52px; }
.einheit em { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: .85rem; pointer-events: none; }
.wahl { display: flex; gap: 6px; flex-wrap: wrap; }
.wahl label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--ink); background: var(--card); }
.wahl input { width: auto; margin: 0; accent-color: var(--brand); }
.wahl label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.umschalter { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.umschalter button { border: 0; background: var(--card); color: var(--ink2); padding: 6px 12px; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.umschalter button.an { background: var(--brand-soft); color: var(--brand-dk); }
.abschnitt { grid-column: span 12; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line2); }
.vorschau { grid-column: span 12; background: var(--card2); border-radius: 9px; padding: 10px 14px; color: var(--ink2); font-size: .9rem; }

/* Anmeldung */
.start { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; min-height: 70vh; }
.start .claim h1 { font-size: 2.4rem; letter-spacing: -.03em; }
.start ul { padding-left: 1.1em; color: var(--ink2); }
.start li { margin: 4px 0; }
.authkarte { max-width: 420px; width: 100%; justify-self: end; }
.authkarte form { display: grid; gap: 12px; }
.authkarte .feld { grid-column: auto; }
.authkarte .umschalter { justify-self: start; }

/* Diagramme */
.diagramm { position: relative; }
.diagramm svg { display: block; width: 100%; height: auto; overflow: visible; }
.diagramm .achse { fill: var(--muted); font-size: 11px; }
.diagramm .gitter { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .linie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .leer { fill: var(--muted); font-size: 13px; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink2); margin-bottom: 6px; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--line); box-shadow: var(--schatten); border-radius: 8px; padding: 7px 10px; font-size: .82rem; color: var(--ink); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { font-variant-numeric: tabular-nums; }
.tip .k { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.diagrammkopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.diagrammkopf h3 { margin: 0; }
.tabelle-umschalten { font-size: .8rem; }

/* Erinnerungen */
.erinnerung { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.erinnerung + .erinnerung { margin-top: 8px; }
.erinnerung .was { flex: 1 1 200px; min-width: 0; }
.erinnerung .was b { display: block; }
.status-punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Community */
.filterleiste { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filterleiste input, .filterleiste select { width: auto; min-width: 150px; }

@media (max-width: 860px) {
  .start { grid-template-columns: 1fr; min-height: 0; }
  .authkarte { justify-self: stretch; max-width: none; }
  .raster.zwei, .raster.drei { grid-template-columns: 1fr; }
  .feld, .feld.s3, .feld.s4, .feld.s8 { grid-column: span 12; }
  .feld.halb { grid-column: span 6; }
  .nav { display: none; }
  .nav-mobil { display: flex !important; }
  .wer { display: none; }
}
.nav-mobil { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.nav-mobil a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; padding: 4px 0; }
.nav-mobil a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
.nav-mobil a.aktiv { color: var(--brand-dk); }
@media (max-width: 860px) { main { padding-bottom: 90px; } .fuss { padding-bottom: 90px; } }

/* Gold, Werbung, Belege, Serviceheft */
.chip.gold, .badge.gold { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; font-weight: 700; }
.goldkarte { border: 2px solid var(--gold); background: linear-gradient(135deg, var(--gold-soft), var(--card) 60%); }
.preis { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
.preis small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.vorteile { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.vorteile li { padding-left: 28px; position: relative; }
.vorteile li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 800; }
.rechtstext { font-size: .9rem; color: var(--ink2); }
.rechtstext h3 { margin-top: 18px; }
.belege { display: flex; gap: 10px; flex-wrap: wrap; }
.beleg { position: relative; width: 110px; height: 110px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card2); display: grid; place-items: center; text-decoration: none; color: var(--ink2); font-size: .8rem; text-align: center; padding: 4px; }
.beleg img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.beleg button { position: absolute; top: 4px; right: 4px; z-index: 2; border: 0; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; width: 24px; height: 24px; cursor: pointer; }
.arbeiten { display: flex; flex-wrap: wrap; gap: 6px; }
.service { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; margin-left: 6px; }
.service + .service { margin-top: 14px; }
.service .kopfzeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.service .kopfzeile b { font-size: 1rem; }
.letzte { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.letzte div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.letzte span { display: block; font-size: .78rem; color: var(--muted); }
.sicht { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sicht label { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--ink); }
.sicht label small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.sicht label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sicht input { accent-color: var(--brand); margin-right: 6px; }
.werbung { margin: 18px 0; min-height: 0; }
.ts-box { min-height: 65px; }
@media (max-width: 860px) { .sicht { grid-template-columns: 1fr; } }

/* Passwortstärke */
.pw-staerke { margin-top: 6px; }
.pw-zeile { display: flex; align-items: center; gap: 10px; }
.pw-balken { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 140px; flex: none; }
.pw-balken i { height: 6px; border-radius: 3px; background: var(--line); }
.pw-text { font-size: .82rem; font-weight: 600; color: var(--ink2); }
.pw-tipp { margin-top: 3px; }
