/* ═══════════════════════════════════════════════════════════════
   AixOne TENDR – Design System (Basis: AixOne Nexus, wie OVS)
   Vorlage: ovs-vertraege/public/styles.css; TENDR-eigene Klassen
   sind auf die Nexus-Werte umgestellt.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Material Symbols Rounded";
  src: url("./fonts/material-symbols-rounded.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: block;
}

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --primary: #C2185B;
  --primary-hover: #A5144D;
  --primary-foreground: #FFFFFF;
  --primary-on-dark: #E84686;
  --foreground: #1B1B1F;
  --muted-foreground: #4B5563;
  --background: #FFFFFF;
  --workspace: #F8F9FB;
  --card: #FFFFFF;
  --secondary: #F3F4F6;
  --border: #E5E7EB;
  --sidebar: #FAFAFA;
  --header-bg: #1B1B2F;
  --header-fg: #FFFFFF;
  --accent-subtle: #FCE7F0;
  --nav-active-fg: #C2185B;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-info: #2563EB;
  --color-error: #DC2626;
  --destructive: #DC2626;
  --shadow-md: 0 8px 24px rgba(15, 17, 21, .12);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --foreground: #F3F4F6;
  --muted-foreground: #9CA3AF;
  --background: #0F1115;
  --workspace: #0A0C10;
  --card: #1A1D24;
  --secondary: #1F2229;
  --border: #2A2E37;
  --sidebar: #13151A;
  --header-bg: #0D0D1A;
  --header-fg: #E5E7EB;
  --accent-subtle: #1F0E14;
  --nav-active-fg: #E84686;
  --color-success: #22C55E;
  --color-warning: #FBBF24;
  --color-info: #3B82F6;
  --color-error: #EF4848;
  --destructive: #EF4848;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .40);
}

/* ── Basis ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--foreground);
  background: var(--workspace);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted-foreground); }
.klein { font-size: 12px; }

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  user-select: none;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--secondary); color: var(--foreground);
  font-size: 13px; font-weight: 400; white-space: nowrap; text-decoration: none; max-width: 100%;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover:not(:disabled) { border-color: var(--muted-foreground); text-decoration: none; }
.btn.primaer { background: var(--primary); border-color: transparent; color: var(--primary-foreground); font-weight: 500; }
.btn.primaer:hover:not(:disabled) { background: var(--primary-hover); border-color: transparent; }
.btn.klein { height: 30px; padding: 0 10px; font-size: 12px; }

/* ── Formular ───────────────────────────────────────────────── */
input[type=text], input[type=url], input[type=date], input[type=search], input[type=password], select, textarea {
  height: 36px; min-width: 0; padding: 0 12px;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 14px; outline: none;
}
textarea { height: auto; min-height: 64px; width: 100%; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--secondary); color: var(--muted-foreground); }
select {
  appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }

.formfeld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.formfeld > span { font-size: 12px; font-weight: 500; color: var(--foreground); }
.formfeld > span.muted { color: var(--muted-foreground); font-weight: 400; }
.formfeld input, .formfeld select { width: 100%; height: 40px; }
.formfeld textarea { width: 100%; }
.haken { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.formular { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px 16px; align-items: end; }
.raster .volle-breite { grid-column: 1 / -1; padding: 0; }
.block { display: flex; flex-direction: column; gap: 10px; max-width: 520px; align-items: flex-start; }
.block .formfeld { width: 100%; }

/* ── Seitenkopf, Karten ─────────────────────────────────────── */
.kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kopf > div { min-width: 0; }
.kopf-info { margin-top: 6px; font-size: 13px; }
.kopf-aktionen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zurueck { display: inline-block; font-size: 12px; margin-bottom: 6px; }
.workspace h3 { font-size: 15px; font-weight: 600; margin: 24px 0 10px; }

.karte { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; margin-bottom: 20px; }
.karte .zeile-aktionen { padding: 0; }
.platzhalter { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.leer { padding: 16px 0; color: var(--muted-foreground); font-size: 13px; }

/* ── Badges, Hinweise, Bänder ───────────────────────────────── */
.etiketten { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.etikett { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 13px; white-space: nowrap; vertical-align: middle; background: var(--secondary); color: var(--muted-foreground); }
.etikett.warnung { background: color-mix(in srgb, var(--color-warning) 15%, transparent); color: color-mix(in srgb, var(--color-warning) 75%, var(--foreground)); }
.etikett.gruen { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); }
.etikett.rot { background: color-mix(in srgb, var(--color-error) 15%, transparent); color: var(--color-error); }
.etikett.profil { background: color-mix(in srgb, var(--color-info) 15%, transparent); color: var(--color-info); }
.zahl { display: inline-flex; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 13px; background: var(--secondary); color: var(--muted-foreground); }

.hinweis { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-size: 13px; color: var(--foreground); margin-bottom: 14px; overflow-wrap: anywhere; }
.hinweis.fehler { background: color-mix(in srgb, var(--color-error) 8%, transparent); border-color: color-mix(in srgb, var(--color-error) 35%, transparent); }
.hinweis.info { background: color-mix(in srgb, var(--color-info) 8%, transparent); border-color: color-mix(in srgb, var(--color-info) 30%, transparent); }
.fehlertext { color: var(--color-error); }

.band { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-size: 13px; margin-bottom: 14px; overflow-wrap: anywhere; }
.band > div { flex: 1; min-width: 0; }
.band.gelb { background: color-mix(in srgb, var(--color-warning) 8%, transparent); border-color: color-mix(in srgb, var(--color-warning) 40%, transparent); }
.band.rot { background: color-mix(in srgb, var(--color-error) 8%, transparent); border-color: color-mix(in srgb, var(--color-error) 35%, transparent); }

.frist.knapp { color: color-mix(in srgb, var(--color-warning) 75%, var(--foreground)); font-weight: 600; }
.vkarte .frist.tafel-rot { color: var(--color-error); }
.frist.abgelaufen { color: var(--color-error); font-weight: 600; }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-warning); margin-left: 8px; vertical-align: middle; }
.punkt.rot { background: var(--color-error); }
mark { background: color-mix(in srgb, var(--color-warning) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ── Filterleiste ───────────────────────────────────────────── */
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filter input[type=search] { min-width: min(240px, 100%); flex: 1; max-width: 420px; }

/* ── Trefferliste ───────────────────────────────────────────── */
.gruppe { margin-bottom: 24px; }
.gruppe-kopf { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 6px 0; margin-bottom: 8px; font-size: 16px; font-weight: 600; text-align: left; color: var(--foreground); border-radius: var(--radius); }
.gruppe-kopf .pfeil { color: var(--muted-foreground); transition: transform .15s; }
.gruppe-kopf[aria-expanded="true"] .pfeil { transform: rotate(90deg); }

.zeile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 10px; min-width: 0; }
.zeile-kopf { padding: 16px 20px 12px; cursor: pointer; border-radius: var(--radius-lg); }
.zeile-kopf:hover .zeile-titel { color: var(--primary); }
.portal-kopf { cursor: default; }
.portal-kopf:hover .zeile-titel { color: var(--foreground); }
.zeile-titel { font-size: 14px; font-weight: 600; color: var(--foreground); overflow-wrap: anywhere; }
.zeile-meta { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; overflow-wrap: anywhere; }
.zeile-meta .trenner { margin: 0 6px; }
.zeile-gruende { margin-top: 4px; font-size: 12px; color: var(--muted-foreground); }
.zeile-aktionen { display: flex; gap: 8px; padding: 0 20px 16px; flex-wrap: wrap; align-items: center; }
.details { border-top: 1px solid var(--border); padding: 16px 20px; background: var(--workspace); border-radius: 0 0 var(--radius-lg) var(--radius-lg); font-size: 13px; }
.details dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 12px; }
.details dt { color: var(--muted-foreground); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nicht-relevant { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; padding: 0 20px 16px; }
.nicht-relevant .feld { flex: 1; min-width: min(220px, 100%); display: flex; flex-direction: column; gap: 6px; }

/* ── Tabellen ───────────────────────────────────────────────── */
.tabelle-rahmen { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; min-width: 0; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabelle th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted-foreground); background: var(--secondary); padding: 10px 16px; white-space: nowrap; }
.tabelle td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted-foreground); vertical-align: middle; }
.tabelle td a { font-weight: 500; }
.tabelle td.nummer { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle td select { height: 34px; font-size: 13px; }
.detailtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.blaettern { padding: 16px 0 0; }

/* ── Reiter (Unternavigation Admin) ─────────────────────────── */
.unternav { display: flex; box-shadow: inset 0 -1px 0 var(--border); margin-bottom: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.unternav a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; color: var(--muted-foreground); font-size: 13px; white-space: nowrap; }
.unternav a:hover { color: var(--foreground); text-decoration: none; }
.unternav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); font-weight: 500; }

