/* =====================================================================
   Teqlo – Haupt-Styles. Mobile zuerst: unten Tab-Leiste, ab 900 px links Seitenleiste.
   Dunkel ist Standard; hell über html[data-theme="light"] (eigene Wahl oder System, siehe theme.js).
   Die Akzentfarbe kommt aus dem Branding (style="--accent" an <html>).
   ===================================================================== */

@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --accent: #2f7cf6;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --on-accent: #fff;
  --bg: #0f1115;
  --bg-2: #151820;
  --surface: #181b23;
  --surface-hi: #1f2330;
  --line: rgba(255, 255, 255, .08);
  --line-hi: rgba(255, 255, 255, .16);
  --text: #eceef2;
  --text-2: #b9bdc7;
  --muted: #868b97;
  --ok: #3ccf8e;
  --warn: #f5b041;
  --err: #ef5b5b;
  --radius: 14px;
  --tap: 44px;                                   /* Mindestgröße für Finger */
  --top-h: 56px;
  --tab-h: 64px;
  --side-w: 232px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
/* Hell: data-theme setzt der Server (Wahl im Profil / Tag-Nacht-Schalter), sonst theme.js nach dem System */
html[data-theme="light"] {
  --bg: #f4f5f8; --bg-2: #eceef3; --surface: #ffffff; --surface-hi: #f6f7fa;
  --line: rgba(15, 20, 30, .09); --line-hi: rgba(15, 20, 30, .18);
  --text: #161a22; --text-2: #3b414e; --muted: #6b7180;
  --shadow: 0 10px 30px rgba(20, 30, 50, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sonst gewinnt z. B. display:flex einer Klasse */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { max-width: 60ch; margin: 0 0 20px; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font: 500 .75rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Gerüst ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 650; }
.brand img { height: 30px; max-width: 120px; object-fit: contain; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-weight: 750;
}
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.6rem; }


.usermenu { position: relative; }
.avatar-btn { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--surface-hi); color: var(--text); font: 650 .8rem "Inter Tight", sans-serif; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line-hi);
}
.avatar.sm { width: 34px; height: 34px; flex: none; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: var(--radius); box-shadow: var(--shadow);
  transform-origin: top right; animation: pop .18s var(--ease);
}
.menu-head { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head span { color: var(--muted); font-size: .85rem; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 10px;
  border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--surface-hi); }
.menu form { margin: 0; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

.main { padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 24px); animation: enter .3s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.sidenav { display: none; }

.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: flex;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .7rem; font-weight: 550; transition: color .2s;
}
.tabbar a .i { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on .i { transform: translateY(-1px) scale(1.08); }
.tabbar a:active .i { transform: scale(.9); }

@media (min-width: 900px) {
  .topbar { padding: 0 20px; }
  .brand { width: calc(var(--side-w) - 20px); }
  .iconbtn { margin-left: auto; }
  .topbar .topgear, .topbar .topnew { margin-left: auto; }
  .topbar .topgear + .topnew, .topbar .topnew + .iconbtn { margin-left: 0; }
  .sidenav {
    display: block; position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--side-w);
    padding: 16px 12px; overflow-y: auto; border-right: 1px solid var(--line);
  }
  .sidenav-group { margin-bottom: 18px; }
  .sidenav-label { padding: 0 12px 6px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }
  .sidenav a {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
    color: var(--text-2); font-weight: 520; transition: background .15s, color .15s, transform .22s var(--ease);
  }
  .sidenav a:hover { background: var(--surface); color: var(--text); }
  .sidenav a + a { margin-top: 2px; }
  .sidenav a.on { background: var(--accent-soft); color: var(--text); }
  .sidenav a.on .i { color: var(--accent); }
  .has-nav .main { margin-left: var(--side-w); padding: 28px 32px 48px; }
  .sidenav { display: flex; flex-direction: column; transition: width .2s var(--ease); }
  .has-nav .main, .brand { transition: margin-left .2s var(--ease), width .2s var(--ease); }
  .sidenav-toggle {
    margin-top: auto; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0;
    border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer;
  }
  .sidenav-toggle:hover { background: var(--surface); color: var(--text); }
  .sidenav-toggle .i { transition: transform .2s var(--ease); }
  .sn-text { white-space: nowrap; overflow: hidden; }
  /* Eingeklappt: nur Symbole, Name als Tooltip */
  .nav-small { --side-w: 68px; }
  .nav-small .brand-name { display: none; }
  .nav-small .sidenav { padding: 16px 10px; }
  .nav-small .sidenav a, .nav-small .sidenav-toggle { justify-content: center; padding: 0; gap: 0; position: relative;
    width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 12px; }
  .nav-small .sidenav a.on { background: color-mix(in srgb, var(--accent) 16%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent), 0 0 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
  .nav-small .sidenav a:not(.on):hover { background: var(--surface-hi); }
  .nav-small .sn-text { display: none; }
  .nav-small .sidenav-label { height: 1px; padding: 0; margin: 0 8px 10px; background: var(--line); overflow: hidden; color: transparent; }
  .nav-small .sidenav-group { margin-bottom: 12px; }
  .nav-small .sidenav-toggle .i { transform: rotate(180deg); }
  .nav-small .sidenav .nav-count { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: .6rem; box-shadow: 0 0 0 2px var(--bg); }
  .tabbar { display: none; }
}

/* ---------- Bausteine ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
/* Seitentitel sind ausgeblendet (Navigation zeigt, wo man ist): Rest rechts, leere Kopfzeile ohne Abstand */
.page-head:has(> h1.sr), .page-head:has(> div > h1.sr) { justify-content: flex-end; }
.page-head:has(h1.sr):not(:has(.btn, form, .iconbtn, p, .wknav, .wk-title)) { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; color: var(--muted); font-size: .9rem; }
.back .i { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.narrow { max-width: 560px; }
.row { display: flex; align-items: center; gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } }

label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 550; color: var(--text-2); }
label.row { flex-direction: row; align-items: center; justify-content: space-between; }
label.check { flex-direction: row; align-items: center; gap: 10px; min-height: 36px; font-weight: 450; color: var(--text); }
input, select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-hi); background: var(--bg-2); color: var(--text);
  font: 16px/1.3 "Inter Tight", sans-serif;          /* 16 px: iOS zoomt sonst beim Antippen */
  transition: border-color .15s, box-shadow .15s;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Einheitliche Bedienelemente (Wunsch Flo 27.11.): eigene Häkchen, Auswahllisten mit Pfeil, Farben als Punkt */
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0;
  border: 1.5px solid var(--line-hi); border-radius: 6px; background: var(--bg-2) center / 14px no-repeat; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--accent); }
input[type=checkbox]:checked { background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--bg-2); background: var(--accent); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
/* Versteckte Auswahl-Inputs (Chips, Segmente, Symbole) bleiben unsichtbar, auch wenn gesperrt */
:is(.urg-opt, .kind-opt, .fpick, .fswitch, .be-seg, .pill, .gw-icons) input:disabled { opacity: 0; }
/* Schalter: <input type="checkbox" class="sw"> */
input[type=checkbox].sw { width: 40px; height: 24px; border-radius: 999px; background: var(--line-hi); border: 0; position: relative; }
input[type=checkbox].sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s var(--ease); }
input[type=checkbox].sw:checked { background: var(--accent); background-image: none; }
input[type=checkbox].sw:checked::after { transform: translateX(16px); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868b97' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
select:hover, input:not([type=checkbox]):not([type=radio]):not([type=color]):hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-hi)); }
input[type=color] { appearance: none; -webkit-appearance: none; flex: none; width: 30px; height: 30px; min-height: 0; padding: 0;
  border: 0; border-radius: 50%; background: none; cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line-hi); }
input[type=color]:hover { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--surface-hi);
  color: var(--text); font: 600 .88rem "Inter Tight", sans-serif; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--accent-soft); color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-hi); background: var(--surface-hi); color: var(--text);
  font: 600 .95rem "Inter Tight", sans-serif; cursor: pointer; white-space: nowrap;
  transition: transform .12s var(--ease), filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.danger { background: none; border-color: color-mix(in srgb, var(--err) 50%, transparent); color: var(--err); }
.btn.wide { width: 100%; }
.danger-zone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }

.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; white-space: nowrap;
  background: var(--accent-soft); color: var(--text); font: 500 .72rem "JetBrains Mono", monospace;
}
.chip.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); }

.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 520; animation: enter .3s var(--ease); }
.flash-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-err { background: color-mix(in srgb, var(--err) 14%, transparent); border: 1px solid color-mix(in srgb, var(--err) 40%, transparent); }

.tiles { display: grid; gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; } }
.tile {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-hi); box-shadow: var(--shadow); }
.tile:active { transform: scale(.985); }
.tile-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.tile-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tile .chip { margin-left: auto; }

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; transition: background .15s; }
.list a:hover { background: var(--surface-hi); }
.list .off { opacity: .55; }
.list-main { display: grid; flex: 1; min-width: 0; }
.list-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad { padding: 16px; }

.searchbar { position: relative; margin-bottom: 14px; }
.searchbar .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar input { padding-left: 40px; border-radius: 999px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.empty { display: grid; justify-items: start; gap: 10px; max-width: 560px; }
.empty p { margin: 0; color: var(--text-2); }

.perm-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .perm-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
legend { padding: 0 6px; font-weight: 650; }
details.card summary { cursor: pointer; min-height: 28px; }
details .perm-grid { margin-top: 14px; }
.perm-x { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.perm-x span { flex: 1; font-size: .9rem; }
.pill { flex-direction: row; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-hi); font-weight: 650; cursor: pointer; }
.pill input { width: 16px; height: 16px; }

.trade-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px 12px; }
.trade-row.off { opacity: .6; }
.trade-row select, .trade-row .btn { grid-column: span 1; }
@media (min-width: 640px) { .trade-row { grid-template-columns: auto 1fr 120px auto; align-items: center; } }

.logo-edit { display: flex; align-items: center; gap: 14px; }
.logo-edit label { flex: 1; }
.logo-preview { display: grid; place-items: center; width: 80px; height: 80px; flex: none; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.logo-preview img { max-width: 64px; max-height: 64px; object-fit: contain; }

/* ---------- Anmeldung ---------- */
.login-page .main { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; max-width: none; }
.login { width: 100%; max-width: 380px; display: grid; gap: 22px; }
.login-brand { display: grid; justify-items: center; gap: 8px; text-align: center; }
.login-brand img { max-height: 64px; max-width: 200px; object-fit: contain; }
.login-brand p { margin: 0; }

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

/* Teqlo-Zeichen: zwei gespiegelte Hälften, die zusammen ein T bilden */
.brand-mark .tq { width: 72%; height: 72%; fill: currentColor; }

/* =====================================================================
   Phase 1: Tickets, Kunden, Suche
   ===================================================================== */
.mono { font-family: "JetBrains Mono", monospace; font-size: .8em; }
.mt8 { margin-top: 8px; } .mt24 { margin-top: 28px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) { .hide-s { display: none; } }
@media (max-width: 380px) { .brand-name { display: none; } }
code { font-family: "JetBrains Mono", monospace; font-size: .85em; padding: 1px 5px; border-radius: 6px; background: var(--surface-hi); }
textarea { resize: vertical; min-height: 88px; }
.btn.sm { min-height: 36px; padding: 0 10px; font-size: .85rem; }
.btn.sm .i { width: 16px; height: 16px; }
.linkbtn { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; padding: 0 4px; }
.linkbtn:hover { color: var(--err); }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); }
.iconbtn:hover { background: var(--surface); color: var(--text); }
button.iconbtn { border: 0; background: none; cursor: pointer; font: inherit; }
.avatar.xs { width: 26px; height: 26px; font-size: .62rem; flex: none; }
.faces { display: inline-flex; margin-left: auto; }
.faces .avatar + .avatar { margin-left: -7px; }
.faces .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar.more { background: var(--bg-2); color: var(--muted); }

/* Status, Dringlichkeit, Gewerk, Fälligkeit */
.st, .trade {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; white-space: nowrap;
  font-size: .75rem; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent);
}
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.trade { background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); color: var(--text-2); }
.urg { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 600 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .04em; }
.urg-0 { color: var(--muted); background: var(--surface-hi); }
.urg-1 { color: var(--text-2); background: var(--surface-hi); }
.urg-2 { color: #1a1300; background: var(--warn); }
.urg-3 { color: #fff; background: var(--err); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 25%, transparent); } }
.due { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.due.late { color: var(--err); font-weight: 600; }

/* Werkzeugleiste der Ticket-Übersicht */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar .searchbar { margin: 0; flex: 1 1 260px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 550 .85rem "Inter Tight", sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.select-inline select { min-height: 42px; width: auto; padding: 8px 10px; }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-hi); color: var(--text-2); font-size: .85rem; font-weight: 550; transition: background .15s, color .15s;
}
.fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fchip b { color: var(--muted); font-weight: 600; font-size: .78rem; }
.fchip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.fchip.on b { color: inherit; opacity: .7; }

/* Ticket-Kachel */
.tgrid { display: grid; gap: 10px; }
@media (min-width: 640px) { .tgrid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; } }
.tcard {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  animation: enter .35s var(--ease) both;
}
.tgrid .tcard:nth-child(n+2) { animation-delay: 20ms; } .tgrid .tcard:nth-child(n+4) { animation-delay: 40ms; } .tgrid .tcard:nth-child(n+8) { animation-delay: 60ms; }
.tcard:hover { transform: translateY(-2px); border-color: var(--line-hi); box-shadow: var(--shadow); }
.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard-title { font-size: 1rem; line-height: 1.3; }
.tcard-where { color: var(--text-2); font-weight: 500; font-size: .85rem; }
.tcard-sub { color: var(--text-2); font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-cust { color: var(--text-2); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Ticket-Liste */
.tlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tlist-head { display: none; }
.tlist-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; align-items: center; transition: background .15s; }
.tlist-row + .tlist-row { border-top: 1px solid var(--line); }
.tlist-row:hover { background: var(--surface-hi); }
.tlist-row > span:first-child { grid-column: 1; }
.tl-main { display: grid; grid-column: 1 / -1; min-width: 0; order: -1; }
.tl-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlist-row > span:empty { display: none; }
@media (max-width: 899px) { .tlist-row { display: flex; flex-wrap: wrap; } .tl-main { width: 100%; } }
@media (min-width: 900px) {
  .tlist-head, .tlist-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px 100px 120px 110px 90px; gap: 12px; }
  .tlist-head { padding: 10px 14px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
  .tl-main { order: 0; grid-column: auto; }
  .tlist-row > span:empty { display: block; }
  .tlist-row .faces { margin-left: 0; }
}

/* Board: Spalten pro Status, Karten ziehen */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 16px; align-items: flex-start; }
.col { flex: 0 0 min(84vw, 300px); scroll-snap-align: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100dvh - 230px); }
.col header { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; font-weight: 650; }
.col header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.col header b { margin-left: auto; color: var(--muted); font-size: .8rem; }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; min-height: 80px; overflow-y: auto; border-radius: 12px; transition: background .2s; }
.col-body.over { background: color-mix(in srgb, var(--c) 10%, transparent); }
.board .tcard { animation: none; cursor: grab; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.board .tcard.lifting { opacity: .35; transform: scale(.98); }
.board .tcard, .board .tcard img { -webkit-user-drag: none; }
/* Geist: folgt dem Zeiger per transform (board.js), Schatten wächst mit --lift */
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; margin: 0; cursor: grabbing; will-change: transform;
  transition: none; animation: none;   /* .tcard hat transition: transform – sonst gleitet der Geist von links oben herein */
  box-shadow: 0 calc(6px + 22px * var(--lift, 0)) calc(14px + 40px * var(--lift, 0)) rgba(0, 0, 0, calc(.2 + .3 * var(--lift, 0))),
              0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) calc(70% * var(--lift, 0)), transparent);
}
.drag-ghost.landing { box-shadow: 0 6px 14px rgba(0, 0, 0, .2); transition: box-shadow .26s; }
html.grabbing, html.grabbing * { cursor: grabbing !important; }
.drop-gap { flex: none; border-radius: 12px; border: 2px dashed color-mix(in srgb, var(--c) 60%, transparent);
            background: color-mix(in srgb, var(--c) 8%, transparent); }
/* Während des Ziehens: Zielspalte leuchtet (Rahmen + Tönung), Punkt pulsiert; die anderen treten leicht zurück */
.board .col { transition: border-color .2s, background .2s, opacity .2s, transform .2s var(--ease); }
.board.dragging .col:not(.drop-target) { opacity: .78; }
.board .col.drop-target { border-color: color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 7%, var(--bg-2)); transform: translateY(-2px); }
.board .col.drop-target header i { animation: dotpulse 1.1s ease-in-out infinite; }
@keyframes dotpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); }
                      50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 0%, transparent); } }
.tcard.settle { animation: settle .6s var(--ease); }
@keyframes settle { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 80%, transparent); }
                    100% { box-shadow: 0 0 0 12px transparent; } }
.tcard.just-done .tcard-done { animation: donepop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes donepop { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.25); opacity: 1; } 100% { transform: none; } }
@media (min-width: 900px) { .board { margin: 0; padding: 4px 0 16px; } .col { flex: 1 0 280px; max-width: 420px; } }   /* Spalten füllen die Breite */

/* Ticket-Detail */
.status-bar { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.status-bar form { margin: 0; flex: none; }
.sb { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--surface); color: var(--text-2); font: 600 .85rem "Inter Tight", sans-serif; cursor: pointer; transition: background .2s, color .2s, transform .12s; }
.sb:active { transform: scale(.96); }
.sb.on { background: var(--c); border-color: transparent; color: #fff; }
.anchors { position: sticky; top: var(--top-h); z-index: 10; display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px 12px; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); scrollbar-width: none; }
.anchors a { flex: none; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-size: .85rem; font-weight: 550; }
.anchors a:hover { background: var(--surface); }
.anchors b { color: var(--muted); font-weight: 600; }
.detail { display: grid; gap: 14px; }
@media (min-width: 1000px) {
  .detail { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .detail-side { position: sticky; top: calc(var(--top-h) + 56px); }
  .anchors { margin-inline: 0; padding-inline: 0; }
}
[id] { scroll-margin-top: calc(var(--top-h) + 56px); }
.prose { line-height: 1.6; overflow-wrap: anywhere; }
.prose a, .comment-body a { color: var(--accent); }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--bg-2); overflow-wrap: anywhere; }
.comment.mine .comment-body { background: var(--accent-soft); }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.comment-meta form { margin-left: auto; }
.mention { color: var(--accent); font-weight: 600; }
.comment-new { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.comment-new .mention-wrap { width: 100%; }
.mention-wrap, .searchbar, .picker { position: relative; }
.suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; padding: 4px;
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: var(--shadow); animation: pop .15s var(--ease);
}
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button.on { background: var(--surface-hi); }
.suggest .list-main span { font-size: .8rem; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.thumbs a { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.thumbs a:hover img { transform: scale(1.05); }
.thumbs .thumb { position: relative; aspect-ratio: 1; }
.thumbs .thumb > a { display: block; height: 100%; }
.thumbs .thumb form { position: absolute; top: 5px; right: 5px; margin: 0; }
.thumb-del { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.thumb-del .i { width: 16px; height: 16px; }
.thumb:hover .thumb-del, .thumb-del:focus-visible { opacity: 1; }
.thumb-del:hover { background: var(--err); }
@media (hover: none) { .thumb-del { opacity: 1; } }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.files li a { color: var(--accent); font-weight: 550; overflow-wrap: anywhere; }
.files form { margin-left: auto; }
.upload { display: flex; flex-wrap: wrap; gap: 8px; }
.upload.busy { opacity: .6; pointer-events: none; }
/* Ablagefläche für Dateien (Ticket): gestrichelt, beim Drüberziehen getönt */
.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border: 1.5px dashed var(--line-hi);
  border-radius: 14px; background: color-mix(in srgb, var(--accent) 3%, transparent); transition: background .18s, border-color .18s, transform .18s; }
.drop-i { width: 30px; height: 30px; flex: none; color: var(--accent); padding: 8px; box-sizing: content-box; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.drop-t { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; }
.drop-b { display: flex; flex-wrap: wrap; gap: 8px; }
.drop-b .btn { min-height: 44px; }
.drop-busy { display: none; color: var(--muted); font-size: .9rem; }
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: scale(1.01); }
.drop.busy { pointer-events: none; }
.drop.busy .drop-b { display: none; }
.drop.busy .drop-busy { display: inline; }
.drop.busy .drop-i { animation: dotpulse 1s ease-in-out infinite; }
@media (max-width: 560px) { .drop-b, .drop-b .btn { width: 100%; } .drop-b .btn { justify-content: center; } }
/* Verlauf: nur ein paar Einträge, Rest scrollt */
.tl-scroll { max-height: 290px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 2px 8px; margin-left: -8px; scrollbar-width: thin; }
.tl-scroll.long { mask-image: linear-gradient(#000 82%, transparent); }
.tl-scroll.long:hover, .tl-scroll.long:focus-within { mask-image: none; }
.actions-col { display: grid; gap: 2px; }
.act { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; margin: 0 -8px; border-radius: 10px; overflow-wrap: anywhere; }
a.act:hover { background: var(--surface-hi); }
a.act .i { color: var(--accent); }
.cust-link { display: grid; }
.person-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.person-row .list-main + .btn { margin-left: auto; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.timeline li { display: grid; position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -19px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-hi); }
.timeline li:first-child::before { background: var(--accent); }

/* Formulare Ticket/Kunde */
.form-wide { max-width: 760px; }
.urg-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border: 0; padding: 0; }
.urg-pick legend { padding: 0 0 6px; font-size: .88rem; font-weight: 550; color: var(--text-2); }
.urg-opt { position: relative; }
.urg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.urg-opt span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-hi); font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, transform .12s; }
.urg-opt input:checked + span { background: var(--surface-hi); color: var(--text); border-color: var(--text-2); }
.urg-opt.urg-2 input:checked + span { background: var(--warn); color: #1a1300; border-color: transparent; }
.urg-opt.urg-3 input:checked + span { background: var(--err); color: #fff; border-color: transparent; }
.urg-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.urg-opt, .urg-opt.urg-0, .urg-opt.urg-1, .urg-opt.urg-2, .urg-opt.urg-3 { background: none; animation: none; padding: 0; height: auto; text-transform: none; letter-spacing: 0; font: inherit; }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.people-pick { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
@media (min-width: 640px) { .people-pick { grid-template-columns: 1fr 1fr; } }
.person { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 10px; color: var(--text); font-weight: 500; cursor: pointer; }
.person:has(input:checked) { background: var(--accent-soft); }
.subrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.subrow input[name$="_name"] { grid-column: 1 / -2; }
@media (min-width: 760px) { .subrow { grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto; } .subrow input[name$="_name"] { grid-column: auto; } }
.row2.zip { grid-template-columns: 110px 1fr; }
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 5; }
.sticky-actions .btn { box-shadow: var(--shadow); }
@media (min-width: 900px) { .sticky-actions { bottom: 16px; } }

/* Kunde */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 18px; }
.qa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; transition: transform .12s, background .15s; }
.qa:active { transform: scale(.97); }
.qa.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* Übersicht */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: grid; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease); }
.stat:hover { transform: translateY(-2px); }
.stat b { font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.alarm { border-color: color-mix(in srgb, var(--err) 50%, transparent); background: color-mix(in srgb, var(--err) 10%, var(--surface)); }
.stat.alarm b { color: var(--err); }

/* Suche */
.searchbar.big input { min-height: 52px; font-size: 18px; }
.sres { margin-top: 18px; }
.sres h2 { margin-bottom: 8px; }
.sres .list a { gap: 10px; }

/* Einstellungen › Tickets */
.status-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px 12px; align-items: center; }
.status-row.off { opacity: .55; }
.status-row .num { width: 80px; }
@media (min-width: 1000px) { .status-row { grid-template-columns: auto minmax(160px, 1fr) 150px 80px 90px auto auto auto; } }
.board .tcard .st, .drag-ghost .st { display: none; }

/* Auszug der Beschreibung auf Ticketkarten: höchstens 2 Zeilen */
.tcard-desc {
  color: var(--muted); font-size: .84rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.select-inline select { min-width: 150px; }
.select-inline select:disabled { opacity: .6; cursor: default; }
.col-body > .tcard { flex: none; }    /* sonst quetscht die Spalte Karten zusammen, statt zu scrollen */

/* Karte beim Kunden: Google Maps eingebettet, im dunklen Design umgefärbt, Route-Knopf schwebt darüber */
.gmap { position: relative; height: 220px; border-radius: 14px; overflow: hidden; background: var(--bg-2); isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line); }
.gmap iframe { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); border: 0; }
.gmap iframe { filter: invert(.92) hue-rotate(180deg) saturate(.75) brightness(.95) contrast(.92); }
html[data-theme="light"] .gmap iframe { filter: none; }
.gmap::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.gmap-route { position: absolute; right: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: .85rem; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), filter .15s; }
.gmap-route .i { width: 15px; height: 15px; }
.gmap-route:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* ---------- Stunden ---------- */
.subtabs { display: flex; gap: 4px; margin: -6px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs a { flex: none; padding: 10px 12px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .2s; }
.subtabs a.on { color: var(--text); border-color: var(--accent); }
.flip .i { transform: scaleX(-1); }
.neg { color: var(--err); }
.pos { color: var(--ok); }
.tc-nav { display: flex; align-items: center; gap: 4px; }
.tc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; }
/* Wochen-/Monatswechsel: eine ruhige Pille statt einzelner Knöpfe */
.wknav { display: inline-flex; align-items: center; height: 42px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wk-step, .wk-today {
  display: inline-grid; place-items: center; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--text-2);
  font: 600 .88rem "Inter Tight", sans-serif; cursor: pointer; transition: background .15s, color .15s, transform .1s;
}
.wk-step { width: 38px; }
.wk-step .i { width: 18px; height: 18px; stroke-width: 2.2; }
.wk-today { padding: 0 12px; color: var(--accent); }
.wk-today.here { color: var(--muted); }
.wk-step:hover, .wk-today:hover { background: var(--surface-hi); color: var(--text); }
.wk-step:active, .wk-today:active { transform: scale(.94); }
.wk-step:focus-visible, .wk-today:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wk-title { display: grid; line-height: 1.2; }
.wk-title b { font-size: 1.05rem; letter-spacing: -.01em; }
.wk-title span { color: var(--muted); font-size: .85rem; }
.tc-total { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: .9rem; }
.tc-total b { color: var(--text); }
.tc-daytabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.tc-daytabs button {
  display: grid; justify-items: center; gap: 0; min-height: 56px; padding: 4px 0; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font: 500 .72rem "Inter Tight", sans-serif; cursor: pointer; transition: background .15s, color .15s;
}
.tc-daytabs button b { font-size: 1.05rem; color: var(--text); }
.tc-daytabs button i { font-style: normal; font-size: .68rem; color: var(--muted); min-height: 1em; font-variant-numeric: tabular-nums; }
.tc-daytabs button.today b { color: var(--accent); }
.tc-daytabs button.on { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.tc-daytabs button.on b, .tc-daytabs button.on i { color: var(--on-accent); }
.tc-warn { display: grid; gap: 6px; margin-bottom: 10px; }
.tc-warn:empty { display: none; }
.tc-w { padding: 8px 12px; border-radius: 10px; font-size: .85rem; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.tc-w.err { background: color-mix(in srgb, var(--err) 14%, transparent); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.tc-grid {
  --head: 62px; display: grid; position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
.tc-times { position: relative; border-right: 1px solid var(--line); }
.tc-corner { height: var(--head); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.tc-corner .linkbtn { font-size: .68rem; line-height: 1.1; text-align: center; color: var(--accent); min-height: 40px; }
.tc-tbody { position: relative; }
.tc-tbody span { position: absolute; right: 6px; transform: translateY(-50%); font: 500 .68rem "JetBrains Mono", monospace; color: var(--muted); }
.tc-tbody span:first-child { transform: none; }
.tc-col { position: relative; min-width: 0; border-right: 1px solid var(--line); }
.tc-col:last-child { border-right: 0; }
.tc-col.off .tc-body { background-color: var(--bg-2); }
.tc-colhead { height: var(--head); padding: 6px 6px 4px; border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 3px; overflow: hidden; }
.tc-colhead > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.tc-colhead b { font-size: .85rem; }
.tc-colhead span { font: 500 .68rem "JetBrains Mono", monospace; color: var(--muted); }
.tc-col.today .tc-colhead b { color: var(--accent); }
.tc-allday { display: flex; flex-wrap: wrap; gap: 3px; overflow: hidden; max-height: 22px; }
.tc-ab { display: inline-block; max-width: 100%; padding: 1px 6px; border-radius: 6px; font-size: .68rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); }
.tc-ab.beantragt { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, transparent) 0 6px, transparent 6px 10px); }
.tc-body {
  position: relative; touch-action: pan-y; cursor: crosshair;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.tc-grid.ro .tc-body { cursor: default; }
.tc-pause { position: absolute; left: 0; right: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 18%, transparent) 0 5px, transparent 5px 10px); }
.tc-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); pointer-events: none; z-index: 3; }
.tc-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.tc-ev {
  position: absolute; left: 3px; right: 3px; z-index: 2; display: flex; flex-direction: column; gap: 0; padding: 3px 6px 5px; overflow: hidden;
  border-radius: 8px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  font-size: .74rem; line-height: 1.25; cursor: grab; touch-action: manipulation;
  transition: box-shadow .15s, transform .15s var(--ease);
}
.tc-ev.fresh { animation: tcsettle .6s ease-out; }
@keyframes tcsettle { from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); } }   /* sanft, ohne Skalieren */
.tc-ev b { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; line-height: 15px; min-width: 0; }
.tc-ev .tc-time { flex: none; font: 500 .66rem/15px "JetBrains Mono", monospace; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.tc-ev .tc-t { flex: none; line-height: 15px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-ev.tiny { flex-direction: row; align-items: center; gap: 6px; padding-block: 0; }
.tc-ev.tiny b { flex: 0 1 auto; }
.tc-ev.tiny .tc-time { flex: 0 1000 auto; min-width: 0; text-overflow: clip; }
.tc-ev.tiny .tc-t, .tc-ev.tiny .tc-note { display: none; }
.tc-note {
  flex: none; color: var(--text); opacity: .85; font-size: .72rem; line-height: 15px; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: var(--lines, 3); line-clamp: var(--lines, 3); -webkit-box-orient: vertical; overflow: hidden;
}
.tc-ev.regie { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tc-ev:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.tc-ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tc-ev.dragging { z-index: 5; cursor: grabbing; transform: scale(1.02); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); transition: none; }
.tc-sel { background: var(--accent-soft); border: 2px dashed var(--accent); pointer-events: none; transition: none; animation: none; }
.tc-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; cursor: ns-resize; touch-action: none; }
.tc-grip::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: color-mix(in srgb, var(--text) 35%, transparent); }
.tc-grid.busy .tc-ev:not(.dragging) { pointer-events: none; }
.tc-help { margin: 10px 2px 0; }
@media (max-width: 699px) {
  .tc-col:not(.sel) { display: none; }
  .tc-col.sel { border-right: 0; }
  .tc-grip { height: 18px; }
  .tc-ev { font-size: .8rem; }
}
@media (min-width: 700px) { .tc-daytabs { display: none; } }

/* Blatt (Dialog) zum Eintragen – am Handy von unten */
dialog.sheet {
  width: min(560px, 100vw); max-height: 92dvh; margin: auto; padding: 16px; border: 1px solid var(--line-hi); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow-y: auto;
}
dialog.sheet[open] { animation: pop .2s var(--ease); }
dialog.sheet form { display: flex; flex-direction: column; gap: 14px; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) {
  dialog.sheet.big { width: min(900px, calc(100vw - 48px)); }
  .sheet.big .sheet-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .sheet.big .sheet-side { position: sticky; top: 0; padding: 14px; border-radius: 14px; background: var(--bg-2); }
  .sheet.big .row3 { grid-template-columns: 1fr 1fr; }
  .sheet.big .row3 > label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 699px) { dialog.sheet.big { min-height: 88dvh; } }
