/* ===================== Leitstand 2: Schriften und Farb-Token =====================
   Thema: html[data-theme="dark" | "light"] (gesetzt von js/thema.js vor dem ersten Zeichnen)
   Abteilung: body[data-mandant="bau" | "med"] (iPersonal Rot, MediPersonal Blau mit Gruen)
   Alte Namen (--glass, --input, --primary, --primary-2 ...) bleiben als Alias erhalten. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2');
  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: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2');
  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: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext-400-normal.woff2) format('woff2');
  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; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-ext-700-normal.woff2) format('woff2');
  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; }

/* Thema dunkel (Standard) */
:root {
  color-scheme: dark;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --bg: #050608; --app: #0A0B0E; --sb: #0C0E11;
  --flaeche: #111317; --flaeche-b: #0E1013; --flaeche-2: #15181D; --flaeche-3: #1C2027; --feld: #07080A; --knopf: #15181D;
  --line: rgba(214, 222, 236, .08); --line-strong: rgba(214, 222, 236, .14); --line-3: rgba(214, 222, 236, .26);
  --rand-o: rgba(255, 255, 255, .12); --rand-u: rgba(214, 222, 236, .06);
  --text: #EDEFF3; --muted: #A9AFBA; --muted-2: #8A919C;
  --silber: #D7DCE4; --silber-rgb: 215, 220, 228;
  --glas: rgba(14, 16, 20, .74); --glas-voll: rgba(17, 19, 24, .985);
  --hover: rgba(214, 222, 236, .05);
  --sch-1: inset 0 1px 0 rgba(255, 255, 255, .035), 0 18px 40px -22px rgba(0, 0, 0, .7);
  --sch-2: 0 50px 110px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .3);
  --licht-1: rgba(196, 208, 230, .075);
  --ok-bg: rgba(74, 222, 128, .09); --ok-tx: #8EE0AC; --ok-ln: rgba(74, 222, 128, .26);
  --warn-bg: rgba(250, 204, 21, .085); --warn-tx: #EFD27E; --warn-ln: rgba(250, 204, 21, .24);
  --info-bg: rgba(167, 139, 250, .11); --info-tx: #C8BBFF; --info-ln: rgba(167, 139, 250, .3);
  --neu-bg: rgba(205, 214, 228, .06); --neu-tx: #C2C7D0; --neu-ln: rgba(205, 214, 228, .17);
  --gefahr-bg: rgba(248, 113, 113, .09); --gefahr-tx: #F4A3A3; --gefahr-ln: rgba(248, 113, 113, .28);
  --green: #34D07A; --lime: var(--green); --orange: #F0A23B; --yellow: #EFD27E; --red: #F87171; --violet: #C8BBFF;
  --anruf: #15803D; --anruf-h: #166534;
  --radius: 16px;
  /* Aliase der alten Namen */
  --glass: var(--flaeche); --glass-2: var(--flaeche-2); --input: var(--feld);
  /* Marke iPersonal (Grundwerte) */
  --ak: #E40313; --ak-rgb: 228, 3, 19; --ak-btn: #E40313; --ak-btn-2: #B8020F; --ak-btn-h: #C9020F;
  font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 14px; color: var(--text);
}
/* Thema hell */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #E6E7EB; --app: #F4F4F6; --sb: #FBFBFC;
  --flaeche: #FFFFFF; --flaeche-b: #FFFFFF; --flaeche-2: #F6F6F8; --flaeche-3: #ECECF0; --feld: #F7F7F9; --knopf: #FFFFFF;
  --line: #E3E3E9; --line-strong: #D2D3DA; --line-3: #A6A7B0;
  --rand-o: #E3E3E9; --rand-u: #E3E3E9;
  --text: #1D1D1F; --muted: #4A4B52; --muted-2: #62636C;
  --silber: #6E7580; --silber-rgb: 110, 117, 128;
  --glas: rgba(255, 255, 255, .82); --glas-voll: rgba(255, 255, 255, .97);
  --hover: rgba(17, 17, 26, .04);
  --sch-1: 0 1px 2px rgba(17, 17, 26, .04), 0 12px 30px -18px rgba(17, 17, 26, .16);
  --sch-2: 0 40px 90px -30px rgba(17, 17, 26, .22), 0 2px 6px rgba(17, 17, 26, .05);
  --licht-1: rgba(255, 255, 255, .9);
  --ok-bg: #E8F5ED; --ok-tx: #17663A; --ok-ln: #BEE2CB;
  --warn-bg: #FBF2D9; --warn-tx: #775400; --warn-ln: #EAD49D;
  --info-bg: #F0ECFE; --info-tx: #5126A6; --info-ln: #D6CCF7;
  --neu-bg: #F1F1F4; --neu-tx: #4A4B52; --neu-ln: #DCDCE2;
  --gefahr-bg: #FDF0F0; --gefahr-tx: #A3242A; --gefahr-ln: #F1C7C7;
  --green: #15803D; --orange: #B45309; --yellow: #775400; --red: #B91C1C; --violet: #5126A6;
}
/* Abgeleitete Marken-Token: auf body, damit body[data-mandant="med"] sie mit seinen eigenen Grundwerten berechnet */
body {
  --ink: #FF5C66; --ak2: var(--silber); --ak2-deko: var(--silber); --ink2: var(--muted);
  --fokus: var(--ak); --ak-grafik: var(--ak); --ring: var(--ak);
  --ak-bg: rgba(var(--ak-rgb), .10); --ak-ln: rgba(var(--ak-rgb), .42); --primary-glow: rgba(var(--ak-rgb), .45);
  --licht-2: rgba(var(--ak-rgb), .05);
  --primary: var(--ak-btn); --primary-2: var(--ink);
}
html[data-theme="light"] body {
  --ink: #B0000E; --ring: var(--ink);
  --ak-bg: rgba(var(--ak-rgb), .07); --ak-ln: rgba(var(--ak-rgb), .40); --primary-glow: rgba(var(--ak-rgb), .30);
  --licht-2: rgba(var(--ak-rgb), .04);
}
/* MediPersonal: Logo-Blau, Gruen als Zweitakzent, kein Rot als Marke */
body[data-mandant="med"] {
  --ak: #0A9BD9; --ak-rgb: 10, 155, 217; --ak-btn: #0879B2; --ak-btn-2: #05608E; --ak-btn-h: #06689C;
  --ink: #5CCBF7; --ak2: #2EAA60; --ak2-deko: #2EAA60; --ink2: #5FD08E;
  --fokus: var(--ak2); --ak-grafik: #0A9BD9;
}
html[data-theme="light"] body[data-mandant="med"] {
  --ink: #055F88; --ak2: #1F8A4A; --ink2: #17703F; --ak-grafik: #0879B2;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: var(--bg); }
body { font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.4; color: var(--text); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--text); text-decoration-color: var(--ak-ln); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.muted { color: var(--muted); }
.error { color: var(--gefahr-tx); min-height: 1em; margin: 0; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Hintergrund: weiche Lichtflächen, kein Raster ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1100px 680px at 82% -12%, var(--licht-1), transparent 66%), radial-gradient(900px 700px at -12% 38%, var(--licht-2), transparent 70%),
    radial-gradient(1000px 700px at 50% 118%, var(--licht-1), transparent 70%), var(--app); }
.bg::after { content: ""; position: absolute; inset: 0; opacity: .04; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
html[data-theme="light"] .bg::after { opacity: .03; }

.glass { border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--sch-1);
  background: linear-gradient(180deg, var(--flaeche), var(--flaeche-b)) padding-box, linear-gradient(180deg, var(--rand-o), var(--rand-u) 42%) border-box; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 0; padding: 0; min-height: 100vh; }
main { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 24px 28px 40px; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 14px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.brand b { display: block; font-size: 22px; letter-spacing: .2px; }
.brand small { color: var(--muted); font-size: 13px; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ak-btn), var(--ak-btn)); box-shadow: 0 6px 18px var(--primary-glow); }
.brand-logo svg.i { width: 26px; height: 26px; color: var(--ink); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 6px 12px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 14px; cursor: pointer; white-space: nowrap; border: 0; background: none; width: 100%; text-align: left; font-family: inherit; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: linear-gradient(90deg, var(--primary), var(--ak-btn)); box-shadow: 0 6px 18px var(--primary-glow); }
.nav-item svg.i { width: 22px; height: 22px; }
.nav-item .count { margin-left: auto; min-width: 26px; padding: 1px 7px; border-radius: 99px; text-align: center; font-size: 12px;
  background: var(--flaeche-3); color: var(--text); }
.nav-item.active .count { background: rgba(255, 255, 255, .22); }
.sidebar-foot { margin-top: auto; padding: 12px 8px 2px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.sidebar-foot .who { flex: 1; min-width: 0; font-size: 13px; }
.sidebar-foot .who b, .sidebar-foot .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Kopfzeile ---------- */
.top-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; max-width: 420px; }
.top-search input { flex: 1; background: none; border: 0; padding: 0; font-size: 15px; }
.top-search input:focus { outline: none; }
.top-row { display: grid; grid-template-columns: minmax(300px, 1.15fr) minmax(260px, 1fr) minmax(420px, 1.55fr); gap: 14px; }
.widget { padding: 16px 18px; display: flex; align-items: center; gap: 16px; min-height: 112px; position: relative; overflow: hidden; }
.widget-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--ak-btn), var(--ak-btn)); flex: none; }
.widget-icon svg.i { width: 24px; height: 24px; color: var(--ink); }
.clock-text small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.clock-text small:first-child { color: var(--text); }
.clock-text b { display: block; font-size: 36px; font-weight: 500; margin-top: 4px; letter-spacing: 1px; }
.analog { margin-left: auto; width: 92px; height: 92px; flex: none; }
.weather .wx-icon { font-size: 44px; line-height: 1; }
.weather b { display: block; font-size: 26px; font-weight: 500; }
.weather .city-skyline { position: absolute; right: 0; top: 0; bottom: 0; width: 45%; opacity: .8;
  background: linear-gradient(90deg, var(--glass) 0%, transparent 40%),
    none; }