/* ── Vergabe (Detail) ───────────────────────────────────────── */
.portal-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.portal-zeile input[type=text], .portal-zeile input[type=url] { flex: 1; min-width: min(240px, 100%); }
.stufen { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stufe { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); font-size: 12px; font-weight: 500; }
.stufe:hover { border-color: var(--muted-foreground); color: var(--foreground); }
.stufe.erledigt { background: color-mix(in srgb, var(--color-success) 12%, transparent); border-color: color-mix(in srgb, var(--color-success) 40%, transparent); color: var(--color-success); }
.stufe.aktuell { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.liste-schlicht { margin: 0; padding-left: 18px; }
.verlauf { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.verlauf li { padding: 12px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.verlauf li:first-child { border-top: 0; padding-top: 0; }

/* ── Admin: Einstellungen, Nutzung ──────────────────────────── */
.listen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin: 16px 0; }
.tage { display: flex; gap: 14px; flex-wrap: wrap; }
.abrufzeit input[type=text] { max-width: 120px; }
.woche { display: flex; flex-direction: column; gap: 6px; }
.balken-zeile { display: grid; grid-template-columns: 170px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12px; }
.balken-name { color: var(--muted-foreground); }
.balken-spur { display: block; height: 8px; border-radius: 4px; background: var(--secondary); overflow: hidden; }
.balken { display: block; height: 100%; border-radius: 4px; background: var(--color-info); }
.balken.bewertet { background: var(--color-success); }
.balken.offen { background: var(--color-warning); }
.balken-wert { text-align: right; font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; }

/* ── Shell: Header ──────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100vh; }
.app-header { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--header-bg); color: var(--header-fg); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-md); background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; }
.brand-mark .ms { font-size: 24px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .5px; color: var(--header-fg); white-space: nowrap; }
.brand-name b { font-weight: 400; color: var(--primary-on-dark); letter-spacing: 0; margin-left: 2px; }
.header-center { flex: 1; min-width: 0; }
.icon-btn-dark { width: 48px; height: 40px; flex-shrink: 0; border-radius: var(--radius-md); border: 0; background: transparent; color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
.icon-btn-dark:hover { background: rgba(255,255,255,.08); }
.avatar-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--secondary); color: var(--foreground); font-size: 12px; font-weight: 600; }
:root[data-theme="dark"] .avatar-btn { background: #1F2229; color: #F3F4F6; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; font-weight: 600; }
.avatar-lg { width: 40px; height: 40px; font-size: 13px; }
.avatar-accent { background: var(--accent-subtle); color: var(--nav-active-fg); }

.menu-wrap { position: relative; flex-shrink: 0; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; max-width: calc(100vw - 32px); background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 8px; z-index: 50; }
.menu-head { display: flex; gap: 12px; align-items: center; padding: 8px; }
.menu-head > div { min-width: 0; }
.menu-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.menu-sub { font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--radius); font-size: 13px; color: var(--foreground); }
.menu-item .ms { font-size: 18px; color: var(--muted-foreground); }
.menu-item:hover { background: var(--secondary); text-decoration: none; }
.menu-item.is-danger, .menu-item.is-danger .ms { color: var(--destructive); }

/* ── Shell: Rail + Workspace ────────────────────────────────── */
.app-body { flex: 1; display: flex; min-height: 0; }
.rail { width: 64px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border); padding: 20px 7px 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
/* 64px - 1px Rand - 15px Innenabstand = 48px = Breite von .rail-item. Vorher 47px: 1px Überlauf ergab einen Scrollbalken. */
.rail-item { width: 48px; height: 52px; flex-shrink: 0; border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted-foreground); }
.rail-item .ms { font-size: 22px; }
.rail-item span:last-child { font-size: 9px; font-weight: 500; line-height: 10px; }
.rail-item:hover { background: var(--secondary); color: var(--foreground); text-decoration: none; }
.rail-item.active { background: var(--accent-subtle); color: var(--nav-active-fg); }
.rail-item.active span:last-child { font-weight: 600; }
.rail-flex { flex: 1; }
.workspace { flex: 1; min-width: 0; overflow: auto; padding: 32px; outline: none; }
.workspace > * { max-width: 1200px; }

/* ── Meldung (Toast) ────────────────────────────────────────── */
.meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--radius-md); background: var(--header-bg); color: #fff; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); }
.meldung .ms { font-size: 18px; color: #22C55E; }
.meldung.fehler .ms { color: #F26666; }
.meldung-text { flex: 1; overflow-wrap: anywhere; }

/* ── Responsiv ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .workspace { padding: 24px 20px; }
  .details dl { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .app-header { gap: 8px; padding: 0 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 15px; }
  .icon-btn-dark { width: 40px; }
  .rail { width: 60px; padding: 12px 6px; }
  .workspace { padding: 20px 16px; }
  .karte { padding: 16px; }
  .zeile-kopf { padding: 14px 14px 10px; }
  .zeile-aktionen, .nicht-relevant { padding-left: 14px; padding-right: 14px; }
  .details { padding: 14px; }
  .details dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .details dd { margin-bottom: 6px; }
  .balken-zeile { grid-template-columns: 90px minmax(0, 1fr) 32px; }
  .filter > select, .filter > input { flex: 1 1 100%; max-width: none; }
}

/* ── Tafel „Vergaben“ ───────────────────────────────────────── */
.kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kennzahl { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 16px; background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); font: inherit; cursor: pointer; min-width: 0; }
.kennzahl:hover { border-color: var(--primary); }
.kennzahl[aria-pressed="true"] { border-color: var(--primary); background: var(--accent-subtle); }
.kennzahl-wert { font-size: 24px; font-weight: 700; line-height: 28px; }
.kennzahl-text { font-size: 13px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.tafel { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.spalte { background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
.spalte-kopf { padding: 10px 14px; font-weight: 600; font-size: 13px; cursor: pointer; list-style: none; }
.spalte-kopf::-webkit-details-marker { display: none; }
.spalte-inhalt { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.vkarte { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.vkarte-nr { font-size: 11px; color: var(--muted-foreground); }
.vkarte-titel { font-weight: 600; font-size: 14px; }
.vkarte-zeile { font-size: 12px; color: var(--muted-foreground); }
@media (min-width: 900px) {
  .spalte-kopf { pointer-events: none; cursor: default; }
}
@media (max-width: 899px) {
  .tafel { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .spalte-kopf::before { content: "▸ "; }
  .spalte[open] > .spalte-kopf::before { content: "▾ "; }
}
@media (max-width: 600px) {
  .kennzahlen { grid-template-columns: minmax(0, 1fr); }
}

/* ── Archiv ─────────────────────────────────────────────────── */
.archiv-kennzahlen { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kennzahl.statisch { cursor: default; }
.kennzahl.statisch:hover { border-color: var(--border); }
.gruende { margin: 0; padding-left: 20px; font-size: 13px; color: var(--muted-foreground); }
.grund-text { color: var(--muted-foreground); }
@media (max-width: 899px) {
  .archiv-kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .archiv-kennzahlen { grid-template-columns: minmax(0, 1fr); }
}

/* ── Anmeldeseite (wie OVS) ─────────────────────────────────── */
.login-page { min-height: 100%; display: flex; background: var(--workspace); }
.login-brand { width: 560px; flex-shrink: 0; background: var(--header-bg); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 40px 60px; }
.login-brand-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.login-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.login-logo .ms { font-size: 40px; color: #fff; }
.login-title { font-size: 28px; font-weight: 700; letter-spacing: .5px; }
.login-title b { font-weight: 400; color: var(--primary-on-dark); }
.login-claim { font-size: 14px; color: #9CA3AF; max-width: 360px; }
.login-footer { display: flex; gap: 8px; font-size: 13px; color: #9CA3AF; }
.login-footer a { color: #9CA3AF; }
.login-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 400px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 22px; }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); color: var(--foreground); font-size: 14px; font-weight: 600; }
.ms-btn:hover { background: var(--secondary); text-decoration: none; }
.or-divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted-foreground); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .btn { height: 40px; }
.form-error { color: var(--color-error); font-size: 13px; min-height: 18px; }
@media (max-width: 899px) {
  .login-page { flex-direction: column; }
  .login-brand { width: auto; padding: 24px 16px; }
  .login-brand-center { gap: 12px; }
  .login-footer { display: none; }
  .login-content { padding: 24px 16px; }
}

/* ── Dialog (Passwort) ──────────────────────────────────────── */
.dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--foreground); padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-md); }
.dialog::backdrop { background: rgba(15, 17, 21, .45); }
.dialog form { display: flex; flex-direction: column; gap: 14px; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pw-zelle { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
button.menu-item { background: none; border: 0; text-align: left; }
