/* ==========================================================================
   strothmann.online Kundenpanel – Gestaltungssystem
   Schrift: Archivo (variabel, Breite + Stärke; SIL OFL). Überschriften in
   breiter Form – Echo der breiten Wortmarke –, Fließtext in normaler Breite.
   Farben: Tinte, Papier, Signalblau (Marke), Moos (läuft), Bernstein (Achtung),
   Ziegel (Fehler). Eine Hauptaktion je Ansicht ist signalblau, alles andere ruhig.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2-variations"), url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-ext.woff2") format("woff2-variations"), url("fonts/archivo-var-ext.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #13213b;
  --ink-2: #3b4a66;
  --muted: #66738a;
  --paper: #edf0f4;
  --sheet: #ffffff;
  --sheet-2: #f5f7fa;
  --rule: #d8dee7;
  --rule-strong: #c3ccd8;
  --signal: #1453e6;
  --signal-ink: #0b3bb0;
  --signal-wash: #e8eefd;
  --on-signal: #ffffff;
  --ok: #237a57;
  --ok-wash: #e2f1e9;
  --warn: #a86400;
  --warn-wash: #fbefd9;
  --bad: #b3362c;
  --bad-wash: #fbe6e3;
  --idle: #8a95a8;
  --focus: #1453e6;
  --shadow-pop: 0 18px 50px -12px rgb(19 33 59 / .28), 0 2px 6px rgb(19 33 59 / .08);
  --r-ctl: 6px;
  --r-box: 10px;
  --sidebar: 256px;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #e6ecf6;
  --ink-2: #b9c4d8;
  --muted: #8d99b0;
  --paper: #0c1322;
  --sheet: #131c30;
  --sheet-2: #18233b;
  --rule: #24304a;
  --rule-strong: #33415f;
  --signal: #6f9bff;
  --signal-ink: #96b6ff;
  --signal-wash: #19295a;
  --on-signal: #0c1322;
  --ok: #52c891;
  --ok-wash: #12342a;
  --warn: #f1b54f;
  --warn-wash: #3a2a0e;
  --bad: #f4847a;
  --bad-wash: #3e1a19;
  --idle: #6c7891;
  --focus: #96b6ff;
  --shadow-pop: 0 20px 50px -12px rgb(0 0 0 / .6), 0 2px 6px rgb(0 0 0 / .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6ecf6; --ink-2: #b9c4d8; --muted: #8d99b0; --paper: #0c1322; --sheet: #131c30; --sheet-2: #18233b;
    --rule: #24304a; --rule-strong: #33415f; --signal: #6f9bff; --signal-ink: #96b6ff; --signal-wash: #19295a; --on-signal: #0c1322;
    --ok: #52c891; --ok-wash: #12342a; --warn: #f1b54f; --warn-wash: #3a2a0e; --bad: #f4847a; --bad-wash: #3e1a19;
    --idle: #6c7891; --focus: #96b6ff; --shadow-pop: 0 20px 50px -12px rgb(0 0 0 / .6), 0 2px 6px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}

/* ── Grundlagen ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55; font-stretch: 100%;
  font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-stretch: 116%; letter-spacing: -0.01em; line-height: 1.22; color: var(--ink); }
h1 { font-size: 1.9rem; font-weight: 640; }
h2 { font-size: 1.28rem; font-weight: 620; }
h3 { font-size: 1.05rem; font-weight: 620; }
h4 { font-size: .95rem; font-weight: 620; }
p { margin: 0 0 .8em; max-width: 72ch; }
a { color: var(--signal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--signal-ink); }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num, .tabular { font-variant-numeric: tabular-nums; }
code, kbd, .mono { font-family: var(--mono); font-size: .88em; }
kbd { border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--sheet); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.4rem 0; }
img { max-width: 100%; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke-width: 1.8; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--signal-wash); }

/* ── Grundgerüst ───────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 22px 14px 18px; border-right: 1px solid var(--rule); background: var(--paper);
}
.brand { display: block; padding: 4px 10px 22px; text-decoration: none; }
.brand img { display: block; width: 176px; height: auto; }
.wm-dark { display: none !important; }
:root[data-theme="dark"] .wm-light { display: none !important; }
:root[data-theme="dark"] .wm-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-light { display: none !important; }
  :root:not([data-theme="light"]) .wm-dark { display: block !important; }
}
.brand-sub { display: block; margin-top: 7px; font-size: .78rem; color: var(--muted); font-stretch: 108%; }

.nav { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.nav-group-label { padding: 0 10px 6px; font-size: .78rem; color: var(--muted); font-weight: 560; }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-ctl);
  color: var(--ink-2); text-decoration: none; font-weight: 480;
}
.nav a:hover { background: var(--sheet); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sheet); color: var(--ink); font-weight: 620; box-shadow: inset 0 0 0 1px var(--rule); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); }
.nav a .ico { color: var(--muted); }
.nav a[aria-current="page"] .ico { color: var(--signal); }
.nav .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-wash); color: var(--warn); font-size: .76rem; font-weight: 700; text-align: center; line-height: 20px; }
.sidebar-foot { margin-top: 18px; padding: 12px 10px 0; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); }
.sidebar-foot a { color: var(--muted); }
.sidebar-foot p { margin: 0 0 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px 28px; min-height: 58px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--rule); }
.topbar .spacer { flex: 1; }
.scrim { display: none; }
.icon-btn.menu-btn { display: none; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px; min-width: 260px; padding: 7px 10px; border: 1px solid var(--rule);
  border-radius: var(--r-ctl); background: var(--sheet); color: var(--muted); font: inherit; cursor: pointer; text-align: left;
}
.search-trigger kbd { margin-left: auto; font-size: .74rem; white-space: nowrap; }
.search-trigger .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink); font: inherit; cursor: pointer; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--signal-wash); color: var(--signal-ink); font-size: .78rem; font-weight: 700; font-stretch: 110%; }
.user-btn .who { font-weight: 560; font-size: .9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { width: 100%; max-width: 1180px; padding: 22px 28px 64px; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lead { margin: 6px 0 0; color: var(--muted); max-width: 64ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--signal); text-decoration: underline; }

.impersonation { display: flex; align-items: center; gap: 12px; padding: 9px 28px; background: var(--warn-wash); color: var(--ink); border-bottom: 1px solid var(--rule); font-size: .9rem; }
.impersonation form { margin-left: auto; }

/* ── Bereiche, Blöcke ──────────────────────────────────────────────────── */
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.stack-lg { display: grid; gap: 30px; grid-template-columns: minmax(0, 1fr); }
.stack > *, .stack-lg > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-box); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--rule); }
.panel-head h2, .panel-head h3 { font-size: 1.02rem; }
.panel-head .hint { margin: 2px 0 0; font-size: .86rem; color: var(--muted); }
.panel-body { padding: 18px 20px; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--rule); background: var(--sheet-2); border-radius: 0 0 var(--r-box) var(--r-box); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.panel.flush .panel-body { padding: 0; }
.panel.quiet { background: transparent; border-style: dashed; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.section-title h2 { font-size: 1.1rem; }

/* Schlüssel/Wert */
.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 9px 22px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── Listen („Kontobuch“-Zeilen) ───────────────────────────────────────── */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li, .rows > .row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--rule); }
.rows > li:first-child, .rows > .row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.row-title:hover { color: var(--signal); }
.row-meta { margin-top: 2px; font-size: .86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.row-side { text-align: right; flex: none; }
.row-actions { display: flex; gap: 6px; flex: none; }
.rows.link-rows > li { cursor: pointer; }
.rows.link-rows > li:hover { background: var(--sheet-2); }

.mark { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--idle); box-shadow: 0 0 0 3px color-mix(in srgb, var(--idle) 18%, transparent); }
.mark.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.mark.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.mark.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.mark.info { background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent); }