.stats { flex-direction: column; align-items: stretch; gap: 10px; }
.stats-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; align-items: center; gap: 10px; padding: 0 10px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat-ic svg.i { width: 22px; height: 22px; color: var(--ink); }
.stat b { font-size: 22px; font-weight: 600; display: block; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); line-height: 1.2; display: block; }

/* ---------- Panels / Tabellen ---------- */
.panel { padding: 16px 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 22px; }
.panel-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.panel-head .spacer { flex: 1; }
.head-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--ak-btn), var(--ak-btn)); flex: none; }
.head-icon svg.i { width: 22px; height: 22px; color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters label { min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }
.filters select { max-width: 100%; } /* lange Einträge (z.B. Berufe) dürfen nicht über den Rand ragen (Handy) */

input, select, textarea { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 12px; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ak-ln); border-color: var(--ak-ln); }
select option { background: var(--glas-voll); }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); padding: 0; margin: 0; cursor: pointer; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon svg.i { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 36px; width: 100%; }

.btn { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; padding: 8px 15px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--flaeche-2); color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn)); border-color: var(--ak-ln); box-shadow: 0 6px 16px var(--primary-glow); }
.btn.primary:hover { background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn)); }
.btn.success { background: linear-gradient(180deg, var(--green), var(--green)); border-color: var(--ok-ln); }
.btn.danger { color: var(--gefahr-tx); }
.btn.big { width: 100%; padding: 13px; font-size: 16px; font-weight: 600; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.icon { padding: 6px 9px; background: transparent; border-color: transparent; }
.btn.icon:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: default; }

.table-wrap { overflow: auto; border-radius: 10px; }
.table-wrap.short { max-height: 300px; }
.table-wrap.tall { max-height: 520px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 500; position: sticky; top: 0; background: var(--glas-voll); z-index: 1; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--hover); }
tbody tr.selected td { background: linear-gradient(90deg, var(--ak-bg), var(--ak-bg)); }
tbody tr.selected:hover td { background: var(--ak-bg); }
td.actions { text-align: right; }
td.actions .btn { padding: 4px 5px; }
#matches-panel td, #matches-panel th { padding: 7px 6px; font-size: 13px; }
#matches-panel .avatar { width: 30px; height: 30px; }
.empty { text-align: center; color: var(--muted); padding: 28px; white-space: normal; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap;
  color: var(--neu-tx); background: var(--neu-bg); border: 1px solid var(--neu-ln); }
.pill::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill svg.i { display: none; }
.st-neu, .st-in_bearbeitung { background: var(--neu-bg); color: var(--neu-tx); border-color: var(--neu-ln); }
.st-offene_anfrage { background: var(--ak-bg); color: var(--ink); border-color: var(--ak-ln); }
.st-rueckruf { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.st-interesse, .st-im_einsatz { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.st-kein_interesse { background: transparent; color: var(--muted-2); border-color: var(--line-strong); }
.st-kurzprofil_gesendet { background: var(--info-bg); color: var(--info-tx); border-color: var(--info-ln); }
.st-sperre { background: var(--gefahr-bg); color: var(--gefahr-tx); border-color: var(--gefahr-ln); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; background: var(--flaeche-3); margin-right: 4px; }
.dot { display: inline-flex; align-items: center; gap: 6px; }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--green)); box-shadow: 0 0 8px var(--c, var(--green)); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); flex: none; }
.avatar.lg { width: 96px; height: 104px; border-radius: 12px; font-size: 32px; }
.cand-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ring { display: block; }
.ring text { fill: var(--text); font-weight: 700; }

