/* FF Steyregg – Feuerwehr App: Stylesheet */
/* ---------- Tokens ---------- */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --hover: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #63636b;
  --brand: #dc2626;
  --brand-hover: #b91c1c;
  --on-brand: #ffffff;
  --ok: #15803d;
  --warn: #a16207;
  --info: #1d4ed8;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 1px 3px rgba(24,24,27,.06);
  --shadow-lg: 0 20px 50px -12px rgba(24,24,27,.25);
  --skel: #e9e9ec;
  --radius: 14px;
  --sbw: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #18181b; --surface-2: #1c1c20; --hover: #232328;
    --border: #27272a; --border-strong: #3f3f46; --text: #fafafa; --muted: #a1a1aa;
    --brand: #ef4444; --brand-hover: #f87171; --on-brand: #fff;
    --ok: #22c55e; --warn: #eab308; --info: #60a5fa; --danger: #f87171;
    --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
    --skel: #232328; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #18181b; --surface-2: #1c1c20; --hover: #232328;
  --border: #27272a; --border-strong: #3f3f46; --text: #fafafa; --muted: #a1a1aa;
  --brand: #ef4444; --brand-hover: #f87171; --on-brand: #fff;
  --ok: #22c55e; --warn: #eab308; --info: #60a5fa; --danger: #f87171;
  --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
  --skel: #232328; color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 6px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tones */
.tone-ok { --tone: var(--ok); } .tone-warn { --tone: var(--warn); } .tone-info { --tone: var(--info); }
.tone-danger { --tone: var(--danger); } .tone-muted { --tone: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 13%, transparent);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns .2s ease; }
.app.collapsed { --sbw: 68px; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px; overflow: hidden auto;
}
.brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin-bottom: 8px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-logo { width: 32px; height: 34px; object-fit: contain; flex: none; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; line-height: 1.1; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 6px; white-space: nowrap; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 9px;
  color: var(--muted); font-weight: 500; white-space: nowrap; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-align: left; width: 100%; }
.me:hover { background: var(--hover); }
.me b { display: block; font-size: 13px; white-space: nowrap; }
.me .hide-c span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f97316, #dc2626); }
.app.collapsed .hide-c { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 0; }
.app.collapsed .nav-item .count { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.app.collapsed .brand, .app.collapsed .me { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapsed .nav-label { height: 1px; padding: 0; margin: 10px 8px; background: var(--border); font-size: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .title { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .mobile-brand { display: none; }
.spacer { flex: 1; }
.searchbtn {
  display: flex; align-items: center; gap: 10px; height: 36px; width: min(340px, 34vw); padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-align: left;
}
.searchbtn:hover { border-color: var(--border-strong); }
.searchbtn span { flex: 1; }
kbd { font: 600 11px/1 var(--font); padding: 4px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.iconbtn { position: relative; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.iconbtn:hover { background: var(--hover); color: var(--text); }
.dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.offline-chip { display: none; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.is-offline .offline-chip { display: inline-flex; }
.offline-banner { display: none; align-items: center; gap: 10px; padding: 10px 24px; font-size: 13px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.is-offline .offline-banner { display: flex; }

#view { padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.tone { color: var(--tone); border-color: color-mix(in srgb, var(--tone) 30%, transparent); background: color-mix(in srgb, var(--tone) 8%, transparent); }
.linkbtn { color: var(--info); font-weight: 600; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tile-head h2 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.tile-head h2 .ico { color: var(--muted); }
.w-metric { grid-column: span 3; }
.w-focus { grid-column: span 5; }
.w-quick { grid-column: span 5; }
.w-feed { grid-column: 6 / span 7; grid-row: 2 / span 2; }
.w-modules { display: none; }

.metric .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.metric .label i { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.metric .label .ico { width: 15px; height: 15px; }
.metric .value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 10px; line-height: 1.1; }
.metric .delta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.meter { height: 6px; border-radius: 3px; background: var(--hover); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--tone); }

.progress-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.progress-line .meter { flex: 1; margin: 0; --tone: var(--ok); }
.checklist { list-style: none; display: grid; gap: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 9px 8px; border-radius: 9px; width: 100%; text-align: left; }
.check:hover { background: var(--hover); }
.box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; margin-top: 1px; color: transparent; }
.box .ico { width: 14px; height: 14px; stroke-width: 3; }
.check.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.done .t { text-decoration: line-through; color: var(--muted); }
.check .t { display: block; font-weight: 550; }
.check .m { display: block; font-size: 12px; color: var(--muted); }
.prio { margin-left: auto; flex: none; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 92px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); text-align: left; font-weight: 600;
  transition: transform .12s ease, border-color .15s;
}
.qa:hover { border-color: var(--border-strong); }
.qa:active { transform: scale(.97); }
.qa i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.qa small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.qa .dot { top: 10px; right: 10px; border-color: var(--surface-2); }

/* feed */
.post { padding: 14px 0; border-top: 1px solid var(--border); }
.post:first-child { border-top: 0; padding-top: 0; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head b { font-size: 13px; }
.post-head div span { font-size: 12px; color: var(--muted); display: block; }
.post-head .avatar { width: 34px; height: 34px; }
.post .tag { margin-left: auto; }
.post p { margin: 10px 0 8px; }
.post-actions { display: flex; gap: 4px; margin-left: -8px; }
.post-actions button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
.post-actions button:hover { background: var(--hover); color: var(--text); }
.post-actions .liked { color: var(--brand); }
.post-actions .liked .ico { fill: currentColor; }
.comments { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--border); display: grid; gap: 8px; }
.comment { font-size: 13px; }
.comment b { margin-right: 6px; }
.comment-form { display: flex; gap: 8px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); flex: none; }

/* ---------- Inputs ---------- */
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid color-mix(in srgb, var(--info) 60%, transparent); outline-offset: 0; border-color: var(--info); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; gap: 14px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }

.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hover); gap: 2px; }
.segmented button, .segmented label { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.segmented [aria-pressed="true"], .segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 0; }
.segmented label span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; }

.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }

/* ---------- Table ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px; border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search .input { padding-left: 34px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { flex: none; white-space: nowrap; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .n { opacity: .7; font-weight: 500; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 14px; height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
th button { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: inherit; height: 100%; }
th button:hover { color: var(--text); }
th .ico { width: 14px; height: 14px; opacity: .5; }
th[aria-sort] .ico { opacity: 1; color: var(--text); }
td { padding: 0 14px; height: 52px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--muted); }
td.wrap { white-space: normal; min-width: 180px; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.rowlink { font-weight: 600; text-align: left; }
.rowlink:hover { text-decoration: underline; }
.badge-select {
  appearance: none; -webkit-appearance: none; height: 28px; padding: 0 26px 0 10px; border-radius: 999px; border: 1px solid transparent;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--tone); background-color: color-mix(in srgb, var(--tone) 13%, transparent);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 13px center, right 9px center; background-size: 4px 4px; background-repeat: no-repeat;
}
.badge-select:hover { border-color: color-mix(in srgb, var(--tone) 40%, transparent); }
.badge-select option { color: var(--text); background: var(--surface); }
.date-edit { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; font-variant-numeric: tabular-nums; }
.date-edit:hover { border-color: var(--border); }
.due-note { display: block; font-size: 12px; color: var(--muted); }
.due-note.soon { color: var(--warn); font-weight: 600; }
.due-note.over { color: var(--danger); font-weight: 600; }
.table-foot { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.cards { display: none; }
.readonly-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.readonly-note .ico { width: 14px; height: 14px; }

/* ---------- Swipe cards ---------- */
.list { display: grid; gap: 8px; }
.swipe { position: relative; border-radius: 12px; overflow: hidden; background: var(--hover); }
.swipe-bg { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font-weight: 700; font-size: 13px; color: #fff; }
.swipe-bg span { display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .12s; }
.swipe.to-right .swipe-bg { background: var(--right-tone, var(--ok)); }
.swipe.to-left .swipe-bg { background: var(--left-tone, var(--danger)); }
.swipe.to-right .sb-r, .swipe.to-left .sb-l { opacity: .75; }
.swipe.armed .sb-r, .swipe.armed .sb-l { opacity: 1; }
.swipe-fg {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; touch-action: pan-y; transition: transform .22s cubic-bezier(.2,.8,.2,1);
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.swipe-fg .body { flex: 1; min-width: 0; }
.swipe-fg .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swipe-fg .m { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swipe-fg .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row-actions { display: flex; gap: 6px; flex: none; }
.swipe-hint { display: none; font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.section-title { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- Profile ---------- */
.settings { display: grid; gap: 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting b { display: block; }
.setting span.d { display: block; font-size: 12px; color: var(--muted); }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acc-block { padding: 12px 0; border-top: 1px solid var(--border); }
.tile-head + .acc-block, .hint + .acc-block { border-top: 0; padding-top: 0; }
.acc-block b { display: block; }
.acc-block .d { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.chips.acc-chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.chip .ico { width: 14px; height: 14px; }
.role-card { padding: 12px; border-radius: 12px; border: 1px solid var(--border); text-align: left; background: var(--surface-2); }
.role-card[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.role-card b { display: block; }
.role-card span { font-size: 12px; color: var(--muted); }
.profile-hero { display: flex; align-items: center; gap: 14px; }
.profile-hero .avatar { width: 56px; height: 56px; font-size: 18px; }
.profile-hero h2 { font-size: 18px; }
.modlist { display: grid; gap: 6px; }
.modlist a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--border); font-weight: 600; }
.modlist a:hover { background: var(--hover); }
.modlist a .chev { margin-left: auto; color: var(--muted); }

/* ---------- Popover / Dialog ---------- */
.popover {
  position: fixed; z-index: 60; top: 64px; right: 16px; width: 380px; max-height: min(520px, 75dvh); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.popover[hidden] { display: none; }
.popover-head { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); width: 100%; text-align: left; }
.notif:hover { background: var(--hover); }
.notif:last-child { border-bottom: 0; }
.notif i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.notif .m { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif .unread-dot { margin-top: 6px; margin-left: auto; }
.notif.read .unread-dot { visibility: hidden; }

dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: rgba(9,9,11,.45); backdrop-filter: blur(2px); }
dialog#modal { margin: auto; }
.sheet { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { font-size: 16px; }
.sheet-body { padding: 18px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
dialog[open] .sheet { animation: pop .18s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; }
.dl dt { color: var(--muted); }
.dl dd { font-weight: 550; }

#palette .sheet { width: min(620px, calc(100vw - 32px)); margin-top: 12vh; }
#palette { margin: 0 auto; }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.pal-input input { flex: 1; height: 54px; border: 0; background: transparent; font-size: 16px; outline: none; }
.pal-input .ico { color: var(--muted); }
.pal-list { max-height: min(420px, 60dvh); overflow: auto; padding: 6px; }
.pal-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; }
.pal-item[aria-selected="true"] { background: var(--hover); }
.pal-item .ico { color: var(--muted); }
.pal-item .s { margin-left: auto; font-size: 12px; color: var(--muted); }
.pal-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 12px;
  background: #18181b; color: #fafafa; border: 1px solid #3f3f46; box-shadow: var(--shadow-lg); font-weight: 550; animation: toast-in .22s cubic-bezier(.2,.8,.2,1);
}
.toast > .ico { color: var(--tone); }
:root .toast.tone-ok { --tone: #4ade80; } :root .toast.tone-warn { --tone: #facc15; } :root .toast.tone-info { --tone: #93c5fd; } :root .toast.tone-danger { --tone: #fca5a5; }
.toast span { flex: 1; }
.toast button { color: inherit; opacity: .6; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; }
.toast button:hover { opacity: 1; }
.toast.out { animation: toast-out .18s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Skeleton ---------- */
.sk { background: var(--skel); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin-top: 10px; }

/* ---------- Tab bar ---------- */
.tabbar {
  display: none; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--border);
}
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab .ico { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab .dot { top: 0; right: calc(50% - 22px); border-color: var(--surface); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .w-metric { grid-column: span 6; }
  .w-focus, .w-quick { grid-column: span 6; }
  .w-feed { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 1023px) {
  .app, .app.collapsed { --sbw: 68px; }
  .app .hide-c { display: none; }
  .app .nav-item { justify-content: center; padding: 0; }
  .app .nav-item .count { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .app .brand, .app .me { justify-content: center; padding-left: 0; padding-right: 0; }
  .app .nav-label { height: 1px; padding: 0; margin: 10px 8px; background: var(--border); font-size: 0; }
  .collapse-btn { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .tabbar { display: flex; }
  .topbar { height: 54px; padding: 0 8px 0 16px; padding-top: env(safe-area-inset-top); height: calc(54px + env(safe-area-inset-top)); }
  .topbar .title, .desk-only { display: none !important; }
  .topbar .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
  .topbar .mobile-brand .brand-logo { width: 28px; height: 30px; }
  .searchbtn { width: 36px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .offline-banner { padding: 10px 16px; }
  #view { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 22px; }
  .page-head { align-items: flex-start; }
  .bento { gap: 12px; }
  .w-metric { grid-column: span 6; order: 1; }
  .w-quick { grid-column: 1 / -1; order: 2; padding: 14px; }
  .w-modules { display: block; grid-column: 1 / -1; order: 3; }
  .w-focus { grid-column: 1 / -1; order: 4; }
  .w-feed { grid-column: 1 / -1; order: 5; }
  .tile { padding: 14px; }
  .tile.table-card { padding: 0; }
  .metric .value { font-size: 24px; }
  .metric .delta { font-size: 11.5px; }
  .qa { min-height: 0; flex-direction: row; align-items: center; padding: 10px; font-size: 14px; }
  .qa small { display: none; }
  .table-wrap, .table-foot { display: none; }
  .cards { display: grid; gap: 8px; padding: 12px; }
  .toolbar { padding: 12px; }
  .search { max-width: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px; scrollbar-width: none; }
  .row-actions { display: none; }
  .swipe-hint { display: block; }
  .role-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .popover { left: 8px; right: 8px; width: auto; top: calc(58px + env(safe-area-inset-top)); }
  #toasts { left: 16px; right: 16px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom)); }
  dialog#modal { margin: auto 0 0; width: 100%; }
  dialog#modal .sheet { width: 100%; border-radius: 18px 18px 0 0; max-height: 88dvh; padding-bottom: env(safe-area-inset-bottom); }
  #palette .sheet { width: 100vw; margin-top: 0; border-radius: 0; min-height: 100dvh; }
  #palette { margin: 0; width: 100%; height: 100%; }
  .pal-list { max-height: none; }
  .pal-foot { display: none; }
}
/* ---------- Einsatz, Karte, Kalender ---------- */
.tone-brand { --tone: var(--brand); }
fieldset { border: 0; }
.ico.big { width: 40px; height: 40px; color: var(--muted); }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.w-next { grid-column: span 5; }
@media (min-width: 1280px) { .w-feed { grid-row: 2 / span 3; } }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; font-size: 13px; color: var(--tone); background: color-mix(in srgb, var(--tone) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent); }
.note span { color: var(--text); }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state h2 { margin-top: 12px; font-size: 18px; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 8px auto 18px; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.live-banner { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: #b91c1c; color: #fff; font-size: 13px; }
.live-banner[hidden] { display: none; }
.live-banner b { white-space: nowrap; }
.live-banner .lb-t { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.live-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.live-card > span:nth-child(2) { flex: 1; color: var(--text); }
.live-card b { display: block; }
.live-card .m { font-size: 12px; color: var(--muted); }
.live-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 11%, var(--surface)), var(--surface) 60%); }
.live-head h1 { font-size: 26px; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; }
.live-head p { color: var(--muted); }
.live-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.live-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.live-grid .map-tile { grid-row: span 2; }
.tile.map-tile { padding: 0; overflow: hidden; }
.map { position: relative; z-index: 0; isolation: isolate; height: 460px; width: 100%; background: var(--hover); }
.map.dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88); }
.leaflet-container { font: inherit; }
.map-fallback { height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; padding: 20px; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-inc { background: #dc2626; } .lg-fh { background: #18181b; border-radius: 3px; box-shadow: 0 0 0 1px var(--border-strong); }
.lg-veh { background: #1d4ed8; border-radius: 3px; } .lg-m { background: #f97316; } .lg-dev { background: #0d9488; }
.mk { background: transparent; border: 0; }
.pin { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; font-weight: 700; font-size: 11px; white-space: nowrap; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pin .ico { width: 14px; height: 14px; }
.pin-fh { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 8px; background: #18181b; }
.pin-inc { width: 36px; height: 36px; border-radius: 50%; background: #dc2626; border-width: 3px; color: #fff; }
.pin-inc .ico { width: 18px; height: 18px; }
.pin-inc::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; animation: pulse 1.6s infinite; color: #dc2626; }
.pin-veh { height: 24px; padding: 0 8px; border-radius: 6px; background: #1d4ed8; }
.pin-veh.ort { background: #15803d; }
.pin-m { width: 26px; height: 26px; border-radius: 50%; background: #f97316; font-size: 9px; }
.pin-m.me { background: #c2410c; box-shadow: 0 0 0 3px rgba(249,115,22,.45), 0 2px 8px rgba(0,0,0,.35); }
.pin-dev { width: 22px; height: 22px; border-radius: 50%; background: #0d9488; }
.pin-dev.off { background: #71717a; }
.pin-dev .ico { width: 12px; height: 12px; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--hover); }
.stackbar i { display: block; height: 100%; transition: width .4s ease; }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend-row i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.kv div { padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.kv b { display: block; font-size: 20px; line-height: 1.2; }
.kv span { font-size: 12px; color: var(--muted); }
.veh { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.tile-head + .veh { border-top: 0; padding-top: 0; }
.veh .body { flex: 1; min-width: 0; }
.veh .m { font-size: 12px; color: var(--muted); }
.veh .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.seats { display: flex; gap: 3px; margin-top: 6px; }
.seats i { width: 9px; height: 9px; border-radius: 2px; background: var(--border-strong); }
.seats i.on { background: var(--ok); }
.mcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.mcols .section-title { margin: 0 0 4px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mrow .avatar { width: 28px; height: 28px; font-size: 10px; }
.mrow .body { flex: 1; min-width: 0; }
.mrow b { display: block; font-size: 13px; }
.mrow .m { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log { list-style: none; display: grid; gap: 8px; font-size: 13px; }
.log li { display: flex; gap: 10px; }
.log time { color: var(--muted); flex: none; width: 42px; }
.veh-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.veh-pick label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400; }
.veh-pick label.dis { opacity: .5; cursor: not-allowed; }
.veh-pick b { display: block; font-weight: 600; }
.veh-pick small { color: var(--muted); }
.veh-pick input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

.karte { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.karte .map { height: min(640px, calc(100dvh - 280px)); min-height: 420px; }
.tile.dev-list { padding: 0; overflow: hidden; }
.dev-list .tile-head { padding: 16px 16px 4px; margin: 0; }
.dev { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); width: 100%; text-align: left; }
.dev:hover { background: var(--hover); }
.dev .body { flex: 1; min-width: 0; }
.dev b { display: block; }
.dev .m { display: block; font-size: 12px; color: var(--muted); }
.dev .side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pin-dot { width: 10px; height: 10px; border-radius: 50%; background: #0d9488; flex: none; }
.pin-dot.veh { background: #1d4ed8; border-radius: 3px; }
.pin-dot.off { background: #a1a1aa; }

.ev { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.tile-head + .ev { border-top: 0; padding-top: 0; }
.ev .body { flex: 1; min-width: 0; }
.ev .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .m { display: block; font-size: 12px; color: var(--muted); }
.ev-date { width: 44px; flex: none; text-align: center; border-radius: 10px; padding: 5px 0; color: var(--tone, var(--text)); background: color-mix(in srgb, var(--tone, var(--muted)) 11%, transparent); }
.ev-date b { display: block; font-size: 17px; line-height: 1.1; }
.ev-date span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.cal-side { display: grid; gap: 16px; }
.tile.cal-card { padding: 0; overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 10px; }
.cal-head h2 { font-size: 18px; letter-spacing: -.01em; }
.cal-chips { padding: 0 14px 12px; }
.chip .dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.cal-chips .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--tone) 12%, transparent); border-color: color-mix(in srgb, var(--tone) 35%, transparent); color: var(--text); }
.cal-chips .chip[aria-pressed="false"] { opacity: .55; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--border); }
.cal-cell { min-height: 104px; padding: 6px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--surface); min-width: 0; }
.cal-cell:nth-child(7n + 8) { border-left: 0; }
.cal-cell:hover { background: var(--hover); }
.cal-cell.out { background: var(--surface-2); color: var(--muted); }
.cal-cell[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--info); }
.cal-cell .dn { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.cal-cell.today .dn { background: var(--brand); color: #fff; }
.cal-ev { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 2px; justify-content: center; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--tone); }

#alarmDlg { position: fixed; inset: 0; width: 100vw; height: 100dvh; margin: 0; overflow: auto; background: #000; }
#alarmDlg::backdrop { background: #000; }
.alarm-screen { min-height: 100dvh; color: #fff; background: radial-gradient(120% 70% at 50% 0%, #5a0d08 0%, #1a0302 55%, #000 100%); display: flex; flex-direction: column; justify-content: center; padding: 32px 24px calc(32px + env(safe-area-inset-bottom)); }
.alarm-inner { width: 100%; max-width: 440px; margin: 0 auto; }
.alarm-tag { display: inline-flex; align-items: center; gap: 8px; color: #ff453a; font-weight: 800; letter-spacing: .1em; font-size: 13px; }
.alarm-screen h2 { font-size: clamp(32px, 8vw, 44px); line-height: 1.05; letter-spacing: -.03em; margin-top: 12px; }
.alarm-meta { color: rgba(255,255,255,.65); margin-top: 8px; font-size: 15px; }
.alarm-glass { margin-top: 22px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.alarm-glass .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: rgba(255,255,255,.75); }
.alarm-glass .row b { color: #fff; }
.alarm-glass .stackbar { height: 6px; margin-top: 10px; background: rgba(255,255,255,.12); }
.alarm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.alarm-chips span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.alarm-share { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.85); cursor: pointer; }
.alarm-share input { width: 20px; height: 20px; accent-color: #30d158; flex: none; margin-top: 1px; }
.alarm-share small { color: rgba(255,255,255,.55); font-size: 12px; }
.alarm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.alarm-actions button { height: 58px; border-radius: 16px; font-weight: 700; font-size: 17px; }
.alarm-actions .yes { background: #30d158; color: #002b0c; }
.alarm-actions .no { background: rgba(255,255,255,.14); color: #fff; }
.alarm-later { display: block; margin: 16px auto 0; color: rgba(255,255,255,.6); font-size: 14px; padding: 8px; }

.sy-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; }
.section-title + .sy-row { border-top: 0; }
.sy-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.sy-row .body { flex: 1; min-width: 0; }
.sy-row b { display: block; }
.sy-row .m { display: block; font-size: 12px; color: var(--muted); }
.sy-ph { width: 18px; flex: none; display: grid; place-items: center; color: var(--warn); }
.sy-ph .ico { width: 16px; height: 16px; }
.sy-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.haus { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.haus.on { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.haus-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.haus.on .haus-ic { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.haus .body { flex: 1; min-width: 0; }
.haus .body b { display: block; }
.haus .m { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avs { display: flex; padding-left: 8px; }
.avs .avatar { width: 30px; height: 30px; font-size: 10px; border: 2px solid var(--surface); margin-left: -8px; }
.haus-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px 16px; overflow: auto; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--brand) 14%, var(--bg)), var(--bg) 60%); }
.login[hidden] { display: none; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; }
.login-card .crest { width: 64px; height: auto; display: block; margin: 0 auto 12px; }
.login-card h1 { text-align: center; font-size: 22px; }
.login-card .sub { text-align: center; color: var(--muted); margin: 2px 0 20px; }
.login-err { color: var(--danger); font-size: 13px; min-height: 1em; }
.demo-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-acc button { text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.demo-acc button:hover { border-color: var(--border-strong); }
.demo-acc b { display: block; font-size: 13px; }
.demo-acc span { font-size: 12px; color: var(--muted); }
.admin-tabs { max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
.admin-tabs button { white-space: nowrap; }
.arow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.arow:first-child { border-top: 0; }
.arow .avatar { width: 32px; height: 32px; font-size: 11px; }
.arow .body { flex: 1 1 200px; min-width: 0; }
.arow b { display: block; }
.arow .m { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow .arole { width: auto; height: 32px; font-size: 13px; padding: 0 8px; }
.ap-wrap { overflow-x: auto; position: relative; }
.table-wrap { position: relative; }
.ap-table { min-width: 640px; }
.ap-table td { white-space: normal; vertical-align: top; padding: 10px 14px; height: auto; }
.ap-table td .sub { margin-top: 2px; }
.vchip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--hover); margin: 0 4px 4px 0; }
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.obj-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sheet.wide { width: min(900px, calc(100vw - 32px)); }
.plan-svg { width: 100%; height: auto; background: #fff; border-radius: 10px; border: 1px solid var(--border); display: block; }
.plan-pdf { width: 100%; height: 60vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.pin-hy { width: 20px; height: 20px; border-radius: 50%; background: #2563eb; font-size: 10px; }
.pin-w { width: 24px; height: 24px; border-radius: 6px; background: #0891b2; }
.pin-w .ico { width: 13px; height: 13px; }
.pin-o { width: 28px; height: 28px; border-radius: 8px; background: #9333ea; cursor: pointer; }
.pin-o .ico { width: 15px; height: 15px; }
.pin-dot.obj { background: #9333ea; border-radius: 3px; }
.lg-hy { background: #2563eb; } .lg-w { background: #0891b2; border-radius: 3px; } .lg-o { background: #9333ea; border-radius: 3px; }
@media print {
  .sidebar, .topbar, .tabbar, .toolbar, .offline-banner, .live-banner, #toasts, .page-head .btn, .row-actions, .cards, .note, .haus { display: none !important; }
  .app { display: block; }
  #view { padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
  .tile { box-shadow: none; border: 0; }
  .table-wrap { display: block !important; overflow: visible; }
}
.door { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.hint + .door { border-top: 0; }
.door-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--hover); color: var(--muted); }
.door.open .door-ic { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.door .body { flex: 1; min-width: 0; }
.door b { display: block; }
.door .m { display: block; font-size: 12px; color: var(--muted); }
.kasse-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.drinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.drink { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); text-align: left; transition: transform .1s ease, border-color .15s; }
.drink:hover { border-color: var(--border-strong); }
.drink:active { transform: scale(.96); }
.drink:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.drink .emo { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.drink .price { font-weight: 700; color: var(--brand); }
.drink .m { font-size: 12px; color: var(--muted); }
.drink .m.low { color: var(--warn); font-weight: 600; }
@media (max-width: 1279px) {
  .w-next { grid-column: span 6; }
  .cal-layout, .karte { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .live-grid .map-tile { grid-row: auto; }
}
@media (max-width: 767px) {
  .w-next { grid-column: 1 / -1; order: 3; }
  .live-banner { padding: 10px 16px; }
  .live-head h1 { font-size: 22px; }
  .live-grid .map, .karte .map { height: 320px; min-height: 0; }
  .mcols { grid-template-columns: minmax(0, 1fr); }
  .veh-pick { grid-template-columns: minmax(0, 1fr); }
  .cal-cell { min-height: 50px; padding: 4px 2px; align-items: center; gap: 3px; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; }
  .cal-wd { text-align: center; padding: 6px 0; }
  .cal-chips { margin: 0; }
  .haus { flex-wrap: wrap; }
  .haus-actions { width: 100%; }
  .haus-actions .btn { flex: 1; }
  .avs { display: none; }
  .demo-acc { grid-template-columns: 1fr; }
  .kasse-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .drinks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .drink { padding: 10px; }
  .arow { gap: 8px; }
  .arow .body { flex-basis: calc(100% - 44px); }
  .arow .arole { flex: 1 1 80px; min-width: 0; }
  .login-card { padding: 22px 18px; }
}
.ico.sm { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.dash-bars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 16px; margin-bottom: 16px; }
.dash-bars .haus { margin-bottom: 0; }
.ovd { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); flex-wrap: wrap; }
.ovd-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.ovd .body { flex: 1 1 140px; min-width: 0; }
.ovd b { display: block; font-size: 16px; }
.ovd .m { display: block; font-size: 12px; color: var(--muted); }
.ev.rep { flex-wrap: wrap; }
.rep-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.ro { font-weight: 400; padding: 8px 0; white-space: pre-wrap; }
.rep-form .textarea { min-height: 110px; }
.fach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 12px; }
.fach { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.fach b { display: block; margin-bottom: 6px; }
.fach-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 4px 0; cursor: pointer; }
.fach-item input { width: 18px; height: 18px; accent-color: var(--ok); margin-top: 1px; flex: none; }
.tk-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border-top: 1px solid var(--border); }
.tk-row:first-child, .tile-head + .tk-row { border-top: 0; }
.tk-row:hover b { text-decoration: underline; }
.tk-row .body { flex: 1; min-width: 0; }
.tk-row b { display: block; }
.tk-row .m { display: block; font-size: 12px; color: var(--muted); }
.kt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; padding: 14px; }
.sheet .kt-grid { padding: 0; }
.kt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.kt b { font-size: 15px; }
.kt .m { font-size: 12px; color: var(--muted); }
.kt-tel { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.doc-ic { width: 46px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; color: #fff; background: #71717a; }
.doc-ic.t-pptx { background: #c2410c; } .doc-ic.t-pdf { background: #b91c1c; } .doc-ic.t-docx { background: #1d4ed8; } .doc-ic.t-xlsx { background: #15803d; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 6px; }
.media { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.media.doc { align-items: center; justify-content: center; padding: 14px 8px; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
body.fullscreen-mode .sidebar, body.fullscreen-mode .topbar, body.fullscreen-mode .tabbar, body.fullscreen-mode .live-banner, body.fullscreen-mode .offline-banner { display: none !important; }
body.fullscreen-mode .app { grid-template-columns: minmax(0, 1fr); }
body.fullscreen-mode #view { max-width: none; padding: 14px; }
.tb-empty { text-align: center; padding: 10vh 16px; }
.tb-empty h1 { font-size: 28px; margin-top: 12px; }
.tb-empty p { color: var(--muted); max-width: 560px; margin: 8px auto 22px; }
.tb-big { height: 56px; font-size: 16px; padding: 0 22px; }
.tb-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, #7f1d1d, #b91c1c); }
.tb.uebung .tb-head { background: linear-gradient(120deg, #1e3a8a, #2563eb); }
.tb-head .live-tag { color: #fecaca; }
.tb.uebung .tb-head .live-tag { color: #bfdbfe; }
.tb-head h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.tb-head p { opacity: .88; }
.tb-lage { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.14); }
.tb-exit { flex: none; background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); height: 44px; }
.tb-exit:hover { background: rgba(255,255,255,.24); }
.tb-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tb-map { grid-row: span 2; }
.tb-map .map { height: 520px; }
.tb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tb-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 14px; text-align: center; }
.tb-actions button .ico { width: 26px; height: 26px; }
.tb-actions button:active { transform: scale(.97); }
.tb-actions .danger { background: var(--brand); border-color: var(--brand); color: #fff; grid-column: 1 / -1; min-height: 64px; flex-direction: row; }
.tb-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tb-kv div { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tb-kv div.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.tb-kv b { display: block; font-size: 36px; line-height: 1.05; }
.tb-kv span { font-size: 13px; color: var(--muted); }
.tb-veh { grid-column: span 2; }
.tb-v { padding: 10px 0; border-top: 1px solid var(--border); }
.tile-head + .tb-v { border-top: 0; padding-top: 0; }
.tb-v-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tb-v-head b { font-size: 16px; }
.tb-v-head .m { font-size: 12px; color: var(--muted); }
.crew { display: flex; flex-wrap: wrap; gap: 8px; }
.crew-m { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.crew-m .avatar { width: 30px; height: 30px; font-size: 10px; }
.crew-m b { display: block; font-size: 13px; }
.crew-m small { display: block; font-size: 11px; color: var(--muted); }
.gs { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.gs:first-child { border-top: 0; }
.gs .body { flex: 1; min-width: 0; }
.gs b { display: block; }
.gs .m { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.gs-h { display: block; font-size: 13px; margin-top: 6px; }
.plate { display: inline-grid; grid-template-rows: 1fr 1fr; width: 84px; flex: none; border: 3px solid #111; border-radius: 4px; background: #f97316; color: #111; font: 800 17px/1.3 ui-monospace, Consolas, monospace; text-align: center; }
.plate span:first-child { border-bottom: 3px solid #111; }
.gs-in { height: 46px; font-size: 17px; }
.kemler-out { margin: 10px 0 4px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; }
.fk { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.fk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.fk-grid .drink { position: relative; min-height: 112px; }
.fk-badge { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; }
.fk-cart { position: sticky; top: 76px; }
.fk-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.fk-line > span:first-child { flex: 1; min-width: 0; }
.fk-q { display: inline-flex; align-items: center; gap: 2px; }
.fk-q .iconbtn { width: 32px; height: 32px; font-size: 18px; font-weight: 700; color: var(--text); }
.fk-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; font-size: 15px; }
.fk-total b { font-size: 28px; }
.fk-total.back b { color: var(--ok); font-size: 22px; }
.fk-given-head { margin-top: 12px; font-size: 12px; }
.fk-given { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.fk-geld { height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2, var(--bg)); color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; }
.fk-geld.schein { background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.fk-geld:active { transform: scale(.96); }
.fk-geld.passend[aria-pressed="true"] { background: var(--ok); color: #fff; border-color: var(--ok); }
.fk-gegeben { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.fk-gegeben > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.fk-gegeben b { font-size: 18px; }
.fk-gegeben small { color: var(--muted); font-size: 12px; }
.fk-gegeben .iconbtn { width: 36px; height: 36px; font-size: 18px; }
.fk-go { width: 100%; height: 56px; font-size: 17px; }
.fk-stats { margin-bottom: 0 !important; }
.fk-stats .w-metric { grid-column: span 6; }
body.fullscreen-mode .fk-cart { top: 14px; }
.quiz h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 16px; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz-o { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); text-align: left; font-weight: 600; font-size: 15px; }
.quiz-o:hover:not(:disabled) { border-color: var(--info); }
.quiz-o.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.quiz-o.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.quiz-erk { margin: 16px 0 12px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.quiz-erk.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.quiz-res { text-align: center; padding: 28px; margin-bottom: 16px; }
.quiz-res h2 { font-size: 26px; }
.quiz-res p { color: var(--muted); margin: 6px 0 14px; }
.tv { position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; padding: 3vh 4vw; background: radial-gradient(120% 90% at 0% 0%, #1f1f25, #0a0a0c); color: #fafafa; font-size: clamp(15px, 1.7vw, 34px); overflow: hidden; }
.tv header { display: flex; align-items: center; gap: .7em; font-size: 1.1em; }
.tv header img { height: 2.2em; width: auto; }
.tv-mon { color: #a1a1aa; font-size: .8em; }
.tv-clock { font-size: 1.5em; font-weight: 700; }
.tv-exit { margin-left: 1em; font-size: 12px; color: #a1a1aa; border: 1px solid #3f3f46; border-radius: 8px; padding: 6px 10px; opacity: .6; }
.tv-exit:hover, .tv-exit:focus-visible { opacity: 1; }
.tv main { flex: 1; display: flex; align-items: center; min-height: 0; }
.tv-page, .tv-alarm { width: 100%; animation: pop .4s ease; }
.tv h2 { font-size: 1.7em; letter-spacing: -.02em; margin-bottom: .6em; color: #fca5a5; }
.tv-list { display: grid; gap: .5em; }
.tv-list > div { display: flex; gap: 1em; padding: .45em .7em; border-radius: .4em; background: rgba(255,255,255,.06); }
.tv-list b { min-width: 8em; color: #fde68a; }
.tv-news { flex-direction: column; }
.tv-news b { color: #a1a1aa; font-size: .7em; }
.tv-huge { font-size: 3.6em; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.tv-sub { font-size: 1.1em; color: #d4d4d8; margin-top: .4em; }
.tv-veh { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); gap: .6em; margin: .6em 0; }
.tv-veh > div { display: flex; flex-direction: column; padding: .7em; border-radius: .5em; background: rgba(255,255,255,.07); border-left: .3em solid var(--tone); }
.tv-veh b { font-size: 1.3em; }
.tv-veh span { color: #a1a1aa; font-size: .75em; }
.tv-veh em { font-style: normal; font-weight: 700; color: var(--tone); }
.tv-wx { display: flex; align-items: center; gap: .6em; }
.tv-emo { font-size: 4em; }
.tv-days { display: flex; gap: 1em; margin-top: 1em; }
.tv-days > div { flex: 1; padding: .6em; border-radius: .5em; background: rgba(255,255,255,.06); display: flex; flex-direction: column; }
.tv-src { font-size: .55em; color: #71717a; margin-top: 1em; }
.tv-dots { display: flex; gap: .4em; justify-content: center; }
.tv-dots i { width: .5em; height: .5em; border-radius: 50%; background: #3f3f46; }
.tv-dots i.on { background: #fafafa; }
.tv-alarm h2 { font-size: 3.2em; color: #fff; }
.tv-tag { display: inline-flex; align-items: center; gap: .5em; color: #f87171; font-weight: 800; letter-spacing: .08em; }
.tv .tone-ok { --tone: #4ade80; } .tv .tone-warn { --tone: #facc15; } .tv .tone-info { --tone: #60a5fa; } .tv .tone-danger { --tone: #f87171; }
@media (max-width: 1279px) {
  .tb-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tb-map { grid-column: 1 / -1; grid-row: auto; }
  .tb-map .map { height: 380px; }
  .tb-veh { grid-column: 1 / -1; }
  .fk { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1023px) { .dash-bars { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .tb-grid, .fk { grid-template-columns: minmax(0, 1fr); }
  .tb-head { flex-direction: column; }
  .tb-head h1 { font-size: 24px; }
  .tb-exit { width: 100%; }
  .tb-map .map { height: 300px; }
  .rep-actions { justify-content: flex-start; width: 100%; }
  .quiz-opts { grid-template-columns: minmax(0, 1fr); }
  .fk-cart { position: static; }
  .fk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fk-grid .drink { min-height: 96px; padding: 10px; }
  .fk-stats .w-metric { grid-column: span 6; }
  .tv-days { flex-direction: column; }
  .tk-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Serverbetrieb: Schnell-Anmeldung der Demo ausblenden */
body.server-mode section:has(.role-cards) { display: none; }

/* Einsatzkarte: Ebene „Letzte Einsätze“ */
.pin-e { width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; background: #b91c1c; font-size: 11px; cursor: pointer; }
.pin-e .ico { width: 14px; height: 14px; }
.pin-e.alt { background: #e57373; }
.lg-e { background: #b91c1c; border-radius: 50% 50% 50% 2px; }
.pin-dot.eins { background: #b91c1c; border-radius: 50% 50% 50% 2px; }

/* Einsatzkarte: eigener Standort */
.pin-me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 2px 8px rgba(0,0,0,.35); }

/* Karte: Markierungen */
.pin-mk { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: translate(-50%, -100%) rotate(-45deg); cursor: pointer; }
.pin-mk .ico { width: 15px; height: 15px; transform: rotate(45deg); }
.lg-mk { background: #2563eb; border-radius: 50% 50% 50% 2px; }
.map.picking, .map.picking .leaflet-interactive { cursor: crosshair !important; }

/* Einsatzformular (OÖ LFV): Eingabe */
.efo-form { display: grid; gap: 12px; margin-top: 10px; }
.efo-sec { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; display: grid; gap: 10px; }
.efo-sec legend { font-weight: 700; padding: 0 6px; }
.efo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.efo-row3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; }
.efo-prot { grid-template-columns: 80px 1fr 80px auto auto; gap: 6px; margin-bottom: 6px; align-items: center; border-radius: 10px; transition: background .4s; }
.efo-prot .btn.ghost { padding: 0 6px; }
.efo-prot.efo-flash { background: color-mix(in srgb, var(--brand) 14%, transparent); }
@media (max-width: 560px) { .efo-prot { grid-template-columns: 64px 1fr 30px 30px; } .efo-prot > input:nth-child(3) { grid-column: 1 / 3; grid-row: 2; } }
.efo-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.efo-chk { cursor: pointer; }
.efo-chk input { margin: 0 4px 0 0; }
.efo-sec .field input + input { margin-top: 6px; }
/* Einsatzformular: Druck auf die Original-Vorlage (gleiche Seiten für Vorschau und Druck) */
#efoPrint { display: none; }
.efo-page { position: relative; width: 210mm; height: 297mm; overflow: hidden; background: #fff; color: #000; }
.efo-page img { position: absolute; inset: 0; width: 210mm; height: 297mm; }
.efo-t { position: absolute; font-family: Arial, Helvetica, sans-serif; color: #1d3a8a; white-space: nowrap; overflow: hidden; line-height: 1.15; }
.efo-x { position: absolute; font-family: Arial, sans-serif; color: #1d3a8a; font-weight: 700; line-height: 1; }
#efoPreview { position: fixed; inset: 0; z-index: 95; overflow: auto; background: #4b4f54; }
#efoPreview[hidden] { display: none; }
.efo-pv-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.efo-pv-t { flex: 1; min-width: 160px; font-weight: 600; font-size: 14px; }
.efo-pv-pages { display: grid; justify-content: center; gap: 16px; padding: 16px 12px 40px; }
.efo-pv-pages .efo-page { box-shadow: 0 4px 18px rgba(0,0,0,.45); }
body.efo-pv-open { overflow: hidden; }
@media print {
  body.efo-printing > *:not(#efoPrint) { display: none !important; }
  body.efo-printing { background: #fff !important; }
  body.efo-printing #efoPrint { display: block; }
  .efo-page { page-break-after: always; break-after: page; }
  .efo-page:last-child { page-break-after: auto; break-after: auto; }
  @page { size: A4; margin: 0; }
}

/* Festkasse: Bearbeiten-Modus */
.fk-edit-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.fk-edit-note .ico { flex: none; color: var(--brand); }
.fk-editing .fk-grid .drink { border-style: dashed; }
.fk-ed { padding: 0; gap: 0; }
.fk-ed-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; flex: 1; padding: 14px 14px 6px; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.fk-ed-main .emo { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.fk-ed-main .price { font-weight: 700; color: var(--brand); }
.fk-ed-main .m { font-size: 12px; color: var(--muted); }
.fk-ed-bar { display: flex; justify-content: space-between; width: 100%; padding: 0 6px 6px; }
.fk-ed-bar .iconbtn { font-size: 22px; line-height: 1; }
.fk-ed-bar .iconbtn:disabled { opacity: .3; }
.fk-aus .fk-ed-main { opacity: .45; }
.fk-new { align-items: center; justify-content: center; color: var(--muted); }
@media (max-width: 640px) { .fk-ed-main { padding: 10px 10px 4px; } }

/* Festkasse: Bestellen mit Tischen, Druckstationen, Abschluss */
.fk-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 4px; }
.fk-group:first-child { margin-top: 0; }
.fk-group > span { font-weight: 400; font-size: 13px; color: var(--muted); }
.fk-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.fk-tisch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 2px dashed var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.fk-tisch.set { border-style: solid; border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.fk-tisch b { font-size: 18px; }
.fk-split { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.fk-split .pill { display: inline-flex; align-items: center; gap: 4px; }
.fk-split .pill .ico { width: 14px; height: 14px; }
.fk-tische { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.fk-t { min-height: 60px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 20px; font-weight: 700; color: var(--text); cursor: pointer; }
.fk-t.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.fk-t.wide { grid-column: 1 / -1; font-size: 15px; }
.fk-bon .row-btns { flex-wrap: wrap; justify-content: flex-end; }
.fk-pills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.fk-storno .t { text-decoration: line-through; color: var(--muted); }
.fk-live { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--ok, #15803d); font-weight: 600; }
.fk-tbl { overflow-x: auto; }
.fk-tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fk-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.fk-tbl td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.fk-tbl .num, .fk-tbl th:not(:first-child) { text-align: right; }
.fk-fix { border-style: solid; }
.fk-st-pick { flex-wrap: wrap; }
.fk-stelle-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: 8px 12px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--border); }
.fk-stelle-row .field { margin: 0; }
.fk-ohne { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-height: 40px; }
.fk-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.fk-chk input { width: 18px; height: 18px; }
@media (max-width: 640px) { .fk-stelle-row { grid-template-columns: 1fr auto; } .fk-ohne { grid-column: 1 / -1; grid-row: 2; } }
.fest-zu { margin-bottom: 14px; }
.rm-min { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rm-min .chip { min-width: 40px; justify-content: center; }
.rm-sum { margin: -2px 0 8px; }
/* Einsatz-Bildschirm im Feuerwehrhaus */
.tv main:has(.tv-eins) { align-items: stretch; }
.tv-eins { display: flex; flex-direction: column; gap: .6em; min-height: 0; height: 100%; font-size: .8em; }
.tv-eins h2 { font-size: 2.6em; margin: .1em 0 0; }
.tve-top { display: flex; gap: 1.2em; align-items: flex-start; justify-content: space-between; }
.tve-title { min-width: 0; }
.tve-info { color: #fde68a; font-size: .95em; margin-top: .3em; }
.tve-count { display: grid; grid-template-columns: repeat(4, auto); gap: .5em; flex-shrink: 0; }
.tve-n { display: flex; flex-direction: column; align-items: center; padding: .4em .8em; border-radius: .5em; background: rgba(255,255,255,.07); min-width: 5.5em; }
.tve-n b { font-size: 2.6em; line-height: 1; }
.tve-n span { font-size: .7em; color: #a1a1aa; }
.tve-n.ok b { color: #4ade80; } .tve-n.info b { color: #60a5fa; } .tve-n.muted b { color: #71717a; }
.tve-grp { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5em, 1fr)); gap: .5em; }
.tve-grp > div { display: grid; grid-template-columns: auto 1fr; column-gap: .5em; align-items: baseline; padding: .4em .7em; border-radius: .5em; background: rgba(255,255,255,.06); border-left: .3em solid #3f3f46; }
.tve-grp > div.ok { border-color: #4ade80; } .tve-grp > div.info { border-color: #60a5fa; }
.tve-grp b { font-size: 1.3em; } .tve-grp span { font-size: .7em; color: #a1a1aa; } .tve-grp em { grid-column: 1 / -1; font-style: normal; font-weight: 700; }
.tve-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: .8em; }
.tve-col { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .3em; }
.tve-col h3 { font-size: .9em; color: #a1a1aa; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2em; }
.tve-p { display: flex; align-items: center; gap: .5em; padding: .3em .6em; border-radius: .4em; background: rgba(255,255,255,.06); }
.tve-p b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tve-p em { margin-left: auto; font-style: normal; font-weight: 700; color: #60a5fa; white-space: nowrap; }
.tve-k { display: inline-flex; gap: .25em; flex-wrap: wrap; }
.tve-k i { font-style: normal; font-size: .65em; font-weight: 800; padding: .1em .4em; border-radius: .3em; background: rgba(250,204,21,.18); color: #fde68a; }
.tve-k.sm i { font-size: 11px; background: color-mix(in srgb, var(--warn, #ca8a04) 18%, transparent); color: var(--text); }
.tve-map { border-radius: .6em; overflow: hidden; min-height: 10em; background: #18181b; }
.tve-empty { color: #71717a; }
.grp-kurz { font-size: 12px; font-weight: 800; }
@media (max-width: 1100px) { .tve-main { grid-template-columns: 1fr 1fr; } .tve-map { grid-column: 1 / -1; min-height: 14em; } .tve-top { flex-direction: column; } }
.ovd-weeks .setting { padding: 6px 0; }
.ovd-week.now b { color: var(--accent, var(--ok)); }
/* OVD-Kalender */
.ovd-setup { margin-bottom: 10px; } .ovd-setup summary { cursor: pointer; font-weight: 600; }
.ovd-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; } .ovd-range .input { width: auto; }
.ovd-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px; } .ovd-nav b { font-size: 16px; text-transform: capitalize; }
.ovd-pens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ovd-pen i, .ovd-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 4px; }
.ovd-pen[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--c); }
.ovd-leg { margin-right: 10px; white-space: nowrap; }
.ovd-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ovd-h { text-align: center; font-size: 12px; color: var(--muted); }
.ovd-c { min-height: 52px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; color: var(--text); cursor: pointer; }
.ovd-c.empty { border: 0; background: none; cursor: default; }
.ovd-c.set { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); }
.ovd-c.set span { font-weight: 800; color: var(--c); font-size: 13px; }
.ovd-c.heute { outline: 2px solid var(--text); outline-offset: 1px; }
.ovd-c b { font-size: 13px; }
/* Anhänge an Aufgaben und Meldungen */
.anh { margin-top: 6px; }
.anh-list { display: flex; flex-wrap: wrap; gap: 8px; }
.anh-item { position: relative; display: inline-flex; }
.anh-img img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.anh-file { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 13px; }
.anh-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anh-item .iconbtn { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; background: var(--surface, var(--bg)); border: 1px solid var(--border); border-radius: 50%; }
.ev-grp { display: grid; gap: 6px; }
.ev .iconbtn[data-act="ev-edit"] { margin-left: 4px; }
/* Kalender-Integration */
.kal-abo { display: flex; flex-wrap: wrap; gap: 8px; }
.kal-q { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.kal-q .field { margin: 0; }
.kal-q-st { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.kal-imp { display: grid; gap: 6px; max-height: 50vh; overflow: auto; margin-top: 10px; padding-right: 4px; }
.post-actions .spacer { flex: 1; }
.comment { position: relative; padding-right: 30px; }
.comment .komm-del { position: absolute; top: 2px; right: 0; width: 26px; height: 26px; }
/* Wichtige Mitteilungen */
.post.wichtig { border: 2px solid var(--danger, #dc2626); border-radius: 12px; padding: 12px 14px; margin: 8px 0; background: color-mix(in srgb, var(--danger, #dc2626) 6%, transparent); }
.post-banner { display: flex; align-items: center; gap: 6px; color: var(--danger, #dc2626); font-size: 13px; letter-spacing: .06em; margin-bottom: 8px; }
.post-banner span { color: var(--muted); letter-spacing: 0; }
.post-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; }
/* Besatzung im Einsatz */
.bs-st { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.crew-m .iconbtn { width: 26px; height: 26px; margin-left: 2px; }
.crew-m small .linkbtn { font-size: inherit; padding: 0; }
.bs-pool, .bs-weitere { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.bs-weitere { margin-top: 12px; }
.bs-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.bs-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2, transparent); color: var(--text); text-align: left; cursor: pointer; min-height: 52px; }
.bs-pick.on { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 35%, transparent); }
.bs-ich { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bs-live { margin-top: 8px; }

/* Berichte: Personen mit Fahrzeug und Funktion */
.rp { grid-column: 1 / -1; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 12px; padding: 10px 12px 12px; }
.rp legend { padding: 0 6px; font-weight: 600; }
.rp-such { margin: 4px 0 8px; }
.rp-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; padding-right: 2px; }
.rp-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) 1fr 1fr; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 8px; }
.rp-row.on { background: color-mix(in srgb, var(--ok, #16a34a) 9%, transparent); }
.rp-row[hidden] { display: none; }
.rp-who { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.rp-row .select { height: 34px; font-size: 13px; padding-top: 0; padding-bottom: 0; min-width: 0; }
.rp-ro { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
@media (max-width: 560px) {
  .rp-row { grid-template-columns: 1fr 1fr; }
  .rp-who { grid-column: 1 / -1; }
}

/* Mehrere Alarme gleichzeitig */
.inc-switch { display: flex; gap: 8px; align-items: stretch; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; }
.inc-sw-n { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--danger, #dc2626); white-space: nowrap; padding-right: 4px; }
.inc-sw { display: grid; text-align: left; gap: 1px; min-width: 150px; max-width: 260px; padding: 8px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 35%, transparent); background: color-mix(in srgb, var(--danger, #dc2626) 6%, var(--surface, #fff)); color: var(--text); }
.inc-sw.ueb { border-color: color-mix(in srgb, #2563eb 35%, transparent); background: color-mix(in srgb, #2563eb 6%, var(--surface, #fff)); }
.inc-sw.on { box-shadow: 0 0 0 2px var(--danger, #dc2626); }
.inc-sw.ueb.on { box-shadow: 0 0 0 2px #2563eb; }
.inc-sw small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.inc-sw b, .inc-sw span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inc-sw span { font-size: 12px; color: var(--muted); }
.tb > .inc-switch { padding: 10px 12px 0; margin: 0; }

/* Lageübersicht (Großschadenslage) */
.lg-gross { color: var(--danger, #dc2626); }
.lg-map-tile { padding: 0; overflow: hidden; margin-bottom: 14px; }
.lg-map { height: 320px; }
.lg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.lg-stats .tile { display: grid; gap: 2px; padding: 12px 14px; }
.lg-stats span { font-size: 12px; color: var(--muted); }
.lg-stats b { font-size: 24px; }
.lg-stats small { font-size: 12px; color: var(--muted); }
.lg-warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; font-size: 14px;
  background: color-mix(in srgb, var(--warn, #d97706) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn, #d97706) 40%, transparent); }
.lg-warn .ico { flex: none; color: var(--warn, #d97706); }
.lg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.lg-list { display: grid; gap: 10px; }
.lg-side { display: grid; gap: 14px; }
.lg-card { background: var(--surface); border: 1px solid var(--line, rgba(0,0,0,.1)); border-left: 5px solid #d97706; border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.lg-card.prio-1 { border-left-color: #dc2626; }
.lg-card.prio-3 { border-left-color: #a1a1aa; }
.lg-card.ueb { border-left-color: #2563eb; }
.lg-card.aktiv { box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger, #dc2626) 45%, transparent); }
.lg-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lg-nr { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--surface); font-weight: 800; flex: none; }
.lg-t { display: grid; flex: 1; min-width: 160px; }
.lg-t b { font-size: 16px; }
.lg-t span { font-size: 14px; color: var(--muted); }
.lg-prio button { padding: 4px 10px; font-size: 12px; }
.lg-info { margin: 0; }
.lg-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lg-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lg-fz { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-fz .chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font-size: 13px; background: color-mix(in srgb, var(--ok, #16a34a) 12%, transparent); }
.lg-fz .chip.gast { background: color-mix(in srgb, #2563eb 12%, transparent); }
.lg-fz .chip.muted { background: var(--hover, rgba(0,0,0,.05)); color: var(--muted); }
.lg-fz .chip .x { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); padding: 0 2px; }
.lg-act { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-act .select { flex: 1; min-width: 180px; height: 34px; font-size: 13px; }
.lg-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.lg-row:first-of-type { border-top: 0; }
.lg-row > div { display: grid; min-width: 0; }
.lg-row .hint { font-size: 12px; }
.pin-lg { width: 30px; height: 30px; border-radius: 50%; background: #d97706; }
.pin-lg.prio-1 { background: #dc2626; }
.pin-lg.prio-3 { background: #71717a; }
.pin-lg.ueb { background: #2563eb; }
.pin-gast { padding: 3px 8px 3px 5px; border-radius: 99px; background: #2563eb; gap: 4px; grid-auto-flow: column; }
.pin-gast .ico { width: 14px; height: 14px; }
.lg-qr { display: grid; place-items: center; }
.lg-qr svg { width: min(300px, 80vw); height: auto; background: #fff; border-radius: 12px; }
.inc-switch.kompakt { align-items: center; flex-wrap: wrap; overflow: visible; }
.inc-switch.kompakt .select { flex: 1; min-width: 200px; max-width: 520px; height: 38px; }
@media (max-width: 900px) {
  .lg-grid { grid-template-columns: 1fr; }
  .lg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Einsatzverlauf (gemeinsam) */
.vl-form { display: grid; gap: 8px; margin-bottom: 12px; }
.vl-arten { flex-wrap: wrap; }
.vl-arten label { cursor: pointer; }
.vl-arten input { position: absolute; opacity: 0; pointer-events: none; }
.vl-arten span { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.vl-arten input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.vl-arten input:focus-visible + span { outline: 2px solid var(--accent, #2563eb); }
.vl-zeile { display: flex; gap: 8px; align-items: stretch; }
.vl-zeile .textarea { flex: 1; min-height: 52px; }
.vl-zeile .btn { align-self: stretch; height: auto; }
.vl-log { max-height: 420px; overflow-y: auto; }
.vl-log li.vl-sys span { color: var(--muted); }
.vl-log .pill { font-size: 11px; padding: 1px 6px; }
.vl-letzter { margin: 0; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--hover, rgba(0,0,0,.04)); }
.vl-letzter .pill { font-size: 11px; padding: 1px 6px; }
.vl-bericht { grid-column: 1 / -1; }
.vl-bericht > .btn { margin-left: 8px; }
@media (max-width: 560px) { .vl-zeile { flex-direction: column; } }

/* Fremde Fahrzeuge + große Lagekarte */
.fr-liste { display: grid; gap: 6px; }
.fr-zeile { display: grid; gap: 2px; text-align: left; width: 100%; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line, rgba(0,0,0,.1)); background: var(--surface); color: var(--text); font: inherit; }
.fr-zeile:hover { background: var(--hover, rgba(0,0,0,.04)); }
.fr-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fr-kopf .pill { margin-left: auto; }
.fr-zeile .hint { font-size: 12px; }
.fr-notiz-kurz, .fr-notiz { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; }
.fr-notiz { padding: 8px 10px; border-radius: 10px; background: var(--hover, rgba(0,0,0,.04)); margin: 10px 0 0; white-space: pre-wrap; }
.fr-notiz-kurz .ico, .fr-notiz .ico { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.fr-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.fr-dl dt { color: var(--muted); }
.fr-dl dd { margin: 0; }
.pin-gast.zu { background: #15803d; }
.pin-gast .fr-n { font-style: normal; font-size: 11px; }
.leaflet-container.fr-setzen { cursor: crosshair; }
.lg-map-tile { position: relative; }
.lg-map-knoepfe { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lg-map-knoepfe .btn { box-shadow: 0 1px 4px rgba(0,0,0,.25); background: var(--surface); }
.lg-map-tile.gross .lg-map { height: calc(100vh - 170px); min-height: 420px; }
.lg-map-tile:fullscreen { border-radius: 0; }
.lg-map-tile:fullscreen .lg-map { height: 100vh; }

/* Einsatzort setzen */
.ort-fehlt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--warn, #b45309); }
.ort-fehlt.sm { font-size: 12px; }
.ort-fehlt .ico { width: 15px; height: 15px; }

/* Fahrzeug-Standort vom Tablet */
.pin-veh.gps { box-shadow: 0 0 0 3px rgba(37,99,235,.45), 0 2px 8px rgba(0,0,0,.35); }
.pin-veh.gps.alt { opacity: .55; filter: grayscale(.7); }
.dev[disabled] { opacity: .6; cursor: default; }

/* Fahrzeug-Position: Herkunft */
.pin-veh.q-hand { outline: 2px dashed #fff; outline-offset: 1px; }
.pin-veh.q-status { opacity: .85; border-style: dashed; }

/* Kartenwerkzeuge: Leiste, Vollbild, Bereiche, Fahrzeug-Notizen */
.kw-leiste { display: flex; flex-direction: column; background: var(--surface); }
.kw-leiste button { width: 36px; height: 36px; border: 0; background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; border-bottom: 1px solid var(--line, rgba(0,0,0,.12)); }
.kw-leiste button:last-child { border-bottom: 0; }
.kw-leiste button:hover, .kw-leiste button[aria-pressed="true"] { background: var(--hover, rgba(0,0,0,.06)); }
.map-vollbild { position: fixed !important; inset: 0; z-index: 9000; margin: 0 !important; border-radius: 0 !important; background: var(--bg, #fff); }
.map-vollbild .map, .map-vollbild .lg-map, .map-vollbild .leaflet-container { height: 100% !important; min-height: 100vh; }
.hat-map-vollbild { overflow: hidden; }
.ber-zeichnen { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1000; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center;
  padding: 8px 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 4px 16px rgba(0,0,0,.25); font-size: 13px; font-weight: 600; max-width: calc(100% - 20px); }
.ber-label { background: rgba(255,255,255,.88); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.2); font-weight: 600; font-size: 12px; padding: 2px 6px; }
.ber-label::before { display: none; }
.ber-status button { padding: 6px 12px; }
.fz-n { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 6px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, #7c3aed 9%, transparent); }
.fz-n .ico { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.fz-n-btn { margin-left: 4px; }

/* Schlauchleitung */
.lt-ergebnis { padding: 10px 12px; border-radius: 12px; background: var(--hover, rgba(0,0,0,.04)); }
.lt-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.lt-dl dt { color: var(--muted); }
.lt-dl dd { margin: 0; }
.lt-gut { color: var(--ok, #15803d); }
.lt-schlecht { color: var(--danger, #dc2626); }
.lt-label { background: #0369a1; color: #fff; border: 0; font-weight: 700; font-size: 12px; padding: 2px 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.lt-label.schlecht { background: #dc2626; }
.lt-label::before { display: none; }
.pin-pumpe { width: 24px; height: 24px; border-radius: 50%; background: #0369a1; font-size: 12px; }

/* Dashboard „Im Feuerwehrhaus“: in schmaler Spalte umbrechen statt Text und Namenskürzel zu überlagern */
.haus { flex-wrap: wrap; row-gap: 10px; }
.haus .body { flex: 1 1 190px; }
.haus .avs { flex: none; }
.haus .haus-actions { flex: 1 1 100%; }
.haus .body b { overflow-wrap: anywhere; }

.ds-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.ds-dl dt { font-weight: 600; }
.ds-dl dd { margin: 0; }
@media (max-width: 560px) { .ds-dl { grid-template-columns: 1fr; } .ds-dl dd { margin-bottom: 6px; } }

/* Fotos im Verlauf */
.vl-datei img { display: inline-block; vertical-align: middle; max-height: 54px; max-width: 90px; border-radius: 6px; margin-left: 4px; }
/* Nachalarmierung */
.na-ziele { display: grid; gap: 6px; margin: 10px 0; }
.chk-zeile { display: flex; gap: 8px; align-items: center; font-size: 14px; }
/* Atemschutzüberwachung */
.as-tile { grid-column: 1 / -1; }
.as-trupp { border: 2px solid var(--line, rgba(0,0,0,.12)); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.as-trupp.st-ok { border-color: color-mix(in srgb, var(--ok, #16a34a) 50%, transparent); }
.as-trupp.st-abfrage { border-color: #d97706; background: color-mix(in srgb, #d97706 8%, transparent); }
.as-trupp.st-rueckzug, .as-trupp.st-kritisch { border-color: #dc2626; background: color-mix(in srgb, #dc2626 10%, transparent); animation: as-blink 1s infinite; }
.as-trupp.st-raus { opacity: .7; }
@keyframes as-blink { 50% { background: color-mix(in srgb, #dc2626 22%, transparent); } }
.as-kopf { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.as-kopf b { font-size: 17px; }
.as-zeit { font-size: 26px; font-weight: 800; }
.as-personen { display: grid; gap: 4px; }
.as-p { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: baseline; }
.as-p b { font-size: 18px; }
.as-p small.hint { grid-column: 1 / -1; font-size: 12px; }
.as-tief { color: #dc2626; }
.as-fuss { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.as-status { font-weight: 700; }
.as-neu-p { display: grid; grid-template-columns: 1fr 90px 90px; gap: 6px; margin-top: 6px; }
@media (max-width: 560px) { .as-neu-p { grid-template-columns: 1fr 1fr; } .as-neu-p select { grid-column: 1 / -1; } }
/* Abschnitte */
.lg-card.mit-abs { border-left-color: var(--abs) !important; }
.abs-zeile { display: flex; gap: 6px; }
.abs-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: var(--abs); }
.abs-wahl { max-width: 240px; height: 32px; font-size: 13px; border-color: var(--abs, var(--line)); }
.abs-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.abs-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--abs, #999); margin-right: 6px; vertical-align: middle; }
/* Jahresstatistik */
.st-balken { display: flex; gap: 6px; height: 170px; align-items: flex-end; padding-top: 6px; }
.st-b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.st-b i { display: block; width: 72%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--brand, #b91c1c); }
.st-b small { font-size: 11px; color: var(--muted); }
.st-b span { font-size: 12px; font-weight: 700; }
.st-tab { width: 100%; border-collapse: collapse; }
.st-tab th, .st-tab td { padding: 6px 8px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); text-align: left; }
.st-tab .num { text-align: right; }
/* Taktische Zeichen auf der Karte */
.pin-mk.tz { width: 36px; height: 36px; border-radius: 8px; overflow: visible; }
.pin-mk.tz .ico { width: 24px; height: 24px; }
.pin-mk.tz .tz-l { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; white-space: nowrap; font-size: 11px; font-weight: 700; color: #111; background: rgba(255,255,255,.9); padding: 1px 5px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* Karte zum Einsatzende im Bericht */
.ks-map { height: 300px; border-radius: 10px; margin-top: 8px; }
