/* Centrio Scancenter — reduziertes, seriöses CSS. Mobile-first, kein Framework. */

/* Inter — lokal gehostet (keine externen Calls, CH-DSG-konform). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-700.woff2") format("woff2");
}

:root {
  /* Centrio-Designsystem (abgeglichen mit site/css/main.css). */
  --c-bg: #f8f6f1;        /* Creme */
  --c-surface: #ffffff;
  --c-ink: #1a1a1a;
  --c-muted: #5f6368;
  --c-line: #e8e5de;
  --c-brand: #2a3814;     /* Oliv */
  --c-brand-dark: #3d4f20;
  --c-accent: #c8956c;    /* Kupfer */
  --c-error-bg: #fdecec;
  --c-error-ink: #9b2c2c;
  --c-error-line: #f3c2c2;
  --c-success-bg: #eaf6ec;
  --c-success-ink: #226b34;
  --c-info-bg: #eaf2f8;
  --c-info-ink: #1b5575;
  /* Warnton (amber): dieselbe Familie wie --shell-wait (app-shell.css) und das
     Technik-Banner unten. Fallback-Wert = --shell-wait, weil app-shell.css auf den
     Anmelde-/Fehlerseiten NICHT geladen ist und ein leeres var() sonst erbt. */
  --c-warn-bg: #fbf3dc;
  --c-warn-ink: var(--shell-wait, #8a6d1f);
  --c-warn-line: #e6c86e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 6px 20px rgba(16, 32, 48, 0.06);
  --maxw: 1040px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Globale Absicherung (Welle 1, Befund A2): einzelne Ursachen sind unten
   gefixt (Header-Umbruch, Tabellen-Scroll, word-break) — dieser Clip fängt
   nur ab, was uebrig bleibt. Kein Inhalt wird dadurch abgeschnitten, weil
   .table-wrap etc. ihr eigenes overflow-x:auto haben.
   WICHTIG: overflow-x nur auf body, NICHT zusaetzlich auf html — html hat
   weiter unten height:100%, und overflow-x auf einem Element mit expliziter
   Hoehe zwingt (CSS-Spec-Kopplung x/y) overflow-y auf "auto", was auf html
   eine eigene, auf 100vh gedeckelte Scroll-Box erzeugt und die Seite ab dem
   ersten Bildschirm "abschneidet". Auf body propagiert overflow-x korrekt
   zum Viewport (Standardverhalten), ohne dieses Problem. */
html { max-width: 100%; }
body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header — sticky auf Mobile, damit Marke/Abmelden immer erreichbar bleiben. */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 1rem;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--c-brand);
  min-width: 0;
  flex: 0 1 auto;
}
.brand__logo { display: block; height: 22px; width: auto; flex: 0 0 auto; }
.brand__sub {
  color: var(--c-muted);
  font-size: 0.85rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--c-line);
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 0.75rem; min-width: 0; flex: 0 0 auto; }
.site-nav__user {
  color: var(--c-muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.inline-form { display: inline; margin: 0; }

/* UX-Audit 05.08.2026 Befund A2: .site-header__inner sprengte bei 390px
   Viewport auf 465px (E-Mail-Adresse ohne Ausweichflaeche) -> Safari
   shrink-to-fit zoomte die ganze Seite. E-Mail auf Mobile ausblenden reicht,
   Abmelden bleibt immer erreichbar. */
@media (max-width: 768px) {
  .site-nav__user { display: none; }
  .site-header__inner { gap: 0.6rem; }
}

/* Main */
.site-main { flex: 1 0 auto; padding: 2rem 0; }

/* Footer */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.8rem;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  gap: 1rem;
}
.site-footer__muted { color: var(--c-muted); }

/* Card */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* Auth */
.auth { display: flex; justify-content: center; padding: 1rem 0; }
.auth__card { width: 100%; max-width: 380px; }
.auth__title { margin: 0 0 0.25rem; font-size: 1.4rem; }
.auth__lead { margin: 0 0 1.25rem; color: var(--c-muted); font-size: 0.9rem; }

/* Form */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field__label { font-size: 0.85rem; font-weight: 600; color: var(--c-muted); }
.field__input {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: #fff;
  color: var(--c-ink);
}
.field__input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(44, 122, 156, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-dark); }
.btn--ghost { background: transparent; color: var(--c-brand); border-color: var(--c-line); }
.btn--ghost:hover { background: var(--c-bg); }
.btn--block { width: 100%; }
.btn--sm { padding: 0.4rem 0.7rem; font-size: 0.85rem; }

