/* DPHDMS — Baseline-CSS.
 * Ziel: schlank, ruhig, Tastatur-freundlich, AA-Kontrast.
 * Kein Framework. Memory project-llm-freundlich: direkt lesbar.
 * Memory project-fluessige-ux: keine Animationen, die UX blockieren.
 */

:root {
  --bg: #fafaf8;
  --fg: #1a1a1a;
  --muted: #555;
  --border: #d4d4d0;
  --accent: #0b4f6c;     /* AA-Kontrast gegen --bg */
  --accent-soft: #e6eff3;
  --warn: #b04a00;
  --mark-bg: #fff3a8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --radius: 6px;
  --space: 1rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Liberation Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* Tastatur-Fokus deutlich sichtbar — Memory project-barrierefreiheit. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { text-decoration: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-Link (BITV-Baseline): sichtbar nur bei Tastatur-Fokus,
 * springt direkt in den Hauptbereich. */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  transition: top 0.15s;
}

.skip-link:focus { top: 0; outline: 3px solid white; }

/* ── Top-Navigation ─────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  gap: var(--space);
  padding: 0.6rem var(--space);
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topnav-left .brand {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}

.brand-tenant {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.25rem;
}

.topnav-search {
  flex: 0 1 24rem;
  display: flex;
  gap: 0.25rem;
}

@media (max-width: 72rem) {
  /* Bei schmaleren Viewports zwei Zeilen, damit die Chips
     nicht in das Such-Feld umbrechen. */
  .topnav { flex-wrap: wrap; }
  .topnav-search { flex-basis: 100%; order: 1; }
  .topnav-zeitraum { order: 2; }
  .topnav-right { order: 0; margin-left: auto; }
}

.topnav-search-input {
  position: relative;
  flex: 1;
  display: flex;
}
.topnav-search input[type="search"] {
  flex: 1;
  padding: 0.4rem 0.6rem;
  padding-right: 2rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--fg);
}
/* T13-6: Reset-Kreuz */
.topnav-search-clear {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  cursor: pointer;
}
.topnav-search-clear:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topnav-achse {
  display: inline-flex;
  gap: 0.15rem;
  font-size: 0.8rem;
  margin-left: 0.4rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--border);
}

.topnav-search button {
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.topnav-right {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-link {
  text-decoration: none;
  font-size: 1.15rem;
  color: var(--muted);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
}
.admin-link:hover { color: var(--accent); background: var(--accent-soft); }

/* Logout-Button rechts in der Top-Nav (T17+) */
.topnav-logout { margin: 0; padding: 0; display: inline-block; }
.topnav-logout-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
}
.topnav-logout-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}
.topnav-logout-text { font-size: 0.85rem; }

/* ── Admin-Übersicht ────────────────────────────────────────── */
.admin h1 { margin: 0 0 0.5rem; }
.admin-intro { color: var(--muted); margin-bottom: 1.5rem; }

