/* Verwaltung: hell/dunkel nach Systemeinstellung, mobil zuerst */
:root {
  color-scheme: light;
  --accent: #d7261e;
  --accent-2: #b51d16;
  --accent-soft: rgba(215, 38, 30, 0.09);
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --line: #e2e5ea;
  --line-2: #d3d8df;
  --text: #13171d;
  --text-2: #444d5a;
  --muted: #6b7482;
  --good: #1a8a4c;
  --good-soft: rgba(26, 138, 76, 0.1);
  --warn: #b27800;
  --warn-soft: rgba(245, 180, 0, 0.16);
  --danger: #c62828;
  --danger-soft: rgba(198, 40, 40, 0.09);
  --info: #2a6fd0;
  --info-soft: rgba(42, 111, 208, 0.1);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.18);
  --r: 12px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-c: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --accent-soft: rgba(239, 68, 60, 0.14);
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1b2029;
    --surface-3: #232935;
    --line: #272e3a;
    --line-2: #333b48;
    --text: #eef1f5;
    --text-2: #b9c1cc;
    --muted: #8591a1;
    --good: #3ec27a;
    --good-soft: rgba(62, 194, 122, 0.13);
    --warn: #f0b429;
    --warn-soft: rgba(240, 180, 41, 0.14);
    --danger: #f06262;
    --danger-soft: rgba(240, 98, 98, 0.13);
    --info: #5aa2f0;
    --info-soft: rgba(90, 162, 240, 0.13);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --accent-soft: rgba(239, 68, 60, 0.14);
  --bg: #0e1116;
  --surface: #161a21;
  --surface-2: #1b2029;
  --surface-3: #232935;
  --line: #272e3a;
  --line-2: #333b48;
  --text: #eef1f5;
  --text-2: #b9c1cc;
  --muted: #8591a1;
  --good: #3ec27a;
  --good-soft: rgba(62, 194, 122, 0.13);
  --warn: #f0b429;
  --warn-soft: rgba(240, 180, 41, 0.14);
  --danger: #f06262;
  --danger-soft: rgba(240, 98, 98, 0.13);
  --info: #5aa2f0;
  --info-soft: rgba(90, 162, 240, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-c); font-weight: 700; line-height: 1.15; letter-spacing: 0.005em; }
h1 { font-size: 30px; margin: 0; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.ic { flex: none; }
code { font-size: 13px; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Grundgerüst ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.scrim { display: none; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; text-decoration: none; }
.side .brand img { height: 38px; width: auto; }
.side .brand .mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.side .brand b { display: block; font-family: var(--font-c); font-size: 19px; line-height: 1.1; }
.side .brand small { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 500; }
.nav a .ic { width: 20px; height: 20px; color: var(--muted); }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav a.on .ic { color: var(--accent); }
.nav a .cnt { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; }
.side .foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.side .foot .who { display: flex; align-items: center; gap: 10px; }
.side .foot .who .av { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.side .foot .links { display: flex; gap: 14px; margin-top: 10px; }
.side .foot .links a { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.side .foot .links a:hover { color: var(--text); }
.side .foot .links .ic { width: 16px; height: 16px; }
.content { min-width: 0; padding: 26px 32px 60px; max-width: 1280px; width: 100%; }
.topbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow-lg); }
  .shell.menu-open .side { transform: none; }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 55; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar b { font-family: var(--font-c); font-size: 19px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 18px 16px 90px; }
  h1 { font-size: 26px; hyphens: auto; -webkit-hyphens: auto; }
  .tab { padding: 9px 10px; }
}

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-title { min-width: 0; }
.ph-title .muted { margin-top: 4px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 6px; }
.back .ic { width: 16px; height: 16px; }
.back:hover { color: var(--text); }

/* ---------- Schaltflächen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.12s, border-color 0.12s; }
.btn .ic { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn.danger.ghost:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.big { height: 52px; padding: 0 22px; font-size: 17px; }
.btn.block { width: 100%; }
.iconbtn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--surface-3); color: var(--text); }
.iconbtn .ic { width: 20px; height: 20px; }
.iconbtn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Karten, Listen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 19px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); min-height: 58px; }
.row:first-child { border-top: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 14px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.row .end { display: flex; align-items: center; gap: 6px; flex: none; }
.row.dim .t { color: var(--muted); }
.row .thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex: none; }
.row .grip { cursor: grab; color: var(--muted); }
.row.dragging { opacity: 0.5; }
.row.dragover { box-shadow: inset 0 2px 0 var(--accent); }

.datechip { flex: none; width: 52px; text-align: center; border-radius: 10px; background: var(--surface-3); padding: 5px 0 6px; line-height: 1.05; }
.datechip b { display: block; font-family: var(--font-c); font-size: 22px; }
.datechip span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.datechip.today { background: var(--accent); color: #fff; }
.datechip.today span { color: #fff; }
.datechip.past { opacity: 0.6; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.red { background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-width: 240px; flex: 1; max-width: 380px; }
.search .ic { width: 18px; height: 18px; color: var(--muted); }
.search input[type='search'] { border: 0; outline: 0; background: transparent; font: inherit; color: inherit; width: 100%; min-height: 0; padding: 0; box-shadow: none; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--surface-3); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Reiter brechen um statt seitlich zu verschwinden */
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 11px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab .ic { width: 18px; height: 18px; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab .cnt { font-size: 12px; background: var(--surface-3); border-radius: 999px; padding: 0 7px; color: var(--text-2); }

.empty-state { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); }
.empty-state .ic { color: var(--muted); }
.empty-state b { font-size: 17px; color: var(--text); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); margin-bottom: 14px; }
.errbox .ic { width: 20px; height: 20px; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-soft); color: var(--text-2); font-size: 14px; }
.note .ic { width: 18px; height: 18px; color: var(--info); margin-top: 2px; }
.note.warn { background: var(--warn-soft); }
.note.warn .ic { color: var(--warn); }

