/* ============================================================
   SentryX · Orbital Glass Design System
   Dunkler Leitstand, schwebende Glas-Ebenen, eine Akzentfarbe.
   ============================================================ */
:root {
    --bg-0: #05070D;
    --bg-1: #0A0F1A;
    --glass: rgba(17, 24, 39, 0.62);
    --glass-strong: rgba(20, 28, 45, 0.88);
    --line: rgba(148, 170, 220, 0.13);
    --line-soft: rgba(148, 170, 220, 0.07);
    --text: #EAF0FA;
    --muted: #8B97AF;
    --accent: #58C7F3;
    --accent-ink: #04121B;
    --accent-dim: color-mix(in srgb, var(--accent) 16%, transparent);
    --ok: #3FD98C;
    --warn: #FFB13D;
    --crit: #FF5D5D;
    --ai: #A78BFA;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 10px;
    --dock-w: 92px;
    --font-ui: "Segoe UI Variable Display", -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    --font-mono: "Cascadia Code", ui-monospace, "SF Mono", Consolas, monospace;
    --shadow-1: 0 8px 28px rgba(2, 5, 12, 0.55);
    --shadow-2: 0 18px 60px rgba(2, 5, 12, 0.65);
    --ease: cubic-bezier(0.32, 0.9, 0.35, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-ui); }
html { background: var(--bg-0); color-scheme: dark; }
body { background: var(--bg-0); color: var(--text); min-height: 100dvh; overflow-x: hidden; }
::selection { background: var(--accent-dim); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- Szene (Hintergrund) ---- */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 90% 60% at 70% -20%, rgba(88, 199, 243, 0.10), transparent 65%),
                radial-gradient(ellipse 60% 50% at -10% 90%, rgba(167, 139, 250, 0.06), transparent 70%),
                linear-gradient(180deg, var(--bg-1), var(--bg-0) 60%); }
.scene-grid { position: absolute; inset: 0; opacity: 0.5;
    background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%); }
.scene-glow { position: absolute; inset: 0; opacity: 0.65; filter: blur(60px);
    background: radial-gradient(circle 340px at 82% 12%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }

/* ---- App-Rahmen ---- */
.app { position: relative; z-index: 1; display: flex; min-height: 100dvh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 20px 20px calc(var(--dock-w) + 20px); }
.content { flex: 1; width: 100%; max-width: 1460px; margin: 0 auto; padding-top: 16px; animation: viewIn 0.34s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Dock (schwebende Navigation) ---- */
.dock { position: fixed; left: 14px; top: 14px; bottom: 14px; width: var(--dock-w); z-index: 40;
    display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 8px;
    background: var(--glass); border: 1px solid var(--line); border-radius: 24px;
    backdrop-filter: blur(26px); box-shadow: var(--shadow-1); }
.dock-brand { display: flex; align-items: center; justify-content: center; height: 52px; margin-bottom: 4px;
    color: var(--accent); position: relative; }
.dock-brand .ic { width: 30px; height: 30px; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 55%, transparent)); }
.dock-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.dock-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: none; }
.dock-foot { display: flex; flex-direction: column; gap: 4px; }
.dock-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px;
    background: none; border: none; border-radius: var(--r-md); color: var(--muted); cursor: pointer;
    font-size: 0.62rem; font-weight: 650; letter-spacing: 0.2px; position: relative;
    transition: color 0.18s, background 0.18s, transform 0.18s var(--ease); }
.dock-btn .ic { width: 21px; height: 21px; }
.dock-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); transform: translateY(-1px); }
.dock-btn.active { color: var(--accent); background: var(--accent-dim); }
.dock-btn.active::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--accent);
    box-shadow: 0 0 12px var(--accent); }
