/* =====================================================================
   objectlink.de – Design-System
   Farben aus dem Logo: Marineblau (Navigation), Ozeanblau (Aktionen),
   Korall (Akzent). Ruhiger, heller Arbeitsbereich; Dunkelmodus inklusive.
   ===================================================================== */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Grundflächen */
  --bg-main: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f4f8;
  --bg-hover: #f7f9fc;
  --border-color: #dfe4ec;
  --border-subtle: #edf0f5;
  --border-input: #cfd6e1;

  /* Schrift */
  --text-primary: #12203a;
  --text-secondary: #4a5872;
  --text-muted: #7a879c;

  /* Marke */
  --accent-primary: #1b7fae;
  --accent-hover: #146a92;
  --accent-light: rgba(27, 127, 174, 0.10);
  --accent-ring: rgba(27, 127, 174, 0.22);
  --coral: #f0744a;
  --coral-light: rgba(240, 116, 74, 0.12);

  /* Status */
  --success-bg: #e9f7f1;
  --success-border: #b6e2cf;
  --success-text: #0f7a55;
  --danger-bg: #fdeeec;
  --danger-border: #f3c3bd;
  --danger-text: #c0392b;
  --warning-bg: #fff5e3;
  --warning-border: #f2d499;
  --warning-text: #9a5b00;

  /* Navigation (bleibt in beiden Modi dunkel) */
  --nav-bg: #0d2240;
  --nav-bg-2: #0a1b34;
  --nav-text: #b7c4d8;
  --nav-text-hover: #ffffff;
  --nav-active-bg: rgba(255, 255, 255, 0.09);
  --nav-section: #6f82a0;

  --table-header-bg: #f7f9fc;
  --table-input-bg: #ffffff;
  --icon-primary: var(--accent-primary);
  --icon-secondary: var(--text-muted);
  --md-icon-fg: #526075;
  --md-icon-bg: #b8c2d1;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 58, 0.05);
  --shadow: 0 1px 2px rgba(16, 32, 58, 0.04), 0 4px 14px rgba(16, 32, 58, 0.05);
  --shadow-lg: 0 10px 30px rgba(16, 32, 58, 0.18);
  --sidebar-breite: 248px;
}

[data-theme="dark"] {
  --bg-main: #0b1322;
  --bg-surface: #111c2e;
  --bg-surface-elevated: #172438;
  --bg-hover: #15223a;
  --border-color: #23324a;
  --border-subtle: #1b293e;
  --border-input: #2c3d58;

  --text-primary: #e8eef7;
  --text-secondary: #aab7cb;
  --text-muted: #7c8aa1;

  --accent-primary: #4fb0dc;
  --accent-hover: #6cc0e6;
  --accent-light: rgba(79, 176, 220, 0.14);
  --accent-ring: rgba(79, 176, 220, 0.30);
  --coral: #ff8a5f;
  --coral-light: rgba(255, 138, 95, 0.16);

  --success-bg: rgba(31, 170, 120, 0.14);
  --success-border: rgba(31, 170, 120, 0.40);
  --success-text: #5fd3a6;
  --danger-bg: rgba(229, 83, 66, 0.14);
  --danger-border: rgba(229, 83, 66, 0.42);
  --danger-text: #ff9a8c;
  --warning-bg: rgba(242, 170, 50, 0.13);
  --warning-border: rgba(242, 170, 50, 0.40);
  --warning-text: #f5c66b;

  --nav-bg: #08111f;
  --nav-bg-2: #060d18;

  --table-header-bg: #142135;
  --table-input-bg: #0e1828;
  --md-icon-fg: #9aa8be;
  --md-icon-bg: #465773;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ===================================================================== Basis */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent-primary); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { letter-spacing: -0.015em; line-height: 1.25; }
h1 { font-size: 1.65rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
ul, ol { padding-left: 1.25rem; }
ul.codes { padding-left: 0; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--bg-surface-elevated); padding: 0.1em 0.35em; border-radius: 4px; }
strong { font-weight: 600; }
.ic { flex-shrink: 0; display: block; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-ring); }

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ===================================================================== App-Rahmen */
/* Nie waagerecht scrollen – nur Tabellen (.table-responsive) und Reiter dürfen das intern */
html, body { max-width: 100%; overflow-x: clip; }
body { overflow-wrap: break-word; }
.app-shell { display: flex; min-height: 100vh; }
.card, .page-header, .form-row, .form-grid, .form-stack { min-width: 0; max-width: 100%; }
/* Grid-/Flex-Kinder dürfen schmaler werden als ihr Inhalt (sonst drücken sie die Seite breit) */
.akte-grid > *, .form-grid > *, .module-grid > *, .summary-cards-grid > *, .start-dashboard-grid > *, .container form { min-width: 0; max-width: 100%; }
img, video, iframe, pre { max-width: 100%; }
pre { overflow-x: auto; }
.app-shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1920px; margin: 0 auto; padding: 1.75rem 2rem 2.5rem; flex: 1; }

footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem;
  padding: 1rem 2rem; color: var(--text-muted); font-size: 0.8rem; margin-top: auto;
}

/* ---- Seitenleiste */
.sidebar {
  width: var(--sidebar-breite); flex-shrink: 0;
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
  color: var(--nav-text);
  display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 0; height: 100vh; padding: 1.15rem 0.9rem 0.9rem;
  overflow-y: auto; z-index: 40;
}
.sidebar-header { padding: 0 0.35rem; }
.navbar-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none !important; min-width: 0; }
.logo-img { width: 36px; height: 36px; border-radius: 9px; display: block; flex-shrink: 0; }
.brand-text { display: inline-flex; flex-direction: column; width: fit-content; min-width: 0; }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); line-height: 1.15; width: max-content; }
.brand-accent { color: var(--coral); }
.brand-subline { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; color: var(--text-muted); line-height: 1.3; white-space: nowrap; width: max-content; }
.sidebar .brand-name { color: #ffffff; }
.sidebar .brand-subline { color: rgba(255, 255, 255, 0.85); }

.mandant-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff; text-decoration: none !important; transition: background 0.15s;
}
.mandant-switch:hover { background: rgba(255, 255, 255, 0.11); color: #fff; }
.mandant-switch .ic { color: var(--nav-text); }
.mandant-text { display: flex; flex-direction: column; min-width: 0; }
.mandant-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--nav-section); font-weight: 600; }
.mandant-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mandant-switch.leer { border-style: dashed; border-color: var(--coral); }
.mandant-switch.leer .mandant-name { color: var(--coral); }

.nav-links { display: flex; flex-direction: column; gap: 2px; }
.nav-section {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--nav-section); padding: 0.9rem 0.75rem 0.35rem;
}
.nav-section:first-child { padding-top: 0.2rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.75rem; border-radius: 8px;
  color: var(--nav-text); font-weight: 500; font-size: 0.93rem; text-decoration: none !important;
  position: relative; transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--nav-text-hover); }
