/* =====================================================================
   FILA – Design System
   Ruhig, präzise, nativ: macOS-Seitenleiste, große Titel, gruppierte
   Flächen. Farbe kommt vom Filament, nicht von der Oberfläche.
   ===================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* Flächen */
  --bg: #F5F5F7;            /* Fenster / gruppierter Hintergrund */
  --bg-2: #EBEBEF;          /* vertiefte Spuren, Balken */
  --surface: #FAFAFB;       /* sekundäre Fläche, Eingabefelder */
  --surface-2: #FFFFFF;     /* Karten, Listen */
  --raised: #FFFFFF;        /* Menüs, Sheets */
  --sidebar-bg: #EDEDF0;
  --toolbar-bg: rgba(245, 245, 247, .82);

  /* Text */
  --ink: #1D1D1F;
  --ink-2: #3A3A3F;
  --muted: #6E6E73;
  --faint: #86868B;

  /* Linien & Zustände */
  --line: rgba(0, 0, 0, .075);
  --line-2: rgba(0, 0, 0, .13);
  --hover: rgba(0, 0, 0, .045);
  --press: rgba(0, 0, 0, .08);

  /* Akzent (Standard: Systemblau) */
  --accent: #0071E3;
  --accent-ink: #FFFFFF;
  --accent-fill: var(--accent);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);

  /* Semantik */
  --good: #1E8E4A;   --good-soft: rgba(30, 142, 74, .11);
  --warn: #B45F06;   --warn-soft: rgba(230, 140, 20, .14);
  --crit: #D7332A;   --crit-soft: rgba(215, 51, 42, .10);
  --info: #3A6FD8;   --info-soft: rgba(58, 111, 216, .10);

  /* Tiefe – sparsam */
  --shadow-1: 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-2: 0 0 0 .5px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-3: 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
  --inset: inset 0 0 0 1px var(--line-2);
  --scrim: rgba(0, 0, 0, .28);
  --ring-edge: rgba(0, 0, 0, .25);

  /* Form */
  --r-xs: 5px; --r-s: 8px; --r: 10px; --r-l: 12px; --r-xl: 14px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --t: 160ms;

  --sidebar: 244px;
  --toolbar-h: 52px;
  --gutter: 32px;
  --maxw: 1360px;
  --tap: 32px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #161618;
  --bg-2: #0E0E10;
  --surface: #1C1C1F;
  --surface-2: #1F1F22;
  --raised: #2A2A2E;
  --sidebar-bg: #1B1B1E;
  --toolbar-bg: rgba(22, 22, 24, .82);
  --ink: #F5F5F7;
  --ink-2: #D2D2D7;
  --muted: #98989F;
  --faint: #7C7C82;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --hover: rgba(255, 255, 255, .055);
  --press: rgba(255, 255, 255, .09);
  --accent: #0A84FF;
  --good: #32D074;   --good-soft: rgba(50, 208, 116, .13);
  --warn: #FFB340;   --warn-soft: rgba(255, 179, 64, .13);
  --crit: #FF5F57;   --crit-soft: rgba(255, 95, 87, .14);
  --info: #6B9BFF;   --info-soft: rgba(107, 155, 255, .14);
  --shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 0 0 .5px rgba(255, 255, 255, .07), 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-3: 0 0 0 .5px rgba(255, 255, 255, .12), 0 20px 60px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .4);
  --scrim: rgba(0, 0, 0, .5);
  --ring-edge: rgba(255, 255, 255, .2);
  color-scheme: dark;
}

