/* Winterdienst – Kommunalorange auf Nachtblau, Schrift nach Straßenschildern (Barlow) */

@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url(/fonts/barlow-semi-condensed-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --night: #12233A;
  --orange: #EC7C26;      /* RAL 2011 Tieforange, die Farbe der Räumfahrzeuge */
  --orange-dk: #CF6416;
  --ice: #9CCBEA;
  --red: #D7263D;

  --bg: #EDF2F7;
  --surface: #FFFFFF;
  --surface-2: #E2E9F1;
  --text: #12233A;
  --muted: #55667B;
  --line: #CBD6E2;
  --ok: #1A734B;
  --line-strong: #76869A;
  --danger: #B3192C;
  --focus: #1F6FB2;
  --shadow: 0 1px 2px rgba(18, 35, 58, .08), 0 8px 24px rgba(18, 35, 58, .08);

  --f: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fc: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12233A; --surface: #1A3150; --surface-2: #223E62; --text: #F2F6FA; --muted: #A7B6C9;
    --line: #2C4A70; --line-strong: #6B8BB2; --ok: #5CC495; --danger: #FF7A88; --focus: #9CCBEA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12233A; --surface: #1A3150; --surface-2: #223E62; --text: #F2F6FA; --muted: #A7B6C9;
  --line: #2C4A70; --line-strong: #6B8BB2; --ok: #5CC495; --danger: #FF7A88; --focus: #9CCBEA;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 17px/1.45 var(--f); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--fc); line-height: 1.1; margin: 0; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.tnum, td { font-variant-numeric: tabular-nums; }
.boot { display: grid; place-items: center; min-height: 100dvh; color: var(--muted); }
svg { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn-xl {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 72px; padding: 14px 20px;
  border: 0; border-radius: 14px; background: var(--orange); color: var(--night);
  font: 700 26px/1.1 var(--fc); text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.btn-xl:active { background: var(--orange-dk); transform: translateY(1px); }
.btn-xl:disabled { opacity: .45; cursor: default; }
.btn-xl svg { width: 30px; height: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 16px; border: 2px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font: 600 18px/1 var(--fc); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--night); }
.btn-primary:hover { background: var(--orange-dk); border-color: var(--orange-dk); }
.btn-s { min-height: 38px; padding: 6px 12px; font-size: 16px; }
.btn-block { width: 100%; min-height: 56px; font-size: 20px; }
.btn-danger { color: var(--danger); }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.link-danger { color: var(--danger); }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
.icon-btn svg { width: 26px; height: 26px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font: 600 18px var(--fc); text-decoration: none; color: var(--muted); }
.back svg { width: 22px; height: 22px; }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font: 600 16px var(--fc); color: var(--muted); }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font-size: 17px;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--focus); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); }
.form-error { color: var(--danger); font-weight: 500; margin: 0 0 12px; }
.help { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { font: 600 18px var(--fc); padding: 0; margin-bottom: 10px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  min-height: 66px; padding: 10px 12px; border: 3px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); font: 600 20px/1.15 var(--fc); text-align: left; cursor: pointer; touch-action: manipulation;
}
.choice[aria-pressed="true"], .chip[aria-pressed="true"] {
  border-color: #CF6416; background: var(--orange); color: var(--night);
}
.veh[aria-pressed="true"] { border-color: var(--orange); box-shadow: inset 0 0 0 3px var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 46px; padding: 8px 16px; border: 3px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font: 600 18px var(--fc); cursor: pointer; touch-action: manipulation;
}
.qty { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.qty > span { font: 600 18px var(--fc); margin-right: auto; }
.qty button { width: 52px; height: 52px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); font: 700 26px var(--fc); cursor: pointer; }
.qty input { width: 84px; min-height: 52px; text-align: center; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); font: 600 20px var(--fc); }