.nav-link.active { background: var(--nav-active-bg); color: #fff; font-weight: 600; }
.nav-link.active::before {
  content: ""; position: absolute; left: -0.9rem; top: 22%; bottom: 22%; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--coral);
}
.nav-link.active .ic { color: var(--coral); }
.nav-link.disabled { opacity: 0.4; pointer-events: none; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.user-card {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.55rem; border-radius: var(--radius);
  text-decoration: none !important; color: #fff; transition: background 0.15s;
}
.user-card:hover, .user-card.active { background: rgba(255, 255, 255, 0.07); color: #fff; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--coral), #e35d8f); color: #fff; font-weight: 700; font-size: 0.8rem; text-transform: uppercase;
}
.user-text { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.74rem; color: var(--nav-section); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-actions { display: flex; gap: 0.35rem; padding: 0 0.2rem; }
.sidebar-actions form { display: inline; }
.sidebar-actions > form:first-child .icon-btn svg { transform: scaleX(-1); } /* Abmelden: Pfeil zeigt in der Sidebar nach links */

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.icon-btn-badge {
  position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--coral); color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 15px; text-align: center;
}
.sidebar .icon-btn.active { background: var(--nav-active-bg); color: #fff; }
.sidebar .icon-btn { color: var(--nav-text); }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.icon-btn:hover { background: var(--bg-surface-elevated); }
.sidebar .icon-btn.icon-btn-agent { color: var(--coral); }
.sidebar .icon-btn.icon-btn-agent:hover { color: #ff8a5f; background: rgba(240, 116, 74, 0.14); }
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 0.34rem 0.6rem;
  border-radius: 6px;
  background: #0d2240;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Touch-Geräte: kein Hover – ein angetippter Tooltip bliebe sonst stehen und verdeckte Eingabefelder */
@media (hover: none) { [data-tooltip]::after { display: none; } }
[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 6px);
  left: 0;
  transform: translateY(-3px);
}
[data-tooltip-pos="bottom"]:hover::after,
[data-tooltip-pos="bottom"]:focus-visible::after {
  transform: translateY(0);
}
.sidebar-actions > form:first-child .icon-btn[data-tooltip]::after {
  left: 0;
  transform: translateY(3px);
}
.sidebar-actions > form:first-child .icon-btn[data-tooltip]:hover::after,
.sidebar-actions > form:first-child .icon-btn[data-tooltip]:focus-visible::after {
  transform: translateY(0);
}
.sidebar-actions > :last-child[data-tooltip]::after,
.sidebar-actions > form:last-child .icon-btn[data-tooltip]::after {
  left: auto;
  right: 0;
  transform: translateY(3px);
}
.sidebar-actions > :last-child[data-tooltip]:hover::after,
.sidebar-actions > :last-child[data-tooltip]:focus-visible::after,
.sidebar-actions > form:last-child .icon-btn[data-tooltip]:hover::after,
.sidebar-actions > form:last-child .icon-btn[data-tooltip]:focus-visible::after {
  transform: translateY(0);
}
.theme-toggle-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle-btn .icon-moon { display: none; }

/* ---- Kopfzeile für kleine Bildschirme */
.topbar { display: none; }
.sidebar-backdrop { display: none; }

/* ---- Anmeldeseiten */
.anon-shell { min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 500px at 50% -10%, var(--accent-light), transparent 70%), var(--bg-main); }
.anon-header { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 2rem; }
.anon-shell .container { max-width: 1100px; }
.anon-shell footer { justify-content: center; }

/* ===================================================================== Seitenkopf */
.page-header { margin-bottom: 1.5rem; }
.page-header:not(.page-header-row) > * + * { margin-top: 0.35rem; }
.page-header h1 { font-size: 1.65rem; }
.page-header > p:first-child { font-size: 0.88rem; }
.page-header p { color: var(--text-secondary); }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.page-title h1 { font-size: 1.65rem; }
.page-title p { color: var(--text-secondary); margin-top: 0.25rem; }

/* Reiter: eine Zeile, bei Platzmangel waagerecht scrollbar */
.tabs {
  display: flex; gap: 0.25rem; margin-top: 1.1rem; border-bottom: 1px solid var(--border-color);
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button[role="tab"] {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.85rem; color: var(--text-secondary); font: inherit; font-weight: 500; font-size: 0.92rem;
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  text-decoration: none !important; border-radius: 6px 6px 0 0; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tabs a:hover, .tabs button[role="tab"]:hover { color: var(--text-primary); background: var(--bg-hover); }
.tabs a.active, .tabs button[role="tab"][aria-selected="true"] {
  color: var(--accent-primary); border-bottom-color: var(--accent-primary); font-weight: 600;
}
.tabs a.folgt { opacity: 0.5; }
.tabs button[role="tab"].tab-action { color: var(--accent-primary); }
.tabs button[role="tab"].tab-action[aria-selected="true"] { background: var(--accent-light); }
/* Fixierte Reiter: bleiben beim Scrollen oben stehen (z. B. Aboverwaltung) */
.tabs.tabs-fixiert {
  position: sticky; top: 0; z-index: 15; margin: -0.25rem 0 1rem; padding-top: 0.35rem;
  background: var(--bg-main);
}

/* Versammlungs-Übersicht: Karten-Tabs & strukturierte Formulare */
.vs-card-heading { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.vs-tabs { margin-top: 0.25rem; margin-bottom: 1rem; }
.vs-panel[hidden] { display: none; }
.vs-empty { color: var(--text-muted); font-size: 0.9rem; margin: 0.25rem 0; }
.vs-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.95rem 1.1rem;
  max-width: 780px; align-items: start;
}
.vs-form-grid .vs-full { grid-column: 1 / -1; }
.vs-form-grid label {
  display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.84rem; font-weight: 500; color: var(--text-secondary);
}
.vs-form-grid input, .vs-form-grid select, .vs-form-grid textarea {
  font: inherit; font-size: 0.93rem; color: var(--text-primary); background: var(--table-input-bg);
  border: 1px solid var(--border-input); border-radius: 8px; padding: 0.55rem 0.75rem; min-height: 40px;
  width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
.vs-form-grid textarea { min-height: 96px; resize: vertical; }
.vs-form-grid input:focus, .vs-form-grid select:focus, .vs-form-grid textarea:focus {
  outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-ring);
}
.vs-form-grid label.check { flex-direction: row; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.vs-form-grid label.check input { width: 17px; height: 17px; min-height: 0; padding: 0; }
.vs-form-actions { grid-column: 1 / -1; padding-top: 0.25rem; }
@media (max-width: 640px) { .vs-form-grid { grid-template-columns: 1fr; } }

.heading-with-icon { display: inline-flex; align-items: center; gap: 0.5rem; }
.md-ic { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.md-ic .md-bg { fill: var(--md-icon-bg); }
.md-ic .md-fg { fill: var(--md-icon-fg); }

/* ===================================================================== Karten */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.card-title {
  font-size: 1.02rem; font-weight: 650; margin-bottom: 1rem; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}
.card-title .hint { margin-top: 0; font-weight: 400; }
.card > .table-responsive:first-child { margin-top: -0.25rem; }

/* Kennzahlen */
.summary-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent-primary); }
.stat-card.stat-success::before { background: var(--success-text); }
.stat-card.stat-danger::before { background: var(--danger-text); }
.stat-card.stat-warning::before { background: var(--coral); }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.stat-subtext { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Startseite: Module */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 0.9rem; }
.module-card {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 1rem 1.1rem; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.module-card:hover { border-color: var(--accent-primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.module-card h3 { font-size: 0.98rem; margin-bottom: 0.3rem; }
.module-card p { color: var(--text-secondary); font-size: 0.88rem; }
.module-card .badge { margin-top: 0.7rem; }

/* Schlüssel-Wert-Listen */
.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 0.55rem 1.25rem; font-size: 0.92rem; }
.kv dt { color: var(--text-muted); }
.kv dd { word-break: break-word; }

/* Akten-Layout (zweispaltig) */
.akte-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 0 1.25rem; align-items: start; }
.eintrag { padding: 0.7rem 0; border-bottom: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 0.25rem; position: relative; padding-right: 2.5rem; }
.eintrag:last-of-type { border-bottom: none; }
.eintrag > form { position: absolute; right: 0; top: 0.6rem; }
.eintrag.inaktiv { opacity: 0.55; }
.eintrag .unter { margin-left: 1rem; font-size: 0.88rem; padding-top: 0.25rem; }

/* ===================================================================== Tabellen */
.tabelle-scroll { overflow-x: auto; max-width: 100%; }
.table-responsive { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-surface); }
.excel-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; text-align: left; }
.excel-table th {
  background: var(--table-header-bg); color: var(--text-muted); font-weight: 600; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border-color);
  white-space: normal; hyphens: manual; position: sticky; top: 0; z-index: 1;
}
.excel-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.excel-table tbody tr:last-child td { border-bottom: none; }
.excel-table tbody tr { transition: background 0.1s; }
.excel-table tbody tr:hover td { background: var(--bg-hover); }
.excel-table td a { font-weight: 500; }
.excel-table .zahl, .excel-table td.zahl, .excel-table th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.excel-table tfoot td { font-weight: 650; background: var(--table-header-bg); border-top: 1px solid var(--border-color); border-bottom: none; }
.excel-table tr.neue-zeile td { background: var(--accent-light); }
.excel-table tr.neue-zeile:hover td { background: var(--accent-light); }
.section-header-row td { background: var(--bg-surface-elevated) !important; color: var(--accent-primary); font-weight: 700; }
.summary-row td { background: var(--table-header-bg) !important; font-weight: 700; }
tr.zeile-leer td { color: var(--text-secondary); }
tr.zeile-leer td:first-child { box-shadow: inset 3px 0 0 var(--coral); }
tr.zeile-fehler td { background: var(--danger-bg); }
tr.zeile-warnung td { color: var(--danger-text); }
tr.inaktiv td { opacity: 0.55; }
tr.kuenftig td { color: var(--accent-primary); }
tr.optional { display: none; }
td.actions { white-space: nowrap; text-align: right; }
/* Lange Werte ohne Leerzeichen (E-Mail, IBAN …) dürfen umbrechen, statt die Tabelle zu verbreitern */
.excel-table td.umbruch { overflow-wrap: anywhere; min-width: 9rem; }
td.actions > *, td.actions form { display: inline-flex; vertical-align: middle; }
td.actions > * + * { margin-left: 0.35rem; }

/* Eingaben in Tabellen: dezent wie Text, sichtbar beim Darüberfahren/Bearbeiten */
.excel-table input:not([type=checkbox]), .excel-table select {
  width: 100%; min-width: 90px; padding: 0.4rem 0.55rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-primary); font: inherit; font-size: 0.9rem; transition: border-color 0.15s, background 0.15s;
}
.excel-table tr:hover input:not([type=checkbox]):not(:disabled), .excel-table tr:hover select:not(:disabled) { border-color: var(--border-input); background: var(--table-input-bg); }
.excel-table input:focus, .excel-table select:focus { outline: none; border-color: var(--accent-primary) !important; background: var(--table-input-bg) !important; box-shadow: 0 0 0 3px var(--accent-ring); }
.excel-table tr.neue-zeile input:not([type=checkbox]), .excel-table tr.neue-zeile select { border-color: var(--border-input); background: var(--table-input-bg); }
.excel-table input:disabled, .excel-table select:disabled { color: var(--text-primary); opacity: 1; -webkit-text-fill-color: var(--text-primary); appearance: none; }
.excel-table .w-s { min-width: 64px; }
.excel-table .w-xs { min-width: 54px; max-width: 76px; }
.excel-table .w-z { min-width: 86px; text-align: right; }

/* ===================================================================== Formulare */
.form-row { display: flex; flex-wrap: wrap; gap: 0.85rem 1rem; align-items: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0.95rem 1.1rem; align-items: end; }
.form-grid label.breit { grid-column: span 2; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }

.form-row label, .form-grid label, .form-stack label, .voll-label {
  display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.84rem; font-weight: 500; color: var(--text-secondary);
}
.label-text { display: inline; }
.req-mark { color: var(--danger-text); font-weight: 700; margin-left: 0.15rem; }
.form-row input, .form-row select, .form-grid input, .form-grid select, .form-stack input, .form-stack select,
textarea.voll, .voll-label input, .restore-form select, .restore-form input, select, textarea {
  font: inherit; font-size: 0.93rem; color: var(--text-primary); background: var(--table-input-bg);
  border: 1px solid var(--border-input); border-radius: 8px; padding: 0.55rem 0.75rem; min-height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input, .form-row select { min-width: min(220px, 100%); max-width: 100%; }
input[type=file] { padding: 0.45rem; }
textarea.voll { width: 100%; min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.form-row input:focus, .form-row select:focus, .form-grid input:focus, .form-grid select:focus, .form-stack input:focus,
textarea:focus, select:focus, .voll-label input:focus {
  outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-ring);
}
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent-primary); cursor: pointer; }
label.check, .form-row label.check, .form-grid label.check, .checkgruppe label.check {
  flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--text-primary); cursor: pointer;
}
.form-row label.check input { min-width: 0; min-height: 0; }
.checkgruppe { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 1rem; align-items: center; font-size: 0.9rem; }
.checkgruppe > span { color: var(--text-muted); font-weight: 500; }
.checkgruppe.breit { grid-column: 1 / -1; margin-top: 0; }
.voll-label { margin-top: 0.9rem; }
.restore-form { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.restore-form select, .restore-form input { min-height: 34px; padding: 0.35rem 0.55rem; font-size: 0.85rem; }

details.neu { margin-top: 1rem; border-top: 1px dashed var(--border-color); padding-top: 0.8rem; }
details.neu summary {
  cursor: pointer; color: var(--accent-primary); font-weight: 600; font-size: 0.9rem; list-style: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
details.neu summary::-webkit-details-marker { display: none; }
details.neu summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-light); font-weight: 700; }
details.neu[open] summary::before { content: "–"; }
details.neu form { margin-top: 0.9rem; }

/* ===================================================================== Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 38px; padding: 0.5rem 1rem; font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.2;
  border-radius: 8px; border: 1px solid var(--border-input); cursor: pointer; text-decoration: none !important;
  white-space: nowrap; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff !important; box-shadow: 0 1px 2px rgba(16, 32, 58, 0.12); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 12px var(--accent-ring); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary) !important; border-color: var(--border-input); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent-primary); }
.btn-sm { min-height: 30px; padding: 0.3rem 0.7rem; font-size: 0.82rem; border-radius: 7px; }
.btn.danger { color: var(--danger-text) !important; border-color: var(--danger-border); background: var(--bg-surface); }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger-text); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

a.btn-link, button.btn-link {
  background: none; border: none; padding: 0.2rem 0.1rem; color: var(--accent-primary); font: inherit; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none;
}
a.btn-link:hover, button.btn-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
button.btn-link.danger, a.btn-link.danger { color: var(--danger-text); }
.eintrag > form .btn-link.danger, td .btn-link.danger { width: 28px; height: 28px; justify-content: center; border-radius: 7px; padding: 0; }
.eintrag > form .btn-link.danger:hover, td .btn-link.danger:hover { background: var(--danger-bg); text-decoration: none; }

/* ===================================================================== Badges & Hinweise */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; vertical-align: middle;
}
.badge-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); }
.badge-info { background: var(--accent-light); color: var(--accent-primary); border-color: transparent; }
.badge-secondary { background: var(--bg-surface-elevated); color: var(--text-secondary); border-color: var(--border-color); }