.dock-btn .n-badge { position: absolute; top: 6px; right: 10px; min-width: 15px; height: 15px; padding: 0 4px;
    border-radius: 8px; background: var(--crit); color: #fff; font-size: 0.58rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; }
.dock-btn .n-badge[hidden] { display: none; }

/* ---- Topbar & Puls-Leiste ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 4px 2px 0; max-width: 1460px; margin: 0 auto; width: 100%; }
.pulse-bar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; min-height: 48px;
    background: var(--glass); border: 1px solid var(--line); border-radius: 16px;
    backdrop-filter: blur(26px); flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pulse-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 0.78rem; color: var(--muted); }
.pulse-item strong { color: var(--text); font-family: var(--font-mono); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.pulse-item .lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pulse-item .lamp.ok { background: var(--ok); box-shadow: 0 0 9px var(--ok); animation: breathe 3.2s ease-in-out infinite; }
.pulse-item .lamp.warn { background: var(--warn); box-shadow: 0 0 9px var(--warn); }
.pulse-item .lamp.crit { background: var(--crit); box-shadow: 0 0 10px var(--crit); animation: breathe 1.1s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.pulse-clock { margin-left: auto; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.03em; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex: none; }
.top-icon { position: relative; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
    background: var(--glass); border: 1px solid var(--line); border-radius: 14px; color: var(--muted);
    cursor: pointer; backdrop-filter: blur(26px); transition: color 0.18s, border-color 0.18s; }
.top-icon:hover { color: var(--text); border-color: rgba(148, 170, 220, 0.3); }
.top-icon .ic { width: 20px; height: 20px; }
.top-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px;
    background: var(--glass); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(26px); }
.user-chip .avatar { width: 32px; height: 32px; }
.user-chip .u-name { font-size: 0.8rem; font-weight: 700; line-height: 1.15; }
.user-chip .u-role { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.avatar { width: 36px; height: 36px; border-radius: 11px; background: var(--accent-dim); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.82rem; flex: none; }

/* ---- Panels & Struktur ---- */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg);
    backdrop-filter: blur(26px); box-shadow: var(--shadow-1); padding: 20px; position: relative;
    transition: border-color 0.25s, transform 0.25s var(--ease); }