/* Akzentfarben (Einstellungen → Darstellung) */
:root[data-accent="signal"] { --accent: #E8462A; }
:root[data-accent="green"]  { --accent: #1E8E4A; }
:root[data-accent="violet"] { --accent: #7A4FE0; }
:root[data-accent="ink"]    { --accent: #3A3A3F; }
:root[data-theme="dark"][data-accent="blue"], :root[data-theme="dark"][data-accent="cobalt"] { --accent-fill: #0A6FE0; }
:root[data-theme="dark"][data-accent="signal"] { --accent: #FF6A4D; --accent-fill: #E8462A; }
:root[data-theme="dark"][data-accent="green"]  { --accent: #32D074; --accent-ink: #062A14; }
:root[data-theme="dark"][data-accent="violet"] { --accent: #A585FF; --accent-ink: #1B0F3A; }
:root[data-theme="dark"][data-accent="ink"]    { --accent: #E5E5EA; --accent-ink: #1D1D1F; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -.003em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 1px; border-radius: 6px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
:where(svg.i) { width: 18px; height: 18px; }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* -------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* Seitenleiste im Stil einer macOS-Quellliste */
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  z-index: 20; overflow: hidden;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px 0 8px; height: 32px; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1; }
.brand-name small { display: none; }
.side-toggle { width: 28px !important; height: 28px !important; color: var(--muted); border-radius: 7px; }
.side-toggle:hover { color: var(--ink); }
.side-toggle svg { width: 18px !important; height: 18px !important; }

.side-search {
  display: flex; align-items: center; gap: 7px; width: 100%; height: 30px; padding: 0 8px; margin-bottom: 12px;
  border: 0; border-radius: 8px; background: var(--hover); color: var(--muted); font-size: 13px; text-align: left;
  transition: background var(--t);
}
.side-search:hover { background: var(--press); }
.side-search svg { width: 15px; height: 15px; }
.side-search span { flex: 1; }
.side-search kbd { background: transparent; box-shadow: none; padding: 0; }

.side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -10px; padding: 0 10px; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 16px 10px 5px; letter-spacing: 0; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 10px; border-radius: 7px;
  color: var(--ink); font-size: 13.5px; font-weight: 500;
  transition: background var(--t);
}
.nav a svg { width: 17px; height: 17px; color: var(--accent); }
.nav a > span:not(.count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--hover); }
.nav a.active { background: var(--accent-fill); color: var(--accent-ink); }
.nav a.active svg { color: var(--accent-ink); }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav a.active .count { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.nav a .warn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.nav .nav-loc svg { color: var(--muted); }
.nav .nav-loc.active svg { color: var(--accent-ink); }

.sidebar-foot { display: flex; align-items: center; gap: 6px; padding: 10px 2px 0; margin-top: 8px; border-top: 1px solid var(--line); }
.sidebar-foot .seg { flex: 1; }
.sidebar-foot .seg button { flex: 1; justify-content: center; height: 26px; }

.main { min-width: 0; display: flex; flex-direction: column; }

/* Werkzeugleiste */
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 8px;
  height: var(--toolbar-h); padding: 0 calc(var(--gutter) - 8px) 0 var(--gutter);
  background: var(--toolbar-bg);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .tb-title { font-family: var(--font-display); font-size: 15px; font-weight: 650; letter-spacing: -.01em; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar.show-title .tb-title { opacity: 1; transform: none; }
.topbar .crumbs { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.topbar .crumbs a { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px 0 4px; border-radius: 7px; color: var(--accent); font-weight: 500; }
.topbar .crumbs a:hover { background: var(--hover); }
.topbar .crumbs a svg { width: 17px; height: 17px; }
.topbar .crumbs b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .mobile-brand { display: none; }
.topbar .tb-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }

/* Verbindung: offline, Warteschlange, nicht gebuchte Einträge */
.conn-slot:empty { display: none; }
.conn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; animation: fadeIn .2s ease; }
.conn svg { width: 14px; height: 14px; }
.conn.warn { background: var(--warn-soft); color: var(--warn); }
.conn.crit { background: var(--crit-soft); color: var(--crit); }
.conn.info { background: var(--info-soft); color: var(--info); }
.tl-pending { margin-left: 6px; }
.tl-pending svg { width: 11px; height: 11px; }
.ob-item { padding: 4px 6px 4px 12px; }

.search-trigger {
  display: flex; align-items: center; gap: 8px; width: 280px; height: 32px; padding: 0 6px 0 10px;
  border: 0; border-radius: 8px; background: var(--hover); color: var(--muted); font-size: 13.5px; text-align: left;
  transition: background var(--t), box-shadow var(--t);
}
.search-trigger:hover { background: var(--press); }
.search-trigger svg { width: 15px; height: 15px; }
.search-trigger span { flex: 1; }
kbd { font-family: var(--font); font-size: 11.5px; font-weight: 500; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); color: var(--muted); }

.page { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 4px var(--gutter) 64px; }
.page-enter { animation: pageIn .18s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Seitenkopf: großer Titel */
.ph { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding: 10px 0 22px; }
.ph-text { flex: 1; min-width: 240px; }
.eyebrow { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.eyebrow .idx { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.h1 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.022em; line-height: 1.12; }
.h1 .soft { color: var(--faint); font-weight: 600; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 72ch; }
.lede b { color: var(--ink-2); font-weight: 600; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.h2 svg { display: none; } /* Überschriften ohne Deko-Symbol – die Gruppierung trägt */
.h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Raster */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.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-12 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* -------------------------------------------------------------- Karte */
.card {
  position: relative; min-width: 0;
  background: var(--surface-2);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
  padding: 18px;
}
.card.flat { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; min-height: 26px; }
.card-head .spacer { flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--accent); font-size: 13px; font-weight: 500; }
.card-link:hover { background: var(--hover); }
.card-link svg { width: 14px; height: 14px; }
.interactive { cursor: pointer; transition: box-shadow var(--t), background var(--t); }
.interactive:hover { box-shadow: var(--shadow-2); }
.interactive:active { background: color-mix(in srgb, var(--surface-2) 94%, var(--ink)); }
.stagger > * { animation: none; }

/* Einklappbare Karten */
.collapsible > .card-head .h2 { cursor: pointer; user-select: none; }
.collapse-btn { width: 26px !important; height: 26px !important; margin-right: -4px; flex-shrink: 0; color: var(--faint) !important; }
.collapse-btn svg { width: 16px !important; height: 16px !important; transition: transform .2s var(--ease); }
.card-head .collapse-btn { margin-left: auto !important; }
.card-head .spacer ~ .collapse-btn { margin-left: 2px !important; }
.card.collapsed .collapse-btn svg { transform: rotate(-90deg); }
.card.collapsed > :not(.card-head) { display: none !important; }
.card.collapsed > .card-head { margin-bottom: 0; }

/* -------------------------------------------------------------- Kennzahlen */
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-top .kpi-icon { display: none; }
.kpi-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--hover); color: var(--ink-2); flex-shrink: 0; }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value { font-family: var(--font-display); font-size: 30px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 3px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.kpi .spark { position: absolute; right: 16px; top: 16px; }
.kpi:has(.spark) .kpi-top { padding-right: 96px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; padding: 0 6px 0 4px; height: 20px; border-radius: 6px; }
.delta svg { width: 13px; height: 13px; }
.delta.up { color: var(--crit); background: var(--crit-soft); }
.delta.down { color: var(--good); background: var(--good-soft); }
.delta.flat { color: var(--muted); background: var(--hover); }

/* -------------------------------------------------------------- Buttons */
.btn {
  --h: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h); padding: 0 12px; border-radius: 8px; border: 0;
  font-weight: 500; font-size: 13.5px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink);
  box-shadow: 0 0 0 .5px var(--line-2), 0 1px 1.5px rgba(0, 0, 0, .06);
  transition: background var(--t), box-shadow var(--t), opacity var(--t), filter var(--t);
  user-select: none; position: relative;
}
:root[data-theme="dark"] .btn { background: var(--raised); box-shadow: 0 0 0 .5px var(--line-2), 0 1px 1.5px rgba(0, 0, 0, .3); }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 92%, var(--ink)); }
:root[data-theme="dark"] .btn:hover { background: color-mix(in srgb, var(--raised) 88%, #fff); }
.btn:active { filter: brightness(.95); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary, .btn.accent, :root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.accent { background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .12); font-weight: 600; }
.btn.primary:hover, .btn.accent:hover { background: color-mix(in srgb, var(--accent-fill) 90%, #000); }
:root[data-theme="dark"] .btn.primary:hover, :root[data-theme="dark"] .btn.accent:hover { background: color-mix(in srgb, var(--accent-fill) 88%, #fff); }
.btn.ghost, :root[data-theme="dark"] .btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.soft, :root[data-theme="dark"] .btn.soft { background: var(--hover); box-shadow: none; }
.btn.soft:hover { background: var(--press); }
.btn.danger { color: var(--crit); }
.btn.danger.solid, :root[data-theme="dark"] .btn.danger.solid { background: var(--crit); color: #fff; box-shadow: none; }
.btn.sm { --h: 28px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.lg { --h: 40px; padding: 0 18px; font-size: 15px; border-radius: 10px; }
.btn.icon { width: var(--h); padding: 0; }
.btn.block { width: 100%; }
.btn .ripple { display: none; }

.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 8px; color: var(--ink-2); transition: background var(--t), color var(--t); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn:active { background: var(--press); }
.icon-btn svg { width: 18px; height: 18px; }

/* Segmentsteuerung */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--hover); position: relative; }
.seg button { position: relative; z-index: 1; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background var(--t), color var(--t); white-space: nowrap; }
.seg button svg { width: 15px; height: 15px; }
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); background: var(--surface-2); box-shadow: 0 0 0 .5px var(--line-2), 0 1px 2px rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .seg button.on { background: #5A5A60; }
.seg.block { display: flex; } .seg.block button { flex: 1; }

/* Filter-Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px;
  border: 0; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-2);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background var(--t), color var(--t), box-shadow var(--t);
}
:root[data-theme="dark"] .chip { background: var(--surface); }
.chip svg { width: 14px; height: 14px; }
.chip:hover { color: var(--ink); background: var(--hover); }
.chip.on, :root[data-theme="dark"] .chip.on { background: var(--accent-fill); color: var(--accent-ink); box-shadow: none; }
.chip .x { opacity: .6; margin-right: -3px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.badge svg { width: 12px; height: 12px; }
.badge.mat { background: var(--bg-2); color: var(--ink); font-size: 11px; letter-spacing: .01em; }
:root[data-theme="dark"] .badge.mat { background: var(--press); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.crit { background: var(--crit-soft); color: var(--crit); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }

.sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sdot.sealed { background: var(--info); } .sdot.open { background: var(--warn); }
.sdot.in_use { background: var(--good); } .sdot.empty { background: var(--faint); }

/* -------------------------------------------------------------- Formular */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 14px; outline: none; transition: box-shadow var(--t), background var(--t);
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea { background: var(--surface); }
.textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 6.5 3-3 3 3M5 9.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-group > .input { padding-left: 33px; }
.input-group .suffix { position: absolute; right: 10px; font-size: 13px; color: var(--muted); pointer-events: none; }
.input-group .input.has-suffix { padding-right: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.range2 { display: flex; align-items: center; gap: 6px; }
.range2 .input { text-align: center; padding: 0 6px; }
.range2 span { color: var(--faint); }
input[type="color"] { -webkit-appearance: none; appearance: none; border: 0; width: 34px; height: 34px; border-radius: 8px; padding: 0; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 8px; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.stepper-num { display: inline-flex; align-items: center; border-radius: 8px; background: var(--hover); height: 34px; }
.stepper-num button { width: 34px; height: 34px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); border-radius: 8px; }
.stepper-num button:hover { background: var(--hover); }
.stepper-num button svg { width: 15px; height: 15px; }
.stepper-num input { width: 44px; text-align: center; border: 0; background: transparent; font-weight: 600; font-size: 15px; outline: none; font-variant-numeric: tabular-nums; }

.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06); transition: transform .22s var(--ease-ios); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-line); }

/* -------------------------------------------------------------- Kacheln (Assistent, Auswahl) */
.tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tiles.lg { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tiles.sm { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-height: 96px; padding: 12px; border: 0; border-radius: var(--r);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2);
  text-align: left; transition: background var(--t), box-shadow var(--t);
}
:root[data-theme="dark"] .tile { background: var(--surface); }
.tile:hover { background: color-mix(in srgb, var(--surface-2) 95%, var(--ink)); }
:root[data-theme="dark"] .tile:hover { background: var(--raised); }
.tile.on, :root[data-theme="dark"] .tile.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.tile .check { position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); opacity: 0; transition: opacity var(--t); }
.tile .check svg { width: 12px; height: 12px; stroke-width: 3; }
.tile.on .check { opacity: 1; }
.tile-title { font-weight: 600; font-size: 14px; line-height: 1.25; }
.tile-sub { font-size: 12px; color: var(--muted); margin-top: auto; }
.tile .big { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.tile .ticon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile .ticon svg { width: 18px; height: 18px; }
.tile.dashed { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); border: 1px dashed transparent; }
.tile.row-tile { flex-direction: row; align-items: center; min-height: 58px; }
.tile .flag { position: absolute; top: 9px; right: 9px; }
.tile.on .flag { opacity: 0; }

.monogram { position: relative; overflow: hidden; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--c, #555); flex-shrink: 0; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); }
.monogram img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; border-radius: inherit; }
.monogram.sm { width: 26px; height: 26px; border-radius: 6px; font-size: 10.5px; }
.monogram.sm img { padding: 3px; }
.monogram.xs { width: 18px; height: 18px; border-radius: 4px; font-size: 8.5px; }
.monogram.xs img { padding: 1.5px; }

/* -------------------------------------------------------------- Farbfelder */
.swatch { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.swatch.lg { width: 40px; height: 40px; }
.swatch.sq { border-radius: 5px; width: 16px; height: 16px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.swatch-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 0; background: transparent; border-radius: 10px; font-size: 12px; color: var(--ink-2); transition: background var(--t); position: relative; }
.swatch-btn:hover { background: var(--hover); }
.swatch-btn .swatch { width: 36px; height: 36px; }
.swatch-btn.on .swatch { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--accent); }
.swatch-btn .order { position: absolute; top: 6px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.colorbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.colorbar i { flex: 1; min-width: 3px; }

/* -------------------------------------------------------------- Spulen-Grafik */
.spool { position: relative; flex-shrink: 0; }
.spool svg { width: 100%; height: 100%; overflow: visible; position: relative; }
.spool .hub { transform-box: view-box; transform-origin: 50px 50px; }

/* Schwarzes Filament bleibt im Dunkelmodus sichtbar */
:root[data-theme="dark"] .swatch, :root[data-theme="dark"] .chip .dot, :root[data-theme="dark"] .palette-strip button { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.chip-n { opacity: .75; font-variant-numeric: tabular-nums; }

/* Füllstand */
.bar { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
:root[data-theme="dark"] .bar { background: var(--press); }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ink-2); }
.bar.good > i { background: var(--good); } .bar.warn > i { background: var(--warn); } .bar.crit > i { background: var(--crit); }
.bar.fil > i { background: var(--c1, var(--ink-2)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
:root[data-theme="dark"] .bar.fil > i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }

/* -------------------------------------------------------------- Spulenkarten */
.spool-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.spool-tile { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 0; }
.spool-tile.is-empty { opacity: .6; }
.st-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-info { min-width: 0; flex: 1; }
.st-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.st-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.st-sub .badge { height: 18px; padding: 0 5px; flex-shrink: 0; }
.st-flags { display: flex; gap: 2px; align-self: flex-start; margin: -4px -6px 0 0; }
.st-level-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; }
.st-level-top b { font-size: 17px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.st-level-top b small { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.st-loc { display: flex; align-items: center; gap: 7px; height: 38px; margin: 0 -14px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); min-width: 0; }
.st-loc .st-code { margin-left: auto; }
.st-code { font-family: var(--mono); font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.st-head, .st-mf { display: none; }
.sc-flag { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; background: transparent; }
.sc-flag svg { width: 15px !important; height: 15px !important; }
.sc-flag.warn { color: var(--warn); }
.sc-flag.fav { color: var(--warn); }
button.sc-flag { border: 0; cursor: pointer; }
button.sc-flag:hover { background: var(--hover); }

/* Liste */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; min-height: 50px; transition: background var(--t); }
.li.clickable { cursor: pointer; }
.li.clickable:hover, .alert-item:hover { background: var(--hover); }
.li .li-main { flex: 1; min-width: 0; }
.li .li-title { font-weight: 550; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .li-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.li .li-end { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.li .li-end b { display: block; font-size: 14px; font-weight: 600; }
.li .li-end small { color: var(--muted); font-size: 12px; }
.list.divided .li { border-radius: 0; box-shadow: 0 1px 0 var(--line); }
.list.divided .li:last-child { box-shadow: none; }
.li .kpi-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.li .kpi-icon svg { width: 15px; height: 15px; }

/* Tabelle */
.table-wrap { overflow-x: auto; border-radius: inherit; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface-2); cursor: pointer; user-select: none; }
.table th.sorted { color: var(--ink); }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tbody tr { transition: background var(--t); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:hover { background: var(--hover); }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }

/* Werkzeugzeile über Listen */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 440px; }
.toolbar .search .input { background: var(--hover); box-shadow: none; }
.toolbar .search .input:focus { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.filters-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.result-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- Verlauf */
.timeline { position: relative; display: flex; flex-direction: column; }
.tl-day { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 14px 0 6px 40px; position: sticky; top: var(--toolbar-h); background: var(--surface-2); z-index: 1; }
.card.flat .tl-day { background: var(--surface); }
.tl-item { position: relative; display: flex; gap: 12px; padding: 7px 0; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.tl-day + .tl-item::before { top: 16px; }
.tl-dot { position: relative; z-index: 1; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); flex-shrink: 0; }
.card.flat .tl-dot { background: var(--surface); }
.tl-dot svg { width: 14px; height: 14px; }
.tl-dot.usage { color: var(--accent); } .tl-dot.dry { color: var(--warn); } .tl-dot.move { color: var(--info); } .tl-dot.created { color: var(--good); }
.tl-body { flex: 1; min-width: 0; padding-top: 3px; }
.tl-title { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-title .amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tl-time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 5px; }
.tl-actions { opacity: 0; transition: opacity var(--t); }
.tl-item:hover .tl-actions { opacity: 1; }
.tl-actions .icon-btn { width: 26px; height: 26px; }
.tl-actions .icon-btn svg { width: 15px; height: 15px; }
.tl-actions:focus-within { opacity: 1; }
.tl-edited { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); margin-left: 5px; vertical-align: middle; }
.ev-replay { display: flex; gap: 6px; align-items: flex-start; }
.ev-replay svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

/* -------------------------------------------------------------- Hinweise */
.alert-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; transition: background var(--t); cursor: pointer; }
.alert-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.alert-ic svg { width: 15px; height: 15px; }
.alert-ic.crit { background: var(--crit-soft); color: var(--crit); }
.alert-ic.warn { background: var(--warn-soft); color: var(--warn); }
.alert-ic.info { background: var(--info-soft); color: var(--info); }

/* -------------------------------------------------------------- Diagramme */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-rect { fill: color-mix(in srgb, var(--accent) 38%, var(--bg-2)); transition: fill var(--t); }
.chart .bar-rect.current { fill: var(--accent); }
.chart .bar-g:hover .bar-rect { fill: color-mix(in srgb, var(--accent) 70%, var(--bg-2)); }
:root[data-theme="dark"] .chart .bar-rect:not(.current) { fill: color-mix(in srgb, var(--accent) 42%, #3A3A40); }
:root[data-theme="dark"] .chart .bar-g:hover .bar-rect { fill: color-mix(in srgb, var(--accent) 75%, #3A3A40); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* Position setzt ui.js (placeTip): über dem Element, bei Platzmangel darunter, immer im Fenster */
.tooltip {
  position: fixed; z-index: 200; left: 0; top: 0; pointer-events: none; padding: 6px 9px; border-radius: 7px;
  background: var(--raised); color: var(--ink); font-size: 12.5px; line-height: 1.35; box-shadow: var(--shadow-3);
  opacity: 0; transition: opacity .1s; white-space: nowrap; max-width: min(340px, calc(100vw - 16px));
}
.tooltip.on { opacity: 1; }
.tooltip.wrap { white-space: normal; }
.tooltip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tooltip .tt-dim { color: var(--muted); }

.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 64px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .hb-label { font-weight: 600; }
.hbar .hb-track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
:root[data-theme="dark"] .hbar .hb-track { background: var(--press); }
.hbar .hb-track i { display: block; height: 100%; border-radius: 99px; background: color-mix(in srgb, var(--accent) 55%, var(--bg-2)); }
.hbar:first-child .hb-track i { background: var(--accent); }
.hbar .hb-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.palette-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.palette-strip button { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform var(--t); }
.palette-strip button:hover { transform: scale(1.15); }

/* -------------------------------------------------------------- Standorte */
.loc-card { display: flex; flex-direction: column; gap: 14px; }
.loc-head { display: flex; gap: 12px; align-items: flex-start; }
.loc-icon { width: 28px; height: 36px; display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.loc-icon svg { width: 19px; height: 19px; }
.loc-icon.active { color: var(--good); }
.loc-slots { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 48px; }
.loc-slot { flex: 0 0 48px; width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform var(--t); }
.loc-slot:hover { transform: scale(1.06); }
.loc-slot.free { box-shadow: inset 0 0 0 1.5px var(--line-2); border: 1px dashed transparent; background: transparent; color: var(--faint); }
.loc-slot.free svg { width: 16px; height: 16px; }
.metric { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.metric svg { width: 14px; height: 14px; }
.metric b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.metric.warn b, .metric.warn svg { color: var(--warn); }

/* Ortsansicht */
.loc-climate { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 12px 16px; margin-bottom: 16px; }
.slot-no { width: 20px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
button.li { width: 100%; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; }
.slot-free .li-title { color: var(--muted); font-weight: 500; }
.slot-free:hover .li-title, .slot-free:hover .loc-slot { color: var(--accent); }
.li-sub .badge { height: 18px; padding: 0 5px; }
.loc-name:hover { color: var(--accent); }
.topbar .tb-primary-m { display: none; }

/* -------------------------------------------------------------- Details */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.stat { background: var(--surface-2); padding: 12px 14px; }
.stat .k { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat .v { font-size: 18px; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; font-size: 13.5px; }
.kv > div { padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 16px; }
.kv > div:nth-child(even) { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }

/* Spulen-Detail */
.sd-hero {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "visual id" "visual level" "visual actions";
  column-gap: 28px; row-gap: 16px; padding: 22px 24px;
}
.sd-visual { grid-area: visual; align-self: center; }
.sd-id { grid-area: id; min-width: 0; }
.sd-level { grid-area: level; min-width: 0; padding: 12px 14px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="dark"] .sd-level { background: var(--bg); }
.sd-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 8px; }
.sd-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.sd-code { color: var(--muted); font-weight: 500; }
.sd-mf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.sd-mf:hover { color: var(--accent); }
.sd-title { margin: 6px 0 2px; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.022em; line-height: 1.12; }
.sd-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.sd-line svg { width: 14px; height: 14px; }
.sd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sd-level-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.sd-k { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.sd-level-top b { font-family: var(--font-display); font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.sd-level-top b small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.sd-level-top .spacer { flex: 1; }
.sd-bar { height: 8px; }
.sd-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.sd-stats > div { min-width: 0; }
.sd-stats span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-stats b { display: block; font-size: 14px; font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
@media (min-width: 721px) { .sd-actions .sd-sec { width: var(--h); padding: 0; } .sd-actions .sd-sec span { display: none; } }
.qr-sheet { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 4px; }
.qr-big { width: min(260px, 70vw); aspect-ratio: 1; padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.qr-big svg { width: 100%; height: 100%; display: block; }

.sd-loc { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.sd-loc:hover { text-decoration: underline; }

/* Anpassbare Widget-Flächen der Detailseiten (widgets.js): breite und schmale Spalte,
   mobil eine Spalte in der gespeicherten Reihenfolge (order) */
.wl { margin-top: 16px; }
.wl-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wl-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wl-item { position: relative; min-width: 0; }
.wl-item > .card { min-width: 0; }
.wl-foot { display: flex; justify-content: center; margin-top: 14px; }
.wl-foot .btn { color: var(--muted); }
.wl-bar { position: sticky; top: calc(var(--toolbar-h) + env(safe-area-inset-top, 0px) + 8px); z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; margin-bottom: 14px; border-radius: var(--r-l); background: var(--raised); box-shadow: var(--shadow-3); font-size: 13.5px; }
.wl.editing .wl-item { min-height: 96px; }
.wl.editing .wl-item > :not(.dw-tools) { pointer-events: none; opacity: .4; outline: 1.5px dashed var(--line-2); outline-offset: -1px; border-radius: var(--r-l); }
.wl.editing .dw-tools { display: flex; position: absolute; top: 8px; left: 8px; right: 8px; align-items: center; gap: 6px; padding: 4px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow-3); z-index: 3; }
.wl-empty { display: grid; place-items: center; min-height: 96px; border-radius: var(--r-l); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--muted); font-size: 13px; }
.wl-item.dragging { z-index: 30; }
.wl-item.drop-before::before, .wl-item.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--accent); }
.wl-item.drop-before::before { top: -10px; }
.wl-item.drop-after::after { bottom: -10px; }
.wl-col.drop-col .wl-empty { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
@media (max-width: 900px) {
  .wl-cols { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .wl-col { display: contents; }
  .wl-empty { display: none; }
}

/* Schnellnavigation Spule → Filament / gleiche Spulen */
.quicknav { display: grid; grid-template-columns: minmax(0, auto) 1fr; gap: 10px; margin-top: 12px; }
.quicknav small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.qn-fil { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: var(--shadow-1); transition: box-shadow var(--t); min-width: 0; }
.qn-fil:hover { box-shadow: var(--shadow-2); }
.qn-fil b { font-size: 13.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.qn-fil small { margin-bottom: 1px; }
.qn-fil > svg { width: 16px; height: 16px; color: var(--faint); margin-left: auto; }
.qn-sib { padding: 10px 12px 12px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: var(--shadow-1); min-width: 0; }
.qn-sib .chips { gap: 6px; }

/* -------------------------------------------------------------- Dialog / Sheet */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: var(--scrim); animation: fadeIn .18s var(--ease) both; }
.overlay.closing { animation: fadeOut .18s var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.modal {
  width: min(540px, 100%); max-height: min(860px, calc(100dvh - 48px)); display: flex; flex-direction: column;
  background: var(--raised); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden;
  animation: modalIn .22s var(--ease-ios) both;
}
:root[data-theme="dark"] .modal { background: #232326; }
.modal.wide { width: min(860px, 100%); }
.modal.xl { width: min(1040px, 100%); height: min(780px, calc(100dvh - 48px)); }
.overlay.closing .modal { animation: modalOut .16s var(--ease) forwards; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: scale(.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 6px; }
.modal-head .mh-text { flex: 1; min-width: 0; }
.modal-title { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.modal-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.modal-head .icon-btn { margin: -4px -6px 0 0; color: var(--muted); }
.modal-body { padding: 12px 20px 20px; overflow-y: auto; overflow-x: hidden; flex: 1; overscroll-behavior: contain; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.modal-foot .spacer { flex: 1; }
.grabber { display: none; }
.modal > .wiz { flex: 1; min-height: 0; }

/* -------------------------------------------------------------- Assistent */
.wiz { display: grid; grid-template-columns: 228px 1fr; height: 100%; min-height: 0; }
.wiz-side { background: var(--sidebar-bg); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.wiz-side .wiz-title { font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -.015em; margin: 0 8px 14px; line-height: 1.2; }
.wiz-step { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--faint); font-size: 13.5px; font-weight: 500; border: 0; background: none; text-align: left; transition: background var(--t), color var(--t); }
.wiz-step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; box-shadow: inset 0 0 0 1.5px var(--line-2); flex-shrink: 0; }
.wiz-step .n svg { width: 12px; height: 12px; stroke-width: 3; }
.wiz-step .v { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-step.done { color: var(--ink-2); cursor: pointer; }
.wiz-step.done:hover { background: var(--hover); }
.wiz-step.done .n { background: var(--good); color: #fff; box-shadow: none; }
.wiz-step.current { color: var(--ink); background: var(--hover); }
.wiz-step.current .n { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.wiz-step[disabled] { cursor: default; }
.wiz-step.reach .n { background: color-mix(in srgb, var(--good) 70%, var(--surface)); }
.wiz-mtitle { display: none; }
.wiz-more { margin-top: 18px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line-2); padding: 0 14px; }
.wiz-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 46px; font-weight: 600; font-size: 14px; }
.wiz-more > summary::-webkit-details-marker { display: none; }
.wiz-more > summary .muted { font-weight: 400; font-size: 13px; }
.wiz-more > summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform var(--t); }
.wiz-more[open] > summary::after { transform: rotate(45deg); }
.wiz-more[open] { padding-bottom: 14px; }
.wiz-preview { margin-top: auto; padding: 14px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: var(--shadow-1); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.wiz-preview .spool { width: 88px; height: 88px; }
.wiz-preview .wp-title { font-size: 13px; font-weight: 600; line-height: 1.25; }
.wiz-preview .wp-sub { font-size: 12px; color: var(--muted); }
.wiz-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wiz-head { padding: 20px 28px 4px; display: flex; gap: 12px; align-items: flex-start; }
.wiz-head .mh-text { flex: 1; }
.wiz-head .icon-btn { color: var(--muted); }
.wiz-q { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.wiz-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 28px 24px; overscroll-behavior: contain; }
.wiz-body > .step-anim { animation: stepIn .2s var(--ease) both; }
.wiz-body > .step-anim.back { animation-name: stepInBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.wiz-foot { display: flex; align-items: center; gap: 8px; padding: 12px 28px; border-top: 1px solid var(--line); }
.wiz-foot .spacer { flex: 1; }
.wiz-progress { display: none; height: 3px; background: var(--line); }
.wiz-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }
.section-label { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.section-label:first-child { margin-top: 0; }
.section-label svg { width: 14px; height: 14px; flex-shrink: 0; }

.match-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); border: 0; text-align: left; width: 100%; transition: background var(--t), box-shadow var(--t); }
:root[data-theme="dark"] .match-card { background: var(--surface); }
.match-card:hover { background: color-mix(in srgb, var(--surface-2) 95%, var(--ink)); }
:root[data-theme="dark"] .match-card:hover { background: var(--raised); }
.match-card.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.match-card .spool { width: 46px; height: 46px; }
.match-card .mc-main { flex: 1; min-width: 0; }
.match-card .mc-title { font-weight: 600; font-size: 14px; }
.match-card .mc-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.match-list { display: flex; flex-direction: column; gap: 6px; }

/* Auswahlliste (z. B. Ziel beim Verschieben) */
.pick-list { display: flex; flex-direction: column; gap: 1px; }
.pick-group { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 14px 10px 4px; }
.pick-group:first-child { margin-top: 0; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; transition: background var(--t); }
.pick-row:hover { background: var(--hover); }
.pick-row.on { background: var(--accent-soft); }
.pick-row .pr-ic { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--hover); color: var(--ink-2); flex-shrink: 0; }
.pick-row .pr-ic svg { width: 16px; height: 16px; }
.pick-row.on .pr-ic { background: var(--accent); color: var(--accent-ink); }
.pick-row .pr-main { flex: 1; min-width: 0; }
.pick-row .pr-main b { display: block; font-size: 14px; font-weight: 550; }
.pick-row .pr-main small { display: block; font-size: 12.5px; color: var(--muted); }
.pick-row .pr-check { width: 18px; height: 18px; color: var(--accent); }
.pick-slots { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 6px 52px; }
.pick-hint { padding: 2px 10px 10px 52px; font-size: 12.5px; color: var(--muted); }
.pick-hint.warn { color: var(--warn); }

.callout { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-size: 13.5px; align-items: flex-start; }
.callout > svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.callout > .grow { min-width: 180px; }
.callout.info { background: var(--info-soft); } .callout.info > svg { color: var(--info); }
.callout.good { background: var(--good-soft); } .callout.good > svg { color: var(--good); }
.callout.warn { background: var(--warn-soft); } .callout.warn > svg { color: var(--warn); }
.callout b { font-weight: 600; }

.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 10px; }
.success-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; animation: pop .3s var(--ease-ios) both; }
.success-ic svg { width: 32px; height: 32px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* -------------------------------------------------------------- Meldungen */
.toasts { position: fixed; z-index: 300; bottom: 20px; left: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 5px 5px 5px 12px; border-radius: 12px; background: var(--raised); color: var(--ink); box-shadow: var(--shadow-3); font-size: 13.5px; font-weight: 500; animation: toastIn .24s var(--ease-ios) both; max-width: min(640px, 100%); }
:root[data-theme="dark"] .toast { background: #2E2E32; }
.toast.out { animation: toastOut .18s var(--ease) forwards; }
.toast > svg { width: 18px; height: 18px; color: var(--info); }
.toast.good > svg { color: var(--good); } .toast.crit > svg { color: var(--crit); }
.toast button { border: 0; background: var(--hover); color: var(--accent); height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.toast .t-msg { padding-right: 8px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* -------------------------------------------------------------- Suche (Spotlight) */
.cmdk { width: min(620px, 100%); align-self: start; margin-top: 12vh; border-radius: 14px; }
.cmdk .cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--line); }
.cmdk .cmdk-input svg { width: 20px; height: 20px; color: var(--muted); }
.cmdk .cmdk-input input { flex: 1; border: 0; background: transparent; outline: none; font-size: 19px; font-weight: 400; letter-spacing: -.01em; }
.cmdk .cmdk-input input::placeholder { color: var(--faint); }
.cmdk .cmdk-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.cmdk .cmdk-group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 10px 4px; }
.cmdk .cmdk-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cmdk .cmdk-item.sel { background: var(--accent-fill); color: var(--accent-ink); }
.cmdk .cmdk-item .ci-ic { width: 24px; height: 24px; display: grid; place-items: center; color: var(--accent); }
.cmdk .cmdk-item.sel .ci-ic { color: var(--accent-ink); }
.cmdk .cmdk-item .ci-ic svg { width: 17px; height: 17px; }
.cmdk .cmdk-item .ci-sub { color: var(--muted); font-size: 12.5px; margin-left: auto; padding-left: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cmdk .cmdk-item.sel .ci-sub, .cmdk .cmdk-item.sel .ci-main small { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.cmdk .cmdk-item:has(small) { height: auto; min-height: 46px; padding-top: 5px; padding-bottom: 5px; }
.cmdk .ci-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmdk .ci-main small { font-size: 12px; color: var(--muted); }
.cmdk .cmdk-item:hover:not(.sel) { background: var(--hover); }

/* Auswahl per Tastatur in Listen (Spule wählen) */
.li.sel { background: var(--accent-soft); }
.usage-after { font-size: 13.5px; color: var(--muted); min-height: 19px; margin-top: 2px; }
.usage-after b { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- Leer / Laden */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 44px 20px; color: var(--muted); }
.empty-state .e-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--faint); margin-bottom: 4px; }
.empty-state .e-ic svg { width: 24px; height: 24px; }
.empty-state b { color: var(--ink); font-size: 15px; font-weight: 600; }
.skeleton { background: var(--hover); border-radius: var(--r-l); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.loader { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--muted); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- Reiter */
.tabs { display: flex; gap: 2px; padding: 2px; margin-bottom: 18px; border-radius: 9px; background: var(--hover); overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-weight: 500; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t), color var(--t); }
.tabs button svg { width: 15px; height: 15px; }
.tabs button .count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); background: var(--surface-2); box-shadow: 0 0 0 .5px var(--line-2), 0 1px 2px rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .tabs button.on { background: #5A5A60; }

/* -------------------------------------------------------------- Menü */
.menu-pop { position: fixed; z-index: 120; min-width: 210px; max-height: calc(100dvh - 20px); overflow-y: auto; padding: 5px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow-3); animation: menuIn .12s var(--ease) both; }
:root[data-theme="dark"] .menu-pop { background: #2C2C30; }
@keyframes menuIn { from { opacity: 0; transform: scale(.98); } }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 9px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover, .menu-pop button:focus-visible { background: var(--accent-fill); color: var(--accent-ink); outline: none; }
.menu-pop svg { width: 16px; height: 16px; color: var(--muted); }
.menu-pop { max-width: min(320px, calc(100vw - 20px)); }
.menu-pop button > span { flex: 1; min-width: 0; }
.menu-pop .mp-check { margin-left: auto; color: var(--accent); }
.menu-pop button:hover svg, .menu-pop a:hover svg { color: var(--accent-ink); }
.menu-pop .danger, .menu-pop .danger svg { color: var(--crit); }
.menu-pop hr { border: 0; height: 1px; background: var(--line); margin: 4px 8px; }

.bottom-nav { display: none; }
.fab { display: none; }

/* Code & Markdown */
pre.code { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.55; overflow-x: auto; color: var(--ink-2); white-space: pre; }
.md h2 { font-size: 17px; margin: 22px 0 6px; } .md h2:first-child { margin-top: 0; }
.md h3 { font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.md h4 { font-size: 14px; margin: 12px 0 4px; }
.md ul { margin: 0 0 8px; padding-left: 18px; } .md li { margin: 3px 0; font-size: 13.5px; }
.md p { margin: 6px 0; font-size: 13.5px; color: var(--ink-2); }
.md code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: .9em; }

/* -------------------------------------------------------------- Scanner */
.scan-stage { position: relative; aspect-ratio: 4 / 3; max-height: 56vh; width: 100%; border-radius: var(--r-l); overflow: hidden; background: #000; }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 20% 12%; pointer-events: none; }
.scan-frame i { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; border-radius: 4px; opacity: .9; }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.scan-line { position: absolute; left: 4%; right: 4%; top: 0; height: 2px; border-radius: 2px; background: var(--accent); opacity: .85; animation: scanline 1.8s ease-in-out infinite alternate; }
@keyframes scanline { to { top: 100%; } }
.scan-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: #fff; font-size: 13.5px; text-align: center; background: rgba(0, 0, 0, .6); }
.scan-msg[hidden] { display: none; }
.scan-msg svg { width: 18px; height: 18px; }
.scan-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.scan-tools .icon-btn { background: rgba(0, 0, 0, .45); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.scan-tools .icon-btn.on { color: #FFD60A; }
.code-input .code-prefix { position: absolute; left: 10px; font-weight: 650; color: var(--accent); pointer-events: none; font-size: 15px; }
.code-input .input { padding-left: 34px; font-size: 15px; letter-spacing: .04em; }
.code-input.no-prefix .input { padding-left: 10px; letter-spacing: 0; }

/* -------------------------------------------------------------- Etiketten (Druckvorschau) */
.plabel { width: var(--lw); height: var(--lh); flex-shrink: 0; background: #fff; color: #000; display: flex; align-items: stretch; gap: calc(var(--lh) * .06); padding: calc(var(--lh) * .07); overflow: hidden; font-family: var(--font); border-radius: 1.2mm; box-shadow: 0 1px 3px rgba(0, 0, 0, .22), 0 0 0 .2mm rgba(0, 0, 0, .08); }
.plabel .lb-qr { height: 100%; aspect-ratio: 1; flex-shrink: 0; }
.plabel .lb-qr svg { width: 100%; height: 100%; display: block; }
.lb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: calc(var(--lh) * .018); line-height: 1.12; }
.lb-code { font-family: var(--mono); font-weight: 700; font-size: calc(var(--lh) * .155); letter-spacing: -.02em; }
.lb-mf { display: flex; align-items: center; gap: 1mm; font-weight: 750; font-size: calc(var(--lh) * .1); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; }
.lb-mf img { height: calc(var(--lh) * .15); width: auto; max-width: 40%; object-fit: contain; }
.lb-line { font-size: calc(var(--lh) * .095); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-color { display: flex; align-items: center; gap: 1.2mm; font-weight: 750; font-size: calc(var(--lh) * .125); white-space: nowrap; overflow: hidden; }
.lb-sw { width: calc(var(--lh) * .14); height: calc(var(--lh) * .14); border-radius: 50%; border: .25mm solid #000; flex-shrink: 0; }
.lb-meta { font-size: calc(var(--lh) * .082); color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plabel.compact { flex-direction: column; align-items: center; justify-content: center; gap: .4mm; }
.plabel.compact .lb-qr { height: 78%; }
.plabel.compact .lb-code { font-size: calc(var(--lh) * .13); }
.plabel.round { border-radius: 50%; padding: calc(var(--lh) * .15); flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6mm; }
.plabel.round .lb-qr { height: 46%; }
.plabel.round .lb-text { align-items: center; flex: 0; }
.plabel.round .lb-mf, .plabel.round .lb-color { justify-content: center; }
.plabel-roll { display: flex; flex-wrap: wrap; gap: 4mm; }
.plabel-sheet { width: 210mm; height: 297mm; background: #fff; display: grid; grid-template-columns: repeat(var(--cols), var(--lw)); grid-template-rows: repeat(var(--rows), var(--lh)); justify-content: center; align-content: start; box-shadow: var(--shadow-2); margin: 0 auto 6mm; }
.plabel-sheet .plabel { box-shadow: none; border-radius: 0; outline: .1mm dashed #d8d8d8; }
.plabel.empty-cell { background: repeating-linear-gradient(45deg, #fafafa 0 2mm, #f1f1f1 2mm 4mm); }
.lb-preview { overflow: auto; padding: 12px; background: var(--bg); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); max-height: 72vh; }
.lb-picker { max-height: 52vh; overflow-y: auto; margin: 0 -8px; }
.lb-picker input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }

#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  #print-root { display: block !important; }
  #print-root .plabel-roll { display: block; }
  #print-root .plabel-roll .plabel { box-shadow: none; border-radius: 0; break-after: page; page-break-after: always; }
  #print-root .plabel-sheet { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  #print-root .plabel-sheet .plabel { outline: none; }
  #print-root .plabel.empty-cell { background: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* -------------------------------------------------------------- Katalog */
.cat-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-width: 0; }
.cat-body { flex: 1; min-width: 0; }
.cat-title { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; margin: 2px 0 1px; }
.cat-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cat-metas { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 3px; }
.cat-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cat-meta svg { width: 13px !important; height: 13px !important; }
.cat-chev { width: 16px !important; height: 16px !important; flex-shrink: 0; color: var(--faint); }
.mat-card { align-items: flex-start; }
.mat-code { min-width: 64px; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1; padding-top: 2px; }
.mat-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mat-kv span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.mat-kv svg { width: 13px !important; height: 13px !important; color: var(--muted); }
.hygro { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.hygro i { width: 11px; height: 5px; border-radius: 3px; background: var(--line-2); }
.hygro i.on { background: var(--info); }
.hygro span { margin-left: 4px; }
.fin-card { padding: 12px 14px; }
.fin-card .cat-title { font-size: 14px; }
.custom-fmt { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cf { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.cf .input { height: 32px; }

/* Favoriten */
.fav-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; transition: color var(--t), background var(--t); }
.fav-btn:hover { color: var(--warn); background: var(--hover); }
.fav-btn svg { width: 16px; height: 16px; }
.fav-on { color: #F5A623 !important; }
.fav-on svg { fill: currentColor; }

/* -------------------------------------------------------------- Einstellungen (gruppierte Listen) */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--toolbar-h) + 12px); display: flex; flex-direction: column; gap: 1px; }
.set-nav a { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--ink); font-weight: 500; font-size: 13.5px; transition: background var(--t); }
.set-nav a svg { width: 16px; height: 16px; color: var(--accent); }
.set-nav a:hover { background: var(--hover); }
.set-nav a.on { background: var(--press); color: var(--ink); } /* Unter-Navigation dezent – die Seitenleiste trägt schon die Akzentfläche */
.set-nav a.on svg { color: var(--accent); }
.set-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; max-width: 780px; }
.set-sec { scroll-margin-top: calc(var(--toolbar-h) + 16px); }
.set-h { display: flex; align-items: center; gap: 7px; margin: 0 0 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-h svg { display: none; }
.set-card { padding: 0 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-label { min-width: 0; }
.set-label b { display: block; font-size: 14px; font-weight: 500; }
.set-label span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.set-ctrl { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.set-ctrl .select { width: 190px; }
.set-num { width: 120px; }
.accent-dot { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transition: box-shadow var(--t); }
.accent-dot.on { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--c); }
.set-sessions { display: flex; flex-direction: column; gap: 6px; padding: 0 0 14px; }
.set-session { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.set-session > svg { width: 16px; height: 16px; color: var(--muted); }
.set-session small { display: block; font-size: 12px; color: var(--muted); }
.bk-list { padding-top: 4px; }
.bk-item { padding: 4px 6px 4px 12px; }
.bk-main { flex: 1; min-width: 0; }
.bk-item .icon-btn { flex-shrink: 0; }
.bk-more { align-self: flex-start; margin: 2px 0 0 4px; }
.type-chip { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; cursor: pointer; }
:root[data-theme="dark"] .type-chip { background: var(--surface); }
.type-chip:hover { background: var(--hover); }
.type-chip > svg:first-child { width: 20px; height: 20px; color: var(--accent); }
.type-chip small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.type-chip b { font-size: 14px; font-weight: 600; }
.type-chip .spacer { flex: 1; }
.type-chip > svg:last-child { width: 16px; height: 16px; color: var(--faint); }

/* -------------------------------------------------------------- Projekte */
.pj-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--pj, var(--muted)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.pj-ic { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--pj, var(--accent)) 15%, transparent); color: var(--pj, var(--accent)); }
.pj-ic svg { width: 18px; height: 18px; }
.pj-ic.sm { width: 28px; height: 28px; border-radius: 7px; }
.pj-ic.sm svg { width: 15px; height: 15px; }
.pj-ic.lg { width: 56px; height: 56px; border-radius: 15px; }
.pj-ic.lg svg { width: 28px; height: 28px; }
/* Etikett im Verlauf */
.pj-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: var(--ink-2); font-weight: 550; vertical-align: bottom; }
.pj-tag:hover { color: var(--accent); }
/* Auswahl beim Buchen */
.pj-pick { min-height: 28px; }
.pj-chip { max-width: 220px; }
.pj-chip .ellipsis { min-width: 0; }
.chip.on .pj-dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
.chip.dashed { background: transparent; box-shadow: none; outline: 1px dashed var(--line-2); outline-offset: -1px; color: var(--muted); }
.chip.dashed:hover { color: var(--accent); outline-color: var(--accent); background: transparent; }
.pj-new { display: flex; align-items: center; gap: 8px; width: 100%; }
.pj-new .pj-dot { margin-left: 4px; }
.pj-new .input { flex: 1; min-width: 0; }
/* Farbwahl */
.pj-colors { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px; }
.pj-color { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--pj); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform var(--t), box-shadow var(--t); }
.pj-color:hover { transform: scale(1.08); }
.pj-color.on { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--pj); }
/* Liste */
.pj-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.pj-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.pj-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pj-id { min-width: 0; flex: 1; }
.pj-name { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.pj-meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pj-card.is-done .pj-ic { background: var(--hover); color: var(--muted); }
.pj-nums { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.pj-nums b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-right: auto; }
.pj-nums b small { font-size: 13px; font-weight: 500; color: var(--muted); }
.pj-strip { display: flex; gap: 2px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.pj-strip i { min-width: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
/* Projektseite */
.pj-hero { display: grid; gap: 18px; padding: 20px; margin-bottom: 18px; }
.pj-hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pj-hero-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.pj-hero .sd-title { margin-bottom: 0; overflow-wrap: anywhere; }
.pj-notes { margin: 6px 0 0; max-width: 70ch; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.pj-stats { margin: 0; }
.pj-hero .pj-strip { margin-top: -6px; }
.pj-hero .sd-actions { grid-area: auto; } /* sonst legt der Name aus .sd-hero eine zweite Spalte an */
.seg-n { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg .on .seg-n { color: inherit; opacity: .7; }
.inline-ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

/* -------------------------------------------------------------- Dashboard-Widgets */
.dash { align-items: start; grid-auto-flow: row dense; } /* keine Löcher, keine künstlich gestreckten Karten */
.dw { position: relative; min-width: 0; display: flex; }
.dw > .card { flex: 1; min-width: 0; }
.dw-tools { display: none; }
.dash.editing .dw-tools { display: flex; position: absolute; top: 8px; left: 8px; right: 8px; align-items: center; gap: 6px; padding: 4px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow-3); z-index: 3; }
.dash.editing .dw > .card { pointer-events: none; outline: 1.5px dashed var(--line-2); outline-offset: -1px; }
.dash.editing .dw > .card > * { opacity: .4; }
.dash.editing .dw { min-height: 110px; }
.dw-handle { touch-action: none; cursor: grab; width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dw-handle:active { cursor: grabbing; }
.dw-handle svg { width: 16px; height: 16px; }
.dw-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-btn { height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: var(--hover); display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; flex-shrink: 0; }
.dw-btn svg { width: 14px; height: 14px; }
.dw-btn.danger { color: var(--crit); }
.dw.dragging { z-index: 30; pointer-events: none; }
.dw.dragging > .card { box-shadow: var(--shadow-3); outline-color: var(--accent); }
.dw.removing { animation: modalOut .18s var(--ease) forwards; }
body.is-dragging { user-select: none; cursor: grabbing; }
/* Schmale Widgets im Anpassen-Modus: Name in eigener Zeile, Knöpfe darunter rechts;
   noch schmaler bleibt die Knopfbeschriftung nur für Screenreader, der Tooltip erklärt */
.dash.editing .dw, .wl.editing .wl-item { container-type: inline-size; }
@container (max-width: 340px) {
  .dw-tools { flex-wrap: wrap; row-gap: 2px; }
  .dw-name { order: -1; flex-basis: 100%; padding: 3px 6px 2px; }
  .dw-name + .dw-btn { margin-left: auto; }
}
@container (max-width: 250px) {
  .dw-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: background var(--t); }
.quick-btn:hover { background: var(--hover); }
.quick-btn svg { width: 20px; height: 20px; color: var(--accent); }

/* Drucker-Slots im Dashboard: feste Spalten (AMS = 4 nebeneinander, mobil 2) */
.slot-grid { display: grid; gap: 8px; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.slot-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; transition: background var(--t); }
:root[data-theme="dark"] .slot-card { background: var(--bg); }
a.slot-card:hover { background: var(--hover); }
.slot-card.free { background: transparent; border: 0; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; font-size: 13px; }
.slot-card.free:hover { color: var(--accent); }

/* =====================================================================
   TABLET (721 – 1180): Seitenleiste als Symbolleiste
   ===================================================================== */
@media (max-width: 1180px) {
  :root { --sidebar: 64px; --gutter: 24px; }
  .sidebar { padding: 12px 8px; align-items: center; }
  .brand-row { justify-content: center; padding: 0; margin-bottom: 14px; }
  .brand-name, .nav-label, .nav a .count, .nav a .warn-dot, .nav a > span, .side-search, .nav-locs, .sidebar-foot .seg, .side-toggle { display: none !important; }
  .side-scroll { width: 100%; }
  .nav { width: 100%; gap: 4px; }
  .nav a { justify-content: center; height: 40px; padding: 0; border-radius: 9px; }
  .nav a svg { width: 20px; height: 20px; }
  .sidebar-foot { justify-content: center; border-top: 0; }
  .search-trigger { width: 220px; }
  .span-3 { grid-column: span 6; } .span-4 { grid-column: span 6; } .span-5, .span-7, .span-8 { grid-column: span 12; }
  .wiz { grid-template-columns: 196px 1fr; }
  .sd-hero { grid-template-columns: 140px minmax(0, 1fr); column-gap: 22px; }
  .sd-visual .spool { width: 140px !important; height: 140px !important; }
  .sd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings { grid-template-columns: 1fr; gap: 14px; }
  .set-nav { position: sticky; top: var(--toolbar-h); z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px 0; background: var(--bg); }
  .set-nav a { flex-shrink: 0; }
}

/* Seitenleiste auf dem Desktop einklappbar */
.app { transition: grid-template-columns .25s var(--ease); }
@media (min-width: 1181px) {
  .app.side-collapsed { --sidebar: 64px; }
  .app.side-collapsed .sidebar { padding: 14px 8px 12px; align-items: center; }
  .app.side-collapsed .brand-row { flex-direction: column; height: auto; gap: 10px; padding: 0; margin-bottom: 12px; }
  .app.side-collapsed .brand-name, .app.side-collapsed .nav-label, .app.side-collapsed .nav a .count, .app.side-collapsed .nav a > span, .app.side-collapsed .nav a .warn-dot,
  .app.side-collapsed .side-search span, .app.side-collapsed .side-search kbd, .app.side-collapsed .nav-locs, .app.side-collapsed .sidebar-foot .seg { display: none; }
  .app.side-collapsed .side-search { width: 36px; justify-content: center; padding: 0; }
  .app.side-collapsed .side-scroll { width: 100%; }
  .app.side-collapsed .nav a { justify-content: center; padding: 0; height: 36px; }
  .app.side-collapsed .sidebar-foot { justify-content: center; }
}

/* =====================================================================
   MOBIL (≤ 720): iOS-Muster – Navigationsleiste, großer Titel, Tab-Leiste, Sheets
   ===================================================================== */
@media (max-width: 720px) {
  :root { --gutter: 16px; --toolbar-h: 48px; }
  body { font-size: 15px; }
  .app { display: block; padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar { gap: 2px; padding: env(safe-area-inset-top) 6px 0 16px; height: calc(var(--toolbar-h) + env(safe-area-inset-top)); }
  .topbar .crumbs a { font-size: 16px; padding-left: 0; }
  .topbar .crumbs a span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .crumbs b, .topbar .crumbs > svg { display: none; }
  .topbar .tb-title { position: absolute; left: 50%; transform: translate(-50%, 4px); max-width: calc(100vw - 196px); font-size: 16px; }
  .topbar.has-crumbs.show-title .crumbs a span { display: none; } /* wie iOS: Titel hat Vorrang, Zurück bleibt als „‹“ */
  .topbar.show-title .tb-title { transform: translate(-50%, 0); }
  .topbar .mobile-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
  .topbar.has-crumbs .mobile-brand { display: none; }
  .topbar .mobile-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
  .topbar .mobile-brand .brand-mark svg { width: 17px; height: 17px; }
  .search-trigger { width: 40px; height: 40px; padding: 0; justify-content: center; background: transparent; color: var(--accent); }
  .search-trigger svg { width: 20px; height: 20px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .topbar .icon-btn { width: 40px; height: 40px; color: var(--accent); }
  .topbar .icon-btn svg { width: 21px; height: 21px; }
  .topbar .hide-m, .topbar .tb-sep { display: none; }
  .topbar .tb-primary-m { display: grid; }
  .page { padding: 0 var(--gutter) 28px; }
  .ph { padding: 2px 0 16px; gap: 12px; }
  .ph-text { min-width: 200px; }
  .ph-actions:has(> :nth-child(2)) { width: 100%; }
  .ph-actions:has(> :nth-child(2)) .btn { flex: 1; }
  .h1 { font-size: 30px; }
  .grid { gap: 12px; }
  .span-3 { grid-column: span 6; } .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
  .card { padding: 14px; }
  .kpi { padding: 12px 14px 14px; }
  .kpi-value { font-size: 24px; }
  .kpi .spark { display: none; }
  .btn { --h: 42px; font-size: 15px; border-radius: 10px; }
  .btn.sm { --h: 36px; font-size: 14px; }
  .icon-btn { width: 44px; height: 44px; }
  .topbar .icon-btn { width: 44px; height: 44px; }
  .collapse-btn { width: 40px !important; height: 40px !important; margin: -8px -10px -8px 0; }
  .card-link { height: 36px; }
  .fav-btn, .sc-flag { width: 34px; height: 34px; }
  .tl-actions .icon-btn { width: 36px; height: 36px; }
  .input, .select { height: 42px; font-size: 16px; border-radius: 10px; }
  .textarea { font-size: 16px; }
  .chip { height: 36px; font-size: 14px; padding: 0 13px; }
  .seg button { height: 34px; font-size: 14px; }
  .tabs button { height: 34px; font-size: 14px; }
  .li { min-height: 56px; }
  .li .li-title { font-size: 15px; }
  .li .li-sub { font-size: 13px; }
  /* Spulen als iOS-Liste: eine Spalte, Menge rechts, Füllstand darunter */
  .spool-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .spool-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 9px; padding: 12px 14px 0; }
  .st-main { grid-column: 1; grid-row: 1; gap: 12px; }
  .st-main .spool { width: 42px !important; height: 42px !important; }
  .st-level { display: contents; }
  .st-level-top { grid-column: 2; grid-row: 1; flex-direction: column; align-items: flex-end; justify-content: center; margin: 0; gap: 1px; }
  .st-level-top b { font-size: 17px; }
  .st-level .bar { grid-column: 1 / -1; grid-row: 2; height: 5px; }
  .st-loc { grid-column: 1 / -1; grid-row: 3; height: 38px; margin: 0 -14px; font-size: 13px; }
  .st-flags { margin: 0; align-self: center; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr 1fr; }
  .tiles, .tiles.lg, .tiles.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toolbar .search { max-width: none; min-width: 0; flex-basis: 100%; }
  .hide-m { display: none !important; }
  .tl-day { top: calc(var(--toolbar-h) + env(safe-area-inset-top)); }
  .tl-actions { opacity: 1; }
  .quicknav { grid-template-columns: 1fr; } .qn-fil b { max-width: none; }
  .lb-preview .plabel-sheet { zoom: .45; }
  [data-weigh-info] { flex-wrap: wrap; } [data-weigh-info] > .grow { flex-basis: 100%; }

  .sd-hero { grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "visual id" "level level" "actions actions"; column-gap: 14px; row-gap: 14px; padding: 16px 14px; }
  .sd-visual { align-self: start; }
  .sd-visual .spool { width: 76px !important; height: 76px !important; }
  .sd-title { font-size: 24px; margin-top: 2px; }
  .sd-badges { margin-top: 8px; }
  .sd-level-top b { font-size: 22px; }
  .sd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .sd-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sd-actions .btn { padding: 0 8px; font-size: 13.5px; gap: 6px; }
  .sd-actions .sd-main { grid-column: 1 / -1; }
  .pj-hero .sd-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-hero { padding: 16px; }
  .pj-hero .pj-ic.lg { width: 48px; height: 48px; border-radius: 13px; }

  .set-nav { top: calc(var(--toolbar-h) + env(safe-area-inset-top)); margin: 0 -16px; padding: 6px 16px; }
  .set-nav a span { display: none; }
  .set-nav a.on span { display: inline; }
  .set-card { padding: 0 14px; }
  .set-row { flex-wrap: wrap; min-height: 52px; gap: 8px 12px; }
  .set-ctrl .select { width: 170px; }

  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 8px 10px; }
  .stat .k { font-size: 11.5px; }
  .stat .v { font-size: 15px; }

  /* Dialog → Sheet von unten */
  .overlay { padding: 0; place-items: end stretch; }
  .modal, .modal.wide, .modal.xl {
    width: 100%; max-height: calc(100dvh - 20px); height: auto; border-radius: 14px 14px 0 0;
    animation: sheetIn .34s var(--ease-ios) both; padding-bottom: env(safe-area-inset-bottom);
  }
  .modal.xl { height: calc(100dvh - 12px); }
  .overlay.closing .modal { animation: sheetOut .22s var(--ease) forwards; }
  @keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheetOut { to { transform: translateY(100%); } }
  .grabber { display: block; width: 36px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 6px auto 0; flex-shrink: 0; }
  .modal-head { padding: 10px 16px 4px; }
  .modal-body { padding: 10px 16px 16px; }
  .modal-foot { padding: 10px 16px; flex-wrap: wrap; }
  .modal-foot .spacer { display: none; }
  .modal-foot .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .modal-foot .btn.ghost.danger { flex: 0 0 auto; width: 42px; padding: 0; font-size: 0; gap: 0; }
  .cmdk { margin-top: 0; align-self: end; border-radius: 14px 14px 0 0; }
  .cmdk .cmdk-input kbd { display: none; }
  /* iOS: Schließen über ✕/Wischen – „Abbrechen“ unten wäre doppelt und nimmt der Primäraktion Platz */
  .modal:not(.confirm) .modal-foot .btn.ghost[data-close] { display: none; }
  .cmdk .cmdk-list { max-height: 60vh; }

  .wiz { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
  .wiz-side { display: none; }
  .wiz-progress { display: block; }
  .wiz-head { padding: 12px 16px 2px; }
  .wiz-mtitle { display: inline-flex; color: var(--ink); font-weight: 600; }
  .wiz-body { padding: 12px 16px 18px; }
  .wiz-foot { padding: 10px 16px; }
  .wiz-foot .btn { flex: 1; }
  .wiz-foot .spacer { display: none; }

  /* Tab-Leiste */
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(56px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom);
    background: var(--toolbar-bg);
    -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 48px; border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 500; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav .nav-add { width: 44px; height: 44px; margin: 2px auto 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); }
  .bottom-nav .nav-add svg { width: 22px; height: 22px; }
  .toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .table-wrap .table { font-size: 13px; }
}

@media (max-width: 380px) {
  .h1 { font-size: 28px; }
}

@media (max-width: 1180px) and (min-width: 721px) { .hide-tablet { display: none !important; } }
@media (hover: none) { .tl-actions { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}
.no-anim, .no-anim * { animation: none !important; }
[data-href] { cursor: pointer; }

/* Scanner ohne Kamera: schwarze Fläche einklappen, Eingabe rückt nach oben */
.scan-stage.no-cam { aspect-ratio: auto; height: auto; min-height: 52px; background: var(--hover); }
.scan-stage.no-cam video, .scan-stage.no-cam .scan-frame, .scan-stage.no-cam .scan-tools { display: none; }
.scan-stage.no-cam .scan-msg { position: static; justify-content: flex-start; background: transparent; color: var(--muted); padding: 14px 16px; }

/* =====================================================================
   Bewegung – nur beim Seitenwechsel (#view.page-enter), nie nach dem
   Speichern (#view.no-anim). Kurz, mit weichem Auslauf, gestaffelt –
   so führt sie den Blick, statt zu dekorieren.
   ===================================================================== */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes barGrow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spoolIn { from { opacity: 0; transform: scale(.86) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes hubIn { from { transform: rotate(-150deg); } to { transform: none; } }

/* Seitenkopf und Inhalte steigen kurz nacheinander auf (--n setzt app.js) */
.page-enter .ph, .page-enter .sd-hero, .page-enter .loc-climate { animation: rise .34s var(--ease-out) both; }
.page-enter .rise { /* app.js markiert die ersten 20 Elemente je Liste */
  animation: rise .38s var(--ease-out) both;
  animation-delay: calc(50ms + var(--n, 0) * 30ms);
}

/* Füllstände wachsen von links, Diagramme bauen sich auf */
.page-enter :is(.rise, .sd-hero) .bar > i { transform-origin: left; animation: grow .8s var(--ease-out) both; animation-delay: calc(180ms + var(--n, 0) * 30ms); }
.page-enter .hbar .hb-track i { transform-origin: left; animation: grow .8s var(--ease-out) both; animation-delay: calc(220ms + var(--i, 0) * 50ms); }
.page-enter .chart .bar-rect { transform-box: fill-box; transform-origin: bottom; animation: barGrow .6s var(--ease-out) both; animation-delay: calc(220ms + var(--i, 0) * 28ms); }
.page-enter .chart .line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease-out) .25s forwards; }
.page-enter .chart .area { animation: fadeIn .5s .7s both; }

/* Spulen drehen sich ein; große Spulen wickeln sich zusätzlich von der Nabe auf (SMIL in ui.js) */
:is(.rise, .sd-hero, .modal) .spool-in { animation: spoolIn .55s var(--ease-out) both; animation-delay: calc(80ms + var(--n, 0) * 30ms); }
.spool .hub-in { animation: hubIn 1s var(--ease-out) both; }

/* Assistent: Kacheln eines Schritts kommen nacheinander */
.step-anim :is(.tiles, .match-list, .swatches) > * { animation: rise .3s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 12) * 18ms); }
.card.expanding > :not(.card-head) { animation: rise .28s var(--ease-out) both; }

/* Antwort auf Berührung: drücken gibt nach, Karten heben sich bei Maus leicht an */
.btn, .chip, .icon-btn, .seg button, .tile, .match-card, .pick-row, .quick-btn, .slot-card, .spool-tile, .li.clickable, .alert-item, .bottom-nav a, .bottom-nav button {
  transition: background var(--t), box-shadow var(--t), color var(--t), opacity var(--t), filter var(--t), transform .18s var(--ease-out);
}
.btn:active, .chip:active, .icon-btn:active, .seg button:active, .bottom-nav .nav-add:active { transform: scale(.95); }
.tile:active, .match-card:active, .pick-row:active, .quick-btn:active, .slot-card:active, .spool-tile:active, .li.clickable:active, .alert-item:active { transform: scale(.985); }
.bottom-nav a:active svg { transform: scale(.9); transition: transform .12s var(--ease-out); }
@media (hover: hover) {
  .spool-tile:hover, a.slot-card:hover, .cat-card.interactive:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* Verbindungsanzeige auf schmalen Telefonen nur als Symbol */
@media (max-width: 400px) { .conn span { display: none; } .conn { padding: 0 8px; } }

/* ---------- Drucker (Bambu Lab): Live-Stand, Aufträge ---------- */
.pr-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.pr-pill > svg { width: 14px; height: 14px; margin-left: 4px; }
.pr-pill.warn { background: var(--warn-soft); color: var(--warn); }
.pr-pill b { font-weight: 650; }
.pr-pill-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.pr-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(currentColor calc(var(--p) * 1%), var(--line-2) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px); transition: background .4s; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--gutter); margin-bottom: var(--gutter); }
.pr-pending { margin-bottom: var(--gutter); box-shadow: inset 0 0 0 1px var(--warn-soft), var(--shadow-1); }
.pr-pending .h2 svg { color: var(--warn); }
.pr-live { display: flex; flex-direction: column; gap: 10px; }
.pr-state { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.pr-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--faint); }
.pr-dot.run { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: prPulse 1.6s ease-in-out infinite; }
.pr-dot.idle, .pr-dot.good { background: var(--good); }
.pr-dot.warn { background: var(--warn); }
.pr-dot.crit { background: var(--crit); }
@keyframes prPulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.pr-temp { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pr-temp svg { width: 13px; height: 13px; }
.pr-job { display: flex; align-items: baseline; gap: 10px; font-weight: 600; font-size: 15px; min-width: 0; }
.pr-job > span { flex: 1; min-width: 0; }
.pr-job b { font-size: 20px; letter-spacing: -.01em; }
.pr-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pr-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.pr-bar.warn i { background: var(--warn); }
.pr-bar.sm { height: 5px; flex: 1; min-width: 40px; max-width: 160px; }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.pr-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.pr-meta svg { width: 13px; height: 13px; }
.pr-active { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.pr-active svg { width: 14px; height: 14px; }
.pr-trays { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.pr-tray { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 7px; align-items: center; padding: 6px 8px; border-radius: var(--r-s); background: var(--surface-2); color: inherit; text-decoration: none; font-size: 12px; min-width: 0; box-shadow: inset 0 0 0 1px var(--line); }
.pr-tray i { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pr-tray b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-tray small { color: var(--muted); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-tray-l { display: none; }
.pr-tray.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
a.pr-tray:hover { background: var(--hover); }
.pr-compact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); color: inherit; text-decoration: none; font-size: 13px; min-width: 0; margin-bottom: 10px; }
.pr-compact:hover { background: var(--hover); }
.pr-compact > b.ellipsis { flex-shrink: 0; max-width: 40%; }
.pr-compact > span.ellipsis { flex: 1; min-width: 0; }
.pr-compact-wrap:empty { display: none; }
.pr-jobs { display: flex; flex-direction: column; }
.pr-jobrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pr-jobrow:first-child { border-top: 0; padding-top: 2px; }
.pr-jobmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pr-jobsub { font-size: 12.5px; }
.pr-jobact { display: flex; gap: 6px; flex-shrink: 0; }
.pr-items { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.pr-item { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.pr-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); flex-shrink: 0; }
.pr-bookrows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.pr-bookrow { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) 110px; gap: 10px; align-items: center; }
.pr-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pr-unit { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.pr-switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; }
.pr-switch .switch { margin-top: 1px; }
.pr-switch small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pr-test { margin-top: 14px; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface-2); font-size: 13px; }
.pr-test.good { background: var(--good-soft); color: var(--good); }
.pr-test.crit { background: var(--crit-soft); color: var(--crit); }
@media (max-width: 720px) {
  .pr-grid { grid-template-columns: 1fr; }
  .pr-pill-name { display: none; }
  .pr-jobrow { flex-direction: column; align-items: stretch; }
  .pr-jobact { justify-content: flex-end; }
  .pr-bookrow { grid-template-columns: 1fr 100px; }
  .pr-bookrow > .pr-item { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .pr-dot.run { animation: none; } }

/* ---------- Hilfsklassen statt wiederkehrender Inline-Stile (!important = Vorrang wie style="") ---------- */
.fs-12 { font-size: 12px !important; }
.fs-125 { font-size: 12.5px !important; }
.fs-13 { font-size: 13px !important; }
.fs-135 { font-size: 13.5px !important; }
.m-0 { margin: 0 !important; }
.mt-6 { margin-top: 6px !important; }
.mt-8 { margin-top: 8px !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-12 { margin-bottom: 12px !important; }
.mb-16 { margin-bottom: 16px !important; }
.bleed-8 { margin: 0 -8px !important; }
.gap-6 { gap: 6px !important; }
.gap-10 { gap: 10px !important; }
.gap-14 { gap: 14px !important; }
.flex-1 { flex: 1 !important; }
.minw-0 { min-width: 0 !important; }
.pad-24 { padding: 24px !important; }
.pad-y-24 { padding: 24px 0 !important; }
