/* Tankkladde – Markenfarben (Petrol) für das West-Labs-Design-Kit 2, Stil stil-klar, und Bausteine der App.
   Kontraste gemessen (WCAG): --marke auf Weiß 7,52:1, auf --flaeche 6,92:1, auf --marke-hell 6,45:1;
   --marke-dunkel auf Weiß 10,92:1; --text-leise auf --flaeche 6,98:1. */
:root {
  --marke: #0b5d6b;
  --marke-dunkel: #08434e;
  --marke-hell: #e3f0f2;
  --akzent: #e0a526;          /* nur Fokusrahmen, nie Text */
  --flaeche: #f3f6f7;
  --abstand: clamp(1.5rem, 4vw, 2.5rem);
}

[hidden] { display: none !important; }
.kopf .wrap { min-height: 56px; }
.logo svg { width: 30px; height: 30px; }
.kopf select { width: auto; max-width: 11rem; min-height: 44px; padding: .4rem .6rem; font-size: .95rem; }
.kopf-fahrzeug { display: flex; align-items: center; gap: .5rem; }
.kopf-fahrzeug label { margin: 0; font-size: .9rem; font-weight: 600; }

.tb-titel { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: .25rem; }
.tb main h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); margin-bottom: .75rem; }

/* Aufbau: am Handy untereinander, ab 960 px zwei Spalten */
.tb-raster { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); margin-top: 1rem; }
.tb-spalte { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
@media (min-width: 960px) { .tb-raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem; } }
.tb .karte { padding: clamp(1rem, 3vw, 1.5rem); min-width: 0; scroll-margin-top: 72px; }

/* Kennzahlen */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem; margin: 0; }
.kennzahl { background: var(--marke-hell); border-radius: var(--radius); padding: .8rem 1rem; margin: 0; min-width: 0; }
.kennzahl dt { font-size: .85rem; color: var(--text-leise); font-weight: 600; }
.kennzahl dd { margin: 0; }
.kennzahl-wert { font-family: var(--schrift-kopf); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); font-weight: 700; line-height: 1.2; color: var(--marke-dunkel); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kennzahl-einheit { font-size: .85rem; color: var(--text-leise); }

/* Formular */
.tb-form .feld { margin-bottom: .9rem; min-width: 0; }
.feld-paar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.tb-form input[type="date"] { padding-inline: .55rem .35rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tb-form input[type="date"]::-webkit-calendar-picker-indicator { margin-inline-start: 2px; padding: 0; }
.feld-hilfe { font-size: .85rem; color: var(--text-leise); margin: .25rem 0 0; }
.feld-fehler { font-size: .88rem; color: var(--fehler); margin: .25rem 0 0; font-weight: 600; }
input[aria-invalid="true"] { border-color: var(--fehler); }
.haken { display: flex; align-items: center; gap: .6rem; min-height: 48px; }
.haken input { width: 1.4rem; height: 1.4rem; min-height: 0; margin: 0; accent-color: var(--marke); flex: none; }
.haken label { margin: 0; }
.knoepfe .btn { flex: 1 1 auto; }
.btn-klein { min-height: 44px; padding: .5rem .9rem; font-size: .95rem; }
.btn-gefahr { color: var(--fehler); border-color: #e7b9b4; }
.btn-gefahr:hover { color: #fff; background: var(--fehler); border-color: var(--fehler); }
.meldung { margin: .75rem 0 0; font-weight: 600; color: var(--erfolg); min-height: 1.4em; }
.meldung.fehler { color: var(--fehler); }

/* Listen der Tankungen */
.tb-liste { list-style: none; padding: 0; margin: 0; max-width: none; }
.tb-liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; padding: .75rem 0; border-bottom: 1px solid var(--linie); align-items: center; }
.tb-liste li:last-child { border-bottom: 0; }
.tb-zeile1 { font-weight: 650; font-variant-numeric: tabular-nums; }
.tb-zeile2 { font-size: .9rem; color: var(--text-leise); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tb-wert { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-wert strong { display: block; color: var(--marke-dunkel); }
.tb-wert span { font-size: .85rem; color: var(--text-leise); }
.tb-aktionen { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
.tb-teil { display: inline-block; font-size: .78rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #fff6e5; color: #7a4800; margin-left: .35rem; vertical-align: 1px; }
.tb-liste li.warn .tb-zeile1::after { content: " ⚠"; color: var(--warnung); }

/* Diagramme */
.tb-diagramm-box { margin: 0 0 1.25rem; min-width: 0; }
.tb-diagramm-box:last-child { margin-bottom: 0; }
.tb-diagramm-box figcaption { font-weight: 650; margin-bottom: .35rem; }
.tb-diagramm { display: block; max-width: 100%; height: auto; overflow: visible; }
.tb-gitter { stroke: var(--linie); stroke-width: 1; }
.tb-achse { fill: var(--text-leise); font-size: 12px; font-family: var(--schrift-text); font-variant-numeric: tabular-nums; }
.tb-linie { fill: none; stroke: var(--marke); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tb-punkt { fill: var(--marke); stroke: #fff; stroke-width: 2; }
.tb-mittel { stroke: var(--text-leise); stroke-width: 1.25; stroke-dasharray: 5 4; }
.tb-mittel-text { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--schrift-text); paint-order: stroke; stroke: #fff; stroke-width: 4px; }

.leer-zustand ol { padding-left: 1.25rem; margin-bottom: 0; }
.leer-zustand li { margin-bottom: .35rem; }
details.tb-details summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
details.tb-details[open] summary { margin-bottom: .5rem; }
.tb .tabelle-scroll table { font-size: .93rem; }
.tb .tabelle-scroll th, .tb .tabelle-scroll td { padding: .55rem .5rem; }
.tb td.zahl, .tb th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rechtstext .abschnitt { padding-block: clamp(2rem, 5vw, 3.5rem); }
.rechtstext h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); }
.rechtstext h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.karte label.btn:has(+ input:focus-visible) { outline: 3px solid var(--akzent); outline-offset: 2px; }