.sheet-head h2 { flex: 1; }
.sheet-head [data-back] { margin-left: -8px; }
.field-label { font-size: .88rem; font-weight: 550; color: var(--text-2); }
.tk-list { display: grid; gap: 2px; max-height: min(320px, 42dvh); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.tk-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .12s;
}
.tk-item:hover, .tk-item.on { background: var(--surface-hi); }
.tk-item .list-main { flex: 1; min-width: 0; display: grid; }
.tk-item .list-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item .list-main span { color: var(--muted); font-size: .8rem; }
.tk-num { flex: none; font: 600 .72rem "JetBrains Mono", monospace; color: var(--text-2); padding: 3px 7px; border-radius: 6px; background: var(--bg-2); }
.tk-st { display: inline-block; width: 7px; height: 7px; margin: 0 4px 1px 0; border-radius: 50%; background: var(--c); }
.tk-hint { margin: 2px 10px 4px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.tk-empty { margin: 6px 10px; }
.tk-more { position: sticky; bottom: 0; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.tk-new {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px dashed var(--line-hi);
  background: none; color: var(--text); font: 600 .9rem "Inter Tight", sans-serif; cursor: pointer; transition: background .15s, border-color .15s;
}
.tk-new:hover, .tk-new.on { background: var(--accent-soft); border-color: var(--accent); }
.tk-new.solo { background: var(--accent); border: 0; color: var(--on-accent); }
.tk-nocket { min-height: 44px; font-size: .85rem; }
.tk-nocket:hover { color: var(--text); }
.tk-picked { display: flex; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.tk-picked .list-main { flex: 1; min-width: 0; display: grid; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); }
@media (max-width: 699px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; padding-bottom: calc(16px + var(--safe-b)); }
  dialog.sheet[open] { animation: sheet-up .28s var(--ease); }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head .iconbtn { border: 0; background: none; font-size: 1.1rem; cursor: pointer; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; }
.sheet-actions .btn.primary { min-width: 140px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-wrap:empty { display: none; }
.chips-wrap .fchip { background: none; cursor: pointer; font-family: inherit; }
.row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 > label:first-child { grid-column: 1 / -1; }
.row3 input { min-width: 0; }
@media (min-width: 560px) { .row3 { grid-template-columns: 1.4fr 1fr 1fr; } .row3 > label:first-child { grid-column: auto; } }
.pause-row.row3 > label:first-child { grid-column: auto; }
.pause-row.row3 { grid-template-columns: 1fr 1fr 1fr; }
.toast {
  position: fixed; z-index: 120; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translateX(-50%);
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); animation: enter .2s var(--ease);
}
.toast.bad { background: var(--err); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Monat */
.mtable .mt-row, .mtable .md-row { display: grid; gap: 2px 10px; padding: 10px 14px; align-items: center; transition: background .15s; }
.mtable > a + a, .mtable > .mt-head + a { border-top: 1px solid var(--line); }
.mtable a:hover { background: var(--surface-hi); }
.mt-head { display: none !important; }
.mt-row { grid-template-columns: repeat(3, 1fr); }
.mt-row .mt-name { grid-column: 1 / -1; }
.mt-row [data-l]::before, .md-row [data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: .75rem; }
.md-row { grid-template-columns: repeat(3, 1fr); font-variant-numeric: tabular-nums; }
.md-row .md-day, .md-row > span:nth-child(2), .md-row .md-cust { grid-column: 1 / -1; }
.md-row > span:empty { display: none; }
.md-day { display: flex; align-items: center; gap: 8px; }
.md-cust { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .88rem; }
.md-row.we { background: var(--bg-2); }
.md-row.off { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.md-row.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); }
@media (min-width: 900px) {
  .mt-head { display: grid !important; padding: 10px 14px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
  .mt-row { grid-template-columns: minmax(0, 1.6fr) repeat(7, minmax(0, 1fr)); }
  .mt-row .mt-name { grid-column: auto; }
  .md-row { grid-template-columns: 130px 170px minmax(0, 1fr) 64px 64px 70px; }
  .md-row .md-day, .md-row > span:nth-child(2), .md-row .md-cust { grid-column: auto; }
  .md-row > span:empty { display: block; }
  .mt-row [data-l]::before, .md-row [data-l]::before { content: none; }
  .mt-row > span:not(.mt-name), .md-row > span[data-l] { text-align: right; }
}

/* Abwesenheiten */
.abs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; }
.abs-row + .abs-row { border-top: 1px solid var(--line); }
.abs-row .list-main { flex: 1; min-width: 180px; display: grid; }
.abs-row.gone { opacity: .55; }
.abs-row.gone b { text-decoration: line-through; }
.abs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.abs-st { font: 600 .7rem "JetBrains Mono", monospace; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-hi); color: var(--text-2); }
.abs-st.st-genehmigt { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--text); }
.abs-st.st-beantragt { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--text); }
.abs-decide { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.abs-decide input { flex: 1 1 180px; min-height: 36px; padding: 6px 10px; }
.kind-pick { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; }
.kind-pick legend { padding: 0 0 6px; font-size: .88rem; font-weight: 550; color: var(--text-2); }
.kind-opt { position: relative; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-hi); color: var(--text-2); font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.kind-opt span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.kind-opt input:checked + span { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); color: var(--text); }
.kind-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.vac { display: grid; gap: 10px; }
.vac-big { display: flex; align-items: baseline; gap: 8px; }
.vac-big b { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.vac-big span { color: var(--muted); }
.vac-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.vac-bar i { background: var(--ok); transition: width .5s var(--ease); }
.vac-bar i.pend { background: repeating-linear-gradient(135deg, var(--warn) 0 4px, transparent 4px 7px); }
.week-in { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-in input { padding-inline: 6px; text-align: center; }
.narrow { max-width: 320px; }

/* Zeiten im Ticket */
.times { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.times li { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.times li .list-main { flex: 1; min-width: 0; display: grid; }
.times li b.h { font-variant-numeric: tabular-nums; }
.times-sum { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 650; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tc-ev.tiny .tc-grip::after { display: none; }

/* Tätigkeiten im Ticket: wann, was, wie lange */
h3.sub { margin: 6px 0 0; font: 500 .72rem "JetBrains Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.works { list-style: none; margin: 0; padding: 0; display: grid; }
.work { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; }
/* Tagesverlauf im Ticket (0.20.6): je Tag eine Zeitleiste über den Arbeitstag, eine Spur je Mitarbeiter.
   Achse = Firmen-Arbeitszeit, erweitert wenn Einträge darüber hinausgehen; alle Tage teilen dieselbe Achse. */
.dtl-top { margin-top: 6px; align-items: center; }
.dtl-top h3.sub { margin: 0; }
.dtl-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.dtl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 12px 3px 4px; border-radius: 99px;
  border: 1px solid var(--line); background: transparent; color: var(--text-2); font: inherit; font-size: .84rem; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.dtl-chip:first-child { padding-left: 12px; }
.dtl-chip em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.dtl-chip:hover { border-color: var(--line-hi); color: var(--text); }
.dtl-chip.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
.dtl-days { display: grid; gap: 10px; }
.dtl-day { padding: 12px 14px 12px; border-radius: 12px; background: var(--surface-hi); border: 1px solid var(--line); }
.dtl-day.enter { animation: dtlin .25s ease both; }
@keyframes dtlin { from { opacity: 0; transform: translateY(4px); } }
.dtl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: .92rem; }
.dtl-sum { margin-left: auto; font-variant-numeric: tabular-nums; }
.dtl-scale, .dtl-lane { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; }
.dtl-ticks { position: relative; height: 16px; font: 500 .68rem "JetBrains Mono", monospace; color: var(--muted); }
.dtl-ticks span { position: absolute; bottom: 1px; transform: translateX(-50%); }
.dtl-ticks span:first-child { transform: none; }
.dtl-ticks span:last-child { transform: translateX(-100%); }
.dtl-lane + .dtl-lane { margin-top: 4px; }
.dtl-who { display: flex; justify-content: center; }
.dtl-track { position: relative; display: block; height: 34px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.dtl-track > i { position: absolute; top: 0; bottom: 0; }
.dtl-grid { width: 1px; background: var(--line); }
.dtl-off { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px), var(--bg-2); }
.dtl-pause { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-hi) 3px 4px); }
.dtl-b { position: absolute; top: 4px; bottom: 4px; display: flex; align-items: center; gap: 8px; padding: 0 8px; min-width: 6px;
  border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: .76rem; white-space: nowrap; overflow: hidden;
  box-shadow: 0 2px 10px var(--accent-soft); }
.dtl-b b { font: 600 .72rem "JetBrains Mono", monospace; }
.dtl-b span { overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.dtl-b.regie { background: var(--warn); color: #241a05; box-shadow: none; }
.dtl-notes { list-style: none; margin: 8px 0 0 38px; padding: 0; display: grid; gap: 2px; font-size: .84rem; color: var(--text-2); }
.dtl-notes li { display: flex; gap: 10px; overflow-wrap: anywhere; }
.dtl-nt { font: 500 .72rem "JetBrains Mono", monospace; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.dtl-notes .bare, .dtl-notes.bare { display: none; }
.dtl-more { margin-top: 2px; justify-self: start; }
.dtl-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-left: 4px; background: var(--warn); }
@media (max-width: 720px) {
  .dtl-day { padding: 10px; }
  .dtl-scale, .dtl-lane { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; }
  .dtl-notes { margin-left: 30px; }
  .dtl-b > * { display: none; }
  .dtl-notes.bare { display: grid; }
  .dtl-notes .bare { display: flex; }
  .dtl-filter { flex: 0 0 calc(100% + 20px); min-width: 0; contain: inline-size; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; }
  .dtl-chip { flex: none; }
}
.work + .work, details .works .work:first-child { border-top: 1px solid var(--line); }
.work-when { display: grid; font-size: .88rem; }
.work-when span { font: 500 .74rem "JetBrains Mono", monospace; color: var(--muted); }
.work-what { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.work-h { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Profilbild */
img.avatar { object-fit: cover; padding: 0; background: var(--surface-hi); }
.avatar.xl { width: 88px; height: 88px; font-size: 1.6rem; flex: none; }
.avatar-edit { display: flex; align-items: center; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.avatar-pick { position: relative; display: block; cursor: pointer; border-radius: 50%; }
.avatar-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--surface); transition: transform .15s var(--ease); }
.avatar-pick:hover .avatar-cam { transform: scale(1.08); }
.avatar-cam .i { width: 16px; height: 16px; }

/* =====================================================================
   Chat – Liste + Unterhaltung. Keine farbigen Seitenstreifen: eigene Nachrichten als getönte Blase,
   Zitate und Erwähnungen als Tönung, ungelesen als Zahl.
   ===================================================================== */
.chat-page .main { max-width: none; padding: 0; animation: none; }
.chat {
  display: grid; grid-template-columns: 1fr; height: calc(100dvh - var(--top-h) - var(--tab-h) - var(--safe-b));
  background: var(--bg); animation: enter .3s var(--ease);
}
.ch-in-room .tabbar { display: none; }
.ch-in-room .chat { height: calc(100dvh - var(--top-h)); }
.chat .ch-main { display: none; }
.chat.in-room .ch-side { display: none; }
.chat.in-room .ch-main { display: flex; }
@media (min-width: 900px) {
  .chat-page .main { padding: 20px 24px; }
  .chat, .ch-in-room .chat {
    height: calc(100dvh - var(--top-h) - 40px); grid-template-columns: 330px minmax(0, 1fr);
    border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface);
  }
  .chat .ch-main, .chat.in-room .ch-main { display: flex; }
  .chat.in-room .ch-side { display: flex; }
  .ch-side { border-right: 1px solid var(--line); }
  .ch-back { display: none !important; }
}

.ch-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.ch-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 10px; }
.ch-side-head h1 { font-size: 1.35rem; }
.ch-filter { margin: 0 12px 8px; }
.ch-filter input { min-height: 42px; background: var(--bg-2); border-color: transparent; }
.ch-sharehint { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: .88rem; }
.ch-sharehint > span { flex: 1; }
.iconbtn.sm { width: 32px; height: 32px; }
.iconbtn.sm .i { width: 16px; height: 16px; }
.ch-rooms { flex: 1; overflow-y: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.ch-loading { padding: 12px; }
.ch-sep { margin: 14px 10px 6px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.ch-room {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 8px 10px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .12s;
}
.ch-room:hover { background: var(--surface-hi); }
.ch-room.on { background: var(--accent-soft); }
.ch-room-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ch-room-top, .ch-room-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ch-room-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ch-room-top time { flex: none; color: var(--muted); font-size: .75rem; }
.ch-room-sub > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .85rem; }
.ch-room.new .ch-room-top b { font-weight: 720; }
.ch-room.new .ch-room-sub > span { color: var(--text-2); }
.ch-room.new .ch-room-top time { color: var(--accent); }
.ch-room.person .ch-room-sub > span { font-size: .8rem; }
.ch-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.ch-muted { width: 14px; height: 14px; color: var(--muted); flex: none; }
.ch-face { position: relative; display: inline-flex; flex: none; }
.ch-face .avatar { cursor: inherit; }
.ch-room .avatar.sm { width: 42px; height: 42px; font-size: .8rem; }
.ch-on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); }
.ch-gface { background: var(--surface-hi); color: var(--text-2); }
.ch-gface.all { background: var(--accent-soft); color: var(--accent); }
.ch-gface .i { width: 20px; height: 20px; }

.ch-main { position: relative; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.ch-blank { margin: auto; display: grid; justify-items: center; gap: 4px; padding: 24px; text-align: center; color: var(--text-2); }
.ch-blank > .i { width: 44px; height: 44px; color: var(--muted); margin-bottom: 6px; }
.ch-blank p { margin: 0; max-width: 36ch; }
.ch-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 6px; min-height: 60px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ch-head-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ch-head-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-head .iconbtn.muted { color: var(--warn); }
@media (min-width: 900px) { .ch-head { padding-left: 16px; } }

.ch-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 8px; overscroll-behavior: contain; }
@media (min-width: 900px) { .ch-scroll { padding: 16px 24px 10px; } }
.ch-msgs { display: flex; flex-direction: column; gap: 2px; max-width: 1400px; margin: 0 auto; }
.ch-older { display: block; margin: 0 auto 10px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-hi); border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: .85rem; cursor: pointer; }
.ch-day { display: flex; justify-content: center; margin: 14px 0 8px; position: sticky; top: -4px; z-index: 2; }
.ch-day span { padding: 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface-hi) 92%, transparent); backdrop-filter: blur(6px); color: var(--text-2); font-size: .75rem; font-weight: 600; }
.ch-event { align-self: center; margin: 6px 0; color: var(--muted); font-size: .8rem; text-align: center; }

.ch-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; max-width: 100%; }
.ch-msg.same { margin-top: 2px; }
.ch-msg.in { animation: msgin .28s var(--ease); }
@keyframes msgin { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ch-msg.mine { justify-content: flex-end; }
.ch-msg-face { width: 26px; flex: none; align-self: flex-start; margin-top: 20px; }
.ch-msg.same .ch-msg-face { margin-top: 0; }
.ch-msg-col { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 560px); }
.ch-msg.mine .ch-msg-col { align-items: flex-end; }
.ch-who { margin: 0 0 3px 4px; color: var(--text-2); font-size: .78rem; font-weight: 600; }
.ch-bubble {
  position: relative; max-width: 100%; padding: 8px 12px 6px; border-radius: 18px; background: var(--surface-hi); color: var(--text);
  overflow-wrap: anywhere; box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.ch-msg:not(.mine):not(.same) .ch-bubble { border-top-left-radius: 6px; }
.ch-msg.mine .ch-bubble { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.ch-msg.mine:not(.same) .ch-bubble { border-top-right-radius: 6px; }
.ch-msg.at-me .ch-bubble { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--warn) 70%, transparent); }
.ch-bubble.gone { background: none; box-shadow: inset 0 0 0 1px var(--line-hi); }
.ch-text { margin: 0; white-space: pre-wrap; line-height: 1.42; }
.ch-text.gone { color: var(--muted); font-style: italic; }
.ch-text.big { font-size: 2.2rem; line-height: 1.15; }
.ch-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ch-at { padding: 0 3px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 600; }
.ch-at.me { background: color-mix(in srgb, var(--warn) 30%, transparent); }
.ch-bubble time { float: right; margin: 6px 0 -2px 10px; color: var(--muted); font-size: .68rem; line-height: 1; }
.ch-msg.mine .ch-bubble time { color: color-mix(in srgb, var(--text) 60%, transparent); }
.ch-bubble.media { padding: 4px; }
.ch-bubble.media time { position: absolute; right: 10px; bottom: 9px; margin: 0; padding: 3px 6px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; }
.ch-quote {
  display: grid; width: 100%; margin: 2px 0 6px; padding: 6px 10px; border: 0; border-radius: 10px; text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); font: inherit; font-size: .85rem;
}
.ch-quote b { font-size: .78rem; color: var(--text-2); }
.ch-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ch-imgs { display: grid; gap: 3px; margin: 0 0 4px; border-radius: 14px; overflow: hidden; }
.ch-bubble.media .ch-imgs { margin: 0; }
.ch-imgs.n1 { width: min(320px, 62vw); }
.ch-imgs.n2, .ch-imgs.n3, .ch-imgs.n4 { grid-template-columns: 1fr 1fr; width: min(320px, 66vw); }
.ch-imgs.n3 .ch-img:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1 !important; }
.ch-img { position: relative; display: block; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 1; max-height: 420px; overflow: hidden; }
.ch-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.ch-img:hover img { transform: scale(1.03); }
.ch-img-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.4rem; font-weight: 700; }
.ch-doc { display: flex; align-items: center; gap: 10px; min-width: 200px; margin: 2px 0 6px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.ch-doc .i { width: 26px; height: 26px; flex: none; color: var(--text-2); }
.ch-doc span { display: grid; min-width: 0; }
.ch-doc b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.ch-doc small { color: var(--muted); }
.ch-doc:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.ch-ticket {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: min(340px, 64vw); margin: 2px 0 6px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line-hi); color: var(--text); text-decoration: none;
  transition: border-color .15s, background .15s;
}
.ch-ticket.high { background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.ch-ticket.sos { background: color-mix(in srgb, var(--err) 9%, var(--surface)); }
a.ch-ticket:hover { border-color: var(--accent); }
.ch-tk-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .78rem; }
.ch-tk-top > .i { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ch-tk-top .urg { height: 18px; padding: 0 6px; font-size: .62rem; }
.ch-ticket .ch-go { width: 18px; height: 18px; margin-left: auto; flex: none; color: var(--muted); }
.ch-tk-head { margin-top: 2px; font-size: 1rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-tk-sub { color: var(--text-2); font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-tk-place { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tk-place .i { width: 13px; height: 13px; flex: none; }
.ch-tk-desc { color: var(--muted); font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-tk-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.ch-tk-foot .faces { margin-left: auto; }
.ch-ticket-st { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: .78rem; white-space: nowrap; }
.ch-ticket.gone { color: var(--muted); font-style: italic; }
.ch-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ch-rx:empty { display: none; }
.ch-rx-b {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 8px; border: 1px solid var(--line-hi); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; transition: transform .12s;
}
.ch-rx-b span { font-size: .75rem; color: var(--text-2); font-weight: 600; }
.ch-rx-b.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ch-rx-b:active { transform: scale(.92); }
.ch-read { display: inline-flex; align-items: center; gap: 3px; margin: 3px 4px 0; color: var(--muted); font-size: .72rem; }
.ch-read.seen { color: var(--accent); }
.ch-read .i { width: 13px; height: 13px; }
.ch-msg.flash .ch-bubble { animation: flash 1.2s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 3px var(--accent); } }

/* Werkzeuge an der Nachricht: am Rechner beim Überfahren, am Handy nach Tippen */
.ch-tools {
  position: absolute; top: 0; left: calc(100% + 8px); z-index: 3; white-space: nowrap; display: flex; gap: 2px; padding: 3px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-hi); box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transform: translateY(4px); transition: opacity .12s, transform .12s;
}
/* Neben der Blase andocken (eigene links davon, fremde rechts), nie am Rand der Zeile und nie über dem Text (FALLSTRICKE) */
.ch-msg.mine .ch-tools { left: auto; right: calc(100% + 8px); }
/* Blase + Werkzeuge in .ch-bwrap: Smiley und Leiste fluchten mit der Unterkante der Blase (Wunsch Flo) */
.ch-bwrap { position: relative; max-width: 100%; display: flex; flex-direction: column; }
.ch-msg.mine .ch-bwrap { align-self: flex-end; }
.ch-tools { top: auto; bottom: 0; }
@media (max-width: 699px) {
  .ch-tools { top: auto; bottom: calc(100% + 4px); left: 0; }
  .ch-msg.mine .ch-tools { left: auto; right: 0; }
}
.ch-msg.tools .ch-tools, .ch-tools:focus-within { opacity: 1; pointer-events: auto; transform: none; }
/* Knopf neben der Blase: öffnet die Leiste per Klick (kein Aufklappen beim Überfahren).
   0.38.0 (Flo: „das Emoji-Symbol gefällt mir nicht“): runder Knopf mit Smiley + Plus statt nacktem Strich-Smiley */
.ch-tools-open { position: absolute; bottom: 2px; left: calc(100% + 8px); z-index: 2; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line-hi); border-radius: 50%; background: var(--surface); color: var(--text-2); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); opacity: 0; transform: scale(.8);
  transition: opacity .14s, transform .18s cubic-bezier(.3, 1.5, .5, 1), color .12s, border-color .12s; }
.ch-msg.mine .ch-tools-open { left: auto; right: calc(100% + 8px); }
.ch-msg:hover .ch-tools-open, .ch-tools-open:focus-visible { opacity: 1; transform: none; }
.ch-tools-open:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: scale(1.1); }
.ch-tools-open:hover .i { animation: ch-wink .5s var(--ease); }
@keyframes ch-wink { 40% { transform: rotate(-14deg) scale(1.08); } }
.ch-tools-open .i { width: 18px; height: 18px; }
.ch-msg.tools .ch-tools-open { opacity: 0; pointer-events: none; }
.ch-tools button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-size: 1.05rem; cursor: pointer; }
.ch-tools button:hover { background: var(--surface-hi); color: var(--text); }
.ch-tools .i { width: 18px; height: 18px; }
@media (hover: none) { .ch-tools-open { display: none; } .ch-tools button { width: 40px; height: 40px; } }   /* Handy: Blase antippen */
/* Alle Emojis (0.38.0): Fenster mit Suche, Schnellauswahl, Kategorien (Daten static/emoji.json) */
.emo-pop { position: fixed; z-index: 70; width: 348px; height: min(400px, calc(100dvh - 32px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: 16px; box-shadow: var(--shadow); animation: pop .16s var(--ease); overflow: hidden; }
.emo-head { flex: none; padding: 10px 10px 6px; }
.emo-q { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.emo-q:focus-within { border-color: var(--accent); }
.emo-q .i { width: 15px; height: 15px; flex: none; color: var(--muted); }
.emo-q input { flex: 1; min-width: 0; height: 36px; min-height: 0; border: 0; background: none; outline: none; color: var(--text); font-family: inherit; font-size: 16px; padding: 0; box-shadow: none; }
.emo-quick { flex: none; display: flex; justify-content: space-between; padding: 0 8px 6px; }
.emo-quick button { width: 44px; height: 40px; border: 0; border-radius: 10px; background: none; font-size: 1.4rem; cursor: pointer; transition: transform .12s, background .12s; }
.emo-quick button:hover { background: var(--surface-hi); transform: scale(1.15); }
.emo-tabs { flex: none; display: flex; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.emo-tabs button { flex: 1 0 auto; min-width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 1.02rem; cursor: pointer; filter: grayscale(.6); opacity: .8; }
.emo-tabs button:hover { background: var(--surface-hi); filter: none; opacity: 1; }
.emo-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.emo-grid h4 { margin: 10px 4px 4px; font: 600 10px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.emo-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.emo-set button { height: 40px; border: 0; border-radius: 9px; background: none; font-size: 1.45rem; line-height: 1; cursor: pointer; transition: transform .1s, background .1s; }
.emo-set button:hover { background: var(--surface-hi); transform: scale(1.15); }
.emo-load { padding: 24px; margin: 0; text-align: center; color: var(--muted); font-size: .88rem; }
@media (max-width: 699px) {
  .emo-pop { left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); top: auto; width: auto; height: min(420px, 62dvh); animation: emo-up .22s var(--ease); }
  @keyframes emo-up { from { transform: translateY(30px); opacity: 0; } }
}

.ch-typing { display: flex; align-items: center; gap: 8px; max-width: 1400px; margin: 8px auto 0; color: var(--muted); font-size: .8rem; }
.ch-dots { display: inline-flex; gap: 3px; padding: 8px 10px; border-radius: 14px; background: var(--surface-hi); }
.ch-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1.2s infinite; }
.ch-dots i:nth-child(2) { animation-delay: .15s; } .ch-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.ch-down {
  position: absolute; right: 18px; bottom: 92px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line-hi); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; box-shadow: var(--shadow); cursor: pointer;
}
.ch-down .i { width: 16px; height: 16px; }

.ch-compose { position: relative; padding: 8px 10px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 900px) { .ch-compose { padding: 10px 16px 14px; } }
.ch-row { display: flex; align-items: flex-end; gap: 4px; max-width: 1400px; margin: 0 auto; }
.ch-row textarea {
  flex: 1; min-height: 44px; max-height: 160px; padding: 10px 14px; border-radius: 22px; resize: none; line-height: 1.4;
  background: var(--bg-2); border-color: transparent;
}
.ch-tool, .ch-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; transition: background .15s, transform .12s; }
.ch-tool:hover { background: var(--surface-hi); color: var(--text); }
.ch-send { background: var(--accent); color: var(--on-accent); margin-left: 2px; }
.ch-send:active { transform: scale(.92); }
.ch-send:disabled { opacity: .6; }
.ch-tool .i, .ch-send .i { width: 21px; height: 21px; }
.ch-pending, .ch-replying { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1400px; margin: 0 auto 8px; }
.ch-replying { align-items: center; flex-wrap: nowrap; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--bg-2); font-size: .85rem; }
.ch-replying > .i { width: 16px; height: 16px; color: var(--accent); flex: none; }
.ch-replying > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ch-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 260px; min-height: 44px; padding: 4px 4px 4px 10px; border-radius: 12px; background: var(--bg-2); font-size: .85rem; }
.ch-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-chip > .i { width: 18px; height: 18px; flex: none; color: var(--text-2); }
.ch-chip.tk { background: var(--accent-soft); }
.ch-chip.tk > .i { color: var(--accent); }
.ch-chip button { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; }
.ch-chip button .i { width: 15px; height: 15px; }
.ch-chip.img { width: 72px; height: 72px; padding: 0; overflow: hidden; }
.ch-chip.img img { width: 100%; height: 100%; object-fit: cover; }
.ch-chip.img button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: rgba(0, 0, 0, .6); color: #fff; }
.ch-chip.busy { opacity: .55; }
.ch-chip.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border: 2px solid var(--text); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ch-mention {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% + 4px); z-index: 6; max-width: 360px; padding: 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-hi); box-shadow: var(--shadow);
}
.ch-mention button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ch-mention button.on, .ch-mention button:hover { background: var(--surface-hi); }
.ch-drop {
  position: absolute; inset: 8px; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 16px;
  border: 2px dashed var(--accent); background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--text); font-weight: 600; pointer-events: none;
}
.ch-drop .i { width: 34px; height: 34px; color: var(--accent); }

.ch-pick { display: grid; gap: 2px; max-height: min(340px, 44dvh); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.ch-pick-row { display: flex !important; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.ch-pick-row:hover { background: var(--surface-hi); }
.ch-dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ch-dlg-actions .danger { margin-right: auto; }

dialog.ch-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 8, 12, .97); color: #fff; display: none;
}
dialog.ch-viewer[open] { display: grid; place-items: center; animation: enter .2s var(--ease); }
dialog.ch-viewer::backdrop { background: transparent; }
dialog.ch-viewer img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); border-radius: 10px; object-fit: contain; }
.ch-v-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding: 10px 12px; }
.ch-v-cap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .8); font-size: .9rem; padding-left: 6px; }
.ch-v-bar .iconbtn { color: #fff; }
.ch-v-bar .iconbtn:hover { background: rgba(255, 255, 255, .12); }
.ch-v-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.ch-v-nav.prev { left: 12px; } .ch-v-nav.next { right: 12px; }
.ch-v-nav:hover { background: rgba(255, 255, 255, .22); }

/* Zähler ungelesener Chat-Nachrichten in der Navigation */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; }
.tabbar a { position: relative; }
.tabbar .nav-count { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .65rem; box-shadow: 0 0 0 2px var(--bg); }
@media (prefers-reduced-motion: reduce) { .ch-msg.in, .ch-dots i { animation: none; } }

/* =====================================================================
   Plan – Zeilen = Mitarbeiter, Spalten = Tage. Einträge als getönte Kärtchen in der Farbe des Gewerks
   (ganze Fläche, kein Seitenstreifen). Urlaub/Krank als getönter Block, beantragt schraffiert.
   ===================================================================== */
.plan-page .main { max-width: none; }
.pl-head { flex-wrap: wrap; align-items: center; }
.pl-titles { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pl-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-switch { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 550; cursor: pointer; }
.pl-switch input { width: 18px; height: 18px; margin: 0; }
button.fchip { background: none; font-family: inherit; cursor: pointer; }
button.fchip.on { background: var(--text); color: var(--bg); }

.pl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 14px; }
.pl-tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px 0 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: .85rem;
}
.pl-tag b { font-weight: 650; }
.pl-tag span { color: var(--text-2); }
.pl-tag button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; }
.pl-tag button:hover { background: var(--surface-hi); }
.pl-tag .i { width: 14px; height: 14px; }
.pl-tag.add { padding: 0 14px 0 10px; background: none; border: 1px dashed var(--line-hi); color: var(--text-2); font: 550 .85rem "Inter Tight", sans-serif; cursor: pointer; }
.pl-tag.add:hover { border-color: var(--accent); color: var(--text); }

.pl-wrap { display: grid; gap: 16px; align-items: start; }
.pl-main { min-width: 0; }
.pl-side {
  position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 82dvh; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px calc(14px + var(--safe-b));
  border-radius: 18px 18px 0 0; background: var(--surface); border: 1px solid var(--line-hi); box-shadow: var(--shadow);
  transform: translateY(105%); transition: transform .28s var(--ease);
}
.plan.side-open .pl-side { transform: none; }
.pl-side-head { display: flex; align-items: center; gap: 10px; }
.pl-side-head b { font-size: 1rem; }
.pl-side-head .muted { flex: 1; }
.pl-sh.m { display: none; }
@media (max-width: 899px) { .pl-sh { display: none; } .pl-sh.m { display: inline; } }
.pl-side .searchbar { margin: 0; }
.pl-side .searchbar, .pl-trades { flex: none; }
.pl-trades { margin: 0 -14px; padding: 2px 14px 4px; }
.pl-tlist { display: grid; gap: 8px; overflow-y: auto; min-height: 0; padding: 2px; }
@media (min-width: 900px) {
  .pl-wrap { grid-template-columns: 280px minmax(0, 1fr); }
  .plan:not(:has(.pl-side)) .pl-wrap { grid-template-columns: minmax(0, 1fr); }
  .pl-side {
    position: sticky; top: calc(var(--top-h) + 16px); inset: auto; z-index: 1; max-height: calc(100dvh - var(--top-h) - 40px); transform: none;
    border-radius: var(--radius); border-color: var(--line); box-shadow: none; padding: 14px;
  }
  .pl-side-x, .pl-tk-btn { display: none !important; }
}