.glyph { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--sheet-2); color: var(--ink-2); border: 1px solid var(--rule); }
.glyph .ico { width: 19px; height: 19px; }
.glyph.signal { background: var(--signal-wash); color: var(--signal); border-color: transparent; }

/* ── Tabellen ──────────────────────────────────────────────────────────── */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 560; color: var(--muted); font-size: .84rem; padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--sheet-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--sheet-2) 60%, transparent); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.actions { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 600; }
.table a.cell-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a.cell-link:hover { color: var(--signal); text-decoration: underline; }
.table tfoot td { font-weight: 650; border-top: 2px solid var(--rule-strong); background: var(--sheet-2); }

/* ── Formulare ─────────────────────────────────────────────────────────── */
form { margin: 0; }
.field { display: grid; gap: 5px; margin-bottom: 15px; align-content: start; }
.field > label, .label { font-weight: 560; font-size: .9rem; color: var(--ink); }
.field .hint, .hint { font-size: .84rem; color: var(--muted); margin: 0; }
.field .error { font-size: .85rem; color: var(--bad); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fields-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.fields .span-2, .fields-3 .span-2 { grid-column: span 2; }
.fields .span-all, .fields-3 .span-all { grid-column: 1 / -1; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
input[type=search], input[type=date], input[type=datetime-local], input[type=time], input[type=month], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl);
  background: var(--sheet); color: var(--ink); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366738a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent); }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background: var(--sheet-2); color: var(--muted); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input.is-invalid, select.is-invalid { border-color: var(--bad); }
