/* LRS – gemeinsames Design-System (Leitstelle, Piloten-Client, Toolbar-Panel)
   Farb-Tokens · 8-px-Raster · Barlow Condensed (Überschriften) + Inter (Text) · Hell/Dunkel */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url('../fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  /* --- Design-Tokens (dunkel, Standard) --- */
  --bg: #15171c;
  --surface: #22252c;
  --surface-2: #2b2f37;
  --surface-3: #343943;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #f2f3f5;
  --muted: #9aa0aa;
  --accent: #e10600;
  --accent-hover: #ff2a1f;
  --accent-glow: rgba(225, 6, 0, .35);
  --accent-soft: rgba(225, 6, 0, .14);
  --accent-text: #ff6b63;
  --success: #2ecc71;
  --success-soft: rgba(46, 204, 113, .14);
  --danger: #ff4d4d;
  --warn: #f5b041;
  --info: #4ea8de;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow: 0 16px 48px rgba(0, 0, 0, .5);
  --scrim: rgba(8, 9, 12, .6);
  --r-card: 14px;
  --r-map: 12px;
  --r-badge: 6px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: 'Cascadia Mono', Consolas, 'Roboto Mono', ui-monospace, monospace;
  /* --- Kompatibilität: ältere Variablennamen (Disposition, Admin, Piloten-Client) --- */
  --bg-2: #1a1d22;
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --panel-3: var(--surface-3);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text-2: #c3c8d0;
  --accent-2: #b30500;
  --ok: var(--success);
  --orange: #e67e22;
  --radius: 8px;
  --radius-lg: var(--r-card);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --surface-3: #e2e5ea;
  --border: rgba(15, 20, 30, .09);
  --border-strong: rgba(15, 20, 30, .18);
  --text: #15171c;
  --muted: #5d6470;
  --accent-text: #c00500;
  --success: #1e9e57;
  --danger: #d62828;
  --shadow-card: 0 8px 24px rgba(20, 25, 35, .08);
  --shadow: 0 16px 48px rgba(20, 25, 35, .18);
  --scrim: rgba(30, 34, 42, .35);
  --bg-2: #f7f8fa;
  --line: rgba(15, 20, 30, .1);
  --line-2: rgba(15, 20, 30, .18);
  --text-2: #3b414b;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
#root { height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; transition: background-color .2s var(--ease), color .2s var(--ease); }
a { color: var(--accent-text); }
h1, h2, h3, h4 { margin: 0; }
h1, .h1 { font: 800 clamp(48px, 6vw, 72px)/0.95 var(--display); text-transform: uppercase; letter-spacing: .02em; }
h2, .h2 { font: 800 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
h3 { font: 600 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
h4 { font: 700 15px var(--font); }
.title-2c em, h1 em, h2 em { color: var(--accent); font-style: normal; }
.label { font: 600 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.gap { gap: 8px; } .gap-lg { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Formulare ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
label.field > span { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.input, select.input, textarea.input {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; font: inherit; width: 100%; outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 120px; }
.input.sm { padding: 6px 10px; min-height: 34px; font-size: 13px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text-2); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Buttons ----------
   .btn          kompakt, rechteckig (dichte Arbeitsflächen wie die Disposition)
   .btn-primary  rot, schräg geschnitten mit Glow · .btn-outline schräg mit Rand · Text bleibt gerade */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; min-height: 36px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  font: 600 13px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary, .btn-outline {
  background: transparent; border: none; border-radius: 0; min-height: 44px; padding: 0 28px;
  font: 700 16px var(--display); text-transform: uppercase; letter-spacing: .08em;
}
.btn-primary::before, .btn-outline::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg); border-radius: 3px; transition: inherit; }
.btn-primary { color: #fff; }
.btn-primary::before { background: linear-gradient(180deg, #f2160f, var(--accent)); box-shadow: 0 0 24px var(--accent-glow); }
.btn-primary:hover { background: transparent; transform: translateY(-2px); }
.btn-primary:hover::before { background: var(--accent-hover); box-shadow: 0 0 32px var(--accent-glow); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-outline { color: var(--text); }
.btn-outline::before { border: 1px solid var(--border-strong); }
.btn-outline:hover { background: transparent; transform: translateY(-2px); }
.btn-outline:hover::before { border-color: var(--muted); background: var(--surface-2); }
.btn-primary:disabled:hover, .btn-outline:disabled:hover { transform: none; }
.btn-danger { background: transparent; border-color: var(--accent); color: var(--accent-text); }
.btn-danger:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 12px; }
.btn-primary.btn-sm, .btn-outline.btn-sm { min-height: 34px; padding: 0 18px; font-size: 14px; }
.btn-lg { padding: 12px 22px; min-height: 48px; font-size: 15px; }
.btn-primary.btn-lg, .btn-outline.btn-lg { min-height: 52px; padding: 0 36px; font-size: 18px; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; border-radius: var(--radius); }
.btn-icon:hover { color: var(--text); background: var(--surface-2); }
.btn-round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s var(--ease), transform .15s var(--ease); }
.btn-round:hover { background: var(--surface-3); transform: rotate(90deg); }

/* ---------- Badges, Punkte, Status ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-badge); font: 700 11px/1.6 var(--font); text-transform: uppercase; letter-spacing: .06em; background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); white-space: nowrap; }
.badge-red { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(225, 6, 0, .45); }
.badge-green { background: var(--success-soft); color: var(--success); border-color: rgba(46, 204, 113, .4); }
.badge-blue { background: rgba(78, 168, 222, .12); color: var(--info); border-color: rgba(78, 168, 222, .4); }
.badge-yellow { background: rgba(245, 176, 65, .12); color: var(--warn); border-color: rgba(245, 176, 65, .4); }
.badge-grey { color: var(--muted); }
.prio-1 { color: #ff6b6b; } .prio-2 { color: #f5b041; } .prio-3 { color: #7fb8e0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.on { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot.off { background: #6b717b; }
.dot.warn { background: var(--warn); }
.dot.red { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.pts-plus { color: var(--success); } .pts-minus { color: var(--danger); } .pts-zero { color: var(--muted); }
.status-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 6px; font: 700 16px var(--mono); color: #111; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.status-chip.sm { min-width: 24px; height: 24px; font-size: 13px; }
.status-chip.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { filter: brightness(.45); } }
.avatar { border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); flex: none; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); font-weight: 700; }

/* Fortschrittsbalken: 10 px, abgerundet, animiert */
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #a00400, var(--accent) 60%, #ff3b30); box-shadow: 0 0 12px var(--accent-glow); transition: width .6s ease-out; }
.progress.green > i { background: linear-gradient(90deg, #1e8f4f, var(--success)); box-shadow: none; }

/* ---------- Karten, Seiten, Zustände ---------- */
.page { padding: var(--s4) var(--s3) var(--s6); max-width: 1200px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--border); min-height: 56px; }
.card-head h2 { font-size: 22px; }
.card-body { padding: 24px; }
.cards { display: grid; gap: var(--s3); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state svg.i { width: 40px; height: 40px; stroke-width: 1.5; color: var(--surface-3); }
.empty-state b { color: var(--text); font: 700 20px var(--display); text-transform: uppercase; letter-spacing: .04em; }
.error-box { background: var(--accent-soft); border: 1px solid rgba(225, 6, 0, .45); color: var(--accent-text); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.error-state { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; min-height: 14px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.stagger > * { animation: rise .25s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.offline-bar { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 2500; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: var(--surface); border: 1px solid rgba(245, 176, 65, .5); color: var(--warn); font-weight: 600; font-size: 13px; box-shadow: var(--shadow-card); }

/* ---------- Tabellen und Listen ---------- */
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table.tall td { height: 56px; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td, .table tbody tr:hover td { background: var(--surface-2); }
.table tr.selected td { background: var(--accent-soft); }
.table tr.dim td { opacity: .55; }

/* ---------- Tabs / Segmente ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab { background: none; border: none; color: var(--muted); padding: 12px 16px; font: 700 15px var(--display); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 10px; }
.seg button { border: none; background: none; color: var(--muted); font: 700 14px var(--display); text-transform: uppercase; letter-spacing: .08em; padding: 6px 14px; border-radius: 7px; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }

/* ---------- Anmeldung ---------- */
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.auth-wrap { min-height: 100%; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border);
  background: radial-gradient(circle at 80% 20%, rgba(225, 6, 0, .22), transparent 45%), linear-gradient(160deg, #1d2027, #121418 70%); color: #f2f3f5; }
.auth-hero h1 { max-width: 620px; font-size: clamp(44px, 5vw, 64px); }
.auth-hero ul { color: #c3c8d0; padding-left: 18px; line-height: 2; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 440px; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-pick input { display: none; }
.role-pick label { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; font-size: 13px; color: var(--text-2); background: var(--bg-2); }
.role-pick input:checked + label { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 40px; height: 40px; }
.brand b { font: 800 24px/1 var(--display); letter-spacing: .06em; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- App-Hülle: Navigation oben ---------- */
.shell { min-height: 100%; display: grid; grid-template-rows: 64px 1fr; grid-template-columns: minmax(0, 1fr); }
.shell.fill { height: 100%; }
.topbar { position: sticky; top: 0; z-index: 1500; display: flex; align-items: center; gap: 24px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--muted); text-decoration: none; font: 700 16px var(--display); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; transition: color .15s var(--ease); }
.nav a svg.i { display: none; }
.nav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .2s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after { transform: scaleX(1); box-shadow: 0 0 12px var(--accent-glow); }
.topbar .spacer { flex: 1; }
.sim-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); font: 600 12px var(--font); color: var(--muted); white-space: nowrap; }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; color: var(--text); font: 600 14px var(--font); position: relative; }
.user-pill:hover { background: var(--surface-2); }
.user-pill .who { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-pill .who small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 1600; animation: rise .15s var(--ease); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none; color: var(--text); font: 500 14px var(--font); text-decoration: none; border-radius: 8px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.mode-pill { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; font-weight: 600; }
.mode-pill.ai { border-color: rgba(78, 168, 222, .5); }
.mode-pill.human { border-color: rgba(46, 204, 113, .5); }
.clock { font: 700 20px var(--display); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font: 500 11px var(--font); margin-left: 6px; }
.content { min-height: 0; }
.shell.fill .content { overflow: hidden; }

/* ---------- Übersicht ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; min-height: 420px; margin-bottom: 48px; }
.hero-status { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.hero-status span { display: inline-flex; align-items: center; gap: 8px; }
.hero-status a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.hero-status a:hover { color: var(--accent-text); }
.hero h1 { font-size: clamp(56px, 7vw, 96px); }
.hero .rank { font: 800 clamp(26px, 3vw, 36px)/1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-top: 4px; }
.hero .who { display: flex; align-items: center; gap: 14px; margin: 24px 0 8px; }
.hero .who b { font: 700 22px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.hero .last { color: var(--muted); margin: 0 0 20px; max-width: 560px; }
.hero .prog-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.hero .prog-line b { color: var(--text); }
.hero .actions { display: flex; gap: 20px; margin: 28px 0 32px; flex-wrap: wrap; padding-left: 6px; }
.statbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); padding-top: 20px; gap: 16px; }
.statbar div b { display: block; font: 800 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.statbar div span { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.hero-art { position: relative; align-self: stretch; min-height: 380px; }
.hero-art .frame { position: absolute; inset: 0 0 0 8%; clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); border-radius: 0 var(--r-card) var(--r-card) 0; overflow: hidden; background: radial-gradient(circle at 70% 30%, #3a3f4a, #1a1d23 70%); }
:root[data-theme="light"] .hero-art .frame { background: radial-gradient(circle at 70% 30%, #dfe3ea, #b9c0cc 75%); }
.hero-art .frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .stripe { position: absolute; top: -4%; bottom: -4%; width: 10px; background: var(--accent); transform: skewX(-24deg); box-shadow: 0 0 24px var(--accent-glow); }
.hero-art .stripe.s1 { left: 6%; } .hero-art .stripe.s2 { left: calc(6% + 22px); width: 4px; opacity: .8; }
.lvl-ring { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.lvl-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.lvl-ring .lv { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font: 800 13px/22px var(--display); text-align: center; border: 2px solid var(--bg); }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }

/* Einsatzzeilen (Liste) */
.m-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s var(--ease); }
.m-row:last-child { border-bottom: none; }
.m-row:hover { background: var(--surface-2); }
.m-row .t { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row .s { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.m-row .score { font: 800 32px/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; min-width: 56px; }
.m-row .score small { display: block; font: 600 11px var(--font); color: var(--muted); letter-spacing: .1em; }
.score.good { color: var(--success); } .score.mid { color: var(--text); } .score.low { color: var(--danger); } .score.none { color: var(--muted); }
.m-row.dim { opacity: .6; }

/* Abzeichen */
.badge-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 0; }
.medal { position: relative; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.medal svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.medal .core { width: 100px; height: 100px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #4a505c, #23262d 70%); border: 2px solid rgba(255, 255, 255, .12); box-shadow: inset 0 2px 8px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .4); color: #f2f3f5; }
.medal .core svg.i { width: 30px; height: 30px; color: var(--accent); }
.medal .core b { font: 800 13px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; max-width: 84px; }
.medal.locked { filter: grayscale(1); opacity: .45; }
.medal.sm { width: 104px; height: 104px; } .medal.sm .core { width: 78px; height: 78px; } .medal.sm .core svg.i { width: 24px; height: 24px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.badge-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 16px; }
.badge-tile h4 { font: 800 18px var(--display); text-transform: uppercase; letter-spacing: .04em; }
.kv-list { width: 100%; display: grid; gap: 10px; margin-top: 8px; }
.kv-list div { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; font-size: 14px; }
.kv-list span { color: var(--muted); }

/* Bestenliste */
.lb-row { display: grid; grid-template-columns: 48px auto minmax(0, 1fr) repeat(3, 96px); gap: 16px; align-items: center; height: 64px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.lb-row:hover { background: var(--surface-2); }
.lb-row .rk { font: 800 26px var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.lb-row.top .rk { color: var(--accent); }
.lb-row.me { background: var(--accent-soft); }
.lb-row .n { font-weight: 700; }
.lb-row .c { text-align: right; font: 700 20px var(--display); font-variant-numeric: tabular-nums; }
.lb-row .c small { display: block; font: 600 10px var(--font); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.lb-head { height: 44px; } .lb-head .c, .lb-head span { font: 600 11px var(--font); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

/* Einsatz-Detail (großes Fenster) */
.modal.detail { max-width: 1100px; }
.detail .modal-body { padding: 32px; }
.d-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.d-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1; }
.d-head .sub { color: var(--muted); font-size: 14px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.d-total { display: flex; align-items: flex-start; gap: 20px; }
.d-total .big { font: 800 72px/0.9 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.d-total .big small { display: block; font: 600 12px var(--font); letter-spacing: .12em; color: var(--muted); margin-top: 6px; }
.d-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0 24px; }
.d-score { padding: 20px 24px; }
.d-score .row { justify-content: space-between; margin-bottom: 12px; }
.d-score b { font: 800 28px var(--display); font-variant-numeric: tabular-nums; }
.d-score b small { color: var(--muted); font-size: 18px; }
.d-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 20px 24px; margin-bottom: 24px; }
.d-info div span { display: block; }
.d-info div b { font-weight: 600; }
.d-info .warn { color: var(--danger); font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.d-map { position: relative; height: 380px; border-radius: var(--r-map); overflow: hidden; border: 1px solid var(--border); }
.d-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.d-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; margin-right: 6px; vertical-align: -1px; }
.tl { position: relative; padding-left: 24px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
.tl .e { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding: 10px 0; align-items: baseline; }
.tl .e::before { content: ''; position: absolute; left: -23px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.tl .e.on::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.tl .e .d { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tl .e .t { font-variant-numeric: tabular-nums; font-weight: 600; }
.pv { max-height: 420px; overflow: auto; }
.pv-row { display: grid; grid-template-columns: 56px 84px minmax(0, 1fr) 72px; gap: 16px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.pv-row:last-child { border-bottom: none; }
.pv-row .tm { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.pv-row .tx small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pv-row .pt { text-align: right; font: 800 22px var(--display); font-variant-numeric: tabular-nums; }
.pv-row.hint { opacity: .6; }
.pv-row.hint .pt { font: 600 11px var(--font); letter-spacing: .12em; color: var(--muted); }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 12px; }
.sec-title h2 { font-size: 22px; }

/* Dienst & Fahrzeug */
.duty-card section { padding: 24px; border-bottom: 1px solid var(--border); }
.duty-card section:last-child { border-bottom: none; }
.duty-card h3 { margin-bottom: 12px; }
.duty-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.duty-line .v { font-weight: 600; }
.duty-actions { display: flex; flex-wrap: wrap; gap: 20px; padding-left: 6px; }
.version { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; font-variant-numeric: tabular-nums; }

/* ---------- Leitstelle ---------- */
/* Feste Zonen wie im Leitstellenbetrieb: Kopfleiste · Einsätze links · Karte Mitte · Einheiten rechts · Protokoll/Funk unten */
.dispatch { --lst-c1: 360px; --lst-c3: 400px; --lst-bottom: 210px;
  height: 100%; display: grid; grid-template-columns: var(--lst-c1) minmax(0, 1fr) var(--lst-c3); grid-template-rows: auto minmax(0, 1fr) minmax(0, .9fr) var(--lst-bottom); gap: 1px; background: var(--line); }
.dispatch > section { background: var(--panel); min-height: 0; display: flex; flex-direction: column; }
.dispatch .lst-bar { grid-column: 1 / -1; grid-row: 1; }
.dispatch .map-area { grid-column: 2; grid-row: 2 / span 2; position: relative; }
.dispatch .missions { grid-column: 1; grid-row: 2 / span 3; }
.dispatch .units { grid-column: 3; grid-row: 2 / span 2; }
.dispatch .radio { grid-column: 3; grid-row: 4; }
.dispatch .log { grid-column: 2; grid-row: 4; }

/* Kopfleiste */
.lst-bar { display: flex; align-items: center; gap: 14px; padding: 6px 14px; background: var(--bg-2); min-height: 52px; }



.lst-counters { display: flex; gap: 6px; }
.lst-count { display: flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; font: 600 12px var(--font); }
.lst-count b { font: 700 18px var(--mono); color: var(--text); }
.lst-count:hover { border-color: var(--border-strong); background: var(--surface-2); }
.lst-count.hot { border-color: var(--warn); color: var(--warn); }
.lst-count.hot b { color: var(--warn); }
.lst-count.alarm { background: #b91c1c; border-color: #ff5252; color: #fff; animation: pulse 1s infinite; }
.lst-count.alarm b { color: #fff; }
.lst-keys { display: flex; gap: 14px; margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); font: 600 10.5px var(--mono); color: var(--text-2); text-align: center; }

/* Einsatzliste */
.seg.sm { padding: 3px; gap: 2px; }
.seg.sm button { font-size: 12px; padding: 4px 9px; }
.lst-search { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.lst-search .input { width: 100%; }
.prio-tag { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; font: 700 11px var(--mono); color: #fff; vertical-align: 1px; }
.prio-tag.p1 { background: #d63a3a; }
.prio-tag.p2 { background: #c77d12; }
.prio-tag.p3 { background: #3b7fae; }

/* Einheiten: Sprechwunsch-Warteschlange und FMS-Übersicht */
.sw-queue { display: flex; flex-direction: column; gap: 1px; }
.sw-queue:empty { display: none; }
.sw-queue .alert { border-radius: 0; box-shadow: none; padding: 8px 10px; flex-wrap: wrap; row-gap: 6px; }
.sw-queue .alert .grow { min-width: 55%; }
.sw-queue .alert small { font-weight: 500; opacity: .8; margin-left: 6px; }
.sw-queue .alert.s5 { background: rgba(241, 196, 15, .16); color: var(--text); border-left: 4px solid #f1c40f; }
.sw-queue .alert.s0 { border-left: 4px solid #fff; }
.fms-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fms-tile { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 3px 0 2px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; position: relative; overflow: hidden; }
.fms-tile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.fms-tile b { font: 700 15px var(--mono); margin-top: 3px; }
.fms-tile span { font: 600 11px var(--font); color: var(--muted); }
.fms-tile.zero { opacity: .45; }
.fms-tile.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.units-table td { vertical-align: middle; }

/* Geführte Einsatzmaske */
.wizard fieldset, .form-stack fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wizard fieldset[hidden] { display: none; }
.wz-steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.wz-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; min-width: 0; }
.wz-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-steps li b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface-3); font: 700 12px var(--mono); color: var(--text-2); }
.wz-steps li.on { color: var(--text); border-bottom-color: var(--accent); }
.wz-steps li.on b { background: var(--accent); color: #fff; }
.wz-steps li.done b { background: var(--success); color: #111; }
.wz-help { margin: 0; color: var(--muted); font-size: 13px; }
.wz-kv { font-size: 14px; }
.wz-nav [hidden] { display: none; }
#log-filter { width: 220px; max-width: 45%; }
.dispatch .log .panel-head, .dispatch .units .panel-head { flex-wrap: nowrap; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 44px; background: var(--panel); }
.panel-body { flex: 1; overflow: auto; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg-2); }
.map-tools { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; flex-direction: column; gap: 6px; }
.map-tools .btn { background: rgba(33, 36, 41, .92); backdrop-filter: blur(4px); }
.map-legend { position: absolute; left: 10px; bottom: 10px; z-index: 500; background: rgba(33, 36, 41, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font-size: 11px; color: var(--text-2); display: flex; gap: 12px; }
.map-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 600; background: var(--accent); color: #fff; padding: 6px 14px; border-radius: 99px; font-weight: 600; box-shadow: var(--shadow); }

.mission-card { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 3px solid transparent; }
.mission-card:hover { background: rgba(255, 255, 255, .025); }
.mission-card.sel { background: var(--accent-soft); }
.mission-card.p1 { border-left-color: #ff5c5c; }
.mission-card.p2 { border-left-color: #f5a623; }
.mission-card.p3 { border-left-color: #5dade2; }
.mission-card .kw { font-weight: 700; font-size: 13.5px; }
.mission-card .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.mission-card.state-new { background: linear-gradient(90deg, rgba(214, 58, 58, .12), transparent 60%); }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.radio-list { flex: 1; overflow: auto; padding: 6px 10px; font-size: 12.5px; }
.radio-msg { padding: 4px 0; border-bottom: 1px dashed rgba(255, 255, 255, .05); display: grid; grid-template-columns: 58px 1fr; gap: 6px; }
.radio-msg .t { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.radio-msg .f { font-weight: 700; color: var(--text); }
.radio-msg.k-status .f { color: #9fb7cf; }
.radio-msg.k-system { color: var(--muted); font-style: italic; }
.radio-msg.k-sds .f::before { content: 'SDS '; color: var(--accent); font-size: 10px; font-weight: 700; }
.radio-compose { display: grid; grid-template-columns: 120px 1fr auto; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }

.log-list { flex: 1; overflow: auto; font: 12px/1.6 var(--mono); padding: 6px 12px; }
.log-list .l { display: grid; grid-template-columns: 70px 110px 1fr; gap: 10px; color: var(--text-2); }
.log-list .l .n { color: #e8a0a0; cursor: pointer; }
.log-list .l.k-alarm { color: #ffb36b; }
.log-list .l.k-cancel { color: #ff8a8a; }
.log-list .l.k-complete { color: #6fe3a1; }

.alerts { position: absolute; top: 10px; left: 10px; z-index: 600; display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; }
.alert.s0 { background: #b91c1c; color: #fff; animation: pulse 1s infinite; }
.alert.s5 { background: #1f5f8b; color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 45, 45, .25); } }

/* Karten-Marker */
.mk-unit { display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.mk-unit .ic { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #111; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.mk-unit .ic svg { width: 18px; height: 18px; }
.mk-unit .lb { margin-top: 2px; background: rgba(17, 19, 21, .9); color: #fff; font: 700 10.5px var(--font); padding: 1px 5px; border-radius: 3px; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .15); }
.mk-unit.offline .ic { opacity: .55; }
.mk-station { width: 14px; height: 14px; background: #2a2f36; border: 2px solid #c9ced6; border-radius: 3px; transform: rotate(45deg); }
.mk-hosp { width: 18px; height: 18px; background: #f4f6f8; color: #c0392b; border-radius: 3px; font: 800 13px/18px var(--font); text-align: center; border: 1px solid #c0392b; }
.mk-mission { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(255, 60, 60, .7); animation: ring 1.6s infinite; }
.mk-mission.p1 { background: #e53935; } .mk-mission.p2 { background: #f39c12; } .mk-mission.p3 { background: #3498db; }
.mk-mission.done { animation: none; opacity: .6; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 60, 60, .6); } 80% { box-shadow: 0 0 0 16px rgba(255, 60, 60, 0); } }
.leaflet-container { font: 13px var(--font); background: var(--bg-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 10px 12px; min-width: 200px; }
.leaflet-popup-content h4 { font-size: 14px; margin-bottom: 4px; }
.leaflet-popup-content .kv { display: grid; grid-template-columns: 90px 1fr; gap: 2px 8px; font-size: 12px; }
.leaflet-popup-content .kv span:nth-child(odd) { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-zoom a { background: var(--panel-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(22, 24, 27, .75) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }

/* ---------- Modale ---------- */
.modal-back { position: fixed; inset: 0; background: var(--scrim); z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .2s var(--ease); }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); width: 100%; max-width: 560px; box-shadow: var(--shadow); animation: rise .25s var(--ease); }
.modal-wide { max-width: 1000px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 24px; }
.modal-body { padding: 24px; }
@keyframes fade { from { opacity: 0; } }
.kv-grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv-grid > :nth-child(odd) { color: var(--muted); }
.section-title { margin: 16px 0 8px; }
.timeline { font-size: 12.5px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.timeline .l { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 5px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.timeline .l .t { color: var(--muted); font-family: var(--mono); }
.suggest { border: 1px solid var(--line); border-radius: var(--radius); max-height: 200px; overflow: auto; }
.suggest label { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); cursor: pointer; font-size: 13px; }
.suggest label:hover { background: rgba(255, 255, 255, .03); }
.suggest input { accent-color: var(--accent); }
pre.report { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font: 12.5px/1.6 var(--mono); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--info); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 400px; transition: opacity .25s var(--ease), transform .25s var(--ease); animation: rise .2s var(--ease); }
.toast-error { border-left-color: var(--accent); }
.toast-ok { border-left-color: var(--success); }
.toast-warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateX(20px); }

/* ---------- Profil / Admin ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat b { display: block; font: 800 30px var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.admin-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.table-wrap { overflow: auto; max-height: calc(100vh - 230px); }
.color-input { width: 40px; height: 30px; padding: 0; border: 1px solid var(--line-2); background: none; border-radius: 4px; }
.download-card { display: flex; gap: 16px; align-items: center; }

/* ---------- Responsive: 1280 · 1024 · 768 · 480 ---------- */
.mode-pill { white-space: nowrap; }
@media (max-width: 1560px) {
  .clock small, .user-pill .who small { display: none; }
  .nav a { padding: 0 10px; }
  .topbar { gap: 16px; }
}
@media (max-width: 1700px) {
  .shell.fill .mode-pill .mode-text { display: none; }
  .shell.fill .mode-pill { padding-left: 10px; }
}
@media (max-width: 1600px) {
  .lst-keys span:nth-child(n+3) { display: none; }
}
@media (max-width: 1400px) {
  .dispatch { --lst-c1: 300px; --lst-c3: 330px; --lst-bottom: 180px; }
  .lst-keys, #staff-online { display: none; }
  .dispatch .missions .panel-head { flex-wrap: wrap; row-gap: 6px; }
  .seg.sm button { white-space: nowrap; }
}
@media (max-width: 1280px) {
  .dispatch { --lst-c1: 280px; --lst-c3: 310px; }
  .lst-count { padding: 5px 9px; }
  .nav a { padding: 0 9px; font-size: 14.5px; letter-spacing: .06em; }
  .topbar { gap: 14px; padding: 0 16px; }
  .clock { font-size: 18px; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { min-height: 240px; order: -1; }
  .home-grid, .d-scores { grid-template-columns: 1fr; }
  .d-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-pill .who { display: none; }
  .user-pill { padding: 4px; }
  .lb-row { grid-template-columns: 40px auto minmax(0, 1fr) repeat(2, 80px); }
  .lb-row .c.avg { display: none; }
}
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .dispatch { display: flex; flex-direction: column; height: auto; }
  .lst-bar { flex-wrap: wrap; gap: 10px; }
  .dispatch .lst-bar { order: 0; } .dispatch .missions { order: 1; } .dispatch .units { order: 2; } .dispatch .map-area { order: 3; } .dispatch .log { order: 4; } .dispatch .radio { order: 5; }
  #staff-online { display: inline; }
  .wz-steps li span { display: none; }
  .dispatch .map-area { height: 60vh; }
  .dispatch > section { max-height: 70vh; }
  .shell.fill .content { overflow: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .topbar .clock, .topbar .brand small { display: none; }
}
@media (max-width: 768px) {
  /* Navigation wird zur unteren Tab-Leiste */
  /* backdrop-filter würde position:fixed an die Kopfzeile binden – auf dem Handy daher weg */
  .topbar { backdrop-filter: none; background: var(--bg); }
  .nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .seg { max-width: 100%; overflow-x: auto; }
  .page-head > * { min-width: 0; max-width: 100%; }
  .page-head .input { width: 100% !important; }
  .dispatch > section { min-width: 0; }
  .panel-head { flex-wrap: wrap; }
  .shell { padding-bottom: 68px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; z-index: 1500; background: var(--surface); border-top: 1px solid var(--border-strong); justify-content: space-around; gap: 0; padding: 0 4px; }
  .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; padding: 0 2px; font: 600 10px var(--font); letter-spacing: .04em; min-width: 52px; }
  .nav a svg.i { display: block; width: 22px; height: 22px; }
  .nav a::after { top: 0; bottom: auto; border-radius: 0 0 3px 3px; left: 25%; right: 25%; }
  .page { padding: 24px 16px 48px; }
  .card-head, .card-body, .m-row, .pv-row, .lb-row, .duty-card section { padding-left: 16px; padding-right: 16px; }
  .statbar { grid-template-columns: repeat(2, 1fr); }
  .d-head { flex-direction: column-reverse; }
  .d-total { width: 100%; justify-content: space-between; }
  .detail .modal-body { padding: 20px 16px; }
  .pv-row { grid-template-columns: 48px minmax(0, 1fr) 56px; }
  .pv-row .badge { display: none; }
  .offline-bar { top: auto; bottom: 76px; }
  #toasts { bottom: 76px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 16px; }
  .brand small { display: none; }
  .topbar { gap: 12px; }
  .topbar .brand div { display: none; }
  .mode-pill { padding-left: 8px; white-space: nowrap; }
  .mode-pill .mode-text { display: none; }
  .d-info { grid-template-columns: 1fr; }
  .lb-row { grid-template-columns: 32px auto minmax(0, 1fr) 72px; gap: 10px; }
  .lb-row .c.mis { display: none; }
  .m-row .score { font-size: 26px; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; }
}

/* Kartenkacheln dunkel einfärben (Kartendienst ohne eigenes Dark-Theme) – Marker bleiben unverändert */
:root:not([data-theme="light"]) .map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.35); }
:root:not([data-theme="light"]) .map-dark { background: #1b1e22; }

.show-sm { display: none; }
@media (max-width: 768px) { .hide-sm { display: none; } .show-sm { display: block; font: 500 12px var(--font); margin-top: 2px; } }

/* ---------- Funk (Browser) ---------- */
.funk { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.funk-side section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.funk-side section:last-child { border-bottom: none; }
.funk-side h3 { margin: 0 0 12px; font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tg-list { display: grid; gap: 6px; }
.tg-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; font: 600 13px var(--font); }
.tg-list button small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tg-list button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.status-keys { display: grid; gap: 6px; }
.status-keys button { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; font: 600 13.5px var(--font); }
.status-keys button b { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font: 800 20px var(--display); background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); }
.status-keys button:hover { border-color: var(--c); }
.status-keys button.active { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); }
.status-keys button.active b { background: var(--c); color: #fff; }
.ptt { width: 100%; height: 92px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface-2); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: 700 15px var(--display); text-transform: uppercase; letter-spacing: .08em; user-select: none; touch-action: none; transition: background .1s, border-color .1s; }
.ptt svg { width: 26px; height: 26px; }
.ptt.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-glow); }
.ptt.busy { border-color: var(--warn); color: var(--warn); }
/* Sprechfunk: Anzeige in der Kopfleiste, kleine Sprechtaste in der Disposition, Headset-Einstellungen */
.voice-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; max-width: 360px; padding: 0 12px; border-radius: 99px; background: rgba(245, 176, 65, .16); border: 1px solid var(--warn); color: var(--text); font: 600 12.5px var(--font); white-space: nowrap; overflow: hidden; }
.voice-chip span { overflow: hidden; text-overflow: ellipsis; }
.voice-chip svg { width: 14px; height: 14px; flex: none; color: var(--warn); animation: voice-blink 1s infinite; }
.voice-chip.tx { background: var(--accent); border-color: var(--accent); color: #fff; }
.voice-chip.tx svg { color: #fff; }
@keyframes voice-blink { 50% { opacity: .35; } }
.radio-compose:has(.ptt-mini) { grid-template-columns: 110px 1fr auto auto; }
.ptt-mini { user-select: none; touch-action: none; min-width: 92px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptt-mini.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ptt-mini.busy { border-color: var(--warn); color: var(--warn); }
.key-show { display: inline-flex; align-items: center; flex: 1; min-width: 0; color: var(--text-2); }
.funk-main { display: flex; flex-direction: column; height: calc(100vh - 64px - 190px); min-height: 420px; }
.funk-main .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.funk-main .panel-head h3 { margin: 0; font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.funk-log { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.fmsg { max-width: min(560px, 85%); align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.fmsg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; border-color: rgba(225, 6, 0, .35); background: rgba(225, 6, 0, .08); }
.fmsg .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; align-items: baseline; }
.fmsg .meta b { color: var(--text); }
.fmsg .meta time { margin-left: auto; padding-left: 10px; font-family: var(--mono); }
.fmsg .txt { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fmsg.k-voice .txt::before { content: '🎙 '; }
.fmsg.k-status { opacity: .85; }
.fmsg.sys { align-self: center; background: none; border: none; color: var(--muted); font-size: 12px; font-style: italic; display: flex; gap: 8px; }
.funk-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.funk-compose:not(:has(select)) { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 900px) {
  .funk { grid-template-columns: minmax(0, 1fr); }
  .funk-main { height: 70vh; }
}
@media (max-width: 480px) {
  .funk-compose { grid-template-columns: minmax(0, 1fr) auto; }
  .funk-compose select { grid-column: 1 / -1; }
}

/* ---------- Zugang & Netzwerk ---------- */
.access-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s3); align-items: start; }
.guide ol { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 14px; line-height: 1.55; }
.guide code, .invite-out code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.addr-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.invite-out { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--accent); border-radius: 12px; background: rgba(225, 6, 0, .05); }
.invite-out .code { font: 700 28px var(--mono); letter-spacing: .08em; margin: 4px 0 6px; }
@media (max-width: 900px) { .access-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Übersicht: laufender Einsatz (Pilot) ---------- */
.active-mission { margin-bottom: var(--s3); background: var(--surface); border: 1px solid var(--border-strong); border-left: 5px solid var(--warn); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-card); }
.active-mission.p1 { border-left-color: #d63a3a; }
.active-mission.p3 { border-left-color: #3b7fae; }
.am-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.am-head .badge { margin-left: auto; }
.am-head .eyebrow { font: 700 13px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--warn); }
.am-body { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 24px; align-items: center; padding: 16px 18px; }
.am-main h2 { margin: 0 0 8px; font: 800 26px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.am-main h2 .prio-tag { vertical-align: 5px; }
.am-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 14px; font-size: 13.5px; }
.am-kv span { color: var(--muted); }
.am-unit { display: flex; align-items: center; gap: 10px; }
.am-unit b { display: block; font-size: 15px; }
.am-unit small { color: var(--muted); }
@media (max-width: 768px) { .am-body { grid-template-columns: 1fr; gap: 14px; } }

/* Einsatz-Briefing: Wetter und Landeplatzhinweise (Leitstelle und Cockpit) */
.brf { display: flex; flex-direction: column; gap: 10px; }
.brf-warn { padding: 8px 12px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(225, 6, 0, .45); color: var(--accent-text); font-weight: 600; }
.brf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.brf-col { min-width: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.brf-col h4 { margin: 0 0 6px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brf-surface { font-weight: 600; margin-bottom: 6px; }
.brf-note { margin-bottom: 8px; padding: 6px 10px; border-left: 3px solid var(--warn); background: rgba(245, 176, 65, .1); border-radius: 0 6px 6px 0; }
.brf-note span { color: var(--warn); font-weight: 700; }
.brf-wx { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.brf-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.brf-hints { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.brf-hints li { margin: 2px 0; }

/* Joystick-Belegung (Funk-Seite) */
.joy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 4px 0 8px; }
.joy-grid label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }

/* Ideenliste: Bodenkräfte, Klinikabmeldung, Bearbeiter, Patient, Notrufabfrage */
.mk-ground { min-width: 30px; padding: 0 4px; height: 16px; border-radius: 3px; font: 800 10px/16px var(--font); text-align: center; color: #fff; border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.mk-ground.k-RTW { background: #d35400; } .mk-ground.k-NEF { background: #8e44ad; }
.mk-hosp.closed { background: #555; color: #ddd; border-color: #888; text-decoration: line-through; }
.mission-card .handler { color: var(--muted); } .mission-card .handler.me { color: var(--accent, #4ea8de); font-weight: 600; }
.pat-line { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.pat-line .vit { font-family: var(--mono, monospace); font-size: 13px; } .pat-line .vit.crit { color: #e53935; font-weight: 700; }
.call-log { max-height: 300px; overflow: auto; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line, #333); border-radius: 6px; margin-bottom: 10px; }
.call-msg { display: grid; gap: 2px; max-width: 80%; } .call-msg b { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.call-msg.caller span { background: rgba(229, 57, 53, .12); padding: 6px 10px; border-radius: 8px; }
.call-msg.dispatcher { justify-self: end; text-align: right; } .call-msg.dispatcher span { background: rgba(78, 168, 222, .15); padding: 6px 10px; border-radius: 8px; }
.call-q { display: flex; flex-wrap: wrap; gap: 6px; }
.call-result .big { font: 800 56px/1 var(--font-head, var(--font)); } .call-result .big small { font-size: 18px; color: var(--muted); }
.call-result .big.good { color: #2ecc71; } .call-result .big.mid { color: #f39c12; } .call-result .big.bad { color: #e53935; }

/* Nachbesprechung: Wiedergabe */
.replay { margin-top: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.replay-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.replay-bar input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent); }
.replay-feed { display: grid; gap: 3px; font-size: 13px; max-height: 150px; overflow: auto; }
.replay-feed span { color: var(--muted); font-family: var(--mono, monospace); margin-right: 6px; }
.replay-feed .st { color: var(--text); font-weight: 600; } .replay-feed .radio { color: #4ea8de; } .replay-feed .bad { color: #e53935; }
.mk-replay { font-size: 20px; line-height: 26px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.replay-bar select.input { width: auto; flex: 0 0 auto; }

/* Bericht & Statistik */
.rp { display: grid; gap: 10px; }
.rp h2 { font-size: 18px; margin: 14px 0 2px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--text); }
.rp-head h1 { font-size: 30px; margin: 2px 0; }
.rp-kw { font-weight: 700; font-size: 18px; }
.rp-meta { display: grid; gap: 2px; text-align: right; color: var(--muted); font-size: 13px; }
.rp-l { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.rp-grid b { font-weight: 600; overflow-wrap: anywhere; }
.rp-nums b { font-variant-numeric: tabular-nums; }
.rp-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.rp-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--border); }
.rp-t td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rp-t .r { text-align: right; }
.rp-foot { margin-top: 14px; font-size: 11px; color: var(--muted); }
.print-sheet { display: none; }
@media (max-width: 700px) { .rp-cols { grid-template-columns: 1fr; } }
@media print {
  body.printing > :not(.print-sheet) { display: none !important; }
  body.printing { background: #fff !important; color: #000 !important; }
  body.printing .print-sheet { display: block; padding: 0; }
  body.printing .rp, body.printing .rp * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  body.printing .rp-l, body.printing .rp .muted, body.printing .rp-t th, body.printing .rp-foot { color: #444 !important; }
  body.printing .rp-t td, body.printing .rp-t th, body.printing .rp h2 { border-color: #bbb !important; }
  body.printing .rp-head { border-color: #000 !important; }
  body.printing .rp h2, body.printing .rp-t tr { break-inside: avoid; page-break-inside: avoid; }
  @page { margin: 14mm; }
}
.sc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sc-tiles .stat { display: grid; gap: 4px; padding: 18px 20px; }
.sc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.sc-chart { width: 100%; height: auto; display: block; }
.sc-chart .sc-grid { stroke: var(--border); stroke-width: 1; }
.sc-chart .sc-ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.sc-chart .sc-hit { fill: transparent; }
.sc-chart .sc-hit:hover { fill: var(--surface-2); fill-opacity: .35; }
.sc-ok { fill: var(--success); background: var(--success); }
.sc-bad { fill: var(--accent); background: var(--accent); }
.sc-open { fill: var(--muted); background: var(--muted); }
.sc-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.sc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sc-bar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(80px, 2fr) 56px; align-items: center; gap: 12px; padding: 6px 0; }
.sc-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.sc-track i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .4s var(--ease); }
.sc-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.sc-kv { display: grid; grid-template-columns: auto auto auto auto; gap: 6px 14px; align-items: baseline; }
.sc-kv span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .sc-kv { grid-template-columns: auto auto; } .sc-bar { grid-template-columns: minmax(0, 1fr) 72px 48px; } }

/* Anrufer & Übungsdienst */
.call-say { display: flex; gap: 6px; align-items: center; }
.call-say .input { flex: 1 1 auto; min-width: 0; }
.call-say .btn { flex: 0 0 auto; }
.call-say .btn.rec { border-color: #e53935; color: #e53935; animation: call-rec 1s ease-in-out infinite alternate; }
@keyframes call-rec { from { opacity: 1; } to { opacity: .55; } }
.duty-training { display: grid; gap: 6px; padding-left: 6px; }
.duty-training p { margin: 0; }

/* Szene & Winde */
.hoist { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.hoist.active { border-color: var(--warn); }
.hoist.done { border-color: var(--success); }
.hoist-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; }
.hoist-agl { font: 600 12px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.hoist-agl.bad { color: var(--danger); }
.hoist-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.hoist-steps li { display: flex; gap: 6px; align-items: center; min-width: 0; padding: 4px 8px; border-radius: var(--radius); background: var(--surface-3); color: var(--muted); font-size: 12px; }
.hoist-steps li span { display: inline-grid; place-items: center; flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--line-2); font-weight: 700; font-size: 11px; }
.hoist-steps li.on { color: var(--text); outline: 1px solid var(--warn); }
.hoist-steps li.on span { background: var(--warn); color: #111; }
.hoist-steps li.done { color: var(--text); }
.hoist-steps li.done span { background: var(--success); color: #111; }
.hoist-bar, .hoist-swing { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hoist-bar i, .hoist-swing i { display: block; height: 100%; background: var(--warn); transition: width .4s; }
.hoist-swing { width: 120px; max-width: 100%; }
.hoist-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; font-size: 13px; }
.hoist-kv span { color: var(--muted); }
.hoist-kv b.warn .hoist-swing i { background: var(--danger); }
.hoist-warn { padding: 6px 10px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(225, 6, 0, .45); color: var(--accent-text); font-weight: 600; }
.hoist-result { font-weight: 600; }
.hoist-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .hoist-bar i, .hoist-swing i { transition: none; } }

/* Handy: Tab-Leiste mit wenigen Einträgen, Disposition ohne Querscrollen */
.menu .menu-sm { display: none; }
@media (max-width: 768px) {
  .nav a.nav-more { display: none; }
  .menu .menu-sm { display: flex; }
  .nav a { font-size: 11px; }
  .lst-bar { padding: 10px 12px; gap: 8px; }
  .lst-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .lst-count { flex-direction: column; align-items: center; gap: 0; padding: 6px 4px; min-width: 0; font-size: 11px; }
  .lst-count span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lst-bar > .btn { flex: 1 1 0; min-width: 0; }
  .lst-bar > #btn-new { flex-basis: 100%; }
  .dispatch { overflow-x: hidden; }
  .dispatch .missions { max-height: 60vh; }
}

/* Cockpit (#/cockpit): Desktop zweispaltig, Handy einspaltig mit Statustasten am unteren Rand */
.cockpit-page { max-width: 1400px; }
.ck2-head { display: flex; align-items: center; gap: 18px 28px; padding: 14px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.ck2-call b { display: block; font: 800 28px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.ck2-call small { color: var(--muted); font-size: 12.5px; }
.ck2-leds { display: flex; flex-wrap: wrap; gap: 8px 22px; flex: 1; }
.ck2-led { display: flex; flex-direction: column; gap: 2px; min-width: 0; background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; }
.ck2-led > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ck2-led > b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck2-led-btn { cursor: pointer; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; }
.ck2-led-btn:hover { background: var(--surface-2); }
.ck2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.ck2-side { display: flex; flex-direction: column; gap: 16px; }
.ck2-idle { text-align: center; padding: 48px 24px; }
.ck2-idle svg { width: 56px; height: 56px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.5; }
.ck2-idle h2 { margin: 8px 0; }
.ck2-mhead { flex-wrap: wrap; }
.ck2-mbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ck2-kw { font: 800 26px/1.1 var(--display); margin: 0 0 2px; }
.ck2-map { min-height: 320px; border-radius: var(--radius); border: 1px solid var(--border); }
.ck2-mmore { grid-column: 1 / -1; }
.ck2-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ck2-nav div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-width: 0; }
.ck2-nav b { display: block; font: 700 22px var(--mono); }
.ck2-nav span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck2-fms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 14px 16px 16px; }
.ck2-fms button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; min-width: 0; box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--c) 45%, transparent); }
.ck2-fms button b { font: 800 22px/1 var(--display); }
.ck2-fms button span { font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck2-fms button:hover { border-color: var(--c); }
.ck2-fms button.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); box-shadow: inset 0 -3px 0 var(--c); }
.ck2-fms button.sos { border-color: rgba(225, 6, 0, .5); }
.ck2-radio { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; padding: 14px 16px; }
.ck2-radio .fmsg { max-width: 92%; }
.ck2-sds { display: flex; gap: 8px; padding: 0 16px 12px; }
.ck2-sds .input { flex: 1; min-width: 0; }
.ck2-hist { padding: 8px 16px 14px; max-height: 240px; overflow: auto; }
.ck2-hrow { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ck2-hrow small { display: block; }
.ck2-hrow .grow { flex: 1; min-width: 0; }
@media (max-width: 1100px) {
  .ck2-grid { grid-template-columns: minmax(0, 1fr); }
  .ck2-mbody { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .cockpit-page { padding-bottom: 150px; }
  .ck2-head { padding: 12px 14px; gap: 10px; flex-direction: column; align-items: stretch; }
  .ck2-call b { font-size: 22px; }
  .ck2-leds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; width: 100%; }
  .ck2-led-wide { grid-column: 1 / -1; }
  .ck2-kw { font-size: 22px; }
  .ck2-map { min-height: 240px; }
  .ck2-nav b { font-size: 18px; }
  .ck2-mhead .btn { flex: 1; }
  /* Statustasten unten fest im Daumenbereich */
  .ck2-fms-card { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 1400; border-radius: 16px 16px 0 0; margin: 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
  .ck2-fms-card .card-head { display: none; }
  .ck2-fms { padding: 8px 8px; gap: 4px; }
  .ck2-fms button { padding: 6px 0 4px; }
  .ck2-fms button b { font-size: 19px; }
  .ck2-fms button span { font-size: 9px; }
}

/* ===== Patientenmonitor (web/js/patientmonitor.js) – Gerät bleibt in beiden Themes dunkel wie ein echter Monitor ===== */
.ck2-monitor { padding: 0; overflow: hidden; background: transparent; border: 0; }
.ck2-monitor[hidden] { display: none; }
.pm { --pm-screen: #04060a; --pm-bezel: #2a2e36; --pm-line: rgba(255,255,255,.08); --pm-line2: rgba(255,255,255,.16); --pm-text: #eef0f3; --pm-muted: #8f96a2;
  --pm-ecg: #3ee56f; --pm-spo2: #44d4f0; --pm-nibp: #f3f5f8; --pm-co2: #f2cf3a; --pm-temp: #ff9f43; --pm-alarm: #ff3b30; --pm-warn: #ffb020; --pm-tech: #3fb6ff; --pm-red: #e10600;
  --pm-disp: 'Barlow Condensed', 'Arial Narrow', sans-serif; --pm-mono: 'Roboto Mono', Consolas, ui-monospace, monospace;
  color-scheme: dark; color: var(--pm-text); background: var(--pm-bezel); border-radius: 14px; padding: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); }
.pm.pm-full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px)); display: grid; }
body.pm-noscroll { overflow: hidden; }
.pm-screen { background: var(--pm-screen); border-radius: 8px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; min-height: 460px; position: relative; }
.pm-full .pm-screen { min-height: 0; }
.pm-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 9; }
.pm-flash.go { animation: pm-flash .45s ease-out; }
@keyframes pm-flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.pm-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, auto); gap: 12px; align-items: center; padding: 8px 12px; background: #0c1016; border-bottom: 1px solid var(--pm-line); font-size: 12.5px; }
.pm-pat { display: flex; gap: 10px; align-items: baseline; min-width: 0; white-space: nowrap; overflow: hidden; }
.pm-pat b { font: 600 15px/1 var(--pm-disp); letter-spacing: .04em; text-transform: uppercase; }
.pm-pat span { color: var(--pm-muted); overflow: hidden; text-overflow: ellipsis; }
.pm-alarm { font: 600 13px/1 var(--font); padding: 6px 12px; border-radius: 4px; min-width: 220px; text-align: center; color: var(--pm-muted); border: 1px solid var(--pm-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-alarm.warn { background: var(--pm-warn); color: #1a1200; border-color: transparent; }
.pm-alarm.tech { background: var(--pm-tech); color: #001522; border-color: transparent; }
.pm-alarm.crit { background: var(--pm-alarm); color: #fff; border-color: transparent; animation: pm-blink 1s steps(2, start) infinite; }
.pm-alarm.muted::after { content: ' · Ton pausiert'; font-weight: 500; }
.pm-sys { display: flex; gap: 10px; align-items: center; color: var(--pm-muted); font: 12px var(--pm-mono); justify-content: end; white-space: nowrap; }
.pm-flt { color: var(--pm-tech); border: 1px solid var(--pm-tech); border-radius: 3px; padding: 1px 5px; font-size: 11px; }
.pm-flt[hidden] { display: none; }
.pm-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 0; }
.pm-waves { display: grid; grid-template-rows: 1.4fr 1fr 1fr; border-right: 1px solid var(--pm-line); min-width: 0; }
.pm-wave { position: relative; border-bottom: 1px solid var(--pm-line); min-height: 96px; }
.pm-wave:last-child { border-bottom: 0; }
.pm-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pm-tag { position: absolute; left: 10px; top: 6px; font: 600 12px/1 var(--pm-disp); letter-spacing: .06em; color: var(--c); z-index: 2; }
.pm-tag small { color: var(--pm-muted); font: 500 11px var(--font); margin-left: 6px; }
.pm-msg { position: absolute; inset: 0; display: grid; place-items: center; font: 600 15px/1 var(--pm-disp); letter-spacing: .08em; text-transform: uppercase; color: var(--c); opacity: .75; z-index: 2; pointer-events: none; }
.pm-msg[hidden] { display: none; }
.pm-scale { position: absolute; right: 8px; top: 6px; bottom: 6px; display: flex; flex-direction: column; justify-content: space-between; font: 500 10px/1 var(--pm-mono); color: var(--pm-muted); z-index: 2; text-align: right; }
.pm-status { position: absolute; left: 10px; bottom: 6px; right: 10px; z-index: 2; font: 600 12px/1 var(--pm-disp); letter-spacing: .05em; text-transform: uppercase; display: flex; gap: 6px; flex-wrap: wrap; }
.pm-status span { padding: 3px 6px; border-radius: 3px; background: rgba(255,255,255,.07); color: var(--pm-text); }
.pm-status .hot { background: var(--pm-alarm); color: #fff; animation: pm-blink .8s steps(2, start) infinite; }
.pm-status .chg { background: var(--pm-warn); color: #1a1200; }
.pm-status .cpr { background: rgba(63,182,255,.18); color: var(--pm-tech); }
.pm-nums { display: grid; }
.pm-tile { --c: var(--pm-text); position: relative; padding: 8px 12px; border-bottom: 1px solid var(--pm-line); color: var(--c); display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; column-gap: 8px; }
.pm-tile:last-child { border-bottom: 0; }
.pm-lbl { font: 600 13px/1 var(--pm-disp); letter-spacing: .06em; grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.pm-lbl small { font: 500 11px/1 var(--font); color: var(--pm-muted); }
.pm-lbl .pm-heart { margin-left: auto; }
.pm-val { font: 600 52px/1 var(--pm-disp); font-variant-numeric: tabular-nums; align-self: end; white-space: nowrap; }
.pm-val.md { font-size: 38px; } .pm-val.sm { font-size: 28px; }
.pm-side { display: flex; flex-direction: column; justify-content: space-between; align-items: end; font: 500 10.5px/1.25 var(--pm-mono); color: var(--pm-muted); padding-top: 4px; gap: 3px; text-align: right; white-space: nowrap; }
.pm-side b { color: var(--c); font: 600 15px/1 var(--pm-disp); }
.pm-tile.warn { background: rgba(255,176,32,.14); } .pm-tile.warn .pm-val { color: var(--pm-warn); }
.pm-tile.tech .pm-val { opacity: .75; }
.pm-tile.crit { animation: pm-critbg 1s steps(2, start) infinite; } .pm-tile.crit .pm-val { color: #fff; }
.pm-tile.off .pm-val { color: var(--pm-muted); opacity: .5; }
.pm-heart { width: 14px; height: 14px; fill: var(--pm-ecg); opacity: .18; transition: opacity .25s; flex: none; }
.pm-heart.on { opacity: 1; transition: none; }
.pm-pi { width: 8px; height: 28px; border: 1px solid var(--pm-line2); border-radius: 2px; position: relative; overflow: hidden; }
.pm-pi i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--pm-spo2); transition: height .12s; }
.pm-keys { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; background: #0c1016; border-top: 1px solid var(--pm-line); align-items: center; }
.pm-grp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pm-grp[hidden], .pm-key[hidden] { display: none; }
.pm-grow { margin-left: auto; }
.pm-seg { display: inline-flex; border: 1px solid var(--pm-line2); border-radius: 7px; overflow: hidden; }
.pm-seg button { border: 0; border-radius: 0; background: #151a22; color: var(--pm-muted); font: 600 13px/1 var(--pm-disp); letter-spacing: .05em; text-transform: uppercase; padding: 10px 12px; cursor: pointer; min-height: 38px; }
.pm-seg button + button { border-left: 1px solid var(--pm-line2); }
.pm-seg button[aria-pressed="true"] { background: #2b3340; color: var(--pm-text); }
.pm-seg button[data-mode="defi"][aria-pressed="true"] { background: var(--pm-red); color: #fff; }
.pm-seg button[data-mode="pacer"][aria-pressed="true"] { background: #d35400; color: #fff; }
.pm-key { font: 600 13px/1 var(--pm-disp); letter-spacing: .05em; text-transform: uppercase; color: var(--pm-text); background: #1b212b; border: 1px solid var(--pm-line2); border-radius: 6px; padding: 10px 12px; cursor: pointer; min-height: 38px; }
.pm-key:hover:not(:disabled) { background: #242b37; }
.pm-key:focus-visible, .pm-seg button:focus-visible { outline: 2px solid var(--pm-spo2); outline-offset: 2px; }
.pm-key.pm-primary { background: var(--pm-red); border-color: transparent; color: #fff; }
.pm-key.pm-charge { background: #5a4500; border-color: var(--pm-warn); color: var(--pm-warn); }
.pm-key.pm-shock { background: #3a0d0b; border-color: var(--pm-alarm); color: #ff8c84; }
.pm-key.pm-shock.ready { background: var(--pm-alarm); color: #fff; animation: pm-blink .8s steps(2, start) infinite; }
.pm-key[aria-pressed="true"] { border-color: var(--pm-spo2); color: var(--pm-spo2); }
.pm-key:disabled { opacity: .38; cursor: default; }
.pm-read { font: 600 20px/1 var(--pm-disp); min-width: 62px; text-align: center; font-variant-numeric: tabular-nums; }
.pm-none { position: absolute; left: 0; right: 250px; top: 46%; transform: translateY(-50%); text-align: center; pointer-events: none; z-index: 3; }
.pm-none[hidden] { display: none; }
.pm-none b { display: block; font: 700 24px/1.1 var(--pm-disp); letter-spacing: .06em; text-transform: uppercase; }
.pm-none span { color: var(--pm-muted); font-size: 13px; }
.pm-twelve { position: absolute; inset: 0; z-index: 6; background: #05070b; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.pm-twelve[hidden] { display: none; }
.pm-tw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--pm-line); }
.pm-tw-head b { font: 700 18px/1 var(--pm-disp); letter-spacing: .05em; text-transform: uppercase; color: var(--pm-ecg); }
.pm-tw-head span { font: 500 12px/1.3 var(--pm-mono); color: var(--pm-muted); text-align: right; }
.pm-tw-cv { position: relative; min-height: 220px; }
.pm-tw-cv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pm-tw-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--pm-line); }
.pm-tw-foot p { margin: 0; flex: 1 1 320px; font-size: 13px; min-width: 0; }
.pm-tw-foot p small { display: block; color: var(--pm-muted); font-size: 11.5px; margin-top: 2px; }
@keyframes pm-blink { 50% { opacity: .35; } }
@keyframes pm-critbg { 0% { background: rgba(255,59,48,.85); } 50% { background: rgba(255,59,48,.2); } }
@media (max-width: 900px) {
  .pm-body { grid-template-columns: minmax(0, 1fr); }
  .pm-waves { border-right: 0; border-bottom: 1px solid var(--pm-line); grid-template-rows: 130px 90px 90px; }
  .pm-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-tile { border-right: 1px solid var(--pm-line); }
  .pm-val { font-size: 42px; }
  .pm-none { right: 0; top: 160px; }
  .pm-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .pm-alarm { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .pm-grow { margin-left: 0; }
  .pm-twelve { position: fixed; z-index: 1001; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 420px) {
  .pm-val { font-size: 36px; } .pm-val.md { font-size: 30px; }
  .pm-key, .pm-seg button { padding: 10px 9px; font-size: 12px; }
}

/* Leitstelle: Patientenzeile mit Alarmfarben je Wert (gleiche Logik wie Monitor und Toolbar: monitorAlarms) */
.pat-alarm { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font: 700 12px/1.5 var(--font); }
.pat-alarm.crit { background: #ff3b30; color: #fff; animation: pm-blink 1s steps(2, start) infinite; }
.pat-alarm.warn { background: #ffb020; color: #1a1200; }
.pat-alarm.ok { background: rgba(62,229,111,.14); color: #1f9d4c; }
.pat-line .vit-v { display: inline-block; padding: 0 4px; border-radius: 3px; font-family: var(--mono, monospace); font-size: 13px; font-variant-numeric: tabular-nums; }
.pat-line .vit-v small { color: var(--muted); font-family: var(--font); font-size: 11px; margin-right: 3px; }
.pat-line .vit-v.warn { background: #ffb020; color: #1a1200; }
.pat-line .vit-v.crit { background: #ff3b30; color: #fff; animation: pm-blink 1s steps(2, start) infinite; }
.pat-line .vit-v.warn small, .pat-line .vit-v.crit small { color: inherit; opacity: .8; }
.pat-line .pat-rhythm { font-size: 12px; color: var(--muted); }
.pat-line .pat-ecg { flex-basis: 100%; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .pm-alarm.crit, .pm-tile.crit, .pm-key.pm-shock.ready, .pm-status .hot, .pat-alarm.crit, .pat-line .vit-v.crit { animation: none; }
  .pm-tile.crit { background: rgba(255,59,48,.6); }
  .pm-flash.go { animation: none; }
}

/* Desktop-App: Update-Hinweis in der Kopfleiste (desktopupdate.js) */
.upd-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: 600 12px var(--font); white-space: nowrap; cursor: default; }
.upd-chip[hidden] { display: none; }
.upd-chip.ready { background: #1f9d4c; border-color: transparent; color: #fff; cursor: pointer; }
.upd-chip.ready:hover { filter: brightness(1.1); }
.upd-chip:focus-visible { outline: 2px solid var(--accent, #4ea8de); outline-offset: 2px; }

/* Release-Notes der Desktop-App (Update-Hinweis, „Neu in Version X“) */
.upd-chip { cursor: pointer; }
.rel-notes { max-height: 55vh; overflow: auto; line-height: 1.5; }
.rel-notes h3 { margin: 14px 0 6px; font-size: 14px; }
.rel-notes h3:first-child { margin-top: 0; }
.rel-notes ul { margin: 0 0 8px; padding-left: 20px; }
.rel-notes li { margin: 3px 0; }
.rel-notes p { margin: 0 0 8px; }