/* Kärtchen: Ticket in der Leiste und Einträge im Raster */
.pl-tk, .pl-e {
  display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; font-size: .82rem; line-height: 1.3;
  background: color-mix(in srgb, var(--c, var(--muted)) 15%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 38%, transparent);
  color: var(--text); cursor: grab; transition: transform .15s var(--ease), box-shadow .15s, opacity .15s;
}
.pl-tk:hover, .pl-e:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transform: translateY(-1px); }
.pl-tk:focus-visible, .pl-e:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-tk b { font-weight: 620; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-tk.planned { opacity: .62; }
.pl-tk.dragging, .pl-e.dragging { opacity: .35; }
.pl-e-top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.pl-num { white-space: nowrap; font: 600 .68rem "JetBrains Mono", monospace; color: var(--text-2); }
.pl-urg { padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 30%, transparent); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pl-urg.sos, .pl-e.sos .pl-urg { background: var(--err); color: #fff; }
.pl-planned { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--ok); font-size: .72rem; font-weight: 650; }
.pl-planned .i { width: 13px; height: 13px; }
.pl-time { white-space: nowrap; margin-left: auto; font-size: .7rem; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-e-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pl-e-sub { color: var(--text-2); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-e-note { color: var(--text-2); font-size: .74rem; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-e.note { background: var(--bg-2); border: 1px dashed var(--line-hi); }
.pl-e.note .pl-e-top { order: 2; }
.pl-e.note .pl-time { margin: 0; }
.pl-e.done { opacity: .55; }
.pl-e.done .pl-e-title { text-decoration: line-through; }
.pl-e.pop { animation: plpop .45s var(--ease); }
@keyframes plpop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } }

/* Raster */
.pl-board {
  --person: 168px; display: grid; grid-template-columns: var(--person) repeat(var(--n), minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.pl-corner, .pl-colhead { position: sticky; top: var(--top-h); z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.pl-corner { border-top-left-radius: var(--radius); }
.pl-colhead.last { border-top-right-radius: var(--radius); }
.pl-tk, .pl-e { min-width: 0; }
.pl-colhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 10px 10px 8px; border-left: 1px solid var(--line); font-size: .85rem; cursor: ns-resize; }
.pl-colhead span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-colhead small { width: 100%; color: var(--warn); font-size: .72rem; font-weight: 600; }
.pl-colhead.today { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pl-colhead.today b, .pl-colhead.today span { color: var(--accent); }
.pl-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); min-width: 0; }
.pl-person > span { display: grid; min-width: 0; line-height: 1.25; }
.pl-person b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-person small { color: var(--muted); font-size: .72rem; }
.pl-person.me b { color: var(--accent); }
.pl-cell {
  position: relative; display: flex; flex-direction: column; gap: 5px; min-height: 76px; padding: 6px 6px 30px; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  transition: background .12s;
}
.pl-cell.today { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.pl-cell.we { background: color-mix(in srgb, var(--bg) 45%, transparent); }
.pl-cell.hol, .pl-cell.away { background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--text) 4%, transparent) 7px 14px); }
.pl-cell.pl-drop { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pl-cell.pl-drop.nope { background: color-mix(in srgb, var(--err) 10%, transparent); box-shadow: inset 0 0 0 2px var(--err); cursor: not-allowed; }
.pl-abs {
  padding: 5px 8px; border-radius: 8px; font-size: .76rem; font-weight: 650;
  background: color-mix(in srgb, var(--c) 24%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.pl-abs.pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0 6px, var(--surface) 6px 12px); border-style: dashed; }
.pl-holi { color: var(--muted); font-size: .76rem; padding: 4px 2px; }
.pl-add {
  position: absolute; left: 6px; right: 6px; bottom: 4px; display: grid; place-items: center; height: 24px; border: 0; border-radius: 7px;
  background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s, background .12s;
}
.pl-add .i { width: 16px; height: 16px; }
.pl-cell:hover .pl-add, .pl-add:focus-visible { opacity: 1; }
.pl-add:hover { background: var(--surface-hi); color: var(--text); }
.is-dragging .pl-add { display: none; }
.pl-daytabs { display: none; }
.pl-hint { margin: 10px 2px 0; }

@media (max-width: 899px) {
  .pl-daytabs { display: grid; }
  .pl-board { --person: 118px; grid-template-columns: var(--person) minmax(0, 1fr); }
  .pl-corner, .pl-colhead { display: none; }
  .pl-person { padding: 10px 8px; gap: 8px; align-items: flex-start; }
  .pl-person .avatar { display: none; }
  .pl-cell { display: none; min-height: 64px; padding-bottom: 6px; }
  .pl-add { position: static; opacity: 1; height: 36px; border: 1px dashed var(--line-hi); }
  .pl-board[data-day="0"] .pl-cell[data-di="0"], .pl-board[data-day="1"] .pl-cell[data-di="1"], .pl-board[data-day="2"] .pl-cell[data-di="2"],
  .pl-board[data-day="3"] .pl-cell[data-di="3"], .pl-board[data-day="4"] .pl-cell[data-di="4"], .pl-board[data-day="5"] .pl-cell[data-di="5"],
  .pl-board[data-day="6"] .pl-cell[data-di="6"] { display: flex; }
  .pl-hint { display: none; }
  .pl-tk { cursor: pointer; }
}
.pl-dlg-ticket { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.pl-dlg-ticket .list-main { flex: 1; min-width: 0; display: grid; }
.pl-dlg-ticket .list-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dlg-ticket .list-main span { color: var(--muted); font-size: .8rem; }
.pl-dlg-row { grid-template-columns: 1fr 1fr !important; }
.pl-dlg-row > label:first-child { grid-column: auto !important; }
.pl-tagsuggest { gap: 6px; }

/* Plan: Reihenfolge im Tag, Einfügelinie beim Ziehen, Entfernen per Rechtsklick */
.pl-ord {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--text); color: var(--bg); font: 700 .66rem "Inter Tight", sans-serif;
}
.pl-e.note .pl-e-top { order: 0; }
/* Lücke beim Ziehen: so hoch wie das gezogene Kärtchen, die anderen gleiten zur Seite (FLIP in plan.js) */
.pl-ins {
  flex: none; box-sizing: border-box; border-radius: 10px; border: 1.5px dashed var(--accent); pointer-events: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent); font-size: 0; animation: pl-gap .18s var(--ease);
}
@keyframes pl-gap { from { opacity: 0; transform: scaleY(.6); } }
.pl-e.lifted { display: none; }
.pl-e.gone { opacity: 0; transform: scale(.9); transition: opacity .18s, transform .18s; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-act { border: 0; background: none; color: var(--accent); font: 700 .9rem "Inter Tight", sans-serif; cursor: pointer; padding: 4px 2px; }

/* Kontextmenü am Mauszeiger (Rechtsklick im Stunden-Kalender) */
.ctx-menu { position: fixed; z-index: 90; min-width: 168px; padding: 4px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-hi); border: 1px solid var(--line-hi); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ctx-menu[hidden] { display: none; }
.ctx-menu button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px;
  background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: var(--line); outline: none; }
.ctx-menu button.bad { color: var(--err); }
.ctx-menu .i { width: 16px; height: 16px; }

/* Meine Tickets unter dem Stunden-Kalender: antippen = wählen, dann Zeit im Kalender ziehen */
.tc-tasks { margin-top: 22px; }
.tc-tasks-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tc-tasks-head h2 { margin: 0; font-size: 1.1rem; }
.tc-tgroup { margin-bottom: 16px; }
.tc-tgroup h3 { margin: 0 0 8px; font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tc-tgroup.focus h3 { color: var(--accent); }
.tc-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tc-task { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 44px; padding: 10px 12px; text-align: left;
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s; min-width: 0; }
.tc-task:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.tc-task:active { transform: scale(.99); }
.tc-task.high { background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.tc-task.sos { background: color-mix(in srgb, var(--err) 9%, var(--surface)); }
.tc-task.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 1px var(--accent); }
.tc-task-top { display: flex; align-items: center; gap: 8px; width: 100%; font-size: .78rem; }
.tc-task-top .urg { height: 18px; padding: 0 6px; font-size: .64rem; }
.tc-task-booked { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--ok); font: 600 .74rem "JetBrains Mono", monospace; }
.tc-task-booked .i { width: 13px; height: 13px; }
.tc-task b { font-size: .95rem; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-task-sub { color: var(--text-2); font-size: .85rem; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-task-note { color: var(--muted); font-size: .8rem; font-style: italic; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-armed { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 8px; border-radius: 14px;
  background: var(--surface-hi); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: .9rem; }
.tc-armed[hidden] { display: none; }
.tc-armed-txt { display: flex; flex-direction: column; min-width: 0; }
.tc-armed-txt b, .tc-armed-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-armed-txt small { color: var(--text-2); font-size: .8rem; }
.tc-grid.armed .tc-body { cursor: crosshair; }
@media (max-width: 699px) {
  .tc-tgrid { grid-template-columns: 1fr; }
  .tc-armed { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* Breite Bildschirme: Kalender und „Meine Tickets“ nebeneinander, alles auf einen Blick */
@media (min-width: 1440px) {
  .tc.has-tasks .tc-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 360px); gap: 16px; align-items: start; }
  .tc.has-tasks .tc-tasks { margin-top: 0; position: sticky; top: 72px; max-height: calc(100dvh - 92px); overflow-y: auto;
    padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
  .tc.has-tasks .tc-tasks-head { flex-direction: column; gap: 2px; }
  .tc.has-tasks .tc-tgrid { grid-template-columns: 1fr; }
}

/* ---------- Übersicht als Baukasten (dashboard.py) ---------- */
/* Raster wie Widgets am Handy (0.50.0): Rechner 12 Spalten, Tablet 6, Handy 4; Höhe in Einheiten (--dash-u).
   Jedes Widget hat feste Größe (--w × --h), der Inhalt passt sich per Containerabfrage an (z. B. Kennzahlen). */
.dash { --dash-u: 84px; --dash-gap: 14px; --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: var(--dash-u); grid-auto-flow: row dense; gap: var(--dash-gap); position: relative; }
.dw { --span: var(--wp); grid-column: span var(--span); grid-row: span var(--h); min-width: 0; min-height: 0; position: relative;
  container-type: size; container-name: dw; border-radius: var(--radius); }
@media (min-width: 700px) { .dash { --cols: 6; } .dw { --span: var(--wt); } }
@media (min-width: 1100px) { .dash { --cols: 12; } .dw { --span: var(--w); } }
.dw-body { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.dw-body > .card, .dw-body > .dw-card, .dw-body > .tgrid, .dw-body > .wk-days, .dw-body > .tiles { flex: 1 1 auto; min-height: 0; overflow: auto; }
.dw-body > .dw-head { flex: none; }
.dw-kalender .kal { height: 100%; }
.dw-kalender .kal-card { flex: 1 1 auto; min-height: 0; overflow: auto; align-content: start; }
.dw-meine .dash-tgrid { overflow: hidden; align-content: start; }
.dw-woche .wk-day { min-height: 0; }
/* Handy: nur die Kennzahlen haben feste Größe, die übrigen Widgets wachsen mit dem Inhalt (mindestens --h Einheiten),
   weil untereinander gestapelte Tage/Listen sonst abgeschnitten würden */
@media (max-width: 699px) {
  .dash { grid-auto-rows: minmax(var(--dash-u), auto); }
  .dw:not(.dw-stat) { container-type: inline-size; }
  .dw:not(.dw-stat) .dw-body > * { flex: none; overflow: visible; }
}
.dash.editing .dw-head { padding-left: 26px; }
.dash-empty { grid-column: 1 / -1; grid-row: span 1; align-self: start; }

/* Kennzahl-Widget: klein = Zahl + Beschriftung, größer = mit Symbol groß, breit und hoch = mit Ticketliste */
.zw { --c: var(--accent); position: relative; height: 100%; display: grid; grid-template: "num lbl ico" 1fr / auto minmax(0, 1fr) auto;
  align-items: center; column-gap: 10px; padding: 0 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.zw:has(.zw-link:hover) { transform: translateY(-2px); box-shadow: var(--shadow); }
.zw-blue { --c: #3b82f6; } .zw-err { --c: var(--err); } .zw-violet { --c: #9b6cf0; } .zw-warn { --c: var(--warn); } .zw-accent { --c: var(--accent); }
.zw-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.zw-num { grid-area: num; font-size: 1.9rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--c); letter-spacing: -.02em; }
.zw-lbl { grid-area: lbl; color: var(--text-2); font-weight: 550; font-size: .9rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zw-ico { grid-area: ico; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.zw-ico .i { width: 18px; height: 18px; }
.zw-list { display: none; }
.zw.zero .zw-num { color: var(--muted); }
.zw.zero.zw-err { --c: var(--muted); }
/* Designs */
.zw.zs-farbig { background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-color: color-mix(in srgb, var(--c) 34%, transparent); }
.zw.zs-kraeftig { background: linear-gradient(150deg, color-mix(in srgb, var(--c) 92%, #fff) 0%, var(--c) 100%); border-color: transparent; color: #fff; }
.zw.zs-kraeftig .zw-num, .zw.zs-kraeftig .zw-lbl { color: #fff; }
.zw.zs-kraeftig .zw-ico { background: rgba(255, 255, 255, .22); color: #fff; }
.zw.zs-kraeftig.zero { --c: #6b7280; }
/* zu schmal für das Symbol */
@container dw (max-width: 200px) { .zw { grid-template: "num lbl" 1fr / auto minmax(0, 1fr); padding: 0 12px; } .zw-ico { display: none; } }
/* höher: Zahl groß, darunter die Beschriftung, Symbol oben */
@container dw (min-height: 150px) {
  .zw { grid-template: "ico" auto "." 1fr "num" auto "lbl" auto / minmax(0, 1fr); padding: 16px; align-items: end; }
  .zw-ico { display: grid; justify-self: start; }
  .zw-num { font-size: 3rem; }
  .zw-lbl { white-space: normal; }
}
/* breit und hoch: rechts bzw. unten die ersten Tickets */
@container dw (min-height: 150px) and (min-width: 380px) {
  .zw { grid-template: "ico list" auto ". list" 1fr "num list" auto "lbl list" auto / minmax(90px, 32%) minmax(0, 1fr); column-gap: 16px; }
  .zw-list { grid-area: list; display: flex; flex-direction: column; gap: 4px; align-self: stretch; margin: 0; padding: 0; list-style: none; overflow: hidden; position: relative; z-index: 2; }
}
@container dw (min-height: 300px) and (max-width: 520px) and (min-width: 260px) {
  .zw { grid-template: "ico num" auto "lbl lbl" auto "list list" 1fr / auto minmax(0, 1fr); align-items: center; row-gap: 6px; }
  .zw-num { justify-self: end; }
  .zw-list { grid-area: list; display: flex; flex-direction: column; gap: 4px; align-self: stretch; margin: 6px 0 0; padding: 0; list-style: none; overflow: hidden; position: relative; z-index: 2; }
}
.zw-list a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px; border-radius: 10px; color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--surface-hi) 70%, transparent); transition: background .15s; }
.zw-list a:hover { background: var(--surface-hi); }
.zw.zs-kraeftig .zw-list a { background: rgba(255, 255, 255, .16); }
.zw.zs-kraeftig .zw-list a:hover { background: rgba(255, 255, 255, .26); }
.zw.zs-kraeftig .zw-list small { color: rgba(255, 255, 255, .8); }
.zw-t { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.zw-t b, .zw-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zw-t b { font-size: .85rem; font-weight: 620; }
.zw-t small { font-size: .74rem; color: var(--muted); }
.zw-due { flex: none; font: 600 .7rem "JetBrains Mono", monospace; color: var(--muted); }
.zw-due.late { color: var(--err); }
.urg-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.urg-dot.u1 { background: #3b82f6; } .urg-dot.u2 { background: var(--warn); } .urg-dot.u3 { background: var(--err); }
.urg-dot.u0 { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.zs-kraeftig .urg-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }

/* ---- Bearbeiten (dashboard.js): wackeln, ziehen, Größe an der Ecke ---- */
.dash-bar { position: sticky; top: calc(var(--top-h) + 8px); z-index: 30; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 8px 8px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line-hi); box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: dash-bar-in .28s var(--ease); }
.dash-bar[hidden] { display: none; }
.dash-bar-txt { display: grid; margin-right: auto; line-height: 1.25; }
@keyframes dash-bar-in { from { opacity: 0; transform: translateY(-10px); } }
.dw-edit { display: none; }
.dash.editing .dw-edit { display: block; position: absolute; inset: 0; z-index: 5; border-radius: var(--radius); cursor: grab;
  touch-action: pan-y; background: color-mix(in srgb, var(--bg) 8%, transparent); box-shadow: inset 0 0 0 1.5px var(--line-hi); }
.dash.editing .dw-body { pointer-events: none; user-select: none; }
.dash.editing .dw { animation: dw-wobble .32s ease-in-out infinite alternate; }
.dash.editing .dw:nth-child(2n) { animation-delay: -.16s; animation-duration: .36s; }
.dash.editing .dw:nth-child(3n) { animation-delay: -.08s; animation-duration: .3s; }
@keyframes dw-wobble { from { rotate: -.35deg; } to { rotate: .35deg; } }
.dash.editing .dw.dw-wide { animation-name: dw-wobble-s; }
@keyframes dw-wobble-s { from { rotate: -.08deg; } to { rotate: .08deg; } }
@media (prefers-reduced-motion: reduce) { .dash.editing .dw { animation: none; } }
.dw-x, .dw-opt { position: absolute; top: -9px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-hi); background: var(--surface-hi); color: var(--text); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: transform .15s var(--ease), background .15s; }
.dw-x::after, .dw-opt::after { content: ""; position: absolute; inset: -7px; }          /* Tipp-Fläche 44 px */
.dw-x { left: -9px; } .dw-opt { right: -9px; }
.dw-x:hover { background: var(--err); color: #fff; transform: scale(1.08); }
.dw-opt:hover { background: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.dw-x .i, .dw-opt .i { width: 15px; height: 15px; }
.dw-size { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 6px 12px; border-radius: 10px; background: var(--accent);
  color: var(--on-accent); font: 700 .95rem "JetBrains Mono", monospace; opacity: 0; transition: opacity .15s; pointer-events: none; }
.dw.resizing .dw-size { opacity: 1; }
.dw-grip { position: absolute; right: -6px; bottom: -6px; width: 34px; height: 34px; cursor: nwse-resize; touch-action: none; }
.dw-grip::before { content: ""; position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 0 0 6px 0;
  border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transition: transform .15s var(--ease); }
.dw-grip:hover::before { transform: translate(2px, 2px); }
.dw.ghost { animation: none !important; }
.dw.ghost > * { visibility: hidden; }
.dw.ghost::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); border: 2px dashed var(--accent); background: var(--accent-soft); }
.dw.resizing { animation: none !important; z-index: 6; }
.dw.resizing .dw-edit { box-shadow: inset 0 0 0 2px var(--accent); }
.dw-float { position: fixed; z-index: 1000; margin: 0; pointer-events: none; animation: none !important; rotate: 1.5deg; scale: 1.03;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4); transition: scale .18s var(--ease), rotate .18s var(--ease); border-radius: var(--radius); }
.dw-float .dw-edit { cursor: grabbing; }
.dw.pop-in { animation: dw-pop .38s var(--ease) both !important; }
@keyframes dw-pop { from { opacity: 0; scale: .7; } 60% { scale: 1.03; } }
.dw.pop-out { animation: dw-out .22s ease-in both !important; pointer-events: none; }
@keyframes dw-out { to { opacity: 0; scale: .7; } }
body.dash-dragging { user-select: none; cursor: grabbing; }

/* Menü am Widget: Größe Klein/Mittel/Groß, Design der Kennzahlen */
.dw-pop { position: absolute; z-index: 1100; display: grid; gap: 12px; padding: 12px; width: 260px; box-shadow: var(--shadow); animation: pop .18s var(--ease); }
.dw-pop[hidden] { display: none; }
.dw-pop-sec { display: grid; gap: 6px; }
.dw-pop .seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.dw-pop .seg button { justify-content: center; height: 40px; }
.dw-pop-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dw-pop-styles button { display: grid; justify-items: center; gap: 4px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line);
  background: none; color: var(--text-2); font: 550 .78rem "Inter Tight", sans-serif; cursor: pointer; min-height: 44px; }
.dw-pop-styles button.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.zw-sw { --c: var(--accent); display: grid; place-items: center; width: 100%; height: 30px; border-radius: 8px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--c); }
.zw-sw.zs-farbig { background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-color: color-mix(in srgb, var(--c) 36%, transparent); }
.zw-sw.zs-kraeftig { background: var(--c); color: #fff; border-color: transparent; }

/* Galerie „Widget hinzufügen“ */
.dash-gal { width: min(560px, calc(100vw - 24px)); }
.dash-gal-list { display: grid; gap: 8px; padding: 4px 16px 16px; max-height: min(70vh, 640px); overflow: auto; }
.dash-gal-it { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 12px; min-height: 64px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s, background .15s; }
.dash-gal-it:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.dash-gal-it > span:nth-child(2) { display: grid; gap: 2px; }
.dash-gal-it .i { color: var(--accent); }
.dash-gal-prev { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(6, 1fr); width: 64px; height: 42px; padding: 3px; gap: 1px;
  border-radius: 8px; background: var(--bg-2); }
.dash-gal-prev i { grid-column: span var(--gw); grid-row: span min(var(--gh), 6); border-radius: 4px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.dash-gal-it.gone { animation: dw-out .2s ease-in both; }
.dw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dw-head h2 { margin: 0; }
.dw-head h2 .muted { font-weight: 500; font-size: .85em; }
.dw-head .row { gap: 12px; }
.dw-card { padding: 6px; display: flex; flex-direction: column; gap: 2px; }

/* Meine Tickets: so viele Spalten wie Kacheln mit ~300 px passen, höchstens 8 (0.20.2, Flo: nicht so breit) */
.dash-tgrid { grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 290px), calc((100% - 7 * 10px) / 8)), 1fr)); gap: 10px; }

/* Meine Woche: Tagesspalten */
.wk-days { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 8px; }
.wk-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 120px; padding: 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); }
.wk-day.today { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.wk-day.past .wk-day-head b { color: var(--muted); }
.wk-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.wk-day.today .wk-day-head b { color: var(--accent); }
.wk-day-head .mono { color: var(--muted); font-size: .72rem; }
.wk-day-head .neg { color: var(--err); }
.wk-badge { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--surface-hi); color: var(--text-2); font-size: .72rem; }
.wk-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--bg-2); color: var(--text); min-width: 0; }
a.wk-item:hover { background: var(--surface-hi); }
.wk-item.due { background: color-mix(in srgb, var(--warn) 9%, var(--bg-2)); }
.wk-item.due.late { background: color-mix(in srgb, var(--err) 12%, var(--bg-2)); }
.wk-kind { flex: none; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface-hi); color: var(--text-2);
  font: 600 .62rem "JetBrains Mono", monospace; text-transform: uppercase; text-align: center; margin-top: 2px; }
.wk-item.due .wk-kind { background: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.wk-item.due.late .wk-kind { background: color-mix(in srgb, var(--err) 30%, transparent); color: var(--err); }
.wk-txt { display: flex; flex-direction: column; min-width: 0; }
.wk-txt b, .wk-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-txt b { font-size: .84rem; line-height: 1.3; }
.wk-txt small { color: var(--text-2); font-size: .74rem; }
.wk-empty { color: var(--muted); font-size: .8rem; }
@media (max-width: 899px) {
  .wk-days { grid-template-columns: 1fr; }
  .wk-day { min-height: 0; }
  .wk-day.past { display: none; }
  .wk-days:not(:has(.wk-day:not(.past))) .wk-day.past { display: flex; }   /* Wochenende: sonst wäre alles leer */
}

/* Tickets pro Gewerk */
.gw-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto auto; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 9px; color: var(--text); }
.gw-row:hover { background: var(--surface-hi); }
.gw-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.gw-name i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--c); }
.gw-bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.gw-bar span { display: block; height: 100%; border-radius: 99px; background: color-mix(in srgb, var(--c) 70%, transparent); }
.gw-n { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.gw-row .urg { height: 18px; padding: 0 6px; font-size: .62rem; }

/* Plan-Vorschau */
.pv-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; min-height: 38px; padding: 3px 8px; border-radius: 9px; }
.pv-row.me { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pv-row.empty { opacity: .6; }
.pv-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .86rem; }
.pv-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-items { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.pv-chip { max-width: 100%; padding: 2px 8px; border-radius: 999px; background: var(--surface-hi); color: var(--text); font-size: .76rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pv-chip:hover { background: var(--line-hi); }
.pv-chip.note { background: none; border: 1px dashed var(--line-hi); color: var(--text-2); }

/* Team-Feed und Chat */
.feed-row, .dchat-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 9px; color: var(--text); min-width: 0; }
.feed-row:hover, .dchat-row:hover { background: var(--surface-hi); }
.feed-txt, .dchat-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feed-txt > span, .feed-txt small, .dchat-name b, .dchat-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-txt > span { font-size: .85rem; color: var(--text-2); }
.feed-txt > span b { color: var(--text); }
.feed-txt small { font-size: .74rem; }
.dchat-name small { color: var(--muted); font-size: .8rem; }
.dchat-row.unread .dchat-name small { color: var(--text-2); }
.dchat-row .nav-count { position: static; }

/* Übersicht anpassen */
.dset { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dset-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); }
.dset-row.off { opacity: .55; }
.dset-on { display: flex; flex-direction: row !important; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.dset-on input { width: 20px; height: 20px; flex: none; }
.dset-on span { display: flex; flex-direction: column; min-width: 0; }
.dset-on small { font-size: .8rem; }
.dset-row select { width: auto; min-width: 140px; }
.dset-move { display: flex; gap: 2px; }
@media (max-width: 699px) { .dset-row { grid-template-columns: 1fr auto; } .dset-row select { grid-column: 1; grid-row: 2; } .dset-move { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; } }

/* Ansicht nur als Symbole, eigenes Sortiermenü, Wechsel ohne Neuladen */
.seg button.seg-ico { width: 40px; padding: 0; justify-content: center; }
.seg button.seg-ico .i { width: 19px; height: 19px; }
[data-tk-results] { transition: opacity .15s; }
[data-tk-results].loading { opacity: .55; pointer-events: none; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 550 .9rem "Inter Tight", sans-serif; cursor: pointer; transition: border-color .15s, background .15s; }
.dd-btn:hover { border-color: var(--line-hi); }
.dd.open .dd-btn { border-color: var(--accent); }
.dd-btn .i { width: 17px; height: 17px; color: var(--text-2); }
.dd-chev { transition: transform .15s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd[data-off] .dd-btn { opacity: .55; cursor: default; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-hi); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.4); animation: pop .14s var(--ease); }
.dd-menu[hidden] { display: none; }
.dd-title { margin: 4px 10px 6px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.dd-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.dd-menu button:hover, .dd-menu button:focus-visible { background: var(--line); outline: none; }
.dd-menu button .i { width: 16px; height: 16px; color: var(--accent); opacity: 0; }
.dd-menu button[aria-selected="true"] { font-weight: 650; }
.dd-menu button[aria-selected="true"] .i { opacity: 1; }
@media (max-width: 699px) { .toolbar .dd-btn span { display: none; } .toolbar .dd-btn { width: 44px; padding: 0; justify-content: center; } .toolbar .dd-chev { display: none; } }

/* Übersicht 0.6.1: Plan-Einträge in Akzentfarbe (gehören dir), gebucht = grüner Haken; kompakte Kennzahlen; gleiche Kachelhöhe */
.wk-item.plan { background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); }
a.wk-item.plan:hover { background: color-mix(in srgb, var(--accent) 22%, var(--bg-2)); }
.wk-item.plan .wk-kind { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.wk-ok { width: 16px; height: 16px; flex: none; margin-left: auto; color: var(--ok); align-self: center; }
.dash-gear { border: 1px solid var(--line); }
/* Kennzahlen als kompakte Leiste: Kacheln nur so breit wie ihr Inhalt (0.20.2, Flo: wirkte leer) */
.dw-zahlen .stats { display: flex; flex-wrap: wrap; gap: 8px; }
.dw-zahlen .stat { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; flex: 0 0 auto; min-height: 44px;
  align-items: center; border-radius: 12px; }
.dw-zahlen .stat b { font-size: 1.25rem; min-width: 1ch; }
.dw-zahlen .stat span { white-space: nowrap; }
.dw-zahlen .stat.null b { color: var(--muted); }
@media (max-width: 699px) { .dw-zahlen .stat { flex: 1 1 calc(50% - 4px); } }
.dash-tgrid { grid-auto-rows: max-content; }
.dash-tgrid .tcard { height: 100%; }
.dash-tgrid .tcard-desc { min-height: calc(2 * 1.4em); }
.dash-tgrid .tcard-foot { margin-top: auto; }

/* Plan: mehrtägige Einsätze (gleiches Ticket, gleiche Person, Folgetage) als verbundene Kacheln */
.pl-chain { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; height: 17px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 30%, transparent); color: var(--text); font: 600 .66rem "JetBrains Mono", monospace; }
.pl-chain .i { width: 11px; height: 11px; }
.pl-e.chain-on { background: color-mix(in srgb, var(--c) 30%, var(--surface)); border-color: color-mix(in srgb, var(--c) 70%, transparent); }
@media (min-width: 700px) {
  /* bis an den Zellenrand ziehen, dort ohne Rundung und ohne Rand: Folgetage lesen sich als ein Band */
  .pl-e.link-r { margin-right: -7px; border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
  .pl-e.link-l { margin-left: -7px; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 16px; }
  .pl-e.link-r:hover, .pl-e.link-l:hover { transform: none; }
}

/* 0.6.2 Erledigte Tickets: ganze Kachel grün getönt (keine Randleiste) */
.tcard-done { display: none; align-items: center; gap: 4px; margin-left: auto; margin-right: 6px; color: var(--ok); font-size: .78rem; font-weight: 600; }
.tcard-done .i { width: 14px; height: 14px; }
.tcard.done { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tcard.done:hover { border-color: color-mix(in srgb, var(--ok) 70%, transparent); }
.tcard.done .tcard-done { display: inline-flex; }
.tlist-row.done { background: color-mix(in srgb, var(--ok) 11%, transparent); }
.tlist-row.done:hover { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.btn.ok { background: var(--ok); border-color: transparent; color: #06281a; font-weight: 600; min-height: 44px; }
.btn.ok:hover { filter: brightness(1.06); }

/* 0.6.3 Plan: Spuren für mehrtägige Einsätze – Lücke hält die Zeile frei, damit das Band durchgeht */
.pl-lane-gap { flex: none; min-height: 1px; pointer-events: none; }
@media (max-width: 899px) { .pl-lane-gap { display: none; } }

/* Schwebender Hinweis (z. B. „erledigt“): blendet nach kurzer Zeit von selbst aus */
.toast-float { display: inline-flex; align-items: center; gap: 8px; background: var(--ok); color: #06281a; }
.toast-float .i { width: 17px; height: 17px; }
.toast-float.out { opacity: 0; transform: translate(-50%, 8px); transition: opacity .35s, transform .35s; }
.page-head form { margin: 0; }

/* 0.6.3 Ticket-Filter: Knopf in der Leiste, aufklappbares Feld, aktive Filter als entfernbare Chips */
.fbtn { position: relative; }
.fbtn.open, .fbtn.has { border-color: var(--accent); }
.fbtn-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .74rem; display: inline-grid; place-items: center; }
.fbtn-n:empty { display: none; }
.fpanel { display: grid; gap: 12px; padding: 14px; margin: 0 0 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.fpanel[hidden] { display: none; }
.fp-switches { padding-top: 6px; border-top: 1px solid var(--line); }
.fp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.fp-label { width: 104px; flex: none; color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; flex: 1; }
.fpick input { position: absolute; opacity: 0; pointer-events: none; }
.fpick span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: .88rem; cursor: pointer; transition: background .12s, border-color .12s; }
.fpick span i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fpick span:hover { border-color: var(--line-hi); }
.fpick input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 600; }
.fpick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fdd .dd-btn { height: 38px; min-width: 200px; justify-content: space-between; background: var(--bg); }
.fdd .dd-btn.set { border-color: var(--accent); }
.fdd .dd-menu { left: 0; right: auto; max-height: 360px; }
.dd-opts { overflow-y: auto; max-height: 280px; display: flex; flex-direction: column; gap: 2px; }
.dd-opts button[hidden] { display: none; }
.dd-search { margin: 0 4px 6px; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.fswitch { display: inline-flex; flex-direction: row; align-items: center; font-weight: 500; color: var(--text); gap: 10px; min-height: 44px; cursor: pointer; font-size: .92rem; margin-right: 18px; }
.fswitch input { position: absolute; opacity: 0; pointer-events: none; }
.fswitch span { width: 38px; height: 22px; border-radius: 999px; background: var(--line-hi); position: relative; transition: background .15s; flex: none; }
.fswitch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.fswitch input:checked + span { background: var(--accent); }
.fswitch input:checked + span::after { transform: translateX(16px); background: #fff; }
.fswitch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fp-reset { margin-left: auto; }
.factive { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.fon { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); font-size: .85rem; font-weight: 600; }
.fon .i { width: 14px; height: 14px; opacity: .7; }
.fon:hover .i { opacity: 1; }
@media (max-width: 640px) { .fp-label { width: 100%; } .fdd, .fdd .dd-btn { width: 100%; } .fdd .dd-btn { height: 44px; } .fdd .dd-menu { right: 0; } }

/* 0.6.5 Abwesenheit im Stunden-Kalender: füllt die Arbeitszeit als auffälliger, schraffierter Block in ihrer Farbe */
.tc-absblock { position: absolute; left: 3px; right: 3px; z-index: 1; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 34%, var(--surface)) 0 10px, color-mix(in srgb, var(--c) 24%, var(--surface)) 10px 20px);
  border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); color: var(--text); pointer-events: auto; }
.tc-absblock b { font-size: .95rem; letter-spacing: .01em; color: color-mix(in srgb, var(--c) 35%, #fff); }
html[data-theme="light"] .tc-absblock b { color: color-mix(in srgb, var(--c) 75%, #000); }
.tc-absblock small { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--text-2); }
.tc-absblock.beantragt { opacity: .7; border-style: dashed; }
.ctx-title { margin: 4px 10px 4px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.ctx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin: 0 3px; }
/* Plan: keine Textauswahl auf Kacheln – sonst startet Shift+Ziehen eine Markierung statt die Kachel zu kopieren */
.pl-e, .pl-tk, .pl-cell { -webkit-user-select: none; user-select: none; }
/* Ganze Spalte markieren, damit ein Abwesenheitstag auch mit Einträgen sofort auffällt */
.tc-col.abs .tc-colhead { background: color-mix(in srgb, var(--absc) 24%, var(--surface)); }
.tc-col.abs .tc-body { background: color-mix(in srgb, var(--absc) 7%, transparent); }
.tc-col.abs.beantragt .tc-colhead { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--absc) 20%, var(--surface)) 0 8px, var(--surface) 8px 14px); }
.tc-col.abs .tc-ab.genehmigt { background: var(--c); color: #fff; }
/* Stunden als „8 h“ statt „8:00“ – normale Schrift, damit es nicht nach Uhrzeit aussieht */
.tc-colhead .tc-dh, .tc-task-booked, .tc-absblock small { font-family: inherit; font-weight: 600; letter-spacing: 0; }
/* Abwesenheits-Block: normaler Zeiger und kein Browser-Tooltip (sah sonst wie ein Geister-Kästchen am Fadenkreuz aus) */
.tc-absblock { cursor: default; }

/* 0.6.8 Einstellungen › Arbeitszeiten je Wochentag */
.wt-days { display: grid; gap: 6px; }
.wt-day { display: grid; grid-template-columns: 34px 140px 10px 140px 56px auto; justify-content: start; align-items: center; gap: 8px; }
.wt-day label { display: block; margin: 0; }
.wt-day input { text-align: center; }
.wt-day.off b, .wt-day.off .wt-h { color: var(--muted); }
.wt-h { font-weight: 600; text-align: right; }
@media (max-width: 520px) { .wt-day { grid-template-columns: 30px minmax(0, 1fr) auto minmax(0, 1fr) 52px; } .wt-day [data-wt-clear], .wt-day > span:last-child:empty { display: none; } }
/* Stunden-Kalender: außerhalb der Firmen-Arbeitszeit leicht abgedunkelt */
.tc-offhours { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--bg) 40%, transparent); pointer-events: none; }
/* Plan: leere Zelle = ganze Fläche ist das Plus-Feld (nicht nur ein Streifen unten) */
@media (min-width: 900px) {
  .pl-cell:not(:has(.pl-e, .pl-abs, .pl-holi)) .pl-add { top: 5px; bottom: 5px; left: 5px; right: 5px; height: auto; border: 1px dashed transparent; }
  .pl-cell:not(:has(.pl-e, .pl-abs, .pl-holi)) .pl-add:hover { border-color: var(--line-hi); }
  .pl-cell:not(:has(.pl-e, .pl-abs, .pl-holi)) .pl-add .i { width: 20px; height: 20px; }
}
/* Geist beim Ziehen im Plan (normal und Shift): folgt dem Zeiger wie im Board. Doppelte Klasse, weil „.pl-e { position: relative }“ weiter unten steht */
.pl-e.pl-ghost, .pl-ghost { position: fixed; left: 0; top: 0; margin: 0; transition: none; animation: none; z-index: 200; pointer-events: none;
  will-change: transform; overflow: hidden;
  box-shadow: 0 calc(6px + 22px * var(--lift, 0)) calc(14px + 40px * var(--lift, 0)) rgba(0, 0, 0, calc(.2 + .3 * var(--lift, 0))),
              0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) calc(70% * var(--lift, 0)), transparent); }
.pl-ghost.landing { box-shadow: 0 6px 14px rgba(0, 0, 0, .2); transition: box-shadow .26s; }
/* Rechtsklick-Box im Stunden-Kalender (rechte Maustaste halten und ziehen) */
.tc-rsel { position: absolute; left: 2px; right: 2px; z-index: 4; border-radius: 8px; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1.5px dashed var(--accent);
  font: 600 .74rem/1 "Inter Tight", sans-serif; color: var(--text); padding: 6px 8px; }
.tc-absblock.part { padding: 5px 8px; }
.tc-absblock.part b { font-size: .82rem; }
.ctx-hint { margin: 4px 10px 6px; max-width: 220px; color: var(--muted); font-size: .72rem; line-height: 1.35; border-top: 1px solid var(--line); padding-top: 6px; }
/* Angeheftete Filter (Favoriten): Schalter-Chips über den Tickets */
.ffavs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ffav { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line-hi);
  background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 550; }
.ffav:hover { border-color: var(--accent); color: var(--text); }
.ffav.on { border-style: solid; border-color: color-mix(in srgb, var(--accent) 75%, transparent); background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--accent) 55%, transparent); }
.fp-tip { margin: -2px 0 0; }

/* Plan: Ränder der Ticket-Kacheln zum Verlängern auf weitere Tage */
.pl-e { position: relative; }
.pl-grip { position: absolute; top: 6px; bottom: 6px; width: 10px; cursor: ew-resize; z-index: 2; touch-action: none; }
.pl-grip.l { left: -2px; } .pl-grip.r { right: -2px; }
.pl-grip::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 18px; margin: -9px 0 0 -1.5px;
  border-radius: 2px; background: color-mix(in srgb, var(--c) 70%, var(--text)); opacity: 0; transition: opacity .15s; }
.pl-e:hover .pl-grip::after { opacity: .8; }
.is-spanning .pl-grip::after { opacity: 0; }
.is-spanning, .is-spanning * { cursor: ew-resize !important; user-select: none; }
.pl-cell.span-on { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.pl-cell.span-off .pl-e { opacity: .35; }
@media (max-width: 699px) { .pl-grip { display: none; } }

/* Kopfzeile: Neues Ticket immer oben erreichbar */
.topnew { height: 40px; min-height: 40px; padding: 0 16px 0 12px; border-radius: 999px; }
@media (max-width: 899px) { .topnew { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; border-radius: 50%; } .topnew span { display: none; } .topgear { display: none; } }
.nav-small .sidenav-group:first-child .sidenav-label { display: none; }

/* Kopfzeile anpassbar (kopfleiste.py): links neben dem Logo, rechts vor dem eigenen Bild */
.topzone { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tz-l { flex: 1; }
.topzone > * { flex: none; }
@media (max-width: 520px) { .topbar > .brand .brand-name { display: none; } }
.topzone .iconbtn, .topbar .topzone .topnew { margin-left: 0; }
.topchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); text-decoration: none; white-space: nowrap; font-size: .9rem; }
.topchip:hover { border-color: var(--line-hi); color: var(--text); }
.topchip b { font-variant-numeric: tabular-nums; color: var(--text); }
.topchip.err { background: color-mix(in srgb, var(--err, #e5484d) 12%, transparent); border-color: color-mix(in srgb, var(--err, #e5484d) 35%, transparent); color: var(--err, #e5484d); }
.topchip.err b { color: var(--err, #e5484d); }
@media (max-width: 899px) { .topbar { gap: 8px; } .topzone { gap: 8px; } .topchip { padding: 0 12px; } .tz-l { flex: 1 0 auto; justify-content: flex-end; } .topbar > .brand { flex: 0 1 auto; min-width: 0; } }

/* ---------- Doku ---------- */
:root { --dc0: #94a3b8; --dc1: #f05252; --dc2: #3b82f6; --dc3: #a855f7; --dc9: #f59e0b; --dcx: var(--muted); }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 10px; font-size: .86rem; color: var(--muted); }
.crumbs a { color: var(--text-2); } .crumbs a:hover { color: var(--accent); }
.crumbs .i { width: 14px; height: 14px; opacity: .6; }

/* Kacheln mit Bild (Kunden, Standorte) */
.dgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dgrid.sm { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dtile { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--text); transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.dtile:hover { transform: translateY(-3px); border-color: var(--line-hi); box-shadow: var(--shadow); }
.dtile-img { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--ibg, hsl(var(--h, 220) 45% 24%)); }
.dtile-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--ease); }
.dtile:hover .dtile-img img { transform: scale(1.03); }
.dtile-img:not([style*="--ibg"]) { background: linear-gradient(135deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 40) 50% 18%)); }
.dtile-ini { font: 700 2.2rem "Inter Tight", sans-serif; letter-spacing: -.02em; color: hsl(var(--h, 220) 80% 88% / .9); }
.dtile-badge { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650;
  background: rgba(10, 12, 18, .72); color: #fff; backdrop-filter: blur(6px); }
.dtile-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; min-height: 0; }
.dtile-name { font-size: 1rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dtile-sub { color: var(--text-2); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dtile-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; color: var(--muted); font-size: .76rem; }
@media (max-width: 560px) { .dgrid, .dgrid.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .dtile-name { font-size: .92rem; } }

/* Bild wählen */
.imgpick { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.imgpick-prev { width: 220px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--ibg, var(--surface-hi)); border: 1px dashed var(--line-hi); }
.imgpick-prev img { width: 100%; height: 100%; object-fit: contain; }

/* Standort-Kopf */
.dsite-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.dsite-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dsite-head p { margin: 0; }
.dsite-img { width: 132px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center; flex: none;
  background: var(--ibg, linear-gradient(135deg, hsl(var(--h, 220) 55% 30%), hsl(calc(var(--h, 220) + 40) 50% 18%))); }
.dsite-img img { width: 100%; height: 100%; object-fit: contain; }
.dsite-img .dtile-ini { font-size: 1.5rem; }
.dsite-code { padding: 2px 9px; border-radius: 8px; background: var(--surface-hi); border: 1px solid var(--line-hi);
  font: 600 .95rem "JetBrains Mono", monospace; color: var(--text-2); }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dtag { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.dtag b { color: var(--muted); font-weight: 550; }
.dtag b::after { content: ":"; }
.dsite { display: grid; gap: 20px; }
@media (min-width: 1100px) { .dsite { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

/* Kapitelbaum */
.dtree { display: flex; flex-direction: column; gap: 8px; }
.dch { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.dch .dch { background: none; border: 0; border-radius: 0; }
.dch > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 12px;
  cursor: pointer; border-radius: 12px; user-select: none; }
.dch > summary::-webkit-details-marker { display: none; }
.dch > summary:hover { background: color-mix(in srgb, var(--c) 7%, transparent); }
.dch-chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--ease); flex: none; }
.dch[open] > summary .dch-chev { transform: rotate(90deg); }
.dch-num { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 6px; border-radius: 8px; flex: none;
  font: 650 .86rem "JetBrains Mono", monospace; color: color-mix(in srgb, var(--c) 80%, var(--text));
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.dch-title { font-weight: 600; flex: 1; min-width: 0; }
.d0 > summary .dch-title { font-size: 1.02rem; }
.dch-lock { width: 14px; height: 14px; color: var(--muted); vertical-align: -2px; }
.dch-count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.dch-act .iconbtn { opacity: .55; } .dch > summary:hover .dch-act .iconbtn { opacity: 1; }
.dch-body { padding: 0 10px 10px 40px; display: flex; flex-direction: column; gap: 2px; }
.dch .dch > summary { min-height: 42px; }
.dch-empty { margin: 4px 0 4px 10px; }
.dpage { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; border-radius: 9px; color: var(--text); }
.dpage:hover, .dpage.on { background: var(--surface-hi); }
.dpage .i { width: 17px; height: 17px; color: var(--muted); flex: none; }
.dch-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px dashed var(--line-hi); background: none; color: var(--text-2); font: inherit; cursor: pointer; }
.dch-add:hover { color: var(--text); border-color: var(--accent); }

/* Gewerke wählen */
.gw-always, .gw { border-radius: 12px; border: 1px solid var(--line); padding: 12px 14px; }
.gw-always { display: flex; gap: 12px; align-items: center; border-style: dashed; }
.gw-always .grow, .gw-head .grow { display: flex; flex-direction: column; gap: 2px; }
.gw { display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, background .15s; }
.gw.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.gw-head { display: flex; gap: 12px; align-items: center; }
.gw-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-hi); flex: none; }
.gw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gw:not(.on) .gw-chips { opacity: .5; }
.fpick input:disabled + span { opacity: .75; cursor: default; }
.chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tagrow { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; }

/* Seite lesen */
.ddoc-wrap { display: grid; gap: 18px; }
@media (min-width: 1100px) { .ddoc-wrap { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
/* Doku-Seite am Handy: Knöpfe unter den Titel, statt aus dem Bild zu ragen */
@media (max-width: 720px) { .dpage-head { flex-wrap: wrap; align-items: flex-start; } .dpage-head > div:first-child { flex: 1 1 100%; }
  .dpage-head .row { flex-wrap: wrap; } }
/* Breite Blätter (Türliste quer): Anhänge darunter statt daneben */
@media (min-width: 1100px) { .ddoc-wrap.wide { grid-template-columns: minmax(0, 1fr); } }
.ddoc { line-height: 1.65; overflow-wrap: anywhere; padding: 22px 26px; }
.ddoc > :first-child { margin-top: 0; }
.ddoc h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; } .ddoc h3 { font-size: 1.1rem; margin: 1.2em 0 .4em; } .ddoc h4 { margin: 1em 0 .3em; }
.ddoc p { margin: 0 0 .8em; }
.ddoc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ddoc img { max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; }
.ddoc table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: .92rem; display: block; overflow-x: auto; }
.ddoc th, .ddoc td { border: 1px solid var(--line-hi); padding: 7px 10px; text-align: left; vertical-align: top; min-width: 60px; }
.ddoc th { background: var(--surface-hi); font-weight: 650; }
.ddoc blockquote { margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ddoc pre { padding: 12px 14px; border-radius: 10px; background: var(--bg); font: .86rem/1.5 "JetBrains Mono", monospace; overflow-x: auto; }
.ddoc code { font: .88em "JetBrains Mono", monospace; }
.ph-miss { padding: 0 4px; border-radius: 5px; background: color-mix(in srgb, var(--warn) 22%, transparent); }
.dfile { display: flex; align-items: center; gap: 8px; }
.dfile a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.dfile a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfile .i { width: 17px; height: 17px; color: var(--muted); flex: none; }
.dfile form { margin: 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: 12px; cursor: pointer;
  border: 1px dashed var(--line-hi); text-align: center; color: var(--text-2); }
.dropzone:hover { border-color: var(--accent); color: var(--text); }

/* Editor */
.ed-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ed-title { flex: 1; min-width: 220px; font: 700 1.5rem "Inter Tight", sans-serif; background: none; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 6px 0; color: var(--text); }
.ed-title:focus { outline: none; border-color: var(--accent); }
.ed { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ed-bar { position: sticky; top: var(--top-h); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px);
  border-radius: var(--radius) var(--radius) 0 0; }
.ed-bar button, .ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-direction: row; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px;
  background: none; color: var(--text-2); font: inherit; font-size: .95rem; cursor: pointer; }
.ed-bar button:hover, .ed-btn:hover { background: var(--surface-hi); color: var(--text); }
.ed-bar button.on { background: var(--accent-soft); color: var(--text); }
.ed-bar select { height: 36px; min-height: 36px; padding: 0 8px; font-size: .9rem; width: auto; }
.ed-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line); }
.ed-tbl { display: inline-flex; gap: 2px; padding-left: 4px; }
.ed-tbl button { font-size: .8rem; }
.ed-ph { position: relative; }
.ed-phmenu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; width: min(380px, 86vw); max-height: 360px; overflow: auto;
  padding: 4px; border-radius: 12px; background: var(--surface-hi); border: 1px solid var(--line-hi); box-shadow: var(--shadow); }