.admin-kacheln {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.admin-kachel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.admin-kachel h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.admin-kachel h2 a { text-decoration: none; color: var(--accent); }
.admin-kachel h2 a:hover { text-decoration: underline; }

.admin-zahl {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.2rem 0;
}

.admin-hinweis {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.admin-breadcrumb {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.admin-breadcrumb a { color: var(--muted); text-decoration: none; }
.admin-breadcrumb a:hover { color: var(--accent); }

.admin-tabelle {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-tabelle th, .admin-tabelle td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-tabelle th {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
}
.admin-tabelle tr:last-child td { border-bottom: none; }
.admin-tabelle code {
  font-family: ui-monospace, monospace;
  background: var(--bg);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
}

.admin-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 50rem;
}

.admin-form input[type="text"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: white;
  font-family: inherit;
}

.admin-form input[disabled] { color: var(--muted); background: var(--bg); }

.admin-json {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  white-space: pre;
}
.admin-json-err { border-color: var(--warn); background: #fff4ec; }

.admin-json-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  background: var(--bg);
}
.admin-json-block summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}
.admin-json-block[open] summary { color: var(--fg); margin-bottom: 0.5rem; }

.form-hinweis {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}
.form-fehler {
  color: var(--warn);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.link-secondary { color: var(--muted); text-decoration: none; }
.link-secondary:hover { text-decoration: underline; }

.admin-gruppe { margin-bottom: 1.5rem; }
.admin-gruppe-titel {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.td-trunc {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mitglieder-liste {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

.admin-json-beispiel {
  background: var(--bg);
  font-size: 0.8rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  white-space: pre;
  overflow: auto;
}

/* ── Aktentyp-Tabs (T7-6) ───────────────────────────────────── */
.aktentyp-tabs {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space);
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
}

.aktentyp-tabs .tab {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  margin-bottom: -1px;  /* überlappt mit der Border */
}

.aktentyp-tabs .tab:hover {
  color: var(--fg);
  text-decoration: none;
  border-bottom-color: var(--border);
}

.aktentyp-tabs .tab-aktiv {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── Zeitraum-Chips (T13-2: inline in Top-Nav) ────────────── */
.topnav-zeitraum {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Schmaler Achsen-Umschalter unter der Top-Nav, nur Such-Seite. */
.zeitraum-achse-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0.3rem var(--space);
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
}

.chip-zeitraum {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.chip-zeitraum:hover {
  color: var(--fg);
  background: white;
  text-decoration: none;
}
.chip-zeitraum-aktiv {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
}
.chip-zeitraum-aktiv:hover { color: white; background: var(--accent); }

.zeitraum-achse {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  margin-left: auto;
}
.zeitraum-achse-label { color: var(--muted); }
.achse-link {
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}
.achse-link:hover { color: var(--accent); text-decoration: none; }
.achse-aktiv {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ── Hauptbereich ───────────────────────────────────────────── */
.main-content {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem var(--space);
}

/* ── Startseite ─────────────────────────────────────────────── */
.startseite {
  margin-top: 4rem;
  text-align: center;
}

.suchzeile {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.suchzeile input[type="search"] {
  flex: 1;
  max-width: 36rem;
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.suchzeile button {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.suchhinweis {
  color: var(--muted);
  margin: 0 0 2rem;
}

/* ── „Zuletzt bearbeitet" ───────────────────────────────────── */
.zuletzt {
  max-width: 36rem;
  margin: 2rem auto 0;
  text-align: left;
}

.zuletzt h2 {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 0 0 0.5rem;
}

/* ── Login-Seite ────────────────────────────────────────────── */
.login {
  max-width: 56rem;
  margin: 2rem auto 0;
}
.login-kopf { text-align: center; margin-bottom: 1.5rem; }
.login-kopf h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.login-sub { margin: 0; color: var(--muted); font-size: 0.95rem; }

.login-fehler {
  background: #fff4e0;
  border: 1px solid var(--warn, #b04a00);
  color: var(--warn, #b04a00);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

.login-alternativen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.login-alt {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.login-alt h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.login-alt-erklaerung {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  min-height: 2.6em;  /* Höhen-Sync der zwei Karten */
}
.login-alt-shib { border-top: 3px solid var(--accent); }

.login-alt-button {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  font-weight: 500;
}
.login-alt-button:hover {
  background: var(--accent);
  filter: brightness(0.95);
  text-decoration: none;
}
.login-alt-disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
.login-alt-disabled:hover {
  background: var(--border);
  filter: none;
}
.login-alt-hinweis {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0.5rem 0 0;
}

.login-form { display: flex; flex-direction: column; gap: 0.7rem; }
.login-form .form-row { display: flex; flex-direction: column; gap: 0.2rem; }
.login-form label { font-size: 0.85rem; color: var(--muted); }
.login-form input[type="text"],
.login-form input[type="password"] {
  max-width: 18rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.login-form input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.login-submit {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
}
.login-submit:hover { filter: brightness(0.95); }

.zuletzt-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zuletzt-liste li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--border);
}

.zuletzt-liste li:last-child { border-bottom: none; }

.zuletzt-titel { color: var(--accent); }

.zuletzt-zeit {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.zuletzt-leer {
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  margin-top: 4rem;
  padding: 1rem var(--space);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── Such-Highlights ────────────────────────────────────────── */
mark { background: var(--mark-bg); padding: 0 0.1em; }

/* ── Such-Ergebnisse ────────────────────────────────────────── */
.suche-ergebnisse h1 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1rem;
}

.suche-ergebnisse h1 em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.suche-count {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  margin-left: 0.5rem;
}

.treffer-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.treffer-karte {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.treffer-akte-titel {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.treffer-akte-titel:hover { text-decoration: underline; }

.treffer-dokumente {
  list-style: none;
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
  border-left: 2px solid var(--accent-soft);
}

.treffer-dokumente li {
  padding: 0.4rem 0 0.4rem 0.75rem;
}

.treffer-dokumente li + li {
  border-top: 1px dotted var(--border);
}

.treffer-weitere { margin-top: 0.5rem; }
.treffer-weitere summary {
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}
.treffer-weitere summary:hover { color: var(--accent); }
.treffer-weitere[open] summary { color: var(--accent); }

.treffer-dok-titel { font-weight: 500; }

.treffer-snippet {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.chip {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 0.4rem;
}

.chip-dokumenttyp {
  background: #f1ece2;
  color: #6a4f1f;
}

.treffer-leer {
  color: var(--muted);
  margin: 2rem 0;
}

.suche-intent {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 0.5rem;
}

.direkt-sprung {
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.direkt-sprung-label {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.direkt-sprung-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--fg);
}

.direkt-sprung-link strong { color: var(--accent); text-decoration: underline; }
.direkt-sprung-link:hover strong { text-decoration: none; }

.direkt-sprung-anker {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: ui-monospace, monospace;
}

.treffer-akten-direkt {
  background: #fffaee;
  border: 1px solid #f3deba;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.treffer-akten-direkt h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--warn);
}

.treffer-direkt-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.treffer-direkt-karte {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.treffer-match-info {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Akten-Cover ────────────────────────────────────────────── */
.akten-cover { display: flex; flex-direction: column; gap: 1.5rem; }

.identitaet {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.identitaet h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  display: inline;
  margin-right: 0.75rem;
}

.aktenzeichen {
  color: var(--muted);
  font-size: 0.95rem;
}

.anker-liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.75rem 0 0;
}

.anker {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 0.2rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.anker-primaer {
  border: 1px solid var(--accent);
  font-weight: 600;
}

.anker-typ {
  color: var(--muted);
  margin-right: 0.4rem;
  font-variant: small-caps;
}

/* Akten-Signale */
.signale {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
}

.cover-felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.cover-feld { margin: 0; }
.cover-feld dt {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}
.cover-feld dd { margin: 0; font-weight: 500; }
.cover-feld-large dd { font-size: 1.15rem; }
.cover-feld-small dd { font-size: 0.95rem; color: var(--muted); }
.cover-feld-leer { color: var(--muted); font-style: italic; }

.aktendicke {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.aktendicke-label { color: var(--muted); font-size: 0.9rem; min-width: 6rem; }
.aktendicke-balken {
  flex: 1;
  height: 10px;
  background: var(--accent-soft);
  border-radius: 6px;
  overflow: hidden;
}
.aktendicke-fuellung {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.aktendicke-zahl {
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 7rem;
  text-align: right;
}

/* Beteiligte */
.beteiligte {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
}
.beteiligte h2 { font-size: 1rem; margin: 0 0 0.5rem; color: var(--muted); }
.beteiligte ul { list-style: none; padding: 0; margin: 0; }
.beteiligte li { display: flex; gap: 0.75rem; padding: 0.2rem 0; }
.beteiligten-rolle { color: var(--muted); min-width: 8rem; }
.beteiligten-name { font-weight: 500; }
.beteiligten-leer { color: var(--muted); font-style: italic; }

/* T13-3: Zwei-Spalten-Akten-Cover.
   Links Akten-Kontext, rechts Dokumente. Bei schmalem Viewport
   eine Spalte (Mobile-First-Fallback).
   ``main.main-content`` selbst hat schon eine max-width — wir
   können hier breit nutzen, aber müssen die main-content-max
   etwas erhöhen, damit die zwei Spalten Platz haben. */
.akten-cover-2col {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.cover-info,
.cover-info-wrapper { display: flex; flex-direction: column; gap: 0.75rem; }
.cover-info .identitaet h1 { font-size: 1.15rem; }

/* T13-4: Akten-Kopf im Viewer als Link zurück zur Akte. */
.identitaet-link {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--accent);
}
.identitaet-link:hover { text-decoration: underline; }
.identitaet-link h1 { margin: 0; color: inherit; }
.identitaet-pfeil { font-size: 1.1em; }
.cover-info .aktenpuls { margin: 0.25rem 0 0.5rem; }
.cover-info .aktenpuls .puls-item { padding: 0.3rem 0.55rem; font-size: 0.85rem; }
.cover-info .puls-label { font-size: 0.65rem; }

.cover-dokumente { min-width: 0; /* sonst sprengt der Baum die Spalte */ }

/* T13-4: Sidebar-Dokumenten-Liste im Viewer */
.sidebar-dokumente {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
}
.sidebar-dokumente-titel {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.sidebar-dokumente .dokument-zeile { font-size: 0.85rem; padding: 0.25rem 0; }
.sidebar-dokumente .dokumente-in-gruppe { padding-left: 0.5rem; }

/* Aktives Dokument in der Sidebar-Liste */
.dokument-zeile-aktiv {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding-left: 0.3rem !important;
}
.dokument-zeile-aktiv .dokument-titel {
  font-weight: 600;
  color: var(--accent);
}

/* Akten-Details ausklappbar */
.signale-toggle {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
}
.signale-toggle summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.signale-toggle summary::-webkit-details-marker { display: none; }
.signale-toggle summary::before {
  content: "▶";
  font-size: 0.7em;
  margin-right: 0.4rem;
  color: var(--muted);
}
.signale-toggle[open] summary::before { content: "▼"; }
.signale-toggle[open] summary { border-bottom: 1px solid var(--border); }
.signale-toggle .signale { padding: 0.5rem 0.75rem 0.75rem; margin: 0; }
.aktendicke-zahl-inline { color: var(--muted); }

@media (max-width: 70rem) {
  .akten-cover-2col {
    grid-template-columns: 1fr;
  }
}

/* Breiterer Main-Bereich speziell für den 2-Spalten-Cover. */
.main-content:has(.akten-cover-2col) {
  max-width: 84rem;
}

/* T10-5/6: Aktenpuls-Stripe */
.aktenpuls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.puls-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  box-shadow: var(--shadow);
}
.puls-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.puls-wert {
  color: var(--fg);
  font-weight: 500;
}
.puls-warn {
  border-left: 3px solid var(--warn, #d97706);
  background: #fff8e6;
}
.puls-warn .puls-wert { color: var(--warn, #d97706); }
.puls-deadline {
  border-left: 3px solid var(--accent);
}

/* T13-6: Aktenpuls-Item als Link (Letzter Eingang → Dokument). */
.puls-item-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.puls-item-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.puls-item-link:hover .puls-wert { color: var(--accent); }

/* T13-6: Treffer-Karte für direkt gefundene Akte (ohne Volltext-
   Trefferdokumente) bekommt einen dezenten Indikator links. */
.treffer-karte-direkt {
  border-left: 3px solid var(--accent-soft);
}

/* T10-1: Wiedervorlagen-Sektion */
.wiedervorlagen {
  background: #fff8e6;
  border: 1px solid #f5d77a;
  border-left: 3px solid var(--warn, #d97706);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.wiedervorlagen h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wv-icon { font-size: 1.15rem; }
.wv-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.wv-liste { list-style: none; padding: 0; margin: 0; }
.wv-eintrag {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.6rem;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}
.wv-datum {
  font-family: ui-monospace, monospace;
  color: var(--muted);
}
.wv-eintrag.wv-faellig .wv-datum {
  color: var(--warn, #d97706);
  font-weight: 600;
}
.wv-inhalt { color: var(--fg); }

/* T12-7 / F-024: „überfällig"-Badge zusätzlich zur Farbe. */
.wv-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--warn, #b04a00);
  color: var(--warn, #b04a00);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
}

.viewer-attribute-titel {
  font-size: 0.95rem;
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  color: var(--muted);
}

/* T12-7 / F-037: Baum-Gruppen-h3 muss als pille rendern, nicht
   als h3-Default-Größe. */
h3.dok-gruppe-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  display: inline;
}

/* T12-3: Vermerke-Block (sichtbar, nicht versteckt) */
.vermerke-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.vermerke-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vermerke-header h2 { margin: 0; font-size: 1rem; }
.v-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.vermerk-toggle summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}
.vermerk-toggle summary::-webkit-details-marker { display: none; }
.vermerk-toggle summary:hover { background: var(--accent-soft); }
.vermerk-toggle[open] summary { background: var(--accent-soft); margin-bottom: 0.5rem; }
.vermerk-toggle[open] .vermerk-form {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.vermerke-aelter {
  margin-top: 0.5rem;
}
.vermerke-aelter summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.25rem 0;
}
.vermerke-aelter[open] summary { color: var(--fg); }

/* T10: Dokumente-Bereich (alleinstehend) */
.dokumente-bereich {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.dokumente-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dokumente-header h2 { margin: 0; font-size: 1.05rem; }
.dok-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

/* T10-4: Dokumenttyp-Filter-Chips innerhalb der Akte */
.dokumenttyp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border);
}
.chip-dt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.chip-dt:hover { color: var(--fg); background: white; text-decoration: none; }
.chip-dt-aktiv {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 500;
}
.chip-dt-aktiv:hover { color: white; background: var(--accent); }
.chip-dt .chip-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.8em;
  opacity: 0.7;
}

/* T10-3: Dokumenten-Baum */
.dokumenten-baum {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dok-gruppe {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.dok-gruppe-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.dok-gruppe-summary::-webkit-details-marker { display: none; }
.dok-gruppe-summary::before {
  content: "▶";
  font-size: 0.7em;
  color: var(--muted);
  transition: transform 0.1s;
}
.dok-gruppe[open] .dok-gruppe-summary::before {
  transform: rotate(90deg);
}
.dok-gruppe-name { font-weight: 500; }
.dok-gruppe-count { color: var(--muted); font-size: 0.85rem; }
.dokumente-in-gruppe {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.5rem 1.5rem;
  background: white;
  border-top: 1px solid var(--border);
}

/* T10-2: Upload-Toggle */
.upload-toggle summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}
.upload-toggle summary::-webkit-details-marker { display: none; }
.upload-toggle summary:hover {
  background: var(--accent-soft);
}
.upload-toggle[open] summary {
  background: var(--accent-soft);
  margin-bottom: 0.75rem;
}
.upload-toggle .upload-form {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.spalte {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.spalte h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.vermerks-liste, .dokumente-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vermerk {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.5rem 0.75rem;
}

.vermerk-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.chip-vermerk-klasse {
  background: white;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
}

.vermerk-zeit { color: var(--muted); font-size: 0.85rem; }

.vermerk-inhalt {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

/* Vermerk-Form */
.vermerk-form {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row { display: flex; flex-direction: column; gap: 0.2rem; }

.form-row label { font-size: 0.85rem; color: var(--muted); }

.vermerk-form select,
.vermerk-form textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: white;
  font-family: inherit;
}

.vermerk-form textarea { resize: vertical; }

.form-row-aktionen {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--fg);
}

.button-secondary {
  margin-left: auto;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.upload-form {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: white;
  font-family: inherit;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.dropzone-aktiv {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
  text-align: center;
}

.dokument-zeile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--border);
}

.dokument-zeile:last-child { border-bottom: none; }

.dokument-titel { font-weight: 500; }
.dokument-meta { color: var(--muted); font-size: 0.85rem; margin-left: auto; }

.status {
  font-size: 0.75rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.status-processing { background: #fff3cd; color: #6b4f00; }
.status-failed { background: #fde4e4; color: #9b1c1c; }

.leer-hinweis { color: var(--muted); font-style: italic; }

/* ── Dokument-Viewer ────────────────────────────────────────── */
.viewer { display: flex; flex-direction: column; gap: 0.75rem; }

/* T13-1: Akten-Streifen oben im Viewer, sticky */
.viewer-akten-streifen {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
}
.vas-akte {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.vas-akte:hover { text-decoration: underline; }
.vas-pfeil { font-size: 1.05em; }
.vas-titel { white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.vas-anker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
}
.vas-anker-typ {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.vas-anker-wert {
  font-family: ui-monospace, monospace;
  color: var(--fg);
}
.vas-wiedervorlage {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: white;
  color: var(--accent);
  text-decoration: none;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.vas-wiedervorlage:hover { text-decoration: underline; }
.vas-wv-faellig {
  background: #fff4e0;
  border-color: var(--warn, #b04a00);
  color: var(--warn, #b04a00);
  font-weight: 600;
}
.vas-wv-badge { font-size: 0.75rem; }

.viewer-kopf {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.viewer-breadcrumb {
  margin: 0;
  flex-basis: 100%;
  font-size: 0.9rem;
}

.viewer-kopf h1 { margin: 0; font-size: 1.25rem; flex: 1; }

.viewer-download {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
}

.viewer-inhalt {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 24rem;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.viewer-embed { width: 100%; min-height: 32rem; border: none; }
.viewer-image { max-width: 100%; height: auto; margin: auto; display: block; }
.viewer-text {
  margin: 0;
  padding: 1.25rem;
  white-space: pre-wrap;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.95rem;
  width: 100%;
  overflow: auto;
}

.viewer-fallback {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
}

.viewer-fuss {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.viewer-fuss dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.viewer-fuss dt { color: var(--muted); font-size: 0.85rem; }
.viewer-fuss dd { margin: 0.1rem 0 0; }

.viewer-attribute {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.viewer-attribute h2 {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  margin: 0;
  color: var(--muted);
}

/* ====================================================================
   Mappe (Stufe-1-MVP der erweiterten Suche)
   ==================================================================== */

.topnav-mappe {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.6rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--muted-bg, #f1f3f5);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.topnav-mappe:hover {
  background: var(--accent);
  color: white;
}

.mappe {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}
.mappe-kopf h1 {
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.mappe-count {
  font-size: 0.85em;
  color: var(--muted);
  font-weight: normal;
}
.mappe-erklaerung {
  color: var(--muted);
  margin: 0.1rem 0 1rem;
  font-size: 0.95em;
}

.mappe-layout {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 800px) {
  .mappe-layout {
    grid-template-columns: 1fr;
  }
}

.mappe-recent {
  background: var(--muted-bg, #f8f9fa);
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
}
.mappe-recent h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.mappe-recent-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mappe-recent-liste li {
  margin: 0.3rem 0;
  font-size: 0.92em;
}
.mappe-recent-liste a {
  color: var(--accent);
  text-decoration: none;
}
.mappe-recent-liste a:hover { text-decoration: underline; }
.mappe-recent-leer {
  color: var(--muted);
  font-size: 0.88em;
  margin: 0;
}

.mappe-filter {
  background: var(--muted-bg, #f8f9fa);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
}
.mappe-filter-feld {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.mappe-filter-feld legend,
.mappe-filter-feld > span {
  display: block;
  font-weight: 600;
  font-size: 0.92em;
  margin-bottom: 0.3rem;
  padding: 0;
}
.mappe-filter-feld input[type="search"] {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  font: inherit;
}
.mappe-checkbox,
.mappe-radio {
  display: block;
  font-size: 0.92em;
  margin: 0.15rem 0;
  cursor: pointer;
}
.mappe-checkbox input,
.mappe-radio input {
  margin-right: 0.4rem;
}
.mappe-filter-fehlt legend em {
  font-style: italic;
  color: #b85c1b;
}
.mappe-filter-zeit {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
}
.mappe-filter-zeit legend {
  flex-basis: 100%;
}
.mappe-filter-status {
  grid-column: 1 / -1;
}
.mappe-filter-aktionen {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.4rem;
}
.mappe-filter-aktionen button {
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0.3rem;
  font: inherit;
  cursor: pointer;
}
.mappe-filter-aktionen button:hover {
  filter: brightness(0.9);
}
.mappe-filter-reset {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9em;
}
.mappe-filter-reset:hover { text-decoration: underline; }
.mappe-filter-hinweis {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.92em;
  margin: 0;
}

.mappe-treffer-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mappe-treffer-karte {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.8rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.mappe-treffer-karte:hover {
  background: var(--muted-bg, #f8f9fa);
}
.mappe-treffer-titel {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 12rem;
}
.mappe-treffer-titel:hover { text-decoration: underline; }
.mappe-treffer-az {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  color: var(--muted);
}
.mappe-treffer-anker {
  font-size: 0.88em;
  color: var(--muted);
}
.mappe-treffer-dokcount {
  font-size: 0.85em;
  color: var(--muted);
  margin-left: auto;
}
.mappe-treffer-status-geschlossen {
  background: rgba(0, 0, 0, 0.02);
  opacity: 0.85;
}
.chip-status {
  background: #fff3cd;
  color: #8a6d3b;
  border: 1px solid #ffeeba;
}
.mappe-treffer-leer {
  padding: 1.5rem 0.5rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}
.mappe-leer {
  padding: 1.5rem 0.5rem;
  color: var(--muted);
}