.alert {
  padding: 0.85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; border: 1px solid; border-left-width: 4px;
  font-size: 0.92rem;
}
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); border-left-color: var(--success-text); }
.alert-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); border-left-color: var(--danger-text); }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); border-left-color: var(--coral); }
.alert ul { padding-left: 1.2rem; margin-top: 0.3rem; }
.alert-inline { color: var(--danger-text); font-size: 0.85rem; }
.hint { color: var(--text-muted); font-size: 0.86rem; margin-top: 0.9rem; }
.auth-links { text-align: center; }
.auth-links a { color: var(--accent-primary); font-weight: 500; }

/* Passwortfeld mit Auge */
.pw-feld { position: relative; display: flex; flex-direction: column; }
.pw-feld input { width: 100%; padding-right: 2.75rem !important; }
.pw-auge {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center;
  justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-muted); cursor: pointer; padding: 0;
}
.pw-auge:hover, .pw-auge:focus-visible { color: var(--text-primary); background: var(--bg-hover, rgba(127,127,127,0.12)); outline: none; }
.kopf { color: var(--text-muted); }
ul.liste { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.92rem; }

/* Verteilungsbalken */
.balken { background: var(--bg-surface-elevated); border-radius: 999px; height: 8px; min-width: 120px; overflow: hidden; }
.balken span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-primary), #35a6c9); border-radius: 999px; }

/* Änderungsprotokoll */
.diff { font-size: 0.84rem; line-height: 1.45; min-width: 300px; word-break: break-word; }
.diff s { color: var(--danger-text); }

