/* ============ Relaunch 11/2026 – ruhiges, flaches Design ============
 * Wird als letzte Datei geladen und überschreibt den Glas-Look.
 * Grundfarbe der Agentur: #2b4a66 (änderbar unter „Logo & Farbe“), Kundenseiten behalten ihre Akzentfarbe.
 */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f0f3f6;
  --text: #16212c;
  --muted: #5b6876;
  --faint: #8a96a3;
  --line: #e3e7ec;
  --ok: #2f8a4c; --ok-soft: #e3f3e8; --ok-ink: #1d6b3a;
  --bad: #c2412d; --bad-soft: #fbe4e0; --bad-ink: #a33224;
  --warn: #d48a12; --warn-soft: #fdf1dc; --warn-ink: #8a5200;
  --info: #2b4a66; --info-soft: #e9eef3; --info-ink: #2b4a66;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(22, 33, 44, .05);
  --shadow-lg: 0 24px 60px -18px rgba(22, 33, 44, .35);
  --glass-bg: #ffffff; --glass-bg-strong: #ffffff; --glass-bg-soft: #f7f9fa;
  --glass-edge: transparent; --glass-line: #e3e7ec;
  --glass-shadow: 0 1px 2px rgba(22, 33, 44, .05);
  --glass-blur: none;
}
:root[data-theme="dark"] {
  --bg: #0f161e; --surface: #17212c; --surface-solid: #17212c; --surface-2: #1f2b38;
  --text: #e6edf3; --muted: #9eabb8; --faint: #6f7d8b; --line: rgba(255, 255, 255, .08);
  --ok-soft: rgba(47, 138, 76, .2); --ok-ink: #7fd69b; --bad-soft: rgba(194, 65, 45, .22); --bad-ink: #ff9b8a;
  --warn-soft: rgba(212, 138, 18, .2); --warn-ink: #ffc76b; --info: #7fa6c9; --info-soft: rgba(127, 166, 201, .18); --info-ink: #a9c6e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --glass-bg: #17212c; --glass-bg-strong: #1f2b38; --glass-bg-soft: #1a2530; --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] {
  --bg: #0f161e; --surface: #17212c; --surface-solid: #17212c; --surface-2: #1f2b38;
  --text: #e6edf3; --muted: #9eabb8; --faint: #6f7d8b; --line: rgba(255, 255, 255, .08);
  --ok-soft: rgba(47, 138, 76, .2); --ok-ink: #7fd69b; --bad-soft: rgba(194, 65, 45, .22); --bad-ink: #ff9b8a;
  --warn-soft: rgba(212, 138, 18, .2); --warn-ink: #ffc76b; --info: #7fa6c9; --info-soft: rgba(127, 166, 201, .18); --info-ink: #a9c6e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --glass-bg: #17212c; --glass-bg-strong: #1f2b38; --glass-bg-soft: #1a2530; --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, .35);
} }

/* Ruhiger, einfarbiger Hintergrund statt Farbverlauf */
body { background: var(--bg); background-image: none; }

/* Flächen: weiß, feine Linie, kaum Schatten – kein Glas, kein Glanz */
.card, .glass, .tabs, .seg-tabs, .modal, .phone, .auth-card, .viz-tip, .toast:not(.bad) {
  background: var(--surface-solid);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.modal, .auth-card { box-shadow: var(--shadow-lg); }
.card::after, .glass::after, .auth-card::after, .modal::after, .tabs::after, .stat::after { display: none !important; }
.topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); }
h1 { font-weight: 700; letter-spacing: -.025em; }
.eyebrow { letter-spacing: .1em; }

/* Reiter in Kundenseiten: Unterstrich statt Kapsel */
.tabs { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 0; gap: 2px; display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border-radius: 0; padding: 12px 14px; color: var(--muted); }
.tab:hover { color: var(--text); background: transparent; }
.tab.active, .tab.active:hover { background: transparent !important; box-shadow: inset 0 -2px 0 var(--accent) !important; color: var(--accent); }
[data-theme="dark"] .tab.active, [data-theme="dark"] .tab.active:hover { color: var(--text); box-shadow: inset 0 -2px 0 var(--text) !important; }