/* Flash */
.flash {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
/* crm-gs2b: ein Dokumentname aus der Texterkennung ist oft ein Wort ohne Umbruchstelle (mobile-gate-kundenakte,
   akte/rueckzug-floow). crm-ms3c (Nachpruefung crm-pgs2b N3): nur in der Kundenakte (sie setzt flashUmbruch, partials/
   flash-messages.ejs), sonst aenderte die Regel das Bild jeder Ansicht mit Meldung, auch der eingefrorenen. break-word
   statt anywhere: bricht nur ein Wort, das sonst ueberliefe, und laesst die kleinste Breite der Box, wie sie war. */
.flash--umbruch { overflow-wrap: break-word; }
.flash--error { background: var(--c-error-bg); color: var(--c-error-ink); border-color: var(--c-error-line); }
.flash--success { background: var(--c-success-bg); color: var(--c-success-ink); }
.flash--info { background: var(--c-info-bg); color: var(--c-info-ink); }
/* warning: erfolgreich gespeichert, aber mit Folgen (Screening-TREFFER, Treffer bestaetigt,
   Sanktions-Kandidat). Amber statt Rot — es ist kein Fehler. role="alert" bleibt (Partial). */
.flash--warning { background: var(--c-warn-bg); color: var(--c-warn-ink); border-color: var(--c-warn-line); }

/* GwG-Technikrolle: stehendes Banner „Technischer Prüfzugriff" (scg-gwg-technikrolle-01).
   Bewusst amber (Warnton, kein Alarm-Rot): steht dauerhaft, solange die Rolle aktiv ist.
   Block-Element, %-Breite -> mobil (375px) ohne Overflow. */
.gwg-technik-banner {
  border: 1px solid #e6c86e;
  border-left: 4px solid #b8860b;
  background: #fbf3dc;
  color: #6b4e0a;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.gwg-technik-banner strong { color: #7a4a06; }

/* Error pages */
.errorpage { display: flex; justify-content: center; padding: 1rem 0; }
.errorpage__card { max-width: 460px; text-align: center; }
.errorpage__code { font-size: 2.5rem; font-weight: 800; color: var(--c-brand); margin: 0; }
.errorpage__title { margin: 0.25rem 0 0.5rem; font-size: 1.3rem; }
.errorpage__text { color: var(--c-muted); margin: 0 0 1.25rem; }
.errorpage__detail {
  text-align: left;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 0.75rem;
  overflow: auto;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

/* === Admin / Upload (Phase 1) === */
.page-title { margin: 0 0 0.25rem; font-size: 1.5rem; }
.page-lead { margin: 0 0 1.5rem; color: var(--c-muted); font-size: 0.95rem; }

.admin__card { margin-bottom: 1rem; }
.admin__card-title { margin: 0 0 0.35rem; font-size: 1.15rem; }
.admin__card-text { margin: 0 0 1rem; color: var(--c-muted); font-size: 0.9rem; }

.upload__card { max-width: 640px; }

.field__hint { font-size: 0.78rem; color: var(--c-muted); }

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover,
.dropzone:focus { outline: none; border-color: var(--c-accent); }
.dropzone.is-dragover {
  border-color: var(--c-brand);
  background: var(--c-info-bg);
}
.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.dropzone__inner { pointer-events: none; }
.dropzone__icon {
  display: block;
  font-size: 1.8rem;
  color: var(--c-accent);
  margin-bottom: 0.4rem;
}
.dropzone__text { margin: 0; color: var(--c-muted); font-size: 0.92rem; }
.dropzone__link { color: var(--c-brand); font-weight: 600; text-decoration: underline; }

/* File list */
.file-list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.file-list__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
}
.file-list__info { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list__info.is-invalid { color: var(--c-error-ink); }
.file-list__status { font-size: 0.78rem; color: var(--c-muted); flex: 0 0 auto; }
.file-list__status.is-error { color: var(--c-error-ink); font-weight: 600; }
.file-list__remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--c-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.file-list__remove:hover { color: var(--c-error-ink); }

/* Progress */
.progress {
  height: 8px;
  background: var(--c-line);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.25rem 0 0.25rem;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--c-accent);
  transition: width 0.2s ease;
}

/* === Admin / CRM (Phase 2) === */

/* Sekundaer-Navigation im Admin-Header (Tabs) */
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; }
.admin-nav__link {
  text-decoration: none;
  color: var(--c-brand);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-nav__link:hover { background: var(--c-bg); }
.admin-nav__link.is-active { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }

/* Toolbar (Suche + Aktion) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 1.25rem;
}
.toolbar__search { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.toolbar__search .field { gap: 0.2rem; }
.toolbar__search .field__input { min-width: 220px; }

/* Stat-Kacheln */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.stat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}
.stat__value { font-size: 1.8rem; font-weight: 800; color: var(--c-brand); line-height: 1.1; }
.stat__label { font-size: 0.82rem; color: var(--c-muted); margin-top: 0.2rem; }

/* Tabellen */
.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow);
}
/* In einer .card verliert der Wrap seinen EIGENEN Rahmen: Karte + Wrap hatten
   je Border/Schatten — Rahmen im Rahmen mit sichtbarem Versatz (Ivan-Befund
   06.08.2026, Desktop-Kundenliste). Das Scroll-Verhalten bleibt unberuehrt. */