/* ===================================================================== Anmeldung & 2FA */
.auth-box {
  max-width: 440px; margin: 3rem auto; background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: 18px; padding: 2rem 2rem 1.75rem; box-shadow: var(--shadow-lg);
}
.auth-box h1 { font-size: 1.45rem; margin-bottom: 1.25rem; }
.auth-box .btn-primary { width: 100%; min-height: 44px; font-size: 0.95rem; }
.code-input { font-size: 1.45rem !important; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.steps { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.7rem; margin: 1rem 0; font-size: 0.93rem; }
.qr { background: #fff; padding: 0.6rem; border-radius: var(--radius); width: 220px; max-width: 100%; margin: 0.7rem 0; border: 1px solid var(--border-color); }
.qr svg { width: 100%; height: auto; display: block; }
.secret { font-size: 0.95rem; word-spacing: 0.3em; }
.codes { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem; margin: 1rem 0 1.25rem; font-size: 1.05rem; }

/* ===================================================================== Responsiv */
@media (max-width: 1000px) {
  .container { padding: 1.25rem 1.1rem 2rem; }
  footer { padding: 1rem 1.1rem; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(8, 17, 31, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 30; }
  body.menu-offen .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .topbar {
    display: flex; align-items: center; gap: 0.6rem; position: sticky; top: 0; z-index: 20;
    padding: 0.55rem 1rem; background: var(--bg-surface); border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
  }
  .topbar .brand-subline { display: none; }
  .tabs.tabs-fixiert { top: 52px; } /* unter der fixierten Kopfleiste (ca. 53 px), 1 px überlappt deren Rand */
  .topbar .logo-img { width: 30px; height: 30px; }
  .topbar-mandant {
    margin-left: auto; font-size: 0.8rem; font-weight: 600; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--accent-light);
  }
  .topbar .navbar-brand { flex-shrink: 0; }
  .topbar-mandant { min-width: 0; flex-shrink: 1; }
  .start-hero-top { display: none; }
  .akte-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html { font-size: 14.5px; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .container form[style*="display:flex"], .container div[style*="display:flex"] { flex-wrap: wrap; }
  .form-grid label.breit { grid-column: span 1; }
  .form-row input, .form-row select { min-width: 0; width: 100%; }
  .form-row label { width: 100%; }
  .card { padding: 1rem; border-radius: var(--radius); }
  .page-header h1 { font-size: 1.4rem; }
  .anon-header { padding: 0.9rem 1rem; }
  .auth-box { margin: 1.5rem auto; padding: 1.5rem 1.25rem; }
  .kv { grid-template-columns: 1fr; gap: 0.1rem; }
  .kv dd { margin-bottom: 0.5rem; }
}
@media print {
  .sidebar, .topbar, footer, .form-row, .tabs { display: none !important; }
  .app-shell { display: block; }
  .card, .auth-box { box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}

/* ===================================================================== Startseite & Listenbausteine */
.page-header-row > :first-child { margin-right: auto; }
.eyebrow { font-size: 0.78rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--coral) !important; }
.hero-card { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero-card > div:nth-child(2) { flex: 1; min-width: min(240px, 100%); }
.hero-card p { color: var(--text-secondary); margin-top: 0.3rem; }
.hero-icon, .module-icon, .liste-icon {
  display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; background: var(--accent-light); color: var(--accent-primary);
}
.hero-icon { width: 56px; height: 56px; }
.stat-link { text-decoration: none !important; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.stat-link:hover { border-color: var(--accent-primary); transform: translateY(-1px); color: inherit; }
.liste-zeile {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0.6rem; margin: 0 -0.6rem; border-radius: var(--radius);
  color: inherit; text-decoration: none !important; transition: background 0.12s;
}
.liste-zeile:hover { background: var(--bg-hover); color: inherit; }
.liste-zeile + .liste-zeile { border-top: 1px solid var(--border-subtle); }
.liste-icon { width: 38px; height: 38px; border-radius: 10px; }
.liste-icon.warn { background: var(--coral-light); color: var(--coral); }
.liste-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.liste-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-text span { font-size: 0.84rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leerzustand { display: flex; align-items: center; gap: 0.85rem; color: var(--text-muted); padding: 0.4rem 0; }
.leerzustand .ic { color: var(--success-text); }
.module-icon { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 0.7rem; }
.module-card.geplant .module-icon { background: var(--bg-surface-elevated); color: var(--text-muted); }
details.technik > summary { cursor: pointer; margin-bottom: 0; list-style: none; }
details.technik > summary::-webkit-details-marker { display: none; }
details.technik > summary::after { content: "anzeigen"; font-size: 0.82rem; font-weight: 500; color: var(--accent-primary); }
details.technik[open] > summary { margin-bottom: 1rem; }
details.technik[open] > summary::after { content: "ausblenden"; }

/* Dunkelmodus: dunkle Schrift auf hellem Hauptknopf (Kontrast) */
[data-theme="dark"] .btn-primary { color: #06121f !important; }
[data-theme="dark"] .btn-primary:hover { color: #06121f !important; }
.excel-table td > a.btn:first-child { white-space: nowrap; }

.mandant-switch.statisch, .mandant-switch.statisch:hover { background: rgba(255, 255, 255, 0.04); cursor: default; }
span.topbar-mandant { color: var(--accent-primary); }

/* Modulkarten: nur fertige sind Links; geplante wirken bewusst nicht klickbar */
a.module-card { display: block; color: inherit; text-decoration: none !important; }
a.module-card:hover { color: inherit; }
.module-card.geplant { opacity: 0.6; background: var(--bg-surface-elevated); border-style: dashed; }
.module-card.geplant:hover { border-color: var(--border-color); box-shadow: none; transform: none; }

/* Buchhaltung */
.negativ { color: var(--danger-text); }
tr.storniert td { color: var(--text-muted); text-decoration: line-through; }
tr.storniert td:last-child, tr.storniert td:nth-last-child(2) { text-decoration: none; }
tr.ueberfaellig td:first-child { color: var(--danger-text); font-weight: 600; }
li.danger { color: var(--danger-text); }

/* ===== Einkauf: Split-View Belegerfassung (wie ea / Arbeitsblatt) ===== */
.ek-ai-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: 9px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}
.ek-ai-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.ek-ai-sub { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.15rem; }
.ek-ai-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }

.ek-status-box {
  padding: 0.55rem 0.85rem;
  border-radius: 7px;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}
.ek-status-box.info { background: var(--accent-light); border-color: var(--accent-primary); color: var(--accent-primary); }
.ek-status-box.ok { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.ek-status-box.warn { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.ek-status-box.error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }

.ek-split-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(340px, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .ek-split-grid { grid-template-columns: 1fr; }
}

.ek-preview-box {
  min-height: 520px;
  height: 68vh;
  background: var(--bg-main);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.35rem;
}
.ek-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.5rem;
  max-width: 320px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.ek-preview-placeholder strong { color: var(--text-primary); font-size: 0.95rem; }

/* ===================================================================== News & Zähler */
.nav-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.nav-count-gray {
  background: rgba(255, 255, 255, 0.14);
  color: var(--nav-text);
}
.nav-count-orange {
  background: var(--coral);
  color: #fff;
}

.news-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.news-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.news-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.35fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 960px) {
  .news-layout { grid-template-columns: 1fr; }
}

.news-list-card { padding: 0; overflow: hidden; }
.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--table-header-bg);
}
.news-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.news-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.news-toolbar-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.news-btn-danger:not(:disabled):hover {
  color: var(--danger-text) !important;
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.news-list {
  display: flex;
  flex-direction: column;
}
.news-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s;
}
.news-item:last-child { border-bottom: none; }
.news-row-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  transition: background 0.12s;
}
.news-row-head:hover { background: var(--bg-hover); }
.news-item.is-open > .news-row-head {
  background: var(--accent-light);
}
.news-item .news-check {
  flex-shrink: 0;
  cursor: pointer;
}
.news-row-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.news-row-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}
.news-row-right {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.news-row-chevron {
  display: inline-flex;
  color: var(--text-muted);
  transition: transform 0.16s ease;
}
.news-row-toggle[aria-expanded="true"] .news-row-chevron {
  transform: rotate(90deg);
  color: var(--accent-primary);
}
.news-row-body {
  padding: 0.9rem 1.2rem 1.1rem 2.95rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}
.news-row-body[hidden] { display: none; }
.news-row-content {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.news-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}
.news-row-actions-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.news-item-icon {
  display: inline-flex;
  align-items: center;
  margin-top: 0.15rem;
  flex-shrink: 0;
  color: var(--text-muted);
}
.news-list-empty {
  justify-content: flex-start;
  padding: 1rem;
}
.news-list-empty .ic,
.news-reader-empty .ic,
.news-item-icon .ic {
  color: var(--text-muted);
}
.news-item-link {
  flex: 1;
  min-width: 0;
  text-decoration: none !important;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.news-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.news-item-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-item.is-unread .news-item-title {
  font-weight: 700;
}
.news-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}
.news-item-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.news-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.news-reader-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.news-reader-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.news-reader-badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.news-reader-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.news-reader-meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.news-reader-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.news-reader-body {
  padding: 1.15rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}
.news-reader-footer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}
.news-reader-empty {
  margin: auto;
}

/* ===================================================================== Startseite (Hero, Dashboard & Leistungsportfolio) */
.start-hero {
  position: relative;
  overflow: hidden;
  padding: 1.65rem 1.85rem;
  color: #ffffff;
  background: radial-gradient(1000px 460px at 78% 18%, #17447a 0%, transparent 62%), linear-gradient(155deg, #0d2240 0%, #0a1a33 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 42px rgba(10, 26, 51, 0.22);
}
[data-theme="dark"] .start-hero {
  background: radial-gradient(1000px 460px at 78% 18%, #123663 0%, transparent 62%), linear-gradient(155deg, #08111f 0%, #050b16 100%);
}
.start-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--coral) 55%, #4fb0dc 100%);
}
.start-hero-linien {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.start-hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.start-hero-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.start-hero-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  padding: 6px;
}
.start-hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.start-hero-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.start-hero-appname {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1;
  width: max-content;
}
.start-hero-subline {
  font-size: 1.35rem;
  font-weight: 500;
  color: #7ccaf0;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-top: 0.22rem;
  width: max-content;
}
.start-hero-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.start-hero-welcome-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr minmax(280px, 0.85fr);
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 960px) {
  .start-hero-welcome-grid {
    grid-template-columns: 1fr;
  }
}
.start-hero-welcome h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-top: 0.2rem;
  color: #ffffff;
}
.start-hero .eyebrow {
  color: #ff9872 !important;
}
.start-hero-context {
  color: #c3d2e6;
  margin-top: 0.35rem;
  font-size: 0.95rem;
}
.start-hero-context strong {
  color: #ffffff;
}
.start-hero-context a {
  color: #7ccaf0;
}
.start-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.oa-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #e8eef7 !important;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none !important;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.oa-quick-pill:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}
.oa-quick-pill.primary {
  background: linear-gradient(135deg, var(--coral), #e25e34);
  border-color: rgba(255, 160, 122, 0.5);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(240, 116, 74, 0.32);
}
.oa-hero-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #dce7f5;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.oa-hero-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ff8a5f;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.oa-hero-trigger .ic {
  color: #ff8a5f;
}
.oa-hero-trigger kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  color: #b9d3f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Live-Cockpit im Hero (analog zum Homepage-Mockup) */
.start-hero-cockpit {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}
.cockpit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.cockpit-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff9872;
}
.cockpit-title {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
  margin-top: 0.1rem;
}
.cockpit-score {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8eef7;
}
.punkt { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.punkt.gruen { background: #3cc48a; }
.punkt.orange { background: #f0744a; }
.punkt.rot { background: #ef4444; }
.cockpit-live-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.42rem 0.65rem;
  margin-bottom: 0.55rem;
  border-radius: 9px;
  background: rgba(8, 18, 34, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
}
.cockpit-info-monat {
  font-weight: 700;
  color: #ff9872;
  letter-spacing: 0.01em;
}
.cockpit-info-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  color: #c3d2e6;
}
.cockpit-info-pills strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.ci-pill.ein strong { color: #7ccaf0; }
.ci-pill.aus strong { color: #ff9872; }
.cockpit-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 128px;
  padding: 14px 12px 8px;
  border-radius: 12px;
  background: rgba(8, 18, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.cockpit-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  position: relative;
  cursor: pointer;
  outline: none;
}
.cockpit-bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.cockpit-col.aktiv .cockpit-bar-track {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 152, 114, 0.38);
}
.cockpit-bar {
  display: block;
  flex: 1;
  border-radius: 4px 4px 1px 1px;
  transition: height 0.25s ease, transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.cockpit-bar.bar-ein {
  background: linear-gradient(180deg, #5cc8f5 0%, #1b7fae 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 8px rgba(10, 26, 51, 0.32);
}
.cockpit-bar.bar-aus {
  background: linear-gradient(180deg, #ff966e 0%, #f0744a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 8px rgba(10, 26, 51, 0.32);
}
.cockpit-bar.leer {
  opacity: 0.22;
  box-shadow: none;
}
.cockpit-col:hover .cockpit-bar,
.cockpit-col.is-hovered .cockpit-bar,
.cockpit-col:focus .cockpit-bar {
  filter: brightness(1.18);
}
.cockpit-col:hover .cockpit-bar.bar-ein {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 12px rgba(92, 200, 245, 0.55);
}
.cockpit-col:hover .cockpit-bar.bar-aus {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 12px rgba(240, 116, 74, 0.55);
}
.tt-ein { color: #7ccaf0 !important; }
.tt-aus { color: #ff9872 !important; }
.cockpit-col small {
  font-size: 0.66rem;
  font-weight: 600;
  color: #b7c8df;
  line-height: 1;
  transition: color 0.15s;
}
.cockpit-col:hover small,
.cockpit-col.is-hovered small {
  color: #ffffff;
}
.cockpit-col.aktiv small {
  color: #ff9872;
  font-weight: 700;
}
.cockpit-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 168px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #081223;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  color: #e8eef7;
  font-size: 0.74rem;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  z-index: 30;
  white-space: nowrap;
}
.cockpit-col:first-child .cockpit-tooltip,
.cockpit-col:nth-child(2) .cockpit-tooltip {
  left: 0;
  transform: translateX(0) translateY(4px);
}
.cockpit-col:last-child .cockpit-tooltip,
.cockpit-col:nth-last-child(2) .cockpit-tooltip {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}
.cockpit-col:hover .cockpit-tooltip,
.cockpit-col:focus .cockpit-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.cockpit-col:first-child:hover .cockpit-tooltip,
.cockpit-col:nth-child(2):hover .cockpit-tooltip,
.cockpit-col:last-child:hover .cockpit-tooltip,
.cockpit-col:nth-last-child(2):hover .cockpit-tooltip {
  transform: translateX(0) translateY(0);
}
.cockpit-tooltip strong {
  display: block;
  color: #ff9872;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.cockpit-tooltip div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.cockpit-tooltip span {
  color: #a9bdd6;
}
.cockpit-tooltip b {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.cockpit-tooltip .tt-sep {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}
.cockpit-hint {
  font-size: 0.7rem;
  color: #8fa7c4;
}
.cockpit-foot {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  font-size: 0.74rem;
  color: #b9cde3;
}
.leg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
}
.leg-dot.ein { background: #4fb0dc; }
.leg-dot.aus { background: #f0744a; }
.cockpit-saldo {
  margin-left: auto;
  color: #e8eef7;
}

.start-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 0 1.25rem;
  align-items: start;
}
.start-card {
  display: flex;
  flex-direction: column;
}
.start-card-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.start-card-heading .ic {
  color: var(--accent-primary);
}
.start-news-item.ungelesen strong {
  color: var(--text-primary);
}
.news-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--coral);
  margin-right: 0.35rem;
  vertical-align: middle;
}

.termin-datum {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.termin-datum.warn {
  background: var(--coral-light);
  color: var(--coral);
}
.termin-tag {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.termin-monat {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Leistungsportfolio */
.portfolio-section {
  padding: 1.4rem 1.5rem;
}
.portfolio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1120px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.portfolio-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  color: inherit;
  text-decoration: none !important;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
a.portfolio-card:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}
.portfolio-card.inaktiv {
  opacity: 0.72;
}
.portfolio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.portfolio-card-head .module-icon {
  margin-bottom: 0;
}
.portfolio-arrow {
  color: var(--text-muted);
  transition: transform 0.15s, color 0.15s;
}
a.portfolio-card:hover .portfolio-arrow {
  color: var(--accent-primary);
  transform: translateX(2px);
}
.portfolio-card h3 {
  font-size: 0.98rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.portfolio-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.48;
  flex: 1;
}
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-subtle);
}
.portfolio-tag {
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .start-hero {
    padding: 1.15rem 1.15rem;
  }
  .start-hero-logo-wrap {
    width: 48px;
    height: 48px;
  }
  .start-hero-appname {
    font-size: 1.72rem;
  }
  .start-dashboard-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================== Geführte Tour */
.tour-spot {
  position: fixed; z-index: 1000; border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--coral), 0 0 0 9999px rgba(8, 17, 31, 0.55);
  transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
  pointer-events: none;
}
.tour-sperre { position: fixed; inset: 0; z-index: 999; background: transparent; }
.tour-sperre[hidden] { display: none; }
.tour-spot.ohne-ziel { box-shadow: 0 0 0 9999px rgba(8, 17, 31, 0.55); }
.tour-spot[hidden], .tour-pop[hidden] { display: none; }
.tour-pop {
  position: fixed; z-index: 1001; width: min(340px, calc(100vw - 24px));
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1rem 1.1rem 0.9rem;
  transition: left 0.2s ease, top 0.2s ease;
}
.tour-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.tour-zaehler { font-size: 0.75rem; font-weight: 600; color: var(--coral); letter-spacing: 0.02em; }
.tour-x { background: none; border: 0; color: var(--text-muted); font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.tour-x:hover { color: var(--text-primary); }
.tour-titel { margin: 0 0 0.4rem; font-size: 1.05rem; }
.tour-text { margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }
.tour-aus { display: flex; align-items: center; gap: 0.45rem; margin: -0.2rem 0 0.8rem; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; user-select: none; }
.tour-aus input { margin: 0; width: 15px; height: 15px; accent-color: var(--accent-primary); cursor: pointer; }
.tour-fuss { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.tour-nav { display: flex; gap: 0.4rem; }
.tour-btn { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.tour-btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 1000px) {
  body.tour-aktiv .sidebar-backdrop { opacity: 0; pointer-events: none; }
  body.tour-aktiv .sidebar { transition: none; }
}

/* ===================================================================== Funktionen (Freischaltung) */
.excel-table td.mitte, .excel-table th.mitte { text-align: center; }
.excel-table td.rechts, .excel-table th.rechts { text-align: right; font-variant-numeric: tabular-nums; }
.excel-table tr.gruppe td { background: var(--bg-surface-elevated); color: var(--text-secondary); font-size: 0.82rem; letter-spacing: 0.02em; }
.excel-table tr.aktiv td { background: var(--accent-light); }
.funktions-matrix td .badge { margin-left: 0.3rem; }
.btn-danger { background: var(--danger-text); color: #fff; border: 1px solid var(--danger-text); }
.btn-danger:hover { filter: brightness(0.92); }

/* Testdaten: Ladehinweis */
.td-laeuft { display: flex; align-items: center; gap: 0.7rem; margin-top: 1rem; padding: 0.8rem 1rem; border-radius: var(--radius);
  background: var(--accent-light); color: var(--accent-primary); font-weight: 500; font-size: 0.92rem; }
.td-laeuft[hidden] { display: none; }
.td-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent;
  animation: td-dreh 0.8s linear infinite; flex: none; }
@keyframes td-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .td-spinner { animation-duration: 2.4s; } }

/* Statuspunkt an „KI-Suche“: grün = KI eingerichtet, rot = nicht eingerichtet */
.ki-status { width: 9px; height: 9px; border-radius: 50%; margin-left: auto; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15); }
.ki-status.an { background: #22c55e; }
.ki-status.aus { background: #ef4444; }

/* ===================================================================== Dashboard: Kästchen anordnen */
.dashboard-leiste { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0 0.75rem; }
.dashboard-titel { font-size: 1.15rem; margin: 0; color: var(--text-primary); }
.dashboard-knoepfe { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.dashboard-knoepfe [hidden] { display: none; }
.dashboard-hilfe { margin: 0; }
/* Breite Kästchen gehen über alle Spalten (Wahl je Benutzer, siehe dashboard.js) */
.start-dashboard-grid > [data-kachel][data-breit] { grid-column: 1 / -1; }
/* Ausblenden: .start-card setzt display:flex – [hidden] muss gewinnen */
.start-dashboard-grid > [data-kachel][hidden] { display: none !important; }
.dashboard-ablage { background: var(--bg-surface-elevated); border: 1px dashed var(--border-input); border-radius: var(--radius-lg);
  padding: 0.85rem 1rem; margin: 0 0 1.25rem; }
.dashboard-ablage[hidden] { display: none; }
.dashboard-ablage-titel { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.55rem; }
.dashboard-ablage-liste { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dashboard-ablage-eintrag { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.75rem;
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.875rem; color: var(--text-primary); }
.dashboard-ablage-eintrag:hover { border-color: var(--accent-primary); }
.dashboard-ablage-aktion { color: var(--accent-primary); font-weight: 600; }
[data-theme="dark"] .dashboard-ablage { background: var(--bg-surface-elevated); border-color: var(--border-input); }
[data-theme="dark"] .dashboard-ablage-titel { color: var(--text-muted); }
[data-theme="dark"] .dashboard-ablage-eintrag { border-color: var(--border-color); }
/* Lückenlos (dashboard.js setzt je Kästchen grid-row-end: span n) */
.start-dashboard-grid.masonry { grid-auto-rows: 4px; align-items: start; }
.start-dashboard-grid.anordnen > [data-kachel] { outline: 2px dashed var(--accent-primary); outline-offset: 3px; cursor: grab; }
.start-dashboard-grid.anordnen > [data-kachel].wird-gezogen { opacity: 0.45; cursor: grabbing; }
.dashboard-griff { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin: -0.2rem 0 0.8rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color); }
.dashboard-griff-titel { flex: 1; font-size: 0.82rem; font-weight: 600; color: var(--accent-primary); user-select: none; }
.dashboard-griff .btn { min-width: 34px; padding-left: 0.5rem; padding-right: 0.5rem; }
@media (prefers-reduced-motion: no-preference) { .start-dashboard-grid > [data-kachel] { transition: opacity 0.15s; } }
.anon-recht a { color: inherit; } .anon-recht { margin-left: 1rem; }

/* ===================================================================== Visuelle KPIs, ObjectAgent, Objekt-Galerie & Kanban */
.stat-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent-primary);
}
.stat-icon-box.warn {
  background: var(--coral-light);
  color: var(--coral);
}
.stat-icon-box.ok {
  background: var(--success-bg);
  color: var(--success-text);
}
.stat-donut {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: conic-gradient(var(--accent-primary) var(--pct, 0%), var(--bg-surface-elevated) 0);
  position: relative;
}
.stat-donut::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-surface);
}
.stat-donut span {
  position: relative;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.stat-meter {
  margin-top: 0.7rem;
  height: 6px;
  min-width: 0;
}
.stat-meter span.warn {
  background: linear-gradient(90deg, var(--coral), #ff9b75);
}
.stat-meter span.ok {
  background: linear-gradient(90deg, var(--success-text), #3cc48a);
}

/* ObjectAgent Dashboard-Kachel */
.oa-dashboard-card {
  position: relative;
  border-color: rgba(27, 127, 174, 0.35);
  background: linear-gradient(155deg, var(--accent-light) 0%, transparent 45%), var(--bg-surface);
}
.oa-briefing-lead {
  font-size: 0.89rem;
  color: var(--text-secondary);
  margin: -0.2rem 0 0.65rem;
  line-height: 1.45;
}
.oa-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}
.oa-mini-action {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.oa-mini-action:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary) !important;
  background: var(--bg-surface);
}

/* ObjectAgent Panel in Technik & Einkauf */
.oa-agent-panel {
  border: 1.5px solid rgba(27, 127, 174, 0.38);
  background: linear-gradient(140deg, var(--accent-light) 0%, transparent 50%), var(--bg-surface);
}
.oa-triage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 0.85rem;
}
.oa-triage-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.oa-triage-box small {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.oa-triage-box strong {
  font-size: 0.96rem;
  color: var(--text-primary);
}
.oa-triage-actions {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Objekt-Galerie (objekte.html) */
.inline-search-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-input);
  border-radius: 9px;
  padding: 0.2rem 0.35rem 0.2rem 0.7rem;
  box-shadow: var(--shadow-sm);
}
.inline-search-bar .ic {
  color: var(--text-muted);
}
.inline-search-bar input {
  border: none !important;
  background: transparent !important;
  min-height: 32px !important;
  min-width: 210px !important;
  padding: 0.2rem 0.3rem !important;
  box-shadow: none !important;
}
.objekt-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.15rem;
}
.objekt-visual-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.objekt-visual-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.objekt-visual-banner {
  position: relative;
  padding: 1.15rem 1.25rem 1.05rem;
  color: #ffffff;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.objekt-visual-banner.weg {
  background: radial-gradient(320px 140px at 85% 20%, #1b7fae 0%, transparent 70%), linear-gradient(145deg, #0d2240 0%, #143661 100%);
}
.objekt-visual-banner.miete {
  background: radial-gradient(320px 140px at 85% 20%, #d4623b 0%, transparent 70%), linear-gradient(145deg, #132b4c 0%, #1c446e 100%);
}
.objekt-visual-banner.mit-foto {
  min-height: 168px;
  max-height: 204px;
  aspect-ratio: 16 / 9;
}
.objekt-visual-banner.mit-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.42) 0%, rgba(10, 22, 40, 0.14) 42%, rgba(10, 22, 40, 0.86) 100%);
}
.objekt-visual-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transition: transform 0.28s ease;
}
.objekt-visual-card:hover .objekt-visual-photo {
  transform: scale(1.03);
}
.objekt-arch-svg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 150px;
  height: 85px;
  color: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.objekt-visual-badges {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.objekt-type-pill, .objekt-year-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.objekt-visual-banner.mit-foto .objekt-type-pill,
.objekt-visual-banner.mit-foto .objekt-year-pill {
  background: rgba(13, 34, 64, 0.65);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
}
.objekt-visual-title {
  position: relative;
  z-index: 2;
  margin-top: 0.85rem;
}
.objekt-visual-title h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.15rem;
  overflow-wrap: anywhere;
}
.objekt-visual-title span {
  font-size: 0.82rem;
  color: #c7d7eb;
}
.objekt-visual-banner.mit-foto .objekt-visual-title h3,
.objekt-visual-banner.mit-foto .objekt-visual-title span {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.objekt-visual-banner.mit-foto .objekt-visual-title span {
  color: #e8f0fa;
}
.objekt-visual-body {
  padding: 0.9rem 1.25rem;
  background: var(--bg-surface);
}
.objekt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.objekt-kpi-strip small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.objekt-kpi-strip strong {
  font-size: 1rem;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.objekt-kpi-strip strong.accent {
  font-size: 0.86rem;
  color: var(--accent-primary);
}

/* Objektakte: Kopfbereich & Bildergalerie */
.objekt-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.objekt-header-thumb {
  width: 68px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: block;
}
.objekt-header-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.objekt-fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 0.95rem;
  margin-bottom: 1rem;
}
.objekt-foto-card,
.objekt-foto-radio-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.objekt-foto-card.ist-titelfoto,
.objekt-foto-radio-card.ist-titelfoto {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-ring);
}
.objekt-foto-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0d2240;
  overflow: hidden;
}
.objekt-foto-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.objekt-foto-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.objekt-foto-body {
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  justify-content: space-between;
}
.objekt-foto-titel {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.objekt-foto-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.objekt-foto-actions form {
  margin: 0;
}
.objekt-foto-upload-form {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}
.objekt-foto-radio-card {
  cursor: pointer;
}
.objekt-foto-radio-card.objekt-foto-keins {
  justify-content: center;
  min-height: 72px;
}
.objekt-foto-radio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
}
.objekt-foto-radio-row input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
}
.objekt-foto-radio-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .objekt-gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .objekt-visual-banner {
    padding: 0.95rem 1rem 0.85rem;
    min-height: 114px;
  }
  .objekt-visual-banner.mit-foto {
    min-height: 144px;
    max-height: 172px;
    aspect-ratio: 16 / 9;
  }
  .objekt-visual-title h3 {
    font-size: 1.04rem;
    line-height: 1.25;
  }
  .objekt-visual-title span {
    font-size: 0.79rem;
  }
  .objekt-visual-body {
    padding: 0.75rem 1rem;
  }
  .objekt-fotos-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr));
    gap: 0.7rem;
  }
  .objekt-foto-body {
    padding: 0.55rem 0.65rem;
  }
}