.ed-phmenu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; height: auto; padding: 7px 10px; text-align: left; }
.ed-area { min-height: 55vh; padding: 22px 26px; outline: none; }
.ed-area.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.ed-area.busy { opacity: .6; cursor: progress; }
.ed-area table { display: table; }
.dph { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); font-size: .86rem; color: var(--text-2); }
.dph code { color: var(--text); }

/* Doku-Übersicht */
.dh { font-size: 1rem; margin: 18px 0 8px; color: var(--text-2); }
.dhit { display: flex; flex-direction: column; gap: 3px; color: var(--text); transition: border-color .15s; }
.dhit:hover { border-color: var(--line-hi); }
.ed-bar label.ed-btn { font-weight: 400; }
.ed-phmenu button { justify-content: flex-start; }

/* ---------- Anlagen (0.8.0) ---------- */
.grp-sicherheit { --c: #ef5b5b; } .grp-kommunikation { --c: #3b82f6; } .grp-multimedia { --c: #a855f7; } .grp-sonstiges { --c: #94a3b8; }
.st.ok { --c: var(--ok); } .st.warn { --c: var(--warn); } .st.err { --c: var(--err); }
.show-s { display: none; }
@media (max-width: 560px) { .show-s { display: flex; } }

/* Vor Ort: das Wichtigste beim Hinkommen */
.vo-quick { gap: 8px; margin: -6px 0 14px; } .vo-quick .btn { flex: 1; justify-content: center; }
.vo-strip { display: grid; gap: 10px; margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.vo-fact { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.vo-fact > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.vo-fact b { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.vo-fact small { color: var(--text-2); font-size: .82rem; }
.vo-fact.warn { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.vo-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-hi); flex: none; }
.vo-ic .i { width: 17px; height: 17px; color: var(--text-2); }
.vo-fact.warn .vo-ic .i { color: var(--warn); }
.vo-empty { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; margin-bottom: 20px; border-radius: 12px;
  border: 1px dashed var(--line-hi); color: var(--muted); font-size: .9rem; }
.vo-empty:hover { color: var(--text); border-color: var(--accent); }

/* Filter + Kacheln */
.an-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-bar h2 { margin: 0 10px 0 0; }
.an-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: none; color: var(--text-2); font: inherit; font-size: .85rem; cursor: pointer; }
.an-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.an-chip:hover { border-color: var(--line-hi); }
.an-chip.on { background: var(--surface-hi); color: var(--text); border-color: var(--line-hi); }
.an-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.an-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); color: var(--text); min-width: 0; transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.an-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--shadow); }
.an-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.an-top .grow { min-width: 0; }
.aico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent); }
.aico .i { width: 20px; height: 20px; color: var(--c, var(--text-2)); }
.aico.lg { width: 56px; height: 56px; border-radius: 15px; } .aico.lg .i { width: 26px; height: 26px; }
.an-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-sub { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-kv { display: flex; flex-wrap: wrap; gap: 6px; }
.kv { font-size: .78rem; padding: 3px 8px; border-radius: 7px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-2); }
.kv b { color: var(--text); font-weight: 600; }
.an-st { display: flex; flex-wrap: wrap; gap: 6px; }
.an-log { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .78rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-log .i { width: 14px; height: 14px; flex: none; }
.an-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .8rem; }
.an-stat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.an-stat .i { width: 14px; height: 14px; flex: none; }
.an-stat b { color: var(--text); font-weight: 600; }
.an-stat.zero b { color: var(--muted); }
.an-stats + .an-log { margin-top: 0; border-top: 0; padding-top: 0; }
.an-add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border-radius: var(--radius);
  border: 1px dashed var(--line-hi); color: var(--muted); }
.an-add:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 560px) { .an-grid { grid-template-columns: minmax(0, 1fr); } .an-add { min-height: 56px; } }

/* Anlage */
.an-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.an-head h1 { margin: 0; } .an-head p { margin: 0; }
.an-act { gap: 8px; align-items: center; }
.an-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.an-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.an-tabs a:hover { color: var(--text); }
.an-tabs a.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.an-tabs .i { width: 15px; height: 15px; }
.an-tabs em { font-style: normal; font-size: .75rem; padding: 1px 7px; border-radius: 999px; background: var(--surface-hi); color: var(--text-2); }
.an-sb { display: grid; gap: 1px; margin: 0; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); border: 1px solid var(--line); gap: 0; }
.an-sb > div { padding: 10px 14px; min-width: 0; box-shadow: inset -1px -1px 0 var(--line); }
.an-sb dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.an-sb dd { margin: 2px 0 0; font-weight: 550; overflow-wrap: anywhere; }
.an-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.an-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.an-notes { white-space: pre-wrap; }
.dpage-root { background: var(--surface); border: 1px solid var(--line); min-height: 48px; border-radius: 12px; }
.bk-dev { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bk-dev:last-of-type { border-bottom: 0; }
.upl-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-hi);
  color: var(--text-2); cursor: pointer; text-align: center; }
.upl-drop:hover { border-color: var(--accent); }