.card .table-wrap {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--c-muted); background: var(--c-bg); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--c-bg); }
.table__num { text-align: right; font-variant-numeric: tabular-nums; }
/* Namensspalte einer Tabelle (Ivan-Befund 11.09.2026: „ab Karte Dokumente Anzeigeprobleme").
   Ein Dateiname aus der Texterkennung hat gut und gern 90 Zeichen ohne Leerschlag. Ohne
   Umbruch wächst die Zelle mit — gemessen an der Dokumententabelle der Kundenakte: 559 px
   Überhang bei 1280 px Fenster, also Status und Versandspalte nur nach horizontalem Scrollen
   sichtbar. Der Wrap scrollt zwar (kein Inhalt geht verloren), aber niemand scrollt eine
   Tabelle, von der er nicht weiss, dass sie weitergeht. `anywhere` bricht auch ein Wort ohne
   Trennstelle; die Breitengrenze wirkt nur, solange Platz knapp ist. */
.table__name { max-width: 22rem; overflow-wrap: anywhere; }
.table a:not(.btn) { color: var(--c-brand); text-decoration: none; font-weight: 600; }
.table a:not(.btn):hover { text-decoration: underline; }
.table__empty { padding: 1.5rem; text-align: center; color: var(--c-muted); }

/* Wisch-Hinweis fuer scrollbare Tabellen (Welle 1, Aussen-Wrapper + Fade/Text
   werden von table-scroll-hint.js angehaengt — .table-wrap bleibt selbst der
   scrollende Container). Ohne JS bleibt die Tabelle normal per
   overflow-x:auto scrollbar, nur ohne Hinweis — kein Inhalt geht verloren. */
.table-wrap-outer { position: relative; }
.table-wrap__fade {
  position: absolute;
  top: 0; right: 0;
  width: 28px;
  background: linear-gradient(to right, transparent, var(--c-surface));
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.table-wrap__hint {
  margin: 0.4rem 0 0;
  color: var(--c-muted);
  font-size: 0.74rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity .15s ease, max-height .15s ease;
}
.table-wrap-outer--scrollable .table-wrap__fade { opacity: 1; }
.table-wrap-outer--scrollable.table-wrap-outer--at-end .table-wrap__fade { opacity: 0; }
.table-wrap-outer--scrollable .table-wrap__hint { opacity: 1; max-height: 1.2rem; }

/* Status-Badges */
.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge--active { background: var(--c-success-bg); color: var(--c-success-ink); }
.badge--inactive { background: var(--c-error-bg); color: var(--c-error-ink); }
.badge--muted { background: var(--c-bg); color: var(--c-muted); border: 1px solid var(--c-line); }
.badge--info { background: var(--c-info-bg); color: var(--c-info-ink); }

/* Detailseite */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.9rem; }
.dl dt { color: var(--c-muted); font-weight: 600; }
.dl dd { margin: 0; }

.card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0 0 1rem; }
.card__title { margin: 0; font-size: 1.1rem; }
.card + .card { margin-top: 1.25rem; }

