/* Basis der Oberfläche: Farb-Tokens (hell, dunkel, data-theme), Schrift, App-Rahmen, Sidebar, Topbar, Login,
   Panels, Knöpfe, Tooltip, Hinweise. Regeln übernommen aus dem <style> von public_html/index.html des Ist
   (nur die Selektoren, die K1 nutzt); eigene Ergänzungen von K1 stehen am Ende. */
:root{color-scheme: light; --on-accent:#ffffff; --surface-1:#ffffff; --page:#f0f0ee; --text-primary:#0b0b0b; --text-secondary:#52514e; --text-muted:#6f6d67; --border: rgba(11,11,11,0.14); --card-border: var(--border); --grid:#e1e0d9; --baseline:#c3c2b7; --series-1:#1c569c; --series-1-100:#cde2fb; --series-1-250:#86b6ef; --series-1-450:#1c569c; --series-1-650:#104281; --status-good:#0ca30c; --status-warning:#fab219; --status-serious:#ec835a; --status-critical:#d03b3b; --status-critical-soft:#f1d0d0; --status-ok:#1a7f37; --status-ok-bg:#e3f4e6; --status-critical-bg:#fbe4e4; --on-status:#ffffff; --danger:#d03b3b; --success-text:#006300; --status-critical-text: var(--status-critical); --status-warning-text:#8a6300; --accent:#3a5ca7; --accent-strong:#2f4a86; --accent-soft-bg:#e9effb; --accent-soft-text:#2f4a86; --accent-fill: var(--accent); --accent-fill-strong: var(--accent-strong); --sidebar-bg:#e7e7e4; --sidebar-bg-2:#dedede; --sidebar-text:#1c1c1c; --sidebar-text-muted:#65635d; --sidebar-border: rgba(11,11,11,0.14); --sidebar-accent:#1c1c1c; --sidebar-overlay-hover: rgba(11,11,11,.05); --sidebar-overlay-active: rgba(11,11,11,.07); --sidebar-overlay-pill: rgba(11,11,11,.08); --sidebar-active-bg: var(--sidebar-overlay-active); --sidebar-active-text: var(--sidebar-text); --radius-lg:16px; --radius-md:10px; --radius-sm:7px; --shadow: 0 1px 2px rgba(11,11,10,.04), 0 8px 24px -10px rgba(11,11,10,.12); --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-display: "Barlow", Arial, sans-serif; --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;}
@font-face{font-family:"Barlow"; font-style:normal; font-weight:300; font-display:swap; src:url("/fonts/barlow-300.woff2") format("woff2");}
@font-face{font-family:"Barlow"; font-style:normal; font-weight:400; font-display:swap; src:url("/fonts/barlow-400.woff2") format("woff2");}
@font-face{font-family:"Barlow"; font-style:normal; font-weight:600; font-display:swap; src:url("/fonts/barlow-600.woff2") format("woff2");}
@font-face{font-family:"Barlow"; font-style:normal; font-weight:700; font-display:swap; src:url("/fonts/barlow-700.woff2") format("woff2");}
/* CONVOTIS-Hell-Modus. Bernstein (--status-warning #b07800, --edge-cluster) steht nicht in der Brand-Palette und bleibt
   trotzdem: es ist Signalfarbe, und die Marke hat keinen Warnton. Blau, Grün und Rot lesen Nutzer als Bedienung, Erfolg
   und Fehler, eine Warnung braucht einen eigenen Farbton. Alle übrigen Signalfarben stammen aus der Palette.
   Schriftschnitte der Marke: nur 300, 400, 600, 700 (--fw-*). */
:root{--page:#f2eeea; --surface-1:#ffffff; --text-primary:#002a72; --text-secondary:#33558e; --text-muted:#33558e; --border: rgba(0,42,114,0.18); --grid:#ccd4e3; --baseline:#99aac7; --series-1:#005870; --series-1-100:#ccdee2; --series-1-250:#99bcc6; --series-1-450:#005870; --series-1-650:#005870; --status-good:#039272; --status-warning:#b07800; --status-serious:#b2395f; --status-critical:#9f0737; --status-critical-soft:#eccdd7; --status-ok:#039272; --status-ok-bg:#cde9e3; --status-critical-bg:#eccdd7; --danger:#9f0737; --success-text:#002a72; --status-critical-text:#9f0737; --status-warning-text:#8a5a00; --accent:#002a72; --accent-strong:#33558e; --accent-soft-bg:#ccd4e3; --accent-soft-text:#002a72; --sidebar-bg:#002a72; --sidebar-bg-2:#002a72; --sidebar-text:#ffffff; --sidebar-text-muted:#ccd4e3; --sidebar-border:rgba(255,255,255,.16); --sidebar-accent:#ffffff; --sidebar-overlay-hover:rgba(255,255,255,.07); --sidebar-overlay-active:rgba(255,255,255,.12); --sidebar-overlay-pill:rgba(255,255,255,.14); --sidebar-active-bg:#33558e; --sidebar-active-text:#ffffff; --sidebar-badge-bg:#ffffff; --sidebar-badge-text:#002a72; --inset-bg:#ffffff; --cv-blue:#002a72; --fw-light:300; --fw-regular:400; --fw-semibold:600; --fw-bold:700; --edge:#99aac7; --edge-warn:#c8102e; --edge-cluster:#b07800; --edge-focus:#005870; --liga-rang-1:#002a72; --liga-rang-2:#33558e; --liga-rang-3:#667faa; --liga-rang-3-text:#ffffff;}
/* CONVOTIS-Dunkel-Modus „Graphit CV 12 %“ (#201, Entscheidung Marvin 03.12.2026): eine Quelle, gilt nur über data-theme,
   das vorab.js immer setzt (Automatisch löst es per matchMedia auf). Ausnahme von der Brand-Regel, auch im Skill
   convotis-brand: Grund, Karte und Seitenleiste sind Graphit im Farbton von CV Blue (218°, 12 % Sättigung) statt
   CV-Blue-Flächen, weil volle Markenflächen im Vergleich zu bunt waren. Einziger Akzent CV Blue 80 % mit weißer Schrift,
   Kritisch CV Red 60 %, Fokus CV Blue 40 %. */
:root[data-theme="dark"]{color-scheme: dark; --page:#212429; --surface-1:#262a31; --inset-bg:#15171a; --text-primary:#ffffff; --text-secondary:#ccd4e3; --text-muted:#99aac7; --border: rgba(255,255,255,.36); --card-border: transparent; --grid:#424954; --baseline:#646e80; --shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 2px rgba(0,0,0,.4), 0 20px 44px -20px rgba(0,0,0,.6); --sidebar-bg:#15171a; --sidebar-bg-2:#1d2025; --sidebar-text:#ffffff; --sidebar-text-muted:#99aac7; --sidebar-border: rgba(255,255,255,.14); --sidebar-accent:#f5f5f6; --sidebar-overlay-hover: rgba(255,255,255,.06); --sidebar-overlay-active: rgba(255,255,255,.10); --sidebar-overlay-pill: rgba(255,255,255,.08); --sidebar-active-bg:#33558e; --sidebar-active-text:#ffffff; --sidebar-badge-bg: var(--accent); --sidebar-badge-text: var(--page); --series-1:#669ba9; --series-1-100:#005870; --series-1-250:#005870; --series-1-450:#669ba9; --series-1-650:#99bcc6; --status-good:#68beaa; --status-warning:#e0a526; --status-serious:#d99caf; --status-critical:#c56a87; --status-critical-soft:#3d1a26; --status-ok:#68beaa; --status-ok-bg:#16302a; --status-critical-bg:#3d1a26; --on-status:#14120a; --danger:#d99caf; --success-text:#68beaa; --status-critical-text:#d99caf; --status-warning-text:#e0a526; --accent:#99aac7; --accent-strong:#ccd4e3; --accent-soft-bg:#33558e; --accent-soft-text:#ffffff; --accent-fill:#33558e; --accent-fill-strong:#002a72; --liga-rang-1:#33558e; --liga-rang-2:#667faa; --liga-rang-3:#99aac7; --liga-rang-3-text:#002a72; --edge:#62718d; --edge-warn:#c56a87; --edge-cluster:#e0a526; --edge-focus:#99aac7;}
/* Maße für Schrift und Bedienelemente (#204, ADR-006): Schrift und Radius anderer Dateien nehmen nur diese Tokens; tests/frontend/css-lint.test.mjs */
:root{--fs-xs:11px; --fs-sm:12.5px; --fs-md:14px; --fs-lg:18px; --radius-pill:999px; --ctl-h:30px; --ctl-px:var(--sp-md);}
/* #24: Abstände und Dauern. Rolle je Stufe: 3xs Textzeilen einer Karte, 2xs Symbol zu Text, xs zwischen Chips,
   sm zwischen Elementen einer Zeile, md Zeilenhöhe und Bedienelement innen, lg Rand jeder Fläche, xl zwischen Panels,
   2xl zwischen Seitenbereichen. kurz: Hover, Druck, Pfeil; mittel: Leiste, Sheet, Panel. */
:root{--sp-3xs:2px; --sp-2xs:4px; --sp-xs:6px; --sp-sm:8px; --sp-md:12px; --sp-lg:16px; --sp-xl:24px; --sp-2xl:32px;
  --dauer-kurz:120ms; --dauer-mittel:200ms; --ease-out:cubic-bezier(0.23, 1, 0.32, 1);}
/* #249: Einzug je Ebene eines Baums (Offene Punkte: Epic > Task > Subtask), am Telefon schmaler */
:root{--einzug-ebene:28px;}
@media (max-width: 640px){ :root{--einzug-ebene:16px;} }
.brand-logo{padding:0 34px 14px 0;} /* Schutzzone der Marke: halbe Logohöhe (27 px / 2) um das Logo */
.brand-logo img{display:block; width:168px; height:auto;}
*{box-sizing:border-box;}
html, body{margin:0;padding:0;}
/* Schrift: Barlow (Marke) nur für Überschriften h1–h4 und große Kennzahlen (#177); Fließtext, Tabellen und
   Bedienelemente in der Systemschrift, weil Barlow unter 14 px auf Monitoren mit 1× Auflösung unscharf wirkt
   (Entscheidung Marvin 01.12.2026). font-family nur als Token: tests/frontend/css-lint.test.mjs Regel G. */
body{font-family:var(--font-text); background:var(--page); color:var(--text-primary); min-height:100vh; min-height:100dvh; font-size:14px; line-height:1.5;}
button, input, select{font-family:inherit;}
h1, h2, h3, h4, .kpi-value, .zps-big, .pk-fig .n, .detail-header .detail-kunde, .login-aussage{font-family:var(--font-display);}
#app{display:none; grid-template-columns:250px 1fr; min-height:100vh; min-height:100dvh;}
@media (max-width: 980px){
  #app{grid-template-columns:1fr;}
}
#sidebar{background:linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2)); background-color:var(--sidebar-bg); color:var(--sidebar-text); padding:22px 0 24px; position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto; border-right:1px solid var(--sidebar-border);}
@media (max-width: 980px){
  #sidebar{position:relative; height:auto;}
}
.brand{padding:0 20px 18px; border-bottom:1px solid var(--sidebar-border); margin-bottom:14px;}
.brand .kicker{font-size:12px; color:var(--sidebar-text-muted);}
.brand h1{font-size:18px; margin:6px 0 2px; font-weight:var(--fw-semibold); color:var(--sidebar-text);}
.brand .sub{font-size:12px; color:var(--sidebar-text-muted); line-height:1.45; margin-top:6px;}
.navgroup-label{font-size:12px; font-weight:var(--fw-semibold); color:var(--sidebar-text-muted); padding:16px 20px 6px;}
.navitem{display:flex; align-items:center; gap:10px; width:calc(100% - 20px); text-align:left; padding:9px 20px; margin:1px 10px; background:none; border:none; border-radius:999px; color:var(--sidebar-text-muted); cursor:pointer; font-size:13.5px;}
.navitem.active{background:var(--sidebar-active-bg); color:var(--sidebar-active-text);}
#main{min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; min-width:0;}
#topbar{background:var(--surface-1); border-bottom:1px solid var(--border); padding:14px 28px; display:flex; align-items:center; gap:16px; position:sticky; top:0; z-index:5; flex-wrap:wrap;}
#topbar h2{font-size:17px; margin:0; font-weight:var(--fw-semibold);}
.topbar-right{display:flex; align-items:center; gap:10px; margin-left:auto;}
.share-btn{display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 10px; background:none; border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-secondary); font-size:12.8px; cursor:pointer;}
.share-btn:focus-visible{outline:2px solid var(--accent); outline-offset:1px;}
@media (hover: hover) and (pointer: fine){ .share-btn:hover{color:var(--text-primary); border-color:var(--accent);} }
.share-ico{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto;}
@media (max-width: 600px){ .share-btn{padding:0 8px;} .share-btn .share-label{display:none;} .back-link .back-label{display:none;} }
.user-chip{display:flex; align-items:center; gap:8px; font-size:12.8px; color:var(--text-secondary);}
.user-chip.switchable{background:none; border:1px solid transparent; border-radius:var(--radius-sm); padding:4px 8px 4px 4px; cursor:pointer; font-family:inherit;}
.user-chip.switchable:hover{border-color:var(--border); background:var(--page);}
.theme-toggle{background:none; border:1px solid transparent; border-radius:var(--radius-sm); width:32px; height:32px; font-size:16px; line-height:1; color:var(--text-secondary); cursor:pointer;}
.theme-toggle:hover{border-color:var(--border); background:var(--page);}
.user-dropdown-item:hover{background:var(--page) !important;}
.chip-chevron{font-size:11px; color:var(--text-muted);}
.avatar{min-width:28px;height:28px;padding:0 4px;border-radius:999px; background:var(--accent-fill); color:var(--on-accent); display:flex; align-items:center; justify-content:center; font-weight:var(--fw-semibold); font-size:12px; flex:0 0 auto;}
#content{flex:1; padding:26px 28px 70px; max-width:1560px; width:100%; margin:0 auto;}
.nav-ic{width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.navitem .nav-label{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.navitem.active .nav-ic{color:var(--sidebar-active-text);}
.brand{position:relative;}
.brand .kicker{padding-right:34px;}
.navitem:focus-visible{outline:2px solid var(--sidebar-accent); outline-offset:1px;}
.mobile-tabs{display:none;}
.nav-sheet-backdrop{display:none;}
.nav-collapse{position:absolute; top:-6px; right:12px; width:30px; height:30px; display:flex; align-items:center; justify-content:center; background:none; border:1px solid transparent; border-radius:var(--radius-sm); color:var(--sidebar-text-muted); cursor:pointer;}
.nav-collapse:focus-visible{outline:2px solid var(--sidebar-accent); outline-offset:1px;}
@media (hover: hover) and (pointer: fine){
  .nav-collapse:hover{background:var(--sidebar-overlay-hover); color:var(--sidebar-text);}
}
.brand-mono{display:none;}
/* Eingeklappt (ab 981 px, nur für die Sitzung): 64-px-Leiste mit Symbolen, Namen als Tooltip; die Breite springt, sie wird nicht animiert */
@media (min-width: 981px){
  #app.nav-collapsed{grid-template-columns:64px 1fr;}
  #app.nav-collapsed #content{max-width:1746px;}
  #app.nav-collapsed #sidebar{overflow:visible; z-index:6;}
  #app.nav-collapsed .brand{padding:0 0 14px; display:flex; flex-direction:column; align-items:center; gap:10px;}
  #app.nav-collapsed .brand > :not(.nav-collapse):not(.brand-mono){display:none;}
  #app.nav-collapsed .brand-mono{display:flex; align-items:center; justify-content:center; width:34px; height:34px; order:-1; border-radius:var(--radius-md); background:var(--sidebar-overlay-hover);}
  #app.nav-collapsed .brand-mono img{display:block; width:22px; height:auto;}
  #app.nav-collapsed .nav-collapse{position:static;}
  #app.nav-collapsed .navgroup-label{font-size:0; padding:0; height:1px; margin:10px 14px; background:var(--sidebar-border);}
  #app.nav-collapsed .navitem{position:relative; width:44px; height:40px; margin:2px 10px; padding:0; justify-content:center;}
  #app.nav-collapsed .navitem .nav-label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
  #app.nav-collapsed .navitem .nav-count{position:absolute; top:3px; right:2px; min-width:16px; padding:0 4px; font-size:11px; line-height:16px;}
}
@media (min-width: 981px) and (hover: hover) and (pointer: fine){
  #app.nav-collapsed .navitem:hover::after, #app.nav-collapsed .navitem:focus-visible::after{content:attr(data-name); position:absolute; left:calc(100% + 10px); top:50%; transform:translateY(-50%); background:var(--text-primary); color:var(--surface-1); font-size:11px; padding:5px 8px; border-radius:6px; white-space:nowrap; z-index:10; box-shadow:var(--shadow); pointer-events:none;}
}
@media (max-width: 980px){
  #sidebar{position:fixed; left:0; right:0; bottom:0; top:auto; height:auto; max-height:75vh; z-index:41; border-right:none; border-radius:16px 16px 0 0; padding:8px 0 calc(66px + env(safe-area-inset-bottom)); transform:translateY(100%); visibility:hidden; transition:transform .22s ease-out, visibility 0s linear .22s;}
  #app.sheet-open #sidebar{transform:none; visibility:visible; transition:transform .22s ease-out;}
  /* Ziele der Tab-Leiste und die Marke stehen im Blatt nicht doppelt; die Klassen setzt rahmen.js aus den Reitern (#166) */
  #sidebar .brand, #sidebar .navitem-tab, #sidebar .navgroup-nur-tabs{display:none;}
  .nav-collapse{display:none;}
  .nav-sheet-backdrop{display:block; position:fixed; inset:0; z-index:40; background:rgba(11,11,10,.35);}
  .nav-sheet-backdrop[hidden]{display:none;}
  #sidebar .navitem{padding:12px 20px; font-size:14.5px;}
  .mobile-tabs{display:grid; grid-template-columns:repeat(5,1fr); position:fixed; left:0; right:0; bottom:0; z-index:42; height:calc(58px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); background:var(--surface-1); border-top:1px solid var(--border);}
  .mtab{position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; background:none; border:none; color:var(--text-muted); font:inherit; font-size:11px; cursor:pointer; -webkit-tap-highlight-color:transparent;}
  .mtab .nav-ic{width:20px; height:20px;}
  .mtab.active{color:var(--accent); font-weight:var(--fw-semibold);}
  .mtab:focus-visible{outline:2px solid var(--accent); outline-offset:-4px;}
  #content{padding-bottom:calc(80px + env(safe-area-inset-bottom));}
  #topbar{padding:9px 14px; min-height:50px; gap:10px;}
  body #saveToast{bottom:calc(66px + env(safe-area-inset-bottom)); right:12px; left:12px; align-items:flex-end;}
}
/* Login: links die CV-Blue-Bühne mit Logo samt Claim und Aussage, rechts das Formular; main.js setzt display:flex, bis 760 px steht die Bühne oben */
#loginScreen{position:fixed; inset:0; background:var(--page); display:flex; z-index:50; overflow-y:auto;}
.login-buehne{flex:1 1 50%; min-width:0; display:flex; flex-direction:column; justify-content:space-between; gap:48px; padding:clamp(28px, 6vw, 72px); background:var(--cv-blue); color:#ffffff;}
.login-logo{display:block; width:min(300px, 100%); height:auto;}
.login-aussage{margin:0; font-size:clamp(26px, 3vw, 40px); line-height:1.15; font-weight:var(--fw-light);}
.login-aussage span{display:block; font-weight:var(--fw-semibold);}
.login-seite{flex:1 1 50%; min-width:0; display:flex; align-items:center; justify-content:center; padding:24px;}
@media (max-width: 760px){
  #loginScreen{flex-direction:column;}
  .login-buehne{flex:0 0 auto; gap:28px; padding:28px 20px;}
  .login-logo{width:200px;}
  .login-aussage{font-size:22px;}
  .login-seite{flex:1 0 auto; align-items:flex-start; padding:24px 16px;}
}
.login-card{background:var(--surface-1); border:1px solid var(--card-border); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:32px 30px; max-width:460px; width:100%;}
.login-card h1{font-size:20px; margin:6px 0 4px; font-weight:var(--fw-semibold);}
.login-card .sub{font-size:13px; color:var(--text-secondary); line-height:1.5; margin:0 0 18px;}
.panel{background:var(--surface-1); border:1px solid var(--card-border); border-radius:var(--radius-lg); box-shadow:var(--shadow); margin-bottom:20px; min-width:0; scroll-margin-top:var(--topbar-h, 0px);}
.panel-head{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px 0;}
.panel-head h3{font-size:14.5px; margin:0; font-weight:var(--fw-semibold);}
.panel-head .panel-hint{font-size:11.8px; color:var(--text-muted);}
.panel-body{padding:14px 18px 18px;}
.status-critical{color:var(--status-critical-text);}
[data-tooltip]{position:relative;}
[data-tooltip]:focus-visible::after, [data-tooltip]:hover::after{content:attr(data-tooltip); position:absolute; bottom:130%; left:0; background:var(--text-primary); color:var(--surface-1); font-size:11px; padding:5px 8px; border-radius:6px; white-space:nowrap; z-index:10; box-shadow:var(--shadow); pointer-events:none;}
.empty-state{padding:28px; text-align:center; color:var(--text-muted); font-size:13px;}
.footnote{font-size:11.5px; color:var(--text-muted); margin-top:4px;}
.btn-primary{background:var(--accent-fill); color:var(--on-accent); border:none; border-radius:var(--radius-sm); padding:8px 14px; font-size:12.5px; font-weight:var(--fw-semibold); cursor:pointer; align-self:flex-start;}
.btn-secondary{background:none; color:var(--text-secondary); border:1px solid var(--border); border-radius:var(--radius-sm); padding:7px 13px; font-size:12.5px; cursor:pointer;}
@media (hover: hover) and (pointer: fine){
  .btn-primary:hover:not(:disabled){background:var(--accent-fill-strong);}
  .btn-secondary:hover:not(:disabled){border-color:var(--accent); color:var(--accent);}
}
#saveToast{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:8px;pointer-events:none;}
.toast{padding:10px 16px;border-radius:8px;font-size:.85rem;line-height:1.4;box-shadow:0 4px 12px rgba(0,0,0,.15);pointer-events:auto;animation:toastIn .25s ease-out,toastOut .3s ease-in 4.7s forwards;max-width:360px;}
.toast--error{background:var(--status-critical-bg,#fde8e8);color:var(--status-critical-text);border:1px solid var(--status-critical,#c0392b);}
.toast--ok{background:var(--status-ok-bg,#e8f8e8);color:var(--success-text);border:1px solid var(--status-ok,#27ae60);}
.toast--info{background:var(--accent-soft-bg);color:var(--accent-soft-text);border:1px solid var(--accent);}
@keyframes toastIn{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}
@keyframes toastOut{from{opacity:1;}to{opacity:0;}}
@media (max-width: 600px){
  #content{padding:10px 10px calc(76px + env(safe-area-inset-bottom));}
  #topbar{padding:8px 10px;}
  .panel{border-radius:var(--radius-md); margin-bottom:12px;}
  .panel-head{padding:12px 12px 0;}
  .panel-body{padding:10px 12px 12px;}
  /* #156: Zeile 1 Titel und Knöpfe, die Suche (portfolio.css, flex-basis 100 %) bricht in Zeile 2 um; Breite 0 als
     Basis hält den Titel in Zeile 1, ein langer bricht dort um (#189) */
  #topbar{gap:8px;}
  #topbar h2{font-size:15px; line-height:1.25; min-width:0; flex:1 1 0; overflow-wrap:anywhere;}
  #topbar .topbar-right{gap:4px; flex:0 0 auto;}
  .user-chip.switchable{font-size:0; gap:2px; padding:2px;}
}

/* --- Ergänzungen K1 --- */
/* Einträge des Benutzermenüs: im Ist als Inline-Stil am Element */
.user-dropdown-item{display:block; width:100%; text-align:left; padding:8px 14px; border:none; background:none; cursor:pointer; font-size:.85rem; color:var(--text-primary);}
.user-dropdown-item.is-danger{color:var(--status-critical-text);}
.user-dropdown-item:focus-visible{outline:2px solid var(--accent); outline-offset:-2px;}
/* Mobile Tab-Leiste: so viele gleich breite Spalten, wie Tabs sichtbar sind (Nutzer nur mit Recht) */
@media (max-width: 980px){
  .mobile-tabs{grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:1fr;}
}
/* K-1 Passwort vergessen: Text-Knopf unter der Anmeldung, Code in Festbreite (Gruppen bleiben zusammen) */
.link-btn{display:block; margin:14px auto 0; padding:4px 6px; border:none; background:none; color:var(--accent); font-size:.85rem; cursor:pointer; border-radius:var(--radius-sm);}
@media (hover: hover) and (pointer: fine){ .link-btn:hover{text-decoration:underline;} }
.rc-eingabe{font-family:var(--font-mono);}
.rc-code{display:block; margin:0 0 16px; padding:12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--page);
  font-family:var(--font-mono); font-size:1.05rem; text-align:center; white-space:nowrap; overflow-x:auto; user-select:all;}
.user-dropdown-item{white-space:nowrap;}
/* #180: quer scrollbare Leiste: Fade-Kante auf der Seite mit verdecktem Inhalt (data-rand setzt querRandVerfolgen in
   ansichten/rahmen.js). Die Maske regelt nur die Deckkraft, keine Farbe. */
.quer-rand[data-rand="rechts"]{mask-image:linear-gradient(to right, #000 calc(100% - 28px), transparent);}
.quer-rand[data-rand="links"]{mask-image:linear-gradient(to left, #000 calc(100% - 28px), transparent);}
.quer-rand[data-rand="beide"]{mask-image:linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);}
/* #156: Tabellen mit .karten-mobil stehen unter 768 px als Karten, jede Zelle mit data-label trägt ihre Spalte als
   Beschriftung; Zeilen ohne data-label (Projekt, Leertext) stehen ohne. */
@media (max-width: 767.98px){
  table.karten-mobil, table.karten-mobil > tbody, table.karten-mobil > tbody > tr, table.karten-mobil > tbody > tr > td{display:block;}
  table.karten-mobil > thead{display:none;}
  table.karten-mobil > tbody > tr{padding:10px 0; border-bottom:1px solid var(--grid);}
  table.karten-mobil > tbody > tr > td{padding:3px 2px; border:0; text-align:left; white-space:normal;}
  table.karten-mobil td[data-label]{display:grid; grid-template-columns:minmax(0, 8.5em) minmax(0, 1fr); column-gap:10px; align-items:baseline;}
  table.karten-mobil td[data-label]::before{content:attr(data-label); font-size:12px; color:var(--text-muted);}
  table.karten-mobil td[data-label] > *{justify-self:start;}
}
/* #156: ein Fokusring für alle Felder; eine Box mit innerem Feld (Suche) zeigt ihn außen */
input:focus-visible, select:focus-visible, textarea:focus-visible, :is(.kon-search, .search-box):focus-within{outline:2px solid var(--accent); outline-offset:1px;}/* #156: gesperrte Knöpfe blass */
.btn-primary:disabled, .btn-secondary:disabled{opacity:.5; cursor:not-allowed;}
/* #187: Fokus und Druck für alles Bedienbare an einer Stelle. :where() hat keine Spezifität: eine Ansicht mit eigenem
   Ring (Sidebar, Tabellenzeilen, Felder oben) behält ihn, alle anderen Elemente bekommen diesen. */
:where(a[href], button, summary, [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
:where(button, .btn-primary, .btn-secondary, [role="button"]){transition:transform 120ms ease-out;}
:where(button:not(:disabled), .btn-primary, .btn-secondary, [role="button"]):active{transform:scale(.97);}
/* #187: Touch: Felder mit 16 px, sonst zoomt iOS beim Antippen hinein; !important, weil die Ansichten kleinere Größen
   mit stärkeren Selektoren setzen (Suche 13 px, Finanz 14 px, Testfälle 12 px) */
@media (pointer: coarse){
  input:not([type=checkbox], [type=radio], [type=range], [type=color]), select, textarea{font-size:16px !important;}
}
/* #187: viewport-fit=cover legt die Seite unter die Notch; quer halten Seite und Tab-Leiste links und rechts Abstand.
   Ohne Notch ist env() 0 px. */
body{padding-left:env(safe-area-inset-left, 0px); padding-right:env(safe-area-inset-right, 0px);}
.mobile-tabs{padding-left:env(safe-area-inset-left, 0px); padding-right:env(safe-area-inset-right, 0px);}
/* #187: reduzierte Bewegung gilt für jede Animation und jeden Übergang, nicht je Regel */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{transition-duration:0s !important; animation-duration:0s !important; animation-iteration-count:1 !important; scroll-behavior:auto !important;}
}
/* #186: Tabellenköpfe 12 px, Satzschreibung, grau; die Ansichten setzen dort nur Abstand, Rahmen und Ausrichtung */
thead th, .erv-tf-head{font-size:12px; font-weight:var(--fw-semibold); color:var(--text-muted); text-transform:none; letter-spacing:normal;}
/* #186: Erklärtext hinter ⓘ am Panel-Titel (ansichten/erklaerung.js); er klappt unter der Kopfzeile über die Breite des Panels auf */
.panel-titel{display:flex; align-items:center; gap:4px; min-width:0;}
.panel-head:has(.erklaerung){position:relative;}
.erklaerung > summary{list-style:none; display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:999px; color:var(--text-muted); font-size:15px; line-height:1; cursor:pointer;}
.erklaerung > summary::-webkit-details-marker{display:none;}
.erklaerung[open] > summary{color:var(--accent); background:var(--accent-soft-bg);}
@media (hover: hover) and (pointer: fine){ .erklaerung > summary:hover{color:var(--accent);} }
.erklaerung-text{position:absolute; left:18px; right:18px; top:calc(100% + 6px); z-index:20; max-width:640px; padding:10px 12px; background:var(--surface-1); border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--shadow); font-size:12.5px; font-weight:var(--fw-regular); line-height:1.5; color:var(--text-secondary);}
@media (max-width: 600px){ .erklaerung-text{left:12px; right:12px;} }