/* Logbuch als Zeitleiste mit Punkten */
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-ev { position: relative; padding: 0 0 12px 20px; font-size: .88rem; overflow-wrap: anywhere; --c: var(--muted); }
.tl-ev::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tl-ev:not(:last-child)::after { content: ""; position: absolute; left: 6.5px; top: 18px; bottom: 2px; width: 1px; background: var(--line); }
.tl-ev small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.tl-ev a { color: var(--text); } .tl-ev a:hover { color: var(--accent); }
.tl-ev.err { --c: var(--err); } .tl-ev.ok { --c: var(--ok); } .tl-ev.kom { --c: #3b82f6; } .tl-ev.mm { --c: #a855f7; }
.tl-ev .lock { width: 12px; height: 12px; vertical-align: -1px; }

/* Tresor */
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vrow:last-of-type { border-bottom: 0; }
.vrow .grow { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.vbtns { display: flex; gap: 6px; grid-column: 2; grid-row: 1 / span 2; }
.vdots { grid-column: 1; color: var(--text-2); letter-spacing: .08em; overflow-wrap: anywhere; font-size: .85rem; }
.vnote-txt { white-space: pre-wrap; color: var(--text-2); }
.vnote { display: flex; align-items: center; gap: 6px; } .vnote .i { width: 14px; height: 14px; }

/* Externe Firmen */
.partner { padding: 6px 0; border-bottom: 1px solid var(--line); } .partner:last-child { border-bottom: 0; }
.prow { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }

/* Einstellungen › Anlagen-Typen */
.atypes { display: flex; flex-direction: column; gap: 4px; }
.frow { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 140px; align-items: center; }
@media (max-width: 699px) { .frow { grid-template-columns: 1fr 1fr; } .frow select { grid-column: 1 / -1; } }
.dsite-act { gap: 8px; }
.dsite-head > .grow { flex: 1 1 200px; min-width: 0; }
@media (max-width: 560px) {
  .dsite-head { gap: 12px; margin-bottom: 14px; }
  .dsite-img { width: 72px; border-radius: 10px; } .dsite-img .dtile-ini { font-size: 1rem; }
  .dsite-head h1 { font-size: 1.35rem; } .dsite-head > .grow { flex-basis: 0; }
  .dsite-act { width: 100%; } .dsite-act .btn { flex: 1; justify-content: center; }
  .an-head .aico.lg { width: 44px; height: 44px; } .an-head h1 { font-size: 1.35rem; }
  .an-act { width: 100%; } .an-act .btn { flex: 1; justify-content: center; }
}
@media (max-width: 560px) {
  .dsite-act .hide-s, .an-act .hide-s { display: inline; }
  .an-sb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-act { flex-wrap: wrap; } .an-head .st { flex-basis: 100%; justify-content: center; }
}

/* ---------- Einstellungen: Gruppen-Listen (0.9.1) ----------
   Statt gleicher Kacheln: je Gruppe eine Karte mit Zeilen, eigene Symbolfarbe je Gruppe, Pfeil rechts. */
.set-groups { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .set-groups { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); } }
.grp-firma { --c: #3b82f6; } .grp-betrieb { --c: #10b981; } .grp-doku { --c: #a855f7; }
.set-gtitle { margin: 0 0 8px 4px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; color: inherit;
           text-decoration: none; transition: background .15s; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row:hover { background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.set-row:active { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.set-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px;
           background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.set-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.set-go { flex: none; color: var(--muted); opacity: .6; transition: transform .15s, opacity .15s; }
.set-row:hover .set-go { transform: translateX(2px); opacity: 1; }

/* ---------- Module + NetBox (0.10.0) ---------- */
.err-t { color: var(--err, #ef4444); }
.nb-cols { display: grid; gap: 14px; margin: 10px 0 14px; align-items: start; }
@media (min-width: 900px) { .nb-cols { grid-template-columns: 3fr 2fr; } }
.kvl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kvl dt { color: var(--muted); } .kvl dd { margin: 0; }
.nb-map { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (min-width: 1500px) { .nb-map { grid-template-columns: 1fr 1fr; } }
.nb-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.nb-row .grow { display: grid; min-width: 0; flex: 1; }
.nb-row select { max-width: 55%; }
.nb-id { width: 110px; }
.nw-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; --c: #3b82f6; }
.nw-link .grow { display: grid; }
.nw-link:hover { background: color-mix(in srgb, var(--c) 6%, var(--surface)); }
.nw-head { margin: 4px 0 12px; align-items: flex-end; }
.nw-head h1 { margin: 0; }
.nw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.nw-stat { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.nw-stat b { font-size: 1.4rem; }
.nw-cols { display: grid; gap: 14px; margin-top: 14px; align-items: start; }
@media (min-width: 1000px) { .nw-cols { grid-template-columns: 1fr 1fr; } }
.nt-wrap { overflow-x: auto; margin: 0 -4px; }
.nt { width: 100%; border-collapse: collapse; font-size: .9rem; }
.nt th { text-align: left; font-weight: 500; font-size: .75rem; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.nt td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nt tr:last-child td { border-bottom: 0; }
.nt tbody tr:hover td { background: var(--surface-hi); }
.nt a { color: inherit; }
.nw-role { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nw-role i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
@media (max-width: 700px) { .nt .hide-s { display: none; } }
@media (max-width: 700px) {
  .nw-stats { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .nw-stat { padding: 8px 6px; text-align: center; }
  .nw-stat b { font-size: 1.1rem; }
  .nw-stat span { font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Modul-Browser wie ein App-Store (0.11.0) ---------- */
.ms-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.ms-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.ms-head p { margin: 0; max-width: 60ch; }
.ms-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-cat { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
          color: var(--text-2); text-decoration: none; font-size: .9rem; }
.ms-cat.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ms-ico { width: 64px; height: 64px; border-radius: 15px; flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.ms-ico.xl { width: 88px; height: 88px; border-radius: 20px; }
.ms-ico.xxl { width: 112px; height: 112px; border-radius: 26px; }
.ms-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 18px; border-radius: 18px; color: inherit; text-decoration: none;
           border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, #1e3a8a 30%, var(--surface)), color-mix(in srgb, #06b6a4 18%, var(--surface))); }
.ms-hero-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ms-hero-txt small { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--muted); }
.ms-hero-txt b { font-size: 1.5rem; }
.ms-hero:hover { border-color: var(--line-hi); }
.ms-grid { display: grid; gap: 14px; }
.ms-sec + .ms-sec { margin-top: 28px; }
.ms-sec-h { margin: 0 0 12px; font-size: 1rem; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.ms-sec-h .muted { font-weight: 400; font-size: .9rem; }
.ms-leer { margin: 0; padding: 14px 0; }
@media (min-width: 640px) { .ms-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.ms-app { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 12px 14px; padding: 16px; border-radius: 16px;
          background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.ms-app:hover { transform: translateY(-2px); border-color: var(--line-hi); }
.ms-app.soon .ms-ico { filter: saturate(.55); opacity: .85; }
.ms-txt { display: grid; gap: 1px; align-content: start; min-width: 0; }
.ms-txt b { font-size: 1.05rem; }
.ms-tag { font-size: .88rem; color: var(--text-2); margin-top: 4px; }
.ms-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ms-btn { min-height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: .85rem;
          background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.ms-app.soon .ms-btn { background: var(--surface-hi); color: var(--muted); }
.ms-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.ms-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ms-pill.st-an { color: var(--ok); } .ms-pill.st-eingerichtet { color: var(--warn); }
@media (max-width: 640px) { .ms-hero { flex-wrap: wrap; padding: 16px; } .ms-hero .ms-ico.xl { width: 64px; height: 64px; } .ms-get { width: 100%; justify-content: center; } }

.md-hero { display: flex; gap: 24px; align-items: center; margin: 4px 0 18px; }
.md-title h1 { margin: 0; font-size: 2rem; }
.md-title p { margin: 2px 0; }
.md-act { margin-top: 10px; gap: 10px; align-items: center; }
@media (max-width: 640px) { .md-hero { gap: 16px; align-items: flex-start; } .md-hero .ms-ico.xxl { width: 76px; height: 76px; border-radius: 18px; } .md-title h1 { font-size: 1.5rem; } }
.md-tabs { margin-bottom: 14px; }
.md-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.md-cols > *, .wz-steps > li { min-width: 0; }   /* lange Befehle (.cmd) dürfen die Spalte nicht aufdrücken */
@media (min-width: 960px) { .md-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.md-feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md-feat li { display: flex; gap: 10px; align-items: center; }
.md-feat .i { color: var(--ok); flex: none; }

.wz-ways { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 900px) { .wz-ways { grid-template-columns: repeat(3, 1fr); } }
.wz-way { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
          background: var(--surface); color: inherit; text-decoration: none; --c: var(--accent); }
.wz-way > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.wz-way.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.wz-steps { margin: 0; padding: 0; list-style: none; counter-reset: wz; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wz-steps > li { counter-increment: wz; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 42px; position: relative; }
.wz-steps > li::before { content: counter(wz); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 8px;
                         display: grid; place-items: center; font-weight: 700; font-size: .85rem;
                         background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.wz-steps p { margin: 0; }
.wz-done { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.wz-done .i { color: var(--ok); flex: none; margin-top: 2px; }
.wz-done p { margin: 2px 0 0; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin-top: 4px; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: "JetBrains Mono", monospace; font-size: .82rem; }
.dl-row { display: flex; gap: 12px; align-items: flex-start; }
.dl-row .grow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; flex: 1; }
.pw-reveal { display: inline-block; }
.pw-reveal summary { cursor: pointer; color: var(--accent); display: inline; }
.pw-reveal[open] summary { display: none; }
.cmd code { background: none; padding: 0; border: 0; }
@media (max-width: 640px) { .ms-hero { display: none; } }   /* auf dem Handy steht NetBox ohnehin oben in der Liste */

/* Hochladen mit Fortschritt (upload.js): schwebendes Fenster unten rechts, man kann weiterarbeiten */
.upl-pop { position: fixed; z-index: 130; right: 12px; left: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.upl-pop:empty { display: none; }
.upl-item { pointer-events: auto; background: var(--surface-hi); border: 1px solid var(--line-hi); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 12px 12px; animation: enter .2s var(--ease); }
.upl-head { display: flex; align-items: center; gap: 8px; }
.upl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.upl-x { flex: none; width: var(--tap); height: 32px; margin: -6px -8px -6px 0; border: 0; background: none; color: var(--muted);
  border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.upl-x:hover { background: var(--line); color: var(--text); }
.upl-x .i { width: 16px; height: 16px; }
.upl-bar { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--line-hi); overflow: hidden; }
.upl-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .25s linear; }
.upl-info { margin-top: 6px; font-size: .82rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.upl-item.ok .upl-bar i { background: var(--ok); }
.upl-item.bad { background: color-mix(in srgb, var(--err) 14%, var(--surface-hi)); }
.upl-item.bad .upl-bar i { background: var(--err); }
.upl-item.bad .upl-info { color: var(--text); }
@media (min-width: 900px) { .upl-pop { left: auto; width: 340px; right: 24px; bottom: 24px; } }
@media print { .upl-pop { display: none; } }

/* Kürzel als Marke (Suche, Standortlisten) */
.code-chip { flex: none; min-width: 44px; padding: 4px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  font: 700 .8rem "JetBrains Mono", monospace; text-align: center; letter-spacing: .02em; }

/* NetBox › Standorte: „Zu erledigen“ (neu, abweichend, verschwunden) */
.nb-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px;
  background: var(--warn); color: #241a00; font: 700 .72rem "Inter Tight", sans-serif; }
.nb-review h3 { margin: 6px 0 0; font-size: 1rem; }
.nb-review .nb-map { grid-template-columns: minmax(0, 1fr); }
.nb-new { display: grid; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.nb-new:last-child, .nb-review .nb-row:last-child { border-bottom: 0; }
.nb-new-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nb-new-head .grow { display: grid; min-width: 0; }
.nb-act { gap: 8px; }
.nb-act select { flex: 1 1 140px; min-width: 0; }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--text); background: var(--line); }
.nb-acts { display: grid; gap: 8px; min-width: 0; }
@media (min-width: 1100px) { .nb-new { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); align-items: center; gap: 16px; }
  .nb-acts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Einstellungen › Blätter: Regler links, A4-Vorschau rechts (am Handy untereinander, Vorschau oben) */
.be { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.be-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.be-view { min-width: 0; order: -1; }
@media (min-width: 1100px) {
  .be { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); align-items: start; }
  .be-view { order: 0; position: sticky; top: calc(var(--top-h) + 12px); }
}
.be-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.be-tabs button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font: 600 .9rem "Inter Tight", sans-serif; cursor: pointer; }
.be-tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.be-hint { margin-left: auto; }
.be-frame { position: relative; overflow: hidden; }
.be-frame iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; background: #fff; }
.be-logo { display: flex; align-items: center; gap: 12px; }
.be-logo-img { display: grid; place-items: center; min-width: 120px; height: 64px; padding: 8px 12px; border-radius: 10px; background: #fff; }
.be-logo-img img { max-height: 48px; max-width: 160px; }
.be-logo-img b { color: #111827; }
.be-seg { display: flex; gap: 6px; border: 0; padding: 0; margin: 0; }
.be-seg legend { padding: 0; margin-bottom: 6px; font-size: .9rem; color: var(--text-2); }
.be-seg label { flex: 1; position: relative; }
.be-seg input { position: absolute; opacity: 0; pointer-events: none; }
.be-seg span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.be-seg input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.be-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.be label output { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.be input[type="range"] { width: 100%; accent-color: var(--accent); }
.be-save { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); padding: 10px; border-radius: var(--radius);
  background: var(--surface-hi); border: 1px solid var(--line-hi); box-shadow: var(--shadow); z-index: 3; }
@media (min-width: 900px) { .be-save { bottom: 12px; } }

/* A4-Blatt auf grauer Unterlage (Blatt-Editor, Vorlagen): das Papier hat immer das Seitenverhältnis 210 × 297 mm und
   wird nur verkleinert, nie breiter als A4 – so sieht man am Bildschirm, wie die Seite gedruckt aussieht (0.21.0) */
.a4-desk { display: grid; justify-items: center; padding: 18px; border-radius: var(--radius); background: var(--bg-2);
  border: 1px solid var(--line); min-width: 0; }
.a4-paper { width: 794px; max-width: 100%; background: #fff; color: #111827; box-shadow: 0 4px 24px rgba(0,0,0,.28); border-radius: 2px; }
@media (max-width: 720px) { .a4-desk { padding: 8px; } }
/* Vorlagen-Editor auf A4: Papier hell wie im PDF, Ränder wie @page in blatt/seite.html (15 mm ≈ 7,5 % der Breite),
   feine Linie an jedem Seitenende (Seitenhöhe = Breite × 297/210) */
.ed-desk { border: 0; border-radius: 0 0 var(--radius) var(--radius); container-type: inline-size; }
.ed-paper { --pw: min(794px, 100cqw); --ph: calc(var(--pw) * 297 / 210); width: var(--pw); min-height: var(--ph);
  padding: calc(var(--pw) * .066) calc(var(--pw) * .075); color-scheme: light;
  --text: #111827; --text-2: #374151; --muted: #6b7280; --line: #dde2ea; --line-hi: #c9d0db; --surface-hi: #f3f5f8;
  --accent: var(--b); --bg: #f3f4f6;
  background: linear-gradient(to bottom, transparent calc(var(--ph) - 1px), #c3cad5 calc(var(--ph) - 1px), #c3cad5 var(--ph), transparent var(--ph))
              0 0 / 100% var(--ph) repeat-y, #fff; }
.ed-sheethead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 8px;
  margin-bottom: 14px; border-bottom: 2px solid var(--b); }
.ed-sheetlogo img { max-height: 44px; max-width: 200px; display: block; }
.ed-sheetlogo b { color: var(--b); font-size: 1.1rem; }
.ed-paper .ed-area { min-height: 0; padding: 0; color: #111827; }
.ed-paper .ddoc th { background: #f3f5f8; }
@media (max-width: 720px) { .ed-paper { padding: 16px 14px; } }

/* ===== Einstellungen: Liste links neben der Seitenleiste, Inhalt rechts (0.14.0) ===== */
.setnav { display: none; }
.setnav-head { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-weight: 700; font-size: 1.05rem; }
.setnav-head .i { color: var(--accent); }
.setnav-g + .setnav-g { margin-top: 14px; }
.setnav-label { padding: 0 10px 6px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }
.setnav a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--text-2); }
.setnav a + a { margin-top: 2px; }
.setnav a:hover { background: var(--surface); color: var(--text); }
.setnav a.on { background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); color: var(--text); }
.setnav .set-ico { width: 34px; height: 34px; border-radius: 10px; }
.setnav .set-ico .i { width: 18px; height: 18px; }
.setnav-t { display: grid; min-width: 0; flex: 1; }
.setnav-t b { font-weight: 600; font-size: .93rem; }
.setnav-t small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setnav-go { width: 16px; height: 16px; color: var(--muted); opacity: 0; }
.setnav a.on .setnav-go { opacity: 1; color: var(--c, var(--accent)); }
.set-welcome { display: none; }
/* Handy: Übersicht = Liste; Unterseiten nur Inhalt mit Pfad */
@media (max-width: 899px) {
  .set-index .setnav { display: block; }
  .set-index .setnav a { min-height: 60px; background: var(--surface); border: 1px solid var(--line); }
  .set-index .setnav a + a { margin-top: 8px; }
  .set-index .setnav .setnav-go { opacity: .7; }
}
@media (min-width: 900px) {
  :root { --setnav-w: 284px; }
  .setnav { display: block; position: fixed; z-index: 4; top: var(--top-h); bottom: 0; left: var(--side-w); width: var(--setnav-w);
    padding: 18px 12px; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line);
    transition: left .2s var(--ease); }
  .has-nav.set-page .main { margin-left: calc(var(--side-w) + var(--setnav-w)); }
  .set-welcome { display: block; }
  .set-welcome h1 { margin: 8px 0 4px; }
  .set-tiles { display: grid; gap: 14px; margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .set-tile { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .15s var(--ease), border-color .15s; }
  .set-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
  .set-tile .set-ico { margin-bottom: 6px; }
  .set-tile-g { position: absolute; top: 16px; right: 16px; color: var(--muted); font: 500 .66rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
}
@keyframes setnav-in { from { transform: translateX(-100%); } }
@keyframes setnav-item { from { opacity: 0; transform: translateX(-12px); } }
/* Weiche Bewegung: Liste gleitet unter der Seitenleiste hervor, Einträge folgen leicht versetzt.
   Wichtig: .main darf auf Einstellungsseiten KEINE transform-Animation haben – sonst hängt die fixierte Liste
   während der Animation am Inhalt statt am Fenster und springt (Firefox, 0.14.3). Darum animiert nur .set-main. */
.set-page .main { animation: none; }
.set-page .set-main { animation: enter .3s var(--ease) both; }
@media (min-width: 900px) {
  .sidenav { z-index: 5; background: var(--bg); }
  .set-enter .setnav { animation: setnav-in .42s cubic-bezier(.22, 1, .36, 1) both; }
  .set-enter .setnav a { animation: setnav-item .4s cubic-bezier(.22, 1, .36, 1) both; }
  .set-enter .setnav-g:nth-child(2) a:nth-of-type(1) { animation-delay: .08s; }
  .set-enter .setnav-g:nth-child(2) a:nth-of-type(2) { animation-delay: .11s; }
  .set-enter .setnav-g:nth-child(2) a:nth-of-type(3) { animation-delay: .14s; }
  .set-enter .setnav-g:nth-child(2) a:nth-of-type(4) { animation-delay: .17s; }
  .set-enter .setnav-g:nth-child(3) a:nth-of-type(1) { animation-delay: .20s; }
  .set-enter .setnav-g:nth-child(3) a:nth-of-type(2) { animation-delay: .23s; }
  .set-enter .setnav-g:nth-child(3) a:nth-of-type(3) { animation-delay: .26s; }
  .set-enter .setnav-g:nth-child(3) a:nth-of-type(4) { animation-delay: .29s; }
  /* Hover: Eintrag beult sanft nach rechts aus */
  .setnav a { transition: background .15s, color .15s, transform .22s var(--ease); }
  .setnav a:hover { transform: translateX(5px); }
  .setnav a.on:hover { transform: translateX(2px); }
  .has-nav:not(.nav-small) .sidenav a:hover, .has-nav:not(.nav-small) .sidenav-toggle:hover { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .set-enter .setnav, .set-enter .setnav a, .set-page .set-main { animation: none; }
  .setnav a:hover, .sidenav a:hover { transform: none !important; }
}
.set-head { margin-top: 0; }
.set-main > form, .set-main > section { max-width: 1400px; }

/* Pfad oben (überall): ruhige Leiste mit Stufen, aktuelle Seite fett */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 12px; font-size: .86rem; color: var(--text); font-weight: 600; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.crumbs a:first-child { margin-left: -8px; }
.crumbs a:hover { background: var(--surface); color: var(--text); }
.crumbs .i { width: 15px; height: 15px; }
.crumbs .sep, .crumbs > .i { width: 14px; height: 14px; color: var(--muted); opacity: .55; }
.crumbs .cur { padding: 4px 8px; color: var(--text); font-weight: 650; }

/* Zahnrad unten in der Seitenleiste, mit Trennlinie – eingeklappt wie alle anderen Symbole */
@media (min-width: 900px) {
  .sidenav-set { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); margin-bottom: 6px; }
  .sidenav-set + .sidenav-toggle { margin-top: 0; }
  .nav-small .sidenav-set { margin-left: 4px; margin-right: 4px; }
}

/* Einstellungsseiten: gemeinsames Raster (2 Spalten ab 1200 px) */
.set-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1200px) { .set-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .set-grid > .br-wide, .set-grid > .span-all { grid-column: 1 / -1; } }
.set-grid h2, .set-card h2 { margin: 0; font-size: 1.05rem; }
.lbl { font-size: .88rem; font-weight: 550; color: var(--text-2); }

/* Branding */
.br-color { display: grid; gap: 8px; }
.br-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.br-dot { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--d); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px transparent; transition: box-shadow .15s, transform .15s; }
.br-dot:hover { transform: scale(1.1); }
.br-dot.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.br-own { display: inline-flex; flex-direction: row; position: relative; }
.br-own::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.br-logo { display: flex; gap: 16px; align-items: center; }
.br-logo-prev { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 20px; background: var(--bg-2); border: 1px dashed var(--line-hi); overflow: hidden; }
.br-logo-prev img { max-width: 72px; max-height: 72px; }
.br-fields { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .br-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .br-fields .span2 { grid-column: 1 / -1; } }
.br-prev { --pa: var(--accent); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); font-size: .82rem; }
.br-prev-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.br-prev-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--pa); color: #fff; font-weight: 700; overflow: hidden; }
.br-prev-mark img { max-width: 26px; max-height: 26px; }
.br-prev-btn { margin-left: auto; padding: 5px 10px; border-radius: 8px; background: var(--pa); color: #fff; font-weight: 600; font-size: .75rem; }
.br-prev-btn.wide { margin: 8px 0 0; text-align: center; }
.br-prev-body { display: grid; grid-template-columns: 110px 1fr; grid-template-rows: repeat(3, auto) 1fr; gap: 4px; padding: 10px; min-height: 170px; }
.br-prev-nav { grid-column: 1; padding: 6px 8px; border-radius: 8px; color: var(--text-2); }
.br-prev-nav.on { background: color-mix(in srgb, var(--pa) 18%, transparent); color: var(--text); }
.br-prev-login { grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: center; display: grid; gap: 2px; width: min(200px, 100%);
  padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.br-prev-login small { color: var(--muted); }

/* Benutzer: Kacheln */
.avatar.lg { width: 48px; height: 48px; font-size: .95rem; flex: none; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.3rem; flex: none; }
.us-bar { display: grid; gap: 10px; margin-bottom: 16px; }
@media (min-width: 1100px) { .us-bar { grid-template-columns: minmax(280px, 420px) 1fr; align-items: center; } .us-bar .searchbar { margin: 0; } }
.us-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.us-roles a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-2); font-size: .88rem; font-weight: 550; }
.us-roles a small { color: var(--muted); font-weight: 500; }
.us-roles a:hover { border-color: var(--line-hi); color: var(--text); }
.us-roles a.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.us-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.us-tile { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); transition: transform .15s var(--ease), border-color .15s, background .15s; }
.us-tile:hover { transform: translateY(-2px); border-color: var(--line-hi); background: var(--surface-hi); }
.us-tile.off { opacity: .6; }
.us-top { display: flex; align-items: center; gap: 12px; position: relative; }
.us-name { display: grid; min-width: 0; }
.us-name b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.us-role { color: var(--muted); font-size: .85rem; }
.us-online { position: absolute; left: 36px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); }
.us-info { display: grid; gap: 4px; font-size: .86rem; color: var(--text-2); }
.us-info span { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.us-info .i { width: 15px; height: 15px; color: var(--muted); flex: none; }
.us-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.us-last { margin-left: auto; font-size: .78rem; }

/* Benutzer bearbeiten */
.us-glance { display: grid; gap: 14px; justify-items: start; }
.us-glance > div { display: grid; }
.us-g-name { font-size: 1.2rem; }
.sw-row { align-items: flex-start; gap: 12px; }
.sw-row > span { display: grid; gap: 2px; }
.w-s { max-width: 260px; }
.perm-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.perm-box { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.perm-box legend { padding: 0 6px; font-weight: 650; font-size: .9rem; }
/* + / − als Umschalter statt Häkchen */
.pill { position: relative; min-width: 34px; height: 30px; justify-content: center; padding: 0 10px; border-color: var(--line); color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.pill.ok:has(input:checked) { background: color-mix(in srgb, var(--ok) 20%, transparent); border-color: transparent; color: var(--ok); }
.pill.no:has(input:checked) { background: color-mix(in srgb, var(--err) 20%, transparent); border-color: transparent; color: var(--err); }
.pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.sticky-actions { display: flex; gap: 8px; padding: 10px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface-hi) 92%, transparent);
  border: 1px solid var(--line-hi); box-shadow: var(--shadow); backdrop-filter: blur(8px); justify-self: end; width: fit-content; margin-left: auto; padding: 6px; border-radius: 16px; }
@media (min-width: 900px) { .sticky-actions { bottom: 14px; } }
.us-open { font-family: inherit; letter-spacing: 0; }

/* Rollen */
.set-lead { margin: -4px 0 16px; max-width: 70ch; }
.ro-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ro-tile { display: grid; gap: 14px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: transform .15s, border-color .15s, background .15s; }
.ro-tile:hover { transform: translateY(-2px); border-color: var(--line-hi); background: var(--surface-hi); }
.ro-top { display: flex; align-items: center; gap: 12px; }
.ro-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: hsl(var(--h) 70% 55% / .16); color: hsl(var(--h) 75% 65%); }
html[data-theme="light"] .ro-ic { color: hsl(var(--h) 60% 40%); }
.ro-ic .i { width: 20px; height: 20px; }
.ro-name { display: grid; min-width: 0; }
.ro-name b { font-size: 1.05rem; }
.ro-name small { font-size: .82rem; }
.ro-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.ro-bar { display: grid; gap: 4px; position: relative; height: auto; }
.ro-bar::before { content: ""; grid-area: 1 / 1; height: 5px; border-radius: 3px; background: var(--line); }
.ro-bar i { grid-area: 1 / 1; height: 5px; border-radius: 3px; background: var(--accent); }
.ro-bar small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-faces { display: flex; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); min-height: 47px; }
.ro-faces .avatar { margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); font-size: .7rem; }
.ro-tile:hover .ro-faces .avatar { box-shadow: 0 0 0 2px var(--surface-hi); }
.ro-faces .more { background: var(--surface-hi); color: var(--muted); }
.ro-head { display: grid; grid-template-columns: minmax(0, 420px) auto; align-items: end; gap: 14px; justify-content: space-between; }
.ro-stat { display: grid; justify-items: end; }
.ro-stat b { font-size: 1.6rem; line-height: 1; }
.ro-group { display: grid; gap: 2px; align-content: start; position: relative; }
.ro-gh { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.ro-gh b { font-size: .95rem; }
.ro-gh small { font-size: .78rem; font-variant-numeric: tabular-nums; }
.ro-all { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-left: auto; font-size: .8rem; font-weight: 500; color: var(--muted); cursor: pointer; }
.ro-all input.sw { width: 32px; height: 20px; }
.ro-all input.sw::after { width: 14px; height: 14px; }
.ro-all input.sw:checked::after { transform: translateX(12px); }
.ro-all input.sw:indeterminate { background: color-mix(in srgb, var(--accent) 45%, var(--line-hi)); }
.ro-perm { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 0;
  border-bottom: 1px solid var(--line); font-weight: 500; font-size: .92rem; cursor: pointer; }
.ro-perm:last-child { border-bottom: 0; }
.ro-perm .sw { flex: none; }

/* Tickets-Einstellungen: Status als Zeilen mit Farbkreis */
.ts-status { display: grid; gap: 0; }
.ts-head { display: grid; gap: 4px; margin-bottom: 10px; }
.ts-head h2 { margin: 0; font-size: 1.05rem; }
.ts-head p { margin: 0; max-width: 80ch; }
.ts-cols { display: none; }
.ts-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "c n a" "k k k" "s s s"; gap: 8px 12px;
  align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ts-row.off .ts-name input, .ts-row.off input[type=color] { opacity: .5; }
.ts-row > input[type=color] { grid-area: c; }
.ts-name { grid-area: n; display: grid; gap: 2px; min-width: 0; }
.ts-name small { font-size: .75rem; padding-left: 2px; }
.ts-row select { grid-area: k; }
.ts-pos { display: none; }
.ts-sw { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-2); font-weight: 500; cursor: pointer; }
.ts-row .ts-sw:nth-of-type(1) { grid-area: s; }
.ts-row .ts-sw + .ts-sw { grid-area: s; justify-self: end; }
.ts-acts { grid-area: a; display: flex; gap: 4px; justify-content: flex-end; }
.ts-acts .btn > span { display: none; }
.btn.icon { padding: 0; width: 36px; justify-content: center; }
.btn.ghost { border-color: transparent; background: none; }
.ts-new { grid-template-areas: "c n a" "k k k"; }
@media (min-width: 1000px) {
  .ts-cols { display: grid; grid-template-columns: 30px minmax(160px, 280px) 170px 64px 70px 84px 1fr; gap: 12px; padding: 0 0 6px;
    font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .ts-row, .ts-row.ts-new { grid-template-columns: 30px minmax(160px, 280px) 170px 64px 70px 84px 1fr; grid-template-areas: ". . . . . . ."; }
  .ts-row > input[type=color] { grid-area: 1 / 1; }
  .ts-row .ts-name { grid-area: 1 / 2; }
  .ts-row select { grid-area: 1 / 3; }
  .ts-row .ts-pos { grid-area: 1 / 4; }
  .ts-row .ts-sw:nth-of-type(1) { grid-area: 1 / 5; justify-self: start; }
  .ts-row .ts-sw + .ts-sw { grid-area: 1 / 6; justify-self: start; }
  .ts-row .ts-acts { grid-area: 1 / 7; }
  .ts-name small { display: none; }
  .ts-pos { display: block; width: 64px; text-align: center; }
  .ts-sw > span { display: none; }
  .ts-acts { justify-self: end !important; }
  .ts-acts .btn > span { display: inline; }
}
.ts-seg label span { padding: 0 12px; }
.ts-num { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) 90px; }
.ts-num label:first-child { grid-column: 1 / -1; }
@media (min-width: 600px) { .ts-num { grid-template-columns: minmax(0, 1fr) 90px 170px; } .ts-num label:first-child { grid-column: auto; } }
.ts-next { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); }
.ts-next b { font-size: 1.15rem; color: var(--accent); }

/* Arbeitszeit: Woche + Pausen links, Urlaub/Kalender rechts, AZG unten */
.wt-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1200px) {
  .wt-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .wt-azg, .wt-grid > .sticky-actions { grid-column: 1 / -1; }
}
.wt-side { display: grid; gap: 16px; }
.wt-grid h2 { margin: 0; font-size: 1.05rem; }
.wt-grid h3 { margin: 0; font-size: .95rem; }
.wt-gh { display: flex; align-items: flex-start; gap: 12px; }
.wt-gh > div:not(.wt-sum) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.wt-gh p { margin: 0; }
.wt-ic { --h: 215; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: hsl(var(--h) 70% 55% / .15); color: hsl(var(--h) 75% 65%); }
html[data-theme="light"] .wt-ic { color: hsl(var(--h) 60% 40%); }
.wt-ic .i { width: 19px; height: 19px; }
.wt-sum { display: grid; justify-items: end; flex: none; }
.wt-sum b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wt-sum small { font-size: .75rem; }
.wt-days { gap: 4px; }
.wt-day { grid-template-columns: 30px minmax(0, 120px) 10px minmax(0, 120px) 1fr 36px; justify-content: stretch; padding: 4px 8px 4px 10px;
  border-radius: 12px; background: var(--bg-2); }
.wt-day.off { background: none; outline: 1px dashed var(--line); outline-offset: -1px; }
.wt-day.off [data-wt-clear] { visibility: hidden; }
.wt-h { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wt-day input, .wt-pause input { padding-left: 8px; padding-right: 6px; }
.wt-day input::-webkit-calendar-picker-indicator, .wt-pause input::-webkit-calendar-picker-indicator { margin-left: 0; opacity: .6; }
@media (max-width: 600px) {
  .wt-day { grid-template-columns: 24px minmax(0, 1fr) 8px minmax(0, 1fr) 48px 30px; gap: 6px; padding: 4px 4px 4px 8px; }
  .wt-day input::-webkit-calendar-picker-indicator, .wt-pause input::-webkit-calendar-picker-indicator { display: none; }
  .wt-day [data-wt-clear] { width: 30px; }
  .wt-pause input { width: 96px; }
}
.wt-sub { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.wt-sub p { margin: 0; }
.wt-pauses { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-pause { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 12px; background: var(--bg-2); }
.wt-pause.new { background: none; outline: 1px dashed var(--line-hi); outline-offset: -1px; }
.wt-pause label { margin: 0; }
.wt-pause input { width: 112px; text-align: center; }
.wt-pause small { padding-right: 4px; }
.wt-unit { display: flex; align-items: center; border: 1px solid var(--line-hi); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.wt-unit input { border: 0; background: none; min-width: 0; flex: 1; font-variant-numeric: tabular-nums; }
.wt-unit input:focus { outline: none; box-shadow: none; }
.wt-unit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wt-unit small { padding: 0 12px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.wt-range { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 10px; }
.wt-limits { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.wt-hol summary { cursor: pointer; color: var(--accent); }
.wt-hol ul { columns: 2; margin: 8px 0 0; padding-left: 0; list-style: none; }
.wt-hol li { padding: 2px 0; }
.wt-hol .mono { color: var(--muted); margin-right: 6px; }

/* Gewerke (Tickets + Doku in einem) */
.gw-sum { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.gw-sum span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; color: var(--text-2); }
.gw-sum b { color: var(--text); }
.gw-group { margin-bottom: 22px; }
.gw-gh { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.gw-gh .i { width: 15px; height: 15px; }
.gw-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.gw-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none; min-height: 64px; transition: transform .15s, border-color .15s, background .15s; }
.gw-tile:hover { transform: translateY(-1px); border-color: var(--line-hi); background: var(--surface-hi); }
.gw-tile.off { opacity: .55; }
.gw-dot { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.gw-dot .i { width: 18px; height: 18px; }
.gw-dot:empty::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.gw-main { display: grid; min-width: 0; flex: 1; }
.gw-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-main small { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-tile[draggable] { cursor: grab; }
.gw-tile.dragging { opacity: .4; }
.gw-tile.drop-before { outline: 2px dashed var(--accent); outline-offset: 2px; }
.gw-use { display: flex; gap: 4px; flex: none; }
.gw-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  color: var(--muted); background: none; border: 1px dashed var(--line-hi); font-variant-numeric: tabular-nums; }
.gw-chip.on { color: var(--text-2); background: var(--bg-2); border: 1px solid transparent; }
.gw-chip .i { width: 13px; height: 13px; }
.gw-color { display: flex; align-items: center; gap: 12px; }
.gw-color .lbl { font-weight: 600; font-size: .9rem; color: var(--text-2); }
.gw-doc { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .gw-doc { grid-template-columns: minmax(0, 1fr) 220px; } }
.gw-icons { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.gw-icons legend { padding: 0; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--text-2); }
.gw-icons label { position: relative; }
.gw-icons input { position: absolute; opacity: 0; pointer-events: none; }
.gw-icons span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); color: var(--text-2); cursor: pointer; }
.gw-icons span:hover { border-color: var(--line-hi); }
.gw-icons input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.gw-icons input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gw-frow, .gw-frow:first-child { grid-template-columns: minmax(0, 1fr) 120px 36px; border-top: 0; padding-top: 0; }
@media (min-width: 760px) { .gw-frow, .gw-frow:first-child { grid-template-columns: minmax(0, 1fr) 140px 36px; } }
.gw-form.no-doku [data-gw-dokubox] { opacity: .45; }

/* Hinweise („gespeichert“, Fehler): schweben unten rechts als kleine Pillen, gehen von selbst (0.14.4, Wunsch Flo) */
.notes { position: fixed; z-index: 130; right: 16px; left: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  display: grid; justify-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { .notes { left: auto; right: 24px; bottom: 24px; justify-items: end; } }
.note { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: min(440px, 100%); padding: 10px 16px 10px 12px;
  border-radius: 14px; background: color-mix(in srgb, var(--surface-hi) 88%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--line-hi); box-shadow: 0 10px 30px rgba(0,0,0,.35); color: var(--text); font-weight: 560; font-size: .92rem;
  cursor: pointer; animation: note-in .38s cubic-bezier(.22, 1, .36, 1) both; }
.note .i { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; stroke-width: 3; }
.note-ok .i { background: var(--ok); color: #06281a; }
.note-err .i { background: var(--err); color: #fff; }
.note.out { opacity: 0; transform: translateY(8px) scale(.97); transition: opacity .28s, transform .28s; }
@keyframes note-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.btn.busy { opacity: .7; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .note { animation: none; } }

/* ---------- Schnellsuche (STRG F, static/palette.js) ---------- */
kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; border: 1px solid var(--line-hi); border-bottom-width: 2px;
  border-radius: 6px; background: var(--surface-hi); color: var(--text-2); font: 500 .72rem/1.4 "JetBrains Mono", monospace; text-align: center; }
.topsearch .ts-lbl, .topsearch .ts-kbd { display: none; }
@media (min-width: 900px) {
  .iconbtn.topsearch { width: auto; gap: 8px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--bg-2); grid-auto-flow: column; color: var(--muted); }
  .topsearch .ts-lbl { display: inline; font-size: .9rem; min-width: 110px; text-align: left; }
  .topsearch .ts-kbd { display: inline-block; }
  .iconbtn.topsearch:hover { border-color: var(--line-hi); }
}
dialog.pal { width: min(720px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 96px)); margin: 10vh auto auto; padding: 0;
  border: 1px solid var(--line-hi); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  overflow: hidden; }
dialog.pal[open] { display: flex; flex-direction: column; animation: pal-in .18s var(--ease); }
dialog.pal::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); }
.pal-in > .i { flex: none; color: var(--muted); }
dialog.pal .pal-in input { flex: 1; padding: 0; box-shadow: none; min-width: 0; height: 52px; border: 0; background: none; color: var(--text); font-size: 1.1rem; outline: none; }
dialog.pal .pal-in input::-webkit-search-cancel-button { display: none; }
.pal-x { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.pal-x:hover { background: var(--surface-hi); color: var(--text); }
.pal.busy .pal-in > .i { animation: pal-pulse .8s ease-in-out infinite alternate; }
@keyframes pal-pulse { to { color: var(--accent); } }
/* Kopf, Bereiche und Fuß behalten ihre Höhe – sonst drückt eine lange Trefferliste die Bereiche zusammen (Firefox) */
.pal-in, .pal-tabs, .pal-foot { flex: none; }
.pal-tabs { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.pal-tabs::-webkit-scrollbar { display: none; }
.pal-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: var(--text-2); font: inherit; font-size: .88rem; cursor: pointer; transition: background .15s, color .15s; }
.pal-tabs button:hover { background: var(--surface-hi); color: var(--text); }
.pal-tabs button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pal-tabs b { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-hi); color: var(--muted); font-size: .72rem; font-weight: 600; line-height: 18px; }
.pal-tabs .on b { background: var(--accent); color: var(--on-accent); }
.pal-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.pal-list h3 { display: flex; align-items: center; justify-content: space-between; margin: 12px 10px 4px; color: var(--muted);
  font: 500 .72rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.pal-more { border: 0; background: none; color: var(--accent); font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 4px; }
.pal-it { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.pal-it.on { background: var(--surface-hi); }
.pal-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--bg-2); color: var(--text-2); }
.pal-it.on .pal-ic { background: var(--accent-soft); color: var(--accent); }
.pal-ic .i { width: 17px; height: 17px; }
.pal-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pal-tx b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-tx span { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-b { flex: none; padding: 2px 7px; border-radius: 7px; background: var(--bg-2); color: var(--text-2); font: 500 .75rem "JetBrains Mono", monospace; }
.pal-h { flex: none; display: flex; gap: 3px; }
.pal-empty { margin: 24px 14px; color: var(--muted); line-height: 1.7; }
.pal-empty code { padding: 1px 5px; border-radius: 5px; background: var(--bg-2); font-size: .82rem; }
.pal-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.pal-foot kbd { margin-right: 3px; }
@media (max-width: 699px) {
  dialog.pal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  dialog.pal[open] { animation: enter .2s var(--ease); }
  .pal-in { padding-top: env(safe-area-inset-top, 0px); }
  .pal-foot { display: none; }
  .pal-list { padding-bottom: calc(10px + var(--safe-b)); }
  .pal-h { display: none; }
}
@media (hover: none) { .pal-foot, .pal-h { display: none; } }
@media (prefers-reduced-motion: reduce) { dialog.pal[open] { animation: none; } }
/* Schnellsuche 0.36: Liste + Vorschau, markierte Suchwörter, „gefunden in“, letzte Suchen */
.pal-body { flex: 1 1 auto; min-height: 0; display: flex; }
.pal-body .pal-list { flex: 1 1 auto; }
.pal-pv { display: none; }
mark.pal-m { background: none; color: var(--accent); font-weight: 650; }
.pal-w { margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--bg-2); color: var(--text-2); font-style: normal; font-size: .74rem; }
.pal-fix { margin: 10px 10px 2px; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); color: var(--text-2); font-size: .85rem; }
.pal-fix b { color: var(--text); }
.pal-qs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 10px 2px; }
.pal-qs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--text-2); font: inherit; font-size: .85rem; cursor: pointer; }
.pal-qs button:hover { border-color: var(--line-hi); color: var(--text); }
.pal-qs .i { width: 14px; height: 14px; color: var(--muted); }
@media (min-width: 980px) and (hover: hover) {
  dialog.pal { width: min(1120px, calc(100vw - 64px)); height: min(660px, calc(100dvh - 96px)); max-height: none; margin-top: 8vh; }
  .pal-pv { display: flex; flex-direction: column; flex: none; width: 400px; overflow-y: auto; border-left: 1px solid var(--line); background: var(--bg-2);
    overscroll-behavior: contain; }
  .pal-pvc:empty { flex: 1; background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868b97' stroke-opacity='.35' stroke-width='1.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / 56px no-repeat; }
}
.pal-pv-bar { display: none; }
.pal-info { display: none; }
/* Schmal (Handy, kleines Fenster): Details auf Wunsch über der Liste (Knopf mit Auge oder →, zurück mit ← / Esc) */
@media (max-width: 979px), (hover: none) {
  .pal-info { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); margin: -6px -6px -6px 0;
    border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
  .pal-info:hover, .pal-it.on .pal-info { color: var(--text); }
  .pal-body { position: relative; }
  dialog.pal.detail .pal-pv { display: block; position: absolute; inset: 0; z-index: 2; overflow-y: auto; background: var(--surface);
    overscroll-behavior: contain; animation: pv-slide .18s var(--ease); }
  dialog.pal.detail .pal-pv-bar { display: block; position: sticky; top: 0; z-index: 1; padding: 6px 8px; border-bottom: 1px solid var(--line);
    background: var(--surface); }
  .pal-pv-bar button { display: inline-flex; align-items: center; gap: 6px; height: var(--tap); padding: 0 12px 0 6px; border: 0;
    border-radius: 999px; background: none; color: var(--text-2); font: inherit; cursor: pointer; }
  .pal-pv-bar button:hover { background: var(--surface-hi); color: var(--text); }
  .pal-pv .pv { padding-bottom: calc(20px + var(--safe-b, 0px)); }
}
@keyframes pv-slide { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { dialog.pal.detail .pal-pv { animation: none; } }
.pv { padding: 18px 20px 20px; animation: pv-in .14s var(--ease); }
@keyframes pv-in { from { opacity: 0; } }
.pv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 22px; }
.pv-no { padding: 2px 7px; border-radius: 7px; background: var(--surface-hi); color: var(--text-2); font-size: .78rem; }
.pv h3 { margin: 10px 0 12px; font-size: 1.15rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.pv h4 { margin: 16px 0 6px; color: var(--muted); font: 500 .7rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.pv dl { margin: 0; display: grid; gap: 6px; }
.pv-r { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; font-size: .88rem; }
.pv-r dt { color: var(--muted); }
.pv-r dd { margin: 0; overflow-wrap: anywhere; }
.pv-r dd a, .pv-list a { color: inherit; text-decoration: none; }
.pv-r dd a:hover { color: var(--accent); }
.pv .mono, .pv-r dd.mono { font-family: "JetBrains Mono", monospace; font-size: .82rem; }
.pv-people { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: .85rem; }
.pv-people span { display: inline-flex; align-items: center; gap: 6px; }
.pv-text { margin: 14px 0 0; color: var(--text-2); font-size: .88rem; line-height: 1.55; white-space: pre-line; }
.pv-long { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.pv-meta { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.pv-cmt { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); font-size: .84rem; line-height: 1.45; color: var(--text-2); }
.pv-cmt b { display: block; margin-bottom: 2px; color: var(--muted); font-weight: 500; font-size: .76rem; }
.pv-list { display: grid; gap: 2px; }
.pv-list a { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px; border-radius: 8px; font-size: .86rem; }
.pv-list a:hover { background: var(--surface-hi); }
.pv-list a > span:not(.mono):not(.urg) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-list .muted { margin-left: auto; font-size: .78rem; }
.pv-list .mono { flex: none; color: var(--muted); }
.pv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pv-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-hi); border-radius: 999px; color: var(--text);
  text-decoration: none; font-size: .86rem; }
.pv-btn:hover { border-color: var(--text-2); }
.pv-btn.pri { border-color: transparent; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pv-img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.pv-face { margin-bottom: 4px; }

/* Übersicht der Tastenkürzel */
dialog.hk { width: min(980px, calc(100vw - 48px)); }
.hk-head { display: flex; align-items: center; justify-content: space-between; }
.hk-head h2 { margin: 0; }
.hk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.hk h3 { margin: 10px 0 6px; color: var(--muted); font: 500 .72rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.hk table { width: 100%; border-collapse: collapse; }
.hk td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
.hk td:first-child { width: 44%; padding-right: 14px; }
.hk-k { display: inline-block; margin: 0 6px 4px 0; white-space: nowrap; }
.hk-cols { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
/* J/K-Auswahl und Z (Zeit buchen) – Ring statt Seitenstreifen */
.kfocus, .main :is(.tcard, .tlist-row, .list > li > a, .dpage):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.z-go { outline: 2px solid var(--accent); outline-offset: 2px; animation: z-go .42s var(--ease) both; }
@keyframes z-go { 40% { transform: scale(1.025); box-shadow: 0 0 0 8px var(--accent-soft); } 100% { transform: scale(.99); } }
.z-pill { position: fixed; z-index: 90; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow);
  pointer-events: none; animation: z-pill .42s var(--ease) both; }
.z-pill .i { width: 17px; height: 17px; animation: z-spin .42s linear; }
@keyframes z-pill { from { opacity: 0; transform: translateY(8px) scale(.9); } 60% { opacity: 1; transform: none; } to { opacity: 1; transform: translateY(-4px); } }
@keyframes z-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .z-go, .z-pill, .z-pill .i { animation: none; } }
/* Stunden: Ticket „scharf“ – die schwebende Pille unten bekommt eine tickende Uhr und kommt sichtbar herein */
.tc-armed-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.tc-armed-ic .i { width: 18px; height: 18px; animation: tc-tick 1.6s ease-in-out infinite; }
.tc-armed:not([hidden]) { animation: tc-armed-in .5s var(--ease) both; }
@keyframes tc-armed-in { from { opacity: 0; transform: translate(-50%, 24px) scale(.94); } }
@keyframes tc-tick { 0%, 100% { transform: none; } 50% { transform: rotate(20deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .tc-armed:not([hidden]), .tc-armed-ic .i { animation: none; } }

/* ---------- Transponder (Modul) ---------- */
.seg a.segl { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font: 550 .85rem "Inter Tight", sans-serif; text-decoration: none; transition: background .2s, color .2s; }
.seg a.segl.on { background: var(--accent); color: var(--on-accent); }
.tp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.tp-top .tp-search { flex: 1 1 420px; margin: 0; }
.tp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-acts .fchip { text-decoration: none; }
.tp-types-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tp-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; color: var(--text); text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.tp-tile:hover { background: var(--surface-hi); transform: translateY(-2px); }
.tp-tile-n { font: 650 1.6rem/1.1 "Inter Tight", sans-serif; }
.tp-tile .tps { align-self: flex-start; margin-top: 4px; }
.tp-tile-new { align-items: center; justify-content: center; border: 1px dashed var(--line-hi); background: none; color: var(--muted); font: inherit; cursor: pointer; min-height: 96px; }
.tp-hint { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.tp-hint span:first-of-type { flex: 1; }
.tp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; position: relative; }
@media (max-width: 1000px) { .tp-cols { grid-template-columns: 1fr; } }
.tp-res { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tp-res h2 { font-size: 1.05rem; margin: 0; }
.tp-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tp-log li { display: flex; flex-direction: column; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tp-log li:last-child { border: 0; padding: 0; }
/* Bereichs-Zeile */
.tpr { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(0, 1.2fr) auto auto; align-items: center; gap: 4px 14px;
  padding: 8px 10px; border-radius: 10px; }
.tpr:nth-child(odd of .tpr) { background: var(--bg-2); }
.tpr.tpr-prob { background: color-mix(in srgb, var(--err) 9%, transparent); }
.tpr-nr { display: flex; flex-direction: column; min-width: 0; }
.tpr-own { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpr-own a { color: var(--text); }
.tpr-meta { display: flex; flex-direction: column; min-width: 0; }
.tpr-note { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-res .tpr:not(:has(.tpr-own)) { grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto auto; }
@media (max-width: 699px) {
  .tpr, .tp-res .tpr:not(:has(.tpr-own)) { grid-template-columns: minmax(0, 1fr) auto auto; }
  .tpr-own, .tpr-meta { grid-column: 1 / -1; grid-row: auto; }
  .tpr-own { order: 3; } .tpr-meta { order: 4; }
}
/* Status: flächig getönt, kein Streifen */
.tps { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.tps-aktiv { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tps-verloren { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tps-defekt { background: var(--surface-hi); color: var(--text-2); }
.tps-gesperrt { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.tps-frei { background: var(--surface-hi); color: var(--muted); }
.tps-txt-err { color: var(--err); }
/* Einzel-Treffer „wem gehört 4886?“ */
.tp-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tp-hit { display: flex; flex-direction: column; gap: 12px; }
.tp-hit-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.tp-big { font-size: 2rem; font-weight: 700; letter-spacing: .02em; }
.tp-hit .tps { align-self: center; }
.tp-ghead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.tp-ghead h2 a { color: var(--text); }
/* Schnellaktionen */
.tpq { display: flex; flex-wrap: wrap; gap: 6px; }
.tpq form { margin: 0; }
.tpq-b { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-hi);
  border-radius: 999px; background: none; color: var(--text-2); font: 600 .88rem "Inter Tight", sans-serif; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.tpq-b:hover { border-color: currentColor; }
.tpq-b.on, .tpq-b:has(input:checked) { border-color: transparent; }
.tpq-b.tps-aktiv:is(.on, :has(input:checked)), .pal-act.tps-aktiv.on { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.tpq-b.tps-verloren:is(.on, :has(input:checked)), .pal-act.tps-verloren.on { background: color-mix(in srgb, var(--warn) 20%, transparent); }
.tpq-b.tps-defekt:is(.on, :has(input:checked)), .pal-act.tps-defekt.on { background: var(--surface-hi); }
.tpq-b.tps-gesperrt:is(.on, :has(input:checked)), .pal-act.tps-gesperrt.on { background: color-mix(in srgb, var(--err) 20%, transparent); }
.tpq-b:disabled { cursor: default; }
.tp-stat { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-stat .tpq-b { position: relative; }
.tp-stat input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tp-stat .tpq-b:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Ausgabe-Fenster */
.tp-types { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-type { position: relative; display: flex; padding: 10px 14px; border: 1px solid var(--line-hi); border-radius: 12px; cursor: pointer; }
.tp-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tp-type span { display: flex; flex-direction: column; }
.tp-type:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tp-type:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-in { position: relative; display: flex; align-items: center; }
.tp-in .tp-pre { position: absolute; left: 12px; color: var(--muted); font-family: "JetBrains Mono", monospace; pointer-events: none; }
.tp-in .tp-pre:not(:empty) + input { padding-left: 32px; }
.tp-in input { width: 100%; font-family: "JetBrains Mono", monospace; }
.tp-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; min-height: 22px; font-size: .9rem; }
.tp-check:empty { display: none; }
.tp-check.good { color: var(--ok); }
.tp-check.bad { display: block; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--text); }
.tp-check .i { width: 18px; height: 18px; }
/* Liste je Art */
.tp-arthead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tp-arthead h1 { margin: 0; }
.tp-arthead .eyebrow a, .eyebrow a { color: inherit; text-decoration: none; }
.tp-filter { align-items: center; gap: 10px; margin-bottom: 10px; }
.tp-table-wrap { padding: 0; overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tp-table th { position: sticky; top: 0; background: var(--surface); text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 550; font-size: .8rem; border-bottom: 1px solid var(--line); }
.tp-table td { padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tp-table td a { color: var(--text); }
.tp-table tr.tpr-prob td { background: color-mix(in srgb, var(--err) 8%, transparent); }
.tp-table tr.tp-gap td { color: var(--muted); }
.tp-note { max-width: 360px; color: var(--text-2); }
.tp-danger { margin-top: 18px; }
.tp-danger summary { cursor: pointer; color: var(--err); }
.tp-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tp-link-grid h2 { font-size: 1rem; margin: 0; }
.tp-code { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font: .88rem "JetBrains Mono", monospace; overflow-x: auto; }
.tp-unl { margin: 0; padding-left: 18px; columns: 2 220px; font-size: .9rem; }
/* Kunde / Standort: Karte „Transponder“ */
.tp-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; }
/* Schnellsuche: Transponder-Schnellaktionen */
.pal-has-x { flex-wrap: wrap; }
.pal-x-acts { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-left: 44px; }
.pal-act { height: 32px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 999px; background: none; color: var(--text-2);
  font: 600 .8rem "Inter Tight", sans-serif; cursor: pointer; }
.pal-act:not(.on) { background: none; }
.pal-act:not(.on):hover { border-color: currentColor; color: var(--text); }
.pal-act.on { border-color: transparent; cursor: default; }
@media (max-width: 699px) { .pal-x-acts { padding-left: 0; } .pal-act { height: 38px; } }
@media (max-width: 699px) {
  .tp-types-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tp-tile { padding: 12px; }
  .tp-tile-n { font-size: 1.3rem; }
  .tp-tile-new { min-height: 0; }
  .tp-log li:nth-child(n+5) { display: none; }
  .tp-top .tp-search { flex-basis: 100%; }
}
.tp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.tp-steps li.done { color: var(--muted); text-decoration: line-through; }

/* Modul-Detail „Was das Modul kann“ (0.16.2): Einleitung + Kacheln mit getöntem Symbol */
.md-about { display: grid; gap: 14px; }
.md-about h2 { margin: 0; }
.md-lead { margin: 0; font-size: 1.05rem; line-height: 1.55; color: var(--text); max-width: 70ch; }
.md-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .md-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.md-points li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px;
                background: color-mix(in srgb, var(--text) 4%, transparent); }
.md-points li > span:last-child { display: grid; gap: 3px; min-width: 0; }
.md-points b { font-weight: 600; }
.md-points li > span:last-child > span { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.md-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
         color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.md-note { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; }
.md-note .i { flex: none; color: var(--ok); }

/* Notfall-Tickets leuchten (0.16.5): roter Schein rundum + leichte Tönung – kein Randstreifen. Abschaltbar im Profil (body.no-glow) */
.tcard.sos:not(.done), .tlist-row.sos {
  border-color: color-mix(in srgb, var(--err) 65%, transparent);
  background: color-mix(in srgb, var(--err) 7%, var(--surface));
  animation: sosglow 2.4s ease-in-out infinite;
}
.board .tcard.sos:not(.done) { animation: sosglow 2.4s ease-in-out infinite; }
@keyframes sosglow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--err) 35%, transparent), 0 0 14px 0 color-mix(in srgb, var(--err) 22%, transparent); }
  50%      { box-shadow: 0 0 0 1px color-mix(in srgb, var(--err) 60%, transparent), 0 0 26px 3px color-mix(in srgb, var(--err) 42%, transparent); }
}
.tlist-row.sos { background: color-mix(in srgb, var(--err) 8%, transparent); animation: none; box-shadow: none; }
.tcard.sos:not(.done):hover { box-shadow: 0 0 0 1px var(--err), 0 0 28px 4px color-mix(in srgb, var(--err) 45%, transparent); }
.no-glow .tcard.sos:not(.done), .no-glow .tlist-row.sos { animation: none; box-shadow: none; border-color: var(--line); background: var(--surface); }
.no-glow .tlist-row.sos { background: none; }
@media (prefers-reduced-motion: reduce) {
  .tcard.sos:not(.done), .tlist-row.sos { animation: none; box-shadow: 0 0 18px 1px color-mix(in srgb, var(--err) 32%, transparent); }
}

/* Transponder 0.16.6: Kacheln oben filtern (Ansicht bleibt), Suche über der Liste, Ausgabe fest rechts */
.tp-tile { border: 1px solid var(--line); }
.tp-tile.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tp-tile.on:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.tp-tile-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-tile-pre { font-size: .75rem; padding: 1px 7px; border-radius: 6px; background: var(--surface-hi); color: var(--text-2); }
.tp-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tp-main .tp-top { margin: 0; }
.tp-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1000px) { .tp-side { position: sticky; top: 72px; max-height: calc(100dvh - 88px); overflow-y: auto; scrollbar-width: thin; } }
.tp-issue { gap: 12px; }
.tp-issue-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.05rem; }
.tp-issue-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
               color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tp-issue-ic .i { width: 17px; height: 17px; }
.tp-artinfo { margin: -6px 0 0; }
.tp-vab { display: grid; grid-template-columns: 1.25fr .8fr 1.25fr; gap: 8px; }
.tp-vab label { min-width: 0; }
/* Präfix: fester Block links im Feld, nicht änderbar */
.tp-issue .tp-in { align-items: stretch; }
.tp-issue .tp-in .tp-pre { position: static; display: grid; place-items: center; min-width: 34px; padding: 0 8px; flex: none;
  border-radius: 10px 0 0 10px; background: var(--accent); color: #fff; font-weight: 700; }
.tp-issue .tp-in .tp-pre[hidden] { display: none; }
.tp-issue .tp-in .tp-pre:not([hidden]) + input { padding-left: 10px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.tp-issue .tp-in input { min-width: 0; }
.tp-nextline { margin: -6px 0 0; }
.tp-nextline .linkbtn { padding: 0; color: var(--accent); font-weight: 600; }
.tp-issue .tp-check { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; }
.tp-issue .tp-check.good { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tp-issue .tp-check.bad { background: color-mix(in srgb, var(--err) 12%, transparent); }
.tp-check-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tp-issue-ok { width: 100%; justify-content: center; min-height: 46px; }
.tp-logbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.tp-logbox > summary::-webkit-details-marker { display: none; }
.tp-logbox > summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.tp-logbox[open] > summary::after { transform: rotate(90deg); }
.tp-logbox > summary h2 { margin: 0; font-size: 1rem; }
.tp-logbox[open] > summary { margin-bottom: 12px; }
.tp-kunde { display: grid; gap: 6px; }
.tp-flabel { font-size: .88rem; font-weight: 550; color: var(--text-2); }

/* Modul Laufwerke (0.17.0) */
.lw-page { display: flex; flex-direction: column; gap: 12px; }
.lw-page.busy [data-lw-rows] { opacity: .6; transition: opacity .15s; }
.lw-drives { display: flex; flex-wrap: wrap; gap: 6px; }
.lw-drives .fchip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.lw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.lw-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 1.15rem; min-width: 0; }
.lw-crumbs a { color: var(--text-2); text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.lw-crumbs a:hover { background: var(--surface-hi); color: var(--text); }
.lw-crumbs b { padding: 4px 6px; overflow-wrap: anywhere; }
.lw-root { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.lw-sep { width: 14px; height: 14px; color: var(--muted); flex: none; }
.lw-here { display: flex; flex-wrap: wrap; gap: 6px; }
.lw-path { margin: -6px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.lw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lw-search { flex: 1 1 320px; margin: 0; }
.lw-list { padding: 4px; display: flex; flex-direction: column; }
.lw-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: 4px 12px;
          padding: 6px 8px; border-radius: 10px; color: var(--text); text-decoration: none; min-height: 48px; }
.lw-row:hover { background: var(--surface-hi); }
.lw-row.mark { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lw-up { grid-template-columns: 36px 1fr; color: var(--text-2); }
.lw-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-hi); color: var(--text-2); }
.lw-ic.lw-dir { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.lw-ic.lw-f-pdf { color: #ef4444; background: color-mix(in srgb, #ef4444 13%, transparent); }
.lw-ic:is(.lw-f-xlsx, .lw-f-xls, .lw-f-csv) { color: #22c55e; background: color-mix(in srgb, #22c55e 13%, transparent); }
.lw-ic:is(.lw-f-png, .lw-f-jpg, .lw-f-jpeg, .lw-f-webp, .lw-f-gif) { color: #a855f7; background: color-mix(in srgb, #a855f7 13%, transparent); }
.lw-ic:is(.lw-f-cp2, .lw-f-cp4, .lw-f-cxl) { color: #f59e0b; background: color-mix(in srgb, #f59e0b 13%, transparent); }
.lw-name { display: flex; flex-direction: column; min-width: 0; }
.lw-name > a, .lw-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; text-decoration: none; }
.lw-name > a:hover { text-decoration: underline; }
.lw-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-date, .lw-size { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lw-size { min-width: 64px; text-align: right; }
.lw-acts { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.lw-row:hover .lw-acts, .lw-row:focus-within .lw-acts, .lw-row-s .lw-acts { opacity: 1; }
.lw-acts .iconbtn.lw-done, [data-copy].lw-done { color: var(--ok); }
.lw-empty { padding: 14px; margin: 0; }
.lw-err { display: flex; align-items: center; gap: 10px; color: var(--err); }
.lw-hitsum { margin: 0; }
.lw-foot { margin: 4px 0 0; }
@media (max-width: 700px) {
  .lw-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .lw-date, .lw-size { display: none; }
  .lw-acts { opacity: 1; }
  .lw-acts [data-link-open] { display: none; }
}
.lw-hint { position: fixed; right: 16px; bottom: 16px; z-index: 90; max-width: 360px; display: grid; gap: 8px; box-shadow: var(--shadow);
           animation: enter .25s var(--ease); }
@media (max-width: 899px) { .lw-hint { bottom: 84px; left: 16px; } }
.lw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lw-card { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.lw-card:hover { transform: translateY(-2px); background: var(--surface-hi); }
.lw-card-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
              color: #14b8a6; background: color-mix(in srgb, #14b8a6 15%, transparent); }
.lw-card-tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lw-card-tx > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-adm { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lw-adm:last-of-type { border: 0; }
.lw-adm-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lw-adm-tx > span { overflow-wrap: anywhere; }

/* ---------- Modul Backup (module/backup.html) ---------- */
.bk-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); vertical-align: middle; }
.bk-dot.ok { background: var(--ok); } .bk-dot.warn { background: var(--warn); } .bk-dot.err { background: var(--err); }
.bk-dot.off { background: var(--surface-hi); border: 1px solid var(--line); }
.bk-stand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 12px; background: var(--bg-2); }
.bk-stand > .grow { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.bk-stand .bk-dot { width: 16px; height: 16px; }
.bk-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.bk-row:last-of-type { border: 0; }
.bk-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-inhalt { grid-column: 1 / -1; color: var(--text-2); }
.bk-probe { color: var(--ok); white-space: nowrap; } .bk-probe .i { width: 14px; height: 14px; vertical-align: -2px; }
.bk-size { grid-row: 1; grid-column: 2; white-space: nowrap; }
.bk-probe { grid-column: 2; }
@media (min-width: 900px) {
  .bk-row { grid-template-columns: 200px minmax(0, 1fr) 80px 80px; }
  .bk-inhalt { grid-column: auto; } .bk-size, .bk-probe { grid-row: auto; grid-column: auto; text-align: right; }
}
.bk-ziel { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bk-ziel-tx { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.bk-ziel-tx > span { overflow-wrap: anywhere; }
.bk-arten { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bk-art { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.bk-art:hover { border-color: var(--accent); background: var(--bg-2); }
.bk-notfall pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media print { .bk-notfall .btn, .crumbs { display: none; } }
/* Papierkorb (settings/papierkorb.html) */
.pk-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pk-row:last-of-type { border: 0; }
.pk-tx { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.lw-roles { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.lw-roles legend { padding: 0 0 6px; font-size: .88rem; font-weight: 550; color: var(--text-2); }
.lw-mounts { margin: -6px 0 0; }
.lw-cmd { display: flex; gap: 8px; align-items: flex-start; }
.lw-cmd pre { flex: 1; margin: 0; overflow-x: auto; }
.lw-linkcard .lw-lc-h { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0; min-width: 0; }
.lw-linkcard .lw-lc-h .i { color: #14b8a6; flex: none; }
.lw-lc-sub { margin: -4px 0 0; }
.lw-row-s { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 4px 0; min-height: 40px; }
.lw-row-s .lw-ic { width: 28px; height: 28px; }
.lw-row-s:hover { background: none; }
.lw-row-s .lw-name > span { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 700px) {
  .lw-name > a, .lw-name > span { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Stunden: Kollegen dazuschalten (0.17.1) – eigene Spur links, Kollegen als schmale Spuren rechts, nur ansehen */
.tc-grid.has-peers .tc-ev, .tc-grid.has-peers .tc-sel { right: calc(4px + var(--peer-w) * var(--peers)); }
.tc-peer { position: absolute; z-index: 1; left: calc(100% - 3px - var(--peer-w) * (var(--peers) - var(--k))); width: calc(var(--peer-w) - 2px);
  display: flex; flex-direction: column; padding: 2px 4px; overflow: hidden; border-radius: 6px; cursor: help;
  background: color-mix(in srgb, var(--pc) 18%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--pc) 60%, transparent);
  font-size: .66rem; line-height: 1.25; color: var(--text-2); animation: tcsettle .4s ease-out; }
.tc-peer b { font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-peer span { font: 500 .6rem "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; }
.peers { position: relative; }
.peers-tgl { gap: 6px; }
.peers-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.peers-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, calc(100vw - 32px)); padding: 12px; display: grid; gap: 10px;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); animation: popin .16s var(--ease); }
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.peers-head { display: grid; gap: 2px; }
.peers-q { font-size: 16px; }
.peers-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.peer { display: grid; grid-template-columns: 12px 1fr auto 34px; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.peer:hover { background: var(--bg-2); }
.peer-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-hi); transition: background .15s; }
.peer.on .peer-dot { background: var(--pc, var(--accent)); }
.peer .sw { width: 34px; height: 20px; border-radius: 999px; background: var(--line-hi); position: relative; transition: background .18s; }
.peer .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s var(--ease); }
.peer.on .sw { background: var(--pc, var(--accent)); }
.peer.on .sw::after { transform: translateX(14px); }
.peers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.peers-legend { display: contents; }
.peer-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .82rem;
  color: var(--text); background: color-mix(in srgb, var(--pc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent); }
.peer-chip .peer-dot { background: var(--pc); }
.peer-chip .i { width: 13px; height: 13px; opacity: .55; }
.peer-chip:hover .i { opacity: 1; }
.tc-peer b { text-align: center; }
.tc-peer span { text-align: center; }
label.btn { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }

/* Anlage: Karte Wartungsprotokoll (Modul Telenot, 0.18.0) */
.tn-go { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-go form:first-child { flex: 1 1 200px; }
.tn-go form:first-child .btn { width: 100%; justify-content: center; }
.tn-ex { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: var(--bg-2); }
.tn-dot { width: 8px; height: 8px; margin-left: 2px; border-radius: 50%; background: var(--warn); flex: none; }
.tn-lbl { font-size: .72rem; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.tn-file { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--text); font-size: .88rem; min-width: 0; }
.tn-file .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-k { flex: none; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 650;
        background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.tn-k.k-twg { background: color-mix(in srgb, #a855f7 18%, transparent); }
.tn-k.k-hiplex { background: color-mix(in srgb, #14b8a6 18%, transparent); }
.tn-k.k-\? { background: color-mix(in srgb, var(--err) 18%, transparent); }
.tn-up { margin-top: 4px; }
.tn-st { flex: none; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); }
.tn-st.fertig { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.tn-ask { width: min(520px, calc(100vw - 24px)); }

/* ---------- Pläne (0.19.0): Liste links, Plan Mitte, Geräte rechts – volle Breite und Höhe ---------- */
.pl-page .main { max-width: none; }
.pl { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 14px; height: calc(100dvh - 150px); min-height: 520px; }
.pl-list, .pl-devs { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; padding: 14px; }
.pl-list { overflow-y: auto; }
.pl-house { margin-top: 8px; font-size: .72rem; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.pl-item { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--text); }
.pl-item:hover { background: var(--surface-hi); }
.pl-item.on { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
.pl-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; }
.pl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-title { display: flex; flex-direction: column; line-height: 1.2; }
.pl-layers { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-layer { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; font: inherit; font-size: .8rem;
  color: var(--text); cursor: pointer; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.pl-layer i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.pl-layer b { font-weight: 600; opacity: .7; }
.pl-layer.off { opacity: .45; background: none; border-style: dashed; }
.pl-zoom { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.pl-fit { border: 0; background: none; color: var(--text); font: inherit; font-size: .85rem; padding: 0 8px; height: 36px; cursor: pointer; }
.pl-view { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--line);
  background: repeating-conic-gradient(color-mix(in srgb, var(--line) 35%, transparent) 0 25%, transparent 0 50%) 0 0 / 22px 22px, var(--bg-2);
  touch-action: none; cursor: grab; user-select: none; }
.pl-view.panning { cursor: grabbing; }
.pl-view.arming { cursor: crosshair; box-shadow: inset 0 0 0 2px var(--accent); }
.pl-view.drop-ok { box-shadow: inset 0 0 0 2px var(--accent); }
.pl-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 10px 40px rgb(0 0 0 / .35); }
.pl-canvas.glide { transition: transform .35s var(--ease); }
.pl-canvas img { display: block; width: 100%; height: 100%; pointer-events: none; }
.pl-marks { position: absolute; inset: 0; }
.pl-mark { position: absolute; transform: translate(-50%, -50%) scale(var(--inv, 1)); cursor: pointer; z-index: 1; }
.pl-mark:hover { z-index: 3; }
.pl-mark.off { display: none; }
.pl-mark.moving { z-index: 4; cursor: grabbing; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .35)); }
.pl-mark.pop { animation: plmpop .7s var(--ease); }
@keyframes plmpop { 0% { transform: translate(-50%, -50%) scale(calc(var(--inv, 1) * 2.2)); } 60% { transform: translate(-50%, -50%) scale(calc(var(--inv, 1) * .9)); } }
.pl-mark .dot, .plm-ghost .dot, .pl-sym .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgb(0 0 0 / .35); color: #fff; }
.pl-mark .dot svg, .plm-ghost .dot svg, .pl-sym .dot svg { width: 17px; height: 17px; }
.pl-mark .dot .txt, .pl-sym .dot .txt, .plm-ghost .dot .txt { font: 700 9.5px/1 "Inter Tight", sans-serif; color: #fff; }
.pl-mark .plansym, .plm-ghost .plansym, .pl-sym .plansym { width: 28px; height: 28px; background: none; box-shadow: none;
  filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 1.2px #fff); }
.pl-mark .plansym svg, .pl-sym .plansym svg, .plm-ghost .plansym svg { width: 28px; height: 28px; }
.pl-mark .lbl { position: absolute; white-space: nowrap; font: 700 10px/1 "Inter Tight", sans-serif; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.pl-mark .lbl.lp-r { left: 100%; top: 50%; transform: translate(3px, -50%); }
.pl-mark .lbl.lp-l { right: 100%; top: 50%; transform: translate(-3px, -50%); }
.pl-mark .lbl.lp-o { bottom: 100%; left: 50%; transform: translate(-50%, -2px); }
.pl-mark .lbl.lp-u { top: 100%; left: 50%; transform: translate(-50%, 2px); }
.plm-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; margin: -14px 0 0 -14px; filter: drop-shadow(0 8px 14px rgb(0 0 0 / .4)); }
.pl-help { margin: 0; }
.pl-empty { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 30px; }
.pl-empty > .i { width: 40px; height: 40px; color: var(--accent); }
.pl-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--bg-2); }
.pl-seg button { flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; height: 34px; border-radius: 8px; cursor: pointer; }
.pl-seg button.on { background: var(--surface-hi); color: var(--text); font-weight: 600; }
.pl-devlist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 0 6px; }
.pl-dgrp { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: .74rem; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.pl-dgrp i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pl-dev { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 10px; cursor: grab; touch-action: pan-y; }
.pl-ro .pl-dev { cursor: default; }
.pl-dev:hover { background: var(--surface-hi); }
.pl-dev.armed { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pl-dev.inactive { opacity: .55; }
.pl-sym { flex: none; width: 30px; display: grid; place-items: center; }
.pl-sym .dot { width: 24px; height: 24px; box-shadow: none; }
.pl-sym .dot svg { width: 15px; height: 15px; }
.pl-dev-t { flex: 1; min-width: 0; display: grid; }
.pl-dev-t b, .pl-dev-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dev-t b { font-weight: 550; font-size: .9rem; }
.pl-dev-t small { color: var(--muted); font-size: .76rem; }
.pl-on { flex: none; font-size: .7rem; padding: 2px 7px; border-radius: 999px; background: var(--bg-2); color: var(--muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dev.here .pl-on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--text); }
.pl-cam { width: 15px; height: 15px; color: var(--muted); flex: none; }
.pl-tip { position: fixed; z-index: 80; width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgb(0 0 0 / .45); display: grid; gap: 4px; font-size: .85rem; pointer-events: none; animation: popin .14s var(--ease); }
.pl-tip.sticky { pointer-events: auto; }
.pl-tip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--bg-2); margin-bottom: 4px; }
.pl-tip > div { display: grid; grid-template-columns: 70px 1fr; gap: 6px; }
.pl-tip small { color: var(--muted); }
.pl-tip-g { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.pl-tip-g i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ctxmenu { position: fixed; z-index: 85; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgb(0 0 0 / .45); display: grid; gap: 2px; }
.ctxmenu > button { text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ctxmenu > button:hover { background: var(--surface-hi); }
.ctxmenu > button.danger { color: var(--err); }
.ctxmenu .ctx-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 10px; font-size: .82rem; color: var(--muted); }
.ctxmenu .ctx-row button { border: 1px solid var(--line); background: none; color: var(--text); border-radius: 6px; padding: 3px 7px; font: inherit; font-size: .78rem; cursor: pointer; }
.ctxmenu .ctx-row button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-free { padding: 8px; width: 240px; }
@media (max-width: 1100px) {
  .pl { grid-template-columns: minmax(0, 1fr) 280px; height: auto; }
  .pl-list { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; overflow: visible; }
  .pl-list h2 { margin-right: 8px; }
  .pl-stage { height: calc(100dvh - 230px); min-height: 460px; }
  .pl-devs { max-height: calc(100dvh - 230px); }
}
@media (max-width: 760px) {
  .pl { grid-template-columns: 1fr; }
  .pl-stage { height: 70dvh; }
  .pl-devs { max-height: 60dvh; }
  .pl-help { display: none; }
}
/* Standort: Karte Pläne & Geräte */
.pl-card { display: flex; align-items: center; gap: 12px; }

/* ---------- Geräte je Standort (0.20.0) ---------- */
.gr { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1100px) { .gr { grid-template-columns: minmax(0, 1fr) 320px; } }
.gr-filter { display: flex; gap: 8px; }
.gr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-chips .chip { height: auto; min-height: 34px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-2); }
.gr-chips .chip b { font-weight: 650; color: var(--muted); }
.gr-chips .chip.on { background: var(--accent-soft); color: var(--text); outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.gr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.gr-kurz { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 7px;
  font: 700 .72rem/1 var(--mono, ui-monospace, monospace); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.gr-kurz.lg { min-width: 46px; height: 40px; font-size: .95rem; border-radius: 11px; }
.gr-t td { vertical-align: middle; }
.gr-t tr.gr-off td { opacity: .55; }
.gr-t .i { width: 14px; height: 14px; vertical-align: -2px; }
.gr-imp .gr-art .row { align-items: center; gap: 10px; }
.gr-art .grow { display: grid; }
.gr-logo { border-radius: 9px; flex: none; }
.gr-art.drop { display: grid; align-items: stretch; gap: 10px; padding: 14px 16px; }
.gr-art label.btn { justify-self: start; }
.gr-art > .btn.primary { justify-self: start; }
.gr-t td:last-child a { white-space: nowrap; }
.gr-art.dragover { outline: 2px dashed var(--accent); }
.gr-dev { display: grid; gap: 14px; margin-bottom: 14px; align-items: start; }
@media (min-width: 900px) { .gr-dev { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); } }
.gr-img { width: 100%; height: auto; border-radius: 10px; background: var(--surface-hi); }
.gr-scroll { max-height: 420px; overflow: auto; }
.gr-unifi { max-width: 640px; }
.gr-choice { display: flex !important; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; min-height: var(--tap); }
.gr-choice .grow { display: grid; }
.gr-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Transponder 0.20.2: Wechsel der Chip-Art ohne Neuladen – Liste blendet kurz aus, Zeilen fliegen gestaffelt ein */
.tp-res { transition: opacity .11s ease, transform .11s ease; }
.tp-res.tp-leave { opacity: 0; transform: translateY(4px); }
.tp-res.tp-enter .tpr, .tp-res.tp-enter .tp-hit, .tp-res.tp-enter > .card {
  animation: tpIn .32s var(--ease) both; animation-delay: calc(var(--i, 40) * 12ms); }
@keyframes tpIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.tp-side { transition: margin-top .15s ease; }

/* Pop-up „Neues Ticket“ (ticketneu.js, 0.20.8): Kopf und Knöpfe fest, dazwischen scrollt; am Handy von unten */
dialog.ntk-dlg { padding: 0; overflow: hidden; }
dialog.ntk-dlg[open] { display: flex; flex-direction: column; }
dialog.ntk-dlg form.ntk { flex: 1 1 auto; min-height: 0; gap: 0; }
.ntk-head { flex: none; padding: 14px 14px 8px 18px; }
.ntk-head h2 { margin: 0; }
.ntk-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px 18px;
  display: grid; gap: 22px; align-content: start; }
.ntk-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ntk-sec { min-width: 0; }
.ntk-sec h3 { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ntk-foot { flex: none; align-items: center; padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.ntk-err { flex: 1; margin: 0; color: var(--err); font-size: .88rem; }
@media (min-width: 900px) {
  dialog.ntk-dlg { width: min(1060px, calc(100vw - 48px)); }
  .ntk-body { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .ntk-side { position: sticky; top: 0; padding: 14px; border-radius: 14px; background: var(--bg-2); }
  .ntk-side .people-pick { grid-template-columns: 1fr; max-height: min(440px, 52dvh); }
}
@media (max-width: 699px) {
  dialog.ntk-dlg { height: 92dvh; padding-bottom: 0; }
  .ntk-foot .btn { flex: 1; justify-content: center; min-height: 46px; }
  .ntk-foot .ntk-err { flex-basis: 100%; }
  .ntk-foot { flex-wrap: wrap; }
}
.note-link { margin-left: 4px; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-weight: 600; text-decoration: none; }
.note-link:hover { background: var(--accent); color: var(--on-accent); }
/* Ansprechpartner im Ticket: Feld mit Vorschlagsliste der hinterlegten Kontakte (0.21.1) */
.ac { position: relative; display: block; min-width: 0; }
.ac > input:not([type=hidden]) { width: 100%; }

/* Eigene Rückfrage statt Browser-confirm (dialog.js, 0.21.3) – am Handy wie jedes Blatt von unten */
@media (min-width: 700px) { dialog.ask-dlg { width: min(440px, calc(100vw - 32px)); padding: 22px; } }
.ask-dlg form { gap: 18px !important; }
.ask-title { margin: 0; font-size: 1.05rem; }
.ask-text { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.ask-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ask-actions .btn { min-width: 110px; justify-content: center; }
.btn.ask-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ask-danger:hover { background: color-mix(in srgb, var(--err) 88%, #fff); }
@media (max-width: 699px) { .ask-actions .btn { flex: 1; min-height: 48px; } }

/* Plan › Neuer Eintrag (0.21.3): Umschalter über die volle Breite mit gleitendem Schieber */
.seg.seg-full { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; padding: 4px;
  background: var(--bg-2); border-color: var(--line); }
.seg-full button { position: relative; z-index: 1; justify-content: center; height: 40px; font-size: .9rem; background: none !important; }
.seg-full button .i { width: 17px; height: 17px; }
.seg-full button:not(.on):hover { color: var(--text); }
.seg-full button.on { color: var(--on-accent); }
.seg-full .seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: var(--accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .25); transition: transform .26s var(--ease); pointer-events: none; }
.seg-full[data-i="1"] .seg-thumb { transform: translateX(100%); }
.seg-full.seg-3 .seg-thumb { width: calc((100% - 8px) / 3); }
.seg-full[data-i="2"] .seg-thumb { transform: translateX(200%); }
/* Tresor › Neuer Eintrag mit Vorschau des Zugangsblatts (A4 verkleinert, doku.js) */
.vprev-box { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.vprev-box iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; }
.vnew [hidden] { display: none !important; }
.seg-full.seg-still .seg-thumb, .seg-full.seg-still button { transition: none; }
@media (prefers-reduced-motion: reduce) { .seg-full .seg-thumb { transition: none; } }

/* Ticket-Auswahl im Plan-Dialog: eigener, umrandeter Kasten mit Suchfeld oben, damit er sich klar vom Formular abhebt */
.pl-pick { display: flex; flex-direction: column; border: 1px solid var(--line-hi); border-radius: 14px; background: var(--bg-2); overflow: hidden;
  transition: border-color .15s; }
.pl-pick:focus-within { border-color: var(--accent); }
label.pl-pick-search { position: relative; display: block; flex: none; border-bottom: 1px solid var(--line); }
.pl-pick-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pl-pick-search input { width: 100%; min-height: 48px; padding-left: 42px; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }
.pl-pick-list { max-height: min(300px, 38dvh); overflow-y: auto; overscroll-behavior: contain; }
.pl-pick-list .tk-item { border-radius: 0; min-height: 56px; padding: 8px 14px; }
.pl-pick-list .tk-item + .tk-item { border-top: 1px solid var(--line); }
.pl-pick-list .tk-item:hover, .pl-pick-list .tk-item:focus-visible { background: var(--surface-hi); outline: none; }
.pl-pick-list .tk-num { background: var(--surface); }
.pl-pick-empty { margin: 0; padding: 16px 14px; }
/* Gewähltes Ticket deutlich: getönte Fläche mit Rahmen in Akzentfarbe */
.pl-dlg-ticket { border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); padding: 12px 14px; }
.pl-dlg-ticket .tk-num { background: var(--surface); }
/* ---------- Material: Preislisten und Artikel (0.22.0) ---------- */
.mat-h { margin: 22px 0 10px; font-size: 1rem; color: var(--text-2); }
.mat-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mat-card { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.mat-card:hover { transform: translateY(-2px); background: var(--surface-hi); }
.mat-card.mat-off { opacity: .6; }
.mat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; font: 650 .9rem "Inter Tight", sans-serif;
  background: hsl(var(--h) 55% 50% / .18); color: hsl(var(--h) 70% 70%); }
html[data-theme="light"] .mat-ic { color: hsl(var(--h) 60% 35%); }
.mat-card-tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mat-card-tx > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-t td.num, .mat-t th.num { text-align: right; white-space: nowrap; }
.mat-t td { vertical-align: middle; }
.mat-t .mat-img-h, .mat-t .mat-img-c { width: 44px; padding-right: 0; }
.mat-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; display: block; }
.mat-sub { display: block; }
.mat-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mat-t tr.mat-off td { color: var(--muted); }
.mat-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 8px; }
.mat-page { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .mat-page { grid-template-columns: minmax(0, 1fr) 340px; } }
.mat-main, .mat-side { min-width: 0; }
.mat-filter { gap: 8px 14px; }
.mat-filter .searchbar { margin: 0; flex: 1 1 260px; }
.mat-add { align-self: flex-start; }
.mat-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mat-runs li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mat-runs li:last-child { border-bottom: 0; padding-bottom: 0; }
.mat-file { overflow-wrap: anywhere; }
.mat-err { color: var(--err); }
.mat-notes { white-space: pre-wrap; font-size: .8rem; margin: 6px 0 0; color: var(--text-2); }
.mat-next { align-items: center; gap: 10px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.mat-next > .i { color: var(--ok); }
.mat-src { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
label.mat-src-o { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
label.mat-src-o:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
label.mat-src-o input { margin-top: 3px; }
label.mat-src-o > span { display: flex; flex-direction: column; gap: 2px; }
.mat-f2 > label:first-child, .mat-f3 > label:first-child { grid-column: auto; }
@media (min-width: 560px) { .mat-f3 { grid-template-columns: 1fr 1fr 1fr; } }
/* Import: Datei im ZIP wählen */
.mat-zip { display: flex; flex-direction: column; }
.mat-zip-dir { margin: 14px 0 4px; font-size: .8rem; color: var(--muted); }
.mat-zip-f { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.mat-zip-f:hover { background: var(--surface-hi); }
.mat-zip-f.best { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.mat-zip-f .i { color: var(--muted); flex: none; }
.mat-zip-f > span:not(.chip) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Import: Spalten zuordnen */
.mat-readopts { gap: 10px 16px; align-items: flex-end; margin-bottom: 16px; }
.mat-readopts label { min-width: 160px; }
.mat-map { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .mat-map { grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); } }
.mat-fields { display: grid; gap: 6px; }
label.mat-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 10px; padding: 4px 8px; border-radius: 10px; }
label.mat-field.set { background: var(--accent-soft); }
label.mat-field > span { font-weight: 550; }
@media (max-width: 560px) { label.mat-field { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.mat-raw { max-height: 340px; overflow: auto; }
.mat-raw td { white-space: nowrap; }
.mat-run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.mat-run .btn { box-shadow: none; }
.mat-run label.check { gap: 8px; flex-wrap: wrap; }
.mat-run select { width: auto; }
/* Artikel-Seite */
.mat-art { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .mat-art { grid-template-columns: 260px minmax(0, 1fr); } }
.mat-art-img { aspect-ratio: 1; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; max-width: 320px; }
.mat-art-img img { width: 100%; height: 100%; object-fit: contain; }
.mat-art-img:has(img) .mat-art-noimg { display: none; }
.mat-art-noimg { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #8a8f9a; font-size: .85rem; }
.mat-art-img:not(:has(img)) { background: var(--surface-hi); }
.mat-prices { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.mat-prices > div { display: flex; flex-direction: column; }
.mat-prices b { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.mat-extra { font-size: .88rem; margin-top: 10px; }
.mat-use { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.mat-use:last-child { border-bottom: 0; }
.mat-use > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Material am Ticket ---------- */
.tm-total { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tm-list { display: flex; flex-direction: column; }
.tm-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .2s, opacity .18s, transform .18s; }
.tm-row:last-child { border-bottom: 0; }
.tm-row.regie { background: color-mix(in srgb, var(--warn) 9%, transparent); }
.tm-row.fresh { animation: tmin .5s var(--ease); }
.tm-row.out { opacity: 0; transform: translateX(16px); }
@keyframes tmin { from { opacity: 0; transform: translateY(-6px); background: var(--accent-soft); } }
.tm-qty { display: flex; align-items: center; gap: 6px; }
.tm-qty input { width: 58px; min-height: 36px; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.tm-qty em { font-style: normal; color: var(--muted); font-size: .85rem; }
.tm-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tm-tx a { color: var(--text); }
.tm-tx > * { overflow-wrap: anywhere; }
.tm-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.tm-act { display: flex; align-items: center; gap: 2px; }
.tm-regie { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-hi); background: none; color: var(--muted); font: 550 .78rem "Inter Tight", sans-serif; cursor: pointer; display: inline-flex; align-items: center; }
.tm-regie.on { background: color-mix(in srgb, var(--warn) 22%, transparent); border-color: transparent; color: var(--text); }
@media (max-width: 699px) {
  .tm-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; }
  .tm-tx { grid-column: 1 / -1; grid-row: 1; }
  .tm-qty, .tm-price, .tm-act { grid-row: 2; }
  .tm-act .iconbtn { width: 36px; height: 36px; }
}
.tm-sums { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; font-variant-numeric: tabular-nums; }
.tm-regie-h { margin: 0; }
.tm-add { display: grid; gap: 8px 10px; grid-template-columns: minmax(0, 1fr) 1fr; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.tm-search { position: relative; grid-column: 1 / -1; }
.tm-search > .i { position: absolute; left: 12px; top: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tm-search input[type="text"] { padding-left: 40px; }
.tm-f { display: flex; flex-direction: column; gap: 4px; }
.tm-f > span { font-size: .78rem; color: var(--muted); }
.tm-rg { min-height: 44px; }
.tm-add .btn { min-height: 44px; }
.tm-err { grid-column: 1 / -1; margin: 0; color: var(--err); }
@media (min-width: 900px) {
  .tm-add { grid-template-columns: minmax(0, 1fr) 80px 96px 120px auto auto; }
  .tm-search { grid-column: auto; }
}
.tm-sug { position: absolute; left: 0; width: max(100%, min(620px, calc(100vw - 32px))); top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; max-height: 360px; overflow-y: auto; }
.tm-sug-i { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border: 0; border-radius: 9px; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; min-height: 48px; }
.tm-sug-i.nopic { grid-template-columns: minmax(0, 1fr) auto; }
.tm-sug-i:hover, .tm-sug-i.on { background: var(--surface-hi); }
.tm-sug-i img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; }
.tm-sug-t { display: flex; flex-direction: column; min-width: 0; }
.tm-sug-t > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sug-p { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-sug-free { margin: 4px 8px; }
@media (min-width: 560px) { .tm-dlg3 { grid-template-columns: 1fr 1fr 1fr; } .tm-dlg3 > label:first-child { grid-column: auto; } }
.mat-zip-g { border-top: 1px solid var(--line); }
.mat-zip-g summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; cursor: pointer; font-weight: 550; }
.mat-zip-g summary .i { color: var(--muted); }
.mat-zip-g summary > span:first-of-type { flex: 1; }
.mat-zip-g .mat-zip-f { padding-left: 38px; }
@media (max-width: 699px) { .tm-sug { width: 100%; } }
.mat-nr-s { display: none; }
@media (max-width: 560px) { .mat-nr-s { display: block; } .mat-t .mat-img-h, .mat-t .mat-img-c { display: none; } }

/* =====================================================================
   Datei-Vorschau (static/vorschau.js): Anhänge im Pop-up statt auf neuer Seite.
   ===================================================================== */
dialog.vw {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 8, 12, .985); color: #fff; display: none; overscroll-behavior: contain; outline: none;
}
dialog.vw[open] { display: grid; grid-template-rows: auto 1fr; animation: enter .2s var(--ease); }
dialog.vw::backdrop { background: transparent; }
html.vw-open { overflow: hidden; }
.vw-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
.vw-cap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .85); font-size: .9rem; padding-left: 6px; }
.vw-bar .iconbtn { color: #fff; width: 44px; height: 44px; }
.vw-bar .iconbtn:hover { background: rgba(255, 255, 255, .12); }
.vw-stage { min-height: 0; display: grid; place-items: center; padding: 0 16px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); touch-action: pan-y pinch-zoom; }
.vw-stage img { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 8px; object-fit: contain; transition: transform .15s var(--ease); user-select: none; -webkit-user-drag: none; }
.vw-pdf { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.vw-nav.prev { left: 12px; } .vw-nav.next { right: 12px; }
.vw-nav:hover { background: rgba(255, 255, 255, .22); }
/* Beim PDF liegen die Pfeile außerhalb des Dokuments erst ab genug Breite – darunter blättert man übers Wischen nicht, also unten */
dialog.vw.is-pdf .vw-nav { top: auto; bottom: 24px; transform: none; }
.vw-stage:has(.vw-pdf) { padding-bottom: 84px; }
@media (min-width: 1300px) { dialog.vw.is-pdf .vw-nav { top: 50%; bottom: auto; transform: translateY(-50%); } .vw-stage:has(.vw-pdf) { padding-bottom: 16px; } }
@media (max-width: 640px) { .vw-stage { padding: 0 0 12px; } .vw-stage img { border-radius: 0; } .vw-nav { display: none; } dialog.vw.is-pdf .vw-nav { display: grid; } }
@media (prefers-reduced-motion: reduce) { dialog.vw[open] { animation: none; } }

/* ---------- Interne Kommentare (0.23.0): nur fürs Team, nie im Arbeitsbericht – flächig getönt, kein Streifen ---------- */
.comment.internal .comment-body { background: color-mix(in srgb, var(--warn) 13%, var(--bg-2)); }
.comment-meta { flex-wrap: wrap; }
.comment-meta > b, .comment-meta > span { white-space: nowrap; }
.chip-int { padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 650; letter-spacing: .2px;
            background: color-mix(in srgb, var(--warn) 26%, transparent); color: var(--text); }
.comment-actions { gap: 10px; align-items: center; }
.chk-int { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.chk-int input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.chk-int span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px;
                border: 1px dashed var(--line-hi); color: var(--text-2); font-size: .9rem; font-weight: 550; }
.chk-int span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; }
.chk-int input:checked + span { border-style: solid; border-color: transparent; color: var(--text);
                                background: color-mix(in srgb, var(--warn) 24%, transparent); }
.chk-int input:checked + span::before { background: var(--warn); border-color: var(--warn); }
.chk-int input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Abschluss: Kundenunterschrift am Ticket (0.23.0) ---------- */
.ab-signed { display: flex; gap: 12px; align-items: center; }
.ab-signed img { width: 120px; height: 52px; object-fit: contain; flex: none; border-radius: 10px; background: #fff; padding: 4px; }
.ab-signed .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ab-changed { color: var(--text); padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 18%, transparent); }
dialog.sig-dlg { width: min(760px, 100vw); }
.sig-sum { margin: 0; line-height: 1.5; }
.sig-pad-wrap { position: relative; border-radius: 14px; background: #fff; border: 1px solid var(--line-hi); }
.sig-pad-wrap canvas { display: block; width: 100%; aspect-ratio: 900 / 360; touch-action: none; cursor: crosshair; }
.sig-pad-wrap::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 1.5px solid #c9d0db; pointer-events: none; }
.sig-hint { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; color: #9ca3af; font-size: .85rem; pointer-events: none; }
.sig-err { margin: 0; color: var(--err); font-weight: 550; }
@media (max-width: 699px) { dialog.sig-dlg { min-height: 88dvh; } }

/* ---------- Abrechnung (0.24.0): Liste, Prüfen, Einstellungen. Präfix rg- (Rechnung) ---------- */
.rg-list { display: grid; gap: 6px; }
.rg-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface);
          border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.rg-row:hover { border-color: var(--line-hi); }
.rg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rg-title { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rg-sum { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.rg-when { flex-basis: 100%; text-align: right; }
@media (max-width: 699px) { .rg-row { flex-direction: column; align-items: stretch; } .rg-meta { justify-content: flex-start; } .rg-when { text-align: left; } }

.rg-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1100px) { .rg-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.rg-done { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.rg-done > .i { color: var(--ok); width: 22px; height: 22px; flex: none; }
.rg-done .grow { display: flex; flex-direction: column; }
.rg-notes { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.rg-note + .rg-note { padding-top: 8px; border-top: 1px solid var(--line); }
.rg-hint { margin: 0; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 16%, transparent); font-size: .9rem; }
.rg-table { display: grid; gap: 4px; }
.rg-th, .rg-tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 80px 84px 104px 96px; gap: 8px; align-items: start; }
.rg-th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; padding: 0 2px; }
.rg-th span:nth-child(n+3) { text-align: right; }
.rg-tr { padding: 6px 2px; border-top: 1px solid var(--line); }
.rg-tr.off { opacity: .5; }
.rg-tr.new { opacity: .75; }
.rg-tr input { min-width: 0; width: 100%; }
.rg-tr input[name=pos_qty], .rg-tr input[name=pos_price] { text-align: right; }
.rg-tr input.bad { border-color: var(--warn); }
.rg-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rg-text small { font-size: .72rem; line-height: 1; }
.rg-noteinp { font-size: .85rem; }
.rg-on { position: relative; display: flex; justify-content: center; padding-top: 22px; }
.rg-on input { width: 20px; height: 20px; }
.rg-line { text-align: right; padding-top: 30px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rg-sums { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 6px 0 0 auto; min-width: 240px; font-variant-numeric: tabular-nums; }
.rg-sums dt { text-align: right; color: var(--text-2); } .rg-sums dd { margin: 0; text-align: right; }
.rg-acts { align-items: center; }
@media (max-width: 699px) {
  .rg-th { display: none; }
  .rg-tr { grid-template-columns: 30px repeat(3, minmax(0, 1fr)); }
  .rg-tr .rg-on { grid-row: span 2; padding-top: 22px; }
  .rg-tr .rg-text { grid-column: 2 / -1; }
  .rg-line { grid-column: 2 / -1; padding-top: 0; }
  .rg-sums { min-width: 0; width: 100%; }
}
.rg-time { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.rg-time:first-of-type { border-top: 0; }
.rg-time .grow { min-width: 0; }
.rg-tnote { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-kind { min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-hi); background: transparent;
           color: var(--text-2); font: inherit; font-size: .8rem; white-space: nowrap; cursor: pointer; }
.rg-kind.remote { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.rg-kind:disabled { cursor: default; }
.rg-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rg-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rg-billed { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); }
.rg-billed .i { color: var(--ok); width: 16px; height: 16px; }

/* =====================================================================
   Anlage aus Bausteinen (bausteine.py, doku/_bausteine.html, static/bausteine.js) · Präfix bb-
   Zwei Spalten (breit/schmal), am Handy eine. Leere und ausgeblendete Bausteine nur im Anpassen-Modus.
   ===================================================================== */
.bb-lay { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .bb-lay { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); } }
/* Rechte Spalte leer (z. B. Video-Anlage nur mit Bildwand): volle Breite statt leerem Rand; im Anpassen-Modus wieder zwei */
@media (min-width: 1100px) { .bb:not(.bb-edit) .bb-lay.no-side { grid-template-columns: minmax(0, 1fr); } }
.bb:not(.bb-edit) .bb-lay.no-side > [data-col="side"] { display: none; }
.bb-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 40px; }
.bb-blk { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.bb-blk.bb-laufwerke { gap: 16px; }
.bb-head { display: flex; align-items: center; gap: 8px; min-height: 32px; flex-wrap: wrap; }
.bb-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.bb-head h2 .i { width: 16px; height: 16px; }
.bb-laufwerke > .bb-head { display: none; }
.bb-n { font: 500 .78rem/1 "JetBrains Mono", monospace; color: var(--muted); }
.bb-hint { margin: 0; color: var(--muted); font-size: .86rem; }
.bb-hint a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.bb-grip, .bb-tools { display: none; }
.bb:not(.bb-edit) .bb-blk.is-empty, .bb:not(.bb-edit) .bb-blk.is-hidden { display: none; }
.bb-up { display: contents; }
.bb-src { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-hi);
  color: var(--text-2); font: 500 .72rem "JetBrains Mono", monospace; white-space: nowrap; }
.bb-src .i { width: 13px; height: 13px; }
.bb-seg { display: inline-flex; border: 1px solid var(--line-hi); border-radius: 10px; overflow: hidden; }
.bb-seg button { display: grid; place-items: center; width: 40px; height: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.bb-seg button.on { background: var(--surface-hi); color: var(--text); }
.bb-seg .i { width: 17px; height: 17px; }
.bb-none { margin: 0 0 16px; }

/* Anpassen-Modus */
.bb-ebar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: 14px;
  background: var(--surface-hi); border: 1px solid var(--line-hi); position: sticky; top: calc(var(--top-h) + 8px); z-index: 6; box-shadow: var(--shadow); }
.bb-ebar > .i { width: 20px; height: 20px; color: var(--text-2); }
.bb-ebar .grow { display: flex; flex-direction: column; min-width: 200px; }
.bb-edit .bb-ebar { display: flex; animation: enter .2s var(--ease); }
.bb-edit .bb-blk { outline: 1.5px dashed var(--line-hi); outline-offset: 4px; }
.bb-edit .bb-blk.bb-laufwerke { padding: 12px; border-radius: var(--radius); }
.bb-edit .bb-laufwerke > .bb-head { display: flex; }
.bb-edit .bb-grip { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -6px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); cursor: grab; touch-action: none; }
.bb-edit .bb-grip:hover { background: var(--surface-hi); color: var(--text); }
.bb-edit .bb-tools { display: inline-flex; gap: 2px; }
.bb-edit .bb-blk.is-hidden { opacity: .5; }
.bb-edit .bb-blk.is-empty > :not(.bb-head) { opacity: .8; }
.bb-blk.bb-drag { position: fixed; z-index: 50; box-shadow: var(--shadow); opacity: .95; pointer-events: none; max-height: 260px; overflow: hidden; }
.bb-ph { border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); min-height: 60px; }
.bb-blk.bb-landed { animation: pop .3s var(--ease); }
.bb-blk.bb-out { transition: opacity .15s, transform .15s; opacity: 0; transform: scale(.98); }
.bb-cat .sheet-body { max-height: 70dvh; overflow: auto; }
.bb-catitem { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.bb-catitem:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.bb-catitem .grow { display: flex; flex-direction: column; min-width: 0; }
.bb-catitem .aico { width: 38px; height: 38px; background: var(--surface-hi); }

/* Dateien mit Vorschau (Mappen, Pläne, Schließplan) */
.bb-docs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: start; }
.bb-side .bb-docs, .bb-col[data-col="side"] .bb-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bb-doc { position: relative; min-width: 0; }
.bb-doc-a { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--surface-hi); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: transform .15s var(--ease), border-color .15s, box-shadow .15s; }
.bb-doc-a:hover { transform: translateY(-2px); border-color: var(--line-hi); box-shadow: var(--shadow); }
.bb-pg { position: relative; display: grid; place-items: center; aspect-ratio: 1.414; overflow: hidden; background: var(--bg-2); }
.bb-pg.has { background: #f3f3f1; }
.bb-pg img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; user-select: none; }
.bb-plans .bb-pg img { object-fit: contain; object-position: center; }
.bb-ext { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font: 600 .75rem "JetBrains Mono", monospace; }
.bb-ext .i { width: 26px; height: 26px; }
.bb-pn { position: absolute; right: 6px; bottom: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .66); color: #fff;
  font: 500 .7rem "JetBrains Mono", monospace; font-style: normal; }
.bb-dn { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; font-size: .8rem; line-height: 1.3; min-width: 0; }
.bb-dn b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.bb-dn .muted { font-size: .74rem; }
.bb-doc-dl { position: absolute; top: 6px; right: 6px; background: rgba(15, 17, 21, .72); color: #fff; opacity: 0; transition: opacity .15s; }
.bb-doc:hover .bb-doc-dl, .bb-doc-dl:focus-visible { opacity: 1; }
@media (hover: none) { .bb-doc-dl { opacity: 1; } }

/* Kameras */
.bb-rec { margin: -4px 0 0; }
.bb-rec a { color: var(--text-2); }
.bb-cams { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.bb-cam { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--surface-hi); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: transform .15s var(--ease), border-color .15s; }
.bb-cam:hover { transform: translateY(-2px); border-color: var(--line-hi); }
.bb-cams:not(.all) .bb-cam.more { display: none; }
.bb-still { aspect-ratio: 16 / 9; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.bb-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-nostill { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: .75rem; }
.bb-cap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding: 8px 10px; font-size: .84rem; }
.bb-cap b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-ip { color: var(--muted); font-size: .74rem; }
.bb-model { display: none; }
.bb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.bb-cam.off .bb-dot { background: var(--err); }
.bb-cam.off .bb-still img { filter: grayscale(1) brightness(.7); }
/* Liste mit Details (Standard) oder Kacheln mit Standbild – Umschalter im Kopf, je Gerät gemerkt */
.bb-camwrap.liste .bb-cams, .bb-camwrap:not(.liste) .bb-camtab { display: none; }
.bb-camwrap:not(.all) .more { display: none !important; }
.bb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.bb-chips span { padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .78rem; color: var(--text-2); }
.bb-chips b { color: var(--text); }
.bb-chips .on { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.bb-chips .off { background: color-mix(in srgb, var(--err) 12%, transparent); }
.bb-camtab { overflow-x: auto; margin: 0 -4px; }
.bb-camtab table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.bb-camtab th { text-align: left; font: 600 .68rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: 6px 8px; border-bottom: 1px solid var(--line-hi); white-space: nowrap; }
.bb-camtab td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bb-camtab tbody tr:hover td { background: var(--surface-hi); }
.bb-camtab td a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.bb-camtab td small { display: block; font-size: .74rem; margin-top: 1px; }
.bb-camtab td .mono { font-size: .8rem; }
.bb-camtab tr.off .bb-dot { background: var(--err); }
.bb-camtab tr.off td { color: var(--muted); }
@media (max-width: 560px) { .bb-cams { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bb-cap { grid-template-columns: auto minmax(0, 1fr); } .bb-cap .bb-ip { grid-column: 2; }
  .bb-camtab td small.mono { display: none; } }

/* Geräte */
.bb-devs { display: flex; flex-direction: column; }
.bb-dev { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.bb-dev:first-child { border-top: 0; }
.bb-dev .grow { display: flex; flex-direction: column; min-width: 0; }
.bb-dev .grow b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-dev.off { opacity: .55; }
.bb-short { min-width: 40px; padding: 3px 6px; border-radius: 7px; background: var(--surface-hi); text-align: center; font: 600 .72rem "JetBrains Mono", monospace; color: var(--text-2); }
.bb-tl .muted { margin-left: 2px; }

/* Reiter Dateien: Gruppen je Mappe, Mappe ändern */
.bb-fgroup { display: flex; flex-direction: column; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bb-fgroup:last-of-type { border-bottom: 0; }
.bb-fname { display: flex; align-items: center; gap: 8px; padding: 8px 0 2px; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.bb-fname .i { width: 15px; height: 15px; }
.bb-move input { width: 140px; min-height: 36px; padding: 4px 10px; font-size: 16px; }
@media (max-width: 640px) { .bb-move input { width: 104px; } }
.bb-upfolder { max-width: 320px; }

/* Betrachter: Seiten als Bilder, Leiste mit den Dateien der Mappe */
dialog.vw.has-side[open] { grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto 1fr; }
dialog.vw.has-side .vw-bar { grid-column: 1 / -1; }
.vw-side { display: none; overflow: auto; padding: 4px 12px 16px; border-right: 1px solid rgba(255, 255, 255, .08); }
dialog.vw.has-side .vw-side { display: flex; flex-direction: column; gap: 10px; }
.vw-side button { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; border: 2px solid transparent; background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .85); font: inherit; font-size: .78rem; text-align: left; cursor: pointer; }
.vw-side button.on { border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.vw-side img, .vw-side .vw-noimg { width: 100%; aspect-ratio: 1.414; object-fit: cover; object-position: top; border-radius: 6px; background: #f3f3f1; display: block; }
.vw-side .vw-noimg { background: rgba(255, 255, 255, .08); }
.vw-side span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vw-pages { position: relative; width: 100%; height: 100%; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 4px 0 24px; touch-action: pan-x pan-y pinch-zoom; }
.vw-stage:has(.vw-pages) { place-items: stretch; padding-bottom: 0; }
.vw-pages img { width: calc(var(--z, 1) * min(1000px, 100%)); max-width: none; max-height: none; height: auto; border-radius: 4px; background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .6); transition: none; }
.vw-zoom { display: inline-flex; align-items: center; margin-right: 6px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; overflow: hidden; }
.vw-zoom button { width: 38px; height: 36px; border: 0; background: none; color: #fff; font-size: 1.1rem; cursor: pointer; }
.vw-zoom button:hover { background: rgba(255, 255, 255, .12); }
.vw-zoom b { min-width: 52px; text-align: center; font: 500 .8rem "JetBrains Mono", monospace; }
.vw-pno { color: rgba(255, 255, 255, .6); font: 500 .78rem "JetBrains Mono", monospace; margin-right: 8px; white-space: nowrap; }
dialog.vw.is-pages .vw-nav { top: auto; bottom: 20px; transform: none; }
@media (max-width: 900px) { dialog.vw.has-side[open] { grid-template-columns: minmax(0, 1fr); } dialog.vw.has-side .vw-side { display: none; } }
@media (max-width: 640px) { .vw-zoom, .vw-pno { display: none; } .vw-pages { gap: 8px; } .vw-pages img { border-radius: 0; } }
.bb-v { display: flex; flex-direction: column; min-width: 0; }
.bb-v, .bb-v .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.vw[open]:not(.has-side) { grid-template-columns: minmax(0, 1fr); }

/* Protokoll als Fenster (protokollfenster.js): fast bildschirmfüllend, am Handy ganz */
dialog.prf { width: min(1180px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-width: none; max-height: none; margin: auto;
             padding: 0; border: 1px solid var(--line-hi); border-radius: 18px; background: var(--bg-2); overflow: hidden;
             box-shadow: var(--shadow); }
dialog.prf[open] { display: flex; animation: pop .2s var(--ease); }
dialog.prf iframe { flex: 1; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: inherit; }
dialog.prf::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
@media (max-width: 699px) { dialog.prf { width: 100vw; height: 100dvh; border: 0; border-radius: 0; } }

/* ---------- Modul Netzwerk (0.27): IP-Verwaltung, Racks ---------- */
.nz-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.nz-top .searchbar { margin: 0; min-width: min(100%, 320px); }
.nz-top .searchbar input { min-height: 48px; }
.nz-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.nz-sum b { color: var(--text); font-size: 1rem; }
.nz-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.nz-tabs .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.nz-tabs .segl { white-space: nowrap; }
.nz-kf select { min-height: 42px; }
.nz-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #1a1300; font-size: .72rem; font-weight: 700; }
.nz-cust { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.nz-ctile, .nz-stile, .nz-rtile { display: grid; gap: 10px; color: inherit; text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.nz-ctile:hover, .nz-stile:hover, .nz-rtile:hover { transform: translateY(-2px); border-color: var(--line-hi); box-shadow: var(--shadow); }
.nz-ch { gap: 8px; } .nz-ch b { font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.nz-cnums { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.nz-cnums > span { display: inline-flex; align-items: baseline; gap: 4px; }
.nz-cnums b { font-size: 1.15rem; }
.nz-empty summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.nz-empty { margin-top: 14px; }
.nz-elist { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.nz-sites { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 14px; }
.nz-stile { gap: 4px; }
.nz-stile .nz-cnums { margin-top: 6px; gap: 4px 12px; color: var(--text-2); }
.nz-stile .nz-cnums b { font-size: .95rem; color: var(--text); }
.nz-cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-bottom: 14px; }
@media (min-width: 1100px) { .nz-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .nz-cols.wide-l { grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); } }
.nz-h2 { margin: 8px 0 10px; }
.nz-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.nz-stat { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.nz-stat b { font-size: 1.4rem; }
.nz-stat.warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.nz-ind { display: inline-block; width: calc(var(--d, 0) * 18px); }
.nz-note { display: block; overflow-wrap: anywhere; }
.nz-act { width: 44px; text-align: right; }
.nz-act .iconbtn { width: 36px; height: 36px; margin-left: auto; }
.nz-usecol { width: 150px; }
.nz-use { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: 999px; background: var(--line-hi); overflow: hidden; }
.nz-use i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.nz-use.mid i { background: var(--warn); }
.nz-use.hi i { background: var(--err); }
.nz-pct { margin-left: 6px; }
.nt tr.nz-dim td { color: var(--muted); }
.nt tr.nz-dup td { background: color-mix(in srgb, var(--err) 10%, transparent); }
.nt tr.nz-free td { color: var(--muted); background: color-mix(in srgb, var(--ok) 6%, transparent); }
.nt tr.nz-range td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.nt tr.nz-child td { background: var(--surface-hi); }
.nz-dupitem { display: inline-flex; gap: 4px; align-items: baseline; margin-right: 12px; }
.nz-checks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.nz-sug { margin-bottom: 14px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.nz-sugl { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.nz-sugi { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.nz-sugi .grow { display: grid; min-width: 0; }
.nz-sugi small { overflow-wrap: anywhere; }
.nz-pfacts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 14px; }
.nz-pfact { display: grid; gap: 4px; }
.nz-pfact b { font-size: 1.25rem; }
.nz-pfact .nz-use { width: 100%; }
.nz-addr { gap: 8px; }
/* Löschen unter dem Formular: eigene Zeile mit Abstand und Trennlinie, Knopf nur so breit wie sein Text
   (dialog.sheet form ist eine Spalte – ohne das klebte „Rack löschen“ volle Breite direkt unter „Speichern“, Flo 29.11.) */
.nz-del { display: flex; justify-content: flex-start; }
dialog.sheet form.nz-del { flex-direction: row; justify-content: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.nz-psk { display: inline-flex; align-items: center; gap: 6px; }
.nz-racks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.nz-rtile .nz-use, .nz-rrow .nz-use { width: 100%; }
.nz-rlist { display: grid; gap: 6px; }
.nz-rrow { display: grid; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 8px 10px; min-height: 44px;
  border-radius: 10px; border: 1px solid var(--line); color: inherit; text-decoration: none; }
.nz-rrow:hover { background: var(--surface-hi); }
.nz-rrow .grow { display: grid; }

/* Rack-Builder */
.rk { --rk-h: 34px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .rk { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); } }
.rk-faces { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rk-seg { display: none; grid-column: 1 / -1; justify-self: start; }
.rk-face h2 { margin: 0 0 6px 34px; text-transform: uppercase; letter-spacing: .06em; }
.rk-grid { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); padding: 6px 8px 6px 0; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-hi); }
.rk-u { grid-column: 1 / -1; display: flex; align-items: center; border-top: 1px dashed var(--line); }
.rk-u:first-child { border-top-color: transparent; }
.rk-n { width: 30px; text-align: right; padding-right: 6px; font: 500 .7rem "JetBrains Mono", monospace; color: var(--muted); }
.rk-dev { grid-column: 2; z-index: 1; display: flex; align-items: center; gap: 8px; min-width: 0; margin: 1px 0; padding: 0 10px; border-radius: 7px;
  background: color-mix(in srgb, var(--c) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  font-size: .82rem; cursor: pointer; user-select: none; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.rk-dev:hover { box-shadow: var(--shadow); }
.rk-dev.sel { box-shadow: 0 0 0 2px var(--accent); }
.rk-dev.off { opacity: .55; }
.rk-dev.rk-back { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0 6px, var(--surface) 6px 12px); }
.rk-dev .rk-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rk-dev .rk-m { margin-left: auto; color: var(--muted); font: .72rem "JetBrains Mono", monospace; white-space: nowrap; }
.rk-k { flex: none; display: inline-grid; place-items: center; min-width: 28px; height: 18px; padding: 0 4px; border-radius: 5px; background: var(--c); color: #fff; font: 700 .66rem "Inter Tight", sans-serif; }
.rk-ghost { grid-column: 2; z-index: 2; border-radius: 7px; pointer-events: none; background: color-mix(in srgb, var(--ok) 25%, transparent); border: 2px dashed var(--ok); }
.rk-ghost.bad { background: color-mix(in srgb, var(--err) 22%, transparent); border-color: var(--err); }
.rk-armed .rk-grid { box-shadow: 0 0 0 2px var(--accent); cursor: copy; }
.rk-free { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.rk-fi { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: inherit; text-align: left; cursor: grab; }
.rk-fi .grow { display: grid; min-width: 0; }
.rk-fi .grow b, .rk-fi small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-fi.armed { background: var(--accent-soft); border-color: var(--accent); }
.rk-fi.off { opacity: .6; }
.rk-side .searchbar { margin: 0; }
@media (max-width: 699px) {
  .rk { --rk-h: 36px; }
  .rk-faces { grid-template-columns: minmax(0, 1fr); }
  .rk-seg { display: inline-flex; }
  .rk[data-show="vorne"] .rk-face[data-face="hinten"], .rk[data-show="hinten"] .rk-face[data-face="vorne"] { display: none; }
  .rk-face h2 { display: none; }
}
/* 0.36 Rack-Builder: Einschübe wie echte Hardware – Switches mit Frontansicht der Portbelegung, Geräte als dunkle
   Einschübe mit Name und IP, generische Teile als Bild. Die Teile sind immer dunkel (Hardware), auch im hellen Design. */
.rk-dev.rk-hw { gap: 8px; padding: 0; border: 1px solid #0c0e11; border-radius: 4px; color: #e8ecf1;
  background: linear-gradient(180deg, #434a54 0%, #2a2f37 55%, #23272e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.rk-dev.rk-hw:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow); }
.rk-ear { flex: none; align-self: stretch; width: 14px; display: flex; flex-direction: column; justify-content: space-around; align-items: center;
  background: linear-gradient(90deg, #363c45, #2c3139); }
.rk-ear i { width: 5px; height: 7px; border-radius: 3px; background: #0d0f12; box-shadow: inset 0 1px 2px #000; }
.rk-hw .rk-k { min-width: 30px; }
.rk-lbl { display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap; min-width: 0; flex: 1; overflow: hidden; max-height: 100%; }
.rk-lbl .rk-t { color: #f1f4f8; font-size: .8rem; }
.rk-ip { font: 500 .7rem "JetBrains Mono", monospace; color: #aeb6c2; white-space: nowrap; }
.rk-mod { flex-basis: 100%; color: #9aa3af; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-leds { flex: none; display: flex; gap: 4px; margin-right: 4px; }
.rk-leds i { width: 6px; height: 3px; border-radius: 1px; background: #3a3f47; }
.rk-leds i.on { background: #3ddc84; box-shadow: 0 0 5px #3ddc84; }
.rk-dev.off .rk-leds i.on { background: #3a3f47; box-shadow: none; }
.rk-dev.rk-hw.rk-back, .rk-dev.rk-front.rk-back { background: repeating-linear-gradient(135deg, #2e333b 0 6px, #24282e 6px 12px); }
.rk-dev.sel, .rk-dev.rk-hw.sel { box-shadow: 0 0 0 2px var(--accent); }
/* Switch mit Frontansicht: das Port-Feld füllt die HE, Ports schrumpfen auf die verfügbare Breite */
.rk-dev.rk-front { padding: 0; border: 0; background: none; border-radius: 4px; overflow: hidden; }
.rk-front .fp { display: flex; width: 100%; height: 100%; min-width: 0; gap: 8px; padding: 0 0; border-radius: 4px; }
.rk-front .fp-ear { margin: 0; width: 14px; }
.rk-front .fp-ear i { width: 5px; height: 7px; }
.rk-front .fp-brand { flex: 0 1 190px; min-width: 96px; max-width: 220px; gap: 0; align-content: center; }
.rk-front .fp-brand b { font-size: .78rem; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-front .fp-brand .rk-ip { font-size: .68rem; }
.rk-front .fp-blk { flex: 0 1 auto; min-width: 0; grid-auto-columns: minmax(0, 24px); gap: 2px; padding: 2px 3px; }
.rk-front .fp-blk + .fp-blk { margin-left: -2px; }
.rk-front .fp-p { width: auto; min-width: 0; gap: 0; }
.rk-front .fp-nr, .rk-front .fp-led, .rk-front .fp-pwr { display: none !important; }
.rk-front .fp-jack { width: 100%; height: var(--jh, 13px); }
.rk-front .fp-jack b { font-size: clamp(.42rem, calc(var(--jh, 13px) * .55), .62rem); transform: translateY(1px); }
.rk-front .fp-flip .fp-jack b { transform: translateY(-1px); }
.rk-front .fp-sfp { width: auto; }
.rk-front .fp-sfp .fp-jack { width: 100%; height: calc(var(--jh, 13px) * .8); border-width: 1px; }
.rk-front .fp-p { -webkit-user-drag: none; }
.rk-front.rk-tight .fp-jack b, .rk-front .fp-sfp .fp-jack b { display: none; }
.rk-front .fp > :last-child.fp-ear { margin-left: auto; }
/* Generische Teile: Platte mit Ohren, Bild je Art (--pl Plattenfarbe, i = Einsatz) */
.rk-dev.rk-pasdev { position: relative; padding: 0; border: 0; background: none; border-radius: 3px; overflow: hidden; }
.rk-pas { --pl: #30353d; position: relative; display: block; border-radius: 3px;
  background: linear-gradient(90deg, #23272e 0 9%, var(--pl) 9% 91%, #23272e 91%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(0, 0, 0, .5); }
.rk-pasdev .rk-pas { position: absolute; inset: 0; background: linear-gradient(90deg, #23272e 0 14px, var(--pl) 14px calc(100% - 14px), #23272e calc(100% - 14px)); }
.rk-pas i { position: absolute; inset: 30% 14%; }
.rk-pasn { position: relative; z-index: 1; margin-left: 20px; max-width: calc(32% - 28px); padding: 0 6px; border-radius: 4px; font-size: .72rem; font-weight: 600;
  color: #e8ecf1; background: rgba(0, 0, 0, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pas[data-art="patchfeld"] i { inset: 28% 14%; background: repeating-linear-gradient(90deg, #d6dbe2 0 6px, transparent 6px 9px); }
.rk-pasdev .rk-pas:is([data-art="patchfeld"], [data-art="lwl"], [data-art="kabel"], [data-art="buerste"], [data-art="boden"], [data-art="steckdose"], [data-art="luefter"], [data-art="hutschiene"]) i { left: 32%; right: 22px; }
.rk-pas[data-art="lwl"] i { inset: 28% 14%; background: repeating-linear-gradient(90deg, #4f8fe6 0 4px, #2a2f37 4px 5px, #4f8fe6 5px 9px, transparent 9px 13px); }
.rk-pas[data-art="kabel"] i { inset: 18% 14%; border-top: 2px solid #6b7480; border-bottom: 2px solid #6b7480;
  background: repeating-linear-gradient(90deg, transparent 0 12px, #9aa3af 12px 15px); }
.rk-pas[data-art="buerste"] i { inset: 38% 14%; border-radius: 2px; background: repeating-linear-gradient(90deg, #0d0f12 0 1px, #2b3037 1px 3px); }
.rk-pas[data-art="boden"] { --pl: #7d8592; }
.rk-pas[data-art="boden"] i { inset: 40% 14%; background: repeating-linear-gradient(90deg, #5b636e 0 10px, transparent 10px 14px); }
.rk-pas[data-art="auszug"] { --pl: #7d8592; }
.rk-pas[data-art="auszug"] i { inset: 34% 42%; border-radius: 3px; background: #2a2f37; }
.rk-pas[data-art="schublade"] { --pl: #3a4049; }
.rk-pas[data-art="schublade"] i { inset: 40% 38%; border-radius: 4px; background: linear-gradient(180deg, #b8bfc9, #7d8592); }
.rk-pas[data-art="steckdose"] { --pl: #17191d; }
.rk-pas[data-art="steckdose"] i { inset: 16% 14%; background: radial-gradient(circle, #e5e7eb 0 34%, #9aa3af 35% 40%, transparent 42%) 0 50% / 16px 100% repeat-x; }
.rk-pas[data-art="luefter"] i { inset: 10% 20%; background: radial-gradient(circle, #23272e 0 18%, #6b7480 20% 24%, #23272e 26% 46%, transparent 48%) 0 50% / 26px 100% repeat-x; }
.rk-pas[data-art="hutschiene"] { --pl: #a7afba; }
.rk-pas[data-art="hutschiene"] i { inset: 12% 12%; background: linear-gradient(180deg, transparent 0 22%, #e4e8ee 22% 30%, transparent 30% 70%, #e4e8ee 70% 78%, transparent 78%); }
.rk-pas[data-art="konsole"] i { inset: 24% 34%; border-radius: 2px; background: linear-gradient(180deg, #1b2433, #2e4057); box-shadow: 0 0 0 1px #0c0e11; }
.rk-pas[data-art="blende"] { --pl: #2b3037; }
/* Elemente-Liste rechts: Kacheln mit Bild, ziehbar */
.rk-els { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.rk-el { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 6px; align-items: center; min-height: 44px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: grab; }
.rk-el:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.rk-el:active { cursor: grabbing; }
.rk-elpic { grid-column: 1 / -1; height: 14px; }
.rk-eln { font-size: .82rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-el small { font-size: .72rem; white-space: nowrap; }
/* Seitenleiste klebt, damit man beim langen Rack nicht zurückscrollen muss */
@media (min-width: 1000px) {
  .rk-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; }
  .rk-side .rk-free { max-height: 38vh; }
}
.nz-mono { font-family: "JetBrains Mono", monospace; letter-spacing: -.02em; }
@media (max-width: 699px) {
  .nz-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .nz-stat { padding: 8px 10px; }
  .nz-stat b { font-size: 1.1rem; }
  .nz-use { width: 56px; }
  .nz-usecol { width: auto; }
}
.nb-take { margin-bottom: 14px; }

/* Reiter Backups (doku/_backups.html): Karten je Gerät, gruppiert nach Geräteart */
.bk-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bk-head h2 { margin: 0 0 4px; }
.bk-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 12px;
             background: var(--surface); }
.bk-search input { flex: 1; min-width: 0; border: 0; background: none; min-height: 44px; padding: 0; font-size: 16px; color: var(--text); outline: none; box-shadow: none; }
/* Fokus am Rahmen statt als zweiter Kasten im Feld (Flo 29.11.: „hässliches Highlight“ beim Tippen) */
.bk-search { transition: border-color .15s, box-shadow .15s; }
.bk-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-search .i { color: var(--muted); }
.bk-grp h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font-size: 1rem; }
.bk-grp h3 em { font-style: normal; font: 600 .72rem "JetBrains Mono", monospace; padding: 2px 7px; border-radius: 6px; background: var(--bg-2); color: var(--text-2); }
.bk-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.bk-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; min-width: 0; }
.bk-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.bk-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.bk-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.bk-name b { overflow-wrap: anywhere; }
.bk-name a { color: var(--text); }
.bk-st { flex: none; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.bk-st.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.bk-st.old { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.bk-file { margin: 0; font-size: .78rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-act form { margin-left: auto; }
.bk-del { color: var(--err); }
.bk-meta { margin: 0; }
.bk-older { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.bk-chip { display: inline-flex; align-items: center; border: 1px solid var(--line-hi); border-radius: 999px; font-size: .78rem; overflow: hidden; }
.bk-chip a { padding: 4px 4px 4px 10px; color: var(--text); }
.bk-chip form { display: contents; }
.bk-chip button { border: 0; background: none; color: var(--err); padding: 4px 9px 4px 6px; cursor: pointer; font: inherit; min-height: 30px; }
.bk-empty { padding: 18px; }
/* ---------- Portbelegung (0.27.2) ---------- */
.gr-chips button.chip { font-family: inherit; cursor: pointer; border: 0; }
.pb-fold > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pb-fold[open] > summary { margin-bottom: 6px; }
.pb-warn { color: var(--err); font-weight: 700; }
.pb-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--text-2); }
.pb-lg { display: inline-flex; align-items: center; gap: 6px; }
.pb-sw { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 4px; border-radius: 5px; font-style: normal;
  font: 600 .75rem/1 "JetBrains Mono", monospace; background: var(--c); color: var(--f); border: 1px solid rgba(0, 0, 0, .25); position: relative; overflow: hidden; }
.pb-panel { overflow-x: auto; padding: 10px; border-radius: 10px; background: #1c2129; border: 1px solid var(--line); display: grid; gap: 6px; justify-content: start; }
.pb-row { display: flex; gap: 6px; }
.pb-p { position: relative; overflow: hidden; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 6px; background: var(--c); color: var(--f);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; border: 1px solid rgba(0, 0, 0, .35); }
.pb-p small { font-size: .62rem; opacity: .75; max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-p b { font: 700 .8rem/1.1 "JetBrains Mono", monospace; }
.pb-p:hover, .pb-p:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Hybrid: dunkle Ecke oben rechts */
.pb-hybrid::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 12px 12px 0; border-color: transparent rgba(0, 0, 0, .55) transparent transparent; }
.pb-sw.pb-hybrid::after { border-width: 0 8px 8px 0; }
/* abgeschaltet: schraffiert */
.pb-aus { background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, .28) 0 3px, transparent 3px 7px); }
.pb-hint { border: 2px solid var(--err); box-shadow: 0 0 0 1px var(--err); }
.pb-dim { opacity: .2; }
.pb-hit { outline: 2px solid var(--accent); outline-offset: 1px; }
.pb-hints { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.pb-t td, .pb-devs td { vertical-align: top; }
.pb-off td { color: var(--muted); }
@keyframes pb-flash { from { background: var(--accent-soft); } to { background: transparent; } }
.pb-flash td { animation: pb-flash 1.6s ease-out; }
@media (max-width: 640px) {
  .pb-legend { font-size: .8rem; }
}
/* Baustein Netzwerk-Doku: je Switch eine Zeile mit Port-Leiste */
.bb-sws { display: grid; gap: 2px; }
.bb-sw { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; align-items: center; gap: 12px; min-height: 44px;
  padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.bb-sw:hover { background: var(--surface-hi); }
.bb-swn { display: grid; min-width: 0; }
.bb-swn b, .bb-swn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-strip { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 9px); grid-auto-columns: 9px; justify-content: start; gap: 2px; }
.bb-strip i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); border: 1px solid rgba(0, 0, 0, .3); }
.bb-strip i.pb-hint { border: 1.5px solid var(--err); box-shadow: none; }
.bb-swu { white-space: nowrap; text-align: right; }
.bb-nets { display: grid; }
@media (max-width: 640px) {
  .bb-sw { grid-template-columns: 1fr auto; }
  .bb-strip { grid-column: 1 / -1; grid-row: 2; overflow: hidden; }
}
/* Backups: Gruppen-Icons in der Farbe der Geräteart (0.27.4) */
.bk-ico[style*="--c"] { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.bk-ico .i { width: 22px; height: 22px; }
.bk-gico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
/* Portbelegung als Kacheln (0.27.5) */
.pb-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); margin-bottom: 14px; }
.pb-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; text-align: left; font: inherit;
  color: var(--text); cursor: pointer; text-decoration: none; border: 1px solid var(--line); }
.pb-tile:hover { background: var(--surface-hi); }
.pb-tile.on { outline: 2px solid var(--c); outline-offset: -1px; }
.pb-tico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.pb-tico .i { width: 24px; height: 24px; }
.pb-tn { display: grid; line-height: 1.2; min-width: 0; }
.pb-tn b { font-size: 1.35rem; font-weight: 700; }
.pb-tn span { color: var(--text-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-devlist > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pb-devlist > summary::-webkit-details-marker { display: none; }
.pb-devlist > summary h2 { margin: 0; }
.pb-devlist > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.3rem; transition: transform .2s; }
.pb-devlist[open] > summary::after { transform: rotate(90deg); }
.pb-devlist[open] > summary { margin-bottom: 10px; }
.pb-devlist { margin-bottom: 14px; }
.pb-swgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pb-swc { display: grid; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
.pb-swc:hover { background: var(--surface-hi); }
.pb-swh { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.pb-swh b:first-child, .pb-swm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-swc .bb-strip { overflow: hidden; grid-column: auto; grid-row: auto; }
/* zugeklappte Switch-Ansichten nicht als lange Liste zeigen – die Kacheln öffnen sie */
/* Knopf während einer langen Aktion (data-busy) */
.btn.busy { pointer-events: none; opacity: .85; cursor: progress; }
.btn.busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: btnspin .8s linear infinite; }
@keyframes btnspin { to { transform: rotate(360deg); } }

/* 0.28.0 Portbelegung: VLAN-Übersicht, Gruppen, Frontansicht wie am Gerät */

.pb-gh { display: flex; align-items: center; gap: 10px; }
.pb-gh .pb-tico { width: 32px; height: 32px; }
.pb-aps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pb-ap { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-hi); min-width: 0; }
.pb-ap > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-ap a.small { display: flex; align-items: center; min-height: 28px; }

.fp-wrap { overflow-x: auto; padding: 2px 0 6px; }
.fp { display: inline-flex; align-items: center; gap: 14px; padding: 12px 16px; min-width: max-content; border-radius: 6px; color: #cfd5de;
  background: linear-gradient(180deg, #434a54 0%, #2a2f37 55%, #23272e 100%); border: 1px solid #0c0e11;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 3px 10px rgba(0, 0, 0, .35); }
.fp.fp-rack { padding: 10px 0; gap: 12px; }
.fp-ear { align-self: stretch; width: 20px; margin: -10px 0; display: flex; flex-direction: column; justify-content: space-around; align-items: center;
  background: linear-gradient(90deg, #363c45, #2c3139); border-radius: 4px; }
.fp-ear i { width: 7px; height: 12px; border-radius: 4px; background: #0d0f12; box-shadow: inset 0 1px 2px #000; }
.fp-brand { display: grid; gap: 1px; min-width: 96px; max-width: 150px; font-size: .68rem; color: #9aa3af; }
.fp-brand b { font-size: .82rem; color: #e8ecf1; letter-spacing: .06em; text-transform: uppercase; }
.fp-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-pwr { display: flex !important; align-items: center; gap: 5px; margin-top: 6px; font-size: .58rem; letter-spacing: .08em; }
.fp-blk { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 1), auto); gap: 3px 4px; padding: 5px 6px;
  border-radius: 4px; background: #14171b; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .06); }
.fp-p { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 36px; color: #9aa3af; text-decoration: none; border-radius: 4px; }
.fp-p.fp-flip { flex-direction: column-reverse; }
.fp-nr { font: 600 .6rem/1.1 "JetBrains Mono", monospace; max-width: 36px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; border-radius: 3px; }
.fp-jack { display: grid; place-items: center; width: 32px; height: 27px; color: var(--f);
  background: linear-gradient(180deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0) 45%), var(--c);
  clip-path: polygon(0 22%, 26% 22%, 26% 0, 74% 0, 74% 22%, 100% 22%, 100% 100%, 0 100%); }
.fp-flip .fp-jack { clip-path: polygon(0 0, 100% 0, 100% 78%, 74% 78%, 74% 100%, 26% 100%, 26% 78%, 0 78%);
  background: linear-gradient(0deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0) 45%), var(--c); }
.fp-jack b { font: 700 .66rem/1 "JetBrains Mono", monospace; transform: translateY(3px); }
.fp-flip .fp-jack b { transform: translateY(-3px); }
.fp-sfp { width: 40px; }
.fp-sfp .fp-jack { width: 38px; height: 18px; clip-path: none; border-radius: 2px; border: 2px solid #9aa1ab;
  box-shadow: inset 0 0 0 1px #000; }
.fp-sfp .fp-jack b, .fp-flip.fp-sfp .fp-jack b { transform: none; }
.fp-led { display: inline-block; width: 8px; height: 3px; border-radius: 1px; background: #3a3f47; }
.fp-led.on { background: #3ddc84; box-shadow: 0 0 5px #3ddc84; }
.fp-p.pb-aus .fp-jack { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .4) 0 3px, transparent 3px 7px), var(--c); }
.fp-p.pb-hint { border: 0; box-shadow: none; }
.fp-p.pb-hint .fp-nr { background: var(--err); color: #fff; }
.fp-p:hover .fp-jack, .fp-p:focus-visible .fp-jack { filter: brightness(1.25); }
.fp-p:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fp-p.pb-hit { outline: 2px solid var(--accent); outline-offset: 2px; }
.an-st + .an-stats, .an-kv + .an-stats { margin-top: auto; }
.bb-vlans { display: flex; flex-wrap: wrap; gap: 6px; }
.bb-vl { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px 3px 4px; border-radius: 8px; font-size: .82rem;
  background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.bb-vl:hover { background: var(--surface-hi); }
.bb-vl .mono { font-size: .74rem; }
.bb-vl.pb-vt0 { color: var(--muted); }
.bb-gh { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .9rem; font-weight: 650; }
.bb-gh .i { width: 18px; height: 18px; color: var(--c); }
.bb-ap { grid-template-columns: minmax(160px, 1fr) auto; }
.pb-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pb-vc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); min-width: 0; }
.pb-vc .pb-sw { flex: none; margin-top: 1px; }
.pb-vcn { display: grid; gap: 1px; min-width: 0; }
.pb-vcn > * { overflow: hidden; text-overflow: ellipsis; }
.pb-vc.pb-vt0 { opacity: .6; }
@media (max-width: 560px) {
  .pb-swgrid, .pb-aps, .pb-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pb-vc { padding: 8px; gap: 8px; }
  .pb-ap { padding: 8px 10px; }
  .pb-swc .bb-strip { grid-template-rows: repeat(2, 6px); grid-auto-columns: 6px; gap: 1px; }
  .pb-swc .bb-strip i { width: 6px; height: 6px; }
}
.pb-swh .pb-warn { flex: none; white-space: nowrap; }
@media (max-width: 560px) { .pb-swh b:first-child { white-space: normal; overflow-wrap: anywhere; font-size: .86rem; } }
/* 0.28.1: Switches untereinander, Hover-Infos am Port */
.pb-switch { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
.pb-switch[hidden] { display: none; }
.pb-grp > .row + .pb-switch { border-top: 0; padding-top: 4px; }
.pb-swtop { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.pb-swtitle { min-width: 0; }
.pb-swtitle h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.pb-swtitle p { margin: 2px 0 0; }
.pb-swact a { min-height: 32px; }
.fp-tip { position: fixed; z-index: 100; display: grid; gap: 2px; max-width: 320px; padding: 8px 10px; border-radius: 8px; pointer-events: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-hi); box-shadow: var(--shadow); font-size: .8rem; }
.fp-tip b { font-weight: 650; }
.fp-tip span { color: var(--text-2); }
.fp-tip .warn { color: var(--err); }
.fp-tip[hidden] { display: none; }
.pb-switch > *, .pb-swbody > * { min-width: 0; }
.pb-swbody { display: flex; flex-wrap: wrap; column-gap: 28px; row-gap: 6px; align-items: flex-start; }
.pb-swbody > .fp-wrap, .pb-swbody > details[open] { flex-basis: 100%; }
/* 0.28.2: Access Points in Clustern */
.pb-clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; align-items: start; }
.pb-cl { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--c, #30a46c) 5%, var(--surface)); min-width: 0; }
.pb-clh { display: grid; gap: 1px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.pb-cll { list-style: none; margin: 0; padding: 0; display: grid; }
.pb-cll li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-height: 34px; }
.pb-apn { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.pb-apn .i { width: 14px; height: 14px; flex: none; color: var(--c, #30a46c); }
.pb-apat { grid-column: 1 / -1; margin: -6px 0 4px 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-apc { padding-left: 10px; }
.bb-apc .i { width: 14px; height: 14px; color: #30a46c; }
.bb-apc b { font-weight: 650; }
/* 0.28.3: AP-Cluster zugeklappt, Abstände zwischen den Karten */
#pb-vlans, .pb-tools, .pb-grp, .pb-devlist { margin-top: 16px; }
.pb-clusters { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.pb-cl { padding: 0; }
.pb-cl > summary { list-style: none; cursor: pointer; display: grid; gap: 6px; padding: 10px 12px; min-height: 44px; }
.pb-cl > summary::-webkit-details-marker { display: none; }
.pb-cl > summary .pb-clh { border: 0; padding: 0; margin: 0; }
.pb-cl[open] { grid-column: 1 / -1; }
.pb-cl[open] > summary { border-bottom: 1px solid var(--line); }
.pb-cl .pb-cll { padding: 6px 12px 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); column-gap: 20px; }
.pb-cldots { display: flex; flex-wrap: wrap; gap: 3px; }
.pb-cldots i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--c, #30a46c) 35%, transparent); }
.pb-cldots i.on { background: var(--c, #30a46c); }
@media (max-width: 560px) { .pb-clusters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } .pb-cl > summary { padding: 8px 10px; } }

/* ---------- Tag/Nacht-Schalter (aus wePreview, daynight.js) ----------
   Teqlo-Note: Nachthimmel und Taghimmel sind mit der Akzentfarbe aus dem Branding getönt, Rand wie die Teqlo-Linien.
   Der Knopf ist 44 px hoch (Tipp-Fläche), die Pille darin 60 × 32 (Handy 54 × 30). */
.day-night { position: relative; display: grid; place-items: center; height: var(--tap); padding: 0 2px; border: 0; background: none;
  cursor: pointer; flex: none; border-radius: 99px; -webkit-tap-highlight-color: transparent; --dn-w: 60px; --dn-h: 32px; --dn-k: 24px; }
.day-night:focus-visible { outline: none; }
.day-night:focus-visible .dn-pill { outline: 2px solid var(--accent); outline-offset: 2px; }
.dn-pill { position: relative; display: block; width: var(--dn-w); height: var(--dn-h); border-radius: 99px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 1px var(--line-hi); }
.dn-sky, .dn-night, .dn-day { position: absolute; inset: 0; border-radius: inherit; }
.dn-night { background: linear-gradient(135deg, #0b1020 0%, color-mix(in srgb, var(--accent) 38%, #141a3a) 58%, color-mix(in srgb, var(--accent) 72%, #2b2f6e) 100%); transition: opacity .5s; }
.dn-day { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 35%, #8fd0f3) 0%, #cfe9f8 100%); opacity: 0; transition: opacity .5s; }
.dn-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .9;
  transition: transform .5s cubic-bezier(.5, 1.4, .4, 1), opacity .4s; animation: dn-twinkle 2.6s ease-in-out infinite; }
.dn-stars i:nth-child(1) { left: 56%; top: 20%; }
.dn-stars i:nth-child(2) { left: 72%; top: 38%; width: 1.5px; height: 1.5px; animation-delay: .6s; }
.dn-stars i:nth-child(3) { left: 84%; top: 17%; animation-delay: 1.1s; }
.dn-stars i:nth-child(4) { left: 64%; top: 65%; width: 1.5px; height: 1.5px; animation-delay: 1.7s; }
.dn-stars i:nth-child(5) { left: 81%; top: 70%; animation-delay: .3s; }
.dn-stars i:nth-child(6) { left: 47%; top: 44%; width: 1px; height: 1px; animation-delay: 2s; }
.dn-stars i:nth-child(7) { left: 90%; top: 47%; width: 1px; height: 1px; animation-delay: .9s; }
@keyframes dn-twinkle { 50% { opacity: .35; } }
.dn-clouds { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateY(60%); opacity: 0;
  transition: transform .55s cubic-bezier(.4, 1.3, .4, 1), opacity .4s; }
.dn-clouds .dn-c1 { fill: rgba(255, 255, 255, .75); }
.dn-clouds .dn-c2 { fill: #fff; }
.dn-knob { position: absolute; top: calc((var(--dn-h) - var(--dn-k)) / 2); left: calc((var(--dn-h) - var(--dn-k)) / 2);
  width: var(--dn-k); height: var(--dn-k); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbfbfb 0%, #d9d9de 60%, #b9b9c2 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4), inset -2px -2px 4px rgba(0, 0, 0, .12);
  transition: transform .55s cubic-bezier(.5, 1.45, .4, 1), background .45s, box-shadow .45s, width .15s; }
/* Mondkrater – verschwinden bei Tag */
.dn-knob i { position: absolute; border-radius: 50%; background: rgba(150, 150, 165, .45); transition: opacity .3s; }
.dn-knob i:nth-child(1) { width: 24%; height: 24%; left: 22%; top: 26%; }
.dn-knob i:nth-child(2) { width: 16%; height: 16%; left: 58%; top: 54%; }
.dn-knob i:nth-child(3) { width: 12%; height: 12%; left: 34%; top: 66%; }
.day-night[aria-checked="true"] .dn-night { opacity: 0; }
.day-night[aria-checked="true"] .dn-day { opacity: 1; }
.day-night[aria-checked="true"] .dn-stars i { opacity: 0; transform: translateY(-12px) scale(.4); }
.day-night[aria-checked="true"] .dn-clouds { opacity: 1; transform: none; }
.day-night[aria-checked="true"] .dn-knob {
  transform: translateX(calc(var(--dn-w) - var(--dn-h))) rotate(180deg);
  background: radial-gradient(circle at 35% 30%, #fff7b0 0%, #ffd23f 55%, #f5a623 100%);
  box-shadow: 0 0 0 4px rgba(255, 214, 80, .25), 0 0 14px rgba(255, 200, 60, .7), 0 2px 6px rgba(0, 0, 0, .2); }
.day-night[aria-checked="true"] .dn-knob i { opacity: 0; }
.day-night:hover .dn-knob { filter: brightness(1.05); }
.day-night:active .dn-knob { width: calc(var(--dn-k) + 4px); }
.day-night[aria-checked="true"]:active .dn-knob { transform: translateX(calc(var(--dn-w) - var(--dn-h) - 4px)) rotate(180deg); }
@media (max-width: 640px) { .day-night { --dn-w: 54px; --dn-h: 30px; --dn-k: 22px; } }

/* Welle beim Umschalten: alter Stand bleibt stehen, der neue wächst vom Schalter aus darüber */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-wave::view-transition-new(root) { clip-path: circle(0px at var(--wave-x, 100%) var(--wave-y, 0px)); }
html.theme-wave * { transition: none !important; }
html.theme-wave .day-night * { transition: inherit; }
/* ohne Welle (alter Browser, „Bewegung reduzieren“): Farben weich überblenden */
html.theme-swap, html.theme-swap * { transition: background-color .3s, color .3s, border-color .3s !important; }
@media (prefers-reduced-motion: reduce) {
  .dn-stars i { animation: none; }
  .dn-knob, .dn-clouds { transition-duration: .01s; }
}

/* Werkzeuge › Teqlo-Scanner */
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Import-Seite für unterwegs (import.firma.at) */
.imp-page .topbar { gap: 10px; }
.imp-user { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-main { padding: 24px clamp(16px, 3vw, 40px) 40px; }
.imp-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.imp-hero h1 { font-size: 1.8rem; }
.imp-hero p { margin: 4px 0 0; max-width: 70ch; }
.imp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.imp-go { align-self: stretch; justify-content: center; min-height: 52px; font-size: 1.02rem; }
.imp-ps { display: flex; gap: 8px; align-items: stretch; }
.imp-ps code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line);
  font: .8rem/1.5 "JetBrains Mono", monospace; word-break: break-all; user-select: all; }
.imp-code { margin: 4px 0; font-size: 2.2rem; font-weight: 600; letter-spacing: .25em; }
.imp-fuss { margin-top: 18px; }
@media (max-width: 640px) { .imp-hero { align-items: flex-start; } .imp-hero .ms-ico.xl { width: 56px; height: 56px; border-radius: 14px; } .imp-ps { flex-direction: column; } }
.imp-main a:not(.btn) { color: var(--accent); }

/* Netzdaten ohne Netzwerk-Anlage: gestrichelte Karte mit „Als Anlage anlegen“ */
.an-card.an-ghost { border-style: dashed; background: transparent; cursor: default; }
.an-ghost-act { gap: 8px; margin-top: 4px; }

/* ---------- Scrollleisten im Teqlo-Design (Flo 29.11.: die Standard-Leiste unter dem Board war hässlich) ----------
   Chrome/Edge/Safari: schmale, runde Leiste ohne Pfeile, Spur unsichtbar, Griff in der Linienfarbe, beim Darüberfahren kräftiger.
   Firefox kennt ::-webkit-scrollbar nicht → dort scrollbar-width/-color. Elemente mit eigenem scrollbar-width (none/thin)
   behalten ihre Regel, weil Chrome dann die webkit-Regeln für sie ignoriert. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--line-hi) padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 70%, transparent) padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--accent) padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }
}

/* Datei wählen in den Einstellungen (settings.js) – eigener Knopf statt Browser-Knopf */
label:has(> .filepick-in) { position: relative; }
.filepick-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.filepick { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 6px; cursor: pointer; }
.filepick .btn { pointer-events: none; }
.filepick-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .85rem; font-weight: 450; }
.filepick.has .filepick-n { color: var(--text); }
label:has(> .filepick-in:focus-visible) .filepick .btn { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Suchfelder: Browser-Löschkreuz (blau, je nach Browser) durch ein ruhiges Teqlo-Kreuz ersetzen */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-left: 6px; cursor: pointer;
  background: var(--muted); opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 14px no-repeat;
}
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; background: var(--text); }

/* ---------- Glocke oben rechts (0.36.0, glocke.js) – Nachbau der wePreview-Glocke ---------- */
.bell { position: relative; }
.bell-btn { position: relative; border: 0; background: none; cursor: pointer; }
.bell-btn .i { width: 21px; height: 21px; }
.bell-btn .bell-off, .bell.muted .bell-btn .bell-on { display: none; }
.bell.muted .bell-btn .bell-off { display: block; }
.bell.muted .bell-btn { opacity: .6; }
.bell-btn.has-new, .bell-btn[aria-expanded="true"] { color: var(--accent); }
.bell-btn[aria-expanded="true"] { background: var(--surface); }
.bell-btn.ring .bell-on { animation: bell-ring 1.2s var(--ease) 2; transform-origin: 50% 12%; }
@keyframes bell-ring { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); }
  30% { transform: rotate(10deg); } 40% { transform: rotate(-6deg); } 50% { transform: rotate(3deg); } }
.bell-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--bg);
  font: 700 10px/18px "JetBrains Mono", monospace; text-align: center; pointer-events: none; animation: bell-badge .3s var(--ease); }
.bell-count[hidden] { display: none; }
@keyframes bell-badge { from { transform: scale(.3); opacity: 0; } }

.bell-panel { position: absolute; right: -52px; top: calc(100% + 8px); z-index: 40; width: 380px; display: flex; flex-direction: column;
  max-height: min(560px, calc(100dvh - var(--top-h) - 24px)); background: var(--surface); border: 1px solid var(--line-hi);
  border-radius: 16px; box-shadow: var(--shadow); transform-origin: top right; animation: pop .18s var(--ease); overflow: hidden; }
.bell-panel[hidden] { display: none; }
.bell-head { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.bell-head > b { flex: 1; font-size: .98rem; }
.bell-tools { display: flex; gap: 2px; }
.bell-tools .iconbtn.sm { width: 34px; height: 34px; border: 0; background: none; cursor: pointer; }
.bell-tools .iconbtn.sm .i { width: 17px; height: 17px; }
.bell-menu { top: calc(100% - 2px); right: 8px; z-index: 2; }
.bell-muted { flex: none; margin: 8px 10px 0; padding: 8px 12px; border-radius: 10px; font-size: .84rem;
  background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); }
.bell-muted[hidden] { display: none; }
.bell-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.bell-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 22px 30px; text-align: center; color: var(--muted); font-size: .88rem; margin: 0; }
.bell-empty .i { width: 30px; height: 30px; color: var(--muted); opacity: .6; }
.bell-empty b { color: var(--text); font-size: .95rem; }

.bell-item { position: relative; border-radius: 12px; transition: opacity .22s, transform .22s, background .15s; }
.bell-item + .bell-item { margin-top: 2px; }
.bell-item.new { background: var(--accent-soft); }
.bell-item:hover { background: var(--surface-hi); }
.bell-item.new:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.bell-item.gone { opacity: 0; transform: translateX(20px); }
.bell-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px 36px 10px 10px; color: inherit; text-decoration: none; min-height: var(--tap); }
.bell-av { position: relative; flex: none; width: 38px; height: 38px; }
.bell-av .avatar.xs { width: 38px; height: 38px; font-size: .76rem; }
.bell-ico { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--surface); }
.bell-ico .i { width: 11px; height: 11px; stroke-width: 2.4; }
.bell-av.solo .bell-ico { position: static; width: 38px; height: 38px; background: var(--surface-hi); color: var(--accent); box-shadow: none; }
.bell-av.solo .bell-ico .i { width: 18px; height: 18px; stroke-width: 2; }
.bell-body { min-width: 0; display: grid; gap: 2px; }
.bell-title { font-weight: 620; font-size: .9rem; line-height: 1.3; }
.bell-text { color: var(--text-2); font-size: .85rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bell-body time { color: var(--muted); font-size: .76rem; }
.bell-item.new .bell-body time { color: var(--accent); font-weight: 600; }
.bell-del { position: absolute; top: 6px; right: 4px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.bell-del .i { width: 14px; height: 14px; }
.bell-item:hover .bell-del, .bell-del:focus-visible { opacity: 1; }
.bell-del:hover { background: var(--line); color: var(--text); }
@media (hover: none) { .bell-del { opacity: .55; width: 40px; height: 40px; top: 2px; right: 0; } }

/* Popup: gleiche Karte, rechts oben unter der Kopfleiste, verschwindet nach 9 s */
.bell-pop { position: fixed; z-index: 60; top: calc(var(--top-h) + 10px); right: 12px; width: min(400px, calc(100vw - 24px));
  padding: 4px; background: var(--surface); border: 1px solid var(--line-hi); border-radius: 16px; box-shadow: var(--shadow);
  animation: bell-pop-in .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.bell-pop .bell-item { background: none; }
.bell-pop .bell-link { padding-right: 44px; }
.bell-pop-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; }
.bell-pop-x:hover { background: var(--surface-hi); color: var(--text); }
.bell-pop-x .i { width: 15px; height: 15px; }
.bell-pop.out { opacity: 0; transform: translateY(-8px) scale(.97); transition: opacity .22s, transform .22s; }
@keyframes bell-pop-in { from { opacity: 0; transform: translateY(-14px) scale(.94); } }

@media (max-width: 560px) {
  .bell-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--top-h) + 6px); width: auto; }
  .bell-pop { right: 12px; left: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .bell-btn.ring .bell-on, .bell-count, .bell-panel, .bell-pop { animation: none; }
}

/* ---------- Übersicht › Mein Kalender (0.38.0): Monat im Kleinen, wo schon Stunden stehen ---------- */
.kal { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kal.busy-kal .kal-card { opacity: .55; transition: opacity .15s; }
.kal.from-l .kal-grid { animation: kal-l .26s var(--ease); }
.kal.from-r .kal-grid { animation: kal-r .26s var(--ease); }
@keyframes kal-l { from { opacity: 0; transform: translateX(-14px); } }
@keyframes kal-r { from { opacity: 0; transform: translateX(14px); } }
.kal-nav { display: inline-flex; align-items: center; gap: 2px; }
.kal-nav .iconbtn.sm { width: 34px; height: 34px; }
.kal-title { min-width: 118px; text-align: center; font-size: .9rem; font-weight: 620; }
.kal-card { padding: 12px; display: grid; gap: 10px; }
.kal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kal-wd { text-align: center; font: 600 .68rem "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
.kal-wd.we { opacity: .6; }
.kal-day { position: relative; display: grid; align-content: center; justify-items: center; gap: 1px; min-height: 44px; aspect-ratio: 1 / .86;
  border-radius: 10px; background: var(--surface-hi); color: var(--text); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.kal-day.blank { background: none; }
.kal-day b { font-size: .86rem; font-weight: 620; line-height: 1; }
.kal-day small { font-size: .64rem; line-height: 1.1; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: .7rem; }
a.kal-day:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-hi); }
.kal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.kal-day.s-off, .kal-day.s-future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.kal-day.s-off b { color: var(--muted); font-weight: 500; }
.kal-day.s-future.today, .kal-day.s-off.today { box-shadow: inset 0 0 0 2px var(--accent); }
.kal-day.s-full, .kal-day.s-extra { background: color-mix(in srgb, var(--ok) 26%, transparent); }
.kal-day.s-part { background: color-mix(in srgb, var(--warn) 26%, transparent); }
.kal-day.s-miss { background: color-mix(in srgb, var(--err) 20%, transparent); }
.kal-day.s-miss small::after { content: "–"; }
.kal-day.s-open { background: var(--surface-hi); }
.kal-day.s-abs { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent) 0 6px, transparent 6px 11px), var(--surface-hi); }
.kal-day.s-hol { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kal-day.s-abs small, .kal-day.s-hol small { color: var(--accent); font-weight: 700; }
.kal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: .84rem; color: var(--text-2); }
.kal-sum b { color: var(--text); }
.kal-miss { color: var(--err); font-weight: 600; }
.kal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .74rem; color: var(--muted); }
.kal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.kal-legend i { width: 10px; height: 10px; border-radius: 3px; }
.kal-legend i.s-full { background: color-mix(in srgb, var(--ok) 55%, transparent); }
.kal-legend i.s-part { background: color-mix(in srgb, var(--warn) 55%, transparent); }
.kal-legend i.s-miss { background: color-mix(in srgb, var(--err) 45%, transparent); }
.kal-legend i.s-abs { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 50%, transparent) 0 3px, transparent 3px 5px); box-shadow: inset 0 0 0 1px var(--line-hi); }
@media (prefers-reduced-motion: reduce) { .kal.from-l .kal-grid, .kal.from-r .kal-grid { animation: none; } }

/* Gemeinsam bearbeiten (Türliste, Schließplan, Plan): wo gerade jemand anderes ist – Rahmen in seiner Farbe + Kürzel */
.gm-who { box-shadow: inset 0 0 0 2px var(--who, #7c8796); }
.gm-who::after {
  content: attr(data-who); position: absolute; top: -1px; right: -1px; z-index: 3; padding: 0 4px; border-radius: 0 0 0 5px;
  background: var(--who, #7c8796); color: #fff; font: 650 .6rem/1.5 "Inter Tight", sans-serif; pointer-events: none;
}
.pl-cell.gm-who { position: relative; }
.pl-here-faces { display: inline-flex; align-items: center; }
.pl-here-faces:empty { display: none; }
.pl-here-faces .avatar.xs { cursor: default; }
.pl-person.pl-here .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok); }
@media print { .gm-who { box-shadow: none; } .gm-who::after { display: none; } }

/* ---------- Mein Kalender › Woche (0.41.0): Stunden-Woche im Kleinen ---------- */
.kal-head { flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kal-seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); margin-right: auto; }
.kal-seg a { display: inline-grid; place-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); text-decoration: none; }
.kal-seg a.on { background: var(--surface-hi); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.kal-title small { display: block; font: 500 .66rem "JetBrains Mono", monospace; color: var(--muted); }
/* Woche = echter Stunden-Kalender (timecal.js) im Kleinen (0.43.0) */
.tc-compact { display: grid; gap: 8px; }
.tc-compact .tc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
@media (min-width: 700px) {
  .tc-compact .wknav { height: 34px; padding: 2px; border-radius: 10px; }
  .tc-compact .wk-step { width: 30px; }
  .tc-compact .wk-today { padding: 0 8px; font-size: .82rem; }
}
.tc-compact .tc-colhead > div:first-child { flex-wrap: nowrap; overflow: hidden; }
.tc-compact .tc-colhead b, .tc-compact .tc-colhead span { white-space: nowrap; }
.tc-compact .wk-title b { font-size: .95rem; }
.tc-compact .wk-title span { font-size: .78rem; }
.tc-compact .tc-total { font-size: .82rem; margin-left: auto; }
.tc-compact .tc-grid { --head: 44px; }
.tc-compact .tc-colhead { padding: 4px 4px 3px; gap: 2px; }
.tc-compact .tc-colhead b { font-size: .74rem; }
.tc-compact .tc-colhead span { font-size: .6rem; }
.tc-compact .tc-allday { max-height: 16px; }
.tc-compact .tc-ab { font-size: .6rem; padding: 0 4px; }
.tc-compact .tc-tbody span { font-size: .6rem; right: 3px; }
.tc-compact .tc-corner .linkbtn { font-size: .58rem; min-height: 36px; }
.tc-compact .tc-ev { left: 2px; right: 2px; padding: 2px 4px 4px; font-size: .66rem; border-radius: 6px; }
.tc-compact .tc-ev b { font-size: .68rem; line-height: 13px; }
.tc-compact .tc-ev .tc-time, .tc-compact .tc-ev .tc-t, .tc-compact .tc-note { font-size: .6rem; line-height: 13px; }
.tc-compact .tc-absblock b { font-size: .66rem; }
.tc-compact .tc-absblock small { font-size: .58rem; }
.tc-compact .tc-warn:empty { display: none; }
.kal-card:has(.tc-compact) { padding: 10px; }
@media (max-width: 560px) {
  .kal-seg a { min-height: 40px; padding: 0 14px; }
}

/* ---------- Videoüberwachung (0.44.0): Kennzahlen, Rekorder, Bildwand, Liste, Betrachter ---------- */
.vd-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vd-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); color: #8b5cf6; }
.vd-ico .i { width: 24px; height: 24px; }
.vd-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.vd-empty > .i { width: 44px; height: 44px; color: var(--muted); }
.vd-empty p { max-width: 520px; }

.vd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.vd-stat { display: grid; align-content: start; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.vd-stat b { font-size: 1.7rem; font-weight: 680; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vd-stat b i { font-style: normal; font-size: 1rem; color: var(--muted); font-weight: 500; }
.vd-stat > span { font-size: .84rem; color: var(--text-2); }
.vd-stat small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-bad { color: var(--err) !important; font-weight: 600; }
.vd-meter { height: 5px; border-radius: 3px; background: var(--bg-2); overflow: hidden; margin-top: 6px; }
.vd-meter i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }

.vd-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: start; }
.vd-top h2 { font-size: 1rem; margin: 0 0 10px; }
.vd-rech { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vd-rech h2 { margin: 0; }
.vd-rech h2 a { color: inherit; text-decoration: none; }
.vd-recico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-hi); color: var(--text-2); flex: none; }
.vd-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.vd-dl.one { grid-template-columns: minmax(0, 1fr); }
.vd-dl > div { min-width: 0; }
.vd-dl .vd-wide { grid-column: 1 / -1; }
.vd-dl dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.vd-dl dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.vd-dl dd small, .vd-t td small { display: block; font-size: .76rem; }
.vd-store { display: block; font-size: .84rem; }

.vd-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; width: 100%; padding: 6px 8px; margin: 0 -8px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; box-sizing: content-box; }
.vd-bar:hover, .vd-bar.on { background: var(--surface-hi); }
.vd-barn { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-bar b { font-variant-numeric: tabular-nums; font-size: .9rem; }
.vd-bart { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.vd-bart i { display: block; height: 100%; border-radius: 3px; background: #8b5cf6; }
.vd-bar.on .vd-bart i { background: var(--accent); }

.vd-hint { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 6px; border: 0; border-radius: 10px;
  background: var(--surface-hi); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vd-hint:hover, .vd-hint.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.vd-hint > span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.vd-hint b { font-weight: 600; font-size: .88rem; }
.vd-hint small { font-size: .76rem; color: var(--muted); }
.vd-hint > .i { width: 15px; height: 15px; color: var(--muted); margin-top: 3px; flex: none; }
.vd-hdot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--accent); }
.vd-hint.warn .vd-hdot { background: var(--warn); }
.vd-hint.err .vd-hdot { background: var(--err); }
.vd-allok { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-size: .9rem; }

.vd-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.vd-bar-top h2 { margin: 0; font-size: 1.15rem; }
.vd-q { margin: 0; flex: 1 1 260px; max-width: 420px; }
.vd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-chips button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-hi); background: none; color: var(--text-2); font: inherit; font-size: .84rem; cursor: pointer; }
.vd-chips button small { color: var(--muted); margin-left: 3px; }
.vd-chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.vd-chips button.on small { color: inherit; opacity: .7; }
.vd-size { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.vd-size input { width: 110px; accent-color: var(--accent); }
.vd-seg button { width: auto; padding: 0 12px; gap: 6px; display: inline-flex; align-items: center; font: inherit; font-size: .84rem; }
.vd-active { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font-size: .86rem; color: var(--text-2); }
.vd-active .linkbtn { color: var(--accent); }

/* Bildwand: dunkel wie ein Monitor, egal ob hell oder dunkel */
.vd-wall { display: grid; gap: 18px; }
.vd-gh { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .92rem; font-weight: 640; }
.vd-gh .i { width: 15px; height: 15px; color: var(--muted); }
.vd-gh small { color: var(--muted); font-weight: 500; }
.vd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile), 100%), 1fr)); gap: 10px; }
.vd-tile { position: relative; display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #0c0e12; color: #fff;
  font: inherit; text-align: left; cursor: zoom-in; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s var(--ease), box-shadow .18s; }
.vd-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.vd-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vd-img { position: relative; display: block; aspect-ratio: 16 / 9; background: #14171d; }
.vd-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.vd-tile:hover .vd-img img { transform: scale(1.03); }
.vd-tile.off .vd-img img { filter: grayscale(1) brightness(.6); }
.vd-noimg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #6b7280; font-size: .8rem; }
.vd-noimg .i { width: 26px; height: 26px; }
.vd-badges { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.vd-b { font-style: normal; font-size: .66rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(15, 17, 21, .72); color: #e5e7eb; backdrop-filter: blur(4px); white-space: nowrap; }
.vd-b.warn { background: color-mix(in srgb, var(--warn) 85%, #000); color: #1a1200; }
.vd-b.err { background: color-mix(in srgb, var(--err) 90%, #000); color: #fff; }
.vd-b.ok { background: color-mix(in srgb, var(--ok) 80%, #000); color: #04140c; }
.vd-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82)); font-size: .74rem; }
.vd-cap b { font-size: .82rem; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-cap .mono { color: #cbd5e1; align-self: end; }
.vd-capm { grid-column: 1 / -1; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 0; opacity: 0; transition: max-height .2s, opacity .2s; }
.vd-tile:hover .vd-capm, .vd-tile:focus-visible .vd-capm { max-height: 20px; opacity: 1; }

/* Liste */
.vd-list { padding: 4px 8px; }
.vd-t td { vertical-align: middle; }
.vd-t tr.off td { color: var(--muted); }
.vd-who { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.vd-who > span { min-width: 0; }
.vd-who a { color: inherit; text-decoration: none; }
.vd-who a:hover b { text-decoration: underline; }
.vd-th { flex: none; display: grid; place-items: center; width: 72px; height: 41px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: #14171d; color: #6b7280; cursor: zoom-in; }
.vd-th img { width: 100%; height: 100%; object-fit: cover; }
.vd-th:hover { outline: 2px solid var(--accent); }
tr.off .vd-th img { filter: grayscale(1) brightness(.6); }
.vd-old { color: var(--warn); font-weight: 600; }
.vd-odd { color: var(--accent); font-weight: 600; }
.vd-port, .vd-plan { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; white-space: nowrap; font-size: .86rem; }
.vd-port .i, .vd-plan .i { width: 14px; height: 14px; color: var(--muted); flex: none; }
.vd-port .vd-sw { max-width: 170px; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.vd-port b { font: 600 .8rem "JetBrains Mono", monospace; padding: 1px 6px; border-radius: 6px; background: var(--surface-hi); }
.vd-port:hover .vd-sw, .vd-plan:hover { color: var(--accent); }
.vd-none { margin: 10px 2px; }

/* Betrachter */
dialog.vd-view { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0a0c10; color: #e5e7eb; display: none; }
dialog.vd-view[open] { display: grid; grid-template-columns: minmax(0, 1fr) 340px; animation: enter .2s var(--ease); }
dialog.vd-view::backdrop { background: transparent; }
.vd-vmain { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.vd-vtop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.vd-vtop b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-vtop .muted { color: #9ca3af; }
dialog.vd-view .iconbtn { color: #e5e7eb; }
.vd-vstage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; touch-action: pan-y; }
.vd-vstage img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.vd-noimg.big { position: static; font-size: 1rem; }
.vd-noimg.big .i { width: 48px; height: 48px; }
.vd-vnav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.vd-vnav:hover { background: rgba(255, 255, 255, .2); }
.vd-vnav.prev { left: 10px; } .vd-vnav.next { right: 10px; }
.vd-strip { display: flex; gap: 6px; padding: 10px 14px 14px; overflow-x: auto; scrollbar-width: thin; }
.vd-strip button { flex: none; display: grid; place-items: center; width: 96px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: #14171d; color: #6b7280; cursor: pointer; opacity: .55; transition: opacity .15s; }
.vd-strip button:hover { opacity: .85; }
.vd-strip button.on { opacity: 1; border-color: var(--accent); }
.vd-strip button.off img { filter: grayscale(1); }
.vd-strip img { width: 100%; height: 100%; object-fit: cover; }
.vd-vside { padding: 18px 18px 24px; overflow-y: auto; background: rgba(255, 255, 255, .03); border-left: 1px solid rgba(255, 255, 255, .08); }
.vd-vside h2 { font-size: 1.1rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.vd-vside .vd-dl dt { color: #9ca3af; }
.vd-vside .muted { color: #9ca3af; }
.vd-vside a { color: #93c5fd; }
.vd-vst { display: flex; gap: 6px; margin: 0 0 14px; }
.vd-vact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.vd-vact .btn { color: #e5e7eb; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.vd-vkeys { margin-top: 16px; }

@media (max-width: 900px) {
  dialog.vd-view[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 62dvh) auto; overflow-y: auto; }
  .vd-vside { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); overflow: visible; }
  .vd-vstage { padding: 0 8px; }
  .vd-vnav { width: 44px; height: 44px; background: rgba(0, 0, 0, .45); }
}
@media (max-width: 560px) {
  .vd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd-stat b { font-size: 1.4rem; }
  .vd-size { display: none; }
  .vd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vd-cap { padding: 18px 8px 6px; }
  .vd-cap .mono { display: none; }
  .vd-chips button { min-height: 40px; }
  .vd-dl { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .vd-tile, .vd-img img { transition: none; } }

/* =====================================================================
   Anlage anlegen/bearbeiten (doku/asset_edit.html, static/anlage.js) · Präfix af-
   Art als Chips nach Bereich, Hersteller/Modell zum Antippen, Wartung zum Ankreuzen. Tipp-Flächen ≥ 44 px am Handy.
   ===================================================================== */
.af h2 { margin: 0; font-size: 1rem; }
.af-grp { display: flex; align-items: flex-start; gap: 12px; }
.af-gl { width: 150px; flex: none; display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.af-gl .i { width: 16px; height: 16px; }
.af-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; flex: 1; }
.af-chips[hidden] { display: none; }
.af .fpick span { min-height: 40px; padding: 0 14px; }
.af-pick { display: grid; gap: 8px; }
.af-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .86rem; cursor: pointer; }
.af-chip:hover { border-color: var(--line-hi); }
.af-chip.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.af-name { margin: 0; }
.af-name b { color: var(--text); }
.af-wcheck { flex-direction: row; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.af-wcheck input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.af-wcheck span { display: grid; gap: 2px; font-weight: 450; }
.af-wcheck small { font-size: .8rem; }
@media (max-width: 700px) {
  .af-grp { flex-direction: column; gap: 6px; }
  .af-gl { width: auto; min-height: 0; }
  .af .fpick span, .af-chip { min-height: 44px; }
}

/* =====================================================================
   Modul Wartungen (wartung/index.html, Baustein „Wartung“, static/wartung.js) · Präfix wt-
   Stand als Punkt-Chip (kein Seitenstreifen), Liste als Zeilen, am Handy als Karten.
   ===================================================================== */
.wt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.wt-stat { display: grid; align-content: start; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
a.wt-stat:hover { border-color: var(--line-hi); }
.wt-stat.on { border-color: var(--accent); background: var(--accent-soft); }
.wt-stat b { font-size: 1.7rem; font-weight: 680; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wt-stat b i { font-style: normal; font-size: 1rem; color: var(--muted); font-weight: 500; }
.wt-stat.err b { color: var(--err, #e5484d); }
.wt-stat.warn b { color: var(--warn, #f5a524); }
.wt-stat > span { font-size: .84rem; color: var(--text-2); }
.wt-stat small { font-size: .74rem; color: var(--muted); }
.wt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.wt-q { flex: 1 1 280px; max-width: 460px; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-list { padding: 0; overflow: hidden; margin-bottom: 14px; }
.wt-ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.wt-ghead h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.wt-g-vertrag .wt-ghead { background: color-mix(in srgb, var(--err, #e5484d) 8%, transparent); }
.wt-row[data-w-edit] { cursor: pointer; }
.wt-row[data-w-edit]:hover { background: var(--surface-hi); }
.wt-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wt-seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .9rem; }
.wt-seg a .i { width: 17px; height: 17px; }
.wt-seg a em { font-style: normal; font-size: .78rem; color: var(--muted); }
.wt-seg a.on { background: var(--accent); color: var(--on-accent); }
.wt-seg a.on em { color: inherit; opacity: .8; }
.wt-auf { display: grid; gap: 8px; }
.wt-auf legend { padding: 0 6px; font-size: .85rem; color: var(--text-2); }
@media (min-width: 700px) { dialog.sheet.wk-dlg { width: min(1240px, calc(100vw - 48px)); max-height: 94dvh; padding: 20px 24px; } }
.wk-cols { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1000px) {
  /* Breit: Einstellungen links, Wartungen und Notizen rechts (Flo 29.11.: nicht so zusammengequetscht) */
  .wk-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .wk-right > .wk-sec:first-child { border-top: 0; padding-top: 0; }
}
.wk-head { align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.wk-head .wt-name { margin-top: 6px; }
.wk-title { display: grid; gap: 4px; min-width: 0; flex: 1; }
.wk-title h2 { margin: 0; }
.wk-title p { margin: 0; }
.wk-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-2); }
.wk-sum.err { background: color-mix(in srgb, var(--err, #e5484d) 10%, transparent); }
.wk-sum > div { display: grid; gap: 2px; min-width: 0; }
.wk-sum b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.wk-fs { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.wk-sec { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.wk-sec h3 { margin: 0; font-size: 1rem; }
.wk-hist { display: flex; align-items: center; gap: 10px; min-height: 40px; flex-wrap: wrap; }
.wk-hist form { margin: 0; }
.wk-body:focus { outline: none; }
dialog.sheet form.wk-note { display: flex; flex-direction: row; gap: 8px; align-items: center; margin: 0; }
dialog.sheet .wk-hist form { display: block; }
.wk-note .btn { flex: none; }
.wk-note input { flex: 1; min-width: 0; }
/* Fällige Verträge deutlich abheben, danach kleiner Abstand zu den übrigen (Flo 29.11.) */
.wt-row.dringend { background: color-mix(in srgb, var(--err, #e5484d) 11%, transparent); }
.wt-row.dringend[data-w-edit]:hover { background: color-mix(in srgb, var(--err, #e5484d) 16%, transparent); }
.wt-row.dringend .wt-name b { color: var(--err, #e5484d); }
.wt-row.dringend .wt-b.err { background: var(--err, #e5484d); color: #fff; }
.wt-row.wt-split { border-top: 12px solid var(--bg); }
.wt-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.wt-name a { color: var(--text); text-decoration: none; min-width: 0; }
.wt-name a:hover b { text-decoration: underline; }
.wt-sub2 { overflow-wrap: anywhere; }
.wt-tel { color: var(--accent); text-decoration: none; white-space: nowrap; }
.wt-info { display: flex; align-items: flex-start; gap: 6px; font-size: .8rem; font-style: italic; color: var(--text-2); }
.wt-info .i { width: 14px; height: 14px; margin-top: 2px; }
.wt-b.vt { color: var(--err, #e5484d); border-color: color-mix(in srgb, var(--err, #e5484d) 40%, transparent); }
.wt-b.au { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.wt-row { display: grid; grid-template-columns: minmax(220px, 2.2fr) minmax(120px, 1fr) minmax(150px, 1.1fr) minmax(120px, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.wt-row:first-child, .wt-ghead + .wt-row { border-top: 0; }
.wt-head { text-align: left; font-size: .74rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-block: 8px; }
.wt-row.aus { opacity: .6; }
.wt-who { display: grid; gap: 3px; min-width: 0; }
.wt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.wt-b { font-style: normal; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); }
.wt-b.err { background: color-mix(in srgb, var(--err, #e5484d) 14%, transparent); border-color: transparent; color: var(--err, #e5484d); font-weight: 600; }
.wt-last, .wt-next, .wt-akku { display: grid; gap: 2px; font-variant-numeric: tabular-nums; min-width: 0; }
.wt-last small, .wt-akku small { font-size: .76rem; }
.wt-st { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: .8rem; color: var(--text-2); }
.wt-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.wt-st.ueber { color: var(--err, #e5484d); font-weight: 600; } .wt-st.ueber::before { background: var(--err, #e5484d); }
.wt-st.ohne::before { background: var(--err, #e5484d); }
.wt-st.monat { color: var(--warn, #f5a524); font-weight: 600; } .wt-st.monat::before { background: var(--warn, #f5a524); }
.wt-st.quartal::before { background: var(--warn, #f5a524); }
.wt-st.ok::before { background: var(--ok, #30a46c); }
.wt-bad { color: var(--err, #e5484d); font-weight: 600; }
.wt-soon { color: var(--warn, #f5a524); font-weight: 600; }
.wt-act { justify-self: end; }
.wt-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.wt-box > div { display: grid; gap: 2px; }
.wt-box b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.wt-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wt-hist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
@media (max-width: 800px) {
  .wt-row { grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; }
  .wt-head { display: none; }
  .wt-who { grid-column: 1 / -1; }
  .wt-akku { grid-column: 1; }
  .wt-act { grid-column: 2; align-self: end; }
  .wt-act .btn { min-height: 44px; }
}
/* Video-Übersicht: Lizenzen und Schemen oben nebeneinander (Flo 29.11.) */
.vd-doc .bb-head h2 { margin: 0; }
