/* HeyKompass – Designsystem „Tiefsee“ (v21). Dunkel + Hell, Desktop + Handy. */
@font-face { font-family: "Jakarta"; src: url("../fonts/PlusJakartaSans-Variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; src: url("../fonts/PlusJakartaSans-Variable-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* v21 · Tiefsee: Dunkel ist Standard. Hell nur über data-theme="light" (Schalter oben). */
:root {
  color-scheme: dark;
  --bg: #06111A; --card: rgba(255,255,255,0.06); --card-rand: rgba(255,255,255,0.12); --raised: rgba(255,255,255,0.07); --sheet: #0C1E29;
  --ink: #F1F7FA; --muted: #B2C4CD; --tertiary: #7F95A1;   /* muted für WCAG AA auf Glas über dem Blaulicht minimal aufgehellt (Briefing: #A7BAC4) */
  --line: rgba(255,255,255,0.07); --line-strong: rgba(255,255,255,0.14);
  --accent: #8FF2E3; --on-accent: #05211F; --accent-soft: rgba(143,242,227,0.12); --accent-text: #8FF2E3; --fokus: #8FF2E3;
  --mint-knopf: linear-gradient(135deg, #A6F5E9 0%, #5ED3C3 100%); --mint-kachel: linear-gradient(135deg, #B4F7EC 0%, #5ED3C3 100%);
  --s1: #5C88EA; --s2: #2BA593; --s1-soft: rgba(92,136,234,0.22);
  --gut: #8BE6A4; --gut-soft: rgba(108,220,140,0.14); --schlecht: #FFAFA3; --schlecht-soft: rgba(255,112,96,0.14);
  --warn: #FFB070; --warn-soft: rgba(255,176,112,0.14); --blau: #7FA8FF; --blau-soft: rgba(127,168,255,0.16); --blau-text: #B8CCFF;
  --kritisch: #E66767; --kritisch-soft: rgba(230,103,103,0.16);
  --grid: rgba(255,255,255,0.06); --axis: rgba(255,255,255,0.22); --band: rgba(255,255,255,0.04);
  --tip-bg: #F1F7FA; --tip-ink: #0A1C27; --seg-on: rgba(255,255,255,0.14); --nav-aktiv: rgba(143,242,227,0.10); --tab-bg: rgba(10,28,39,0.78);
  --feld: rgba(255,255,255,0.06); --feld-rand: rgba(255,255,255,0.10);
  --glas: blur(20px) saturate(140%); --schatten: 0 18px 44px -22px rgba(0,0,0,0.65);
  --nacht: #0A1C27; --nacht-rand: rgba(255,255,255,0.07);
  --blauglas: linear-gradient(160deg, rgba(90,140,255,0.18) 0%, rgba(60,110,220,0.06) 100%); --blauglas-rand: rgba(127,168,255,0.30);
  --crew: radial-gradient(120% 90% at 100% 0%, rgba(143,242,227,0.16) 0%, transparent 55%), rgba(10,28,39,0.85); --crew-rand: rgba(143,242,227,0.40);
  --hero: radial-gradient(90% 120% at 100% 0%, rgba(143,242,227,0.20) 0%, transparent 60%), rgba(255,255,255,0.07);
  --papier: #FBFCFC; --papier-ink: #0A1C27;
  --radius-l: 24px; --radius-m: 22px; --radius-s: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F5F6; --card: #FFFFFF; --card-rand: rgba(10,28,39,0.06); --raised: #ECF1F2; --sheet: #FFFFFF;
  --ink: #0A1C27; --muted: #53666F; --tertiary: #5B6F79; --line: rgba(10,28,39,0.08); --line-strong: #D6DEE1;
  --accent: #2BB3A1; --on-accent: #05211F; --accent-soft: #DCF6F1; --accent-text: #0A6E62; --fokus: #0A7A6D;
  --s1: #3D66D6; --s2: #1E9C8A; --s1-soft: rgba(61,102,214,0.14);
  --gut: #1B7A3E; --gut-soft: #E1F4E7; --schlecht: #C4321F; --schlecht-soft: #FDE7E3;
  --warn: #9A4A0C; --warn-soft: #FCEFE2; --blau: #2F5BD8; --blau-soft: #E6EDFF; --blau-text: #2648B0;
  --kritisch: #D03B3B; --kritisch-soft: rgba(208,59,59,0.12);
  --grid: #EDF1F2; --axis: #C6D0D3; --band: rgba(10,28,39,0.04);
  --tip-bg: #0A1C27; --tip-ink: #F1F7FA; --seg-on: #FFFFFF; --nav-aktiv: #FFFFFF; --tab-bg: rgba(255,255,255,0.92);
  --feld: #ECF1F2; --feld-rand: transparent;
  --glas: none; --schatten: 0 14px 34px -22px rgba(10,28,39,0.28);
  --nacht: #FFFFFF; --nacht-rand: rgba(10,28,39,0.08);
  --blauglas: linear-gradient(160deg, #E9EFFF 0%, #F7F9FF 100%); --blauglas-rand: #CFDBFF;
  --crew: radial-gradient(120% 90% at 100% 0%, rgba(94,211,195,0.20) 0%, transparent 55%), #FFFFFF; --crew-rand: #8EDCD0;
  --hero: radial-gradient(90% 120% at 100% 0%, rgba(94,211,195,0.22) 0%, transparent 60%), #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Jakarta", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
.num, .tabnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.klein { font-size: 12px; }
.icon { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.seite { width: 264px; flex-shrink: 0; padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.inhalt { flex: 1; min-width: 0; padding: 22px 32px 64px 18px; display: flex; flex-direction: column; gap: 20px; }
.marke { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--ink); }
.marke span { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.marke:hover { text-decoration: none; }
.firmenwahl { position: relative; }
.firmenwahl summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--card); min-height: 56px; }
.firmenwahl summary::-webkit-details-marker { display: none; }
.firmenwahl .menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--sheet); border-radius: 18px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; }
.firmenwahl .menu button, .firmenwahl .menu a { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; font-weight: 600; }
.firmenwahl .menu button:hover, .firmenwahl .menu a:hover { background: var(--raised); }
.firmen-logo { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.firmen-logo img { width: 100%; height: 100%; object-fit: cover; }
.firmen-logo img.logo-ersatz { object-fit: contain; padding: 4px; }
.firmen-logo.klein { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.auswahl-vorschau { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.auswahl-vorschau .firmen-logo { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.auswahl-vorschau > span:last-child { display: flex; flex-direction: column; }
.nav { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.nav-gruppe { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 12px 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 40px; border-radius: 14px; color: var(--muted); font-weight: 600; }
.nav a:hover { text-decoration: none; color: var(--ink); }
.nav a.aktiv { background: var(--nav-aktiv); color: var(--ink); font-weight: 700; }
.nav .zaehler { margin-left: auto; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--schlecht); color: #fff; display: flex; align-items: center; justify-content: center; }
.nutzer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--card); }
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.suchfeld { flex: 1 1 280px; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 48px; border-radius: 999px; background: var(--card); color: var(--muted); }
.suchfeld input, .suchfeld input[type=search] { all: unset; flex: 1; min-width: 0; height: 100%; color: var(--ink); font-weight: 500; font-size: 15px; background: none; border: none; padding: 0; }
.suchfeld input::placeholder { color: var(--muted); }
.timer-pille { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 18px; border-radius: 999px; background: var(--card); color: var(--ink); }
.timer-pille .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timer-pille.pausiert .punkt { background: var(--muted); box-shadow: none; }

.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.seitenkopf .oberzeile { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Bausteine ---------- */
.karte { background: var(--card); border-radius: var(--radius-l); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.karte.eng { padding: 16px 18px; border-radius: var(--radius-m); }
.karte-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.reihe { display: flex; flex-wrap: wrap; gap: 20px; }
.reihe > * { flex: 1 1 340px; }
.reihe > .breit { flex: 2 1 560px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .w { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.gross { font-size: 54px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.04; font-variant-numeric: tabular-nums; }
.gross .waehrung { font-size: 0.6em; color: var(--muted); }
.gut { color: var(--gut); } .schlecht { color: var(--schlecht); } .warn { color: var(--warn); }

.knopf { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.knopf:hover { text-decoration: none; filter: brightness(0.97); }
.knopf.primaer { background: var(--accent); color: var(--on-accent); }
.knopf.zart { background: var(--raised); }
.knopf.gefahr { background: var(--schlecht-soft); color: var(--schlecht); }
.knopf.klein { height: 34px; padding: 0 14px; font-size: 13px; }
.knopf.rund { width: 44px; padding: 0; }
.knopf[disabled] { opacity: 0.45; cursor: not-allowed; }
.kreis-aktionen { display: flex; gap: 22px; flex-wrap: wrap; }
.kreis-aktion { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink); min-width: 56px; }
.kreis-aktion:hover { text-decoration: none; }
.kreis-aktion .kreis { width: 52px; height: 52px; border-radius: 50%; background: var(--raised); display: flex; align-items: center; justify-content: center; }
.kreis-aktion.primaer .kreis { background: var(--accent); color: var(--on-accent); }
.kreis-aktion[disabled], .kreis-aktion.aus { opacity: 0.4; pointer-events: none; }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-neutral { background: var(--raised); color: var(--muted); }
.badge-akzent { background: var(--accent-soft); color: var(--accent-text); }
.badge-gut { background: var(--gut-soft); color: var(--gut); }
.badge-schlecht { background: var(--schlecht-soft); color: var(--schlecht); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-blau { background: var(--blau-soft); color: var(--blau); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; background: var(--accent); }
.avatar.klein { width: 30px; height: 30px; font-size: 11px; }
.avatar.gross { width: 64px; height: 64px; font-size: 20px; }
.zelle-avatar { display: inline-flex; align-items: center; gap: 10px; }

.segment { display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: var(--card); }
.segment.auf-karte { background: var(--raised); }
.segment a, .segment button { all: unset; cursor: pointer; padding: 0 14px; height: 36px; display: flex; align-items: center; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.segment a:hover { text-decoration: none; color: var(--ink); }
.segment .an { background: var(--seg-on); color: var(--ink); }
.segment.auf-karte .an { background: var(--card); }
.segment.mini a, .segment.mini button { height: 28px; padding: 0 10px; font-size: 12px; }

.liste { display: flex; flex-direction: column; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--ink); min-width: 0; }
a.zeile:hover { text-decoration: none; background: var(--band); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 14px; }
.zeile + .zeile { border-top: 1px solid var(--line); }
a.zeile:hover + .zeile { border-top-color: transparent; }
.zeile .haupt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.zeile .haupt strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .haupt span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.zeile .rechts strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.leer { color: var(--muted); padding: 18px 0; text-align: center; }

.balken { height: 8px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.balken > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.balken.warn > span { background: #D9822B; } .balken.schlecht > span { background: var(--kritisch); }

table.tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabelle th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabelle td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tr.klickbar:hover td { background: var(--band); }
.tabelle .r, .tabelle th.r { text-align: right; }
.tabellenbox { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.feld .hilfe { font-weight: 500; font-size: 12px; }
.feld .fehler { color: var(--schlecht); font-weight: 700; font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], input[type=tel], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--raised); border: 1.5px solid transparent; border-radius: 14px; padding: 0 14px; height: 46px; width: 100%; min-width: 0; }
textarea { padding: 12px 14px; height: auto; min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
input[type=color] { width: 64px; height: 46px; padding: 4px; border-radius: 14px; border: none; background: var(--raised); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); }
.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; min-height: 46px; }
.formraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 16px; }
.formraster .ganz { grid-column: 1 / -1; }
.checkliste { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checkliste label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.checkliste ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hinweisbox { padding: 14px 16px; border-radius: 18px; background: var(--warn-soft); color: var(--warn); font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.hinweisbox.info { background: var(--accent-soft); color: var(--accent-text); }
.hinweisbox.fehler { background: var(--schlecht-soft); color: var(--schlecht); }

/* ---------- Meldungen ---------- */
.meldungen { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 32px)); }
.meldung { padding: 14px 16px; border-radius: 20px; background: var(--tip-bg); color: var(--tip-ink); font-weight: 700; display: flex; align-items: center; gap: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); animation: rein 0.25s ease-out; }
.meldung .kreis { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #1FD1B2; color: #03201B; flex-shrink: 0; }
.meldung.error .kreis { background: #FF8F80; color: #2A0702; }
.meldung button { all: unset; cursor: pointer; margin-left: auto; opacity: 0.6; }
@keyframes rein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Sheets / Dialoge ---------- */
dialog.sheet { border: none; padding: 0; background: transparent; max-width: 560px; width: calc(100% - 16px); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(0,0,0,0.5); }
dialog.sheet .sheet-innen { background: var(--sheet); border-radius: 32px; padding: 14px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
dialog.sheet .griff { align-self: center; width: 40px; height: 5px; border-radius: 99px; background: var(--raised); }
dialog.sheet h2 { font-size: 22px; letter-spacing: -0.03em; }
@media (max-width: 700px) {
  dialog.sheet { margin: auto 8px 8px; max-height: calc(100% - 40px); }
  dialog.sheet[open] { animation: hoch 0.25s ease-out; }
}
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Diagramme ---------- */
.diagramm { position: relative; }
.diagramm svg { display: block; width: 100%; overflow: visible; }
.diagramm .tip { position: absolute; pointer-events: none; z-index: 5; min-width: 190px; padding: 12px 14px; border-radius: 16px; background: var(--tip-bg); color: var(--tip-ink); box-shadow: 0 12px 30px rgba(0,0,0,0.25); font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.diagramm .tip strong { font-weight: 800; }
.diagramm .tip .z { display: flex; justify-content: space-between; gap: 16px; }
.diagramm .tip .sep { padding-top: 5px; border-top: 1px solid color-mix(in srgb, var(--tip-ink) 18%, transparent); }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; font-weight: 600; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legende i.hohl { box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- Kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.spalte { background: var(--card); border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.spalte.drueber { outline: 2px dashed var(--accent); }
.spalte-kopf { display: flex; justify-content: space-between; align-items: center; font-weight: 800; padding: 2px 4px 4px; }
.kachel { background: var(--raised); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; cursor: grab; color: var(--ink); }
.kachel:hover { text-decoration: none; }
.kachel.zieht { opacity: 0.5; }

/* ---------- Editor ---------- */
.pos-tabelle { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.pos-tabelle th { font-size: 12px; color: var(--muted); font-weight: 700; text-align: left; padding: 0 6px; }
.pos-tabelle td { vertical-align: top; padding: 0 3px; }
.pos-tabelle input, .pos-tabelle select { height: 42px; font-size: 14px; border-radius: 12px; padding: 0 10px; }
.pos-tabelle textarea { min-height: 42px; height: 42px; font-size: 13px; border-radius: 12px; padding: 10px; }
.pos-tabelle .griffel { cursor: grab; color: var(--muted); padding-top: 10px; display: block; text-align: center; }
.pos-tabelle tr.titelzeile input.bez { font-weight: 800; }
.pos-tabelle .summe { padding-top: 12px; font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos-mobil { display: none; }
.summenblock { margin-left: auto; width: min(360px, 100%); display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.summenblock div { display: flex; justify-content: space-between; }
.summenblock .gesamt { font-weight: 800; font-size: 18px; border-top: 2px solid var(--accent); padding-top: 8px; }
.stickyleiste { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px; border-radius: 999px; background: var(--tab-bg); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); align-self: flex-end; }

/* ---------- Statusleiste Rechnung ---------- */
.schritte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.schritt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; }
.schritt::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--raised); }
.schritt:first-child::before { display: none; }
.schritt.fertig::before { background: var(--accent); }
.schritt .kreis { width: 30px; height: 30px; border-radius: 50%; background: var(--raised); color: var(--muted); display: flex; align-items: center; justify-content: center; position: relative; }
.schritt.fertig .kreis { background: var(--accent); color: var(--on-accent); }
.schritt.bezahlt .kreis { background: var(--gut); color: var(--card); }
.schritt.teil .kreis { background: var(--warn-soft); color: var(--warn); }
.schritt.problem .kreis { background: var(--schlecht-soft); color: var(--schlecht); }
.schritt b { font-size: 12px; } .schritt small { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- Kalender (Ressourcen, Abwesenheit) ---------- */
.plan { border-collapse: separate; border-spacing: 4px; width: 100%; }
.plan th { font-size: 12px; color: var(--muted); font-weight: 700; text-align: left; padding: 4px; white-space: nowrap; }
.plan td { background: var(--raised); border-radius: 12px; padding: 8px; vertical-align: top; min-width: 96px; font-size: 12px; }
.plan td.ueber { background: var(--schlecht-soft); }
.plan td.frei { background: transparent; }
.kal { border-collapse: separate; border-spacing: 2px; }
.kal td, .kal th { width: 28px; height: 30px; text-align: center; font-size: 11px; border-radius: 8px; }
.kal td.frei { background: var(--band); color: var(--muted); }
.kal td.urlaub { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.kal td.krank { background: var(--kritisch-soft); color: var(--schlecht); font-weight: 800; }
.kal td.sonst { background: var(--blau-soft); color: var(--blau); font-weight: 800; }
.kal td.beantragt { opacity: 0.55; }

/* ---------- Handy ---------- */
.tabbar { display: none; }
.nur-mobil { display: none; }
@media (max-width: 900px) {
  .seite { display: none; }
  .inhalt { padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left)); gap: 14px; }
  .nur-mobil { display: flex; }
  .nur-desktop { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); background: var(--tab-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.aktiv { color: var(--ink); font-weight: 800; }
  h1 { font-size: 28px; }
  .gross { font-size: 44px; }
  .karte { padding: 18px; border-radius: 24px; }
  .kopfzeile { flex-wrap: nowrap; }
  .kopfzeile .suchfeld { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 14px; }
  .kopfzeile .knopf.rund { flex-shrink: 0; }
  .kopfzeile .timer-pille { height: 44px; padding: 0 12px; flex-shrink: 0; }
  .kopfzeile .timer-pille .text { display: none; }
  .meldungen { top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .pos-tabelle { display: none; }
  .pos-mobil { display: flex; flex-direction: column; gap: 10px; }
  .stickyleiste { bottom: calc(92px + env(safe-area-inset-bottom)); align-self: stretch; border-radius: 24px; }
  .stickyleiste .knopf { flex: 1; }
  .tabelle.mobil-karten thead { display: none; }
  .tabelle.mobil-karten tr { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tabelle.mobil-karten td { border: none; padding: 0; }
  .tabelle.mobil-karten td:first-child { flex-basis: 100%; font-weight: 700; }
  .tabelle.mobil-karten td:nth-child(2) { flex-basis: 100%; }
  .tabelle.mobil-karten td:nth-child(n+3) { color: var(--muted); font-size: 13px; }
  .tabelle.mobil-karten td:empty { display: none; }
  .schritt::before { left: calc(-50% + 16px); right: calc(50% + 16px); }
  .kreis-aktionen { justify-content: space-between; gap: 8px; }
  .reihe > * { flex-basis: 100%; }
  .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 16px; border-radius: 20px; }
  .kpi .w { font-size: 21px; }
  .kpi .l { font-size: 12px; }
  .kpi .d { font-size: 11px; flex-wrap: wrap; }
}
@media (min-width: 901px) { .tabbar { display: none; } }

/* Mobile Positionskarten */
.pos-karte { background: var(--raised); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pos-karte .zeile2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pos-karte input, .pos-karte select, .pos-karte textarea { background: var(--card); height: 42px; font-size: 15px; }
.pos-karte textarea { height: 64px; }

@media print { .seite, .tabbar, .kopfzeile, .aktionen, .stickyleiste { display: none !important; } .inhalt { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Suchfeld-Auswahl (Kunde, Projekt …) ---------- */
.combo { position: relative; display: flex; align-items: center; }
.combo .combo-eingabe { width: 100%; padding-right: 40px; }
.combo-leeren { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 99px; border: none; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.combo-leeren:hover { background: var(--line); color: var(--ink); }
.combo::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.combo:has(.combo-leeren:not([hidden]))::after { display: none; }
.combo-liste { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--sheet); border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line-strong), 0 18px 40px -12px rgba(0,0,0,0.28); padding: 6px; }
.combo-option { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 600; }
.combo-option small { color: var(--muted); font-size: 12px; font-weight: 500; }
.combo-option.an { background: var(--raised); }
.combo-option.gewaehlt { color: var(--accent-text); }
.combo-option.gewaehlt span::after { content: " ✓"; }
.combo-leer { padding: 10px 12px; color: var(--muted); font-size: 13px; font-weight: 500; }
@media (max-width: 720px) { .combo-liste { max-height: 46vh; } .combo-option { padding: 12px; } }

/* ---------- Vorbelegte Felder als Chips ---------- */
.kontextleiste { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.kontext-chip { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--accent-soft); border-radius: 999px; padding: 8px 8px 8px 14px; max-width: 100%; }
.kontext-chip .l { color: var(--accent-text); font-weight: 600; font-size: 12px; }
.kontext-chip strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kontext-chip .aendern { font-size: 12px; font-weight: 700; color: var(--accent-text); background: var(--card); border-radius: 999px; padding: 4px 10px; }
.kontext-chip:hover .aendern { background: var(--accent); color: var(--on-accent); }
.feld[hidden] { display: none !important; }

/* =========================================================== Ziele & Fokus */
.ziel-chip { --z: var(--accent); display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; padding: 0 9px 0 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--z) 16%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ziel-chip svg { color: var(--z); flex-shrink: 0; }
a.ziel-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--z) 26%, transparent); }
.kachel .ziel-chip { align-self: flex-start; }
.spalte-plus { width: 30px !important; height: 30px !important; }
.spalte-kopf { gap: 8px; }
td.klickbar { cursor: pointer; } td.klickbar:hover { box-shadow: inset 0 0 0 2px var(--accent); }

/* Aufgaben-Zeilen in Fokus-Listen */
.fokus-liste { display: flex; flex-direction: column; }
.fokus-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 0; min-width: 0; background: var(--card); }
.fokus-zeile + .fokus-zeile { border-top: 1px solid var(--line); }
.fokus-zeile .haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.fokus-zeile .haupt:hover { text-decoration: none; }
.fokus-zeile .haupt strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unterzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.unterzeile .grund { color: var(--accent-text); }
.aktionen-zeile { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.griff { cursor: grab; color: var(--muted); font-size: 13px; letter-spacing: -2px; padding: 6px 2px; user-select: none; touch-action: none; opacity: 0.6; }
.griff:hover { opacity: 1; }
.abhaken { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.abhaken span { opacity: 0; color: var(--on-accent); display: flex; }
.abhaken:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.abhaken:hover span { opacity: 1; color: var(--accent); }
.sortierbar.zieht { opacity: 0.9; box-shadow: 0 14px 30px -10px rgba(0,0,0,0.3); border-radius: 14px; position: relative; z-index: 5; }
.sortier-platz { border: 2px dashed var(--line-strong); border-radius: 14px; background: transparent !important; }
.tag-wahl { width: auto !important; height: 34px !important; font-size: 13px !important; border-radius: 999px !important; padding: 0 12px !important; }
.schnell-neu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schnell-neu input[name=titel] { flex: 3 1 220px; }
.schnell-neu select { flex: 1 1 160px; width: auto; }
.ohne-ziel summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 6px 0; font-size: 14px; }
.ohne-ziel[open] summary { margin-bottom: 4px; }

/* "Als Nächstes" */
.jetzt-karte { border-radius: var(--radius-l); padding: 24px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #0B1412) 100%); color: var(--on-accent); }
.jetzt-karte h2 { font-size: 26px; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.jetzt-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; display: inline-flex; align-items: center; gap: 8px; }
.jetzt-label .punkt { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: puls 1.6s infinite; }
.jetzt-karte .unterzeile { color: inherit; opacity: 0.9; }
.jetzt-karte .ziel-chip { background: rgba(255,255,255,0.18); color: inherit; } .jetzt-karte .ziel-chip svg { color: inherit; }
.jetzt-karte .knopf.primaer { background: var(--on-accent); color: var(--accent); }
.jetzt-karte .knopf.zart { background: rgba(255,255,255,0.16); color: inherit; }
@keyframes puls { 50% { opacity: 0.35; } }

/* Wochen-Input-Ring */
.ring-zeile { display: flex; align-items: center; gap: 20px; }
.ring { --p: 0; width: 116px; height: 116px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--raised) 0); }
.ring > div { width: 92px; height: 92px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.ring span { font-size: 11px; color: var(--muted); font-weight: 600; }
.ring-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ring-text > div { display: flex; flex-direction: column; }
.ring-text strong { font-size: 20px; font-weight: 800; }
.input-zeile { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.input-zeile:hover { text-decoration: none; }
.input-zeile i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }

/* Logbuch */
.log-punkt { --z: var(--muted); width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--z) 18%, transparent); color: var(--z); }
.log-punkt.erledigt { --z: var(--gut); }
.log-zeile .haupt strong { font-weight: 650; }

/* Fokus-Modus (ablenkungsfrei) */
.fokus-modus { min-height: 100dvh; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); max-width: 880px; margin: 0 auto; }
.fokus-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fokus-mitte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 30px 0; }
.fokus-titel { font-size: clamp(30px, 6vw, 52px); letter-spacing: -0.04em; line-height: 1.08; margin: 0; max-width: 760px; }
.fokus-notiz { max-width: 560px; color: var(--muted); margin: 0; line-height: 1.5; }
.fokus-uhr { font-size: clamp(56px, 14vw, 104px); font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1; margin: 12px 0 4px; }
.fokus-uhr.pausiert { color: var(--muted); }
.fokus-knoepfe { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.kreis-aktion .kreis.gross, .kreis.gross { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.kreis-aktion .kreis.riesig { width: 112px; height: 112px; }
.kette { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kette li { --z: var(--accent); display: flex; align-items: center; gap: 6px; }
.kette li + li::before { content: "→"; color: var(--muted); font-weight: 700; }
.kette a { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; border-radius: 14px; color: var(--ink); font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--z) 14%, transparent); text-align: left; }
.kette a span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z); }
.kette a:hover { text-decoration: none; }
.fokus-fuss { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px; border-radius: 999px; background: var(--card); align-self: center; max-width: 100%; }
.fokus-fuss a, .fokus-fuss > span:last-child { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fokus-leer { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Woche planen */
.wochenraster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.tag-spalte { background: var(--card); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; min-width: 0; }
.tag-spalte.heute { box-shadow: inset 0 0 0 2px var(--accent); }
.tag-spalte.vergangen { opacity: 0.6; }
.tag-kopf { display: flex; flex-direction: column; color: var(--ink); font-size: 14px; padding: 2px 4px; }
.tag-kopf:hover { text-decoration: none; }
.fokus-liste.kompakt { gap: 6px; flex: 1; min-height: 60px; }
.mini-aufgabe { --z: var(--line-strong); display: flex; gap: 4px; align-items: flex-start; background: var(--raised); border-radius: 12px; padding: 8px 8px 8px 4px; border-left: 3px solid var(--z); min-width: 0; }
.mini-aufgabe a { display: flex; flex-direction: column; gap: 2px; color: var(--ink); min-width: 0; font-size: 13px; }
.mini-aufgabe a:hover { text-decoration: none; }
.mini-aufgabe strong { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mini-aufgabe .ziel-text { color: var(--z); font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-aufgabe .muted { font-size: 11px; }
@media (max-width: 1100px) { .wochenraster { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } .tag-spalte { min-height: 0; } }

/* Ziel-Baum */
.ziel-baum { display: flex; flex-direction: column; gap: 10px; }
.ziel-knoten { --z: var(--accent); display: flex; flex-direction: column; gap: 10px; }
.ziel-kinder { display: flex; flex-direction: column; gap: 10px; padding-left: 22px; margin-left: 10px; border-left: 2px solid color-mix(in srgb, var(--z) 35%, transparent); }
.ziel-karte { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--raised); color: var(--ink); position: relative; border-left: 4px solid var(--z); }
.ziel-karte:hover { text-decoration: none; filter: brightness(0.985); }
.ziel-karte.inaktiv { opacity: 0.62; }
.ziel-kopf { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ziel-kopf .ebene { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z); margin-right: 4px; }
.ziel-kopf .badge { height: 20px; font-size: 11px; padding: 0 8px; gap: 4px; }
.ziel-titel { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.3; }
.ziel-wert { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ziel-wert strong { color: var(--ink); }
.ziel-balken { position: relative; overflow: visible; background: color-mix(in srgb, var(--z) 14%, var(--card)); }
.ziel-balken > span { background: var(--z); }
.ziel-balken .soll { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: 0.45; border-radius: 2px; }
.ziel-balken.gross { height: 12px; }
.ziel-input { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.ziel-punkt { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.ziel-hero { --z: var(--accent); }
.warum { margin: 0; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--z) 10%, transparent); display: flex; flex-direction: column; gap: 4px; line-height: 1.5; font-weight: 500; }
.tipps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; font-size: 14px; }

/* Rückblick */
.rueckblick-form textarea { min-height: 80px; }
.skala { display: flex; gap: 8px; }
.skala label { cursor: pointer; }
.skala input { position: absolute; opacity: 0; pointer-events: none; }
.skala span { width: 44px; height: 44px; border-radius: 50%; background: var(--raised); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--ink); font-size: 15px; }
.skala input:checked + span { background: var(--accent); color: var(--on-accent); }
.skala input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.partner-antwort { padding: 14px 16px; border-radius: 16px; background: var(--blau-soft); display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }

@media (max-width: 720px) {
  .fokus-zeile .aktionen-zeile .knopf.zart.klein:not(.rund) { padding: 0 10px; }
  .ring { width: 96px; height: 96px; } .ring > div { width: 76px; height: 76px; } .ring strong { font-size: 18px; }
  .jetzt-karte h2 { font-size: 22px; }
  .ziel-kinder { padding-left: 12px; margin-left: 4px; }
}
.fokus-zeile .haupt .titel { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fokus-zeile .haupt .titel:hover { text-decoration: none; color: var(--accent-text); }
.reihe > * { min-width: 0; }
.segment.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; align-self: flex-start; }
.segment.scroll::-webkit-scrollbar { display: none; }
.segment.scroll a { flex-shrink: 0; }
@media (max-width: 720px) {
  .tag-spalte.vergangen:not(:has(.mini-aufgabe)) { display: none; }
  .tag-spalte { min-height: 0; }
  .fokus-liste.kompakt { min-height: 24px; }
}

/* =========================================================== Agenten-Erweiterung */
.nav-zaehler, .zaehler { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.segment .zaehler { margin-left: 6px; }
.tab-icon { position: relative; display: inline-flex; }
.tab-zaehler { position: absolute; top: -5px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--kritisch); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.agenten-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.agenten-marke { display: flex; align-items: center; gap: 14px; min-width: 0; }
.agenten-marke h1 { margin: 0; }
.agenten-logo { width: 46px; height: 46px; border-radius: 14px; object-fit: contain; background: var(--card); flex-shrink: 0; }
.agenten-logo.leer, .agenten-logo.klein { display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); }
.agenten-logo.klein { width: 40px; height: 40px; border-radius: 12px; background: var(--raised); color: var(--ink); }
.zeile-karte { flex-direction: row !important; align-items: center; gap: 14px; color: var(--ink); }
.zeile-karte:hover { text-decoration: none; }
.zeile-karte .haupt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.leer-gross { align-items: center; text-align: center; padding: 48px 20px !important; color: var(--accent-text); }
.leer-gross h2 { color: var(--ink); margin: 6px 0 0; }
.leer-gross p { margin: 0; }

/* Freigabe-Karten */
.freigaben-liste { display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; }
.freigabe-karte { background: var(--card); border-radius: var(--radius-l); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 4px 0 0 var(--accent); transition: opacity .3s, transform .3s; }
.freigabe-karte.stufe-2 { box-shadow: inset 4px 0 0 #E0A06F; }
.freigabe-karte.entschieden { box-shadow: none; }
.freigabe-karte.weg { opacity: 0; transform: translateX(30px); }
.freigabe-karte header { display: flex; align-items: center; gap: 10px; }
.freigabe-karte header .wer { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13px; }
.freigabe-karte header .wer .muted { font-size: 12px; font-weight: 500; }
.freigabe-karte h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; line-height: 1.25; }
.freigabe-karte h3 a { color: var(--ink); }
.freigabe-text { white-space: normal; line-height: 1.55; font-size: 14.5px; background: var(--raised); border-radius: 14px; padding: 12px 14px; }
.freigabe-text.gekuerzt { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.mehr-lesen { all: unset; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-text); margin-top: -6px; }
.freigabe-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.freigabe-bilder:has(> a:only-child) { grid-template-columns: minmax(0, 420px); }
.freigabe-bilder img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; display: block; background: var(--raised); }
.fakten { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.fakten div { display: flex; flex-direction: column; gap: 1px; }
.fakten dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.fakten dd { margin: 0; font-weight: 700; font-size: 14px; }
.freigabe-aktionen { display: flex; flex-direction: column; gap: 8px; }
.freigabe-aktionen .knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.freigabe-aktionen .knopf.primaer { flex: 1 1 160px; }
.freigabe-aktionen textarea { min-height: 64px; }
.gefahr-text { color: var(--kritisch) !important; }
.freigabe-ergebnis { margin: 0; font-weight: 700; }
.freigabe-karte.kompakt { padding: 12px 14px; gap: 8px; background: var(--raised); box-shadow: inset 3px 0 0 var(--accent); }
.freigabe-karte.kompakt h3 { font-size: 15px; }
.freigabe-karte.kompakt .freigabe-text { background: var(--card); }
pre.ergebnis { white-space: pre-wrap; font-size: 12px; margin: 0; background: var(--raised); padding: 12px; border-radius: 12px; overflow: auto; }

/* Chat */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; height: calc(100dvh - 210px); min-height: 460px; }
.chat-liste { background: var(--card); border-radius: var(--radius-l); padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.chat-person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; color: var(--ink); }
.chat-person:hover { background: var(--raised); text-decoration: none; }
.chat-person.an { background: var(--accent-soft); }
.chat-person .haupt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-person .haupt span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-fenster { background: var(--card); border-radius: var(--radius-l); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-fenster.leer { align-items: center; justify-content: center; }
.chat-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-kopf .haupt { display: flex; flex-direction: column; }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.blase { max-width: min(78%, 560px); padding: 10px 14px 6px; border-radius: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; font-size: 14.5px; }
.blase.agent { align-self: flex-start; background: var(--raised); border-bottom-left-radius: 6px; }
.blase.nutzer { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.blase.nutzer a { color: inherit; text-decoration: underline; }
.blase.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; }
.blase .zeit { font-size: 10.5px; opacity: 0.65; align-self: flex-end; font-weight: 600; }
.blase audio { width: 240px; max-width: 100%; height: 36px; }
.blase .transkript { font-size: 13.5px; }
.blase .freigabe-karte { color: var(--ink); }
.chat-eingabe { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.chat-eingabe textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; border-radius: 22px; padding: 11px 16px; line-height: 1.4; }
.chat-eingabe .knopf.rund { width: 44px; height: 44px; flex-shrink: 0; }
.chat-eingabe .aufnahme { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 22px; background: var(--kritisch-soft); }
.chat-eingabe .aufnahme .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--kritisch); animation: puls 1.2s infinite; }
.chat-eingabe .aufnahme .muted { flex: 1; }
[data-mikro].aufnahme-an { background: var(--kritisch) !important; color: #fff !important; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat.offen .chat-liste { display: none; }
  .chat.offen .chat-fenster { position: fixed; inset: 0; z-index: 70; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .chat:not(.offen) .chat-fenster { display: none; }
  .blase { max-width: 86%; }
}

/* Agenten-Übersicht */
.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.agent-kachel { background: var(--raised); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative; color: var(--accent-text); }
.agent-kachel .l { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.agent-kachel .w { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.agent-kachel .w small { font-size: 14px; font-weight: 700; color: var(--muted); }
.agent-kachel .d { font-size: 12px; font-weight: 600; color: var(--muted); }
.agent-kachel.gut { box-shadow: inset 0 3px 0 var(--gut); color: var(--gut); }
.agent-kachel.warn { box-shadow: inset 0 3px 0 #E0A06F; color: #C26B2E; }
.agent-kachel.kritisch { box-shadow: inset 0 3px 0 var(--kritisch); color: var(--kritisch); }
.mini-kurve { width: 100%; height: 30px; }
.meldung-blockiert { --z: var(--kritisch); font-weight: 800; }
.meldung-warnung { --z: #E0A06F; }
.meldung-erfolg { --z: var(--gut); }
.leitstand-rahmen { background: var(--card); border-radius: var(--radius-l); overflow: hidden; height: calc(100dvh - 230px); min-height: 480px; }
.leitstand-rahmen iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Einstellungen der Verbindung */
.hinweis-schluessel { box-shadow: inset 0 0 0 2px var(--accent); }
.kopierzeile { display: flex; gap: 8px; }
.kopierzeile input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.regel-liste { display: flex; flex-direction: column; }
.regel-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.regel-zeile .haupt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.regel-zeile select { width: auto; min-width: 170px; }
.regel-zeile select.stufe-0 { color: var(--gut); } .regel-zeile select.stufe-1 { color: var(--accent-text); }
.regel-zeile select.stufe-2 { color: #C26B2E; } .regel-zeile select.stufe-9 { color: var(--kritisch); }
.anleitung { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.anleitung pre { background: var(--raised); border-radius: 14px; padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 0; }
.anleitung p, .anleitung li { line-height: 1.6; }
.anleitung h3 { margin: 6px 0 0; font-size: 15px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--raised); padding: 1px 5px; border-radius: 6px; }
pre code { background: none; padding: 0; }
.push-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
@media (max-width: 720px) { .regel-zeile { flex-wrap: wrap; } .regel-zeile select { width: 100%; } }

/* Wochenziele */
.wochenziele { display: flex; flex-direction: column; gap: 8px; }
.wz-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.wz-karte { --z: var(--accent); display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--card); color: var(--ink);
  box-shadow: inset 0 3px 0 var(--z); }
.wz-karte:hover { text-decoration: none; }
.wz-karte strong { font-size: 15px; line-height: 1.3; }
.wz-karte.erreicht strong { text-decoration: line-through; opacity: 0.6; }
.wz-fakten { display: flex; gap: 10px; font-weight: 700; color: var(--muted); }
.wz-frage .wz-zeile, .feld .wz-zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.wz-zeile input { flex: 2 1 220px; }
.wz-zeile select { flex: 1 1 200px; width: auto; }
.wz-zeile.fest { align-items: baseline; padding: 8px 12px; border-radius: 12px; background: var(--raised); justify-content: space-between; }
.wz-bewertung { --z: var(--accent); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--raised); box-shadow: inset 3px 0 0 var(--z); }
.wz-bewertung .haupt { display: flex; flex-direction: column; min-width: 0; }
.skala.wort span { width: auto; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; background: var(--card); }

/* Extras */
.laedt { opacity: .7; pointer-events: none; }
.termin-chip { display:flex; gap:10px; align-items:center; padding:8px 12px; border-radius:14px; background: var(--band); font-size:13px; }
.termin-chip .zeit { font-weight:800; font-variant-numeric: tabular-nums; min-width: 92px; }

/* Sicherheit / Zwei-Faktor */
.code-eingabe { font-size: 28px; font-weight: 800; letter-spacing: .18em; text-align: center; height: 64px; font-variant-numeric: tabular-nums; }
.schritte-liste { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.schritte-liste li { padding-left: 4px; }
.schritte-liste li span { display: block; font-size: 14px; }
.zf-qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.zf-qr-bild svg { width: 200px; height: 200px; display: block; border-radius: 16px; background: #fff; padding: 6px; }
.zf-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.zf-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; padding: 10px 12px; border-radius: 12px; background: var(--band); text-align: center; }
.zf-aktionen { display: flex; gap: 10px; flex-wrap: wrap; }
.zf-passwort { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zf-passwort input { width: 180px; }
tr.zf-wichtig td:first-child { box-shadow: inset 3px 0 0 var(--schlecht); }

/* Datei-Auswahl einheitlich */
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 999px; padding: 10px 16px; margin-right: 12px;
  background: var(--raised); color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--band); }

/* Abmelden bei laufender Zeiterfassung */
.timer-dialog { border: 0; border-radius: 28px; padding: 24px; width: min(460px, calc(100vw - 32px)); background: var(--sheet); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.timer-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.timer-dialog::backdrop { background: rgba(5,8,7,.55); backdrop-filter: blur(3px); }
.geraet-schalter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }

.entsperren-knopf { height: 64px; font-size: 18px; border-radius: 22px; }
body.verdeckt .inhalt, body.verdeckt .seite { filter: blur(18px); }

/* Profilbilder */
.avatar { overflow: hidden; }
.avatar.mit-bild { background: var(--raised); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profilbild-bereich { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profilbild-bereich .avatar { width: 88px; height: 88px; font-size: 28px; }

/* Mein Tag über alle Firmen */
.firmen-logo.mini { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; display: inline-flex; vertical-align: -3px; }
.firmen-logo.mini img { object-fit: cover; }
.firmen-schalter { align-self: flex-start; }
.firmen-schalter a { display: inline-flex; align-items: center; gap: 8px; }
.firmen-stapel { display: inline-flex; }
.firmen-stapel .firmen-logo + .firmen-logo { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }

/* Kalender verbinden */
.kalender-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; max-width: 980px; }
.kalender-karte { gap: 10px; color: var(--ink); text-decoration: none; }
.kalender-karte:hover { text-decoration: none; box-shadow: inset 0 0 0 2px var(--accent-soft); }

/* ---------- v10: Leads & Listen ---------- */
.reiter-leiste a { gap: 6px; }
.reiter-zahl { font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--raised); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.segment .an .reiter-zahl { background: var(--accent-soft); color: var(--accent-text); }
.auswahl-zeile { gap: 10px; }
.auswahl-zeile > input[type=checkbox] { flex: 0 0 auto; }
.zeile-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--ink); padding: 2px 8px; margin: -2px -8px; border-radius: 12px; }
.zeile-link:hover { text-decoration: none; background: var(--band); }
.auswahl-leiste { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 20px; background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.18); margin-top: 10px; }
.auswahl-leiste select, .auswahl-leiste input { height: 38px; width: auto; min-width: 150px; flex: 1; }
@media (min-width: 900px) { .auswahl-leiste { bottom: 16px; } }
.leer-anleitung { padding: 22px 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.leer-anleitung strong { font-size: 16px; }
.leer-anleitung p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.5; }
.vorlagen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.vorlage-kachel { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--raised); color: var(--ink); }
.vorlage-kachel:hover { text-decoration: none; background: var(--band); }
.vorlage-kachel strong { margin-top: 4px; }
.vorlage-kachel span { font-size: 12px; color: var(--muted); }
.dubletten { border: 2px solid var(--accent); }
.dubletten .zeile .knopf { flex: 0 0 auto; }
.regel-block { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 18px; background: var(--band); }
.mail-vorschau { white-space: pre-wrap; font-size: 14px; line-height: 1.5; padding: 16px; border-radius: 16px; background: var(--band); color: var(--ink); max-height: 420px; overflow: auto; }
.radio-reihe { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.radio-reihe label, .radio-reihe div > label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.radio-reihe ul, .radio-reihe div { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); }
.import-arten { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.import-art { position: relative; cursor: pointer; }
.import-art input { position: absolute; opacity: 0; }
.import-art > span { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 16px; background: var(--raised); color: var(--ink); border: 2px solid transparent; }
.import-art em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.import-art input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.import-art input:focus-visible + span { outline: 2px solid var(--accent); }
details.anleitung { gap: 0; }
details.anleitung summary { cursor: pointer; padding: 6px 0; }
.anleitung-text p { margin: 8px 0; line-height: 1.55; }
pre.code { background: var(--raised); border-radius: 14px; padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 0; white-space: pre; }

/* ---------- v10: Hilfe, Coach, Tour ---------- */
.hilfe-knopf { width: 38px; height: 38px; }
.erklaert-karte { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 22px; background: var(--accent-soft); color: var(--ink); margin-bottom: 16px; }
.erklaert-icon { color: var(--accent-text); flex: 0 0 auto; margin-top: 1px; }
.erklaert-text { flex: 1; min-width: 0; }
.erklaert-text strong { color: var(--accent-text); }
.erklaert-text p { margin: 4px 0 0; line-height: 1.5; }
.erklaert-text ul, .leer-punkte { margin: 8px 0 0; padding-left: 18px; line-height: 1.55; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .erklaert-karte { flex-wrap: wrap; } .erklaert-karte form { width: 100%; } }
.coach { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.coach-hinweis { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.coach-icon { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-text); }
.coach-icon.kat-vertrieb { background: var(--blau-soft); color: var(--blau); }
.coach-icon.kat-alltag, .coach-icon.kat-team { background: var(--warn-soft); color: var(--warn); }
.coach-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.coach-text span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.coach-aktionen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.coach-aktionen form { display: flex; gap: 4px; }
.coach-einst { align-self: flex-end; }
@media (max-width: 720px) { .coach-hinweis { flex-wrap: wrap; } .coach-aktionen { width: 100%; justify-content: flex-start; } }
.einrichtung .balken { margin: 2px 0 4px; }
.checkliste-punkte { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.check-punkt { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; color: var(--ink); }
.check-punkt:hover { background: var(--band); text-decoration: none; }
.check-punkt .haupt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-punkt .haupt span { font-size: 12.5px; color: var(--muted); }
.check-punkt.fertig strong { text-decoration: line-through; color: var(--muted); }
.check-kreis { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.check-punkt.fertig .check-kreis { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tour-schleier { position: fixed; inset: 0; z-index: 900; pointer-events: auto; }
.tour-loch { position: fixed; z-index: 901; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(5, 10, 9, .62); transition: all .25s ease; pointer-events: none; }
.tour-blase { position: fixed; z-index: 902; width: min(340px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border-radius: 22px; padding: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 10px; transition: top .25s ease, left .25s ease; }
.tour-blase h3 { margin: 0; font-size: 17px; }
.tour-blase p { margin: 0; line-height: 1.5; color: var(--muted); font-size: 14px; }
.tour-fuss { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 4px; }
.tour-punkte { display: flex; gap: 4px; }
.tour-punkte i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-punkte i.an { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .tour-loch, .tour-blase { transition: none; } }

/* ---------- v11: Leadmagnete ---------- */
.filterleiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.magnet-tabelle td { white-space: normal; }
.magnet-tabelle td .badge { white-space: nowrap; }
.magnet-tabelle td:nth-child(2) { word-break: break-all; min-width: 140px; }
@media (max-width: 760px) { .magnet-tabelle td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; } .magnet-tabelle td:first-child::before { content: none; } .magnet-tabelle td:first-child { width: 100%; } }
.status-wahl select { height: 40px; width: auto; min-width: 170px; border-radius: 999px; padding: 0 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ergebnis-kopf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ergebnis-kopf > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: var(--band); min-width: 0; }
.ergebnis-kopf strong { font-size: 16px; }
@media (max-width: 560px) { .ergebnis-kopf { grid-template-columns: 1fr; } }
details.dimension { border-top: 1px solid var(--line); }
details.dimension summary { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; cursor: pointer; list-style: none; }
details.dimension summary::-webkit-details-marker { display: none; }
details.dimension summary .balken { grid-column: 1 / -1; }
.dim-name { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dim-punkte { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
ol.antworten { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
ol.antworten li { line-height: 1.45; }
ol.antworten li > * { vertical-align: top; }
ol.antworten li { display: list-item; }
ol.antworten li span { display: inline; }
.antwort-wert { float: right; margin-left: 12px; min-width: 28px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.ergebnis-fuss { padding-top: 4px; }
.klein-titel { font-size: 14px; margin: 6px 0 0; }

/* v12: Datenfreigabe (Claude-Konnektor) */
.datenfreigabe{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px 18px;margin-bottom:8px}
.freigabe-schalter{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;background:var(--raised);cursor:pointer}
.freigabe-schalter input{flex:0 0 auto;width:18px;height:18px;margin-top:2px}
.freigabe-schalter>span{display:flex;flex-direction:column;gap:2px;line-height:1.35}
.freigabe-schalter .hilfe{font-size:.82rem;color:var(--muted)}

/* v13: Einrichtungs-Checkliste auf- und zuklappbar */
.einrichtung-details > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--accent-text); padding: 4px 0; }
.einrichtung-details > summary::-webkit-details-marker { display: none; }
.einrichtung-details > summary svg { transition: transform .15s; }
.einrichtung-details[open] > summary svg { transform: rotate(90deg); }
.einrichtung-details > summary .auf, .einrichtung-details[open] > summary .zu { display: none; }
.einrichtung-details[open] > summary .auf { display: inline; }
.einrichtung-details .checkliste-punkte { margin-top: 8px; }

/* v15: Design-Feinschliff */
/* Kontrollkästchen mit Erklärung: Erklärung unter den Text statt daneben gequetscht */
.check { flex-wrap: wrap; row-gap: 2px; }
.check > input[type=checkbox], .check > input[type=radio] { flex: 0 0 auto; }
.check > .hilfe { flex: 1 0 100%; padding-left: 30px; margin-top: -6px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.check:has(> .hilfe) { padding: 6px 0; }
/* Ziel-Chips: lange Titel enden mit „…“ statt hart abgeschnitten zu werden */
.ziel-chip { min-width: 0; }
.ziel-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Hinweisboxen ohne Symbol: Text mit <code>, <a>, <strong> fließt normal statt in Spalten zu zerfallen */
.hinweisbox:not(:has(> svg)) { display: block; line-height: 1.5; }
.hinweisbox code { white-space: nowrap; }
/* Reiterleisten: nie in mehrere Zeilen umbrechen – bei Platzmangel seitlich wischen */
.segment { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.segment::-webkit-scrollbar { display: none; }
.segment > a, .segment > button { flex-shrink: 0; white-space: nowrap; }
/* Zahlen und Stundenangaben nicht mitten im Wert umbrechen */
.tabnum, .tabelle td.r, .tabelle th.r, .zeile .rechts strong { white-space: nowrap; }
/* Zweizeilige Einträge (Titel + graue Zeile) bekommen etwas Luft */
.regel-zeile .haupt, .freigabe-karte header .wer { gap: 2px; }
.freigabe-karte header .wer { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.freigabe-karte header .badge { flex-shrink: 0; align-self: flex-start; }
/* Mein Tag am Handy: Titel dürfen zweizeilig werden statt nach 15 Zeichen abzubrechen */
@media (max-width: 700px) {
  .fokus-zeile .haupt strong, .fokus-zeile .haupt .titel { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fokus-zeile .unterzeile { flex-wrap: wrap; }
  /* Zeilen mit Betrag + Knopf (z. B. Mahnwesen): Knopf in eine eigene Zeile */
  .zeile.umbruch { flex-wrap: wrap; row-gap: 8px; }
  .zeile.umbruch > form { flex-basis: 100%; display: flex; justify-content: flex-end; }
  .regel-zeile { flex-wrap: wrap; }
  .regel-zeile select { min-width: 0; width: 100%; }
  .pos-werkzeuge, .karte-kopf > .aktionen { flex-wrap: wrap; }
}
/* Kontrollkästchen mit Erklärung als Raster: Kästchen links, Text und Erklärung rechts untereinander */
.check:has(> .hilfe) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: start; }
.check:has(> .hilfe) > input { margin-top: 1px; }
.check:has(> .hilfe) > .hilfe { grid-column: 2; padding-left: 0; margin-top: 0; }
.segment.ueberlauf { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }

/* v15: Arbeitssitzungen mit Claude */
.ki-sitzung { padding: 8px 0; border-top: 1px solid var(--line); }
.ki-sitzung:first-of-type { border-top: 0; padding-top: 2px; }
.ki-sitzung-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ki-sitzung-kopf strong { min-width: 0; overflow-wrap: anywhere; }
.ki-sitzung-kopf .tabnum { flex: none; }
.ki-titel { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ki-titel .muted { font-size: .85em; font-weight: 600; }
.chat-kopf .haupt { line-height: 1.3; gap: 2px; min-width: 0; }

/* v19: Datenschutz, Verträge, Betreiber */
.raster-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.suchzeile { display: flex; gap: 8px; }
.suchzeile input { flex: 1; min-width: 0; }
.aktionen-klein { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pflicht-hinweis { margin-bottom: 0; }
.pflicht-hinweis a { color: inherit; text-decoration: underline; }
.vertragstext { max-height: 420px; overflow: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); line-height: 1.6; font-size: 14px; }
.vertragstext h2 { font-size: 17px; margin: 18px 0 6px; }
.vertragstext h3 { font-size: 15px; margin: 14px 0 4px; }
.vertragstext p, .vertragstext li { margin: 0 0 8px; }
.ampel { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ampel::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gut); }
.ampel.rot::before { background: var(--schlecht); }
.ampel.gelb::before { background: var(--warn); }
@media (max-width: 640px) { .suchzeile { flex-direction: column; } .aktionen-klein { justify-content: flex-start; } }
.vertrag-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.vertrag-block:first-of-type { border-top: 0; padding-top: 0; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; width: 100%; }
.rechtslinks { display: flex; justify-content: center; gap: 18px; font-size: 13px; }
.rechtslinks a { color: var(--muted); }
.rechtstext h2 { font-size: 17px; margin: 18px 0 6px; }
.rechtstext p, .rechtstext li { line-height: 1.6; }
.liste.lang .zeile .haupt span, .zeile.lang .haupt span { white-space: normal; overflow: visible; }
.vertragstext h1 { font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
/* v20: Beta-Vertrieb */
.kennzahl { gap: 4px; }
.kennzahl strong { font-size: 26px; letter-spacing: -0.02em; }
.abo-zeile > summary, details > summary.zeile { list-style: none; cursor: pointer; }
.abo-zeile > summary::-webkit-details-marker, details > summary.zeile::-webkit-details-marker { display: none; }
code.kopierbar { font-size: 12px; overflow-wrap: anywhere; white-space: normal; cursor: copy; }
.beta-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 0; padding: 10px 14px; border-radius: 14px; background: var(--blau-soft); color: var(--blau); font-weight: 600; font-size: 14px; }
.beta-leiste a { color: inherit; text-decoration: underline; }
.beta-leiste details { margin-left: auto; }
.beta-leiste form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; min-width: min(420px, 80vw); }

/* =========================================================== v21: HeyKompass · Designsystem „Tiefsee“ */
/* Grund: Licht von links oben (Mint) und rechts unten (Blau), feines Korn – nur in der App, nicht auf Kundenseiten */
html:has(body.tiefsee) { background: var(--bg); }
body { font-weight: 500; }
body.tiefsee { background: transparent; }
body.tiefsee::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='.13'/%3E%3C/svg%3E"),
    radial-gradient(60% 45% at 8% 0%, rgba(95,212,196,.30) 0%, transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(60,110,220,.34) 0%, transparent 70%),
    linear-gradient(180deg, #06111A 0%, #082028 100%);
  background-size: 240px 240px, 100% 100%, 100% 100%, 100% 100%;
  background-blend-mode: overlay, normal, normal, normal; }
:root[data-theme="light"] body.tiefsee::before { background: radial-gradient(60% 45% at 8% 0%, rgba(94,211,195,.12) 0%, transparent 70%), radial-gradient(60% 50% at 100% 100%, rgba(61,102,214,.08) 0%, transparent 70%), var(--bg); background-blend-mode: normal; }

/* Typografie */
h1 { font-weight: 800; letter-spacing: -0.045em; }
h2 { letter-spacing: -0.03em; }
h3 { letter-spacing: -0.02em; }
.label, .nav-label, .kpi .l, .tabelle th, .fakten dt, .seitenkopf .oberzeile, .wochenziele > .oberzeile, .agent-kachel .l, .jetzt-label, .ziel-kopf .ebene, .pos-tabelle th {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.label { display: inline-flex; align-items: center; gap: 8px; line-height: 1.3; }
.tabelle th { letter-spacing: 0.08em; }
.nav-label { padding-bottom: 6px; }
.seitenkopf .oberzeile { margin-bottom: 6px; }
.wortmarke { font-weight: 800; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; line-height: 1; }
.wortmarke .hey { font-weight: 500; color: #A7BAC4; letter-spacing: -0.03em; }
.marke .wortmarke { font-size: 21px; }
.marke .wortmarke .hey { font-size: inherit; font-weight: 500; }
:root[data-theme="light"] .wortmarke .hey { color: #53666F; }
.wortmarke-gross { font-size: 27px; }
.bildzeichen { flex-shrink: 0; border-radius: 28%; box-shadow: 0 8px 22px -10px rgba(94,211,195,.55); }
.geld, .zeit-blau { color: var(--blau-text); }

/* Glas als Standardfläche */
.karte, .kpi, .spalte, .chat-liste, .chat-fenster, .tag-spalte, .nutzer, .firmenwahl summary, .suchfeld, .timer-pille, .segment, .auswahl-vorschau,
.leitstand-rahmen, .fokus-fuss, .coach-hinweis, .auswahl-leiste {
  background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rand); -webkit-backdrop-filter: var(--glas); backdrop-filter: var(--glas); }
.karte { border-radius: var(--radius-l); }
.kpi { border-radius: 22px; padding: 20px; }
.segment.auf-karte { background: var(--raised); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.segment .an { background: var(--seg-on); color: var(--ink); }
:root[data-theme="light"] .segment .an { box-shadow: 0 1px 3px rgba(10,28,39,.12); }
.liste .zeile + .zeile, .zeile + .zeile, .fokus-zeile + .fokus-zeile { border-top-color: var(--line); }
.fokus-zeile { background: transparent; }
.sortierbar.zieht { background: var(--sheet); }
.firmen-stapel .firmen-logo + .firmen-logo { box-shadow: 0 0 0 2px var(--sheet); }

/* Weitere Flächen */
.flaeche-nacht { background: var(--nacht) !important; box-shadow: inset 0 0 0 1px var(--nacht-rand) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.flaeche-blau { background: var(--blauglas) !important; box-shadow: inset 0 0 0 1px var(--blauglas-rand) !important; }
.flaeche-crew { background: var(--crew) !important; box-shadow: inset 0 0 0 1px var(--crew-rand) !important; }
.flaeche-papier { --ink: #0A1C27; --muted: #53666F; --tertiary: #5B6F79; --line: rgba(10,28,39,0.08); --raised: #EEF2F3; --card: #FFFFFF; --band: rgba(10,28,39,0.04);
  --feld: #EEF2F3; --feld-rand: transparent; --accent: #2BB3A1; --accent-text: #0A6E62; --blau-text: #2648B0; --schlecht: #C4321F; --gut: #1B7A3E;
  background: var(--papier) !important; color: var(--papier-ink); box-shadow: 0 24px 60px -30px rgba(0,0,0,.6) !important; -webkit-backdrop-filter: none; backdrop-filter: none; color-scheme: light; }
.mint-kachel { background: var(--mint-kachel) !important; color: #05211F !important; box-shadow: none !important; }
.mint-kachel .l, .mint-kachel .d, .mint-kachel .muted, .mint-kachel small { color: rgba(5,33,31,.74) !important; }
.mint-kachel .w { color: #05211F !important; }
.flaeche-blau .gross, .flaeche-blau .kpi-wert { color: var(--ink); }
.flaeche-blau .waehrung { color: var(--blau-text); }

/* Seitenleiste: Nachtblau, schwebend */
@media (min-width: 901px) {
  .seite { margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 26px; background: var(--nacht); box-shadow: inset 0 0 0 1px var(--nacht-rand); padding: 20px 12px; }
  :root[data-theme="light"] .seite { background: transparent; box-shadow: none; }
  .inhalt { padding-left: 24px; }
}
.nav a { border-radius: 999px; }
.nav a.aktiv { background: var(--nav-aktiv); color: var(--ink); }
.nav a.aktiv .icon { color: var(--accent-text); }
:root[data-theme="light"] .nav a.aktiv { box-shadow: 0 1px 3px rgba(10,28,39,.08); }
.firmenwahl .menu, .combo-liste { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--card-rand), 0 24px 50px -16px rgba(0,0,0,.55); }

/* Knöpfe: Pillen, Primär in Mint mit dunklem Text */
.knopf { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rand); }
.knopf.zart { background: var(--raised); box-shadow: none; }
.knopf.primaer, .kreis-aktion.primaer .kreis { background: var(--mint-knopf); color: #05211F; box-shadow: 0 10px 24px -12px rgba(94,211,195,.7), inset 0 1px 0 rgba(255,255,255,.45); }
.knopf.gefahr { background: var(--schlecht-soft); box-shadow: none; }
.knopf:hover { filter: brightness(1.07); }
:root[data-theme="light"] .knopf:hover { filter: brightness(0.97); }
.kreis-aktion .kreis { background: var(--raised); box-shadow: inset 0 0 0 1px var(--card-rand); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--card-rand);
  font-size: 13px; font-weight: 600; color: var(--ink); max-width: 100%; min-width: 0; }
.chip .icon { color: var(--muted); }
.chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Formulare */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], input[type=tel], input:not([type]), select, textarea {
  background: var(--feld); border-color: var(--feld-rand); }
input:focus, select:focus, textarea:focus { border-color: var(--fokus); background: var(--feld); box-shadow: 0 0 0 3px var(--accent-soft); }
.suchfeld input, .suchfeld input[type=search] { background: none; box-shadow: none; }
input[type=color], input[type=file]::file-selector-button { background: var(--raised); }
select option { background: var(--sheet); color: var(--ink); }

/* Sichtbare Fokusringe */
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.knopf:focus-visible, .segment a:focus-visible, .segment button:focus-visible, .nav a:focus-visible, .chip:focus-visible { outline-offset: 3px; border-radius: 999px; }

/* Meldungen, Dialoge, Tooltip */
.meldung { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--card-rand), 0 24px 50px -16px rgba(0,0,0,.55); }
.meldung .kreis { background: var(--mint-knopf); color: #05211F; }
dialog.sheet .sheet-innen, .timer-dialog, .tour-blase { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--card-rand), 0 30px 80px rgba(0,0,0,.45); }
dialog.sheet::backdrop, .timer-dialog::backdrop { background: rgba(3,10,16,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* Handy: schwebende Pillen-Tabbar */
@media (max-width: 900px) {
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 8px 4px; border-radius: 28px; border-top: 0;
    background: var(--tab-bg); box-shadow: inset 0 0 0 1px var(--card-rand), 0 20px 44px -14px rgba(0,0,0,.6);
    -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
  .tabbar a.aktiv { color: var(--accent-text); }
  :root[data-theme="light"] .tabbar a.aktiv { color: var(--ink); }
  .karte { border-radius: 22px; padding: 20px; }
  .kpi { padding: 16px; }
  .meldungen { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .stickyleiste { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
.stickyleiste { box-shadow: inset 0 0 0 1px var(--card-rand), 0 14px 34px -14px rgba(0,0,0,.5); }

/* Wochen-Ring: Ring per Maske, damit er auf Glas funktioniert */
.ring { position: relative; background: none; --ring-dicke: 12px; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--raised) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-dicke)), #000 calc(100% - var(--ring-dicke) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-dicke)), #000 calc(100% - var(--ring-dicke) + 1px)); }
.ring > div { background: transparent; position: relative; }
@media (max-width: 720px) { .ring { --ring-dicke: 10px; } }

/* „Als Nächstes“ / Tagesfokus: großes Glas mit Mint-Glühen statt Mint-Fläche */
.jetzt-karte { background: var(--hero); color: var(--ink); box-shadow: inset 0 0 0 1px var(--crew-rand), var(--schatten); -webkit-backdrop-filter: var(--glas); backdrop-filter: var(--glas); }
.jetzt-karte .jetzt-label { opacity: 1; color: var(--accent-text); }
.jetzt-karte .unterzeile { color: var(--muted); opacity: 1; }
.jetzt-karte .ziel-chip { background: color-mix(in srgb, var(--z) 16%, transparent); color: var(--ink); } .jetzt-karte .ziel-chip svg { color: var(--z); }
.jetzt-karte .knopf.primaer { background: var(--mint-knopf); color: #05211F; }
.jetzt-karte .knopf.zart { background: var(--raised); color: var(--ink); }

/* Termine: Zeitleiste, Zeiten in Blau */
.termin-chip { position: relative; background: transparent; border-radius: 0; padding: 8px 0 8px 18px; }
.termin-chip::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: var(--line-strong); border-radius: 2px; }
.termin-chip::after { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 3px var(--blau-soft); }
.termin-chip .zeit { color: var(--blau-text); }
a.termin-chip { color: var(--ink); }
a.termin-chip:hover { text-decoration: none; background: var(--band); border-radius: 12px; }

/* Ziele & Wochenziele: Nachtblau */
.wz-karte, .ziel-karte { background: var(--nacht); box-shadow: inset 0 0 0 1px var(--nacht-rand), inset 0 3px 0 var(--z); }
.ziel-karte { box-shadow: inset 0 0 0 1px var(--nacht-rand), inset 4px 0 0 var(--z); border-left: 0; }
:root[data-theme="light"] .ziel-karte { background: var(--raised); box-shadow: inset 4px 0 0 var(--z); }
.mini-aufgabe { background: var(--raised); }

/* Freigaben & Agenten: Crew-Karten */
.freigabe-karte { background: var(--crew); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.freigabe-karte.stufe-2 { box-shadow: inset 0 0 0 1px var(--crew-rand), inset 4px 0 0 #E0A06F; }
.freigabe-karte.entschieden { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rand); }
.freigabe-karte.kompakt { background: var(--raised); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.agent-kachel { background: var(--crew); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.agent-kachel.gut { box-shadow: inset 0 0 0 1px var(--crew-rand), inset 0 3px 0 var(--gut); }
.agent-kachel.warn { box-shadow: inset 0 0 0 1px var(--crew-rand), inset 0 3px 0 #E0A06F; color: var(--warn); }
.agent-kachel.kritisch { box-shadow: inset 0 0 0 1px var(--crew-rand), inset 0 3px 0 var(--kritisch); }
.blase.nutzer { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.blase.nutzer a { color: var(--accent-text); }
.avatar:not([style*="background"]) { color: var(--on-accent); }
.agenten-logo.leer { background: var(--mint-kachel); color: #05211F; }

/* Kleinigkeiten */
.schritt.bezahlt .kreis { color: #05211F; }
:root[data-theme="light"] .schritt.bezahlt .kreis { color: #FFFFFF; }
.ziel-balken { background: color-mix(in srgb, var(--z) 18%, transparent); }
.nav .zaehler { background: var(--kritisch); }
.gefahr-text, .agent-kachel.kritisch { color: var(--schlecht) !important; }
.badge-blau { color: var(--blau-text); }
.hinweisbox.info, .erklaert-karte { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
.erklaert-karte { color: var(--ink); }
.beta-leiste { color: var(--blau-text); box-shadow: inset 0 0 0 1px var(--blauglas-rand); }
.zf-qr-bild svg { background: #fff; }
.vertragstext { background: var(--raised); }
.tour-loch { box-shadow: 0 0 0 9999px rgba(3,10,16,.66); }

/* ------------------------------------------- Mein Tag · „Jetzt dran“ */
.meintag-schalter { align-self: flex-start; }
.meintag-schalter button { gap: 6px; }
:root[data-meintag="jetzt"] .meintag-liste { display: none !important; }
:root:not([data-meintag="jetzt"]) .meintag-jetzt { display: none; }
.meintag-jetzt { display: flex; flex-direction: column; gap: 20px; }
.jd-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 20px; align-items: start; }
.jd-haupt, .jd-seite { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jd-hero { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 30px 32px 28px; border-radius: 26px; min-height: 260px; justify-content: center;
  background: var(--hero); box-shadow: inset 0 0 0 1px var(--crew-rand), var(--schatten); -webkit-backdrop-filter: var(--glas); backdrop-filter: var(--glas); }
.jd-label { color: var(--accent-text); }
.jd-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.jd-titel { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.08; margin: 0; overflow-wrap: anywhere; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-chips .firmen-logo.mini { width: 16px; height: 16px; border-radius: 5px; }
.jd-aktionen { gap: 10px; }
.jd-fertig, .jd-leer { min-height: 200px; }
.jd-fertig { box-shadow: inset 0 0 0 1px var(--card-rand), var(--schatten); }
.jd-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.jd-schritte li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rand); min-width: 0; }
.jd-nr { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.jd-schritt-titel { font-weight: 650; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jd-schritte li.fertig .jd-schritt-titel { text-decoration: line-through; color: var(--muted); }
.jd-schritte li.fertig { background: transparent; }
.jd-schritte li.jetzt { box-shadow: inset 0 0 0 1.5px var(--accent); }
.jd-schritte li.jetzt .jd-nr { color: var(--accent-text); }
.jd-braucht .liste .zeile { padding: 10px 0; }
.jd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.jd-dot.mint { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.jd-dot.blau { background: var(--blau); box-shadow: 0 0 0 3px var(--blau-soft); }
.jd-termin { gap: 10px; }
.jd-termin-inhalt { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
a.jd-termin-inhalt:hover { text-decoration: none; }
.jd-termin .zeit { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--blau-text); }
.jd-zahlen { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 4px 0; border-top: 1px solid var(--line); }
.jd-zahlen div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jd-zahlen dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.jd-zahlen dd { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 900px) {
  .jd-raster { grid-template-columns: minmax(0, 1fr); }
  .jd-hero { padding: 24px 20px 20px; min-height: 0; border-radius: 24px; }
  .jd-aktionen form, .jd-aktionen > a { flex: 1 1 auto; }
  .jd-aktionen .knopf { width: 100%; }
  /* Schrittleiste am Handy: drei dünne Balken */
  .jd-schritte { display: flex; gap: 6px; }
  .jd-schritte li { flex: 1; padding: 0; height: 4px; border-radius: 99px; background: var(--raised); box-shadow: none; gap: 0; }
  .jd-schritte li.fertig { background: color-mix(in srgb, var(--accent) 45%, transparent); }
  .jd-schritte li.jetzt { background: var(--accent); box-shadow: none; }
  .jd-schritte li > :not(.sr-only) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .jd-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .jd-hero { transition: none; } }

/* ------------------------------------------- v22/v23: KI-Leitstand auf der Übersicht – ruhig: kompakte Karten, Details auf Klick */
.leitstand { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 24px; border-radius: 26px; background: var(--nacht);
  box-shadow: inset 0 0 0 1px var(--nacht-rand), var(--schatten); }
.ls-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; }
.ls-titelzeile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ls-titelzeile h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; }
.ls-werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ls-werkzeuge .segment { max-width: min(100%, 420px); }
.ls-fokus-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
[data-ls-fokus][aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--crew-rand); color: var(--accent-text); }
[data-ls-fokus][aria-pressed="true"] .ls-fokus-punkt { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ls-reiter { display: none; }
.ls-spalten { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ls-spalte { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ls-spalte-kopf { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0; padding: 2px 4px 4px; margin: 0; }
.ls-zahl { margin-left: auto; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.sp-braucht .ls-zahl { background: var(--mint-kachel); color: #05211F; }
.jd-dot.grau { background: var(--muted); box-shadow: 0 0 0 3px var(--band); }
.ls-karten { display: flex; flex-direction: column; gap: 8px; }
.ls-leer { margin: 0; padding: 18px 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; border-radius: 18px; background: var(--band); }
.ls-zuviel { display: none !important; }
.ls-weitere { all: unset; cursor: pointer; align-self: center; font-size: 13px; font-weight: 700; color: var(--accent-text); padding: 6px 10px; border-radius: 999px; }
.ls-weitere:hover { background: var(--band); }
/* Karte */
.ls-karte { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px 16px; border-radius: 18px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--card-rand); min-width: 0; outline-offset: 3px; transition: box-shadow .3s; }
.sp-braucht .ls-karte, .ls-wasjetzt .ls-karte { background: var(--crew); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.sp-fertig .ls-karte { background: var(--blauglas); box-shadow: inset 0 0 0 1px var(--blauglas-rand); }
.ls-karte.s-fehler { box-shadow: inset 3px 0 0 var(--schlecht), inset 0 0 0 1px var(--card-rand); }
.ls-karte.s-haengt { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px var(--card-rand); }
.ls-karte.ls-blink { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); }
.ls-kern { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; min-width: 0; border-radius: 10px; }
.ls-kern:focus-visible { outline: 2px solid var(--fokus); outline-offset: 4px; }
.ls-kern-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.ls-titel { font-size: 15px; font-weight: 750; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); overflow-wrap: anywhere; }
.ls-text { font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--ink); opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-meta { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.ls-meta b { font-weight: 800; }
.ls-wichtig { color: var(--accent-text); }
.ls-fuss { display: flex; gap: 6px; align-items: center; }
.ls-fuss > form { display: flex; }
.ls-mehrmenue { position: relative; margin-left: auto; }
.ls-mehrmenue > summary { list-style: none; width: 34px; }
.ls-mehrmenue > summary::-webkit-details-marker { display: none; }
.ls-menue { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px;
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--card-rand), 0 18px 40px -14px rgba(0,0,0,.55); min-width: 230px; }
.ls-menue form { display: flex; flex-direction: column; gap: 2px; }
.ls-menue .knopf { justify-content: flex-start; background: transparent; box-shadow: none; width: 100%; }
.ls-menue .knopf:hover { background: var(--raised); filter: none; }
.ls-mehr { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.ls-mehr p { margin: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ls-mehr .muted { font-size: 12.5px; }
.ls-antwort { display: flex; flex-direction: column; gap: 6px; }
.ls-antwort textarea { min-height: 60px; }
.ls-verlauf:empty { display: none; }
.ls-verlauf-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
/* Läuft: schmale Zeilen */
.ls-karte.ls-schmal { flex-direction: row; align-items: flex-start; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--band); box-shadow: none; flex-wrap: wrap; }
.ls-schmal .ls-kern { flex: 1; align-items: center; }
.ls-schmal .jd-dot { margin-top: 1px; }
.ls-schmal .ls-titel { font-size: 14px; font-weight: 650; }
.ls-schmal .ls-meta { font-size: 12px; }
.ls-schmal .ls-fuss { margin-left: auto; }
.ls-schmal .ls-mehr { flex-basis: 100%; }
/* Was jetzt? */
.ls-wasjetzt { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--hero); box-shadow: inset 0 0 0 1px var(--crew-rand); }
.ls-wasjetzt-kopf { display: flex; justify-content: space-between; align-items: center; }
.ls-wasjetzt .ls-karte { max-width: 640px; }
.ls-wasjetzt .ls-titel { font-size: 20px; }
.ls-buendel-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
/* Zurückgestellt / erledigt */
.ls-weiteres > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.ls-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.ls-erledigt { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 16px; background: var(--band); font-weight: 600; font-size: 13.5px; }
.ls-erledigt form { align-self: flex-start; }
@media (max-width: 1100px) and (min-width: 901px) { .ls-spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ls-spalte.sp-fertig { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .leitstand { padding: 18px 14px 16px; border-radius: 24px; gap: 12px; }
  .ls-titelzeile h2 { font-size: 21px; }
  .ls-werkzeuge { width: 100%; }
  .ls-werkzeuge [data-ls-wasjetzt-knopf] { margin-left: auto; }
  .ls-reiter { display: inline-flex; align-self: stretch; }
  .ls-reiter button { flex: 1 0 auto; gap: 6px; justify-content: center; }
  .ls-spalten { grid-template-columns: minmax(0, 1fr); }
  .ls-spalte-kopf { display: none; }
  .leitstand[data-ls-ansicht="braucht"] .ls-spalte:not(.sp-braucht),
  .leitstand[data-ls-ansicht="laeuft"] .ls-spalte:not(.sp-laeuft),
  .leitstand[data-ls-ansicht="fertig"] .ls-spalte:not(.sp-fertig) { display: none; }
  .ls-menue { right: 0; min-width: 220px; }
}