/* ---------- Formulare ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--accent); margin-left: 3px; }
.field .help { font-size: 13px; color: var(--muted); }
input[type='text'], input[type='search'], input[type='number'], input[type='date'], input[type='time'], input[type='password'], input[type='email'], input[type='url'], select, textarea {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-height: 42px; width: 100%; outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.check.full { grid-column: 1 / -1; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.colorin { display: flex; align-items: center; gap: 10px; }
.colorin input { width: 56px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: var(--surface); }
.imginput { display: flex; gap: 14px; align-items: center; }
.imginput img, .imginput .ph { width: 120px; height: 80px; border-radius: 10px; object-fit: contain; background: var(--surface-3); flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.imginput .col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Dialoge ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 10, 14, 0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade 0.12s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { max-width: 880px; }
.modal.small { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { max-width: none; border-radius: 16px 16px 0 0; max-height: 94vh; }
  .modal-foot .btn span { display: none; }
  .modal-foot .btn.primary span { display: inline; }
}

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; max-width: 420px; animation: fade 0.15s ease; }
.toast .ic { width: 18px; height: 18px; color: var(--good); }
.toast.err { background: var(--danger); color: #fff; }
.toast.err .ic { color: #fff; }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; bottom: 12px; } }

/* ---------- Übersicht ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .v { font-family: var(--font-c); font-size: 38px; font-weight: 700; line-height: 1; }
.kpi .l { color: var(--muted); font-size: 14px; margin-top: 6px; }
.kpi.alert .v { color: var(--danger); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Steuerung ---------- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.modebtn { min-width: 0; }
.modebtn b, .modebtn small { max-width: 100%; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.modebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.modebtn .ic { width: 26px; height: 26px; color: var(--muted); }
.modebtn b { font-size: 15px; }
.modebtn small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.modebtn.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft); }
.modebtn.on .ic { color: var(--accent); }
@media (max-width: 480px) { .modes { grid-template-columns: repeat(2, 1fr); } }
.navlist { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.navlist button { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; font: inherit; color: var(--text-2); padding: 10px 16px; cursor: pointer; }
.navlist button:first-child { border-top: 0; }
.navlist button:hover { background: var(--surface-2); }
.navlist button.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.navlist button span.n { font-family: var(--font-c); font-weight: 700; color: var(--muted); width: 26px; flex: none; }
.bigctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigctl .btn { height: 64px; font-size: 18px; }
.bigctl .btn .ic { width: 26px; height: 26px; }
.preview-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.preview-frame iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }

/* ---------- Detailseiten ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.media-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-3); aspect-ratio: 4 / 3; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 2px; padding: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); }
.media-item .bar .iconbtn { width: 32px; height: 32px; color: #fff; }
.media-item .bar .iconbtn:hover { background: rgba(255, 255, 255, 0.18); }
.media-item .cap { position: absolute; left: 0; right: 0; top: 0; padding: 6px 8px; font-size: 12px; color: #fff; background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item.hidden img, .media-item.hidden video { opacity: 0.35; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.fb-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.fb-col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 18px; }
.fb-col h4 .ic { width: 20px; height: 20px; }
.fb-col.pos h4 { color: var(--good); }
.fb-col.imp h4 { color: var(--warn); }
.fb-col.q h4 { color: var(--info); }
.fb-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 8px; }
.fb-item .tx { flex: 1; min-width: 0; hyphens: auto; -webkit-hyphens: auto; }
.fb-item small { display: block; color: var(--muted); font-size: 13px; }
.fb-item.hidden { opacity: 0.5; }
.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.inline-add input { flex: 1; }
.tl-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tl-row:first-child { border-top: 0; }
.tl-row .tm { font-family: var(--font-c); font-weight: 700; font-size: 20px; width: 56px; flex: none; }
.tl-row .tx { flex: 1; min-width: 0; }
.tl-row .tx small { display: block; color: var(--muted); font-size: 13px; }
.qr { background: #fff; border-radius: 12px; padding: 12px; width: 180px; }
.qr img { width: 100%; display: block; }
.agenda-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.agenda-row:first-child { border-top: 0; }
.agenda-row .n { font-family: var(--font-c); font-weight: 700; font-size: 20px; width: 30px; color: var(--accent); flex: none; padding-top: 2px; }
.agenda-row .main { flex: 1; min-width: 0; }
.agenda-row .t { font-weight: 600; }
.agenda-row .s { font-size: 14px; color: var(--muted); }
.agenda-row.open { background: var(--surface-2); }
.sub-block { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.sub-block h4 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sub-block h4 .ic { width: 18px; height: 18px; color: var(--muted); }
.dec-row, .act-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.dec-row:first-of-type, .act-row:first-of-type { border-top: 0; }
.act-row .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; background: transparent; padding: 0; color: #fff; }
.act-row .box.done { background: var(--good); border-color: var(--good); }
.act-row .box .ic { width: 14px; height: 14px; }
.act-row.done .tx { text-decoration: line-through; color: var(--muted); }
.act-row .tx { flex: 1; min-width: 0; }
.act-row .tx small { display: block; color: var(--muted); font-size: 13px; text-decoration: none; }
.due-over { color: var(--danger); font-weight: 600; }
.att-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.att { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.att .nm { flex: 1; min-width: 0; font-weight: 500; line-height: 1.3; }
.att .nm small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.att .seg button { padding: 5px 8px; font-size: 12px; }
.present-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth .box { width: 100%; max-width: 420px; }
.auth .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; justify-content: center; }
.auth .logo .mark { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.auth .logo b { font-family: var(--font-c); font-size: 26px; }
.auth .card { padding: 26px; }
.auth .field { margin-bottom: 14px; }
.auth h2 { margin-bottom: 4px; }
.auth p { margin: 0 0 18px; color: var(--muted); }

.mobile-only { display: none; }
@media (max-width: 900px) { .mobile-only { display: inline-flex; } .desktop-only { display: none !important; } }

.ctl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ctl-grid { grid-template-columns: 1fr; } }
.quickadd { display: grid; grid-template-columns: 2fr 1.2fr 1fr auto; gap: 8px; align-items: end; margin-top: 10px; }
@media (max-width: 640px) { .quickadd { grid-template-columns: 1fr 1fr; } .quickadd .field:first-child { grid-column: 1 / -1; } }
.att .seg button.on:nth-child(1) { background: var(--good); color: #fff; }
.att .seg button.on:nth-child(3) { background: var(--danger); color: #fff; }

/* ---------- Zusatzmodule ---------- */
.btn.block { display: flex; width: 100%; }
a.btn.disabled { opacity: 0.45; pointer-events: none; }
.nav a.locked { opacity: 0.6; }
.nav a .lockic { margin-left: auto; display: inline-flex; color: var(--muted); }
.locked { max-width: 640px; text-align: center; padding: 34px 26px; }
.locked .lk-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.locked h2 { font-size: 24px; margin: 0 0 8px; }
.modic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.sep { height: 1px; background: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips span { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.chips span.good { background: var(--good-soft); color: var(--good); }
.ref { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 1px 7px; border-radius: 6px; background: var(--info-soft); color: var(--info); vertical-align: 1px; white-space: nowrap; }

/* Listen direkt bearbeiten */
.le-head, .le-row { display: grid; gap: 8px; align-items: center; }
.le-head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 0 4px; }
.le-head span { min-width: 0; overflow-wrap: anywhere; }
.le-head .c { text-align: center; }
.le-row { padding: 6px 0; border-top: 1px solid var(--line); }
.le-cell { min-width: 0; }
.le-cell input, .le-cell select { width: 100%; }
.le-lab { display: none; }
.le-check { display: flex; align-items: center; gap: 8px; justify-content: center; }
.le-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.le-act { display: flex; gap: 2px; }
.le-act .iconbtn[disabled] { opacity: 0.3; }
@media (max-width: 760px) {
  .le-head { display: none; }
  .le-row { grid-template-columns: 1fr 1fr !important; padding: 10px 0; }
  .le-cell:not(.le-check) { grid-column: 1 / -1; }
  .le-lab { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
  .le-check { justify-content: flex-start; }
  .le-act { grid-column: 2; justify-content: flex-end; grid-row: 1; }
}

/* Übungsplaner */
.mini-prog { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 6px; max-width: 220px; overflow: hidden; }
.mini-prog i { display: block; height: 100%; background: var(--good); }
.tplcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.tplcard { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; min-width: 0; }
.tplcard .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.tplcard b { font-size: 16px; line-height: 1.25; hyphens: auto; -webkit-hyphens: auto; }
.tplcard .d { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.tplcard .c { font-size: 12px; color: var(--muted); margin-top: auto; }
.tplcard.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft); }
.tplcard.blank .k { color: var(--info); }
.pbars { display: flex; flex-direction: column; gap: 8px; }
.pbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; border: 0; background: transparent; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.pbar .l { font-size: 14px; font-weight: 600; }
.pbar .n { font-size: 13px; color: var(--muted); }
.pbar .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pbar .track i { display: block; height: 100%; background: var(--warn); }
.pbar .track i.full { background: var(--good); }
.hints { display: flex; flex-direction: column; gap: 4px; }
.hints button { display: flex; gap: 8px; align-items: flex-start; border: 0; background: var(--warn-soft); color: var(--text); font: inherit; font-size: 13px; text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.hints button .ic { color: var(--warn); flex: none; margin-top: 1px; }
.psec { border-top: 1px solid var(--line); padding-top: 16px; }
.stack > .psec:first-child { border-top: 0; padding-top: 0; }
.psec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.psec-head h3 { margin: 0; font-size: 18px; }
.psec-head p { margin: 4px 0 0; }
.sched-prev { display: grid; gap: 4px; margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.sched-prev div { display: flex; gap: 12px; }
.sched-prev b { font-variant-numeric: tabular-nums; width: 48px; flex: none; }
.inj-list { display: flex; flex-direction: column; }
.inj { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.inj .when { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.inj .when b { font-family: var(--font-c); font-size: 18px; }
.inj .when b.cue { font-size: 14px; color: var(--muted); }
.inj .when span { font-size: 12px; color: var(--muted); }
.inj .body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.inj .body .t { font-weight: 600; }
.exp { background: var(--good-soft); border-radius: 8px; padding: 6px 8px; }
.inj .act, .cas .act { display: flex; align-items: center; gap: 2px; }
.reo { display: inline-flex; }
.reo .iconbtn[disabled] { opacity: 0.3; }
@media (max-width: 600px) { .inj { grid-template-columns: 1fr auto; } .inj .when { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; } }
.staff-grp h4 { margin: 8px 0 4px; font-size: 16px; }
.staff-grp h4 .small { font-weight: 400; }
.staff-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.staff-row .main { flex: 1; min-width: 0; }
.chipsel { display: flex; flex-wrap: wrap; gap: 6px; }
.chipsel label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.chipsel label.on { border-color: var(--accent); background: var(--accent-soft); }
.chipsel input { accent-color: var(--accent); }
.cas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.cas { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.cas-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cas .act { margin-top: auto; justify-content: flex-end; }
.obs-list { display: flex; flex-direction: column; }
.obs { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.obs .main { flex: 1; min-width: 180px; }
.crit-area h4 { margin: 14px 0 4px; font-size: 16px; }
.crit { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); }
.crit .main { flex: 1; min-width: 0; }
.res-area { margin-bottom: 10px; }
.res-area h4 { margin: 0 0 4px; font-size: 15px; }
.res-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.res-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; min-width: 22px; }
.res-bar i.erfuellt { background: var(--good); }
.res-bar i.teilweise { background: var(--warn); }
.res-bar i.nicht { background: var(--danger); }
.res-bar i.nb { background: transparent; color: var(--muted); }
.blk-grp { margin-bottom: 14px; }
.blk-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.blk { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; cursor: pointer; }
.blk:hover { background: var(--surface-2); }
.blk.on { background: var(--accent-soft); }
.blk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.blk span { min-width: 0; }
.blk small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Leitungsansicht */
.lead { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.lead-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-end; }
.lead-head h1 { font-size: 26px; }
.lead-clock { text-align: right; flex: none; }
.lead-clock b { display: block; font-family: var(--font-c); font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.lead-clock span { font-size: 12px; color: var(--muted); }
.lead-clock.run b { color: var(--accent); }
.lead-safety { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); font-size: 14px; }
.lead-safety .ic { color: var(--warn); }
.lead-inj { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
.lead-inj .when { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.lead-inj .when b { font-family: var(--font-c); font-size: 17px; }
.lead-inj .when span { font-size: 12px; color: var(--muted); }
.lead-inj .body { min-width: 0; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.lead-inj .body .t { font-weight: 600; }
.lead-inj.done { opacity: 0.55; }
.lead-inj.next { background: var(--accent-soft); }
.lead-inj.due .when b { color: var(--accent); }
@media (max-width: 560px) { .lead-inj { grid-template-columns: 1fr auto; } .lead-inj .when { grid-column: 1 / -1; flex-direction: row; gap: 8px; } .lead-head { flex-direction: column; align-items: flex-start; } .lead-clock { text-align: left; } }

/* Ausbildungsnachweis */
.mini-tiles.admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.mini-tiles.admin div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.mini-tiles.admin b { font-family: var(--font-c); font-size: 28px; line-height: 1.1; }
.mini-tiles.admin span { font-size: 13px; color: var(--muted); }
.hbar { height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 6px; overflow: hidden; max-width: 360px; }
.hbar i { display: block; height: 100%; background: var(--danger); }
.hbar i.mid { background: var(--warn); }
.hbar i.ok { background: var(--good); }
.row .hours { font-family: var(--font-c); font-size: 20px; font-variant-numeric: tabular-nums; }
.att2 { flex-wrap: wrap; }
.att-more { display: flex; gap: 6px; width: 100%; }
.att-more select { flex: 1; min-width: 0; }
.att-more input { width: 92px; }
textarea.grow { resize: none; overflow: hidden; min-height: 40px; line-height: 1.35; padding-top: 9px; padding-bottom: 8px; field-sizing: content; }
.le-row { align-items: start; }
.le-act, .le-check { padding-top: 4px; }
.res-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.res-legend span { display: inline-flex; align-items: center; gap: 6px; }
.res-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--surface-3); }
.res-legend i.erfuellt { background: var(--good); } .res-legend i.teilweise { background: var(--warn); } .res-legend i.nicht { background: var(--danger); }
.btn.wrap { white-space: normal; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; text-align: left; justify-content: flex-start; line-height: 1.3; }

/* Fuhrpark-Auswahl */
.fleet-pick { flex-basis: 100%; width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); margin-top: 4px; }
.fp-name { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fp-name .badge { text-transform: none; letter-spacing: 0; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-car { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text); max-width: 100%; }
.fp-car:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.fp-car b { font-size: 14px; }
.fp-car span { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.fp-car em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 700; }
.fp-car.used { opacity: 0.45; cursor: default; }
.fp-foot { display: flex; justify-content: flex-end; }
.btn.on { border-color: var(--accent); }

/* Organisation (Einstellungen) */
.org-st { padding: 0; overflow: hidden; }
.org-st .org-head { display: grid; grid-template-columns: 1fr 1.6fr auto auto; gap: 12px; align-items: end; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.org-st .org-head .field { margin: 0; }
.org-st .org-head .check { margin: 0 0 10px; white-space: nowrap; }
.org-st .org-body { padding: 14px 18px 16px; }
.org-st .org-body h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
@media (max-width: 720px) {
  .org-st .org-head { grid-template-columns: 1fr auto; }
  .org-st .org-head .field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .org-st .org-head .check { grid-row: 3; margin: 0; }
}

/* Lagekarten */
.smaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.smap { overflow: hidden; box-shadow: none; border: 1px solid var(--line); }
.smap-prev { display: block; pointer-events: auto; }
.smap-prev .tzmap { pointer-events: none; }
.smap-body { padding: 12px 14px 14px; }
.smap-body .t { font-weight: 700; }
.smap-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chipbtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.smap-edit { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.smap-main { padding: 12px; min-width: 0; }
.smap-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.smap-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; }
.smap-hint { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; padding: 6px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; min-height: 46px; }
.smap-hint.idle { background: var(--surface-2); color: var(--text-2); }
.smap-hint .btn { flex: none; }
.smap-hint span { flex: 1; min-width: 0; line-height: 1.3; }
.smap-props { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; min-height: 42px; }
.smap-props .field { margin: 0; min-width: 140px; }
.smap-props .field input, .smap-props .field select { min-width: 0; }
.btnrow.nowrap { flex-wrap: nowrap; }
.smap-pal { padding: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
.smap-tabs { margin-bottom: 10px; }
.pal-scroll { overflow-y: auto; min-height: 0; flex: 1; padding-right: 2px; }
.pal-scroll h4 { margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.pal-scroll details { border-top: 1px solid var(--line); padding: 8px 0; }
.pal-scroll summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; }
.tzp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.tzp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); min-width: 0; }
.tzp:hover:not(:disabled) { border-color: var(--accent); }
.tzp.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.tzp.used { opacity: 0.4; cursor: default; }
.tzp-sym { width: 44px; display: block; }
.tzp-t { font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.tzl-list { display: flex; flex-direction: column; gap: 6px; }
.tzl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.tzl.on { border-color: var(--accent); background: var(--accent-soft); }
.tz-handles { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tz-handles circle { pointer-events: all; fill: #fff; stroke: #1f5fbf; stroke-width: 4; cursor: move; }
.snapframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 1100px) {
  .smap-edit { grid-template-columns: 1fr; }
  .smap-pal { position: static; max-height: none; }
  .pal-scroll { max-height: 420px; }
}

/* Neu planen: Ausbildungsformen nach FwDV 2 */
.np-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.np-group { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.np-group .ic { width: 26px; height: 26px; flex: none; color: var(--text-2); margin-top: 2px; }
.np-group b { display: block; font-size: 16px; }
.np-group small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.np-group.on { border-color: var(--accent); background: var(--accent-soft); }
.np-group.on .ic { color: var(--accent); }
.np-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.np-hint { margin: 6px 0 12px; }
@media (max-width: 640px) { .np-groups { grid-template-columns: 1fr; } }

/* Unterrichtsablauf und Stationen */
.ls-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.lstep { border: 1px solid var(--line); border-left: 5px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.lstep.k-folie { border-left-color: #1f5fbf; }
.lstep.k-gespraech { border-left-color: #7a4cc2; }
.lstep.k-aufgabe { border-left-color: #1e8a3c; }
.lstep.k-praxis { border-left-color: #d98200; }
.lstep.k-frage { border-left-color: var(--accent); }
.lstep-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lstep-n { font-weight: 800; color: var(--text-2); min-width: 22px; }
.lstep-head select { width: auto; min-width: 150px; }
.lstep-title { order: 5; flex: 1 1 100%; min-width: 0; font-weight: 600; }
.lstep-min { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lstep-min input { width: 76px; }
.lstep-act { display: inline-flex; gap: 2px; margin-left: auto; }
.lstep-body { padding: 10px 12px 4px; display: grid; gap: 0 14px; }
.lstep-body.two { grid-template-columns: 1fr 1fr; }
.lstep-body .field.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .lstep-body.two { grid-template-columns: 1fr; } }
.st-set { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.st-set .field { margin: 0; width: 150px; }
.st-total { font-size: 14px; color: var(--text-2); padding-bottom: 10px; }
.st-prev { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-prev th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 8px; }
.st-prev td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
.st-prev .pill { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; }
.tablewrap { overflow-x: auto; }

/* Einsatzdokumentation */
.row.live { background: var(--danger-soft, #fdecea); }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.codebox { padding: 10px 12px; border-radius: 10px; background: var(--surface-3); overflow-x: auto; font-size: 12.5px; line-height: 1.5; word-break: break-all; }
.codebox code { white-space: pre-wrap; }
.etb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.etb-quick .btn { min-height: 46px; font-weight: 700; }
.etb-form { display: grid; grid-template-columns: 170px 1fr 1fr 110px; gap: 8px; align-items: start; }
.etb-form textarea { grid-column: 1 / -2; }
.etb-form .btn { align-self: stretch; }
@media (max-width: 760px) { .etb-form { grid-template-columns: 1fr 1fr; } .etb-form textarea { grid-column: 1 / -1; } }
table.etb, table.crew { width: 100%; border-collapse: collapse; font-size: 14px; }
table.etb th, table.crew th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.etb td, table.crew td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.crew td { vertical-align: middle; }
table.crew select, table.crew input[type='time'] { min-width: 0; width: auto; padding: 6px 8px; }
table.crew .c, table.crew th.c { text-align: center; }
.etb .num, .crew .num { text-align: right; font-variant-numeric: tabular-nums; }
.etb tr.void td { color: var(--muted); }
.etb tr.void .etb-text { text-decoration: line-through; }
.etb .void-why { text-decoration: none; display: block; color: var(--warn); }
.etb-kind { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); white-space: nowrap; }
.etb tr.k-alarm .etb-kind { background: #d7261e; color: #fff; }
.etb tr.k-lage .etb-kind { background: var(--info-soft); color: var(--info); }
.etb tr.k-befehl .etb-kind { background: #efe6fa; color: #6a3fb2; }
.etb tr.k-nachforderung .etb-kind { background: var(--warn-soft); color: var(--warn); }
.etb tr.k-status .etb-kind { background: var(--good-soft); color: var(--good); }
.crew-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; margin-bottom: 8px; }
.crew-sum .tot { font-weight: 700; }
.crew-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 44vh; overflow-y: auto; margin-top: 10px; padding: 2px; }
.crew-pick .cp { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.crew-pick .cp.on { border-color: var(--accent); background: var(--accent-soft, #fdecea); }
.crew-pick .cp span { display: flex; flex-direction: column; min-width: 0; }
.crew-pick .cp small { color: var(--muted); font-size: 12px; }
.ro-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 24px; margin: 0; }
.ro-dl dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ro-dl dd { margin: 2px 0 0; }
.close-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .close-grid { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checklist li svg { width: 18px; height: 18px; flex: none; }
.checklist li.ok svg { color: var(--good); }
.checklist li.miss svg { color: var(--danger, #d7261e); }
.checklist li.opt svg { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.gallery-ro { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gallery-ro img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
a.btn.disabled { opacity: 0.5; pointer-events: none; }

/* JHV: Berichte der Abteilungen */
.note.good { background: var(--good-soft); }
.note.good .ic { color: var(--good); }
.report-edit .note { margin-bottom: 14px; }
.report-edit h3 { margin: 0 0 4px; }
.report-edit .card-pad > p.muted { margin: 0 0 12px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.report-text { min-height: 360px; font-size: 15px; line-height: 1.55; }
.facts-row { grid-template-columns: 110px 1fr auto; margin-top: 6px; }
.chips .chip { font: inherit; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px dashed var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; }
.chips .chip:hover { border-color: var(--accent); color: var(--text); }
.chips .muted { background: none; padding: 4px 2px; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--bg); z-index: 3; }
.save-state { min-width: 110px; text-align: right; }
.rights-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin-top: 4px; }
.formhead.full { grid-column: 1 / -1; }
.formhead { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .report-grid { grid-template-columns: 1fr; }
  .rights-box { grid-template-columns: 1fr; }
}

/* JHV: Check-in und Abstimmung */
.ci-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) auto auto minmax(160px, 1fr) auto; gap: 12px 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.ci-row:first-child { border-top: 0; }
.ci-row.waiting { background: var(--warn-soft); }
.ci-row.dim { opacity: 0.55; }
.ci-main .t { font-weight: 700; }
.ci-main .s { font-size: 13px; color: var(--muted); }
.ci-code { font-family: var(--font-c); font-weight: 700; font-size: 30px; letter-spacing: 0.1em; background: var(--surface); border: 2px solid var(--line-2); border-radius: 10px; padding: 2px 12px; }
.ci-code-in { font-family: var(--font-c); font-weight: 700; font-size: 26px; letter-spacing: 0.15em; width: 5.2em; text-align: center; background: var(--surface); border: 2px solid var(--line-2); border-radius: 10px; padding: 4px 8px; color: var(--text); }
.ci-rights { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tog { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.tog input { display: none; }
.tog.on { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.tog.on span:before { content: '✓ '; }
.ci-lic { font-size: 14px; }
.ci-lic.due .check span { color: var(--warn); }
.ci-lic.done { color: var(--good); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ci-cls { margin-top: 6px; width: 100%; max-width: 180px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); font: inherit; font-size: 14px; }
.ci-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.ci-qr { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; }
.ci-qr img { width: 170px; height: 170px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
.ci-qr .muted.small { word-break: break-all; }
.ci-counts { display: flex; gap: 18px; flex-wrap: wrap; }
.ci-counts div { display: flex; flex-direction: column; }
.ci-counts b { font-family: var(--font-c); font-size: 34px; line-height: 1; }
.ci-counts span { font-size: 13px; color: var(--muted); }
.ballot { padding: 14px 18px; border-top: 1px solid var(--line); }
.ballot:first-child { border-top: 0; }
.ballot-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.ballot-head .main { flex: 1; min-width: 0; }
.ballot-head .t { font-weight: 700; }
.ballot-head .s { font-size: 13px; color: var(--muted); }
.ballot-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.ballot-prog .bar, .br-row .bar { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; display: block; }
.ballot-prog .bar i, .br-row .bar i { display: block; height: 100%; background: var(--accent); }
.ballot-res { margin-bottom: 10px; }
.br-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 40px 110px; gap: 10px; align-items: center; padding: 4px 0; }
.br-row b { text-align: right; font-family: var(--font-c); font-size: 20px; }
@media (max-width: 900px) {
  .ci-row { grid-template-columns: 1fr auto; }
  .ci-rights, .ci-lic { grid-column: 1 / -1; }
  .ci-act { grid-column: 1 / -1; justify-content: flex-start; }
  .ci-qr { grid-template-columns: 1fr; }
  .br-row { grid-template-columns: 1fr 1fr 40px; }
  .br-row .small { display: none; }
}
.lic-hist div { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lic-hist div span { flex: 1; color: var(--text-2); }
/* Zugang für Helfer (Gäste einer Übung) */
.grant-text { margin: 0; padding: 12px 14px; background: var(--surface-3); border-radius: 10px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.grants .row { padding-left: 0; padding-right: 0; }
/* Support-Anfragen an den Hersteller */
.rm-msgs { display: flex; flex-direction: column; gap: 10px; }
.rm-msg { border-radius: 12px; padding: 10px 12px; background: var(--surface-3); max-width: 92%; }
.rm-msg.support { align-self: flex-end; background: var(--info-soft); }
.rm-msg .h { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.rm-msg .x { white-space: pre-wrap; }

/* KI-Assistent */
.ai-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }
.ai-btn { color: var(--info); height: 30px; padding: 0 10px; font-size: 13px; }
.ai-btn .ic { width: 16px; height: 16px; }
.ai-menu-wrap { position: relative; }
.ai-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); padding: 6px; display: flex; flex-direction: column; }
.ai-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ai-menu button:hover { background: var(--surface-3); }
.ai-menu button span { font-size: 12px; color: var(--muted); }
.ai-wait { display: flex; gap: 14px; align-items: center; padding: 26px 6px; }
.ai-spin { display: inline-flex; color: var(--info); animation: spin 2.4s linear infinite; }
.ai-spin .ic { width: 28px; height: 28px; }
.ai-draft { width: 100%; min-height: 220px; font: inherit; line-height: 1.5; }
.ai-inject { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ai-inject small { display: block; margin-top: 3px; }
.ai-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 80px; }
.ai-bar span { display: block; height: 100%; border-radius: 3px; }
.ai-log { font-size: 13px; }
.ai-btn-lg { color: var(--info); }
.tplcard.ai-card .k { color: var(--info); display: inline-flex; align-items: center; gap: 4px; }
.tplcard.ai-card .k .ic { width: 14px; height: 14px; }
.ai-steps { display: flex; flex-direction: column; gap: 12px; padding: 12px 4px; }
.ai-step { display: flex; gap: 12px; align-items: center; opacity: 0.55; }
.ai-step.now, .ai-step.done { opacity: 1; }
.ai-step-ic { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); }
.ai-step.done .ai-step-ic { background: var(--good-soft, var(--surface-3)); color: var(--good); }
.ai-step.now .ai-step-ic { background: var(--info-soft, var(--surface-3)); color: var(--info); }
.ai-step .ai-spin .ic { width: 20px; height: 20px; }
.ai-lead { border-left: 3px solid var(--info); padding: 2px 0 2px 12px; }
.ai-lead p { margin: 4px 0 0; white-space: pre-line; line-height: 1.5; }
.ai-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--text-2); }
.ai-counts b { color: var(--text); }
.ai-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ai-cols h4 { margin: 0 0 6px; font-size: 14px; }
.ai-cols ul, .ai-cols ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.ai-cols li { margin-bottom: 3px; }
/* Hinweis auf ein Zusatzmodul auf Seiten, die ohne das Modul funktionieren (zum Beispiel Einsätze) */
.note.module-hint { align-items: flex-start; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); }
.note.module-hint > .ic { color: var(--muted); }
.note.module-hint .grow { flex: 1; min-width: 0; line-height: 1.45; }
.note.module-hint .mh-act { display: inline-flex; margin-left: 6px; vertical-align: middle; }
.note.module-hint .mh-act .btn.small { height: 30px; }
.note.module-hint .iconbtn { width: 30px; height: 30px; margin: -4px -6px 0 0; }
.note.module-hint .iconbtn .ic { width: 16px; height: 16px; }
/* Hinweis nach einem Update: Seite neu laden */
.update-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.update-bar .ic { width: 18px; height: 18px; }
.update-bar span { flex: 1; }
.update-bar .btn { background: #fff; color: var(--accent); border-color: #fff; }

/* ---------- Alarm- und Ausrückeordnung (AAO) ---------- */
.aao-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aao-tools select { width: auto; max-width: 100%; }
.aao-tools .search { flex: 1 1 200px; }
.aao-rules { display: flex; flex-direction: column; }
.aao-rule { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.aao-rule:last-child { border-bottom: 0; }
.aao-kw { font-weight: 800; font-family: var(--font-c); font-size: 15px; letter-spacing: 0.01em; }
.aao-both { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aao-slot-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.aao-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.aao-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); border: 1px solid transparent; line-height: 1.35; }
.aao-chip svg { width: 13px; height: 13px; opacity: 0.7; }
.aao-chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.aao-chip.k-stadt, .aao-chip.k-bezirk, .aao-chip.k-wehr, .aao-chip.k-teil { background: var(--info-soft); }
.aao-chip.k-fahrzeug { background: var(--warn-soft); }
.aao-chip.k-sirene { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.aao-chip.k-extern, .aao-chip.k-kreis { background: var(--surface-2); border-color: var(--line-2); }
.aao-chip.own { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.aao-chip.anf { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); font-weight: 500; }
.aao-chip.anf::before { content: 'auf Anf.'; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.aao-extra { font-size: 13px; color: var(--text-2); margin-top: 5px; }
.aao-table td, .aao-table th { white-space: normal; }
.aao-res { display: flex; flex-direction: column; gap: 10px; }
.aao-res-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.aao-res-head .aao-kw { font-size: 20px; }
.aao-res-sub { font-size: 13px; color: var(--muted); }
.aao-forces { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.aao-force { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.aao-force.own { border-color: var(--accent); background: var(--accent-soft); }
.aao-force b { display: block; }
.aao-force .muted { font-size: 12px; }
.aao-pick { display: flex; flex-direction: column; gap: 12px; }
.aao-pick .fp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aao-own-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.aao-own-badge.yes { background: var(--accent); color: #fff; }
.aao-own-badge.no { background: var(--surface-3); color: var(--text-2); }
.aao-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
@media (max-width: 720px) {
  .aao-rule { grid-template-columns: 1fr; }
  .aao-both { grid-template-columns: 1fr; }
}
.fp-car.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* Gerätewart */
.gw-tile.bad b { color: var(--danger); }
.gw-tile.warn b { color: var(--warn); }
.gw-h { margin: 0 0 10px; font-size: 18px; }
.gw-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.gw-car { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--good); border-radius: 12px; padding: 12px 14px; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.gw-car:hover { background: var(--surface-2); }
.gw-car.gelb { border-left-color: var(--warn); }
.gw-car.rot { border-left-color: var(--danger); }
.gw-car-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gw-car-head b { font-family: var(--font-c); font-size: 21px; }
.gw-car ul, .gw-ready ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.gw-ready { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--good); border-radius: 12px; padding: 12px 16px; }
.gw-ready.gelb { border-left-color: var(--warn); }
.gw-ready.rot { border-left-color: var(--danger); }
.gw-ready-head { display: flex; gap: 10px; align-items: center; }
.gw-sel { font-size: 14px; font-weight: 600; color: var(--text-2); }
table.gw-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.gw-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.gw-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.gw-table tr.click { cursor: pointer; }
table.gw-table tr.click:hover td { background: var(--surface-2); }
table.gw-table.small { font-size: 13px; }
.gw-colmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.gw-colmap label { display: flex; flex-direction: column; gap: 3px; }
.gw-inline { display: flex; gap: 8px; align-items: center; }
.gw-inline input { flex: 1; min-width: 0; }
.gw-link { display: flex; flex-direction: column; gap: 8px; }
.gw-link code { padding: 8px 10px; border-radius: 8px; background: var(--surface-3); word-break: break-all; font-size: 13px; }
.gw-photo { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; object-fit: contain; background: var(--surface-3); }
.gw-rowbtn { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; font: inherit; color: inherit; }
.gw-rowbtn:first-child { border-top: 0; }
/* Auswahl eines Geräts */
.gw-pick { position: relative; }
.gw-pick input { width: 100%; }
.gw-pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; padding: 4px; }
.gw-pick-list button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }
.gw-pick-list button:hover { background: var(--surface-2); }
.gw-pick-list button span { display: flex; flex-direction: column; }
.gw-pick-list small { color: var(--muted); }
.gw-pick-list .gw-pick-close { justify-content: center; color: var(--muted); font-size: 13px; }
.gw-pick-cur { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.gw-pick-cur > span { flex: 1; }
/* Prüfung am Handy */
.gw-run { max-width: 920px; }
.gw-points { display: flex; flex-direction: column; }
.gw-pt { padding: 12px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.gw-pt:first-child { border-top: 0; }
.gw-pt.done { background: color-mix(in srgb, var(--good-soft) 40%, transparent); }
.gw-pt.bad { background: var(--danger-soft); }
.gw-pt-text { font-size: 15.5px; }
.gw-pt-text small { display: block; color: var(--muted); font-size: 13px; }
.gw-pt-in { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.gw-res { display: inline-flex; gap: 4px; }
.gw-res button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; padding: 8px 11px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 42px; }
.gw-res button .ic { width: 18px; height: 18px; }
.gw-res button.on.ok { background: var(--good); border-color: var(--good); color: #fff; }
.gw-res button.on.bad { background: var(--danger); border-color: var(--danger); color: #fff; }
.gw-res button.on.na { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.gw-val { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.gw-val input { width: 110px; min-height: 42px; }
.gw-val small { color: var(--muted); font-size: 12.5px; }
.gw-cnt input { width: 80px; text-align: center; }
.gw-txt { width: 240px; max-width: 100%; }
.gw-note { grid-column: 1 / -1; width: 100%; }
.gw-runbar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.gw-ready-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.gw-ready-pick button { flex: 1; min-width: 150px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 2px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 12px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text-2); }
.gw-ready-pick button.on.ok { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.gw-ready-pick button.on.bad { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
@media (max-width: 640px) {
  .gw-pt { grid-template-columns: 1fr; padding: 12px 14px; }
  .gw-pt-in { justify-content: flex-start; }
  .gw-res { width: 100%; }
  .gw-res button { flex: 1; justify-content: center; padding: 10px 6px; }
  .gw-txt { width: 100%; }
}
/* Checklisten-Baukasten */
.gw-sectitle { flex: 1; font-weight: 700; font-size: 17px; min-width: 0; }
.gw-edpts { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.gw-edpt { display: grid; grid-template-columns: minmax(0, 2fr) 120px minmax(0, 1.4fr) 118px; gap: 6px; align-items: center; }
.gw-edpt-x { display: flex; gap: 6px; align-items: center; min-width: 0; }
.gw-edpt-x .gw-hint { flex: 1; min-width: 0; }
@media (max-width: 900px) { .gw-edpt { grid-template-columns: 1fr 120px; } .gw-edpt-x { grid-column: 1 / -1; flex-wrap: wrap; } .gw-edpt .le-act { grid-column: 1 / -1; justify-content: flex-end; } }
/* Tickets */
.gw-log { padding: 8px 18px 4px; display: flex; flex-direction: column; gap: 12px; }
.gw-log-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.gw-log-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); }
.gw-log-ic .ic { width: 16px; height: 16px; }
.gw-log-row.kommentar .gw-log-ic { background: var(--info-soft); color: var(--info); }
.gw-log-row.status .gw-log-ic { background: var(--good-soft); color: var(--good); }
.gw-log-row.brief .gw-log-ic { background: var(--warn-soft); color: var(--warn); }
.gw-log-text { white-space: pre-line; }
.gw-log-row.kommentar .gw-log-text { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.gw-log-photo { max-width: 220px; max-height: 160px; border-radius: 8px; margin-top: 6px; display: block; }
.gw-comment { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.gw-comment textarea { width: 100%; }
.gw-quick { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .row.gw-wrap { flex-wrap: wrap; align-items: flex-start; }
  .row.gw-wrap .main { flex: 1 1 calc(100% - 40px); }
  .row.gw-wrap .end { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .gw-cars { grid-template-columns: 1fr; }
}
.gw-tools > select { width: auto; max-width: 100%; }
@media (max-width: 640px) { .gw-res { width: auto; flex: 1; } .gw-tools > select { width: 100%; } }
.gw-due-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gw-due-grid label { display: flex; flex-direction: column; gap: 4px; }
.gw-contacts { display: flex; flex-direction: column; gap: 6px; }
.gw-contact { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.gw-contact > span { flex: 1; }
.gw-ai-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.gw-ai-row.warn { border-color: var(--warn); background: var(--warn-soft); }

/* iPad-App: Verwaltung der iPads */
.tb-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2, var(--bg)); color: var(--muted); flex: none; }
.tb-pair { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.tb-qr { width: 240px; max-width: 100%; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.tb-qr svg { display: block; width: 100%; height: auto; }
.tb-pair > .stack { flex: 1; min-width: 220px; }
.tb-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 30px; font-weight: 700; letter-spacing: 0.08em; }
.tb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; word-break: break-all; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.check.off { opacity: 0.55; }
.small.err, .err { color: var(--danger); }
.pin-state { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