.affix { display: flex; align-items: stretch; }
.affix input { border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
.affix .affix-text { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--rule-strong); border-left: 0; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; background: var(--sheet-2); color: var(--muted); white-space: nowrap; }
.affix.pre .affix-text { order: -1; border-left: 1px solid var(--rule-strong); border-right: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
.affix.pre input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--signal); flex: none; }
.check .check-text { display: grid; gap: 1px; }
.check .check-text small { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--rule-strong); position: relative; transition: background .2s; cursor: pointer; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.switch input:checked { background: var(--signal); }
.switch input:checked::after { transform: translateX(16px); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
legend { font-weight: 640; font-stretch: 112%; margin-bottom: 10px; padding: 0; }
.pw-meter { height: 4px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .25s, background .25s; }

/* ── Schaltflächen ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 15px;
  border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--sheet); color: var(--ink);
  font: inherit; font-weight: 580; font-size: .93rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--ink-2); color: var(--ink); background: var(--sheet); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: var(--signal-ink); border-color: var(--signal-ink); color: var(--on-signal); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sheet-2); border-color: transparent; }
.btn-sm { min-height: 31px; padding: 4px 11px; font-size: .86rem; }
.btn-lg { min-height: 46px; padding: 10px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--sheet); color: var(--ink-2); cursor: pointer; text-decoration: none; position: relative; }
.icon-btn:hover { color: var(--signal); border-color: var(--signal); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--signal); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
form.inline { display: inline; }

/* ── Zustände, Hinweise ────────────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .79rem; font-weight: 600; background: var(--sheet-2); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; line-height: 1.5; }
.tag-ok { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.tag-warn { background: var(--warn-wash); color: var(--warn); border-color: transparent; }
.tag-bad { background: var(--bad-wash); color: var(--bad); border-color: transparent; }
.tag-info { background: var(--signal-wash); color: var(--signal-ink); border-color: transparent; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; border-radius: var(--r-box); border: 1px solid var(--rule); background: var(--sheet); margin-bottom: 14px; }
.notice > .ico { margin-top: 2px; width: 18px; height: 18px; }
.notice-body { flex: 1; min-width: 0; }
.notice-body p:last-child { margin-bottom: 0; }
.notice-ok { background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.notice-ok > .ico { color: var(--ok); }
.notice-warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice-warn > .ico { color: var(--warn); }
.notice-bad { background: var(--bad-wash); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.notice-bad > .ico { color: var(--bad); }
.notice-info { background: var(--signal-wash); border-color: color-mix(in srgb, var(--signal) 25%, transparent); }
.notice-info > .ico { color: var(--signal); }
.notice .close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash-stack .notice { margin: 0; animation: flash-in .35s ease-out; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.empty { padding: 34px 22px; text-align: center; color: var(--muted); }
.empty > .ico { width: 30px; height: 30px; color: var(--idle); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; }

/* Messbalken */
.meter { position: relative; height: 8px; border-radius: 8px; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; width: var(--value, 0%); background: var(--signal); border-radius: 8px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.meter.ok > span { background: var(--ok); }
.meter-label { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.meter-label strong { color: var(--ink); font-weight: 620; }

/* Reiter (Unterseiten einer Ansicht) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; font-weight: 560; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }
.tabs .count { margin-left: 6px; font-size: .78rem; color: var(--muted); }

/* Geheimnisse (Passwörter anzeigen/kopieren) */
.secret { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.secret code { padding: 3px 8px; border-radius: 5px; background: var(--sheet-2); border: 1px solid var(--rule); overflow-wrap: anywhere; }
.secret code.concealed { letter-spacing: .12em; color: var(--muted); white-space: nowrap; overflow-wrap: normal; }
.copy-ok { color: var(--ok) !important; border-color: var(--ok) !important; }

/* Kennzahlen (Admin-Cockpit) */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--rule); border-radius: var(--r-box); background: var(--sheet); overflow: hidden; }
.figure { padding: 16px 18px; border-left: 1px solid var(--rule); text-decoration: none; color: inherit; display: block; }
.figure:first-child { border-left: 0; }
a.figure:hover { background: var(--sheet-2); }
.figure .fig-value { display: block; font-size: 1.65rem; font-weight: 650; font-stretch: 114%; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.15; }
.figure .fig-label { display: block; margin-top: 4px; font-size: .86rem; color: var(--muted); }
.figure .fig-note { display: block; margin-top: 2px; font-size: .8rem; color: var(--warn); }

/* ── Kundenübersicht: Statussatz + Statuslinie ─────────────────────────── */
.greeting { margin: 4px 0 6px; color: var(--muted); font-size: .98rem; }
.status-sentence { font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.35rem); font-weight: 600; font-stretch: 122%; line-height: 1.18; letter-spacing: -0.018em; max-width: 30ch; margin: 0 0 18px; }
.status-sentence .soft { color: var(--muted); font-weight: 480; }
.statusline { display: flex; gap: 4px; height: 6px; margin: 0 0 8px; }
.statusline span { flex: 1; border-radius: 6px; background: var(--idle); transform-origin: left; }
.statusline span.ok { background: var(--ok); }
.statusline span.warn { background: var(--warn); }
.statusline span.bad { background: var(--bad); }
.statusline-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .85rem; color: var(--muted); margin: 0 0 28px; padding: 0; list-style: none; }
.statusline-legend li { display: inline-flex; align-items: center; gap: 7px; }
.statusline-legend a { color: inherit; text-decoration: none; }
.statusline-legend a:hover { color: var(--signal); }
.statusline-legend .mark { width: 7px; height: 7px; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .statusline.animate span { animation: line-draw .7s cubic-bezier(.2, .7, .2, 1) both; }
  .statusline.animate span:nth-child(2) { animation-delay: .08s; }
  .statusline.animate span:nth-child(3) { animation-delay: .16s; }
  .statusline.animate span:nth-child(4) { animation-delay: .24s; }
  .statusline.animate span:nth-child(5) { animation-delay: .32s; }
  .statusline.animate span:nth-child(n+6) { animation-delay: .4s; }
}
@keyframes line-draw { from { transform: scaleX(0); opacity: .3; } to { transform: scaleX(1); opacity: 1; } }