/* Technik Kanban-Board */
.tk-kanban-col {
  background: var(--bg-surface-elevated);
  border-top: 3px solid var(--accent-primary);
}
.tk-kanban-col.tk-col-neu { border-top-color: var(--coral); }
.tk-kanban-col.tk-col-pruefung { border-top-color: #eab308; }
.tk-kanban-col.tk-col-beauftragt { border-top-color: var(--success-text); }
.tk-kanban-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
}
.tk-col-neu .tk-kanban-dot { background: var(--coral); }
.tk-col-pruefung .tk-kanban-dot { background: #eab308; }
.tk-col-beauftragt .tk-kanban-dot { background: var(--success-text); }
.tk-kanban-ticket {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.85rem !important;
  margin: 0 0 0.6rem 0 !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.tk-kanban-ticket:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow);
  background: var(--bg-surface);
}
.tk-kanban-ticket + .tk-kanban-ticket {
  border-top: 1px solid var(--border-color);
}
.tk-ticket-agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.73rem !important;
  font-weight: 600;
  color: var(--accent-primary) !important;
}

/* ObjectAgent Command Palette Modal (⌘K) */
.oa-cmd-modal {
  width: min(640px, calc(100vw - 28px));
  margin: 10vh auto auto;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.oa-cmd-modal::backdrop {
  background: rgba(6, 13, 26, 0.58);
  backdrop-filter: blur(4px);
}
.oa-cmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, #0d2240, #17447a);
  color: #ffffff;
}
.oa-cmd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
}
.oa-cmd-brand .ic { color: #ff8a5f; }
.oa-cmd-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.oa-cmd-form {
  padding: 1rem 1.15rem 1.15rem;
}
.oa-cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px solid var(--border-input);
  border-radius: 12px;
  padding: 0.35rem 0.4rem 0.35rem 0.85rem;
  background: var(--bg-surface);
}
.oa-cmd-input-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.oa-cmd-input-wrap input {
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.4rem 0 !important;
  min-height: 34px !important;
}
.oa-cmd-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.oa-cmd-chip {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary) !important;
  text-decoration: none !important;
}
.oa-cmd-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary) !important;
}

/* Modal: Neues Objekt (Formular vs. CSV-/Excel-Import) */
.obj-create-modal {
  width: min(620px, calc(100vw - 28px));
}
.obj-create-body {
  padding: 1.15rem 1.25rem 1.2rem;
}
.obj-create-lead {
  margin: 0 0 0.95rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.obj-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}
.obj-choice-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.05rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  color: var(--text-primary) !important;
  text-decoration: none !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.obj-choice-card:hover,