/* ---------- Kennzeichen (österreichische Tafel) ---------- */
.plate {
  display: inline-block; padding: 1px 10px; background: #fff; color: #1a1a1a;
  border-top: 5px solid var(--red); border-bottom: 5px solid var(--red); border-radius: 5px;
  box-shadow: 0 0 0 2px #1a1a1a; font: 600 22px/1.15 var(--fc); letter-spacing: .06em; white-space: nowrap;
}
.plate-s { font-size: 15px; padding: 0 6px; border-top-width: 3px; border-bottom-width: 3px; box-shadow: 0 0 0 1.5px #1a1a1a; letter-spacing: .04em; }

/* ---------- Warnmarkierung wie am Schneepflug ---------- */
.stripe { height: 12px; background: repeating-linear-gradient(-45deg, var(--red) 0 14px, #fff 14px 28px); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--night); }
.login-box { width: min(420px, 100%); background: #1A3150; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.login-box form { padding: 28px 24px 24px; }
.login-logo { margin: 4px 0 10px; line-height: 0; }
.login-logo img { width: 200px; height: auto; }
.login-company { font: 600 18px var(--fc); color: #B9C8DA; margin-bottom: 6px; }
.login-box .help { margin-bottom: 24px; }

/* ---------- Fahrer ---------- */
.drv { max-width: 560px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.drv .field input, .drv .field textarea { min-height: 54px; font-size: 18px; }
.drv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
.drv-name { font-size: 36px; }
.drv h1 { margin-bottom: 6px; }

.btn-start {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  min-height: 46vh; padding: 24px; border-radius: 20px; background: var(--orange); color: var(--night);
  text-decoration: none; touch-action: manipulation;
}
.btn-start:active { background: var(--orange-dk); }
.btn-start svg { width: 64px; height: 64px; margin-bottom: auto; }
.btn-start strong { font: 700 44px/1 var(--fc); }
.btn-start span { font: 500 18px/1.3 var(--f); }

.section { margin-top: 32px; }
.section > h2 { margin-bottom: 12px; }
.group { background: var(--surface); border-radius: 14px; overflow: hidden; }
.group > * + * { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; align-items: center; }
.row-title { font: 600 19px var(--fc); }
.row-sub { color: var(--muted); font-size: 15px; }
.empty { padding: 20px 16px; color: var(--muted); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; margin-top: 16px; }
.note svg { width: 20px; height: 20px; margin-top: 1px; }

.vehicles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 18px 0 28px; }
.veh {
  display: grid; justify-items: start; align-content: start; gap: 12px; padding: 16px 14px; min-height: 112px;
  border: 3px solid var(--line-strong); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; touch-action: manipulation;
}
.veh-name { font: 600 20px/1.15 var(--fc); }
.veh-busy { font-size: 14px; color: var(--muted); margin-top: -6px; }
.foot { position: sticky; bottom: 0; padding: 16px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 28%); }

/* Laufender Einsatz */
.drv-active { padding-top: 0; }
.run { position: sticky; top: 0; z-index: 5; margin: 0 -16px 16px; background: var(--orange); color: var(--night); }
.run-main { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 0 16px; }
.run-label { font: 600 18px/1.1 var(--fc); }
.run-time { font: 700 44px/1 var(--fc); font-variant-numeric: tabular-nums; }
.run-side { display: flex; align-items: center; gap: 6px; }
.run-status { display: flex; align-items: center; gap: 8px; padding: 8px 16px 10px; font-weight: 500; font-size: 16px; line-height: 1.25; }
.run-status svg { width: 18px; height: 18px; }
.gps-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--night); flex-shrink: 0; }
.gps-ok .gps-dot { animation: pulse 2.4s ease-out infinite; }
.gps-bad { background: var(--night); color: #fff; }
.gps-bad .gps-dot { background: var(--red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 35, 58, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(18, 35, 58, 0); } }
.queue { margin-left: auto; white-space: nowrap; font-weight: 600; }

.nearby { margin-bottom: 16px; padding: 16px; border: 3px solid var(--orange); border-radius: 16px; background: var(--surface); }
.nearby-dist { font: 600 16px var(--fc); color: var(--muted); }
.nearby h2 { font-size: 26px; margin: 2px 0; }
.nearby p { color: var(--muted); margin-bottom: 14px; }

.list-tools { display: grid; gap: 10px; margin-bottom: 10px; }
.list-tools input[type="search"] { min-height: 54px; font-size: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg button { min-height: 46px; border: 0; border-radius: 9px; background: transparent; font: 600 19px var(--fc); cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.objlist { list-style: none; margin: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface); }
.objlist li + li { border-top: 1px solid var(--line); }
.obj { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 74px; padding: 12px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; touch-action: manipulation; }
.obj:active { background: var(--surface-2); }
.obj-main { flex: 1; min-width: 0; }
.obj-kunde { display: block; font: 600 21px/1.15 var(--fc); }
.obj-sub { display: block; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-meta { display: flex; align-items: center; gap: 4px; font: 600 18px var(--fc); color: var(--muted); white-space: nowrap; }
.obj-meta svg { width: 22px; height: 22px; }
.is-done .obj-meta { color: var(--ok); }
.end-wrap { margin-top: 28px; }

/* ---------- Sheets (Dialoge) ---------- */
dialog.sheet {
  width: 100%; max-width: 560px; max-height: 94dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 20px 20px 0 0; background: var(--bg); color: var(--text); box-shadow: var(--shadow); overflow: auto;
  overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: rgba(8, 18, 32, .6); }
dialog.sheet[open] { animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 18px; } }
.sheet-wide { max-width: 760px !important; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 10px 12px 20px; background: var(--bg); }
.sheet-head h2 { font-size: 26px; padding-top: 8px; }
.sheet-sub { color: var(--muted); margin-top: 4px; }
.sheet-body { padding: 0 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.hint svg { width: 22px; height: 22px; margin-top: 1px; }
.hint { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 18px; font-size: 16px; }
.already { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); margin-bottom: 10px; font-size: 16px; }
.photo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.photo-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.mini-map { height: 240px; border-radius: 12px; margin-bottom: 8px; border: 2px solid var(--line); }
.draw-map { height: min(460px, 60vh); border-radius: 12px; margin-bottom: 8px; border: 2px solid var(--line); }
.draw-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.draw-tools .btn[aria-pressed="true"] { background: var(--orange); color: var(--night); border-color: var(--orange-dk); }
.draw-tools .btn svg, .input-btn .btn svg { width: 18px; height: 18px; }
.input-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.obj-map { height: 260px; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px; }
.obj-map-toggle { margin-bottom: 14px; }
.obj-map-toggle summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--night); color: #F2F6FA; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: 16px; pointer-events: auto; border: 1px solid #2C4A70; }
.toast.error { background: #7E1020; border-color: #A8192F; }
.toast button { margin-left: auto; padding: 6px 4px; border: 0; background: none; color: var(--orange); font: 700 18px var(--fc); cursor: pointer; }

/* ---------- Büro ---------- */
.office { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
.office > * { min-width: 0; }
.ofc-top { display: flex; align-items: center; gap: 8px 20px; padding: 0 16px; background: var(--night); color: #F2F6FA; flex-wrap: wrap; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 22px var(--fc); text-decoration: none; padding: 10px 0; }
.brand img { display: block; height: 20px; width: auto; }
.brand-company { padding-left: 10px; border-left: 1px solid #2C4A70; color: #B9C8DA; font: 600 16px var(--fc); }
.ofc-nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ofc-nav a { padding: 18px 12px 15px; border-bottom: 3px solid transparent; color: #B9C8DA; font: 600 18px var(--fc); text-decoration: none; white-space: nowrap; }
.ofc-nav a:hover { color: #fff; }
.ofc-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }
.ofc-user { display: flex; gap: 8px; align-items: center; padding: 8px 0; }
.ofc-user .btn { background: transparent; border-color: #2C4A70; color: #F2F6FA; }
.ofc-main { padding: 24px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .ofc-top { padding: 0 12px; }
  .ofc-nav { order: 3; flex-basis: 100%; margin: 0 -12px; padding: 0 4px; }
  .ofc-nav a { padding: 10px 10px 9px; }
  .ofc-user { margin-left: auto; }
  .ofc-main { padding: 16px 12px; }
}

/* Live */
.live { display: grid; grid-template-columns: 1fr 360px; height: calc(100dvh - 60px); margin: -24px; }
.live-map { min-height: 300px; }
.live-side { overflow: auto; padding: 20px; background: var(--surface); border-left: 1px solid var(--line); }
.live-side h1 { font-size: 26px; margin-bottom: 14px; }
.act { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.act-name { font: 600 20px var(--fc); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.act-meta { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.act-sig { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.sig-ok { color: var(--ok); font-weight: 500; }
.sig-stale { color: var(--danger); font-weight: 500; }
.legend { display: grid; gap: 6px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
@media (max-width: 860px) {
  .live { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; margin: -16px -12px; }
  .live-side { border-left: 0; border-top: 1px solid var(--line); }
}

.vmark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: var(--night); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); font: 700 15px var(--fc); }
.vmark.stale { background: #8E9DB0; }
.nmark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--night); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); font: 700 13px var(--fc); }
.leaflet-container { font: 14px/1.4 var(--f); background: #dfe6ee; }
.leaflet-popup-content { font-size: 14px; }
.leaflet-popup-content strong { font-family: var(--fc); font-size: 16px; }

/* Tabellen & Filter */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .seg { min-width: 240px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { position: sticky; top: 0; padding: 10px 12px; border-bottom: 2px solid var(--line); background: var(--surface); color: var(--muted); font: 600 15px var(--fc); text-align: left; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
tr.inactive td { color: var(--muted); }
td.num, th.num { text-align: right; }
td.nowrap { white-space: nowrap; }
.thumb { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.count { color: var(--muted); font-size: 15px; margin-top: 10px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tag-ok { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); }

/* Einsatz-Detail */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; margin: 16px 0 20px; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--muted); font: 600 15px var(--fc); }
.facts dd { margin: 0; font: 600 19px var(--fc); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.detail-map { height: 520px; border-radius: 12px; border: 1px solid var(--line); position: sticky; top: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 12px; padding: 14px 16px; }
.timeline li + li { border-top: 1px solid var(--line); }
.tl-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--night); color: #fff; font: 700 13px var(--fc); }
.tl-title { font: 600 18px/1.2 var(--fc); }
.tl-time { font: 600 17px var(--fc); color: var(--muted); }
.tl-body { grid-column: 2 / -1; color: var(--muted); font-size: 15px; }
.tl-body img { margin-top: 8px; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .detail-map { position: static; height: 340px; } }

.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .ofc-top, .filters, .no-print, #toasts { display: none !important; }
  .print-only { display: block; margin-bottom: 12px; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .ofc-main { padding: 0; }
  .table-wrap { border: 0; overflow: visible; }
  th { position: static; color: #000; }
  td, th { padding: 4px 6px; }
  tr { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Menü-Zeilen */
.menu .row { width: 100%; min-height: 58px; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; display: flex; }
.menu .row:active { background: var(--surface-2); }
.menu .row-check { justify-content: space-between; align-items: center; gap: 16px; }
.menu .row-check input { width: 24px; height: 24px; flex-shrink: 0; accent-color: var(--orange); }

/* Tracking-App-Einstellungen */
.trk { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.trk-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.trk-row > span { grid-column: 1 / -1; color: var(--muted); font: 600 15px var(--fc); }
.trk code { font: 500 15px/1.3 ui-monospace, 'SF Mono', Menlo, monospace; word-break: break-all; }
.trk .trk-id { font-size: 20px; letter-spacing: .08em; }
.trk .help { margin: 0; }
.trk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.trk-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin: 8px 0; }
.trk-qr img { background: #fff; border-radius: 8px; padding: 4px; }
@media (max-width: 520px) { .trk-qr { grid-template-columns: 1fr; } }