/* Einrichtungsfortschritt */
.setup { display: flex; gap: 20px; align-items: center; padding: 16px 20px; }
.ring { --p: 0; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--signal) calc(var(--p) * 1%), var(--sheet-2) 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--sheet); }
.ring b { position: relative; z-index: 1; font-size: .86rem; font-variant-numeric: tabular-nums; font-stretch: 110%; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.steps li { display: inline-flex; align-items: center; gap: 7px; font-size: .92rem; }
.steps li .ico { color: var(--idle); }
.steps li.done { color: var(--muted); }
.steps li.done .ico { color: var(--ok); }
.steps a { color: var(--ink); }

/* ── Dialoge, Menüs ────────────────────────────────────────────────────── */
dialog.dialog { border: 1px solid var(--rule); border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog.dialog.wide { width: min(820px, calc(100vw - 32px)); }
dialog.dialog::backdrop { background: rgb(12 19 34 / .45); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.dialog-head h2 { font-size: 1.1rem; }
.dialog-body { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.dialog-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--rule); background: var(--sheet-2); border-radius: 0 0 12px 12px; }
@media (prefers-reduced-motion: no-preference) {
  dialog.dialog[open] { animation: pop .18s ease-out; }
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; padding: 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-pop); z-index: 40; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--sheet-2); }
.menu .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.menu .menu-head strong { display: block; }
.menu .menu-head span { font-size: .84rem; color: var(--muted); }
.menu hr { margin: 6px 0; }

