/* Streife NFC – Handy-Ansicht (dunkel, große Bedienelemente für den Nachtdienst) */
:root {
  --bg: #0f141b; --surface: #1a222d; --surface2: #141b24; --line: #2a3441;
  --text: #eef2f6; --text2: #c9d2dc; --muted: #9aa7b5;
  --amber: #f5b021; --amber-dark: #2b2210; --on-amber: #1a1200; /* nur für Warnungen */
  --accent: #c8102e; --accent-t: #ff5c66; --accent-bg: #3a1216; --on-accent: #ffffff; /* Firmenfarbe Rot */
  --green: #17784f; --green-l: #3ecf8e; --green-t: #7fe0ae; --green-bg: #16301f;
  --red: #ff8a7a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent-t); }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; line-height: 1.5; }
.screen { min-height: 100vh; min-height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.pad { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.pad-top { padding: 12px 20px 8px; display: flex; flex-direction: column; gap: 6px; }
.login { padding-top: 56px; gap: 18px; }
.grow { flex-grow: 1; }
.grow1 { flex-grow: 1; min-width: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.strong { font-weight: 600; }
.sub { font-size: 14px; color: var(--muted); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--accent-t); }
.tb-title { font-family: var(--display); font-weight: 700; font-size: 20px; }
.w100 { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.card.row { flex-direction: row; gap: 12px; align-items: center; }
.row-between { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.lbl { font-size: 13px; color: var(--muted); }
.big { font-size: 20px; font-weight: 600; }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--accent-bg); color: #ffc2c6; font-size: 15px; }
.alert-box { padding: 12px 14px; border-radius: 12px; background: #3a1714; color: #ffc2b8; font-size: 15px; }

/* Formular */
.field { font-size: 15px; font-weight: 600; color: var(--text2); border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 10px; }
.drivers { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.driver input { position: absolute; opacity: 0; pointer-events: none; }
.driver span { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px; text-align: center; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-size: 16px; font-weight: 600; cursor: pointer; }
.driver input:checked + span { border-color: var(--accent-t); background: var(--accent-bg); color: var(--accent-t); }
.driver input:focus-visible + span { outline: 3px solid var(--accent-t); outline-offset: 2px; }
.pin { height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 28px; letter-spacing: 0.4em; padding: 0 16px; width: 100%; }
textarea { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 17px; padding: 12px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent-t); outline-offset: 1px; }

/* Buttons */
.btn-big { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 60px; border-radius: 14px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-big:disabled { opacity: 0.6; }
.btn-sec { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 600; text-decoration: none; }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: 12px; }

/* Kopfzeile */
.topline { display: flex; justify-content: space-between; align-items: center; padding: calc(16px + env(safe-area-inset-top)) 20px 4px; }
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 12px 0; }
.online { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--green-bg); color: var(--green-t); font-size: 13px; font-weight: 600; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-l); }
.online.off { background: #3a1714; color: #ffc2b8; }
.online.off i { background: var(--red); }
.toast { margin: 12px 20px 0; padding: 12px 14px; border-radius: 12px; background: var(--green-bg); color: #9ff0c6; font-size: 15px; display: flex; gap: 10px; align-items: center; }

/* Bereit */
.ready { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 16px 24px; }
.ring-wrap { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent-t); animation: ring 2s ease-out infinite; }
.ring.r2 { animation-delay: 1s; }
.ring-core { width: 136px; height: 136px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent-t); }
@keyframes ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; opacity: .4; } }
.ready .center { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.bar div { height: 8px; background: var(--accent); border-radius: 4px; }

/* Ergebnis */
.res-head { padding: calc(56px + env(safe-area-inset-top)) 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.res-head.ok { background: var(--green); color: #fff; }
.res-head.warn { background: var(--amber); color: var(--on-amber); }
.res-icon { width: 88px; height: 88px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.16); }
.res-head.warn .res-icon { background: rgba(26,18,0,.12); }
.res-head h1 { font-size: 30px; }
.res-time { font-family: var(--mono); font-size: 40px; font-weight: 500; }
.res-sub { font-size: 15px; opacity: .9; }
.gps-ico { color: var(--green-l); display: flex; }
.gps-ico.warn { color: var(--amber); }
.gps-ico.grau { color: var(--muted); }

/* Notiz */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.chip-btn:active { background: var(--accent-bg); }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-add { width: 96px; height: 96px; border-radius: 12px; border: 1px dashed #6f7c8a; color: var(--text2); font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.photo-thumb { width: 96px; height: 96px; border-radius: 12px; background: var(--line) center / cover no-repeat; color: var(--muted); font-size: 12px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }

/* Meine Runde */
.list { padding: 8px 20px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.list-item { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--green-l); } .dot-warn { background: var(--amber); } .dot-rot { background: var(--red); } .dot-grau { background: #6f7c8a; }
.state { font-size: 14px; font-weight: 600; text-align: right; white-space: nowrap; }
.state-ok { color: var(--green-t); } .state-warn { color: var(--amber); } .state-rot { color: var(--red); } .state-grau { color: var(--muted); }

/* Tab-Leiste */
.tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: #121922; padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); }
.tabbar a { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.tabbar a.on { color: var(--accent-t); }

/* Marke & Hinweise */
.brandline { display: flex; flex-direction: column; gap: 4px; }
.support { font-size: 12px; color: #7d8a98; letter-spacing: 0.02em; }
.credit { text-align: center; font-size: 12px; color: #6f7c8a; padding: 8px 0 4px; line-height: 1.6; }