.panel.hoverable:hover { border-color: rgba(148, 170, 220, 0.28); transform: translateY(-2px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 1.02rem; font-weight: 750; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.panel-head h2 .ic { width: 18px; height: 18px; color: var(--accent); }
.panel-head .actions { display: flex; gap: 8px; align-items: center; }
.eyebrow { font-size: 0.64rem; font-weight: 750; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 2px 20px; flex-wrap: wrap; }
.view-head h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.view-head .sub { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.view-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- KPI-Kacheln ---- */
.kpi { padding: 18px; }
.kpi .k-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .k-label .ic { width: 15px; height: 15px; color: var(--accent); }
.kpi .k-value { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 750; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi .k-sub { font-size: 0.74rem; color: var(--muted); margin-top: 6px; }
.kpi.k-ok .k-value { color: var(--ok); } .kpi.k-warn .k-value { color: var(--warn); } .kpi.k-crit .k-value { color: var(--crit); } .kpi.k-ai .k-value { color: var(--ai); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px; border: none; border-radius: var(--r-md);
    font-size: 0.88rem; font-weight: 700; cursor: pointer; letter-spacing: 0.1px;
    transition: transform 0.14s var(--ease), filter 0.16s, background 0.16s, border-color 0.16s; }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 84%, #fff 16%), var(--accent));
    color: var(--accent-ink); box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: rgba(255, 255, 255, 0.045); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(148, 170, 220, 0.3); }
.btn-danger { background: color-mix(in srgb, var(--crit) 88%, #000); color: #fff; }
.btn-warn { background: var(--warn); color: #1d1200; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 0.76rem; border-radius: var(--r-sm); }
.btn-sm .ic { width: 14px; height: 14px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-icon { min-height: 38px; width: 38px; padding: 0; }

/* ---- Formulare ---- */
label { display: block; font-size: 0.66rem; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: 1.3px; margin: 0 0 6px 2px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
    font-size: 0.92rem; background: rgba(8, 12, 22, 0.75); color: var(--text); margin-bottom: 14px;
    transition: border-color 0.16s, box-shadow 0.16s; }
input::placeholder, textarea::placeholder { color: rgba(139, 151, 175, 0.55); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
input[type="time"], input[type="date"], input[type="number"] { font-family: var(--font-mono); }
input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }
input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 20px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); transition: background 0.2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; border-radius: 50%; background: var(--muted); transition: all 0.2s var(--ease); }
.switch input:checked + i { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.switch input:checked + i::after { left: 22px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.toggle-row span { font-size: 0.86rem; }

/* ---- Segment-Schalter & Tags ---- */
.seg { display: inline-flex; background: rgba(8, 12, 22, 0.7); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { min-height: 34px; padding: 5px 14px; border: none; border-radius: 9px; background: transparent;
    color: var(--muted); font-size: 0.76rem; font-weight: 750; cursor: pointer; transition: all 0.16s; }
.seg button.sel { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px;
    font-size: 0.66rem; font-weight: 750; letter-spacing: 0.3px; background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line); color: var(--muted); }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.3px; }
.badge-ok { background: rgba(63, 217, 140, 0.14); color: var(--ok); }
.badge-warn { background: rgba(255, 177, 61, 0.15); color: var(--warn); }
.badge-crit { background: rgba(255, 93, 93, 0.15); color: var(--crit); }
.badge-info { background: var(--accent-dim); color: var(--accent); }
.badge-ai { background: rgba(167, 139, 250, 0.15); color: var(--ai); }
.badge-mute { background: rgba(255, 255, 255, 0.06); color: var(--muted); }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { color: var(--muted); font-size: 0.63rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 750; white-space: nowrap; }
td.mono, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; transition: background 0.14s; }
tr.clickable:hover { background: rgba(255, 255, 255, 0.035); }

/* ---- Listen / Feed ---- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; gap: 12px; padding: 13px 15px; background: rgba(8, 12, 22, 0.55);
    border: 1px solid var(--line-soft); border-left: 3px solid var(--muted); border-radius: var(--r-md);
    animation: feedIn 0.3s var(--ease); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.feed-item .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--muted); }
.feed-item.sev-info { border-left-color: var(--accent); } .feed-item.sev-info .ic { color: var(--accent); }
.feed-item.sev-warnung { border-left-color: var(--warn); } .feed-item.sev-warnung .ic { color: var(--warn); }
.feed-item.sev-kritisch { border-left-color: var(--crit); } .feed-item.sev-kritisch .ic { color: var(--crit); }
.feed-item .f-title { font-size: 0.86rem; font-weight: 750; }
.feed-item .f-msg { font-size: 0.8rem; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.feed-item .f-meta { font-size: 0.66rem; color: var(--muted); margin-top: 6px; font-family: var(--font-mono); }

/* ---- Drawer (Seiten-Sheet) ---- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(3, 5, 10, 0.6); backdrop-filter: blur(5px); animation: fadeIn 0.22s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 95; width: min(480px, calc(100vw - 24px));
    background: var(--glass-strong); border: 1px solid var(--line); border-radius: 22px;
    backdrop-filter: blur(30px); box-shadow: var(--shadow-2); display: flex; flex-direction: column;
    animation: drawerIn 0.32s var(--ease); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 22px 12px; }
.drawer-head h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 22px 18px; }
.drawer-foot { padding: 14px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); display: flex; gap: 10px; }
.drawer-foot .btn { flex: 1; }
.drawer-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.drawer-x:hover { color: var(--text); }
.drawer-x .ic { width: 16px; height: 16px; }

/* ---- Toasts ---- */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px;
    background: var(--glass-strong); border: 1px solid var(--line); border-left: 3px solid var(--muted);
    border-radius: 14px; font-size: 0.84rem; line-height: 1.4; box-shadow: var(--shadow-2);
    backdrop-filter: blur(26px); animation: toastIn 0.28s var(--ease); pointer-events: auto; }
.toast .ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast-success { border-left-color: var(--ok); } .toast-success .ic { color: var(--ok); }
.toast-error { border-left-color: var(--crit); } .toast-error .ic { color: var(--crit); }
.toast-info { border-left-color: var(--accent); } .toast-info .ic { color: var(--accent); }
.toast.out { animation: toastOut 0.25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---- Command-Palette ---- */
.cmdk-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(3, 5, 10, 0.65); backdrop-filter: blur(6px); animation: fadeIn 0.18s; }
.cmdk { position: fixed; top: 14vh; left: 50%; transform: translateX(-50%); z-index: 155; width: min(620px, calc(100vw - 32px));
    background: var(--glass-strong); border: 1px solid var(--line); border-radius: 20px;
    backdrop-filter: blur(30px); box-shadow: var(--shadow-2); overflow: hidden; animation: cmdkIn 0.26s var(--ease); }
@keyframes cmdkIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cmdk input { margin: 0; border: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; padding: 18px 20px; font-size: 1rem; }
.cmdk input:focus { box-shadow: none; }
.cmdk-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; cursor: pointer; font-size: 0.88rem; }
.cmdk-item .ic { width: 17px; height: 17px; color: var(--muted); }
.cmdk-item.sel, .cmdk-item:hover { background: var(--accent-dim); }
.cmdk-item.sel .ic, .cmdk-item:hover .ic { color: var(--accent); }
.cmdk-item .k-hint { margin-left: auto; font-size: 0.64rem; color: var(--muted); font-family: var(--font-mono); }

/* ---- Login / Setup ---- */
.auth-wrap { position: relative; z-index: 1; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: var(--glass); border: 1px solid var(--line); border-radius: 26px;
    backdrop-filter: blur(30px); box-shadow: var(--shadow-2); padding: 34px 30px; animation: viewIn 0.4s var(--ease); }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .orb { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 22px; position: relative;
    background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    display: flex; align-items: center; justify-content: center; color: var(--accent);
    box-shadow: 0 14px 44px color-mix(in srgb, var(--accent) 25%, transparent); }
.auth-brand .orb .ic { width: 36px; height: 36px; }
.auth-brand .orb img { width: 100%; height: 100%; object-fit: contain; border-radius: 22px; }
.auth-brand h1 { font-size: 1.7rem; font-weight: 850; letter-spacing: -0.02em; }
.auth-brand p { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 2.6px; margin-top: 7px; }
.auth-card .btn { width: 100%; }
.auth-note { font-size: 0.74rem; color: var(--muted); text-align: center; margin-top: 16px; line-height: 1.5; }

/* ---- Leere Zustaende & Skeleton ---- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); font-size: 0.88rem; }
.empty .ic { width: 34px; height: 34px; margin: 0 auto 12px; opacity: 0.5; display: block; }
.skeleton { border-radius: var(--r-md); background: linear-gradient(100deg, rgba(255,255,255,0.04) 40%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Dienstplan-Board ---- */
.roster-board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.roster-day { min-width: 150px; }
.roster-day-head { text-align: center; padding: 8px 4px 10px; }
.roster-day-head .d-name { font-size: 0.66rem; font-weight: 750; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.roster-day-head .d-num { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 750; margin-top: 2px; }
.roster-day-head.today .d-num { color: var(--accent); }
.roster-cells { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.shift-card { padding: 10px 12px; background: rgba(8, 12, 22, 0.6); border: 1px solid var(--line-soft);
    border-radius: var(--r-md); cursor: pointer; transition: border-color 0.16s, transform 0.16s var(--ease); position: relative; }
.shift-card:hover { border-color: rgba(148, 170, 220, 0.35); transform: translateY(-1px); }
.shift-card .s-time { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 750; }
.shift-card .s-loc { font-size: 0.72rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-card .s-fill { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.shift-card .s-fill .bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.shift-card .s-fill .bar i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.shift-card.understaffed .s-fill .bar i { background: var(--warn); }
.shift-card.conflict { border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.shift-card .s-count { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-soft); font-size: 0.74rem; font-weight: 650; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ---- Karte (Leaflet) ---- */
.map-panel { padding: 0; overflow: hidden; }
.map-box { height: 440px; width: 100%; background: var(--bg-1); }
.leaflet-container { background: #0B1220; font-family: var(--font-ui); }
.leaflet-tile { filter: brightness(0.62) contrast(1.05) saturate(0.35) hue-rotate(185deg); }
.leaflet-control-attribution { background: rgba(5, 7, 13, 0.7) !important; color: var(--muted) !important; font-size: 0.6rem !important; }
.leaflet-control-attribution a { color: var(--accent) !important; }
.guard-marker { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.66rem;
    border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.guard-marker.alarm { background: var(--crit); color: #fff; animation: breathe 1s infinite; }

/* ---- Alarm-Vollbild ---- */
.alarm-takeover { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    background: rgba(40, 4, 4, 0.82); backdrop-filter: blur(10px); animation: fadeIn 0.2s; }
.alarm-takeover .panel { max-width: 460px; width: calc(100vw - 40px); border-color: color-mix(in srgb, var(--crit) 50%, transparent); text-align: center; padding: 32px; }
.alarm-takeover .a-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: rgba(255, 93, 93, 0.15);
    display: flex; align-items: center; justify-content: center; color: var(--crit); animation: breathe 1.1s infinite; }
.alarm-takeover .a-icon .ic { width: 30px; height: 30px; }

/* ---- Responsiv ---- */
@media (max-width: 1100px) {
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    :root { --dock-w: 0px; }
    .main { padding: 12px 14px calc(84px + env(safe-area-inset-bottom)); }
    .dock { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; flex-direction: row; align-items: center;
        padding: 6px 8px; border-radius: 20px; }
    .dock-brand { display: none; }
    .dock-nav { flex-direction: row; flex: 1; justify-content: space-around; overflow-x: auto; }
    .dock-foot { flex-direction: row; }
    .dock-btn { padding: 8px 10px; }
    .dock-btn span { display: none; }
    .dock-btn.active::before { left: 50%; top: auto; bottom: -6px; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 3px 3px 0 0; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 88dvh; border-radius: 22px 22px 18px 18px; }
    .pulse-clock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print {
    .dock, .topbar, .toast-wrap, .scene, .drawer, .drawer-backdrop { display: none !important; }
    body, html { background: #fff; }
    .app .main { padding: 0; }
    .panel { background: #fff; color: #000; border: 1px solid #ddd; box-shadow: none; }
}