.obj-choice-card:focus-visible {
  border-color: var(--accent-primary);
  box-shadow: 0 6px 18px rgba(13, 34, 64, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.obj-choice-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 68, 122, 0.1);
  color: var(--accent-primary);
}
[data-theme="dark"] .obj-choice-icon {
  background: rgba(255, 138, 95, 0.15);
}
.obj-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
}
.obj-choice-text strong {
  font-size: 0.98rem;
  color: var(--text-primary);
}
.obj-choice-text span {
  font-size: 0.82rem;
  line-height: 1.42;
  color: var(--text-secondary);
}
.obj-choice-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-top: 0.2rem;
}
.obj-create-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* ===================================================================== Modul-Hero, Umschalter (Kacheln / Liste) & Karten-System */
[data-view-target][hidden] {
  display: none !important;
}

.mod-hero {
  position: relative;
  overflow: hidden;
  padding: 1.45rem 1.7rem 1.25rem;
  margin-bottom: 1.3rem;
  color: #ffffff;
  background: radial-gradient(900px 420px at 80% 15%, #17447a 0%, transparent 62%), linear-gradient(155deg, #0d2240 0%, #0a1a33 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(10, 26, 51, 0.20);
}
[data-theme="dark"] .mod-hero {
  background: radial-gradient(900px 420px at 80% 15%, #123663 0%, transparent 62%), linear-gradient(155deg, #08111f 0%, #050b16 100%);
}
.mod-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--coral) 55%, #4fb0dc 100%);
}
.mod-hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mod-hero-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.mod-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff9872;
  margin-bottom: 0.25rem;
}
.mod-hero h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.mod-hero-sub {
  color: #c3d2e6;
  font-size: 0.92rem;
  margin-top: 0.3rem;
  max-width: 56rem;
  line-height: 1.5;
}
.mod-hero-sub strong {
  color: #ffffff;
}
.mod-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.btn-ghost-hell {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff !important;
}
.btn-ghost-hell:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Segmented Control: Kacheln <-> Liste (rechts im Kachelbereich) */
.view-area-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.view-area-bar.with-tabs {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.view-area-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.view-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  gap: 2px;
}
.mod-hero .view-switcher {
  background: rgba(8, 17, 31, 0.48);
  border-color: rgba(255, 255, 255, 0.18);
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.72rem;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.mod-hero .view-btn {
  color: #b9cde3;
}
.view-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}
.mod-hero .view-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.view-btn.active {
  background: var(--coral);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(240, 116, 74, 0.38);
}

/* Spaltenfilter & Pagination (20, 50, 100, Alle) oben und unten */
.table-filter-row th {
  padding: 0.35rem 0.5rem !important;
  background: var(--bg-surface-elevated) !important;
  border-bottom: 1px solid var(--border-color);
}
.col-filter-input {
  width: 100% !important;
  min-width: 72px;
  min-height: 28px !important;
  padding: 0.22rem 0.48rem !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  border-radius: 6px !important;
  border: 1px solid var(--border-input) !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}
.col-filter-input:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px var(--accent-ring) !important;
  outline: none !important;
}
.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.list-pager[hidden] {
  display: none !important;
}
.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  font-weight: 500;
  font-size: 0.82rem;
}
.pager-size-select {
  width: auto !important;
  min-height: 28px !important;
  padding: 0.18rem 0.45rem !important;
  font-size: 0.81rem !important;
  border-radius: 6px !important;
}
.pager-info {
  font-size: 0.81rem;
  color: var(--text-secondary);
}
.pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
}
.pager-page {
  padding: 0 0.45rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-primary);
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Belege-Upload-Dropzone (wie Arbeitsblatt) */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.3rem 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 400;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.upload-dropzone-icon {
  color: var(--accent-primary);
}
.upload-dropzone small {
  color: var(--text-muted, var(--text-secondary));
  font-size: 0.77rem;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(23, 68, 122, 0.06);
}
[data-theme="dark"] .upload-dropzone:hover,
[data-theme="dark"] .upload-dropzone.dragover {
  background: rgba(255, 138, 95, 0.1);
}
.upload-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.upload-file {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.83rem;
}
.upload-file-name {
  flex: 1;
  word-break: break-all;
}
.upload-file-name small,
.upload-file-msg {
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.upload-file-error .upload-file-msg {
  color: var(--danger-text, #dc2626);
}

/* Such- & Filterleiste im Modul-Hero */
.mod-hero-toolbar {
  position: relative;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mod-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.mod-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  color: #12203a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 0.22rem 0.32rem 0.22rem 0.75rem;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .mod-search-form {
  background: #111c2e;
  color: #e8eef7;
  border-color: rgba(255, 255, 255, 0.18);
}
.mod-search-form .ic {
  color: var(--text-muted);
}
.mod-search-form input {
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: inherit !important;
  min-height: 32px !important;
  padding: 0.2rem 0.3rem !important;
  box-shadow: none !important;
  font-size: 0.9rem !important;
}
.mod-search-clear {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 0.35rem;
  text-decoration: none !important;
}
.mod-select {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 9px !important;
  min-height: 36px !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.86rem !important;
}
.mod-select option {
  color: #12203a;
  background: #ffffff;
}

/* Reiter innerhalb von .mod-hero */
.mod-hero .tabs {
  position: relative;
  border-bottom-color: rgba(255, 255, 255, 0.15);
  margin-top: 1rem;
  margin-bottom: -1.25rem;
}
.mod-hero .tabs a {
  color: #b9cde3;
}
.mod-hero .tabs a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.mod-hero .tabs a.active {
  color: #ffffff;
  border-bottom-color: var(--coral);
  background: rgba(255, 255, 255, 0.07);
}
.mod-hero p {
  color: #c3d2e6;
}
.mod-hero p a {
  color: #7ccaf0;
}

/* Personen-, Rechnungs-, Aufgaben- & Dokumenten-Kacheln */
.person-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1rem;
}
.person-visual-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
a.person-visual-card:hover, .person-visual-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.person-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #1b7fae, #0d2240);
  box-shadow: 0 4px 10px rgba(27, 127, 174, 0.25);
}
.person-avatar.firma {
  background: linear-gradient(135deg, var(--coral), #c84b20);
  box-shadow: 0 4px 10px rgba(240, 116, 74, 0.25);
}
.person-card-head {
  flex: 1;
  min-width: 0;
}
.person-card-head h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.person-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}
/* Lange Badges (z. B. „Mietvertrag / Mietvertragsanpassungen“) und Dateinamen bleiben in der Kachel */
.person-card-badges .badge { max-width: 100%; border-radius: 0.7rem; white-space: normal; overflow-wrap: anywhere; text-align: left; line-height: 1.35; padding-top: 0.2rem; padding-bottom: 0.2rem; }
.person-card-head h3 { overflow-wrap: anywhere; }
.person-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.person-card-meta > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.person-card-meta .ic {
  color: var(--text-muted);
}
.ek-tile-betrag {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Buchhaltung & Versammlungen Objekt-Karten */
.bh-objekt-card {
  border-top: 3px solid var(--accent-primary);
}
.bh-objekt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.bh-objekt-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.bh-objekt-title h3 {
  font-size: 1.12rem;
  margin: 0;
}
.bh-kreise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 0.9rem;
}
.bh-kreis-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.bh-kreis-tile:hover {
  transform: translateY(-2px);
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow);
  color: inherit;
}
.bh-kreis-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bh-kreis-arrow {
  color: var(--text-muted);
  transition: transform 0.15s, color 0.15s;
}
.bh-kreis-tile:hover .bh-kreis-arrow {
  color: var(--accent-primary);
  transform: translateX(2px);
}
.bh-kreis-tile h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.bh-kreis-kpi {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
}
.bh-kreis-kpi small {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.bh-kreis-kpi strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.bh-kreis-kpi strong.warn {
  color: var(--coral);
}
.bh-kreis-kpi strong.ok {
  color: var(--success-text);
}
.bh-setup-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-color);
}

/* ---------- Abrechnungen: geführter Jahresablauf ---------- */
.abr-jahrwahl { display: flex; align-items: center; gap: 0.45rem; }
.abr-jahrwahl label { font-size: 0.82rem; opacity: 0.85; }
.abr-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.abr-intro h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.abr-ablauf { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0; padding-left: 1.2rem; }
.abr-ablauf li { font-size: 0.92rem; }
.abr-kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.abr-kz { background: var(--success-bg); border: 1px solid var(--success-border); border-radius: 10px; padding: 0.55rem 0.7rem; display: flex; flex-direction: column; }
.abr-kz-wert { font-size: 1.35rem; font-weight: 700; color: var(--success-text); line-height: 1.1; }
.abr-kz-label { font-size: 0.78rem; color: var(--text-secondary); }
.abr-kz-arbeit { background: rgba(230, 160, 40, 0.10); border-color: rgba(230, 160, 40, 0.35); }
.abr-kz-arbeit .abr-kz-wert { color: #b7791f; }
.abr-kz-offen { background: var(--bg-surface-elevated); border-color: var(--border-color); }
.abr-kz-offen .abr-kz-wert { color: var(--text-secondary); }
.abr-kz-breit { grid-column: 1 / -1; background: var(--accent-light); border-color: var(--accent-ring); }
.abr-kz-breit .abr-kz-wert { color: var(--accent-primary); }
.abr-objekt-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.abr-objekt-head h3 a { color: inherit; text-decoration: none; }
.abr-objekt-head h3 a:hover { text-decoration: underline; }
.abr-fortschritt { display: flex; align-items: center; gap: 0.6rem; min-width: 200px; }
.abr-fortschritt-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--border-subtle); overflow: hidden; }
.abr-fortschritt-bar span { display: block; height: 100%; background: var(--success-text); border-radius: 99px; }
.abr-schritte { list-style: none; margin: 0; padding: 0; position: relative; }
.abr-schritt { display: flex; gap: 0.9rem; position: relative; padding-bottom: 1rem; }
.abr-schritt:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--border-color); }
.abr-nr { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  background: var(--bg-surface-elevated); color: var(--text-secondary); border: 2px solid var(--border-color); position: relative; z-index: 1; }
.abr-schritt-fertig .abr-nr { background: var(--success-text); border-color: var(--success-text); color: #fff; }
.abr-schritt-arbeit .abr-nr, .abr-schritt-geprueft .abr-nr { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; }
.abr-schritt-na .abr-nr { opacity: 0.5; }
.abr-schritt-body { flex: 1; min-width: 0; background: var(--bg-hover); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 0.7rem 0.9rem; }
.abr-schritt-fertig .abr-schritt-body { background: transparent; }
.abr-schritt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.abr-schritt-kopf h4 { margin: 0; font-size: 0.98rem; }
.abr-schritt-text { margin: 0.3rem 0 0.6rem; font-size: 0.86rem; color: var(--text-secondary); }
.abr-schritt-aktion { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.abr-stand { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.76rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 99px; white-space: nowrap; }
.abr-stand-fertig { background: var(--success-bg); color: var(--success-text); }
.abr-stand-geprueft { background: var(--accent-light); color: var(--accent-primary); }
.abr-stand-arbeit { background: rgba(230, 160, 40, 0.14); color: #b7791f; }
.abr-stand-offen { background: var(--bg-surface-elevated); color: var(--text-secondary); border: 1px solid var(--border-color); }
.abr-stand-na { background: transparent; color: var(--text-muted); border: 1px dashed var(--border-color); }
.abr-mieter { margin-top: 0.2rem; }
.abr-extern { margin-top: 0.25rem; border-top: 1px solid var(--border-subtle); padding-top: 0.7rem; }
.abr-extern summary { cursor: pointer; font-size: 0.88rem; }
[data-theme="dark"] .abr-stand-arbeit, [data-theme="dark"] .abr-kz-arbeit .abr-kz-wert { color: #f0b44c; }
@media (max-width: 760px) {
  .abr-intro { grid-template-columns: 1fr; }
  .abr-ablauf { flex-direction: column; }
}

/* ---------- Portal (Eigentümer / Mieter) ---------- */
.pt-kopf { margin-bottom: 1.1rem; }
.pt-zurueck { display: inline-block; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--accent-primary); text-decoration: none; }
.pt-zurueck:hover { text-decoration: underline; }
.pt-kopf-zeile { display: flex; gap: 0.85rem; align-items: flex-start; }
.pt-kopf-zeile h1 { margin: 0; font-size: 1.5rem; }
.pt-kopf-zeile p { margin: 0.25rem 0 0; color: var(--text-secondary); max-width: 70ch; }
.pt-kopf-icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-light); color: var(--accent-primary); }
.pt-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; align-items: center;
  background: linear-gradient(135deg, #12304f 0%, #1b5f86 100%); color: #fff; border-radius: 16px; padding: 1.6rem 1.8rem; margin-bottom: 1.1rem; }
.pt-hero h1 { margin: 0.2rem 0 0.5rem; font-size: 1.8rem; color: #fff; }
.pt-hero p { margin: 0; color: rgba(255, 255, 255, 0.85); max-width: 62ch; line-height: 1.5; }
.pt-hero-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.7); }
.pt-rollen { display: flex; gap: 0.4rem; margin-top: 0.8rem; flex-wrap: wrap; }
.pt-rolle { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 99px; padding: 0.15rem 0.7rem; font-size: 0.8rem; }
.pt-einheiten { display: flex; flex-direction: column; gap: 0.5rem; }
.pt-einheit { display: flex; gap: 0.7rem; align-items: flex-start; background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 0.7rem 0.85rem; }
.pt-einheit > div { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.86rem; }
.pt-einheit strong { font-size: 0.98rem; }
.pt-einheit span { color: rgba(255, 255, 255, 0.8); }
.pt-einheit .pt-einheit-art { color: #9fd8f5; font-weight: 600; font-size: 0.78rem; }
.pt-einheit-icon { color: #9fd8f5; margin-top: 2px; }
.pt-todo h2 { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.7rem; font-size: 1.08rem; }
.pt-todo-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.pt-todo-liste a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--border-color);
  background: var(--bg-hover); color: var(--text-primary); text-decoration: none; transition: border-color .15s, background .15s; }
.pt-todo-liste a:hover { border-color: var(--accent-primary); background: var(--accent-light); }
.pt-todo-liste a > span:nth-child(2) { flex: 1; }
.pt-todo-icon { color: var(--accent-primary); display: grid; }
.pt-todo-pfeil { font-weight: 600; color: var(--accent-primary); white-space: nowrap; font-size: 0.88rem; }
.pt-todo-wichtig a { border-color: rgba(230, 160, 40, 0.55); background: rgba(230, 160, 40, 0.08); }
.pt-abschnitt { font-size: 1.08rem; margin: 1.4rem 0 0.7rem; }
.pt-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.pt-kachel { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.05rem 1.1rem; border-radius: 14px; text-decoration: none;
  background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-primary); transition: transform .12s, box-shadow .15s, border-color .15s; }
