/* MedTech Operations Cockpit – Designsystem v2: ruhig, modern, subtiles Glas, Farben nur für Status. */
:root {
  --bg: #0b1116; --bg-2: #0f171d; --panel: rgba(20,29,37,.86); --panel-solid: #141d25; --panel-2: #1a2630; --border: #233240; --border-strong: #33475a;
  --text: #e7eef4; --muted: #8fa0b0; --dim: #5f7080; --accent: #3b82f6; --accent-text: #ffffff; --primary: #14b8a6; --primary-bg: rgba(20,184,166,.14);
  --green: #22c55e; --yellow: #eab308; --orange: #f97316; --red: #ef4444; --blue: #3b82f6; --gray: #6b7280; --purple: #a855f7;
  --green-bg: rgba(34,197,94,.14); --yellow-bg: rgba(234,179,8,.14); --orange-bg: rgba(249,115,22,.16); --red-bg: rgba(239,68,68,.16); --blue-bg: rgba(59,130,246,.14); --gray-bg: rgba(107,114,128,.16); --purple-bg: rgba(168,85,247,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.5); --shadow-lg: 0 20px 60px -20px rgba(0,0,0,.7); --radius: 14px; --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --topbar-h: 58px; --nav-w: 232px; --glass: blur(14px) saturate(140%);
}
[data-theme="light"] {
  --bg: #eef2f5; --bg-2: #e6ebf0; --panel: rgba(255,255,255,.82); --panel-solid: #ffffff; --panel-2: #f1f5f8; --border: #d6dee6; --border-strong: #b8c4cf;
  --text: #0f1720; --muted: #55657a; --dim: #8593a3; --accent: #2563eb; --primary: #0d9488; --primary-bg: rgba(13,148,136,.12);
  --green-bg: rgba(34,197,94,.14); --yellow-bg: rgba(202,138,4,.14); --orange-bg: rgba(234,88,12,.14); --red-bg: rgba(220,38,38,.12); --blue-bg: rgba(37,99,235,.12); --gray-bg: rgba(107,114,128,.12); --purple-bg: rgba(147,51,234,.12);
  --shadow: 0 1px 2px rgba(15,23,32,.06), 0 8px 24px -12px rgba(15,23,32,.18); --shadow-lg: 0 20px 60px -20px rgba(15,23,32,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: radial-gradient(1200px 600px at 10% -10%, var(--primary-bg), transparent 60%), radial-gradient(900px 500px at 100% 0%, var(--blue-bg), transparent 55%), var(--bg); background-attachment: fixed; color: var(--text); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12.5px; } .tiny { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; } .center { text-align: center; }
.flex { display: flex; gap: 8px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .col { flex-direction: column; align-items: stretch; } .grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; } .mt-lg { margin-top: 24px; } .gap-lg { gap: 16px; }
h1, h2, h3 { margin: 0 0 8px; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; } h3 { font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; } .page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -4px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 24px; height: 24px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--primary-bg); } 50% { box-shadow: 0 0 0 8px transparent; } }
.main > * { animation: fadeUp .25s ease both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 440px; background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--primary); }
.login-logo { font-weight: 800; letter-spacing: .06em; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.logo-mark { display: inline-block; width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--primary), var(--accent)); position: relative; flex-shrink: 0; }
.logo-mark::before { content: ""; position: absolute; left: 9px; top: 4px; width: 2px; height: 12px; background: #fff; border-radius: 1px; }
.logo-mark::after { content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 2px; background: #fff; border-radius: 1px; }
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.login-org { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.org-logo { max-height: 64px; max-width: 260px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.org-logo.small { max-height: 32px; max-width: 120px; padding: 2px; }
.brand-org { display: block; font-size: 10px; letter-spacing: .1em; color: var(--primary); font-weight: 600; margin-top: 1px; }
.ecg { width: 100%; height: 34px; filter: drop-shadow(0 0 6px var(--primary-bg)); }
.ecg path { stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 600; animation: ecg 3s linear infinite; }
@keyframes ecg { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

/* Topbar */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 14px; background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .06em; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.status-strip { display: flex; gap: 18px; align-items: center; flex: 1; overflow: hidden; }
.strip-item { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex-shrink: 0; color: var(--text); }
.strip-item:hover { text-decoration: none; }
.strip-item .lbl { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.strip-item .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-item .val.small-val { font-family: var(--font); font-size: 13px; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.search { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding-left: 10px; transition: border-color .15s; }
.search:focus-within { border-color: var(--accent); }
.search input { background: transparent; border: 0; color: var(--text); width: 250px; padding: 7px 4px; font-size: 13.5px; outline: none; min-height: 0; }
.search .kbd { margin-right: 6px; }
.clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); padding: 0 8px; white-space: nowrap; }
.badge-dot { position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.icon { position: relative; }
.offline-banner { background: var(--orange-bg); border-bottom: 1px solid var(--orange); color: var(--text); padding: 8px 16px; font-size: 13.5px; display: flex; gap: 12px; align-items: center; justify-content: center; }
button.avatar { border: 0; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); flex-shrink: 0; letter-spacing: .02em; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; } .avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-stack { display: inline-flex; } .avatar-stack .avatar { margin-left: -6px; border: 2px solid var(--panel-solid); } .avatar-stack .avatar:first-child { margin-left: 0; }

/* Layout */
.layout { display: flex; flex: 1; min-height: 0; }
.sidenav { width: var(--nav-w); background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-right: 1px solid var(--border); padding: 10px 8px 20px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; flex-shrink: 0; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); font-size: 13.5px; transition: background .12s; border-left: 3px solid transparent; }
.sidenav a:hover { background: var(--panel-2); text-decoration: none; }
.sidenav a.active { background: var(--primary-bg); border-left-color: var(--primary); font-weight: 600; }
.sidenav .nav-group { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 12px 10px 4px; font-weight: 700; }
.sidenav .cnt { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--panel-2); padding: 0 6px; border-radius: 8px; }
.sidenav .cnt.hot { color: #fff; background: var(--red); font-weight: 700; }
.nav-ico { width: 18px; text-align: center; opacity: .85; display: inline-flex; justify-content: center; }
.main { flex: 1; min-width: 0; padding: 18px 22px 90px; }
.bottomnav { display: none; }
.fab { position: fixed; right: 18px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--red)); color: #fff; border: 0; box-shadow: 0 10px 30px -8px rgba(239,68,68,.7); display: grid; place-items: center; cursor: pointer; z-index: 45; animation: pulse 2.6s infinite; }
.fab .ico { width: 26px; height: 26px; stroke-width: 2.2; }

/* Cards & grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.card { background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; transition: border-color .15s; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; min-height: 26px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head h2::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }
.big-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.mid-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 700; line-height: 1.1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kv dd.text { font-family: var(--font); }
.stat-row { display: flex; gap: 18px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; color: var(--text); } a.stat:hover { text-decoration: none; }
.stat .lbl { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; }
.pos { color: var(--green); } .neg { color: var(--red); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); transition: transform .12s, border-color .12s; }
.tile:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.tile .v { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.1; } .tile .l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile.ROT .v { color: var(--red); } .tile.ORANGE .v { color: var(--orange); } .tile.GELB .v { color: var(--yellow); } .tile.GRUEN .v { color: var(--green); } .tile.BLAU .v { color: var(--blue); }

/* Buttons */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text); border-radius: 9px; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; min-height: 38px; letter-spacing: .01em; transition: background .12s, border-color .12s, transform .08s; }
.btn:hover { border-color: var(--accent); text-decoration: none; } .btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-green { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; } .btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { padding: 2px 7px; min-height: 24px; font-size: 11.5px; border-radius: 6px; }
.btn-lg { padding: 14px 18px; font-size: 15px; min-height: 52px; }
.btn-xl { padding: 18px 20px; font-size: 15px; min-height: 64px; text-transform: uppercase; letter-spacing: .05em; }
.btn-block { width: 100%; }
.btn.active { border-color: var(--accent); background: var(--blue-bg); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { font: inherit; border: 0; background: transparent; color: var(--muted); padding: 5px 10px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.seg button.active { background: var(--panel-solid); color: var(--text); box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.chip.active { border-color: var(--accent); background: var(--blue-bg); } .chip .x { opacity: .6; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--bg-2); }

/* Status colours */
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.light.ROT, .light.KRITISCH { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.light.ORANGE, .light.HOCH { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg); }
.light.GELB { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-bg); }
.light.GRUEN, .light.NIEDRIG { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.light.BLAU, .light.NORMAL { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.light.GRAU { background: var(--gray); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.tag.ROT, .tag.KRITISCH, .tag.UEBERFAELLIG, .tag.FEHLT, .tag.DEFEKT, .tag.AUSSER_BETRIEB, .tag.FEHLER, .tag.KONFLIKT { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.tag.ORANGE, .tag.HOCH, .tag.HEUTE, .tag.ANGEFORDERT, .tag.WARTET, .tag.WARTET_ERSATZTEIL, .tag.WARTET_HERSTELLER { background: var(--orange-bg); color: var(--orange); border-color: var(--orange); }
.tag.GELB, .tag.MORGEN, .tag.ERWARTET, .tag.PAUSE, .tag.PAUSIERT, .tag.OFFEN_KORR, .tag.NEU { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow); }
.tag.GRUEN, .tag.NIEDRIG, .tag.ERLEDIGT, .tag.ABGESCHLOSSEN, .tag.VORHANDEN, .tag.ARBEITEND, .tag.LAEUFT, .tag.SYNCHRONISIERT, .tag.ONLINE, .tag.IN_BETRIEB, .tag.GENEHMIGT, .tag.REPARIERT { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.tag.BLAU, .tag.NORMAL, .tag.IN_ARBEIT, .tag.IN_BEARBEITUNG, .tag.INFO, .tag.WAVEWARE, .tag.GEPLANT { background: var(--blue-bg); color: var(--blue); border-color: var(--blue); }
.tag.LILA, .tag.ENTSCHEIDUNG, .tag.MEETING { background: var(--purple-bg); color: var(--purple); border-color: var(--purple); }
.tag.GRAU, .tag.OFFEN, .tag.NICHT_GESTARTET, .tag.BEENDET, .tag.COCKPIT, .tag.LOKAL, .tag.UNTERBROCHEN, .tag.PRIVAT { background: var(--gray-bg); color: var(--muted); border-color: var(--border-strong); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; }
.hint { border-left: 4px solid var(--blue); background: var(--blue-bg); padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.hint.ROT { border-color: var(--red); background: var(--red-bg); } .hint.ORANGE { border-color: var(--orange); background: var(--orange-bg); } .hint.GELB { border-color: var(--yellow); background: var(--yellow-bg); } .hint.GRUEN { border-color: var(--green); background: var(--green-bg); }
.hint .body { flex: 1; min-width: 200px; } .hint strong { display: block; margin-bottom: 2px; }
.source-tag { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border: 1px dashed var(--border-strong); padding: 1px 6px; border-radius: 4px; }
.prio-strip { border-left: 4px solid var(--border-strong) !important; }
.prio-strip.KRITISCH { border-left-color: var(--red) !important; } .prio-strip.HOCH { border-left-color: var(--orange) !important; } .prio-strip.NORMAL { border-left-color: var(--blue) !important; } .prio-strip.NIEDRIG { border-left-color: var(--gray) !important; }

/* Lists & tables */
.list { display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; gap: 12px; align-items: center; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); color: var(--text); transition: border-color .12s, transform .12s; }
.item:hover { border-color: var(--border-strong); text-decoration: none; }
.item .ttl { font-weight: 600; } .item .sub { color: var(--muted); font-size: 12.5px; }
.item .time { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 44px; }
.item .body { flex: 1; min-width: 0; } .item .actions { display: flex; gap: 6px; flex-shrink: 0; }
.item.clickable { cursor: pointer; }
.item.done { opacity: .55; text-decoration: line-through; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; font-weight: 700; position: relative; }
td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--panel-2); }
tr.today td { background: var(--blue-bg); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: var(--text); } th .sort-ind { margin-left: 4px; color: var(--accent); }
th[draggable] { cursor: grab; } th.drag-over { box-shadow: inset 3px 0 0 var(--accent); }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
label.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; min-height: 38px; width: 100%; transition: border-color .12s; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form { display: grid; gap: 12px; } .form-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } .form-row-3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr 1fr; }
.form-error { color: var(--red); font-size: 13px; }
.checks { display: grid; gap: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filters label { min-width: 140px; } .filters input, .filters select { min-height: 36px; padding: 6px 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; flex-wrap: wrap; overflow-x: auto; }
.tabs a, .tabs button { padding: 8px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.upload-zone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; }
.upload-zone:hover, .upload-zone.over { border-color: var(--accent); background: var(--blue-bg); }
.prio-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.prio-pick input { display: none; }
.prio-pick span { display: block; text-align: center; padding: 9px 4px; border: 1px solid var(--border-strong); border-radius: 9px; font-weight: 700; font-size: 12px; cursor: pointer; letter-spacing: .04em; }
.prio-pick input:checked + span { color: #fff; border-color: transparent; }
.prio-pick .NIEDRIG input:checked + span { background: var(--gray); } .prio-pick .NORMAL input:checked + span { background: var(--blue); } .prio-pick .HOCH input:checked + span { background: var(--orange); } .prio-pick .KRITISCH input:checked + span { background: var(--red); }

/* Modal & toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 12px; animation: fadeUp .15s ease; }
.modal { background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 20px; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 880px; }
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast-root { position: fixed; bottom: 20px; right: 20px; pointer-events: none; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: 380px; }
.toast { background: var(--panel-solid); border: 1px solid var(--border-strong); border-left: 4px solid var(--blue); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: fadeUp .2s ease; }
.toast.ok { border-left-color: var(--green); } .toast.err { border-left-color: var(--red); } .toast.warn { border-left-color: var(--orange); }

/* Widgets (Dashboard, DnD) */
.widget-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; }
.widget { position: relative; min-height: 120px; }
.widget.size-s { grid-column: span 3; } .widget.size-m { grid-column: span 4; } .widget.size-l { grid-column: span 6; } .widget.size-xl { grid-column: span 12; } .widget.size-h { grid-column: span 8; }
.widget.hidden-w { display: none; }
.widget-tools { position: absolute; top: 8px; right: 10px; display: none; gap: 2px; z-index: 2; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.edit-mode .widget-tools { display: flex; }
.widget-tools button { border: 0; background: transparent; color: var(--muted); width: 26px; height: 24px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; font-size: 12px; }
.widget-tools button:hover { background: var(--panel-2); color: var(--text); }
.edit-mode .widget { cursor: grab; outline: 1px dashed var(--border-strong); outline-offset: 2px; }
.edit-mode .widget .card-head h2::before { background: var(--accent); }
.widget.dragging { opacity: .4; } .widget.drag-over { outline: 2px solid var(--accent); }
.drag-handle { cursor: grab; color: var(--dim); user-select: none; } .drag-handle:active { cursor: grabbing; }
.group-head { grid-column: span 12; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 2px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.group-head::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.group-head.drag-over { color: var(--accent); }
.widget-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.widget-picker .wp { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); cursor: pointer; }
.widget-picker .wp:hover { border-color: var(--accent); } .widget-picker .wp.on { border-color: var(--primary); background: var(--primary-bg); }
.widget-picker .wp .t { font-weight: 600; font-size: 13px; } .widget-picker .wp .d { font-size: 11.5px; color: var(--muted); }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; }
.edit-bar { position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 30; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; background: var(--panel-solid); border: 1px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow-lg); }

/* DataView: Tabelle / Karten / Kanban / Kalender / Timeline */
.dv-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dv-toolbar .search { flex: 1; min-width: 180px; } .dv-toolbar .search input { width: 100%; }
.dv-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.dv-filters select, .dv-filters input { width: auto; min-height: 32px; padding: 4px 8px; font-size: 12.5px; border-radius: 8px; }
.dv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dv-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: transform .12s, border-color .12s; box-shadow: var(--shadow); }
.dv-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.dv-card .t { font-weight: 650; font-size: 14px; } .dv-card .m { color: var(--muted); font-size: 12.5px; }
.dv-card .foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; font-size: 12px; color: var(--muted); }
.dv-card .thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; min-height: 320px; }
.kanban-col { flex: 0 0 280px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kanban-col.drag-over { border-color: var(--accent); background: var(--blue-bg); }
.kanban-col .kh { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.kanban-col .kh .n { font-family: var(--mono); background: var(--panel-2); padding: 0 7px; border-radius: 8px; }
.kanban-col .kb { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.kcard { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; }
.kcard:active { cursor: grabbing; } .kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; font-size: 13.5px; } .kcard .m { color: var(--muted); font-size: 12px; }
.kcard .foot { display: flex; gap: 6px; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.kcard img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px; font-weight: 700; }
.cal-cell { min-height: 92px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; font-size: 12px; overflow: hidden; }
.cal-cell.other { opacity: .4; } .cal-cell.today { border-color: var(--accent); }
.cal-cell .d { font-weight: 700; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.cal-cell .ev { display: block; margin-top: 2px; padding: 1px 5px; border-radius: 4px; background: var(--blue-bg); border-left: 3px solid var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); cursor: pointer; }
.cal-cell .ev.KRITISCH, .cal-cell .ev.UEBERFAELLIG { border-left-color: var(--red); background: var(--red-bg); } .cal-cell .ev.HOCH { border-left-color: var(--orange); background: var(--orange-bg); } .cal-cell .ev.ERLEDIGT, .cal-cell .ev.ABGESCHLOSSEN { opacity: .5; }
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; border-left: 2px solid var(--border-strong); }
.tl-item { position: relative; padding: 6px 0 12px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--panel-solid); }
.tl-item.ROT::before, .tl-item.KRITISCH::before { background: var(--red); } .tl-item.ORANGE::before, .tl-item.HOCH::before { background: var(--orange); } .tl-item.GRUEN::before, .tl-item.ERLEDIGT::before, .tl-item.ABGESCHLOSSEN::before { background: var(--green); } .tl-item.GELB::before { background: var(--yellow); } .tl-item.LILA::before { background: var(--purple); }
.tl-item .when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); } .tl-item .what { font-weight: 600; }
.tl-day { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 10px 0 4px; }
.col-picker { display: flex; flex-direction: column; gap: 4px; }
.col-picker .cp { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); cursor: grab; }
.col-picker .cp.drag-over { border-color: var(--accent); }
.col-picker .cp label { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }

/* Feed, Kommentare, Fotos */
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .txt { flex: 1; font-size: 13px; } .feed-item .when { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .bubble { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; white-space: pre-wrap; }
.comment .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 8px; }
.comment .bubble img { max-width: 220px; border-radius: 8px; display: block; margin-top: 6px; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.comment-form textarea { min-height: 44px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo-grid a, .photo-grid .ph { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; } .photo-grid a:hover img { transform: scale(1.04); }
.photo-grid .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 10.5px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-grid .ph .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; cursor: pointer; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 150; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 160px; height: 160px; background: #fff; border-radius: 10px; padding: 6px; }
.history .h { display: flex; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.history .h .when { font-family: var(--mono); color: var(--dim); white-space: nowrap; }
.status-flow { display: flex; gap: 4px; flex-wrap: wrap; }
.status-flow button { font: inherit; font-size: 11.5px; font-weight: 700; border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.status-flow button.cur { background: var(--accent); border-color: var(--accent); color: #fff; } .status-flow button.done { color: var(--green); border-color: var(--green); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; }
.member { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.member .n { font-weight: 600; } .member .r { font-size: 12px; color: var(--muted); }

/* Command palette */
.cmdk-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmdk { width: 100%; max-width: 640px; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 70vh; display: flex; flex-direction: column; }
.cmdk input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 14px 16px; font-size: 16px; min-height: 52px; }
.cmdk input:focus { outline: none; }
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 8px 10px 3px; font-weight: 700; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.cmdk-item.sel, .cmdk-item:hover { background: var(--blue-bg); text-decoration: none; }
.cmdk-item .t { font-weight: 600; font-size: 13.5px; } .cmdk-item .s { font-size: 12px; color: var(--muted); }
.cmdk-item .k { margin-left: auto; }
.cmdk-foot { padding: 6px 12px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--dim); display: flex; gap: 12px; }

/* Timeline / day view (Zeit) */
.timeline { position: relative; height: 34px; background: var(--panel-2); border-radius: 6px; border: 1px solid var(--border); overflow: hidden; }
.timeline .seg { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; background: var(--green); opacity: .8; border: 0; padding: 0; display: block; }
.timeline .seg.break { background: var(--yellow); }
.timeline .seg.open { background: repeating-linear-gradient(45deg, var(--green), var(--green) 6px, rgba(34,197,94,.5) 6px, rgba(34,197,94,.5) 12px); }
.timeline .tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border-strong); font-size: 9px; color: var(--dim); padding-left: 2px; }
.bar { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--green)); transition: width .6s ease; }
.flex-gauge { position: relative; height: 26px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.flex-gauge .zero { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--border-strong); }
.flex-gauge .fill { position: absolute; top: 4px; bottom: 4px; background: var(--green); border-radius: 3px; }
.flex-gauge .fill.neg { background: var(--red); }
.flex-gauge .warn { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--orange); }
.gauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.sparkline { width: 100%; height: 120px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-day { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-height: 140px; font-size: 12.5px; }
.week-day.today { border-color: var(--accent); }
.week-day.off { opacity: .55; }
.week-day .d { font-weight: 700; display: flex; justify-content: space-between; }
.week-day .ev { padding: 2px 4px; margin-top: 3px; border-radius: 4px; background: var(--panel-solid); border-left: 3px solid var(--blue); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-day .ev.WIEDERVORLAGE { border-left-color: var(--yellow); } .week-day .ev.AUFTRAG { border-left-color: var(--orange); } .week-day .ev.PRUEFUNG { border-left-color: var(--red); } .week-day .ev.FAHRT { border-left-color: var(--gray); } .week-day .ev.PRIVAT { border-left-color: var(--gray); opacity: .7; } .week-day .ev.ZEIT { border-left-color: var(--green); }
.dayplan .item { border-left: 4px solid var(--border-strong); }
.dayplan .item.TERMIN { border-left-color: var(--blue); } .dayplan .item.AUFTRAG { border-left-color: var(--orange); } .dayplan .item.WIEDERVORLAGE { border-left-color: var(--yellow); } .dayplan .item.ZEIT { border-left-color: var(--green); } .dayplan .item.TAETIGKEIT { border-left-color: var(--accent); } .dayplan .item.PRIVAT { border-left-color: var(--gray); }
.dayplan .item.past { opacity: .5; }
.activity-live { text-align: center; padding: 10px 0; }
.activity-live .timer { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 52px; font-weight: 700; line-height: 1; }
.time-cockpit { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.time-cockpit .ring { position: relative; width: 168px; height: 168px; }
.time-cockpit .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.time-cockpit .ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.time-cockpit .ring .track { stroke: var(--panel-2); } .time-cockpit .ring .prog { stroke: var(--primary); transition: stroke-dashoffset .8s ease; }
.time-cockpit .ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.time-cockpit .ring .c .t { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1; } .time-cockpit .ring .c .l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.chart-bars .b { flex: 1; background: var(--blue); border-radius: 3px 3px 0 0; min-width: 6px; position: relative; }
.chart-bars .b.over { background: var(--green); } .chart-bars .b.under { background: var(--orange); } .chart-bars .b.zero { background: var(--border); }
.chart-bars .b span { position: absolute; bottom: -18px; left: 0; right: 0; font-size: 10px; color: var(--dim); text-align: center; font-family: var(--mono); }
.hbar { display: grid; grid-template-columns: 160px 1fr 60px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.hbar .bar { height: 12px; }
.print-only { display: none; }
.steps { display: grid; gap: 6px; } .step { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 8px; } .step.done { border-color: var(--green); }
.widget-controls { display: none; gap: 4px; } .card:hover .widget-controls { display: flex; }
.qr-video { width: 100%; max-width: 480px; border-radius: 12px; background: #000; }

/* Notifications panel */
.panel-pop { position: fixed; top: calc(var(--topbar-h) + 6px); right: 12px; width: 400px; max-width: calc(100vw - 24px); max-height: 72vh; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; padding: 10px; animation: fadeUp .15s ease; }
.notif { padding: 8px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; }
.notif.unread { background: var(--blue-bg); }
.notif .body { flex: 1; min-width: 0; } .notif strong { display: block; font-size: 13.5px; }

/* Responsive */
@media (max-width: 1100px) {
  .span-3, .span-4 { grid-column: span 6; } .span-5, .span-7, .span-8, .span-9 { grid-column: span 12; } .search input { width: 180px; }
  .widget.size-s, .widget.size-m { grid-column: span 6; } .widget.size-l, .widget.size-h { grid-column: span 12; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 54px; }
  .hide-sm { display: none !important; }
  .sidenav { display: none; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-top: 1px solid var(--border); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; font-size: 10px; color: var(--muted); font-weight: 600; }
  .bottomnav a.active { color: var(--primary); } .bottomnav a:hover { text-decoration: none; }
  .bottomnav a .ico { width: 22px; height: 22px; }
  .bottomnav a.cam { position: relative; color: #fff; }
  .bottomnav a.cam .ico { width: 30px; height: 30px; padding: 12px; box-sizing: content-box; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--red)); margin-top: -26px; box-shadow: 0 8px 20px -6px rgba(239,68,68,.7); border: 3px solid var(--bg); }
  .fab { display: none; }
  .main { padding: 12px 12px 92px; }
  .grid, .widget-grid { gap: 10px; } .span-3, .span-4, .span-6 { grid-column: span 12; }
  .widget.size-s, .widget.size-m, .widget.size-l, .widget.size-h { grid-column: span 12; }
  .topbar { gap: 8px; padding: 0 10px; } .brand-text { display: none; } .search { display: none; } .clock { display: none; } .status-strip { display: none; }
  .user-menu .btn { max-width: 80px; overflow: hidden; text-overflow: ellipsis; display: block; }
  .big-num { font-size: 38px; } .activity-live .timer { font-size: 42px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; } .week-day { min-height: 0; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .hbar { grid-template-columns: 100px 1fr 50px; }
  .kanban-col { flex-basis: 84vw; } .cal-cell { min-height: 60px; font-size: 10.5px; }
  .modal { padding: 16px; border-radius: 14px; } .page-head h1 { font-size: 19px; }
  .dv-cards { grid-template-columns: 1fr; } .cmdk-back { padding-top: 4vh; }
}
@media print {
  .topbar, .sidenav, .bottomnav, .toast-root, .no-print, .btn, .fab, .widget-tools, .edit-bar { display: none !important; }
  body { background: #fff; color: #000; } .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; backdrop-filter: none; }
  .main { padding: 0; } .print-only { display: block; }
  :root, [data-theme="dark"] { --bg: #fff; --panel: #fff; --panel-solid: #fff; --panel-2: #f3f3f3; --text: #000; --muted: #444; --border: #bbb; }
}