/* Schnellsuche */
.palette { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgb(12 19 34 / .42); }
.palette.open { display: flex; }
.palette-box { width: min(620px, calc(100vw - 28px)); background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-box input { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; min-height: 54px; padding: 0 18px; font-size: 1.05rem; }
.palette-box input:focus { box-shadow: none; }
.palette-results { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-results a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.palette-results a.active, .palette-results a:hover { background: var(--signal-wash); }
.palette-results .hint { margin-left: auto; font-size: .82rem; color: var(--muted); }
.palette-empty { padding: 18px; color: var(--muted); }

/* ── Anmeldeseiten ─────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-aside { position: relative; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: #e9eef7; overflow: hidden; }
:root[data-theme="dark"] .auth-aside { background: #070c17; }
.auth-aside img { width: 230px; height: auto; }
.auth-aside .claim { font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); font-weight: 560; font-stretch: 124%; line-height: 1.12; letter-spacing: -0.02em; max-width: 13ch; margin: 0; color: #fff; }
.auth-aside .claim-sub { color: #aab6cc; max-width: 44ch; margin-top: 16px; }
.auth-aside .facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: #c3cde0; font-size: .92rem; }
.auth-aside .facts li { display: flex; gap: 10px; align-items: center; }
.auth-aside .facts .ico { color: #7fa4ff; }
.auth-aside .wave { position: absolute; right: -120px; top: 80px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .07); box-shadow: 0 0 0 60px rgb(255 255 255 / .025), 0 0 0 120px rgb(255 255 255 / .02); pointer-events: none; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 26px; }
.auth-card .alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--muted); }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #222; color: #fff; border-color: #222; }
:root[data-theme="dark"] .btn-apple { background: #fff; color: #000; border-color: #fff; }
.otp-input { font-family: var(--mono); font-size: 1.6rem !important; letter-spacing: .45em; text-align: center; min-height: 58px !important; }
.plain-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; }
.plain-card { width: 100%; max-width: 540px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 34px; }
.plain-card .brand-top { margin-bottom: 26px; }
.plain-card .brand-top img { width: 190px; }

/* Öffentliche Seiten (Terminbuchung u. a.) */
.public-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 28px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.public-head img { width: 190px; height: auto; display: block; }
.public-main { max-width: 980px; margin: 0 auto; padding: 32px 22px 70px; }
.public-foot { border-top: 1px solid var(--rule); padding: 20px 28px; font-size: .86rem; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.public-foot a { color: var(--muted); }

/* Druck (Verträge, Rechnungsübersichten) */
@media print {
  .sidebar, .topbar, .page-actions, .no-print, .impersonation, .flash-stack { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; max-width: none; }
  .panel { border-color: #bbb; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* ── Responsiv ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; background: var(--sheet); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .nav a[aria-current="page"]::before { left: -14px; }
  .scrim { position: fixed; inset: 0; z-index: 60; background: rgb(12 19 34 / .4); display: none; }
  .scrim.open { display: block; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 8px 16px; }
  .search-trigger { min-width: 0; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .user-btn .who { display: none; }
  .page { padding: 16px 16px 56px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .fields, .fields-3 { grid-template-columns: minmax(0, 1fr); }
  .fields .span-2, .fields-3 .span-2 { grid-column: auto; }
  .rows > li, .rows > .row { padding: 12px 14px; flex-wrap: wrap; }
  .row-side { text-align: left; }
  .rows > li > .row-main { flex: 1 1 170px; }
  .panel-head, .panel-body { padding-left: 14px; padding-right: 14px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  h1 { font-size: 1.55rem; }
  .figure { border-left: 0; border-top: 1px solid var(--rule); }
  .figure:first-child { border-top: 0; }
  .plain-card { padding: 24px 18px; }
  .table th, .table td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