/* Aktions-Reihe (mehrere Buttons/Formulare nebeneinander) */
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.btn--danger { background: var(--c-error-ink); color: #fff; }
.btn--danger:hover { background: #7f2222; }

/* Initial-Passwort-Box (einmalige Anzeige) */
.secret-box {
  background: var(--c-info-bg);
  border: 1px solid var(--c-info-ink);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
}
.secret-box__label { font-size: 0.8rem; color: var(--c-info-ink); font-weight: 700; margin: 0 0 0.3rem; }
.secret-box__value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; word-break: break-all; }
.secret-box__hint { font-size: 0.78rem; color: var(--c-muted); margin: 0.35rem 0 0; }
.secret-box__kopieren { margin-left: 0.5rem; vertical-align: middle; }

/* Checkbox-Feld */
.field--check { flex-direction: row; align-items: center; gap: 0.5rem; }
.field--check input { width: 1.05rem; height: 1.05rem; }
.field--check .field__label { font-weight: 500; color: var(--c-ink); }

/* Zweispaltiges Formular */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 620px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-section-title { font-size: 0.95rem; font-weight: 700; color: var(--c-muted); margin: 0.5rem 0 0; border-top: 1px solid var(--c-line); padding-top: 1rem; }

/* Autocomplete */
.ac { position: relative; }
.ac__list {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  position: absolute;
  left: 0; right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 260px;
  overflow-y: auto;
}
.ac__item { padding: 0.5rem 0.7rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; }
.ac__item:hover, .ac__item.is-active { background: var(--c-info-bg); }
.ac__name { font-weight: 600; font-size: 0.9rem; }
.ac__meta { font-size: 0.78rem; color: var(--c-muted); }

/* Pagination */
.pager { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin: 1.25rem 0 0; font-size: 0.88rem; }
.pager__info { color: var(--c-muted); }

/* Activity-Log */
.log-action { font-weight: 600; }
/* min-width ist hier KEIN Widerspruch zum max-width: in der horizontal
   scrollbaren .table-wrap darf die Tabelle breit sein — ohne Mindestbreite
   quetscht der Tabellen-Layouter diese Spalte auf ~45px, break-word bricht
   dann alle paar Zeichen um und eine Log-Zeile wird 700px hoch (gemessen
   05.08.2026, dokument_zugestellt mit 223 Zeichen Details -> 37 Zeilen). */
.log-details { color: var(--c-muted); white-space: pre-wrap; word-break: break-word; min-width: 260px; max-width: 320px; }
/* Monospace nur noch fuer den Roh-Fallback (kein Handler erkannt, alter
   key=value-Dump) — der deutsche Kurztext laeuft in normaler Schrift
   (WELLE 4b, Ivan-Befund 06.08.2026). */
.log-details--raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.log-time { white-space: nowrap; color: var(--c-muted); font-size: 0.82rem; }

/* === Kundenportal / Dokumentenliste (Welle 2a, UX-Audit 05.08.2026 Muster A3+E) ===
   Mobile (<768px): Karten statt Tabelle — die Tabelle schnitt Datum ab und die
   Öffnen-Spalte war komplett unsichtbar (Kern-Kaufgrund kaputt). Auf Desktop
   bleibt die bewaehrte Tabelle, nur mit Beschriftung als Haupttext.
   .doc-cards ist standardmaessig (Desktop) ausgeblendet, .doc-table-wrap
   standardmaessig sichtbar — der @media-Block unten dreht das fuer Mobile um. */
.doc-cards { list-style: none; margin: 0; padding: 0; display: none; }
.doc-card + .doc-card { margin-top: 0.6rem; }

.doc-card__link {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 44px; /* iOS-Tap-Ziel */
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  text-decoration: none;
  color: var(--c-ink);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.1s ease;
}
.doc-card__link:active { background: var(--c-bg); } /* subtiles Tap-Feedback */

/* Ungelesen-Punkt (first_read_at IS NULL) — wie iOS Mail: gefuellter Punkt
   plus fetter Titel; gelesen = leer/normal. */
.doc-card__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: transparent;
}
.doc-card__link--unread .doc-card__dot { background: var(--c-accent); }
.doc-card__link--unread .doc-card__title { font-weight: 800; }

.doc-card__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.doc-card__title { font-weight: 700; overflow-wrap: anywhere; }
.doc-card__filename {
  font-size: 0.78rem;
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-card__meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.15rem; font-size: 0.82rem; color: var(--c-muted); }
.doc-card__date { white-space: nowrap; }

/* Chevron — reines CSS (kein Icon-Font), signalisiert Tappbarkeit. */
.doc-card__chevron {
  flex: 0 0 auto;
  align-self: center;
  width: 7px;
  height: 7px;
  margin-left: 0.1rem;
  border-top: 2px solid var(--c-line);
  border-right: 2px solid var(--c-line);
  transform: rotate(45deg);
}

/* Desktop-Tabelle: Beschriftung als Haupttext, Dateiname nur kleine Zweitzeile. */
.doc-table__title { font-weight: 600; }
.doc-table__filename { font-size: 0.78rem; color: var(--c-muted); margin-top: 0.15rem; }

@media (max-width: 768px) {
  .doc-cards { display: block; }
  .doc-table-wrap { display: none; }
}

/* Poststueck-Objektnummer + Zeilen-Aktion Rueckzug (25.09.2026) */
.objektnummer {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; letter-spacing: 0.04em; padding: 0.05rem 0.4rem; margin-bottom: 0.2rem;
  border: 1px solid var(--c-line); border-radius: 4px; white-space: nowrap;
}
.zeilen-aktion { margin-top: 0.4rem; }
.zeilen-aktion .btn { white-space: nowrap; }
.table__name .objektnummer { display: table; }
.table__name .timeline__detail { display: block; }
.btn--danger-outline { background: transparent; color: var(--c-error-ink); border: 1px solid var(--c-error-ink); }
.btn--danger-outline:hover { background: var(--c-error-ink); color: #fff; }