/* ---------- Dialer-Ansicht ---------- */
.bottom-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; padding: 0; }
.bottom-row > .panel:first-child { border-right: 1px solid var(--line); }
.cand-panel { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cand-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.cand-head h3 { font-size: 20px; }
.cand-head .meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.cand-head .meta span { display: flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 6px; }
.tabs button { flex: 1; font: inherit; color: var(--text); background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px; cursor: pointer; }
.tabs button.active { background: var(--primary); border-color: var(--ak-ln); }
.facts { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px 10px; align-items: center; font-size: 14px; }
.facts svg.i { color: var(--muted); }
.facts .v { color: var(--text); }
.profile-box { white-space: pre-wrap; background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13.5px; line-height: 1.55; max-height: 230px; overflow: auto; }
.sel-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* ---------- Sonstige Seiten ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { flex-direction: row; align-items: center; color: var(--text); gap: 7px; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 30px; text-align: center; color: var(--muted); cursor: pointer; background: var(--flaeche-2); }
.dropzone.over { border-color: var(--ak-ln); background: var(--ak-bg); }
.dropzone b { color: var(--text); font-size: 16px; display: block; margin-bottom: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line-strong); padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--silber); position: absolute; left: -6px; top: 4px; box-shadow: 0 0 0 3px var(--flaeche); }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-ln); border-radius: 10px; padding: 10px 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Login / Modal / Toast ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 360px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.modal { position: fixed; inset: 0; background: rgba(5,6,8,.62); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-box { width: min(760px, 100%); max-height: 92vh; overflow: auto; padding: 22px; background: var(--glas-voll); }
.modal-box h2 { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.toast { position: fixed; bottom: 22px; right: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 11px 16px 11px 14px;
  border-radius: 18px; background: var(--glas-voll); color: var(--text); border: 1px solid var(--ok-ln); box-shadow: var(--sch-2); font-size: 13.5px; pointer-events: none; }
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--ok-bg); }
.toast.bad { border-color: var(--gefahr-ln); }
.toast.bad::before { background: var(--red); box-shadow: 0 0 0 4px var(--gefahr-bg); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(var(--silber-rgb), .25); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1400px) {
  .top-row { grid-template-columns: 1fr 1fr; }
  .top-row .stats { grid-column: 1 / -1; }
  .bottom-row { grid-template-columns: 1fr; }
  .bottom-row > .panel:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .top-row, .grid-2, .grid-main { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
#matches-panel td.skills { white-space: normal; min-width: 110px; max-width: 140px; }
#matches-panel td.skills .tag { margin-bottom: 3px; }
/* =================== Version 0.2: Mein Tag, Anrufmodus, Versand, Dossier, Vermittler =================== */
.small { font-size: 12.5px; }
.warn { color: var(--orange); }
.warn-bg { background: var(--ak-btn) !important; color: #fff !important; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 12px 12px 4px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.span2 { grid-column: span 2; }
.grid-2s { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.grid-2s > * { min-width: 0; }
.grid-2s input, .grid-2s select { min-width: 0; max-width: 100%; }
.grid-3s { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin: 10px 0; }
.row.nowrap { flex-wrap: nowrap; }
.stack-col { display: flex; flex-direction: column; gap: 14px; }
.subsec { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 16px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.check-line { flex-direction: row !important; align-items: center; gap: 9px !important; color: var(--text) !important; margin: 10px 0; }
.check-line.inline { margin: 0; }
.lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 6px; }
.row-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.notice.small { padding: 8px 12px; margin-top: 10px; }
.tag.big { font-size: 13px; padding: 4px 10px; }
.tag.small { font-size: 11px; margin-left: 6px; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--primary-2); }
td span.small, td .muted.small, .task-main .small { display: block; }
.wrap-cell { white-space: normal; min-width: 140px; max-width: 260px; }
.bar { height: 6px; border-radius: 6px; background: var(--flaeche-3); overflow: hidden; min-width: 80px; margin-bottom: 3px; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 6px; }

/* Zuletzt kontaktiert */
.age { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.age-fresh { background: var(--ok-bg); color: var(--ok-tx); box-shadow: inset 0 0 0 1px var(--ok-ln); }
.age-mid { background: var(--warn-bg); color: var(--warn-tx); box-shadow: inset 0 0 0 1px var(--warn-ln); }
.age-old { background: var(--warn-bg); color: var(--orange); box-shadow: inset 0 0 0 1px var(--warn-ln); }
.age-never { background: var(--neu-bg); color: var(--neu-tx); box-shadow: inset 0 0 0 1px var(--neu-ln); }

/* Mein Tag */
.hero { padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 28px; margin-bottom: 4px; }
.hero p { margin: 0; }
.btn.huge { padding: 14px 26px; font-size: 17px; font-weight: 600; border-radius: 12px; }
.kpis { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr 1fr 1fr; gap: 14px; }
.kpi { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.kpi .count { display: block; font-size: 30px; font-weight: 700; line-height: 1.15; }
.kpi .count small { font-size: 18px; color: var(--muted); font-weight: 500; }
.kpi.big .count { font-size: 40px; }
.kpi > div > span { display: block; }
.kpi-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-ic svg.i { width: 24px; height: 24px; color: var(--ink); }
.task-group { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 10px 0 6px; }
.task-group.overdue { color: var(--orange); }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--flaeche-2); border: 1px solid var(--line); margin-bottom: 8px; }
.task.is-overdue { border-color: var(--warn-ln); background: var(--warn-bg); }
.task-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--flaeche-3); color: var(--muted); flex: none; }
.task-ic svg.i { width: 16px; height: 16px; }
.task-ic.rueckruf { background: var(--warn-bg); color: var(--warn-tx); }
.task-ic.nachfassen { background: var(--info-bg); color: var(--info-tx); }
.task-main { flex: 1; min-width: 0; }
.task-main b { display: block; }
.task-act { display: flex; gap: 6px; }

/* Anrufmodus */
.call-top { display: flex; align-items: center; gap: 14px; }
.call-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.call-progress .bar { flex: 1; height: 10px; }
.call-card { padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; }
.call-task { background: var(--info-bg); border: 1px solid var(--info-ln); border-radius: 10px; padding: 9px 14px; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.call-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.call-head h1 { font-size: 30px; margin-bottom: 6px; }
.call-head p { margin: 6px 0 0; }
.call-logo { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 14px; padding: 8px; }
.head-icon.big { width: 72px; height: 72px; border-radius: 16px; }
.head-icon.big svg.i { width: 36px; height: 36px; }
.call-last { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.call-body { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.call-person { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: var(--flaeche-2); border: 1px solid var(--line); }
.call-person .big-name { font-size: 24px; }
.call-person .btn.huge { margin: 10px 0 4px; font-size: 22px; }
.call-history { padding: 4px 0; max-height: 260px; overflow: auto; }
/* Anrufmodus rechts: Letzte Kontakte, darunter die nächsten passenden Kandidaten mit Anruf-Knopf */
.call-rechts { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.call-kand { padding-top: 10px; border-top: 1px solid var(--line); }
.call-kand .lbl { display: flex; align-items: center; gap: 8px; }
.ck-liste { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 2px; }
.ck-zeile { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
.ck-zeile .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.ck-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ck-text a { color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-text a:hover { text-decoration: underline; }
.ck-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-alle { color: var(--muted); }
.hist { padding: 7px 0; border-bottom: 1px solid var(--line); }
.call-result { border-top: 1px solid var(--line); padding-top: 16px; }
.call-empty { padding: 40px; text-align: center; }
.call-empty .row { justify-content: center; margin-top: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; margin: 4px 0 10px; align-self: flex-start; }
.seg.wrap { display: flex; flex-wrap: wrap; border: 0; gap: 8px; overflow: visible; }
.seg button { font: inherit; color: var(--text); background: var(--flaeche-2); border: 0; padding: 8px 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg.wrap button { border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 16px; }
.seg:not(.wrap) button + button { border-left: 1px solid var(--line-strong); }
.seg button.active { background: var(--primary); }
.seg button:disabled { opacity: .45; cursor: default; }

/* Kunden-Liste */
.firm-cell { display: flex; align-items: center; gap: 10px; }
.mini-logo { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 7px; padding: 3px; flex: none; }
.detail-logo { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px; }
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border-radius: 10px; background: var(--ak-bg); border: 1px solid var(--ak-ln); }
.selbar b { margin-right: 6px; }

/* Mehrfachauswahl mit Suche */
.chipsel { position: relative; }
.chips-in { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px 8px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--input); cursor: text; }
.chips-in:focus-within { outline: 2px solid var(--ak-ln); border-color: var(--ak-ln); }
.chip-v { display: inline-flex; align-items: center; gap: 6px; background: var(--flaeche-3); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px 4px 3px 9px; font-size: 13px; }
.chip-x { border: 0; background: var(--hover); color: var(--muted); border-radius: 5px; width: 18px; height: 18px; line-height: 16px; cursor: pointer; padding: 0; font-size: 14px; }
.chip-input { flex: 1; min-width: 160px; border: 0 !important; outline: none !important; background: transparent !important; padding: 4px !important; }
.chip-dd { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 280px; overflow: auto; background: var(--glas-voll); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow:  var(--sch-2); }
.chip-opt { padding: 8px 12px; cursor: pointer; color: var(--text); }
.chip-opt:hover { background: var(--hover); }
.chip-opt.active { background: var(--flaeche-3); }
.chip-none { padding: 10px 12px; color: var(--muted); }

/* Versand-Fenster */
.modal-box.wide { width: min(1320px, 100%); }
.send { display: grid; grid-template-columns: 380px 1fr; gap: 20px; min-height: 70vh; }
.send-left { display: flex; flex-direction: column; gap: 4px; max-height: 76vh; overflow: auto; padding-right: 6px; }
.send-left h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.send-sec { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.checks.col { flex-direction: column; gap: 8px; }
.recips { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.recip { padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--flaeche-2); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.recip.active { border-color: var(--ak-ln); background: var(--ak-bg); }
.recip-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.recip-logo { height: 26px; max-width: 90px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px 4px; }
.recip input { padding: 6px 10px; font-size: 13px; }
.send-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tabs2 { display: flex; gap: 6px; align-items: center; }
.tabs2 button { font: inherit; color: var(--text); background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 16px; cursor: pointer; }
.tabs2 button.active { background: var(--primary); border-color: var(--ak-ln); }
.tabs2 .spacer { flex: 1; }
.hint { font-size: 13px; padding: 8px 12px; border-radius: 9px; background: var(--info-bg); border: 1px solid var(--info-ln); display: flex; gap: 8px; align-items: flex-start; }
.hint code { background: var(--flaeche-3); padding: 0 4px; border-radius: 4px; }
.send-tabbody label { margin-bottom: 8px; }
.pdf-preview { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 10px; background: #525659; }
.pdf-preview.tall { height: 75vh; }
.pdf-preview.loading { opacity: .5; }
.mail-preview { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail-preview.small { height: 150px; }
.mail-edit textarea { min-height: 300px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* Kandidat */
.avatar.md { width: 54px; height: 54px; border-radius: 12px; font-size: 18px; }
img.avatar { object-fit: cover; }
.job-row { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 8px; margin-bottom: 6px; }
.doc-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.doc-state { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; }
.doc-state.ok { background: var(--ok-bg); color: var(--ok-tx); }
.doc-state.miss { background: var(--gefahr-bg); color: var(--gefahr-tx); }
.doc-state.opt { background: var(--flaeche-3); color: var(--neu-tx); }
.doc-main { flex: 1; min-width: 0; }
.doc-file { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.doc-file a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
label.btn { flex-direction: row; color: var(--text); }
.doc-mini { display: inline-block; font-size: 11px; padding: 2px 6px; margin: 1px; border-radius: 5px; background: var(--flaeche-3); color: var(--muted); }
.doc-mini.ok { background: var(--ok-bg); color: var(--ok-tx); }

/* Vermittler */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.upload-box { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px; background: var(--flaeche-2); color: var(--text) !important; }
.upload-box input { padding: 4px; font-size: 12.5px; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row input { flex: 1; }
.login-logo { height: 34px; background: #fff; padding: 6px 10px; border-radius: 8px; }

/* Einstellungen */
.vorlage { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin-bottom: 8px; background: var(--flaeche-2); }
.vorlage summary { cursor: pointer; font-weight: 500; }
.vorlage textarea { margin: 8px 0; }

@media (max-width: 1400px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .send { grid-template-columns: 1fr; }
  .call-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-2s, .grid-3s, .kpis { grid-template-columns: 1fr; }
  .call-head { grid-template-columns: 1fr; }
  .job-row { grid-template-columns: 1fr; }
}

/* =================== Version 0.3: Abteilungen, Telefonbuch, Wiedervorlage, Signatur, Anruf-Pop-up =================== */
:root { --brand: #c00000; }
.mandant-switch { display: flex; margin: 0 6px 10px; padding: 3px; border-radius: 11px; background: var(--flaeche-2); border: 1px solid var(--line); }
.mandant-switch button { flex: 1; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 8px 6px; cursor: pointer; }
.mandant-switch button.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px var(--primary-glow); }
.nav-sub { margin-left: 12px; padding-left: 6px; border-left: 1px solid var(--line); }
.nav-sub .nav-item { padding: 6px 10px; font-size: 13px; }
.nav-sub .nav-item svg.i { width: 18px; height: 18px; }

.kpi.link { text-decoration: none; color: inherit; }
.kpi.link:hover { border-color: var(--line-strong); }
.dropzone.big { padding: 60px 30px; }
.tag.star { background: var(--warn-bg); color: var(--warn-tx); }
.btn.star-on, .btn.icon.star-on { color: var(--yellow); }
.btn.icon.star-on svg.i { fill: var(--yellow); }
.seg.small button { padding: 6px 11px; font-size: 13px; }
.seg input[type="date"] { padding: 5px 8px; font-size: 13px; }
.nowrap-cell { white-space: nowrap; }
.nowrap-cell .check-line { display: inline-flex; margin: 0 8px 0 0; }

/* Tag starten: Auswahl */
.call-setup { max-width: 820px; padding: 26px 28px; }
.call-setup h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { font: inherit; color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--flaeche-2); border: 1px solid var(--line-strong); }
.choice-card svg.i { width: 26px; height: 26px; color: var(--muted-2); }
.choice-card b { font-size: 16px; }
.choice-card span { color: var(--muted); font-size: 13px; }
.choice-card.active { border-color: var(--ak-ln); background: var(--ak-bg); box-shadow: 0 0 0 2px var(--primary-glow); }
.call-setup .btn.huge { margin-top: 16px; }
#wv-box, #rr-box { margin: 6px 0 4px; }

/* Signatur-Block */
.sig-block { min-height: 140px; max-height: 320px; overflow: auto; background: #fff; color: #000; border-radius: 10px; padding: 12px; margin-top: 8px;
  font-family: Arial, Helvetica, sans-serif; font-size: 9pt; border: 2px dashed #9fb0d4; outline: none; }
.sig-block:empty::before { content: "Signatur hier einfügen (Ctrl+V)"; color: #8a8a8a; }
.sig-block:focus { border-color: var(--primary-2); }
.sig-block img { max-width: 100%; }

.code-box { background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; line-height: 1.9; font-size: 13px; }
.code-box code, .notice code { background: var(--flaeche-3); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }

/* Firmen finden: Quellen */
.sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; }
.source { padding: 10px 12px; border-radius: 10px; background: var(--flaeche-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.source.ok { border-color: var(--ok-ln); }
.source span { color: var(--muted); }
.source small { color: var(--warn-tx); }

/* Eingehender Anruf */
#call-pops { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: 340px; }
.call-pop { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; border-color: var(--ok-ln); box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 2px var(--ok-ln); animation: pop .25s ease-out; background: var(--glas-voll); }
@keyframes pop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.call-pop-head { display: flex; align-items: center; gap: 8px; color: var(--ok-tx); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.call-pop-head .btn { margin-left: auto; padding: 2px 6px; }
.call-pop-firm { font-size: 18px; }
.call-pop-row { font-size: 13px; }
.call-pop-task { font-size: 13px; padding: 6px 9px; border-radius: 8px; background: var(--info-bg); display: flex; gap: 6px; align-items: center; }
.call-pop .btn { align-self: flex-start; margin-top: 4px; }

@media (max-width: 1100px) { .sources { grid-template-columns: 1fr 1fr; } .choice { grid-template-columns: 1fr; } }

/* =================== Version 0.4: aufgeräumte Sidebar, Filter-Leisten, Handelsregister, Glocke =================== */
.brand2 { margin: 2px 6px 12px; padding: 10px 12px; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; min-height: 58px; }
.brand-img { max-width: 100%; max-height: 46px; object-fit: contain; display: block; }
.brand-text { color: var(--ak); font-size: 20px; }
.nav-main { display: flex; flex-direction: column; gap: 2px; }
.nav-main .nav-item { padding: 11px 14px; font-size: 15px; }
.nav-main .nav-item svg.i { width: 22px; height: 22px; }
.sidebar-foot .btn.icon { padding: 6px; }
.sidebar-foot .active-ic { color: var(--ink); }

.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text);
  background: var(--flaeche-2); border: 1px solid var(--line); white-space: nowrap; }
.fchip b { background: var(--flaeche-3); padding: 0 7px; border-radius: 99px; font-weight: 600; }
.fchip:hover { border-color: var(--line-strong); }
.fchip.active { background: var(--primary); border-color: var(--ak-ln); color: #fff; }
.fchip.warn b { background: var(--gefahr-bg); color: #fff; }
.fchip.ghost { background: transparent; color: var(--muted); }
.fchip svg.i { width: 15px; height: 15px; }
.toolrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 12px; }
.toolrow .spacer { flex: 1; }
.set-head { padding-bottom: 6px; }
.grid-2.one-col { grid-template-columns: 1fr; }
select.mini { padding: 4px 6px; font-size: 12.5px; }

/* Handelsregister-Vorschläge */
.zefix-wrap { position: relative; }
.zefix-wrap .row input { flex: 1; }
.zefix-dd { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 40; max-height: 300px; overflow: auto; background: var(--glas-voll); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow:  var(--sch-2); }
.zefix-opt { padding: 9px 12px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 1px; }
.zefix-opt:hover { background: var(--flaeche-3); }
.zefix-none { padding: 10px 12px; color: var(--muted); }
input.filled, select.filled { border-color: var(--green) !important; box-shadow: 0 0 0 2px var(--ok-ln); transition: box-shadow .3s; }

/* Spruch des Tages */
.spruch { padding: 14px 20px; display: flex; gap: 12px; align-items: center; font-size: 16px; font-style: italic; }
.spruch svg.i { color: var(--yellow); fill: var(--yellow); width: 22px; height: 22px; flex: none; }

/* Kandidaten */
.cs-aktiv, .ss-besetzt { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.cs-im_einsatz, .ss-in_bearbeitung { background: var(--neu-bg); color: var(--neu-tx); border-color: var(--neu-ln); }
.cs-archiv, .ss-erledigt, .ss-ignoriert { background: transparent; color: var(--muted-2); border-color: var(--line-strong); }
.cs-nichtfrei { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.ss-neu { background: var(--ak-bg); color: var(--ink); border-color: var(--ak-ln); }
.task.check .task-act { flex-wrap: wrap; justify-content: flex-end; }

/* Glocke */
.glocke-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5,6,8,.62); display: grid; place-items: center; padding: 20px; animation: pop .25s ease-out; }
.glocke-box { width: min(620px, 100%); padding: 32px 34px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; background: var(--glas-voll); border-color: var(--warn-ln); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 3px var(--warn-ln); }
.glocke-ic { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); animation: swing 1.2s ease-in-out 2; }
.glocke-ic svg.i { width: 38px; height: 38px; color: var(--app); }
@keyframes swing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
.glocke-text { font-size: 24px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; }
.glocke-box .btn { max-width: 260px; }
.nowrap { white-space: nowrap; }
.glocke-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.glocke-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-tx); font-weight: 600; font-size: 15px; }
.glocke-tags svg.i { width: 16px; height: 16px; }
/* Team-Rangliste */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 6px 0 18px; }
.podest { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px 16px; border-radius: 14px; min-width: 150px; background: var(--flaeche-2); border: 1px solid var(--line); }
.podest.p1 { order: 2; padding-top: 24px; border-color: var(--warn-ln); box-shadow: 0 0 0 2px var(--warn-ln); }
.podest.p2 { order: 1; } .podest.p3 { order: 3; }
.podest.me { background: var(--ak-bg); }
.podest .medal { font-size: 34px; line-height: 1; }
.podest .pkt, table.rang .pkt { color: var(--yellow); font-weight: 700; }
table.rang th svg.i { width: 14px; height: 14px; vertical-align: -2px; }
table.rang tr.me td { background: var(--ak-bg); }
table.rang td.best { color: var(--ok-tx); font-weight: 700; }

/* ---------- Dossier: Ziehen und Ablegen ---------- */
.dossier-drop { border: 2px dashed transparent; border-radius: 12px; padding: 4px 8px; margin: 0 -8px; transition: border-color .15s, background .15s; }
.dossier-drop.over { border-color: var(--ak-ln); background: var(--ak-bg); }
.drop-hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 4px 0 6px; }
.drop-hint .i { width: 14px; height: 14px; }
.doc-row.over { background: var(--ak-bg); border-radius: 8px; outline: 1px solid var(--ak-ln); }
.auswerten-hinweis { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 4px 0 8px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-ln); }
.auswerten-hinweis > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.auswerten-hinweis > .i { color: var(--yellow); }
.drop-zeile { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.drop-zeile span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-zeile select { width: 190px; flex: none; }

/* ---------- Diktieren ---------- */
.diktat-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.diktat-bar .btn.rec { background: var(--gefahr-bg); border-color: var(--red); color: var(--gefahr-tx); animation: rec-puls 1.4s ease-in-out infinite; }
@keyframes rec-puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .5); } 50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); } }
.diktat-live { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- E-Mail-Vorschau (wie beim Empfänger) ---------- */
.mail-preview { background: #fff; color: #111; border-radius: 10px; padding: 14px 16px; max-height: 280px; overflow: auto; font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.mail-preview a { color: #0b57d0; }
.mail-preview img { max-width: 100%; height: auto; }
.mp-betreff { border-bottom: 1px solid #e5e7eb; padding-bottom: 8px; margin-bottom: 10px; font-weight: 600; }
.mp-betreff .muted { color: #6b7280; font-weight: 400; }
.mp-hinweis { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 11px; }
.quick .btn.active { border-color: var(--ak-ln); background: var(--ak-bg); }

/* ---------- Kandidaten prüfen ---------- */
.pruef-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pruef-head > div { flex: 1; min-width: 0; }
.pruef-head h2 { margin: 0; }
.pruef-liste { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pruef-liste > div { display: flex; align-items: center; gap: 8px; }
.seg .i { width: 14px; height: 14px; vertical-align: -2px; }
.bew-btn.bew-gut.active { background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--green); }
.bew-btn.bew-neutral.active { background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.bew-btn.bew-schlecht.active { background: var(--gefahr-bg); box-shadow: inset 0 0 0 1px var(--red); }
.bew { font-size: 15px; vertical-align: middle; margin-left: 4px; }
.task.check > .avatar { flex: none; }

/* ---------- Bankverbindung ---------- */
.bank-box { border: 2px dashed transparent; border-radius: 12px; padding: 6px 8px; margin: 0 -8px; transition: border-color .15s, background .15s; }
.bank-box.over { border-color: var(--ak-ln); background: var(--ak-bg); }
.bank-box.busy { opacity: .6; pointer-events: none; }
.iban-status { font-size: 12px; font-weight: 600; margin-left: 6px; }
.iban-status.ok { color: var(--ok-tx); }
.iban-status.bad { color: var(--gefahr-tx); }
.upload-box.over { border-color: var(--ak-ln); background: var(--ak-bg); }
.iban-row { display: flex; gap: 6px; align-items: center; }
.iban-row input { flex: 1; }
.bew-notice.bew-n-gut { border-color: var(--ok-ln); }
.bew-notice.bew-n-schlecht { border-color: var(--gefahr-ln); background: var(--gefahr-bg); }

/* ---------- Kunden-Filter: nach Priorität gruppiert, alle Pillen gleich hoch ---------- */
.fgruppen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; margin: -2px 0 14px; }
.fgruppe { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fg-titel { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.fg-chips { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--flaeche-2); }
.fc { height: 32px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; font-size: 13px; line-height: 1; color: var(--text); text-decoration: none; white-space: nowrap; }
.fg-chips .fc + .fc { border-left: 1px solid var(--line); }
.fc b { min-width: 20px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--flaeche-3); }
.fc.leer { color: var(--muted); }
.fc.leer b { background: transparent; color: var(--muted); opacity: .6; }
.fc:hover { background: var(--hover); }
.fc.active { background: var(--primary); color: #fff; }
.fc.active b { background: rgba(255, 255, 255, .25); color: #fff; opacity: 1; }
.fc.warn b { background: var(--gefahr-bg); color: #fff; }
.fgruppe.alle .fc { border: 1px solid var(--line); border-radius: 10px; background: var(--flaeche-2); }
.fgruppe.alle .fc.active { background: var(--primary); border-color: var(--ak-ln); }
.fexport { margin-left: auto; height: 32px; width: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.fexport:hover { color: var(--text); border-color: var(--line-strong); }
.fexport svg.i { width: 16px; height: 16px; }

/* ---------- Postfach ---------- */
.postfach .panel-head { flex-wrap: wrap; gap: 10px; }
.pf-suche { width: 280px; max-width: 100%; }
.pf-grid { display: grid; grid-template-columns: 170px minmax(260px, 360px) 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: calc(100vh - 190px); min-height: 460px; }
.pf-ordner { border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--flaeche-2); }
.pf-o { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; }
.pf-o span { flex: 1; } .pf-o b { font-size: 11px; background: var(--primary); color: #fff; border-radius: 9px; padding: 1px 7px; }
.pf-o.active { background: var(--flaeche-3); } .pf-o:hover { background: var(--hover); }
.pf-o svg.i { width: 15px; height: 15px; }
.pf-liste { border-right: 1px solid var(--line); overflow-y: auto; }
.pf-mail { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.pf-mail:hover { background: var(--hover); } .pf-mail.active { background: var(--flaeche-3); }
.pf-mail.neu { box-shadow: inset 3px 0 0 var(--ak-grafik); } .pf-mail.neu .pf-z2 { font-weight: 700; }
.pf-z1 { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .pf-z1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-z1 span { color: var(--muted); font-size: 11.5px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; } .pf-z1 svg.i { width: 12px; height: 12px; }
.pf-z2 { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-z3 { font-size: 11.5px; display: flex; gap: 4px; flex-wrap: wrap; overflow: hidden; max-height: 40px; }
.pf-lesen { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pf-kopf { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pf-kopf h3 { margin: 0 0 2px; font-size: 16px; }
.pf-zu, .pf-akt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; } .pf-akt .spacer { flex: 1; }
.pf-anh { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pf-a { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.pf-body { flex: 1; width: 100%; border: 0; background: #fff; }
.zu-k { background: var(--ok-bg); } .zu-f { background: var(--neu-bg); } .zu-a { background: var(--warn-bg); }
.tag svg.i { width: 12px; height: 12px; vertical-align: -1px; }
.zu-res { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 300px; overflow-y: auto; }
.zu-item { text-align: left; font: inherit; color: var(--text); background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.zu-item:hover { border-color: var(--ak-ln); }
.archiv-text { white-space: pre-wrap; background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 380px; overflow: auto; font-family: inherit; font-size: 13px; margin: 10px 0; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: 1fr; height: auto; } .pf-ordner { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } .pf-liste { max-height: 380px; border-right: 0; } .pf-body { min-height: 420px; } }

/* ---------- Kalender ---------- */
.kal-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.kal-tag { border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 200px; display: flex; flex-direction: column; gap: 6px; background: var(--flaeche-2); }
.kal-tag.heute { border-color: var(--ak-ln); box-shadow: 0 0 0 1px var(--ak-ln) inset; }
.kal-kopf { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; }
.kal-ev { border-radius: 8px; padding: 7px 8px; background: var(--flaeche-3); border-left: 3px solid var(--silber); font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.kal-ev.zu { background: var(--ok-bg); border-left-color: var(--green); }
.kal-akt { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.kal-leer { margin-top: 6px; }
.grid-3s { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.tm-zu { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
@media (max-width: 1000px) { .kal-woche { grid-template-columns: 1fr; } .kal-tag { min-height: 0; } }

/* ---------- Kunden: Erklärung zum Filter und Grund pro Kunde ---------- */
.filter-info { display: flex; gap: 8px; align-items: flex-start; margin: -6px 0 12px; padding: 9px 12px; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.filter-info svg.i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--muted-2); }
.grund { font-size: 12px; color: var(--muted); margin-top: 3px; max-width: 420px; line-height: 1.35; white-space: normal; }
.grund b { color: var(--text); font-weight: 600; }
.grund.aktiv { color: var(--text); }
.grund.aktiv b { color: var(--warn-tx); }

/* ---------- Firmenlogo (Bild oder farbiges Kürzel) ---------- */
.flogo { width: 34px; height: 34px; border-radius: 8px; flex: none; object-fit: contain; background: #fff; }
img.flogo { padding: 2px; box-sizing: border-box; }
.flogo.leer { display: inline-grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; }
.flogo.md { width: 54px; height: 54px; border-radius: 12px; font-size: 18px; }
.flogo.lg { width: 80px; height: 80px; border-radius: 16px; font-size: 26px; }
.task > .flogo { margin-right: 2px; }

/* ---------- Neue Antworten / Anfragen ---------- */
.ein-panel { border-color: var(--ok-ln); }
.ein-liste { display: flex; flex-direction: column; margin: 8px 0; max-height: 60vh; overflow-y: auto; }
.ein-zeile { display: flex; gap: 10px; align-items: flex-start; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.ein-zeile:last-child { border-bottom: 0; }
.ein-zeile.anfrage { background: var(--warn-bg); border-radius: 8px; }
.ein-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ein-tag { background: var(--warn-bg); color: var(--warn-tx); }
.ein-akt { display: flex; gap: 6px; flex: none; }
.firm-link { color: inherit; text-decoration: none; display: inline-flex; }
.firm-link:hover b { text-decoration: underline; color: var(--text); }
tr[data-company] { cursor: pointer; }
/* Grund nur einzeilig, damit die Liste kompakt bleibt */
.grund { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.grund b { color: var(--warn-tx); }
.firm-cell .muted.small { white-space: nowrap; }

/* ---------- Kundenseite: Einsatz, Handelsregister, Auto-Speichern ---------- */
.einsatz-liste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.einsatz-k { display: flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border: 1px solid var(--ok-ln); background: var(--ok-bg); border-radius: 10px; color: var(--text); text-decoration: none; }
.einsatz-k div { display: flex; flex-direction: column; }
.hr-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--flaeche-2); }
.hr-grid { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.hr-grid > div, .hr-zweck { display: flex; flex-direction: column; font-size: 13px; }
.hr-zweck { margin-top: 8px; line-height: 1.45; }
.hr-pers { width: 100%; border-collapse: collapse; font-size: 13px; }
.hr-pers td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.hr-pers td:first-child span { display: block; }
.zg-einzel { background: var(--ok-bg); }
.zg-koll { background: var(--neu-bg); }
#gespeichert-pill { position: fixed; top: 14px; left: 50%; transform: translate(-50%, -80px); z-index: 1000; background: var(--glas-voll); color: var(--text); border: 1px solid var(--ok-ln); padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; box-shadow: var(--sch-2); display: flex; gap: 6px; align-items: center; transition: transform .25s ease, opacity .25s; opacity: 0; }
#gespeichert-pill.da { transform: translate(-50%, 0); opacity: 1; }
#gespeichert-pill.weg { transform: translate(-50%, -80px); opacity: 0; }
#gespeichert-pill svg.i { width: 16px; height: 16px; color: var(--green); }
.anruf-box { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--ok-bg); border: 1px solid var(--ok-ln); margin: 6px 0 8px; flex-wrap: wrap; }
.anruf-box > div:nth-child(2) { flex: 1; min-width: 160px; }
.anruf-nr { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.anruf-akt { display: flex; gap: 8px; align-items: center; }

/* ---------- Kundenseite: klare Bereiche, weitere Ansprechpersonen ---------- */
.sektion { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin-top: 14px; background: var(--flaeche-2); }
.sektion-titel { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.sektion-titel svg.i { width: 16px; height: 16px; color: var(--muted-2); }
.sektion-titel .muted { font-weight: 400; }
.kontakt-zeile { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.kz-name { display: flex; flex-direction: column; }
.kz-info { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.kz-info svg.i, .kz-info a svg.i { width: 12px; height: 12px; vertical-align: -1px; }
.kz-akt { display: flex; gap: 4px; }
.recip select { width: 100%; margin-bottom: 6px; }
@media (max-width: 700px) { .kontakt-zeile { grid-template-columns: 1fr; } }
/* Ansprechpersonen als Karten */
.k-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.k-karte { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--flaeche-2); }
.k-karte.haupt { border-color: var(--warn-ln); background: var(--warn-bg); }
.k-kopf { display: flex; align-items: center; gap: 8px; }
.k-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.k-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-stern svg.i { width: 18px; height: 18px; color: var(--yellow); fill: var(--yellow); }
.k-info { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.k-info svg.i { width: 13px; height: 13px; vertical-align: -2px; }
.k-info a { color: var(--text); }
.k-akt { display: flex; gap: 6px; margin-top: auto; }
.k-plus { border: 2px dashed var(--line-strong); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; }
.k-plus span { font-size: 34px; line-height: 1; font-weight: 300; color: var(--muted); }
.k-plus:hover { border-color: var(--ak-ln); color: var(--text); background: var(--ak-bg); }

/* ---------- Mein Tag: Anrufe der Woche (Mo bis Fr) ---------- */
.kpi.woche { flex-direction: column; align-items: stretch; gap: 8px; min-width: 260px; }
.woche-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.woche-balken { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; height: 92px; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.wb-zahl { font-size: 12px; font-weight: 700; height: 15px; }
.wb-saeule { position: relative; flex: 1; width: 100%; max-width: 30px; border-radius: 6px; background: var(--hover); overflow: hidden; }
.wb-saeule i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: var(--primary); opacity: .85; }
.wb-saeule em { position: absolute; left: -2px; right: -2px; height: 0; border-top: 1px dashed var(--line-strong); }
.wb.heute .wb-saeule { box-shadow: 0 0 0 1px var(--ak-ln); }
.wb.heute .wb-tag { color: var(--text); font-weight: 700; }
.wb.spaeter .wb-saeule i { display: none; }
.wb-tag { font-size: 11px; color: var(--muted); }

/* =================== Leitstand 2: Optik (Hell/Dunkel, iPersonal/MediPersonal) =================== */
/* Grundlagen */
::selection { background: rgba(var(--ak-rgb), .28); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.muted { color: var(--muted); }
html.ls-wechsel *, html.ls-wechsel *::before, html.ls-wechsel *::after {
  transition: background-color .45s ease, border-color .45s ease, color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important; }

/* Seitenleiste */
.sidebar.glass { border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none;
  background: linear-gradient(180deg, rgba(var(--ak-rgb), .5), transparent 46%) right top / 1px 100% no-repeat, linear-gradient(180deg, var(--sb), var(--app)); }
.brand2 { margin: 0 0 14px; padding: 0 12px; height: 52px; min-height: 0; border-radius: 13px; background: #fff; border: 1px solid rgba(255, 255, 255, .08); flex: none; }
html[data-theme="light"] .brand2 { border-color: var(--line); }
.brand-img { max-height: 32px; }
.mandant-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 14px; padding: 3px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--line); flex: none; }
.mandant-switch button { height: 30px; padding: 0 6px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mandant-switch button:hover { color: var(--text); }
.mandant-switch button.active { color: #fff; background: var(--ak-btn); box-shadow: 0 6px 14px -6px rgba(var(--ak-rgb), .7); }
.mandant-switch button.hat-warn { position: relative; overflow: visible; }
.mandant-switch .ms-warn { position: absolute; top: -7px; right: -3px; min-width: 17px; padding: 0 5px; border-radius: 99px; font-size: 10.5px; line-height: 16px; font-weight: 700;
  background: var(--orange); color: var(--flaeche); border: 2px solid var(--flaeche); }
.nav-main { gap: 2px; }
.nav-item, .nav-main .nav-item { position: relative; height: 38px; gap: 11px; padding: 0 10px; margin: 0; border-radius: 11px; font-size: 13.5px; color: var(--muted); }
.nav-item svg.i, .nav-main .nav-item svg.i { width: 18px; height: 18px; color: var(--muted-2); }
.nav-item:hover { color: var(--text); background: var(--flaeche); }
.nav-item.active { color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(var(--ak-rgb), .2);
  background: linear-gradient(90deg, rgba(var(--ak-rgb), .16), rgba(var(--ak-rgb), .02)); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ak); box-shadow: 0 0 12px rgba(var(--ak-rgb), .7); }
body[data-mandant="med"] .nav-item.active::before { background: linear-gradient(180deg, var(--ak), var(--ak2-deko)); }
.nav-item.active svg.i { color: var(--ink); }
.nav-item .count { min-width: 22px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--flaeche-3); color: var(--text); }
.nav-item.active .count { background: var(--flaeche-3); }
.nav-sep { margin: 10px 8px; background: var(--line); }
/* Hell/Dunkel-Schalter direkt über der Fusszeile */
.thema-wahl { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--line); flex: none; }
.thema-wahl button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px; padding: 0 8px; border: 0; border-radius: 9px; background: none;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.thema-wahl button svg.i { width: 15px; height: 15px; }
.thema-wahl button:hover { color: var(--text); }
.thema-wahl button[aria-pressed="true"] { background: var(--flaeche-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
html[data-theme="light"] .thema-wahl button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 2px rgba(17, 17, 26, .14), inset 0 0 0 1px var(--line-strong); }
.sidebar-foot { padding: 12px 0 0; gap: 4px; border-top: 1px solid var(--line); }
.sidebar-foot .who { margin-left: 4px; }
.thema-wahl + .sidebar-foot { margin-top: 10px; }
.sidebar-foot .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 11.5px; }
.sidebar-foot .who { line-height: 1.3; }
.sidebar-foot .who span { font-size: 11.5px; color: var(--muted-2); }
.sidebar-foot .btn.icon { width: 28px; height: 28px; min-height: 28px; padding: 0; color: var(--muted); }
.sidebar-foot .btn.icon:hover { color: var(--text); }
.sidebar-foot .btn.icon.active-ic { color: var(--ink); }

/* Panels und Köpfe */
.panel { padding: 18px 20px; }
.panel-head h2 { font-size: 20px; letter-spacing: -.015em; }
.panel-head .sub { color: var(--muted); font-size: 13px; }
.panel-head > .head-icon + div { flex: 1 1 220px; min-width: 0; }
.head-icon, .kpi-ic, .widget-icon, .stat-ic, .brand-logo { width: 36px; height: 36px; border-radius: 50% !important; display: grid; place-items: center; flex: none;
  background: var(--flaeche-2) !important; border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.head-icon svg.i, .kpi-ic svg.i, .widget-icon svg.i, .stat-ic svg.i { width: 18px; height: 18px; color: var(--ink); }
.head-icon.big { width: 72px; height: 72px; }
.head-icon.big svg.i { width: 34px; height: 34px; }
.hero h1 { font-size: 28px; letter-spacing: -.03em; }
.subsec { font-weight: 700; }

/* Knöpfe */
.btn { min-height: 36px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--knopf); color: var(--text);
  font-size: 13.5px; font-weight: 700; line-height: 1.2; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--knopf); border-color: var(--line-3); }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn-2)); border-color: transparent; color: #fff;
  box-shadow: 0 10px 22px -12px rgba(var(--ak-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--ak-btn-h); border-color: transparent; }
.btn.primary svg.i { color: #fff; }
/* Anrufen ist überall grün (beide Abteilungen, beide Themen), damit es nicht wie Auflegen wirkt */
.btn.success, .btn.anruf { background: var(--anruf); border-color: var(--anruf); color: #fff; }
.btn.success:hover, .btn.anruf:hover { background: var(--anruf-h); border-color: var(--anruf-h); color: #fff; }
.btn.success svg.i, .btn.anruf svg.i { color: #fff; }
.btn.anruf.rund, .btn.success.rund { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; flex: none; gap: 0; }
.btn.anruf.rund svg.i, .btn.success.rund svg.i { width: 16px; height: 16px; }
.keine-nr { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.btn.danger { color: var(--gefahr-tx); }
.btn.big { min-height: 46px; padding: 0 16px; font-size: 15px; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 10px; }
.btn.icon { min-height: 32px; padding: 0 7px; background: transparent; border-color: transparent; color: inherit; }
.btn.icon:hover { background: var(--hover); border-color: transparent; }
.btn.huge { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.call-person .btn.huge { min-height: 60px; }
td.actions .btn { min-height: 28px; }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: default; }

/* Formulare */
input, select, textarea { background: var(--feld); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(var(--ak-rgb), .14); }
html[data-theme="light"] input:focus, html[data-theme="light"] select:focus, html[data-theme="light"] textarea:focus { background: #fff; }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
select option, select optgroup { background: var(--flaeche); color: var(--text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ak-btn); }
label { color: var(--muted); }
.chips-in { background: var(--feld); border-radius: 10px; }
.chips-in:focus-within { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(var(--ak-rgb), .14); }
.chip-input:focus { box-shadow: none !important; }
.chip-x:hover { color: var(--text); }
.chip-dd, .zefix-dd { border-radius: 12px; }

/* Tabellen */
th { font-size: 12px; color: var(--muted-2); font-weight: 400; background: var(--flaeche); }
tbody tr:hover td { background: var(--hover); }
tbody tr.selected td { background: color-mix(in srgb, var(--ak) 4%, transparent); }
tbody tr.selected:hover td { background: color-mix(in srgb, var(--ak) 7%, transparent); }
tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--ak-grafik); }
.table-wrap { border-radius: 12px; }

/* Etiketten */
.tag { display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 16px; vertical-align: middle;
  background: var(--neu-bg); color: var(--neu-tx); border: 1px solid var(--neu-ln); }
.tag.d::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.tag.neu { background: var(--neu-bg); color: var(--neu-tx); border-color: var(--neu-ln); }
.tag.ok { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.tag.warn, .tag.star { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.tag.info { background: var(--info-bg); color: var(--info-tx); border-color: var(--info-ln); }
.tag.ak { background: var(--ak-bg); color: var(--ink); border-color: var(--ak-ln); }
.tag.aus { background: transparent; color: var(--muted-2); border-color: var(--line-strong); }
.tag.gefahr { background: var(--gefahr-bg); color: var(--gefahr-tx); border-color: var(--gefahr-ln); }
.tag.big { font-size: 13px; padding: 4px 11px; line-height: 18px; }
.tag.small { font-size: 11px; padding: 1px 8px; }
td span.tag.small { display: inline-block; }
.ein-tag { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.age { border-radius: 999px; font-size: 12px; font-weight: 700; }

/* Personen und Firmenkürzel neutral (überschreibt den bunten Verlauf aus core.js), Fotos und Logos unverändert */
span.avatar { background: var(--flaeche-3) !important; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
img.avatar { background: var(--flaeche-3); }
.flogo { border-radius: 10px; }
img.flogo { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.flogo.leer { background: var(--flaeche-3) !important; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.mini-logo, .detail-logo, .call-logo, .recip-logo { border: 1px solid var(--line); }

/* Fortschrittsring aus core.js: neutrale Fläche, Stufenfarben statt Markenfarbe */
.ring circle:first-child { fill: var(--flaeche-2); stroke: var(--line); }
.ring circle[stroke="#22c55e"], .ring circle[stroke="#a3e635"] { stroke: var(--green); }
.ring circle[stroke="#facc15"] { stroke: var(--yellow); }
.ring circle[stroke="#f97316"] { stroke: var(--orange); }

/* Segmentwahl (geteilt mit Karte, Kunden, Kandidaten) */
.wahl { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--flaeche-2); border: 1px solid var(--line); max-width: 100%; }
.wahl button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 13px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; }
.wahl button:hover { color: var(--text); }
.wahl button svg.i { width: 14px; height: 14px; }
.wahl button[aria-pressed="true"] { background: var(--text); color: var(--app); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); }
.wahl.ak button[aria-pressed="true"] { background: var(--ak-btn); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--ak-rgb), .8); }
.wahl button:disabled { opacity: .45; cursor: default; }
.wahl-zahl { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; background: var(--flaeche-3); color: var(--text); }
.wahl button[aria-pressed="true"] .wahl-zahl { background: color-mix(in srgb, var(--app) 18%, transparent); color: inherit; }
.wahl.ak button[aria-pressed="true"] .wahl-zahl { background: rgba(0, 0, 0, .28); color: #fff; }

/* Filterleisten */
.fg-chips { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
.fc { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fg-chips .fc + .fc { border-left: 0; }
.fc b { background: var(--flaeche-3); color: var(--text); }
.fc:hover { background: var(--hover); color: var(--text); }
.fc.leer { color: var(--muted-2); }
.fc.active, .fgruppe.alle .fc.active { background: var(--text); border-color: var(--text); color: var(--app); }
.fc.active b { background: color-mix(in srgb, var(--app) 16%, transparent); color: var(--app); }
.fc.warn b, .fchip.warn b { background: var(--ak-btn); color: #fff; }
.fgruppe.alle .fc { height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
.fg-titel { color: var(--muted-2); font-weight: 700; }
.fexport { height: 38px; width: 40px; border-radius: 12px; color: var(--muted); border-color: var(--line); }
.fchip { height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--flaeche-2); border: 1px solid var(--line); }
.fchip b { background: var(--flaeche-3); color: var(--text); }
.fchip:hover { color: var(--text); border-color: var(--line-strong); }
.fchip.active { background: var(--text); border-color: var(--text); color: var(--app); }
.fchip.active b { background: color-mix(in srgb, var(--app) 16%, transparent); color: var(--app); }
.fchip.ghost { background: transparent; color: var(--muted); }
/* Segmentleisten im Anrufmodus und in Pop-ups */
.seg { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); overflow: visible; }
.seg button { background: none; border: 0; border-radius: 9px; padding: 7px 13px; color: var(--muted); font-weight: 700; font-size: 13px; }
.seg:not(.wrap) button + button { border-left: 0; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.active { background: var(--text); color: var(--app); }
.seg.wrap { padding: 0; border: 0; background: none; gap: 8px; }
.seg.wrap button { border: 1px solid var(--line-strong); border-radius: 12px; padding: 9px 16px; background: var(--knopf); color: var(--text); }
.seg.wrap button.active { background: var(--text); border-color: var(--text); color: var(--app); }
.seg .bew-btn.active { color: var(--text); }
.seg .bew-btn.bew-gut.active { color: var(--ok-tx); }
.seg .bew-btn.bew-schlecht.active { color: var(--gefahr-tx); }
.tabs button, .tabs2 button { background: var(--flaeche-2); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-weight: 700; }
.tabs button.active, .tabs2 button.active { background: var(--text); border-color: var(--text); color: var(--app); }
.choice-card { background: var(--flaeche-2); border: 1px solid var(--line-strong); border-radius: 14px; }
.choice-card.active { border-color: var(--fokus); background: var(--ak-bg); box-shadow: 0 0 0 3px rgba(var(--ak-rgb), .1); }
.choice-card.active svg.i { color: var(--ink); }

/* Pop-up, Meldung, Mehr-Menü */
.modal { background: rgba(5, 6, 8, .62); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
html[data-theme="light"] .modal, html[data-theme="light"] .glocke-overlay { background: rgba(29, 29, 31, .28); }
.modal-box { border-radius: 22px; background: var(--app); border: 1px solid var(--line-strong); box-shadow: var(--sch-2), inset 0 1px 0 rgba(255, 255, 255, .04); }
html[data-theme="light"] .modal-box { background: #fff; }
.modal-box h2 { letter-spacing: -.02em; }

/* Eingehender Anruf */
.call-pop { position: relative; overflow: hidden; background: var(--glas-voll); border: 1px solid var(--ok-ln); border-radius: 16px; box-shadow: var(--sch-2); }
.call-pop::before { content: ""; position: absolute; top: -1px; left: 18px; width: 72px; height: 2px; border-radius: 2px; background: var(--green); box-shadow: 0 0 12px var(--green); }
.call-pop-head { color: var(--green); font-weight: 700; font-size: 12px; letter-spacing: .06em; }
.call-pop-head .btn.icon { color: var(--muted); }
.call-pop-task { background: var(--info-bg); color: var(--info-tx); border: 1px solid var(--info-ln); }

/* Glocke */
.glocke-overlay { background: rgba(5, 6, 8, .62); }
.glocke-box { background: var(--glas-voll); border: 1px solid var(--warn-ln); border-radius: 22px; box-shadow: var(--sch-2), 0 0 0 3px var(--warn-bg); }
.glocke-tags span { background: var(--warn-bg); color: var(--warn-tx); border: 1px solid var(--warn-ln); }

/* ======================== Anmeldung ======================== */
.login { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; padding: 0; display: grid; place-items: center start;
  grid-template-columns: minmax(0, 1fr);
  background: radial-gradient(900px 600px at 70% 45%, rgba(196, 208, 230, .06), transparent 70%), #08090B; }
html[data-theme="light"] .login { background: radial-gradient(900px 600px at 70% 45%, #fff, transparent 70%), #EEEFF2; }
.login .login-karte { position: absolute; top: 0; right: 0; bottom: 0; width: 66%; min-height: 0; z-index: -2; overflow: hidden; background: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 16%, #000 36%); mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 16%, #000 36%); }
.login .login-karte > svg { display: block; width: 100%; height: 100%; }
.lg-licht { position: absolute; z-index: -1; width: 640px; height: 640px; left: -180px; top: 50%; transform: translateY(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ak-rgb), .12), transparent 64%); }
html[data-theme="light"] .lg-licht { background: radial-gradient(circle, rgba(var(--ak-rgb), .06), transparent 64%); }
.lkarte { position: relative; width: min(412px, calc(100vw - 32px)); margin: 40px 0 72px clamp(16px, 6vw, 96px); padding: 30px 30px 22px; border-radius: 24px; border: 1px solid var(--line-strong);
  display: flex; flex-direction: column; gap: 0;
  background: linear-gradient(180deg, rgba(22, 25, 31, .86), rgba(12, 14, 18, .92)); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06); }
html[data-theme="light"] .lkarte { background: rgba(255, 255, 255, .92); box-shadow: 0 30px 70px rgba(17, 17, 26, .14), inset 0 1px 0 #fff; }
.lkarte::before { content: ""; position: absolute; top: -1px; left: 32px; width: 64px; height: 2px; border-radius: 2px; background: var(--ak); box-shadow: 0 0 14px rgba(var(--ak-rgb), .9); }
body[data-mandant="med"] .lkarte::before { width: 96px; background: linear-gradient(90deg, var(--ak), var(--ak2-deko)); }
.logo-platte { align-self: flex-start; display: inline-flex; align-items: center; height: 50px; padding: 0 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(255, 255, 255, .1); }
html[data-theme="light"] .logo-platte { border-color: var(--line); }
.logo-platte img { display: block; height: 26px; width: auto; }
body[data-mandant="med"] .logo-platte img { height: 34px; }
.lkarte h1 { margin-top: 24px; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; }
.lkarte .unter { margin: 6px 0 4px; color: var(--muted); font-size: 14px; }
.lkarte .feld { margin-top: 14px; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.eingabe { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--feld); border: 1px solid var(--line-strong); }
.eingabe:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(var(--ak-rgb), .14); }
html[data-theme="light"] .eingabe:focus-within { background: #fff; }
.eingabe svg.i { width: 18px; height: 18px; color: var(--muted-2); }
.eingabe:focus-within svg.i { color: var(--ink); }
.eingabe input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; font-size: 14.5px; font-weight: 400; color: var(--text); }
.eingabe input:focus, html[data-theme="light"] .eingabe input:focus { outline: none; box-shadow: none; background: none; }
.lkarte .btn.primary { margin-top: 20px; min-height: 50px; border-radius: 13px; font-size: 15px; width: 100%; }
.lkarte .error { margin-top: 10px; font-size: 13px; }
.lk-fuss { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-2); }
.lk-fuss svg.i { width: 15px; height: 15px; color: var(--muted); }
.lg-claim { position: absolute; left: 46%; bottom: 10%; max-width: 32%; pointer-events: none; }
.lg-claim h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
html[data-theme="light"] .lg-claim h2 { text-shadow: 0 0 14px rgba(242, 242, 244, .95), 0 0 4px rgba(242, 242, 244, .9); }
.lg-claim h2 span { color: var(--muted); font-weight: 400; }
.lg-unten { position: absolute; left: 32px; right: 32px; bottom: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--muted-2); pointer-events: none; }
.lg-lizenz { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; }
.lg-thema { position: absolute; top: 18px; right: 18px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--glas); color: var(--muted); cursor: pointer; }
.lg-thema:hover { color: var(--text); border-color: var(--line-3); }
/* Einladung (Registrierung Vermittler): Karte mittig */
.login > .login-card { justify-self: center; width: min(400px, calc(100vw - 32px)); margin: 40px 0; padding: 28px; }
.lg-thema svg.i { width: 18px; height: 18px; }

/* ======================== Mein Tag ======================== */
.mt-gruss { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 28px; padding: 26px 28px; }
.mt-gruss::before { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -140px; top: -230px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ak-rgb), .14), transparent 66%); }
.mt-gruss-text { flex: 1 1 420px; min-width: 0; }
.mt-datum { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--muted-2); }
.mt-datum::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ak-grafik); }
.mt-gruss h1 { margin-top: 10px; font-size: 36px; line-height: 1.05; letter-spacing: -.035em; }
.mt-satz { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.mt-satz b { color: var(--text); }
.mt-satz .warn { color: var(--orange); }
.mt-start { display: flex; align-items: center; gap: 16px; flex: 0 1 380px; min-width: 260px; height: 76px; padding: 0 22px 0 12px; border-radius: 20px;
  color: var(--text); text-decoration: none; background: var(--glas); border: 1px solid var(--line-3); transition: border-color .2s ease; }
.mt-start:hover { border-color: var(--ak-ln); }
.mt-kern { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff;
  background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn-2)); box-shadow: 0 0 0 5px rgba(var(--ak-rgb), .14), 0 10px 24px -8px rgba(var(--ak-rgb), .8); }
.mt-kern::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 1px dashed var(--line-3); }
.mt-kern svg.i { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }
.mt-start-text { min-width: 0; }
.mt-start-text b { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -.015em; }
.mt-start-text small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mt-pfeil { margin-left: auto; color: var(--muted); }
.mt-kpis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); grid-auto-flow: row dense; gap: 14px; }
.mt-kpi { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 18px; color: inherit; text-decoration: none; }
a.mt-kpi:hover, a.mt-kachel:hover { box-shadow: var(--sch-1), 0 0 0 1px var(--line-3); }
.mt-kopf { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.mt-kopf h3 { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.mt-kopf .mt-pfeil svg.i { width: 16px; height: 16px; }
.mt-wert { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.mt-wert small { font-size: 22px; font-weight: 400; color: var(--muted-2); letter-spacing: -.02em; }
.mt-sub { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.mt-sub b { color: var(--text); }
.mt-balken { position: relative; height: 8px; margin-top: 16px; border-radius: 999px; background: var(--flaeche-3); overflow: hidden; }
.mt-balken i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, var(--ak-btn-2), var(--ak-grafik)); }
body[data-mandant="med"] .mt-balken i { background: linear-gradient(90deg, var(--ak-grafik), var(--ak2)); }
.mt-balken.neutral { height: 6px; margin-top: 10px; }
.mt-balken.neutral i { background: var(--silber); }
.mt-unten { margin-top: auto; padding-top: 14px; display: grid; gap: 6px; }
.mt-zeile { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.mt-zeile b { color: var(--text); font-variant-numeric: tabular-nums; }
.mt-woche-zeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mt-woche-zeile .mt-sub { text-align: right; margin: 0 0 4px; }
.mt-plot { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; height: 120px; margin-top: 26px; align-items: end; }
.mt-tag { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.mt-tag::before { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 46px; height: var(--ziel); border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, rgba(var(--silber-rgb), .03), rgba(var(--silber-rgb), .08)); border: 1px solid var(--line); }
.mt-tag.heute::before { border-color: var(--ak-ln); background: linear-gradient(180deg, rgba(var(--ak-rgb), .02), rgba(var(--ak-rgb), .09)); }
.mt-tag i { position: relative; z-index: 1; display: block; width: 100%; max-width: 46px; height: var(--h); min-height: 2px; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, rgba(var(--silber-rgb), .75), rgba(var(--silber-rgb), .28)); }
html[data-theme="light"] .mt-tag i { background: linear-gradient(180deg, #4A4B52, #A6A7B0); }
.mt-tag.heute i { background: linear-gradient(180deg, var(--ak-grafik), rgba(var(--ak-rgb), .35)); }
.mt-tag b { position: relative; z-index: 1; margin-bottom: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-tag.heute b { color: var(--ink); }
.mt-tag.spaeter i, .mt-tag.spaeter b { visibility: hidden; }
.mt-ziel { position: absolute; left: 0; right: 0; bottom: var(--ziel); z-index: 2; border-top: 1px dashed var(--line-3); pointer-events: none; }
.mt-ziel em { position: absolute; right: 0; bottom: 3px; padding: 0 0 0 6px; font-style: normal; font-size: 11px; color: var(--muted); background: var(--flaeche); }
.mt-namen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted-2); }
.mt-namen .heute { color: var(--ink); font-weight: 700; }
.mt-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mt-kachel { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 14px 18px; color: inherit; text-decoration: none; }
.mt-kachel span { font-size: 13px; color: var(--muted); }
.mt-kachel b { font-size: 24px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mt-kachel.achtung b { color: var(--orange); }
.mt-spruch { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 4px; font-size: 14px; font-style: italic; color: var(--muted); }
.mt-spruch svg.i { width: 16px; height: 16px; color: var(--yellow); fill: currentColor; flex: none; }
.task { background: var(--flaeche-2); border-color: var(--line); border-radius: 12px; }
.task-act { align-items: center; }

/* ======================== Breiten ======================== */
@media (max-width: 1180px) {
  .lg-claim { display: none; }
}
@media (max-width: 1100px) {
  .mt-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mt-kpis .mt-kpi-woche { grid-column: 1 / -1; }
}
@media (max-width: 1060px) {
  .layout { grid-template-columns: 224px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; }
  main { padding: 16px 16px 32px; }
  .sidebar.glass { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; overflow: visible;
    border-right: 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--sb), var(--app)); align-content: flex-start; }
  .brand2 { margin: 0; height: 42px; width: 132px; padding: 0 10px; }
  .brand-img { max-height: 26px; }
  .mandant-switch { margin: 0 0 0 auto; width: 196px; }
  .nav-main { flex: 1 1 100%; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .nav-main::-webkit-scrollbar { display: none; }
  .nav-main .nav-item, .sidebar > .nav-item { flex: none; width: auto; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
  .nav-item.active::before { left: 14px; right: 14px; top: auto; bottom: -1px; width: auto; height: 2px; border-radius: 2px; }
  .nav-sep { display: none; }
  .thema-wahl { margin-top: 0; }
  .thema-wahl button { width: 38px; padding: 0; }
  .thema-wahl button span { display: none; }
  .sidebar-foot, .thema-wahl + .sidebar-foot { flex: 1 1 auto; margin: 0; padding: 0; border-top: 0; justify-content: flex-end; }
  .sidebar-foot .avatar, .sidebar-foot .who { display: none; }
}
@media (max-width: 760px) {
  .login { display: flex; flex-direction: column; align-items: stretch; padding: 0 0 20px; }
  .login .login-karte { position: relative; inset: auto; order: 1; width: auto; height: 260px; flex: none;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
  .lg-licht { display: none; }
  .lkarte { order: 2; width: auto; margin: -48px 12px 0; padding: 22px 18px 18px; border-radius: 20px; }
  .lkarte h1 { margin-top: 20px; font-size: 24px; }
  .lg-unten { position: static; order: 3; margin: 16px 16px 0; flex-direction: column; gap: 4px; }
  .lg-thema { top: 12px; right: 12px; }
  .mt-gruss { padding: 20px 16px 18px; }
  .mt-gruss h1 { font-size: 28px; }
  .mt-satz { font-size: 14px; }
  .mt-start { flex: 1 1 100%; min-width: 0; height: 68px; gap: 14px; padding-right: 14px; }
  .mt-start-text b { font-size: 17px; }
  .mt-kpis, .mt-kacheln { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mt-kpis .mt-kpi-woche { grid-column: auto; }
  .mt-kpi { padding: 14px 14px 16px; }
  .mt-wert { font-size: 38px; }
  .mt-plot, .mt-namen { gap: 8px; }
  .mt-kachel { padding: 12px 14px; }
  .task { flex-wrap: wrap; }
  .task-main { flex: 1 1 150px; }
  .task-act { margin-left: auto; }
  /* Anrufmodus: Kopfzeile umbrechen, Eingaben untereinander */
  .call-top { flex-wrap: wrap; }
  .call-progress { flex: 1 1 100%; order: 5; }
  .grid-3s { grid-template-columns: minmax(0, 1fr); }
  .row.nowrap > input, .row.nowrap > select { min-width: 0; flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