.pt-kachel:hover { transform: translateY(-2px); border-color: var(--accent-primary); box-shadow: 0 8px 22px rgba(18, 32, 58, 0.08); }
.pt-kachel strong { font-size: 1rem; }
.pt-kachel > span:not(.pt-kachel-icon):not(.pt-zaehler) { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }
.pt-kachel-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-light); color: var(--accent-primary); margin-bottom: 0.2rem; }
.pt-kachel-akzent .pt-kachel-icon { background: rgba(240, 116, 74, 0.12); color: #d9573a; }
.pt-zaehler { position: absolute; top: 0.85rem; right: 0.85rem; background: #d9573a; color: #fff; font-size: 0.72rem; font-weight: 700; border-radius: 99px; padding: 0.12rem 0.55rem; }
.pt-zaehler-neutral { background: var(--accent-primary); }
.pt-blick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.8rem; }
.pt-blick .card { margin: 0; }
.pt-blick .card-title { display: flex; align-items: center; justify-content: flex-start; gap: 0.4rem; }
.pt-blick .card-title .btn-link { margin-left: auto; font-size: 0.82rem; }
.pt-konto { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.6rem; padding: 0.55rem 0; border-top: 1px solid var(--border-subtle); }
.pt-konto:first-of-type { border-top: 0; }
.pt-konto strong { font-size: 1.1rem; }
.pt-konto-text { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-secondary); }
.pt-konto-offen strong { color: var(--danger-text); }
.pt-konto-ok strong { color: var(--success-text); }
.pt-kurzliste { list-style: none; margin: 0; padding: 0; }
.pt-kurzliste li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0; border-top: 1px solid var(--border-subtle); font-size: 0.9rem; }
.pt-kurzliste li:first-child { border-top: 0; }
[data-theme="dark"] .pt-hero { background: linear-gradient(135deg, #0d2238 0%, #164a69 100%); }
@media (max-width: 760px) {
  .pt-hero { grid-template-columns: 1fr; padding: 1.2rem; }
  .pt-hero h1 { font-size: 1.45rem; }
  .pt-todo-liste a { flex-wrap: wrap; }
  .pt-todo-pfeil { margin-left: auto; }
}

/* ---------- Änderungsprotokoll: Filter ---------- */
.protokoll-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem 0.8rem; align-items: end; }
.protokoll-filter label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.82rem; color: var(--text-secondary); }
.protokoll-filter label:first-child { grid-column: span 2; }
.protokoll-filter input, .protokoll-filter select { width: 100%; height: 38px; box-sizing: border-box; margin: 0; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border-input); border-radius: 8px; background: var(--bg-surface); color: var(--text-primary); font-size: 0.9rem; }
.protokoll-filter-knoepfe { display: flex; gap: 0.4rem; flex-wrap: wrap; }
a.pager-btn { text-decoration: none; }
a.pager-btn.disabled { opacity: 0.4; pointer-events: none; }
@media (max-width: 560px) { .protokoll-filter label:first-child { grid-column: auto; } }
.benutzer-neu > summary { list-style: none; display: inline-flex; cursor: pointer; }
.benutzer-neu > summary::-webkit-details-marker { display: none; }
.benutzer-neu[open] > summary { margin-bottom: 0.9rem; }
.benutzer-neu:not([open]) { padding-top: 0.8rem; padding-bottom: 0.8rem; }