/* Kennzahlen-Leiste: erstes Feld in der Grundfarbe gefüllt */
.stats.stats-bar { gap: 0; padding: 0; border-radius: var(--radius); overflow: hidden; }
.stats-bar > .stat { border-radius: 0; padding: 20px 22px; background: transparent !important; border-left: 1px solid var(--line); }
.stats-bar > .stat:first-child { border-left: 0; }
.stats-bar > .stat .ic { background: var(--surface-2); box-shadow: none; }
.stats-bar > .stat.pending .ic { background: var(--warn-soft); color: var(--warn); }
.stats-bar > .stat.rejected .ic { background: var(--bad-soft); color: var(--bad); }
.stats-bar > .stat.approved .ic { background: var(--ok-soft); color: var(--ok); }
.stats-bar > .stat.lead { color: #fff; text-decoration: none; border: 0; box-shadow: none;
  background: var(--side, #2b4a66) repeating-linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, .06) 22px 44px) !important; }
.stats-bar > .stat.lead span { color: rgba(255, 255, 255, .82); }
.stats-bar > .stat.lead .ic { background: rgba(255, 255, 255, .16); color: #fff; }
.stats-bar > .stat.lead:hover { filter: brightness(1.06); }
@media (max-width: 640px) { .stats-bar > .stat { padding: 14px; } .stats-bar > .stat:nth-child(3) { border-left: 0; } }

/* Seitenleiste: einfarbig, aktiver Punkt hell hinterlegt mit Markierung links */
.sidebar { width: 252px; background: var(--side); }
.adm-main { margin-left: 252px; }
.side-item { font-size: 14.5px; font-weight: 500; padding: 11px 12px; border-radius: 10px; }
.side-item.active, [data-theme="dark"] .side-item.active { background: rgba(255, 255, 255, .15); color: #fff; box-shadow: inset 3px 0 0 #fff; font-weight: 650; }
.side-item.active .side-badge:not(.warn) { background: rgba(255, 255, 255, .22); }
.side-cta { border-radius: 10px; font-weight: 700; font-size: 14.5px; box-shadow: none; }
.side-label { font-size: 11px; opacity: .72; margin-top: 18px; }
.side-mark { border-radius: 10px; }
@media (max-width: 980px) { .adm-main { margin-left: 0; } }

/* Buttons: flach (Jans Vorgabe) */
.btn { border-radius: 10px; box-shadow: none; }
.btn:hover { box-shadow: none; }
.btn-primary, .btn-bad, .btn-ok { box-shadow: none !important; }
.iconbtn { border-radius: 10px; background: var(--surface-solid); }
.search, input[type=search] { border-radius: 10px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=search], textarea, select { border-radius: 10px; background: var(--surface-solid); }

/* Status-Kapseln */
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.info { background: var(--info-soft); color: var(--info-ink); }
.pill.info::before { display: none; }
.pill.info svg { width: 13px; height: 13px; }
.pill.soft { background: var(--info-soft); color: var(--info-ink); font-weight: 650; }
.pill.soft::before { display: none; }
.pill:not(.ok):not(.warn):not(.bad):not(.info):not(.soft):not(.pending):not(.approved):not(.rejected):not(.published):not(.draft):not(.done) { background: var(--surface-2); color: var(--muted); }

/* ---------- Übersicht: Heute zu tun + Freigabestand ---------- */
.home-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
@media (max-width: 900px) { .home-duo { grid-template-columns: 1fr; } }
.home-card { padding: 20px 22px; display: flex; flex-direction: column; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 36px; }
.home-card-head h2 { font-size: 17px; }
.home-card-head .muted { font-size: 13px; }
.cl-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: var(--c); color: #fff; font-size: 13px; font-weight: 800; }
.cl-logo.has-logo { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cl-logo img { width: 100%; height: 100%; object-fit: contain; }
.cl-logo img.fill { object-fit: cover; }
.cl-logo.big { width: 54px; height: 54px; border-radius: 14px; font-size: 18px; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-top: 1px solid var(--line); color: inherit; border-radius: 10px; }
.todo-row:first-of-type { border-top: 0; }
.todo-row:hover { background: var(--surface-2); }
.todo-row > svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.todo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.todo-txt b { font-size: 15px; font-weight: 650; }
.todo-txt small { font-size: 13px; color: var(--muted); }
.prog-row { display: flex; flex-direction: column; gap: 7px; padding: 11px 6px; border-top: 1px solid var(--line); color: inherit; border-radius: 10px; }
.prog-row:first-of-type { border-top: 0; }
.prog-row:hover { background: var(--surface-2); }
.prog-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.prog-top b { font-weight: 650; }
.prog-top small { color: var(--muted); font-size: 13px; }
.prog-row > small { font-size: 12.5px; }
.prog-row .bar, .cl-row .bar { height: 8px; gap: 2px; background: var(--surface-2); }
.prog-row .bar i, .cl-row .bar i { border-radius: 4px; }
.prog-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--muted); }
.prog-legend span { display: inline-flex; align-items: center; gap: 6px; }
.prog-legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Kunden-Seite ---------- */
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.cl-filters { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.cl-f { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cl-f b { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.cl-f:hover { color: var(--text); }
.cl-f.on { color: var(--side, var(--accent)); box-shadow: inset 0 -2px 0 currentColor; }
[data-theme="dark"] .cl-f.on { color: var(--text); }
.cl-tools .search { margin-bottom: 10px; width: 260px; }
.cl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cl-list { padding: 0; overflow: hidden; }
.cl-scroll { overflow-x: auto; }
.cl-head, .cl-row { display: grid; grid-template-columns: minmax(220px, 2.4fr) minmax(90px, 1fr) minmax(130px, 1.2fr) minmax(110px, 1.2fr) minmax(90px, .9fr) 18px; gap: 14px; align-items: center; min-width: 760px; }
.cl-head { padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cl-row { padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; }
.cl-row:last-child { border-bottom: 0; }
.cl-row:hover { background: var(--surface-2); }
.cl-row.on { background: color-mix(in srgb, var(--side, #2b4a66) 8%, var(--surface-solid)); box-shadow: inset 3px 0 0 var(--side, #2b4a66); }
[data-theme="dark"] .cl-row.on { background: rgba(255, 255, 255, .05); box-shadow: inset 3px 0 0 var(--text); }
.cl-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-name > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-name b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-name small { font-size: 12.5px; color: var(--muted); }
.cl-status { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-when { font-size: 13px; }
.cl-chev svg { width: 16px; height: 16px; color: var(--faint); }
.cl-empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.cl-panel { padding: 0; overflow: hidden; position: sticky; top: 20px; }
.cl-stripe { height: 6px; }
.cl-pbody { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.cl-ptop { display: flex; align-items: center; gap: 14px; }
.cl-ptop h2 { font-size: 19px; line-height: 1.25; }
.cl-ptop small { font-size: 13px; }
.cl-pbody .btn-primary { background-color: var(--side, var(--accent)); }
.cl-pbody .btn-primary svg { width: 16px; height: 16px; }
.cl-ib { width: 42px; height: 42px; flex: none; color: var(--side, var(--accent)); }
.cl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cl-tiles > div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.cl-tiles b { font-size: 22px; line-height: 1.1; }
.cl-tiles span { font-size: 12px; color: var(--muted); }
.cl-facts { display: flex; flex-direction: column; gap: 6px; }
.cl-facts a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); color: inherit; font-size: 13.5px; }
.cl-facts a:hover { background: var(--surface-2); }
.cl-facts svg { width: 16px; height: 16px; color: var(--side, var(--accent)); flex: none; }
.cl-label { margin: 0 0 8px; font-size: 11.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cl-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cl-links a { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: inherit; font-size: 13.5px; font-weight: 550; }
.cl-links a:hover { background: var(--surface-2); }
.cl-links svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
[data-theme="dark"] .cl-pbody .btn-primary { background-color: color-mix(in srgb, var(--side, #2b4a66) 70%, #fff); }
@media (max-width: 1100px) { .cl-layout { grid-template-columns: 1fr; } .cl-panel { display: none; } }
@media (max-width: 640px) {
  .cl-tools .search { width: 100%; }
  .cl-head { display: none; }
  .cl-head, .cl-row { min-width: 0; }
  .cl-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; padding: 14px 16px; }
  .cl-row > span:nth-child(2), .cl-row > span:nth-child(5), .cl-row > span:nth-child(6) { display: none; }
  .cl-row > span:nth-child(4) { grid-column: 1 / -1; }
}

/* Kundenseite: Brotkrumen zurück zur Kundenliste */
.cust-crumb a { color: inherit; text-decoration: none; }
.cust-crumb a:hover { text-decoration: underline; }
.cust-crumb span { opacity: .6; margin: 0 2px; }

/* Feinschliff */
.tab.active .tab-badge { background: var(--accent); color: #fff; }
.tab.active .tab-badge.warn, .tab-badge.warn { background: var(--warn); color: #fff; }
.tab-badge { background: var(--surface-2); color: var(--muted); }
.cl-row .pill { white-space: nowrap; }
.cl-head, .cl-row { grid-template-columns: minmax(240px, 2.8fr) minmax(80px, .9fr) minmax(130px, 1.2fr) minmax(100px, 1.1fr) minmax(86px, .8fr) 18px; }
[data-theme="dark"] .eyebrow { color: color-mix(in srgb, var(--accent) 45%, #fff); }
[data-theme="dark"] .cl-pbody .btn-primary { background-color: color-mix(in srgb, var(--side, #2b4a66) 82%, #fff); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .eyebrow { color: color-mix(in srgb, var(--accent) 45%, #fff); } }
@media (max-width: 640px) { .cl-head, .cl-row { grid-template-columns: minmax(0, 1fr) auto; } }
.tabs { width: 100%; }

/* Breitere Inhalte – weniger Freiraum links und rechts */
.adm-main .container { max-width: 1720px; padding-left: 36px; padding-right: 36px; }
.adm-main .topbar-in { max-width: none; }
.container, .topbar-in { max-width: 1440px; }
@media (min-width: 641px) { .container { padding-left: 28px; padding-right: 28px; } }
@media (max-width: 640px) { .adm-main .container { padding-left: 16px; padding-right: 16px; } }

/* ================= CRM ================= */
.crm-kpis, .bill-kpis { margin-bottom: 18px; }
.stats-bar > button.stat { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stats-bar > button.stat:hover { background: var(--surface-2) !important; }
.stats-bar > .stat.hot b { color: var(--bad-ink); }
.crm-tools, .bill-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.crm-tools .search { width: 300px; max-width: 100%; }
.crm-board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.crm-col { background: var(--surface-2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.crm-col.over { border-color: var(--side, var(--accent)); background: color-mix(in srgb, var(--side, #2b4a66) 6%, var(--surface-2)); }
.crm-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; }
.crm-col header b { flex: 1; font-size: 14px; }
.crm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.crm-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-solid); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.crm-sum { font-size: 12px; color: var(--muted); padding: 0 4px 4px; }
.crm-cards { display: flex; flex-direction: column; gap: 8px; }
.crm-card { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; display: flex; flex-direction: column; gap: 4px; cursor: grab; box-shadow: var(--shadow); transition: border-color .15s, transform .1s; }
.crm-card:hover, .crm-card:focus-visible { border-color: var(--side, var(--accent)); outline: none; }
.crm-card.drag { opacity: .5; }
.crm-card b { font-size: 14.5px; line-height: 1.3; }
.crm-card small { font-size: 12.5px; color: var(--muted); }
.crm-val { font-size: 13px; font-weight: 650; }
.crm-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.crm-next { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.crm-next svg { width: 13px; height: 13px; }
.crm-next.over { color: var(--bad-ink); font-weight: 650; }
.crm-next.today { color: var(--warn-ink); font-weight: 650; }
.crm-next.none { font-style: italic; color: var(--faint); }
.crm-more { margin: 2px 4px; font-size: 12px; color: var(--muted); }
.crm-hint { font-size: 12.5px; margin: 10px 0 0; }
.modal.crm-modal { width: min(1000px, calc(100vw - 32px)); max-width: none; display: flex; flex-direction: column; gap: 14px; }
.modal.crm-modal .modal-head { margin-bottom: 0; }
.modal.bill-tpl-modal { width: min(1040px, calc(100vw - 32px)); max-width: none; display: flex; flex-direction: column; gap: 14px; }
.modal.bill-tpl-modal .modal-head { margin-bottom: 0; }
.crm-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-stage { flex: 1 1 120px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.crm-stage:hover { color: var(--text); border-color: var(--c); }
.crm-stage.on { background: var(--c); border-color: var(--c); color: #fff; }
.crm-won { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.crm-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 820px) { .crm-detail { grid-template-columns: 1fr; } }
.crm-sums { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.crm-sums > div { display: flex; flex-direction: column; min-width: 90px; }
.crm-sums small { font-size: 12px; color: var(--muted); }
.crm-sums b { font-size: 17px; }
.crm-sums .btn { margin-left: auto; }
.crm-log { display: flex; flex-direction: column; gap: 12px; }
.crm-log h3 { font-size: 15px; }
.crm-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-kinds label { cursor: pointer; }
.crm-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.crm-kinds span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.crm-kinds span svg { width: 14px; height: 14px; }
.crm-kinds input:checked + span { background: var(--side, var(--accent)); border-color: transparent; color: #fff; }
.crm-kinds input:focus-visible + span { outline: 2px solid var(--side, var(--accent)); outline-offset: 2px; }
.crm-notes { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.crm-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; border-top: 1px solid var(--line); }
.crm-note p { margin: 0 0 2px; font-size: 14px; white-space: pre-wrap; }
.crm-note small { font-size: 12px; color: var(--muted); }
.crm-note > div { flex: 1; min-width: 0; }
.crm-note-ic { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--side, var(--accent)); }
.crm-note-ic svg { width: 14px; height: 14px; }
.crm-note.status .crm-note-ic { background: var(--info-soft); }
.crm-note.status p { font-weight: 600; }
.crm-ndel { width: 30px; height: 30px; opacity: .55; }
.crm-ndel:hover { opacity: 1; }
.crm-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
[data-theme="dark"] .crm-stage.on, [data-theme="dark"] .crm-kinds input:checked + span { color: #fff; }

/* ================= Rechnungen ================= */
.bill-pad { padding: 20px; }
.bill-demo { margin-bottom: 14px; }
.bill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
@media (max-width: 1200px) { .bill-layout { grid-template-columns: 1fr; } }
.bill-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bill-tools { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.bill-tools .search { width: 240px; margin: 0; }
.bill-tools .row { padding-bottom: 8px; }
.cl-f b.hot { background: var(--bad); color: #fff; }
.bill-list { padding: 0; overflow: hidden; }
.bill-head, .bill-row { display: grid; grid-template-columns: 108px minmax(170px, 2fr) 100px minmax(140px, 1.2fr) 104px 150px; gap: 12px; align-items: center; min-width: 760px; }
.bill-date { display: flex; flex-direction: column; gap: 2px; }
.bill-date small { font-size: 12px; color: var(--muted); }
.bill-head { padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bill-row { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.bill-row:last-child { border-bottom: 0; }
.bill-row.st-overdue { background: color-mix(in srgb, var(--bad) 4%, var(--surface-solid)); }
.bill-row .r, .bill-head .r { text-align: right; }
.bill-nr { font-weight: 650; color: var(--side, var(--accent)); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .bill-nr { color: var(--text); }
.bill-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bill-who b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-who b a { color: inherit; }
.bill-who b a:hover { text-decoration: underline; }
.bill-who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-st { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.bill-st small { font-size: 12px; color: var(--muted); }
.bill-row.st-overdue .bill-st small:first-of-type { color: var(--bad-ink); font-weight: 600; }
.bill-amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.bill-act { display: flex; justify-content: flex-end; gap: 6px; }
.bill-act .btn svg { width: 15px; height: 15px; }
.bill-act .iconbtn { width: 36px; height: 36px; }
.bill-note { font-size: 12.5px; margin: -6px 0 0; }
.bill-box { padding: 18px 20px; }
.ret-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ret-row:first-of-type { border-top: 0; }
.ret-row b { flex: 1; font-weight: 650; }
.ret-btns { margin-top: 12px; }
.bill-new { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
@media (max-width: 1200px) { .bill-new { position: static; } }
.bn-head { display: flex; flex-direction: column; gap: 2px; }
.bn-head h2 { font-size: 18px; }
.bn-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bn-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.bn-pick:hover { border-color: var(--side, var(--accent)); background: var(--surface-2); }
.bn-pick b { font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.bn-pick small { font-size: 12px; color: var(--muted); }
.bn-lines { display: flex; flex-direction: column; gap: 8px; }
.bn-line { padding: 10px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.bn-line textarea { min-height: 52px; font-size: 14px; }
.bn-nums { display: grid; grid-template-columns: 70px minmax(0, 1fr) 84px 36px; gap: 8px; align-items: end; }
.bn-nums label { display: flex; flex-direction: column; gap: 3px; }
.bn-nums small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bn-nums input, .bn-nums select { padding: 8px 10px; }
.bn-nums .iconbtn { width: 36px; height: 38px; }
.bn-sum { border-radius: 12px; border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bn-sum > div { display: flex; justify-content: space-between; color: var(--muted); }
.bn-sum .tot { color: var(--text); font-weight: 750; font-size: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.bn-btns { display: flex; flex-direction: column; gap: 8px; }
.bn-btns .btn-primary { background-color: var(--side, var(--accent)); padding: 12px; }
.bill-setup { display: flex; gap: 20px; padding: 24px; margin-bottom: 18px; align-items: flex-start; }
.bill-setup-ic { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--info-soft); color: var(--info-ink); }
.bill-setup-ic svg { width: 24px; height: 24px; }
.bill-setup h2 { margin-bottom: 6px; }
.bill-steps { margin: 14px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.bill-steps code, .bill-setup code { font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.bill-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.bill-link > svg { width: 18px; height: 18px; color: var(--side, var(--accent)); }
.bill-link span { flex: 1; min-width: 200px; }
.bill-link select { width: auto; min-width: 240px; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-form { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 1.5fr) 110px 86px auto auto; gap: 10px; align-items: end; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.tpl-form.new { border-style: dashed; background: var(--surface-2); }
.tpl-m { padding-bottom: 10px; white-space: nowrap; }
.tpl-b { padding-bottom: 2px; flex-wrap: nowrap; }
@media (max-width: 860px) { .tpl-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .bill-tools .search { width: 100%; }
  .bill-head { display: none; }
  .bill-head, .bill-row { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .bill-row > span:nth-child(3) { display: none; }
  .bill-row .bill-nr { grid-column: 1 / -1; font-size: 12.5px; }
  .bill-act { grid-column: 1 / -1; justify-content: flex-start; }
  .bn-picks { grid-template-columns: 1fr; }
  .crm-reasons { grid-template-columns: 1fr; }
}

input[type=number], input[type=date] { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); outline: none; font: inherit; color: inherit; }
input[type=number]:focus, input[type=date]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ================= Start-Bereich (Neukunden) ================= */
.st-welcome { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 16px; border-left: 4px solid var(--accent); }
.st-welcome-txt { flex: 1; min-width: 0; }
.st-welcome h2 { font-size: 20px; margin-bottom: 6px; }
.st-welcome p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 780px; }
.st-progress { flex: none; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--accent-soft); color: var(--accent); }
.st-progress b { font-size: 26px; line-height: 1; }
.st-progress span { font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 30px; }
@media (max-width: 1000px) { .st-grid { grid-template-columns: 1fr; } }
.st-box { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.st-box > h2, .st-box .home-card-head h2 { font-size: 17px; }
.st-box .home-card-head { margin-bottom: 0; }
.st-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-steps li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.st-steps li:last-child { padding-bottom: 0; }
.st-steps li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.st-steps li.done:not(:last-child)::before { background: var(--accent); opacity: .45; }
.st-dot { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 750; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); }
.st-dot svg { width: 15px; height: 15px; }
.st-steps li.done .st-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-steps li.cur .st-dot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.st-steps b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; padding-top: 5px; }
.st-steps li.done b { color: var(--muted); }
.st-steps p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.st-items { display: flex; flex-direction: column; gap: 8px; }
.st-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.st-item.requested { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 5%, var(--surface-solid)); }
.st-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-item-txt b { font-size: 14.5px; font-weight: 650; }
.st-item-txt small { font-size: 12.5px; color: var(--muted); }
.st-item .btn svg { width: 15px; height: 15px; }
.st-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; background: #6b7785; letter-spacing: -.02em; }
.st-ic.p-linkedin { background: #0a66c2; }
.st-ic.p-meta { background: #c13584; }
.st-ic.p-tiktok { background: #111; }
.st-ic.p-youtube { background: #e62117; }
.st-ic.p-google { background: #1a73e8; }
.st-ic.p-website { background: #2b4a66; font-size: 11px; }
.st-safe { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.st-safe > svg { width: 20px; height: 20px; flex: none; color: var(--ok); margin-top: 1px; }
.st-safe b { color: var(--text); font-size: 13.5px; }
.st-safe p { margin: 3px 0 0; line-height: 1.5; }
.st-safe.small { padding: 10px 12px; align-items: center; }
.st-safe.small p { margin: 0; }
.st-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.st-seg button { padding: 10px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 650; font-size: 13.5px; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.st-seg button small { font-size: 11px; font-weight: 600; color: var(--ok-ink); }
.st-seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
.st-hint { white-space: pre-wrap; line-height: 1.5; }
.st-pw { display: flex; gap: 6px; }
.st-pw input { flex: 1; }
.st-pw .iconbtn { width: 44px; height: 44px; flex: none; }
.st-pw .iconbtn svg, .st-item .btn svg { width: 17px; height: 17px; }
.modal-foot .btn svg { width: 16px; height: 16px; }
/* Agentur */
.st-toggle { display: flex; align-items: center; gap: 20px; padding: 20px 22px; margin-bottom: 16px; }
.st-toggle > div { flex: 1; min-width: 0; }
.st-toggle h2 { font-size: 17px; margin-bottom: 4px; }
.st-toggle p { margin: 0; font-size: 14px; }
.st-toggle.on { border-left: 4px solid var(--ok); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 46px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch b { font-size: 14px; }
.st-vault { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--muted); padding: 5px 10px; border-radius: 99px; background: var(--surface-2); }
.st-vault svg { width: 14px; height: 14px; }
.st-vault.open { color: var(--warn-ink); background: var(--warn-soft); }
.st-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 640px) { .st-add { grid-template-columns: 1fr; } .st-welcome { flex-direction: column; align-items: flex-start; } .st-item { flex-wrap: wrap; } }
.st-log summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-log > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.st-log > div small { color: var(--muted); white-space: nowrap; }
.st-edit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-edit li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.st-done { cursor: pointer; flex: none; }
.st-done input { position: absolute; opacity: 0; pointer-events: none; }
.st-done span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 750; border: 2px solid var(--line); color: var(--muted); }
.st-done span svg { width: 15px; height: 15px; }
.st-done input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-done input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.st-fields input { font-weight: 650; padding: 8px 10px; }
.st-fields textarea { font-size: 13.5px; padding: 8px 10px; min-height: 0; }
.st-ord { display: flex; flex-direction: column; gap: 4px; }
.st-ord .iconbtn { width: 30px; height: 30px; font-size: 14px; }
.st-ord .iconbtn:disabled { opacity: .3; }
.st-sec { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.st-sec small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.st-sec-v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; }
.st-sec-v.blur { filter: blur(6px); cursor: pointer; transition: filter .15s; }
.st-sec-v.blur:hover, .st-sec-v.blur:focus, .st-sec-v.blur.show { filter: none; }
.st-item { flex-wrap: wrap; }
.st-item-txt { flex: 1 1 180px; }
.st-item > .row { margin-left: auto; }
@media (max-width: 640px) { .st-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; } .st-item > .btn, .st-item > .row { grid-column: 2 / -1; margin-left: 0; justify-self: start; } }
.st-add { display: flex; flex-wrap: wrap; gap: 8px; }
.st-add select, .st-add input { flex: 1 1 170px; width: auto; }
.st-add [name=role][hidden] { display: none; }
.st-add-help { font-size: 12.5px; margin: -4px 0 0; }
.st-add-help:empty { display: none; }
.st-inv { border-top: 1px solid var(--line); padding-top: 10px; }
.st-inv summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.st-inv-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; align-items: end; }
.st-inv-li { grid-column: 1 / -1; }
.st-inv-f .btn { justify-self: start; }
.li-guide { list-style: none; counter-reset: li; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.li-guide li { counter-increment: li; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.li-guide li::before { content: counter(li); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: #0a66c2; color: #fff; font-size: 13px; font-weight: 750; display: grid; place-items: center; }
.li-guide b { font-size: 14px; }
.li-guide p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.li-guide .li-btn { display: inline-flex; margin: 4px 4px 2px 0; color: #0a66c2; border-color: #0a66c2; }
[data-theme="dark"] .li-guide .li-btn { color: #70b5f9; border-color: #70b5f9; }
.li-help summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.li-help p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.modal .li-guide + .notice, .modal .li-help + .notice { margin-top: 0; }
@media (max-width: 640px) { .st-inv-f { grid-template-columns: 1fr; } }
input[type=url] { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); outline: none; font: inherit; color: inherit; }
input[type=url]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.st-ic.p-linkedin_private { background: #0a66c2; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.st-tg-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 18px; }
.st-tg-act > small { font-size: 12.5px; max-width: 260px; }
.st-tg-act .btn svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .st-toggle { flex-direction: column; align-items: flex-start; } .st-tg-act { justify-content: flex-start; } }
/* Rechnungs-E-Mail zum Kopieren */
.modal.bill-mail-modal { width: min(1120px, calc(100vw - 32px)); max-width: none; display: flex; flex-direction: column; gap: 14px; }
.modal.bill-mail-modal .modal-head { margin-bottom: 0; }
.bm-steps { margin: 0; padding: 12px 14px 12px 34px; border-radius: 12px; background: var(--info-soft); color: var(--info-ink); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.bm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .bm-grid { grid-template-columns: 1fr; } }
.bm-form { gap: 10px; }
.bm-form #bm-link.bad { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.bm-to { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.bm-to code { font-size: 12.5px; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bm-var { padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-solid); font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.bm-var:hover { color: var(--text); border-color: var(--accent); }
.bm-prev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; position: sticky; top: 0; }
.bm-prev .rm-subj { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.bm-prev iframe { width: 100%; height: 540px; border: 0; background: #f4f4f9; display: block; }
.bm-foot { flex-wrap: wrap; }
.bm-foot .btn svg { width: 16px; height: 16px; }
.sig-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .sig-grid { grid-template-columns: 1fr; } }
.sig-help { font-size: 12.5px; margin: 0; }
.sig-grid textarea { font-size: 14px; line-height: 1.5; }

/* ---------- Rechnungen im Kundenportal (24.11.2026) ---------- */
.bill-shared { display: inline-flex; align-items: center; gap: 4px; color: var(--side, var(--accent)); font-weight: 600; }
.bill-shared svg { width: 13px; height: 13px; }
.bm-portal { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bm-portal p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.bm-portal p svg, .bm-share svg { width: 16px; height: 16px; flex: none; }
.bm-share { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.bm-share input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--side, var(--accent)); }
.bm-share span { display: flex; flex-direction: column; gap: 2px; }
.bm-share small { color: var(--muted); font-size: 12.5px; }
.mi-sum { display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 16px; border-left: 4px solid var(--accent); }
.mi-sum.hot { border-left-color: #d64545; }
.mi-sum.ok { border-left-color: #1f9d55; }
.mi-sum-ic, .mi-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mi-sum-ic svg, .mi-ic svg { width: 22px; height: 22px; }
.mi-sum b { display: block; font-size: 22px; letter-spacing: -.01em; }
.mi-list { display: flex; flex-direction: column; gap: 10px; }
.mi-row { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(120px, .8fr) minmax(170px, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; }
.mi-main, .mi-amt, .mi-st { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mi-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-amt { text-align: right; }
.mi-amt b { font-variant-numeric: tabular-nums; font-size: 16px; }
.mi-st { align-items: flex-start; }
.mi-st small { color: var(--muted); font-size: 12.5px; }
.mi-row.st-overdue .mi-st small { color: #c23b3b; font-weight: 600; }
.mi-row.st-paid .mi-ic { background: #e6f6ec; color: #1f9d55; }
.mi-act { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mi-act .btn svg { width: 15px; height: 15px; }
.bill-act .iconbtn, .bill-act .btn { flex: none; }
@media (max-width: 820px) {
  .mi-row { grid-template-columns: 44px 1fr; gap: 10px 14px; }
  .mi-main b { white-space: normal; }
  .mi-amt { grid-column: 2; text-align: left; flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .mi-st { grid-column: 2; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
  .mi-act { grid-column: 1 / 3; justify-content: stretch; }
  .mi-act .btn { flex: 1; justify-content: center; }
}
.bill-note { margin-top: 14px; }

/* Agentur-Seitenleiste: Kopf-Icon + „Agenturbereich“ statt Logo (24.11.2026) */
.side-brand-agency { gap: 10px; padding: 6px 8px; }
.side-brand-agency .side-head { width: 44px; height: 38px; flex: none; color: #fff; }
.side-brand-agency .side-brand-txt b { font-size: 19px; font-weight: 750; letter-spacing: -.015em; overflow: visible; text-overflow: clip; }

/* ---------- Titelbild in der Agentur-Übersicht (02.12.2026) ---------- */
.cover-hero { position: relative; overflow: hidden; border-radius: 0 0 28px 28px; margin: -28px 0 28px; min-height: 330px; display: flex; align-items: flex-end; background: #1d2b36; isolation: isolate; }
.cover-hero .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.cover-hero.pos-top .cover-img { object-position: center 15%; }
.cover-hero.pos-bottom .cover-img { object-position: center 85%; }
.cover-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 18, 26, .08) 0%, rgba(10, 18, 26, .18) 40%, rgba(10, 18, 26, .72) 100%); }
.cover-txt { padding: 34px 40px 36px; color: #fff; max-width: 900px; }
.cover-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .95; }
.cover-eyebrow .side-head { width: 36px; height: 31px; color: #fff; flex: none; }
.cover-txt h1 { margin: 0; color: #fff; font-size: clamp(32px, 3.6vw, 50px); line-height: 1.05; letter-spacing: -.025em; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.cover-txt p:last-child { margin: 10px 0 0; font-size: 17px; color: rgba(255, 255, 255, .88); }
@media (max-width: 820px) {
  .cover-hero { min-height: 260px; margin: -16px -16px 22px; border-radius: 0 0 24px 24px; }
  .cover-txt { padding: 24px 22px 26px; }
  .cover-eyebrow { font-size: 11.5px; letter-spacing: .12em; }
}
.ag-cover { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.ag-cover-prev { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 7; background: #1d2b36; }
.ag-cover-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ag-cover-prev.pos-top img { object-position: center 15%; }
.ag-cover-prev.pos-bottom img { object-position: center 85%; }
.ag-cover-prev.off img { filter: grayscale(1) opacity(.45); }
.ag-cover-prev span { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 99px; }
.ag-cover-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 600px) { .ag-cover { grid-template-columns: 1fr; } }
.cv-pos { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.cv-seg { display: inline-flex; border: 1px solid var(--line, #d9e0e6); border-radius: 10px; overflow: hidden; }
.cv-seg label { cursor: pointer; }
.cv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cv-seg span { display: block; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.cv-seg label + label span { border-left: 1px solid var(--line, #d9e0e6); }
.cv-seg input:checked + span { background: var(--accent); color: #fff; }
.cv-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 820px) { .cover-day { display: none; } }

/* ---------- Kennzahlen wie in der Kleiderkammer-App (03.12.2026) ---------- */
.cover-txt h1 { margin: 0; }
.kpi-day { margin: 0 0 12px; font-size: 13px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kpi { display: grid; grid-template-columns: minmax(260px, 1fr) 3fr; padding: 0; overflow: hidden; margin-bottom: 28px; }
.kpi-lead { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 26px 28px; color: #fff; text-decoration: none; background: var(--side, #2b4a66); }
.kpi-lead::after { content: ""; position: absolute; right: 0; bottom: 22px; width: 46%; height: 30px;
  background: repeating-linear-gradient(-60deg, transparent 0 14px, rgba(255, 255, 255, .13) 14px 40px); }
.kpi-lead:hover { filter: brightness(1.05); }
.kpi-lead span { font-size: 15px; color: rgba(255, 255, 255, .88); }
.kpi-lead b { font-size: 52px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-lead small { font-size: 14px; color: rgba(255, 255, 255, .85); position: relative; z-index: 1; padding-right: 48%; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.kpi-cell { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; border-left: 1px solid var(--line); min-width: 0; }
.kpi-cell span { font-size: 14px; color: var(--muted); }
.kpi-cell b { display: flex; align-items: center; gap: 12px; font-size: 38px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-cell small { font-size: 13px; color: var(--muted); }
.kpi-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.kpi-dot.warn { background: #e0a02d; } .kpi-dot.bad { background: #d9534f; } .kpi-dot.ok { background: #2f9e5b; }
@media (max-width: 900px) {
  .kpi { grid-template-columns: 1fr; border-radius: 22px; }
  .kpi-lead { padding: 22px 22px 24px; }
  .kpi-lead b { font-size: 46px; }
  .kpi-lead small { padding-right: 44%; }
  .kpi-lead::after { bottom: 20px; width: 40%; }
  .kpi-cell { padding: 18px 16px; gap: 4px; }
  .kpi-cell:first-child { border-left: 0; }
  .kpi-cell span { font-size: 13px; line-height: 1.3; min-height: 2.6em; }
  .kpi-cell b { font-size: 30px; gap: 8px; }
  .kpi-dot { width: 9px; height: 9px; }
  .kpi-cell small { font-size: 12px; line-height: 1.35; }
  .kpi-day { font-size: 12px; margin: 4px 2px 10px; }
}