/* ---------- Portal-Startseite im Stil der Verwaltungs-Startseite ---------- */
.pt-rolle-zeile { display: inline-block; margin-top: 0.35rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.72); }
.pt-zuhause { display: flex; flex-direction: column; gap: 0.5rem; }
.pt-zuhause .cockpit-head { margin-bottom: 0.25rem; }
.pt-zuhause-einheit { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; }
.pt-zuhause-einheit > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-zuhause-einheit strong { font-size: 0.92rem; }
.pt-zuhause-einheit span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.72); }
.pt-zuhause-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(120, 170, 230, 0.18); color: #9fd2f2; }
.pt-zuhause-art { font-size: 0.7rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.15rem 0.5rem; border-radius: 99px; }
.pt-zuhause-art.eigen { background: rgba(255, 152, 114, 0.18); color: #ffb597 !important; }
.pt-zuhause-art.miete { background: rgba(120, 200, 160, 0.18); color: #9fe0bf !important; }
.pt-zuhause-leer { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }
.pt-zuhause-konto { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.25rem; padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; }
.pt-zuhause-konto span { display: inline-flex; align-items: center; gap: 0.35rem; }
.pt-zuhause-konto.ok strong { color: #8fe0b8; }
.pt-zuhause-konto.offen strong { color: #ffb597; }
.pt-start-hero .start-hero-welcome-grid { align-items: center; }
.pt-liste-zwischentitel { margin: 0.8rem 0 0.2rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.pt-chat { display: flex; flex-direction: column; gap: 0.7rem; }
.pt-chat-msg { max-width: 78%; padding: 0.7rem 0.9rem; border-radius: 14px; border: 1px solid var(--border-color); }
.pt-chat-msg p { margin: 0.25rem 0 0; white-space: pre-line; }
.pt-chat-msg.von-mir { align-self: flex-end; background: var(--accent-light); border-color: var(--accent-ring); border-bottom-right-radius: 4px; }
.pt-chat-msg.von-verwaltung { align-self: flex-start; background: var(--bg-surface-elevated); border-bottom-left-radius: 4px; }
.pt-chat-kopf { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-secondary); }
.pt-chat-betreff { font-weight: 600; margin-top: 0.2rem; }
@media (max-width: 640px) { .pt-chat-msg { max-width: 100%; } }

/* ---------- Portal-Verwaltung ---------- */
.pv-segment { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--bg-surface-elevated); border: 1px solid var(--border-color); }
.pv-segment a { padding: 0.25rem 0.85rem; border-radius: 99px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; }
.pv-segment a.aktiv { background: var(--bg-surface); color: var(--accent-primary); box-shadow: 0 1px 3px rgba(18, 32, 58, 0.12); }
.pv-ticket { border: 1px solid var(--border-color); border-radius: 14px; padding: 0.9rem 1rem; margin-top: 0.8rem; background: var(--bg-surface); }
.pv-ticket.erledigt { opacity: 0.72; background: var(--bg-hover); }
.pv-ticket-kopf { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pv-ticket-wer { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pv-ticket-wer a { color: var(--text-primary); text-decoration: none; }
.pv-ticket-wer a:hover { color: var(--accent-primary); }
.pv-ticket-wer span { font-size: 0.78rem; color: var(--text-muted); }
.pv-avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #1b7fae, #12304f); letter-spacing: 0.02em; }
.pv-avatar.klein { flex-basis: 32px; width: 32px; height: 32px; font-size: 0.72rem; }
.pv-avatar.grau { background: var(--bg-surface-elevated); color: var(--text-secondary); border: 1px dashed var(--border-input); }
.pv-blase { margin: 0.7rem 0 0 48px; padding: 0.65rem 0.85rem; border-radius: 4px 14px 14px 14px; background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); }
.pv-betreff { font-weight: 600; }
.pv-blase p { margin: 0.2rem 0 0; white-space: pre-line; color: var(--text-secondary); }
.pv-antwort { margin: 0.7rem 0 0 48px; display: flex; flex-direction: column; gap: 0.5rem; }
.pv-antwort textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; border-radius: 10px; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-input); background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.pv-antwort textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-ring); }
.pv-antwort-leiste { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pv-antwort-leiste .check { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.pv-spacer { flex: 1; }
.pv-vorschau-form { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.pv-vorschau-form select { flex: 1; min-width: 0; height: 36px; border-radius: 8px; border: 1px solid var(--border-input); padding: 0 0.6rem; background: var(--bg-surface); color: var(--text-primary); }
.pv-vorschau-kopf { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0; border-top: 1px solid var(--border-subtle); }
.pv-vorschau-kopf > div { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.pv-mini-kz { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; margin-bottom: 0.6rem; }
.pv-mini-kz > div { background: var(--bg-hover); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 0.55rem 0.7rem; display: flex; flex-direction: column; }
.pv-mini-kz strong { font-size: 1.25rem; color: var(--accent-primary); line-height: 1.1; }
.pv-mini-kz span { font-size: 0.76rem; color: var(--text-secondary); }
.pv-sichtbar { display: inline-flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .pv-blase, .pv-antwort { margin-left: 0; } }

/* ---------- Login: dezenter Link zur Startseite unter dem Anmeldekasten ---------- */
.auth-heim { text-align: center; margin: -1.75rem auto 3rem; padding: 0 1rem; font-size: 0.85rem; }
.auth-heim a { color: var(--text-muted); text-decoration: none; }
.auth-heim a:hover { color: var(--accent-primary); text-decoration: underline; }

/* ---------------------------------------------------------------- Mobile Kopfleiste: Benutzer + Aktions-Icons oben rechts
   Reihenfolge: KI · News · Hilfe · Tour · Hell/Dunkel · Abmelden (unten in der Seitenleiste dann ausgeblendet) */
.topbar-aktionen { display: none; }
@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; }
  .topbar-aktionen { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; flex-shrink: 0; }
  .topbar-aktionen form { display: inline; }
  .topbar-aktionen .icon-btn { width: 34px; height: 34px; color: var(--text-secondary); }
  .topbar-aktionen .icon-btn:hover, .topbar-aktionen .icon-btn.active { color: var(--accent-primary); }
  .topbar-aktionen .icon-btn.icon-btn-agent { color: var(--coral); }
  .sidebar-actions { display: none; }
}
@media (max-width: 640px) {
  /* eine Zeile: Menü · Logo | Icons rechts; auf schmalen Displays nur das Logo-Bild */
  .topbar { flex-wrap: nowrap; padding: 0.55rem 0.6rem; gap: 0.35rem; }
  .tabs.tabs-fixiert { top: var(--topbar-h, 52px); }
  .topbar-aktionen { min-width: 0; gap: 0; }
  .topbar-aktionen > .icon-btn, .topbar-aktionen > form { flex-shrink: 0; }
  .topbar-aktionen .icon-btn { width: 32px; height: 32px; }
}
@media (max-width: 640px) {
  .auth-heim { margin: 0.25rem auto 2.5rem; }
  .auth-heim a { display: inline-block; padding: 0.6rem 0.9rem; }
}
/* Logotext neben dem Logo auch auf dem Handy; etwas kleiner, nur auf sehr schmalen Displays (< 340 px) ausgeblendet */
@media (max-width: 640px) {
  .topbar .navbar-brand { gap: 0.45rem; min-width: 0; }
  .topbar .brand-name { font-size: 1.12rem; }
}
@media (max-width: 339px) { .topbar .brand-text { display: none; } }

/* ---------------------------------------------------------------- Mobile Tab-Leiste unten (ersetzt das Hamburger-Menü) */
.tabbar, .tabbar-sheet, .tabbar-backdrop { display: none; }
@media (max-width: 1000px) {
  #sidebar-toggle { display: none; }
  body:has(.tabbar) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0.3rem 0.25rem calc(0.3rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg-surface) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color); box-shadow: 0 -4px 18px rgba(8, 17, 31, 0.08);
  }
  .tabbar-item {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    padding: 0.3rem 0.1rem; border: 0; background: none; border-radius: 12px; cursor: pointer;
    color: var(--text-secondary); font: inherit; font-size: 0.68rem; font-weight: 600; text-decoration: none; letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar-item .md-ic { padding: 0.15rem 0.9rem; box-sizing: content-box; border-radius: 999px; transition: background 0.15s; }
  .tabbar-item.aktiv, .tabbar-item.offen { color: var(--text-primary); }
  .tabbar-item.aktiv .md-ic, .tabbar-item.offen .md-ic { background: rgba(240, 116, 74, 0.16); --md-icon-fg: var(--coral); --md-icon-bg: #f7b9a3; }
  .tabbar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8, 17, 31, 0.4); }
  .tabbar-sheet:not([hidden]) {
    display: block; position: fixed; left: 0.5rem; right: 0.5rem; z-index: 58;
    bottom: calc(66px + env(safe-area-inset-bottom)); max-height: 65vh; overflow-y: auto;
    padding: 0.4rem 0.5rem 0.6rem; border-radius: 18px; background: var(--bg-surface);
    border: 1px solid var(--border-color); box-shadow: 0 -10px 40px rgba(8, 17, 31, 0.25);
    animation: tabbar-hoch 0.18s ease-out;
  }
  @keyframes tabbar-hoch { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
  .tabbar-sheet-griff { width: 38px; height: 4px; border-radius: 4px; background: var(--border-color); margin: 0.15rem auto 0.5rem; }
  .tabbar-sheet-titel { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0.6rem 0.65rem; margin-bottom: 0.4rem; font-weight: 700; font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color); }
  .tabbar-sheet-link {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 0.7rem; border-radius: 12px;
    color: var(--text-primary); text-decoration: none; font-weight: 500;
  }
  .tabbar-sheet-link > span:first-of-type { flex: 1; }
  .tabbar-sheet-link > .ic:first-child { color: var(--text-secondary); }
  .tabbar-sheet-link > .ic:last-child { color: var(--text-muted); }
  .tabbar-sheet-link:hover, .tabbar-sheet-link:focus-visible { background: var(--bg-surface-elevated); outline: none; }
  .tabbar-sheet-link.aktiv { background: rgba(240, 116, 74, 0.12); }
  .tabbar-sheet-link.aktiv > .ic:first-child { color: var(--coral); }
  .tabbar-sheet-link + .tabbar-sheet-link { margin-top: 0.1rem; }
  body.tabbar-sheet-offen { overflow: hidden; }
}
@media print { .tabbar, .tabbar-sheet, .tabbar-backdrop { display: none !important; } }

/* Globus (Internetsuche) im ObjectAgent-Schnelldialog */
/* Globus (Internetsuche) – nur die Kugel, ohne Rahmen/Fläche: aus = grau zweifarbig, an = orange zweifarbig.
   Gilt für den ObjectAgent-Schnelldialog (.oa-cmd-web) und die KI-Suche-Seite (.ks-web). */
.oa-cmd-web, .web-globus { flex-shrink: 0; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; cursor: pointer;
  border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
.oa-cmd-web svg, .web-globus svg { width: 24px; height: 24px; }
.oa-cmd-web, .web-globus { color: var(--md-icon-fg); transition: color .15s; }
.oa-cmd-web svg .md-bg, .web-globus svg .md-bg { opacity: .35; }
.oa-cmd-web:hover, .web-globus:hover:not(:disabled) { color: var(--coral); }
.oa-cmd-web.an, .web-globus.an { color: var(--coral); }
.oa-cmd-web.an svg .md-bg, .web-globus.an svg .md-bg { opacity: .4; }
.oa-cmd-web:focus-visible, .web-globus:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.oa-cmd-web[data-tooltip]::after { white-space: normal; width: max-content; max-width: 16rem; text-align: center; }

/* Zweifarbige Material-Icons: Fläche = Textfarbe mit 30 % Deckkraft, Kontur = Textfarbe */
.ic-zt .md-bg { opacity: 0.3; }
.ic-zt .md-fg { opacity: 1; }
/* Icons mitten im Text (ehemals Emojis) in der Zeile halten */
:is(p, span, a, button, td, li, label, div.card-title) > .ic { display: inline-block; vertical-align: -0.2em; }

/* ---------------------------------------------------------------- Technik-Kanban: Drag & Drop */
.tk-kanban-col.tk-col-erledigt { border-top-color: var(--text-muted); }
.tk-col-erledigt .tk-kanban-dot { background: var(--text-muted); }
.tk-col-erledigt .tk-kanban-ticket { opacity: 0.85; }
.tk-ticket-erledigt { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.35rem; font-size: 0.73rem; color: var(--success-text); }
.tk-dnd-hinweis { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.6rem; }
.tk-dnd .tk-kanban-ticket { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tk-dnd .tk-kanban-col { transition: background 0.12s, box-shadow 0.12s, outline-color 0.12s; outline: 2px dashed transparent; outline-offset: -4px; }
.tk-dnd .tk-kanban-col.tk-drop-ziel { outline-color: var(--coral); background: rgba(240, 116, 74, 0.08); box-shadow: 0 0 0 3px rgba(240, 116, 74, 0.15); }
.tk-dnd .tk-kanban-col.tk-drop-gleich { outline-color: var(--border-color); }
.tk-kanban-ticket.tk-zieht { opacity: 0.35; transform: none !important; }
.tk-kanban-ticket.tk-laedt { opacity: 0.5; pointer-events: none; }
.tk-ghost { position: fixed !important; left: 0; top: 0; z-index: 200; margin: 0 !important; pointer-events: none; cursor: grabbing;
  box-shadow: 0 18px 40px rgba(8, 17, 31, 0.28) !important; border-color: var(--coral) !important; opacity: 0.96; }
body.tk-dnd-aktiv, body.tk-dnd-aktiv * { cursor: grabbing !important; }
body.tk-dnd-aktiv { -webkit-user-select: none; user-select: none; }

.tk-dnd-modal { margin: auto; width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 820px); padding: 0; border: 1px solid var(--border-color);
  border-radius: 16px; background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-lg); }
.tk-dnd-modal::backdrop { background: rgba(6, 13, 26, 0.55); backdrop-filter: blur(2px); }
.tk-dnd-modal form { display: flex; flex-direction: column; max-height: inherit; }
.tk-dnd-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border-color); }
.tk-dnd-inhalt { padding: 1rem 1.1rem 0.25rem; overflow-y: auto; }
.tk-dnd-modal .alert { margin: 0 1.1rem 0.5rem; }
.tk-dnd-inhalt .alert { margin: 0 0 0.8rem; }
.tk-dnd-knoepfe { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.8rem 1.1rem 1rem; border-top: 1px solid var(--border-subtle); flex-wrap: wrap; }
.vs-feld { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.8rem; font-weight: 600; font-size: 0.88rem; }
.vs-feld input, .vs-feld select, .vs-feld textarea { font-weight: 400; width: 100%; }
.vs-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.vs-modi { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.vs-modus { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; }
.vs-modus:has(input:checked) { border-color: var(--coral); background: rgba(240, 116, 74, 0.08); }
.vs-teil { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 640px) {
  .vs-zwei { grid-template-columns: 1fr; }
  .tk-dnd-knoepfe .btn { flex: 1; justify-content: center; }
}
.vs-feld input:not([type=radio]):not([type=checkbox]) {
  font: inherit; font-size: 0.93rem; font-weight: 400; color: var(--text-primary); background: var(--table-input-bg);
  border: 1px solid var(--border-input); border-radius: 8px; padding: 0.55rem 0.75rem; min-height: 40px;
}
.vs-feld input:not([type=radio]):not([type=checkbox]):focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-ring); }
.vs-feld textarea { resize: vertical; min-height: 80px; }
