/*
korrekturen.css -- Regeln fuer Klassen, die im HTML benutzt, im
Stylesheet aber nie definiert waren.

Befund: 75 Klassen auf 45 Seiten ohne jede CSS-Regel. Einige davon sind
reine Struktur-Hooks (company-name, detail-header -- die Flex-Angaben
standen inline). Andere sind sichtbar ungestylt:

  .breadcrumb        Pfeilreihe war ausgeschriebene Standardlinks,
                     ohne Abstand, ohne Trennzeichen-Style
  .status-verfuegbar Badges "verfuegbar"/"bewertet" waren Text ohne
  .status-bewertet  Rahmen, Farbe oder Pillenform
  .hero-badge        Leerraum um das Hero-Badge war nicht definiert
  .team-photo        Platzhaltergrafik ohne Rahmen
  .btn (auth)        auth-Seiten hatten .btn ohne Knopfdarstellung

Es werden ausschliesslich die vorhandenen Design-Token verwendet:
var(--red), var(--gold), var(--gray), --radius, --radius-sm, die
bestehenden Verlaeufe. Keine neue Farbe, keine neue Schrift.
*/

:root {
  /* Nur zur Vollstaendigkeit: diese Werte waren ueberall vorhanden,
     werden hier aber nicht neu erfunden. */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
}

/* ================================================================
   1. Kopfzeile
   ================================================================ */
.logo-container { display: flex; align-items: center; gap: .75rem; }
.company-name  { display: block; line-height: 1.15; }
.nav-auth       { display: flex; align-items: center; gap: .75rem; }
.nav-account    { display: inline-flex; align-items: center; }
.login-link     { color: var(--gold); text-decoration: none; font-size: var(--text-md);
                  font-weight: 500; transition: color .2s; }
.login-link:hover, .login-link:focus-visible { color: var(--red); }
.site-header    { position: relative; z-index: 10; }

/* ================================================================
   2. Brotkrumen
   Startseite · Bauteam · Team
   ================================================================ */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .4rem; font-size: var(--text-sm); color: var(--gray);
}
.breadcrumb a {
  color: var(--gray); text-decoration: none; transition: color .2s;
}
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: var(--gold); }
.breadcrumb .middot { color: var(--red); opacity: .6; }
#breadcrumb-current { color: var(--white); font-weight: 500; }

/* ================================================================
   3. Status-Badges (14x verfuegbar, 11x bewertet)
   ================================================================ */
.status-verfuegbar,
.status-bewertet,
.genehmigt,
.status-badge {
  display: inline-flex; align-items: center;
  padding: .25rem .7rem; border-radius: 20px;
  font-size: var(--text-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
.status-verfuegbar {
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .35);
  color: var(--green-light);
}
.status-nicht-verfuegbar {
  background: rgba(214,63,47, .1);
  border: 1px solid rgba(214,63,47, .2);
  /* Fuer Text auf dunklem Grund: var(--red-light)=#f05648 erreicht 5,6:1;
     var(--red)=#d63f2f nur 4,2:1 und fiele unter 4,5:1. */
  color: var(--red-light);
}
.status-bewertet {
  background: rgba(184, 148, 79, .12);
  border: 1px solid rgba(184, 148, 79, .35);
  color: var(--gold);
}
.genehmigt {
  background: rgba(214,63,47, .12);
  border: 1px solid rgba(214,63,47, .35);
  color: var(--red-light);
}
.auth-badge {
  display: inline-flex; align-items: center;
  padding: .2rem .55rem; border-radius: 4px;
  font-size: .7rem; font-weight: 500;
  background: rgba(184, 148, 79, .12);
  border: 1px solid rgba(184, 148, 79, .3);
  color: var(--gold);
}
.badge-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }


/* ================================================================
   Bauteam-Detailseiten: Struktur-Angaben, die inline standen
   (bt-1..5, fk-1..7, hl-1..5 — 17 Seiten, identische Werte).
   ================================================================ */
.breadcrumb { margin-bottom: 1.5rem; }
#main.section { margin-top: 0; }
.detail-header {
  display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap;
}
.detail-haupt { flex: 1; min-width: 250px; }
.detail-titelzeile {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: .5rem;
}
#detail-name { font-size: 1.6rem; margin: 0; }
.detail-meta-zeile {
  display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
#detail-role {
  color: var(--gray); font-size: var(--text-md); text-transform: uppercase;
  letter-spacing: 1px; font-family: 'Space Grotesk', sans-serif;
}
#detail-meta { color: var(--gray-light); font-size: var(--text-md); }
#detail-id-display {
  color: var(--gray); font-size: var(--text-sm);
  font-family: 'Space Grotesk', sans-serif;
}
#detail-description {
  color: var(--gray-light); line-height: 1.8; font-size: var(--text-base);
}
.detail-seite { flex-shrink: 0; text-align: right; padding-top: .5rem; }
.detail-rate {
  font-size: var(--text-2xl); color: var(--gray-light);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
}
.detail-rate-einheit { font-size: var(--text-sm); color: var(--gray); font-weight: 400; }
.detail-kennzahlen {
  display: flex; gap: .75rem; margin-top: .5rem; justify-content: flex-end;
}
.detail-kennzahl { text-align: center; }
#detail-members, #detail-jobs {
  font-size: 1.2rem; color: var(--red); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
#detail-rating {
  font-size: 1.2rem; color: var(--gold); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.detail-kennzahl-label {
  font-size: .7rem; color: var(--gray);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ================================================================
   Mitgliedschaftsseite: Preiskarten, Zahlpanel, Supportformular —
   vorher inline gesetzt, Werte unveraendert.
   ================================================================ */
.abo-zeile { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1.5rem 0; }
.ds-karte {
  flex: 1 1 260px; padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, .25); border-radius: 4px;
}
.ds-karte.premium { border: 1px solid rgba(214,63,47, .35); }
.ds-karte h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.ds-preis { margin: 0 0 .8rem; font-size: 1.6rem; font-weight: 600; }
.ds-preis span { font-size: var(--text-md); font-weight: 400; }
.abo-liste { margin: 0 0 1rem; padding-left: 1.1rem; line-height: 1.7; }
.abo-kaufen { margin-top: .6rem; }
.ds-hinweis { margin: .6rem 0 0; font-size: var(--text-sm); }
#abo-meldung { margin: 1rem 0; color: var(--badge-text-rot); }
/* Widerrufshinweis: eigene Fläche statt loser Zeile, Kästchen als
   gezeichnetes Quadrat mit Haken. Das System-Kästchen war je nach Browser
   winzig, grau und nicht zu treffen — auf dem Telefon praktisch unsichtbar. */
.ds-widerruf {
  display: flex; gap: .85rem; align-items: flex-start;
  max-width: 44rem; margin: 0 auto 1.5rem;
  padding: .95rem 1.1rem;
  font-size: var(--text-sm, .875rem); color: #c9d1da; line-height: 1.55;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  cursor: pointer;
}
.ds-widerruf:hover { border-color: rgba(255, 110, 120, .28); }
.ds-widerruf input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0;
  border: 1.5px solid rgba(255, 255, 255, .48);
  border-radius: 6px; background: rgba(255, 255, 255, .10);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .03);
  position: relative; cursor: pointer;
  transition: background .18s, border-color .18s;
}
.ds-widerruf input[type="checkbox"]:checked {
  background: linear-gradient(162deg, #b91626 0%, #7d0c16 100%);
  border-color: rgba(255, 110, 120, .55);
}
.ds-widerruf input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}
.ds-widerruf input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(224, 38, 58, .55); outline-offset: 2px;
}
.ds-widerruf a { color: #ff6d78; }
.ds-panel {
  max-width: 34rem; margin: 2rem auto; padding: 1.2rem 1.4rem;
  text-align: left; border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 4px; background: rgba(148, 163, 184, .06);
}
.ds-panel h2 { margin: 0 0 .8rem; font-size: var(--text-lg); }
.zahl-zeile { margin: .4rem 0; }
#usdt-adresse { word-break: break-all; }
.zahl-warnung { margin: .6rem 0; font-size: var(--text-sm); color: var(--gold-hell); }
.zahl-label { display: block; font-weight: 600; margin: .8rem 0 .35rem; }
.zahl-feld {
  width: 100%; padding: .6rem .8rem; border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: transparent; color: inherit;
}
.zahl-knopf { width: 100%; justify-content: center; margin-top: .8rem; }
#usdt-meldung { margin: .8rem 0 0; font-size: var(--text-md); }
.zahl-fuss { margin: 1rem 0 0; font-size: var(--text-sm); color: var(--gray-light); }
#meldung-hilfe {
  margin-top: 1.2rem; border-top: 1px solid rgba(148, 163, 184, .2);
  padding-top: .8rem;
}
#meldung-hilfe summary { cursor: pointer; font-weight: 600; font-size: var(--text-md); }
#meldung-hilfe > p { font-size: var(--text-sm); color: var(--gray-light); margin: .6rem 0; }
#meldung-hilfe label { display: block; font-size: var(--text-sm); margin: .4rem 0 .2rem; }
#meldung-hilfe .ds-zeile { display: flex; gap: .6rem; margin-top: .5rem; }
#meldung-hilfe .ds-zeile > div { flex: 1; }
#meldung-hilfe .ds-zeile label { margin: .2rem 0; }
#meldung-hilfe .meld-label-2 { margin: .6rem 0 .2rem; }
.meld-feld {
  width: 100%; padding: .5rem .7rem; border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: transparent; color: inherit;
}
.meld-knopf { width: 100%; justify-content: center; margin-top: .7rem; }
#meld-status { margin: .7rem 0 0; font-size: var(--text-md); }
.zahl-fuss-box {
  max-width: 34rem; margin: 1.5rem auto 0; padding: 1rem 1.2rem;
  text-align: left; border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 4px; font-size: var(--text-md);
}
.zahl-fuss-box > p:first-child { margin: 0 0 .4rem; }
.fuss-zeile { margin: .4rem 0 0; }
.fuss-hinweis { margin: .6rem 0 0; color: var(--gray-light); font-size: var(--text-sm); }
.partner-hinweis { color: var(--gray-light); }
.text-zentrum { text-align: center; margin: 1.5rem 0 0; }
.text-zentrum .btn-secondary { display: inline-flex; padding: .8rem 1.8rem; }
.text-zentrum > span {
  display: block; margin-top: .5rem; font-size: var(--text-sm);
  color: var(--gray-light);
}
.text-zentrum + h2 + ol { line-height: 1.8; }

/* ================================================================
   Auftragsdetail-Seite (bauauftraege/detail.html) — vorher inline.
   ================================================================ */
.bau-detail { max-width: 900px; padding-top: 3rem; }
.ds-leer { text-align: center; padding: 4rem 0; color: var(--gray-light); }
.ds-leer h1 {
  font-family: 'Space Grotesk', sans-serif; color: var(--white);
  margin-bottom: .5rem;
}
.ds-leer .btn-primary { margin-top: 1.5rem; display: inline-flex; }
.ds-leer .btn-outline { display: inline-flex; margin-top: 1.5rem; }
#detail-kopf {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1rem;
}
.detail-kopf-zeile {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .75rem; flex-wrap: wrap;
}
#detail-id {
  font-family: 'Space Grotesk', sans-serif; color: var(--gold);
  font-weight: 500;
}
#detail-cat-badge {
  background: rgba(184, 148, 79, .1); color: var(--gold);
  border: 1px solid rgba(184, 148, 79, .2);
}
#detail-status-badge {
  background: var(--gray); color: var(--navy); border: 1px solid var(--gray);
}
#detail-date { color: var(--gray); font-size: var(--text-sm); }
#detail-titel {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem;
  color: var(--white); margin-bottom: .5rem; line-height: 1.2;
}
#detail-ort { color: var(--gray-light); font-size: var(--text-base); }
.budget-spalte { text-align: right; }
#detail-budget {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem;
  color: var(--gold); font-weight: 600;
}
.budget-label { color: var(--gray-light); font-size: var(--text-sm); margin-top: .25rem; }
.karten-titel {
  color: var(--white); font-family: 'Space Grotesk', sans-serif;
}
#apply-form label, #rating-form-wrap label { color: var(--gray-light); }
#a-preis { max-width: 200px; }
.preis-einheit {
  color: var(--gray-light); font-size: var(--text-sm); margin-left: .5rem;
}
.btn-secondary.bewerbung-zurueck {
  flex: 1; text-decoration: none; padding: .9rem 2rem;
  display: flex; align-items: center; justify-content: center;
}
.btn-primary.bewerbung-senden {
  flex: 2; display: flex; align-items: center; justify-content: center;
  padding: .9rem 2rem;
}
#d-beschreibung {
  font-size: var(--text-md); line-height: 1.6; color: var(--gray-light);
  white-space: pre-line;
}
#d-antraege { color: var(--gold); font-weight: 600; }
#d-positionen { margin-top: 1.2rem; }
#verlauf-status { color: var(--gray-light); font-size: var(--text-md); }
#verlauf-liste {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: grid; gap: .5rem;
}
#ratings-list { margin-bottom: 1rem; }
#rating-sterne { max-width: 120px; }
.rating-feld { margin-bottom: .75rem; }
.form-abstand { margin-bottom: 1.25rem; }
.karten-abstand { margin-bottom: 1.5rem; }
.karten-titel { margin-bottom: 1rem; }
.karten-titel.gross { margin-bottom: 1.5rem; }
.karten-untertitel { color: var(--gold); font-size: var(--text-base); margin-bottom: .75rem; }
#rating-sterne, #rating-bewerteter { max-width: 120px; }
#rating-submit { padding: .6rem 1.5rem; }
#rating-msg { margin-top: .5rem; font-size: var(--text-sm); }
.small-aus { color: var(--gray-light); font-weight: 300; }
#no-applications-msg {
  text-align: center; padding: 1rem; color: var(--gray-light);
  font-size: var(--text-md);
}

/* ================================================================
   Bauauftragsmarkt (bauauftraege/index.html) — vorher inline.
   ================================================================ */
.markt-huelle { padding-top: 3rem; }
.ds-leer.hoch h1 { margin-bottom: 1rem; }
.leer-text { max-width: 38rem; margin: 0 auto; }
.ds-knoepfe {
  display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.5rem;
}
.ds-knoepfe a { display: inline-flex; }
.markt-hinweis { margin-top: 1rem; font-size: var(--text-md); }
h1#main.markt-titel {
  font-family: 'Space Grotesk', sans-serif; font-size: var(--text-2xl);
  color: var(--white); margin-bottom: .5rem;
}
.section h2.section-subtitle.markt-untertitel {
  color: var(--gray-light); margin-bottom: 2rem;
  font-size: var(--text-base); font-weight: 300;
}
.markt-titel-3 {
  color: var(--white); font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 1rem;
}
#filter-suchbegriff { width: auto; min-width: 190px; }
#filter-sort { width: auto; min-width: 150px; }
#filter-kategorie { width: auto; min-width: 140px; }
#filter-prioritaet { width: auto; min-width: 130px; }
.muted { font-size: var(--text-sm); }
.lade-zeile td {
  text-align: center; padding: 2rem; color: var(--gray-light);
}
.leer-titel {
  font-family: 'Space Grotesk', sans-serif; font-size: var(--text-lg);
  color: var(--gray); margin-bottom: .5rem;
}
.leer-unter { font-size: var(--text-md); }
.lade-hinweis { text-align: center; padding: 2rem; color: var(--gray-light); }

.admin-titel { color: var(--gold); margin-bottom: .5rem; }
.admin-untertitel { color: var(--gray-light); margin-bottom: 1.5rem; }
.admin-summe { color: var(--gray-light); font-size: var(--text-sm); margin-bottom: 1rem; }
.scroll-x { overflow-x: auto; }
/* ================================================================
   4. Hero
   ================================================================ */
.hero-badge { margin-bottom: 1.25rem; }
.hero-subtitle {
  font-size: var(--text-lg); color: var(--gray);
  font-weight: 400; margin: 0 auto 1rem; max-width: 46ch;
}

/* ================================================================
   5. Detailseiten (18x)
   ================================================================ */
.detail-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid rgba(214,63,47, .12);
  margin-bottom: 2rem;
}
.detail-header { margin-bottom: 1.5rem; }
.detail-header-row {
  display: flex; align-items: flex-start; gap: 1.5rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.detail-icon { flex-shrink: 0; }
.detail-role { color: var(--gold); font-size: var(--text-md); font-weight: 500; }
.detail-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: var(--text-sm); color: var(--gray);
}
.detail-body { max-width: 860px; }
.detail-section { margin-bottom: 2rem; }
.detail-section h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: var(--text-lg); margin-bottom: .75rem;
  padding-bottom: .4rem; border-bottom: 1px solid rgba(214,63,47, .12);
}
.section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; margin-right: .5rem;
  border-radius: 50%; background: rgba(214,63,47, .12);
  color: var(--red); font-size: var(--text-sm); font-weight: 700;
  vertical-align: middle;
}
.pro-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white); border: none;
  padding: .55rem 1.2rem; border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.pro-btn:hover, .pro-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(214,63,47, .3); }

/* Listen mit Label/Wert (3x li-label, li-value) */
.li-label {
  font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .5px;
  color: var(--gray); margin-bottom: .2rem;
}
.li-value { font-size: var(--text-base); color: var(--white); font-weight: 500; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.stat-num {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.6rem; font-weight: 700; color: var(--gold);
  line-height: 1.1;
}

/* ================================================================
   6. Ueber uns: Team
   ================================================================ */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem; margin: 2rem 0;
}
.team-member { text-align: center; }
.team-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); margin-bottom: .75rem;
  border: 1px solid rgba(214,63,47, .15);
  background: rgba(15, 23, 42, .5);
}
.team-name { font-weight: 600; margin-bottom: .2rem; }
.team-role { font-size: var(--text-sm); color: var(--gold); margin-bottom: .3rem; }
.team-contact { font-size: var(--text-sm); color: var(--gray); }
.role {
  display: inline-block; font-size: var(--text-xs); color: var(--gray);
  text-transform: uppercase; letter-spacing: .5px;
}

/* ================================================================
   7. Mein Konto
   ================================================================ */
.nav-account { gap: .5rem; }
.user-profile-banner {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem; margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(214,63,47, .12);
  border-radius: var(--radius);
}
/* .user-profile-card wird hier NICHT mehr benutzt. Sie stand hier als
   Rest einer aelteren Fassung, in der die Kopfzeile eine eigene Karte
   hatte. Im HTML liegt der Avatar jetzt direkt im .user-profile-
   banner, sonst haette die Regel nur den Faktor flex:1 an ein Element
   gehaengt, das es nicht gibt. */
.user-avatar-large {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.user-info-block { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.user-meta-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--text-sm); color: var(--gray); flex-wrap: wrap;
}
.user-meta-sep { color: var(--red); opacity: .5; }
.role-badge {
  display: inline-flex; padding: .2rem .6rem; border-radius: 4px;
  background: rgba(184, 148, 79, .12); border: 1px solid rgba(184, 148, 79, .3);
  color: var(--gold); font-size: .7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
}

.filter-select {
  background: rgba(15, 23, 42, .8); color: var(--white);
  border: 1px solid rgba(214,63,47, .2);
  border-radius: var(--radius-sm); padding: .5rem .75rem;
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: var(--text-sm);
}
.filter-link {
  color: var(--gray); text-decoration: none; font-size: var(--text-sm);
  padding: .4rem .8rem; border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.filter-link:hover, .filter-link:focus-visible { color: var(--gold); background: rgba(184, 148, 79, .08); }
.filter-link.archiv { opacity: .75; }
.filter-tab {
  padding: .5rem 1.1rem; border-radius: 30px;
  border: 1px solid rgba(214,63,47, .2);
  color: var(--gray); text-decoration: none; font-size: var(--text-sm);
  cursor: pointer; background: transparent;
  transition: color .2s, background-color .2s, border-color .2s;
}
.filter-tab:hover, .filter-tab:focus-visible, .filter-tab.active {
  background: rgba(214,63,47, .12); color: var(--white);
  border-color: rgba(214,63,47, .4);
}

.order-name { font-weight: 600; color: var(--white); }
.amount {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700; color: var(--gold);
}
.planung, .fremdsicherung { font-size: var(--text-sm); color: var(--gray); }
.funding-item {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0; border-bottom: 1px solid rgba(214,63,47, .08);
  font-size: var(--text-sm);
}
.funding-details { margin: .5rem 0 1rem; }
.funding-breakdown {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .75rem; margin: .75rem 0;
}

.modal-tabs {
  display: flex; gap: .25rem; border-bottom: 1px solid rgba(214,63,47, .15);
  margin-bottom: 1.25rem;
}
.modal-tab-button {
  padding: .6rem 1.1rem; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--gray);
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: var(--text-sm);
  font-weight: 500; cursor: pointer; transition: color .2s, background-color .2s, border-color .2s;
}
.modal-tab-button:hover, .modal-tab-button:focus-visible { color: var(--white); }
.modal-tab-button.active { color: var(--red); border-bottom-color: var(--red); }

.comm-conversations { display: flex; flex-direction: column; gap: 1rem; }
.comm-conv-item {
  padding: 1rem; border: 1px solid rgba(214,63,47, .12);
  border-radius: var(--radius); background: rgba(15, 23, 42, .4);
}
.comm-conv-author {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: var(--text-md); margin-bottom: .4rem;
}

/* ================================================================
   8. Auth-Seiten
   Die benutzen .btn / .sub / .footer / .link / .divider
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white); border: none;
  padding: .8rem 2rem; border-radius: 30px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: var(--text-base); font-weight: 600; cursor: pointer;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:hover:not(:disabled), .btn:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(214,63,47, .3);
}
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.sub {
  display: block; margin-top: .4rem;
  font-size: var(--text-sm); color: var(--gray);
}
.link { color: var(--gold); text-decoration: none; }
.link:hover, .link:focus-visible { color: var(--red); text-decoration: underline; }
.divider {
  display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0;
  color: var(--gray); font-size: var(--text-sm);
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(214,63,47, .15);
}
.success {
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .35);
  color: var(--green-light); font-size: var(--text-md); margin-bottom: 1rem;
}
.status-msg { margin-top: .75rem; font-size: var(--text-sm); }
.cert-warning {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .7rem .9rem; margin-bottom: 1.25rem;
  background: rgba(184, 148, 79, .1);
  border: 1px solid rgba(184, 148, 79, .3);
  border-radius: var(--radius-sm);
  color: var(--gold); font-size: var(--text-sm); line-height: 1.4;
}
.password-strength {
  display: flex; gap: .25rem; margin-top: .4rem;
}
.password-strength span {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, .1); transition: background .2s;
}
.footer {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(214,63,47, .1);
  text-align: center; font-size: var(--text-sm); color: var(--gray);
}
.auth-footer, .site-footer {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(214,63,47, .1);
  text-align: center; font-size: var(--text-sm); color: var(--gray);
}
.auth-footer a, .site-footer a {
  color: var(--gray); text-decoration: none; margin: 0 .5rem;
}
.auth-footer a:hover, .auth-footer a:focus-visible, .site-footer a:hover, .site-footer a:focus-visible { color: var(--gold); }

/* Footer der Detailseiten (hat eigenes Inline-Stylesheet) */
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 0 1.5rem;
  display: flex; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.footer-brand { font-size: var(--text-sm); color: var(--gray); max-width: 300px; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--gray); text-decoration: none; font-size: var(--text-sm);
  transition: color .2s;
}
.footer-links a:hover, .footer-links a:focus-visible { color: var(--gold); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 1.25rem;
  border-top: 1px solid rgba(214,63,47, .12);
  font-size: var(--text-sm); color: var(--gray);
}

/* ================================================================
   9. Werkstatt (baueinheiten)
   ================================================================ */
.hero-badge + h1 { margin-bottom: 0; }

/* ================================================================
   10. Kontobereich: Zweifaktor-Authentifizierung
   Die 2FA-Karte neu in mein-konto/index.html. Ohne diese Regeln
   war der Knopf nicht als betätigbar erkennbar.
   ================================================================ */

/* Ersetzt style="color:var(--gold)" in den Kartenueberschriften.
   Das Inline-Style ist bei den Auth-Seiten unter striktem style-src
   nicht erlaubt, die Farbe gehoert ins Stylesheet. */
.accent-gold { color: var(--gold); }

#2fa-state { min-height: 2.6em; }
#2fa-status-msg { font-size: var(--text-sm); line-height: 1.5; }
#2fa-enable-btn, #2fa-disable-btn { min-height: 44px; }
#2fa-enable-btn:disabled, #2fa-disable-btn:disabled {
  opacity: .55; cursor: not-allowed;
}
#2fa-setup-code {
  letter-spacing: .35em; text-align: center; font-size: var(--text-lg);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
#2fa-secret-display { color: var(--gold); font-weight: 600; }

/* ================================================================
   10b. Elemente, die es erst durch die Reparatur gab
   ================================================================
   Die Detailzeile und die Tab-Meldung entstehen zur Laufzeit in
   mein-konto/konto.js. Ohne Regeln waeren sie ungestylt: die
   Detailzeile haette keinen Hintergrund und wuerde direkt an den
   Rand der Tabelle kleben. */

/* Von konto.js per createElement erzeugt, daher class= */
.order-detail-row > .order-detail-cell {
  background: rgba(15, 23, 42, .5);
  padding: 1rem;
  color: var(--gray-light);
  font-size: var(--text-md);
  line-height: 1.6;
  border-left: 2px solid var(--gold);
}
/* Trennt die aufgeklappte Zeile sauber von der Folgezeile */
.order-detail-row + tr > td { border-top: 1px solid rgba(184, 148, 79, .18); }

/* Von konto.js per createElement erzeugt */
.tab-inline-msg { margin: 0 0 1rem; }

/* Der Augen-Button: als Anker ohne Ziel war er nicht als
   Schaltflaeche erkennbar. */
.action-icon.details {
  cursor: pointer;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.action-icon.details:hover, .action-icon.details:focus-visible { color: var(--gold); }

/* ================================================================
   11. Dashboard auf dem Handy
   ================================================================

   Befund: fuer kein einziges Element des Dashboards gab es eine
   @media-Regel. Die vorhandenen Bloecke (1024/860/768/480 px) gelten
   ausschliesslich fuer die Navigation. Dadurch bleibt auf jedem
   Viewport gleich, was heisst:

     - die vier Kennzahlenkarten stehen ab 320 px zweispaltig
     - die Formularzeilen (.form-row) bleiben zweispaltig
     - die Detailraster (.order-details-grid) bleiben zweispaltig
     - die Fusszeile (.footer-grid) verlangt 2 x 220 px = 470 px
     - die beiden 7-Spalten-Tabellen haben keinen Scroll-Behaelter
       und brechen das Layout ab dem Moment, in dem sie breiter
       werden als der Viewport

   Die Werte sind aus dem vorhandenen Layout abgeleitet, die Farben
   kommen aus den vorhandenen Tokens. Kein neues Design.
   ================================================================ */

/* --- Tabellen: horizontal scrollbar statt Layoutsprengung --- */
/* styles.css Z153 setzt .table-wrapper{overflow-x:auto; ... overflow:hidden}.
   Das "hidden" kommt nach "auto" im selben Block und gewinnt dort -- es
   sperrt beide Achsen, die Tabelle wuerde abgeschnitten statt
   scrollbar. Deshalb wird es hier ausdruecklich zurueckgesetzt.
   Ebenso der Aussenrand, der sonst die 1.5rem von dort behält und
   die Box aus der Karte schiebt. */
.table-wrapper {
  /* "overflow-y: hidden" allein reicht nicht. styles.css Z153 setzt
     die Kurzform "overflow:hidden"; die gilt fuer BEIDE Achsen und
     laesst sich mit Einzelachsen nur ueberschreiben, wenn man die
     Kurzform selbst zuruecknimmt -- sonst gewinnt sie je nach
     Reihenfolge. Deshalb hier ausdruecklich die Kurzform wieder auf
     auto/hidden, und nicht nur die Einzelachsen. */
  overflow: hidden auto;                    /* y hidden, x auto */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -.5rem;
  padding: 0 .5rem;
}
/* Wichtig: styles.css setzt global table{...min-width:500px}. Darum
   hier ausdruecklich der Wert 640px -- 7 Spalten aus Themen wie
   "Finanzprodukt" brauchen mehr als 500px, sonst quetscht der Browser
   den Text in zwei Zeilen und die Zeilen werden 60px hoch. */
.table-wrapper table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
.table-wrapper th,
.table-wrapper td {
  padding: .75rem .6rem;
  text-align: left;
  border-bottom: 1px solid rgba(214,63,47, .08);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.table-wrapper th {
  color: var(--gray-light);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.table-wrapper tbody tr:hover { background: rgba(255, 255, 255, .02); }
/* Zeiger, dass es scrollbar ist */
.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04); border-radius: 3px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(184, 148, 79, .35); border-radius: 3px;
}

/* --- Kopfzeile des Kontos ---------------------------------------
   Wichtig: .user-profile-card (Z196) und .user-avatar-large (Z200)
   gab es bereits. Sie gehoeren zu .user-profile-banner, das Avatar,
   Text und Knopf als direkte Flex-Kinder haelt. Diese Regeln hier
   sind nur die Ergaenzungen, die fehlten:

   - .user-display-name und .user-email-display trugen ihre Werte
     vorher als Inline-Styles im HTML. Ohne sie war die Ueberschrift
     auf Vorgabe des Browsers: 2em, fett, schwarz.
   - .logout-btn ebenfalls.
   Eine zweite .user-profile-card waere hier schaedlich gewesen --
   die brechende Definition liegt jetzt nicht mehr vor. */
/* Lange Firmennamen duerfen umbrechen statt die Zeile zu sprengen */
.user-display-name {
  font-size: 1.75rem;
  margin-bottom: .15rem;
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  color: var(--white);
  overflow-wrap: anywhere;
}
.user-email-display {
  color: var(--gray-light);
  font-size: var(--text-base);
  margin-bottom: .75rem;
  overflow-wrap: anywhere;
}
.role-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(184, 148, 79, .15);
  color: var(--gold);
  border: 1px solid rgba(184, 148, 79, .25);
}
.user-meta-item {
  color: var(--gray-light);
  font-size: var(--text-sm);
}
.user-meta-item strong { color: var(--white); }
.user-profile-banner {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
/* Der Abmelden-Knopf stand in einem Inline-Block mit margin-left:auto.
   Als Klasse ist er auf dem Handy unter der Zeile. */
#logout-btn-banner, .logout-btn {
  margin-left: auto;
  display: inline-block;
  white-space: nowrap;
  padding: .4rem .7rem;
  font-size: var(--text-xs);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  color: var(--gray-light);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: color .2s, border-color .2s;
}
#logout-btn-banner:hover, #logout-btn-banner:focus-visible, .logout-btn:hover, .logout-btn:focus-visible {
  color: var(--red);
  border-color: rgba(214,63,47, .3);
}
.user-meta-sep { color: var(--gray); opacity: .5; }

/* --- Filterleiste --- */
.filter-bar { gap: .6rem; }
.filter-link {
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--gray);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.filter-link:hover, .filter-link.active {
  color: var(--gold);
  border-color: rgba(184, 148, 79, .3);
}
.filter-select {
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--gray);
  font-size: var(--text-sm);
  font-family: inherit;
}

/* --- Dokument- und Teamraster (kamen nur aus Inline-Styles) --- */
.doc-grid, .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
/* Ein 200px-Boden plus 2 x 24px Kartepassung = 248px. Auf einem
   390-px-Handy passt genau eine Spalte, auf einem 360-px-Handy
   bleibt noch 20px Luft. Ab hier eine Spalte erzwingen. */
.progress-bar-wrapper { margin-bottom: 1.25rem; }

@media (max-width: 900px) {
  /* Die Tab-Leiste braucht in einer Zeile 1371 px. Sie scrollt
     seitlich, statt die Beschriftung umzubrechen -- umgebrochene
     Tabs sehen aus wie Fliesstext. */
  .account-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .25rem;
    /* Der untere Rand gehoert an die Leiste, nicht ans scrollende Feld */
    margin-bottom: 1.25rem;
  }
  .account-tab-button {
    flex: 0 0 auto;
    padding: .6rem .8rem;
    font-size: var(--text-sm);
    white-space: nowrap;
  }
  .account-tabs::-webkit-scrollbar { height: 3px; }
  .account-tabs::-webkit-scrollbar-thumb {
    background: rgba(184, 148, 79, .3); border-radius: 2px;
  }
}

@media (max-width: 768px) {
  /* Kennzahlen: zweispaltig ab 400 px, sonst einspaltig.
     Ab 320 px sind zwei Karten zu je 138 px zu schmal fuer
     "Aktive Bauaufträge" bei 1.8rem. */
  .dashboard-stats { grid-template-columns: 1fr; gap: .75rem; }
  .dashboard-stat { padding: 1.1rem; }

  /* Formularzeilen einspaltig */
  .form-row { grid-template-columns: 1fr; gap: .9rem; margin-bottom: .9rem; }

  /* Detailraster einspaltig */
  .order-details-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* Die Kopfzeile ist .user-profile-banner (kein user-profile-card,
     das gibt es als Element nicht mehr). Auf dem Handy bricht der
     Avatar links, der Text daneben, der Knopf darunter ueber die
     volle Breite. Ohne das presste der Knopf bei 390 px aus der Box. */
  .user-profile-banner { flex-wrap: wrap; gap: 1rem; }
  .user-info-block { flex: 1 1 200px; min-width: 0; }
  #logout-btn-banner, .logout-btn {
    margin-left: 0;
    flex: 1 1 100%;
    text-align: center;
  }
  /* Der Avatar war mit 88px fest im HTML gesetzt. Auf dem Handy
     nimmt er die ganze Zeile, das ist nicht noetig und frisst Platz.
     Ohne !important, weil die Breite jetzt aus dem Stylesheet kommt
     und nichts sie sonst ueberschreibt. */
  .user-avatar-large { width: 64px; height: 64px; font-size: 1.3rem; }

  .account-card { padding: 1.1rem; }
  .filter-bar { margin-bottom: 1rem; }
  .doc-grid, .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .footer-grid { gap: 1.75rem; }
}

@media (max-width: 480px) {
  /* 220 px Fussspalte passt auf 390 px nicht neben eine zweite.
     minmax faellt auf einspaltig, sobald kein Platz mehr ist --
     ab hier ist das sicher. */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .doc-grid, .team-grid { grid-template-columns: 1fr; }
  /* Beschriftung der Kennzahl kleiner, sonst bricht "Aktive
     Bauaufträge" bei 0.8rem mit 1.5px Sperrung um */
  .stat-label { font-size: var(--text-xs); letter-spacing: 1px; }
  .stat-value { font-size: 1.5rem; }
  .account-tab-button { padding: .55rem .7rem; font-size: var(--text-sm); }
  .filter-bar { gap: .45rem; }
  .filter-link { font-size: var(--text-xs); padding: .3rem .5rem; }
  .account-card { padding: .9rem; }
}

/* ================================================================
   12. BEDIENBARKEIT AUF DEM HANDY
   ================================================================

   Gemessen in touchscan.js. Vorher, auf 390 px:

     Reiter der Hauptansicht   33 px   Filter                24 px
     Senden                    19 px   Detail-Auge           16 px
     Dokument-Download         19 px   Abmelden              27 px
     Fenster-Schliessen        19 px   Reiter im Fenster      36 px
     Navigation                19 px   Burger                19 px

   Apple nennt 44x44 px als Minimum, Material 48x48. Alles darunter
   trifft man beim Greifen daneben -- auf dem Desktop sieht eine
   19-px-Flaeche normal aus, in der Hand nicht.

   Wichtig: min-height statt padding. Bei padding muss man die
   Schriftgroesse im Kopf rechnen, und sobald jemand die Schrift
   vergroessert, wird die Flaeche wieder zu klein. min-height folgt
   der eingestellten Schrift und bleibt gueltig.
   ================================================================= */

/* --- Touch-Ziele auf Mindesthoehe bringen --- */
/* Gemeinsam, weil sich die Regeln sonst je einzeln wiederholen. */
@media (pointer: coarse), (max-width: 768px) {
  .account-tab-button,
  .modal-tab-button,
  .btn-primary,
  .btn-outline,
  .btn-send,
  .filter-link,
  .doc-download,
  .action-icon,
  .modal-close,
  .logout-btn,
  .nav-link,
  .menu-toggle,
  .btn {
    min-height: 44px;
    /* Ohne das markiert der Browser den Text beim Antippen blau und
       man sieht fuer einen Moment eine Auswahl, die nichts
       auswaehlt. */
    -webkit-tap-highlight-color: rgba(184, 148, 79, .18);
    touch-action: manipulation;   /* kein 300-ms-Warten vor dem Klick */
    user-select: none;
    -webkit-user-select: none;
  }

  /* Verlinkte Elemente duerfen den Text nicht markieren, sehen
     sonst nach Fehler aus. */
  .doc-download,
  .action-icon,
  .filter-link,
  .logout-btn,
  .nav-link { -webkit-touch-callout: none; }

  /* Reiter: linksbuendig, damit man beim Daumen nicht genau die
     Mitte des Wortes treffen muss. */
  .account-tab-button,
  .modal-tab-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
  }

  /* --- Touch-Flaechen optisch als Flaeche kennzeichnen --- */
  /* Bei .action-icon und .modal-close ist der Hintergrund entscheidend:
     ein 16-px-Augen ohne Flaeche ist auf dem Handy nicht als
     Schaltflaeche erkennbar. */
  .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
  }
  .action-icon:active { background: rgba(184, 148, 79, .2); }

  .modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
  }

  /* Der Abmelden-Knopf war ein 12-px-Knopf in Grossbuchstaben. */
  .logout-btn { display: inline-flex; align-items: center; justify-content: center; }

  /* Filter: ganzes Feld antippbar, nicht nur der Text. */
  .filter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .75rem;
    font-size: var(--text-sm);
  }

  /* Dokument-Download: war ein 19-px-Textlink mit Emoji. */
  .doc-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 44px;
    border: 1px solid rgba(184, 148, 79, .22);
    border-radius: var(--radius-sm);
  }
}

/* --- Navigation und Burger --- */
@media (max-width: 768px) {
  /* Burger war 19 px hoch und 24 breit. */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0 .6rem;
  }

  /* Die Links im aufgeklappten Menue bekommen volle Hoehe und
     Rand, damit nicht nur die Beschriftung selbst zaehlt. */
  .nav-menu .nav-link,
  .nav-menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 1rem;
    border-radius: 0;
  }
}

/* --- Tabellen als Karten auf dem Handy ---
   Zwei siebenspaltige Tabellen mit min-width 640 px ergaben 1,8
   Bildschirmbreiten waagerechter Scrollweg. Bei sieben Spalten ist
   die dritte fuer den Daumen schon ausser Reichweite, und man
   weiss nicht mehr, welche Zeile zu welcher gehoert.

   Darum wird ab 700 px jede Zeile eine Karte: die Beschriftung
   steht links, der Wert rechts, gestapelt statt nebeneinander.
   Erzeugt wird das in mein-konto/konto.js und
   bauauftraege/bauauftraege.js aus den data-label-Attributen. */
@media (max-width: 700px) {
  .table-wrapper { overflow-x: visible; margin: 0; padding: 0; }
  .table-wrapper table,
  .table-wrapper table.min-width,
  .table-wrapper table { min-width: 0; display: block; }
  .table-wrapper thead {
    /* Die Kopfzeile ist in der Kartenansicht ueberfluessig: jede
       Karte traegt ihre Beschriftung schon an jedem Wert. */
    display: none;
  }
  .table-wrapper tbody,
  .table-wrapper tbody tr,
  .table-wrapper tbody td { display: block; width: 100%; }
  .table-wrapper tbody tr {
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(214,63,47, .12);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    margin-bottom: .75rem;
  }
  .table-wrapper tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    white-space: normal;      /* in der Karte darf umbrochen werden */
    text-align: right;
  }
  .table-wrapper tbody td:last-child { border-bottom: none; }
  /* Die Beschriftung kommt aus data-label; ohne sie faellt links
     nichts auf, und man weiss nicht, welcher Wert welcher ist. */
  .table-wrapper tbody td::before {
    content: attr(data-label);
    color: var(--gray-light);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: .4px;
    text-align: left;
    flex: 0 0 auto;
  }
  /* Zellen ohne Beschriftung (Aktionsspalten) bekommen keine */
  .table-wrapper tbody td:not([data-label])::before { content: none; }
  .table-wrapper tbody td:empty { display: none; }
  /* Aktionsknöpfe in der Karte ueber die volle Breite */
  .table-wrapper .order-actions { justify-content: flex-end; }
  .table-wrapper tbody .order-actions td { justify-content: flex-end; }
}

/* --- Sticky Reiterleiste ---
   Sonst muesste man nach jeder Aktion wieder nach oben, um den
   Reiter zu wechseln. Die Leiste bleibt oben stehen. */
@media (max-width: 768px) {
  .account-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    /* Ohne eigenen Hintergrund waehrend des Scrollens sieht man
       die Tabelle durch die Leiste. */
    background: var(--navy);
    padding: .5rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  }
}

/* --- Ruhige Einstellung ---
   Wer in den Systemeinstellungen Bewegung reduziert hat, erwartet
   das auch hier. Ohne das kann ein gleitender Balken Ursache fuer
   Uebelkeit sein. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Ziehen ueber die Seitengrenze verhindern ---
   Am oberen und unteren Rand wird sonst beim Scrollen die Seite
   selbst nachgezogen, weil der Inhalt zu kurz ist. */
@media (max-width: 768px) {
  html, body { overscroll-behavior-y: none; }
}

/* --- Sauberes Scrollen auf iOS ---
   -webkit-overflow-scrolling war nur an .table-wrapper gesetzt. */
@media (max-width: 768px) {
  .account-tabs, .filter-bar, .table-wrapper, .nav-menu {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  /* Scrollt man diese Leiste seitlich, soll das nicht die ganze
     Seite mitnehmen. */
  .account-tabs, .filter-bar { overscroll-behavior-x: contain; }
}

/* ================================================================
   12b. Die restlichen Hinweise aus touchscan.js
   ================================================================ */

/* --- Schriftgroessen auf dem Handy ---
   Gemessen waren .stat-label 11,5 px, .user-meta-item 13,6 px,
   .filter-link 12 px und .small 12,8 px. Unter 16 px zoomt iOS beim
   Fokus auf ein Feld, und 11,5 px ist auf dem Handy auch ohne Zoom
   zu klein zum Lesen.

   Wichtig: .small ist eine Sammelklasse fuer alles Kleine. Sie wird
   hier auf 14 px gehoben, nicht auf 16 -- "Baustellenplan" neben
   "Baukreditvertrag" waere bei 16 px ein Block aus drei Zeilen. */
@media (max-width: 768px) {
  .stat-label { font-size: var(--text-sm); letter-spacing: .8px; }
  .user-meta-item { font-size: var(--text-md); }
  .filter-link { font-size: var(--text-md); }
  .small { font-size: var(--text-md); }
  .doc-meta { font-size: var(--text-sm); }
  /* Eingabefelder auf 48 px: 42 px ist knapp unter dem Daumenradius */
  .form-input, input[type="text"], input[type="email"],
  input[type="password"], input[type="tel"], input[type="number"],
  select, textarea {
    min-height: 48px;
  }
  textarea { min-height: 120px; }
}

/* --- Abstand zwischen benachbarten Zielen ---
   Die beiden 2FA-Knoepfe standen direkt aneinander. Ohne Luecke
   unterscheidet man die Beruehrungen nicht, und wer daneben tippt,
   schaltet versehentlich ab. */
#2fa-enable-btn, #2fa-disable-btn { margin: .25rem .25rem .25rem 0; }
#2fa-enable-btn + #2fa-disable-btn { margin-left: .5rem; }
#2fa-actions, .twofa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
/* Im Fensterkopf: Titel und Schliessen-Knopf nicht aneinander */
.modal-header, .modal-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* --- Nur mit Maus: hover-Effekte ---
   Ohne diese Abfrage bleibt der hover-Zustand nach dem Antippen
   haften, weil :hover auf dem Handy beim ersten Kontakt gesetzt wird
   und erst beim Wegtappen verschwindet. Der Knopf bleibt dann
   scheinbar "gedrueckt" liegen. */
@media (hover: none) {
  .btn-primary:hover,
  .btn-outline:hover,
  .btn:hover,
  .doc-download:hover,
  .filter-link:hover,
  .action-icon:hover,
  .nav-link:hover,
  .logout-btn:hover,
  .modal-close:hover,
  .account-tab-button:hover,
  .modal-tab-button:hover {
    /* Der Wert, den der jeweilige hover-Effekt setzen wuerde, wird
       hier auf den Grundzustand zurueckgesetzt. */
    transform: none;
    box-shadow: none;
  }
  .nav-link:hover { color: inherit; }
  .filter-link:hover { color: inherit; background: none; }
  .doc-download:hover { color: inherit; border-color: rgba(184, 148, 79, .22); }
  .logout-btn:hover { color: var(--gray-light); border-color: rgba(255, 255, 255, .08); }
  .action-icon:hover { background: rgba(255, 255, 255, .04); }
}

/* --- Textauswahl auf Schaltflaechen ---
   user-select:none steht oben schon fuer die Touch-Ziele, aber nur
   innerhalb des Blocks mit den min-height-Regeln. Diese Regel ist
   der Rueckfall fuer alles, was in anderen Media-Bloecken steht. */
@media (max-width: 768px) {
  .btn, .btn-primary, .btn-outline, .btn-send, .doc-download,
  .filter-link, .action-icon, .modal-close, .logout-btn,
  .account-tab-button, .modal-tab-button, .menu-toggle, .nav-link {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* ================================================================
   12b. GEWERK-MASKE im Auftragsformular
   ------------------------------------------------------------
   Ein Auftrag ist eine Adresse, darunter stehen die Gewerke. Die
   Zahlenfelder sind input[type=number]: das kostet die Pfeiltasten,
   aber es nimmt Buchstaben und Tippfehler nicht an -- auf dem Handy
   oeffnet es das Zahlenfeld statt der Tastatur.

   Mindesthöhe 44 px wie fuer alle anderen Bedienziele (Abschnitt 12).
   ================================================================ */

.pos-block {
    border: 1px solid rgba(184, 148, 79, .25);
    border-radius: var(--radius);
    padding: 1.1rem 1.1rem 1.2rem;
    margin: 0 0 1.5rem;
}

.pos-legend {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: var(--text-base);
    color: var(--gold);
    padding: 0 .5rem;
    font-weight: 600;
}

.pos-hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.55;
}

.pos-liste { display: flex; flex-direction: column; gap: 1rem; }

.pos-leer {
    border: 1px dashed rgba(184, 148, 79, .3);
    border-radius: var(--radius);
    padding: 1.4rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-md);
    margin: 0;
}

.pos-zeile {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    padding: 1rem;
    background: rgba(255, 255, 255, .02);
}

.pos-kopf {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}

.pos-name {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: var(--text-base);
    color: var(--white);
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
}

.pos-flag {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--red);
    border: 1px solid rgba(214,63,47, .4);
    border-radius: var(--radius);
    padding: .15rem .45rem;
    white-space: nowrap;
}

.pos-entfernen {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .18);
    color: var(--text-muted);
    border-radius: var(--radius);
    padding: 0 .75rem;
    min-height: 44px;
    min-width: 44px;
    font-size: var(--text-sm);
    cursor: pointer;
}
.pos-entfernen:hover,
.pos-entfernen:focus-visible {
    border-color: var(--red);
    color: var(--red);
}

.pos-zahlen {
    display: flex;
    gap: .9rem;
    margin-bottom: .9rem;
}
.pos-zahl-huelle { flex: 1 1 0; min-width: 0; }
.pos-zahl {
    width: 100%;
    min-height: 48px;
    font-size: var(--text-base);
    text-align: center;
}
/* Gesperrtes Helferfeld: nicht unsichtbar, sondern sichtbar
   gesperrt. Wer sieht, dass es da ist und warum es leer bleibt,
   muss nicht raten. */
.pos-zahl:disabled {
    opacity: .45;
    cursor: not-allowed;
    background: rgba(255, 255, 255, .02);
}

.pos-taetigkeit { display: flex; flex-direction: column; gap: .3rem; }
.pos-taet-feld { min-height: 64px; font-size: var(--text-base); line-height: 1.5; }

.pos-add-row {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.pos-add-controls {
    display: flex;
    gap: .6rem;
    align-items: stretch;
}
.pos-add-controls .form-control { flex: 1 1 auto; min-width: 0; min-height: 48px; }
.pos-add-controls .btn-outline {
    flex: 0 0 auto;
    min-height: 48px;
    white-space: nowrap;
}

.form-hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: .35rem 0 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    /* Auf dem Handy nebeneinander ist zu eng: die Zahlen stehen dann
       untereinander, aber mit voller Breite. */
    .pos-add-controls { flex-direction: column; }
    .pos-add-controls .btn-outline { width: 100%; }
}

@media (max-width: 480px) {
    .pos-zahlen { flex-direction: column; gap: .7rem; }
    .pos-kopf { gap: .45rem; }
    .pos-name { font-size: var(--text-base); }
    .pos-zeile { padding: .85rem; }
    .pos-block { padding: .9rem .85rem 1rem; }
}

/* ================================================================
   12c. BAUAUFTRAGSTABELLE im Dashboard
   ------------------------------------------------------------
   Die Zeilen kommen aus auftragliste.js. Jede Zeile ist eine Adresse,
   darunter stehen die Gewerke mit ihren Personenzahlen.

   Ein Gewerk je Zeile in der Tabellenzelle: drei Gewerke ergaeben in
   einer Zeile sieben Textzeilen, und auf dem Handy ist eine Zelle
   dann unlesbar. Als eigene Blöcke bleiben sie vergleichbar.
   ================================================================ */

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.order-ort {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: .2rem;
}

.pos-zeile-kompakt {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.pos-zeile-kompakt:last-child { border-bottom: none; }

.pos-zeile-name {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: var(--text-md);
    color: var(--white);
    font-weight: 600;
    min-width: 0;
}

.pos-zeile-zahlen {
    font-size: var(--text-sm);
    color: var(--gold);
    white-space: nowrap;
}

.pos-zeile-status {
    font-size: var(--text-xs);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius);
    padding: .1rem .4rem;
    white-space: nowrap;
}

.order-count, .order-budget {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* "Nicht vorhanden" sieht anders aus als ein Wert. */
.keine-daten {
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--text-sm);
}

.kein-inhalt { padding: 1.5rem 0; text-align: center; }

.btn-klein { min-height: 44px; padding: 0 .9rem; font-size: var(--text-sm); }

@media (max-width: 700px) {
    /* Auf dem Handy liegt der Knopf ueber der Zeile, nicht neben ihr:
       neben waere er bei 360 px zu breit. */
    .results-bar { flex-direction: column; align-items: stretch; }
    .results-bar .btn-primary { width: 100%; justify-content: center; }
    .pos-zeile-kompakt { padding: .45rem 0; }
    .pos-zeile-name { font-size: var(--text-md); }
    .pos-zeile-zahlen { font-size: var(--text-sm); }
}

/* ================================================================
   13. Regressionsschutz
   Wer diese Klasse entfernt, soll es merken.
   ================================================================ */
.Outline { color: var(--gold); }


/* =====================================================================
   Die Uebersicht -- was auf den Bauherrn wartet
   =====================================================================
   Gleiche Palette wie der Rest: --navy, --gold, --red. Keine neue
   Farbe, kein neuer Radius. Nur die vorhandenen.

   Nachgemessen am 2026-09-30: Bewerbungen, Nachrichten und
   Dokumente lagen in der Datenbank und in keinem Fenster.
   */

.uebersicht {
    margin: 0 0 2.5rem;
}

.uebersicht-titel {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin: 2rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(184, 148, 79, .3);
}

/* Die Warteliste steht optisch vorn. */
#uebersicht-wartet {
    display: grid;
    gap: 1rem;
}

.warte-zeile {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    padding: 1rem 1.25rem;
}

.warte-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    margin-bottom: .5rem;
}

.warte-gewerk {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    color: var(--navy);
}

.warte-gesucht {
    font-size: var(--text-md);
    color: var(--gold);
    font-weight: 500;
}

.warte-zeit {
    font-size: var(--text-sm);
    color: var(--gray-light);
    margin-left: auto;
}

.warte-bewerber {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    font-size: var(--text-md);
}

.warte-name {
    font-weight: 600;
    color: var(--navy);
}

.warte-personen,
.warte-bewertung {
    font-size: var(--text-md);
    color: var(--grau-600);
}

/* Die Bewertung in Gold: sie ist ein Argument fuer die Entscheidung. */
.warte-bewertung {
    color: var(--gold);
    font-weight: 500;
}

.warte-motivation {
    margin: .75rem 0 0;
    font-size: var(--text-md);
    line-height: 1.6;
    color: var(--grau-700);
}

.warte-aktionen {
    display: flex;
    gap: .625rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Auftragskarten
   --------------------------------------------------------------------- */
#uebersicht-auftraege {
    display: grid;
    gap: 1rem;
}

.ueb-karte {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: 1.25rem;
}

.ueb-kartenkopf {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    margin-bottom: .75rem;
}

.ueb-titel {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.ueb-ort {
    font-size: var(--text-md);
    color: var(--gray-light);
}

.ueb-gewerke {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: .375rem;
}

.ueb-gewerk {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    font-size: var(--text-md);
    padding: .375rem 0;
    border-bottom: 1px solid rgba(10, 15, 26, .06);
}

.ueb-gewerk-name {
    font-weight: 500;
    color: var(--navy);
}

.ueb-gewerk-zahlen {
    font-size: var(--text-md);
    color: var(--grau-600);
}

/* ---------------------------------------------------------------------
   Zaehler
   ---------------------------------------------------------------------
   Der Gedankenstrich steht fuer "keine". Eine 0 waere eine Angabe,
   "keine" ist keine.
   --------------------------------------------------------------------- */
.ueb-zaehler {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: .75rem 0;
    border-top: 1px solid rgba(10, 15, 26, .06);
    border-bottom: 1px solid rgba(10, 15, 26, .06);
}

.ueb-zaehler-eintrag {
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

.ueb-zaehler-wert {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
}

.ueb-zaehler-name {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

.ueb-zaehler-detail {
    font-size: var(--text-xs);
    color: var(--gold);
    font-weight: 500;
}

.ueb-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
}

.ueb-link {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: var(--text-md);
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(184, 148, 79, .35);
    padding-bottom: .125rem;
    display: inline-flex;
    gap: .5rem;
    align-items: baseline;
}

.ueb-link:hover,
.ueb-link:focus {
    border-bottom-color: var(--gold);
}

.ueb-link-detail {
    font-size: var(--text-xs);
    color: var(--gray-light);
}

/* ---------------------------------------------------------------------
   Zustand und Fehler
   --------------------------------------------------------------------- */
.uebersicht-fehler {
    background: rgba(214,63,47, .08);
    border-left: 3px solid var(--red);
    border-radius: 4px;
    padding: .875rem 1.125rem;
    font-size: var(--text-md);
    color: var(--rot-900);
    margin: 0 0 1.5rem;
}

.uebersicht-fehler[hidden] {
    display: none;
}

.uebersicht-status,
.uebersicht-stand {
    font-size: var(--text-sm);
    color: var(--gray-light);
    margin: 0 0 .5rem;
}

.uebersicht-status:empty,
.uebersicht-stand:empty {
    display: none;
}

.neu-laden {
    background: none;
    border: 1px solid rgba(184, 148, 79, .4);
    color: var(--gold);
    cursor: pointer;
    padding: .5rem .875rem;
    border-radius: 4px;
    font-size: var(--text-sm);
    margin-top: 1rem;
}

.neu-laden:hover,
.neu-laden:focus {
    border-color: var(--gold);
    background: rgba(184, 148, 79, .06);
}

/* ---------------------------------------------------------------------
   Mobil
   ---------------------------------------------------------------------
   Auf schmalen Bildschirmen stehen die Zaehler untereinander statt
   nebeneinander: nebeneinander waeren sie vier winzige Zahlen.
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
    .warte-zeit {
        margin-left: 0;
        width: 100%;
    }

    .ueb-zaehler {
        gap: 1rem 1.25rem;
    }

    .ueb-zaehler-eintrag {
        min-width: 5.5rem;
    }

    .warte-aktionen .btn-primaer,
    .warte-aktionen .btn-sekundaer {
        flex: 1 1 8rem;
    }
}


/* =====================================================================
   Die drei Auftragsseiten: Nachrichten, Bewerbungen, Dokumente
   =====================================================================
   Gleiche Palette, gleiche Radien. Nichts Neues eingefuehrt.

   Nachgemessen am 2026-09-30: es gab keine dieser Seiten. Die Links
   im Dashboard zeigten auf API-Pfade und oeffneten JSON.
   */

.auftrag-seite {
    padding-bottom: 4rem;
}

.auftrag-titel {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem;
}

.auftrag-hinweis {
    font-size: var(--text-md);
    color: var(--grau-600);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.auftrag-hinweis.klein {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

/* ---------------------------------------------------------------------
   Nachrichten
   ---------------------------------------------------------------------
   Die eigene Nachricht steht rechts und ist betont. Fremde links.
   Der Unterschied ist an der Seite ablesbar, nicht nur an einer
   Farbe -- wer farbenblind ist, sieht ihn trotzdem.
   --------------------------------------------------------------------- */
.nachricht-liste {
    margin-bottom: 1.5rem;
}

.nachricht-verlauf {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: .5rem;
}

.nachricht {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: .875rem 1.125rem;
    max-width: 85%;
}

.nachricht.eigen {
    align-self: flex-end;
    background: rgba(184, 148, 79, .07);
    border-color: rgba(184, 148, 79, .3);
}

.nachricht-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    align-items: baseline;
    margin-bottom: .375rem;
}

.nachricht-absender {
    font-weight: 600;
    color: var(--navy);
    font-size: var(--text-md);
}

.nachricht-rolle {
    font-size: var(--text-xs);
    color: var(--gold);
    background: rgba(184, 148, 79, .12);
    padding: .125rem .5rem;
    border-radius: 4px;
}

.nachricht-zeit {
    font-size: var(--text-sm);
    color: var(--gray-light);
    margin-left: auto;
}

.nachricht-text {
    margin: 0;
    line-height: 1.6;
    /* Ein langes Wort darf das Feld nicht aufreissen. */
    overflow-wrap: anywhere;
}

.nachricht-form {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: 1.25rem;
}

.feld-label {
    display: block;
    font-size: var(--text-md);
    font-weight: 500;
    color: var(--navy);
    margin-bottom: .5rem;
}

#nachricht-text,
.dokument-upload input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    padding: .75rem;
    border: 1px solid rgba(10, 15, 26, .2);
    border-radius: 4px;
    font-family: inherit;
    font-size: var(--text-base);
    /* Auf dem Telefon 16px: kleinere Schrift loest in Safari den
       Zoom beim Fokussieren aus. */
}

#nachricht-text {
    resize: vertical;
    min-height: 5rem;
}

#nachricht-text:focus-visible,
.dokument-upload input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.nachricht-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: .875rem;
}

.nachricht-hinweis {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

/* ---------------------------------------------------------------------
   Bewerbungen
   --------------------------------------------------------------------- */
.bewerbung-gruppe {
    margin-bottom: 2rem;
}

.bewerbung-gruppe-titel {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 .75rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold);
}

.bewerbung-gruppe-liste {
    display: grid;
    gap: 1rem;
}

.bewerbung-karte {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: 1.25rem;
}

/* Eine angenommene Bewerbung ist erledigt: zurueckgenommen. */
.bewerbung-karte.angenommen {
    border-left: 3px solid var(--gruen);
}

.bewerbung-karte.abgelehnt {
    opacity: .65;
}

.bewerbung-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .625rem;
}

.bewerbung-gewerk {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.bewerbung-wer {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    font-size: var(--text-md);
}

.bewerbung-name {
    font-weight: 600;
    color: var(--navy);
}

.bewerbung-zahl,
.bewerbung-team,
.bewerbung-zeit {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

.bewerbung-bewertung {
    font-size: var(--text-md);
    color: var(--gold);
    font-weight: 500;
    margin: .5rem 0 0;
}

.bewerbung-motivation {
    margin: .625rem 0 0;
    line-height: 1.6;
    color: var(--grau-700);
    font-size: var(--text-md);
}

.bewerbung-aktionen {
    display: flex;
    gap: .625rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Dokumente
   --------------------------------------------------------------------- */
.dokument-upload {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.dokument-upload input[type="file"] {
    margin-bottom: 1rem;
    font-size: var(--text-md);
}

.dokument-liste {
    display: grid;
    gap: .75rem;
}

.dokument-karte {
    background: var(--white);
    border: 1px solid rgba(10, 15, 26, .1);
    border-radius: 4px;
    padding: 1rem 1.25rem;
}

.dokument-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    margin-bottom: .5rem;
}

.dokument-name {
    font-weight: 600;
    color: var(--navy);
    /* Ein Dateiname kann sehr lang sein. */
    overflow-wrap: anywhere;
}

.dokument-groesse {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

.dokument-fuss {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.dokument-zeit {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

.dokument-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: .875rem;
    align-items: center;
}

.dokument-von {
    font-size: var(--text-sm);
    color: var(--gray-light);
}

/* ---------------------------------------------------------------------
   Mobil
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
    .nachricht {
        max-width: 92%;
    }

    .nachricht-verlauf {
        /* Auf dem Telefon gibt es kein 60vh-Fenster -- das heisst
           Bildschirm. Der Verlauf waere ein fingerbreiter Streifen. */
        max-height: none;
    }

    .nachricht-aktionen {
        flex-direction: column;
        align-items: stretch;
    }

    .nachricht-aktionen .btn-primaer {
        width: 100%;
    }

    .nachricht-aktionen .nachricht-hinweis {
        order: 2;
    }

    .bewerbung-aktionen .btn-primaer,
    .bewerbung-aktionen .btn-sekundaer,
    .dokument-upload .btn-primaer {
        flex: 1 1 100%;
    }

    .dokument-fuss {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Der Auftragskopf ueber dem Inhalt. Alle drei Seiten zeigen ihn.
   Ohne ihn steht eine Liste von Bewerbungen da, und der Nutzer
   weiss nicht, worauf sie sich beziehen.
   Nachgemessen am 2026-09-30: der Kopf fehlte auf allen drei. */
.auftrag-kopf {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: baseline;
    padding: .875rem 1.125rem;
    margin: 0 0 1.5rem;
    background: rgba(184, 148, 79, .06);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
}

.auftrag-kopf:empty {
    display: none;
}

.auftrag-kopf-titel {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--navy);
}

.auftrag-kopf-ort {
    font-size: var(--text-md);
    color: var(--gray-light);
}

.auftrag-kopf-laden {
    font-size: var(--text-md);
    color: var(--gray-light);
}

/* Tastaturnutzer: Sprunglink vor der Navigation (WCAG 2.4.1) */
.skip-link{position:absolute;left:-9999px;top:0;z-index:101;background:var(--red);color:var(--white);
  padding:.85rem 1.4rem;font-weight:600;text-decoration:none;border-radius:0 0 .4rem 0}
.skip-link:focus{left:0;outline:2px solid var(--white);outline-offset:2px}

/* ============================================================
   mein-konto/: Klassen fuer die vom JS gerenderten Zustaende.
   Vorher standen diese Stile inline im HTML oder als cssText im
   JS -- und ein Teil der Klassen (comm-*, stats-*) hatte
   ueberhaupt keine Regeln, die Ansichten standen ohne Abstand.
   ============================================================ */

/* --- Abo-Karte (Mitgliedschaft) --- */
.abo-preiskarten { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.abo-karte { flex: 1 1 220px; padding: 1rem; border: 1px solid rgba(148,163,184,.25); border-radius: var(--radius); }
.abo-karten-titel { margin: 0 0 .35rem; font-size: var(--text-base); }
.abo-preis { margin: 0 0 .35rem; font-weight: 600; }
.abo-preis-hinweis { margin: 0; font-size: var(--text-sm); color: var(--gray-light); }
.abo-widerruf { display: flex; gap: .6rem; align-items: flex-start; max-width: 44rem; margin: 1rem 0 0; font-size: var(--text-sm); color: var(--gray-light); line-height: 1.6; }
.abo-widerruf-check { margin-top: .2rem; flex: 0 0 auto; }
.abo-kuendigen-zeile { margin: 1rem 0 0; }
.abo-label { display: block; font-weight: 600; margin-bottom: .4rem; }
.abo-form-zeile { display: flex; gap: .6rem; flex-wrap: wrap; }
.abo-eingabe { flex: 1 1 240px; padding: .65rem .8rem; border-radius: var(--radius); border: 1px solid rgba(148,163,184,.35); background: transparent; color: inherit; font-size: var(--text-base); }
.abo-hinweis { margin: .5rem 0 0; font-size: var(--text-sm); color: var(--gray-light); }
.abo-meldung { margin: .6rem 0 0; font-size: var(--text-sm); }

/* --- Meine Daten (Auskunft / Loeschung) --- */
.daten-aktionszeile { margin: 1rem 0 0; }
.daten-export-meldung { margin-left: .6rem; font-size: var(--text-sm); color: var(--gray-light); }
.loesch-box { margin-top: 1.5rem; padding: 1rem; border: 1px solid rgba(214,63,47,.35); border-radius: var(--radius); }
.loesch-titel { margin: 0 0 .4rem; font-size: var(--text-base); color: var(--white); }
.loesch-text { margin: 0 0 .8rem; font-size: var(--text-sm); color: var(--gray-light); }
.feld-label { display: block; font-size: var(--text-sm); margin-bottom: .3rem; }
.feld-label-gerueckt { margin-top: .6rem; }
.eingabe-breit { width: 100%; max-width: 22rem; padding: .55rem .7rem; border-radius: var(--radius); border: 1px solid rgba(148,163,184,.35); background: transparent; color: inherit; }
.loesch-zeile { margin: .8rem 0 0; }
.btn-primary.btn-rot, .btn-primary.btn-rot:hover { background: var(--red-dark); }
.btn-primary.btn-rot { border-color: rgba(214,63,47,.45); }
.daten-meldung { margin: .6rem 0 0; font-size: var(--text-sm); }

/* --- Meldungen- und Merkliste-Reiter --- */
.tab-titel { font-family: 'Space Grotesk', sans-serif; color: var(--white); margin: 0 0 1rem; }
.tab-kopfzeile { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.tab-kopfzeile .tab-titel { margin: 0; }
.tab-status { color: var(--gray-light); font-size: var(--text-md); }
.tab-liste { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.meldungen-badge { display: inline-block; min-width: 1.2rem; padding: 0 .3rem; margin-left: .3rem; border-radius: 999px; background: var(--red); color: var(--white); font-size: var(--text-xs); line-height: 1.2rem; text-align: center; }
/* hidden muss auch gegen die eigene display-Regel gewinnen, sonst
   bleibt das leere Badge dauerhaft sichtbar. */
.meldungen-badge[hidden] { display: none; }
.mel-eintrag { border: 1px solid rgba(255,255,255,.12); border-left: 3px solid rgba(255,255,255,.15); border-radius: 6px; padding: .8rem 1rem; background: transparent; }
.mel-eintrag.ungelesen { border-left: 3px solid var(--gold); background: rgba(184,148,79,.06); }
.mel-titel { color: var(--white); font-weight: 600; text-decoration: none; display: block; }
.mel-text { color: var(--gray-light); font-size: var(--text-md); margin: .25rem 0; }
.mel-zeit { color: var(--gray); font-size: var(--text-sm); }
.merk-eintrag { border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: .85rem 1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.merk-infos { display: block; }
.merk-titel { color: var(--white); font-weight: 600; text-decoration: none; display: block; }
.merk-meta { color: var(--gray-light); font-size: var(--text-sm); }
.merk-entfernen { font-size: var(--text-sm); padding: .35rem .8rem; min-height: 0; }

/* --- Einstellungen: Meldungsbox und Knoepfe --- */
.msg-box { margin: 1rem 0; padding: .75rem; border-radius: var(--radius-sm); }
.benachrichtigung-zeile { margin-top: .5rem; }
.benachrichtigung-label { font-weight: normal; color: var(--gray-light); }
.karten-untertitel { font-size: var(--text-sm); margin: 0 0 1rem; }
.knopf-zeile { display: flex; gap: 1rem; flex-wrap: wrap; }
.knopf-flex { flex: 1; }

/* --- Passwort-Modal (konto.js) --- */
.cp-error { color: var(--red); margin-bottom: 1rem; font-size: var(--text-md); }
.cp-error-ok { color: var(--green-light); }
.cp-gruppe { margin-bottom: 1rem; }
.cp-gruppe-letzte { margin-bottom: 1.5rem; }
.cp-label { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--gold); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .5px; font-family: 'Space Grotesk', system-ui, sans-serif; }
.cp-input { width: 100%; padding: .9rem 1.2rem; border: 1px solid rgba(214,63,47,.2); border-radius: var(--radius); font-size: var(--text-base); background: rgba(0,0,0,.3); color: var(--white); font-family: 'Inter', sans-serif; font-weight: 300; }
.cp-submit { width: 100%; padding: .9rem 2rem; background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: var(--white); border: 1px solid rgba(214,63,47,.3); border-radius: 30px; font-size: var(--text-md); font-weight: 600; font-family: 'Space Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; box-shadow: 0 8px 32px rgba(214,63,47,.25); }

/* --- Feldfehler: rote Umrandung + Text direkt am Feld --- */
.feld-fehler, .feld-fehler:focus { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(214,63,47,.3) !important; }
.field-error-text { color: var(--red); font-size: var(--text-sm); margin: .4rem 0 0; }

/* --- Kommunikation: Kanaele, Threads, Blasen --- */
.comm-channel-title { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.comm-channel-tag { font-size: .7rem; color: var(--gray-light); border: 1px solid rgba(148,163,184,.3); border-radius: 999px; padding: .1rem .6rem; }
.comm-channel-desc { font-size: var(--text-sm); color: var(--gray-light); margin: .25rem 0 1rem; }
.comm-thread-list { display: grid; gap: .5rem; }
.comm-thread-card { border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: .7rem 1rem; background: rgba(0,0,0,.25); cursor: pointer; transition: var(--transition); }
.comm-thread-card:hover, .comm-thread-card:focus-visible { border-color: rgba(184,148,79,.6); }
.comm-thread-card .comm-thread-title { margin: 0; font-size: var(--text-base); color: var(--white); }
.comm-thread-meta { margin: .15rem 0 0; font-size: var(--text-sm); color: var(--gray); }
.comm-thread { margin-top: 1rem; }
.comm-thread-title { margin: 0 0 .3rem; font-size: var(--text-base); color: var(--white); }
.comm-thread-partner { font-size: var(--text-sm); color: var(--gray-light); margin: 0 0 .6rem; }
.comm-messages { display: grid; gap: .5rem; max-height: 24rem; overflow-y: auto; }
.comm-msg { border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: .6rem .8rem; background: rgba(0,0,0,.3); }
.comm-msg-self { border-color: rgba(184,148,79,.4); background: rgba(184,148,79,.07); }
.comm-msg-head { font-size: var(--text-xs); color: var(--gray); margin-bottom: .2rem; }
.comm-msg-text { margin: 0; font-size: var(--text-md); color: var(--gray-light); white-space: pre-wrap; word-break: break-word; }
.comm-form-label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--gray-light); margin: .5rem 0 .3rem; }
.comm-form .form-input { width: 100%; padding: .7rem; background: rgba(0,0,0,.3); border: 1px solid rgba(214,63,47,.2); border-radius: var(--radius-sm); color: var(--white); font-size: var(--text-md); }
.comm-loading { color: var(--gray-light); font-size: var(--text-md); margin: .5rem 0; }
.comm-error { color: var(--red); font-size: var(--text-md); margin: .5rem 0; }

/* --- Kennzahlen: Laden, leer, Luecken, Profilhinweis --- */
.stats-loading { color: var(--gray-light); font-size: var(--text-md); margin: .5rem 0; }
.stats-empty { color: var(--gray-light); font-size: var(--text-md); margin: .5rem 0; }
.stats-gaps { margin: 1rem 0; }
.stats-gap-note { font-size: var(--text-sm); color: var(--gray); border: 1px dashed rgba(148,163,184,.3); border-radius: var(--radius); padding: .7rem 1rem; }
.profile-hint { margin: 1rem 0; border: 1px solid rgba(184,148,79,.35); border-radius: var(--radius); padding: 1rem; }
.profile-hint-text { font-size: var(--text-md); color: var(--gray-light); margin: 0 0 .5rem; }
.profile-hint-list { list-style: disc; margin: 0 0 1rem 1.2rem; font-size: var(--text-md); color: var(--white); }

/* --- Gewerkprofil (gewerk.js) --- */
.gewerk-hinweis { font-size: var(--text-sm); }
.gewerk-feldgruppe { border: none; padding: 0; margin: 0; }
.gewerk-feldgruppe legend { font-weight: 600; margin-bottom: .5rem; color: var(--white); }
.gewerk-zeile { margin-top: .25rem; }
.gewerk-zeile-label { font-weight: normal; color: var(--gray-light); }
.gewerk-speichern { margin-top: 1rem; }

/* --- 2FA-Modal (2fa.js) --- */
.2fa-modal-overlay { align-items: center; justify-content: center; padding: 1rem; }
.2fa-modal-box { max-width: 420px; }
.2fa-hinweis { font-size: var(--text-sm); margin: 0 0 1rem; }
.2fa-qrbox { text-align: center; margin-bottom: 1rem; }
.2fa-qr-img { max-width: 200px; max-height: 200px; border: 1px solid rgba(148,163,184,.3); border-radius: 8px; padding: 8px; }
.2fa-geheimnis { padding: .75rem; margin-bottom: 1rem; font-family: monospace; font-size: var(--text-sm); word-break: break-all; text-align: center; }
.2fa-geheimnis-label { font-size: .7rem; color: var(--gray-light); margin-bottom: .35rem; font-family: 'Inter', sans-serif; }
.2fa-backup { background: rgba(184,148,79,.1); border: 1px solid var(--gold); padding: .75rem; border-radius: var(--radius); margin-bottom: 1rem; }
.2fa-backup-label { font-size: .7rem; color: var(--gold); margin-bottom: .35rem; }
.2fa-backup-liste { font-family: monospace; font-size: var(--text-sm); line-height: 1.6; color: var(--gray); }
.2fa-ok { background: rgba(184,148,79,.1); border: 1px solid var(--gold); padding: .75rem; border-radius: var(--radius); margin-top: 1rem; font-size: var(--text-sm); }
.2fa-submit { width: 100%; }

/* Design-Pass: Fallback-Zustaende (.ds-leer) sind jetzt h2. */
.ds-leer h2 { color: var(--white); margin-bottom: .5rem; }
.ds-leer .btn-primary { margin-top: 1.5rem; display: inline-flex; }

/* ================================================================
   Design-Pass 2026-10-29 — Inline-Styles -> Klassen
   ================================================================ */

/* shipping.html (Widerrufsformular) */
.ds-shipping-grid{margin-top:var(--space-5)}
.ds-shipping-checklist{margin-top:var(--space-6)}
.ds-shipping-checklist2{margin-top:var(--space-5)}
.ds-widerruf-panel{margin-top:var(--space-6);background:rgba(0,0,0,.3);padding:var(--space-5);border-radius:var(--radius-lg);border:1px solid rgba(214,63,47,.1)}
.ds-widerruf-panel h3{color:var(--white);margin-bottom:var(--space-4);font-family:'Space Grotesk',sans-serif}
.ds-widerruf-panel p{color:var(--gray-light);margin-bottom:var(--space-4)}
.ds-widerruf-feld{flex:1}
.ds-widerruf-label{display:block;color:var(--gray-light);font-size:var(--text-sm);margin-bottom:.4rem;text-transform:uppercase;letter-spacing:.5px}
.ds-widerruf-input{background:rgba(0,0,0,.3);border-color:rgba(214,63,47,.3)}
.ds-widerruf-zeile{margin-top:var(--space-4)}
.ds-widerruf-fuss{margin-top:var(--space-4);font-size:var(--text-sm);color:var(--gray);text-align:right}

/* guthabenkarte.html */
.ds-gk-einleitung{max-width:46rem;margin:0 auto var(--space-4);text-align:center;color:var(--gray-light)}
.ds-gk-schritte{max-width:44rem;margin:var(--space-5) auto var(--space-6);line-height:1.9;color:var(--gray-light)}
.ds-gk-form{max-width:34rem;margin:0 auto;text-align:left}
.ds-gk-fieldset{border:1px solid rgba(148,163,184,.25);border-radius:var(--radius);padding:var(--space-4) 1.2rem;margin-bottom:var(--space-4)}
.ds-gk-legend{padding:0 .4rem;color:var(--white);font-weight:600}
.ds-gk-radio{display:flex;gap:.6rem;align-items:center;margin:.35rem 0}
.ds-gk-label{display:block;font-weight:600;margin-bottom:.35rem}
.ds-gk-label-ab{display:block;font-weight:600;margin:var(--space-4) 0 .35rem}
.ds-gk-input{width:100%;padding:.6rem .8rem;border-radius:var(--radius);border:1px solid rgba(148,163,184,.35);background:transparent;color:inherit}
.ds-gk-check{display:flex;gap:.6rem;align-items:flex-start;margin:var(--space-4) 0;font-size:var(--text-sm);color:var(--gray-light)}
.ds-gk-check input{margin-top:.25rem}
.ds-gk-msg-err{margin:var(--space-4) 0 0;color:var(--badge-text-rot)}
.ds-gk-msg-ok{margin:var(--space-4) 0 0;color:var(--badge-text-gruen)}
.ds-gk-fuss{max-width:44rem;margin:var(--space-6) auto 0;text-align:center;font-size:var(--text-sm);color:var(--gray-light)}

/* bauauftraege/neu.html */
.ds-eng{max-width:800px;padding-top:var(--space-7)}
.ds-neu-form .form-group,.ds-neu-form .form-row{margin-bottom:var(--space-4)}
.ds-zurueck{margin-bottom:var(--space-5)}
.account-card h1{margin:0 0 var(--space-5)}

.ds-neu-aktionen{flex-wrap:wrap}

/* Marktplatz-Tabellen: Budget (Spalte 4) und Angebot (Spalte 6) rechtsbuendig */
.ds-num-table th:nth-child(4),.ds-num-table td:nth-child(4),.ds-num-table th:nth-child(6),.ds-num-table td:nth-child(6){text-align:right}

/* =====================================================================
   Bauleitung-UI (bhx-): Dashboard, Bauzeitenplan, Abnahme
   ---------------------------------------------------------------------
   Neue Seiten mein-konto/dashboard.html, bauzeitenplan.html,
   abnahme.html. Vorgaben: Karten mit 1px-Rand und wenig Schatten,
   Weissraum auf der 4/8/12/16/24-Skala, Zahlen rechtsbuendig mit
   tabular-nums, Status als kleine Pille, Buttons inline-flex und
   NIE vollbreit (ausser dem Abschluss echter Formulare, und auch
   dort nur, wo es das Formular verlangt). Nur Tokens aus :root,
   keine neuen Farben.
   ===================================================================== */

/* --- Seitenrahmen und Kopf -------------------------------------- */
.bhx-haupt { padding-top: var(--space-5); }

.bhx-kopf {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: baseline; justify-content: space-between;
  margin: 0 0 24px;
}
.bhx-titel {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem; font-weight: 600; color: var(--white);
  margin: 0;
}
.bhx-untertitel { color: var(--gray); font-size: var(--text-md); margin: 4px 0 0; }

.bhx-zurueck {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold); font-size: var(--text-sm); text-decoration: none;
  margin: 0 0 12px;
}
.bhx-zurueck:hover, .bhx-zurueck:focus { color: var(--gold-light); }

/* --- Karte: 1px-Rand, kein Schatten ----------------------------- */
.bhx-karte {
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(184, 148, 79, .16);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.bhx-karte + .bhx-karte { margin-top: 16px; }
.bhx-karte-kopf {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.bhx-karte-titel {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.05rem; font-weight: 600; color: var(--white);
  margin: 0;
}
.bhx-karte-meta { color: var(--gray); font-size: var(--text-sm); margin: 0; }

/* --- Kennzahlenzeile („Auf einen Blick") ------------------------- */
.bhx-kpi-zeile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.bhx-kpi {
  border: 1px solid rgba(214, 63, 47, .14);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, .45);
  padding: 16px;
}
.bhx-kpi-zahl {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.6rem; font-weight: 600; color: var(--white);
  line-height: 1.2; text-align: right;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
}
.bhx-kpi-label {
  display: block; margin-top: 8px;
  font-size: var(--text-xs); letter-spacing: .5px;
  text-transform: uppercase; color: var(--gray);
}

/* --- Zwei Spalten: Auftraege links, Regionalarm rechts ---------- */
.bhx-raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.bhx-spalte { min-width: 0; }

/* --- Fortschrittsbalken ------------------------------------------ */
.bhx-fortschritt {
  height: 6px; border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
  margin-top: 8px;
}
.bhx-fortschritt-balken {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-muted), var(--gold));
  transition: width .4s cubic-bezier(.25, .46, .45, 1);
}

/* --- Statuspillen ------------------------------------------------ */
.bhx-pille {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 500; letter-spacing: .4px;
  white-space: nowrap; line-height: 1.6;
}
.bhx-pille-gold  { color: var(--gold); border: 1px solid rgba(184, 148, 79, .4); background: rgba(184, 148, 79, .08); }
.bhx-pille-rot   { color: var(--red-light); border: 1px solid rgba(214, 63, 47, .35); background: rgba(214, 63, 47, .08); }
.bhx-pille-gruen { color: var(--green-light); border: 1px solid rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.bhx-pille-grau  { color: var(--gray-light); border: 1px solid rgba(148, 163, 184, .35); background: rgba(148, 163, 184, .08); }

/* --- Aktionszeilen: nebeneinander wenn Platz, sonst untereinander */
.bhx-aktionen {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.bhx-aktionen.oben { margin-top: 12px; }
.bhx-aktionen.rechts { justify-content: flex-end; }

/* --- Zahlen rechtsbuendig, tabular ------------------------------- */
.bhx-zahl {
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
  text-align: right; white-space: nowrap;
}
.bhx-betrag { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 500; color: var(--white); }

/* --- Definitionszeilen in Karten --------------------------------- */
.bhx-dl { margin: 12px 0 0; }
.bhx-dl-zeile {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 6px 0; border-bottom: 1px solid rgba(214, 63, 47, .08);
  font-size: var(--text-sm);
}
.bhx-dl-zeile:last-child { border-bottom: 0; }
.bhx-dl-label { color: var(--gray); }
.bhx-dl-wert { color: var(--white); }
.bhx-dl-wert.rot { color: var(--red-light); }
.bhx-dl-wert.gruen { color: var(--green-light); }
.bhx-dl-wert.gold { color: var(--gold); }

/* --- Listenzeilen (Abschnitte, Maengel, Angebote) ---------------- */
.bhx-liste { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.bhx-zeile {
  border: 1px solid rgba(184, 148, 79, .14);
  border-left: 3px solid rgba(184, 148, 79, .45);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, .35);
  padding: 14px 16px;
}
.bhx-zeile.verzug { border-left-color: rgba(214, 63, 47, .6); }
.bhx-zeile-kopf {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  align-items: center; justify-content: space-between;
}
.bhx-zeile-titel { font-weight: 600; color: var(--white); font-size: var(--text-base); }
.bhx-zeile-daten { color: var(--gray); font-size: var(--text-sm); }
.bhx-verzug-text { color: var(--red-light); font-weight: 500; font-size: var(--text-sm); }
.bhx-zeile-notiz {
  color: var(--gray-light); font-size: var(--text-sm);
  margin-top: 8px; white-space: pre-line;
}

/* --- Summenzeile Bauzeitenplan ----------------------------------- */
.bhx-summen {
  display: flex; flex-wrap: wrap; gap: 24px;
  border: 1px solid rgba(184, 148, 79, .2);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, .35);
  padding: 16px;
}
.bhx-summen-eintrag { flex: 1 1 130px; min-width: 130px; }
.bhx-summen-label {
  display: block; font-size: var(--text-xs); letter-spacing: .5px;
  text-transform: uppercase; color: var(--gray); margin-bottom: 4px;
}
.bhx-summen-wert {
  display: block; font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.3rem; font-weight: 600; color: var(--white); text-align: right;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
}
.bhx-summen-wert.rot { color: var(--red-light); }

/* --- Meldungen: Fehler, Gruen, Gold ------------------------------ */
.bhx-fehler {
  border: 1px solid rgba(214, 63, 47, .3);
  background: rgba(214, 63, 47, .08);
  border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--red-light);
  font-size: var(--text-md);
}
.bhx-fehler .bhx-aktionen { margin-top: 10px; }
.bhx-gruen {
  border: 1px solid rgba(74, 222, 128, .3);
  background: rgba(74, 222, 128, .08);
  border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--green-light);
  font-size: var(--text-md);
}
.bhx-gold {
  border: 1px solid rgba(184, 148, 79, .3);
  background: rgba(184, 148, 79, .08);
  border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--gold-light);
  font-size: var(--text-md);
}
.bhx-blockiert-titel { font-weight: 600; margin: 0 0 6px; }

/* --- Anmeldung noetig / leerer Zustand ---------------------------- */
.bhx-anmeldung {
  max-width: 560px; margin: 48px auto;
  border: 1px solid rgba(184, 148, 79, .25);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, .45);
  padding: 24px;
}
.bhx-anmeldung-titel { margin: 0 0 8px; color: var(--white); font-size: 1.15rem; }
.bhx-anmeldung-text { color: var(--gray-light); margin: 0 0 16px; font-size: var(--text-md); }

.bhx-leer {
  border: 1px dashed rgba(184, 148, 79, .3);
  border-radius: var(--radius-sm);
  padding: 24px; color: var(--gray); font-size: var(--text-md);
}
.bhx-leer-titel { color: var(--white); font-weight: 600; margin: 0 0 4px; }
.bhx-leer .bhx-aktionen { margin-top: 12px; }

/* --- Formulare ---------------------------------------------------- */
.bhx-form { margin-top: 16px; }
.bhx-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.bhx-form-breit { grid-column: 1 / -1; }
.bhx-label {
  display: block; margin: 0 0 4px;
  font-size: var(--text-sm); color: var(--gray-light);
}
.bhx-pflicht { color: var(--gold); }
.bhx-eingabe {
  width: 100%; min-height: 44px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(214, 63, 47, .2);
  border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--white);
  font-size: var(--text-base); font-family: inherit;
}
.bhx-eingabe:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(214, 63, 47, .3);
}
textarea.bhx-eingabe { min-height: 96px; resize: vertical; }
.bhx-form-meldung { margin: 10px 0 0; font-size: var(--text-sm); min-height: 1.2em; }
.bhx-form-meldung.ok { color: var(--green-light); }
.bhx-form-meldung.fehler { color: var(--red-light); }

/* --- Regionalarm --------------------------------------------------- */
.bhx-schalter-zeile {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.bhx-switch {
  position: relative; width: 46px; height: 24px; flex: 0 0 auto;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, .4);
  background: rgba(148, 163, 184, .2);
  cursor: pointer; padding: 0; transition: var(--transition);
}
.bhx-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gray-light); transition: var(--transition);
}
.bhx-switch.an {
  background: rgba(74, 222, 128, .22);
  border-color: rgba(74, 222, 128, .5);
}
.bhx-switch.an::after { left: 24px; background: var(--green-light); }
.bhx-switch:disabled { opacity: .45; cursor: not-allowed; }
.bhx-switch-stand { color: var(--gray-light); font-size: var(--text-sm); margin: 0; }

.bhx-regionen-eingabe { margin-top: 12px; }

/* --- Skeleton beim Laden ------------------------------------------- */
.bhx-skeleton {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius-sm);
}
.bhx-skeleton::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent);
  animation: bhx-flimmern 1.4s infinite;
}
@keyframes bhx-flimmern { to { transform: translateX(100%); } }
.bhx-skeleton-karte { height: 148px; }
.bhx-skeleton-kpi { height: 76px; }
.bhx-skeleton-zeile { height: 16px; margin-top: 8px; }
.bhx-skeleton-kurz { width: 40%; }

/* --- Responsiv ------------------------------------------------------
   390 px: zwei KPI je Zeile, Karten schmaler, Raster einspaltig.
   Buttons bleiben inline-flex -- keine width:100%-Regel existiert. */
@media (max-width: 900px) {
  .bhx-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .bhx-kpi-zeile { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bhx-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .bhx-karte { padding: 16px; }
  .bhx-kpi { padding: 12px 14px; }
  .bhx-kpi-zahl { font-size: 1.35rem; }
  .bhx-titel { font-size: 1.5rem; }
}

/* ===== Zahlenfelder ohne Spinner =====
   Die kleinen Pfeile (▲▼) sind je nach Browser unterschiedlich groß, grau und
   liegen über dem Text. Wer „Anzahl Personen" eintippt, braucht sie nicht —
   auf dem Telefon sind sie ohnehin nicht erreichbar. Deshalb überall aus;
   die Zahl wird getippt, nicht geklickt. */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* ===== Kopfmenü auf dem Telefon =====
   Die Punkte (Startseite, Auftragsmarkt, Baufinanzierung …) liefen bei 390 px
   rechts aus dem Bild und wurden abgeschnitten — sichtbar auf jeder Seite.
   Jetzt eine waagerecht wischbare Leiste ohne Umbruch: nichts wird
   abgeschnitten, und die Kopfzeile bleibt einzeilig. */
@media (max-width: 760px) {
    .site-header .nav-account,
    .site-header nav,
    .hdr .nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: .25rem;
        padding-bottom: 2px;
    }
    .site-header .nav-account::-webkit-scrollbar,
    .site-header nav::-webkit-scrollbar,
    .hdr .nav::-webkit-scrollbar { display: none; }
    .site-header .nav-link,
    .site-header .nav a,
    .hdr .nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Wischleiste im Kopf: ein weicher Rand rechts zeigt, dass es weitergeht.
   Ohne den sieht der abgeschnittene letzte Punkt wie ein Fehler aus. */
@media (max-width: 760px) {
    .site-header .nav-account,
    .site-header nav {
        -webkit-mask-image: linear-gradient(to right, #000 0, #000 88%, transparent 100%);
        mask-image: linear-gradient(to right, #000 0, #000 88%, transparent 100%);
    }
}

/* --- nav untereinander --- */
@media (max-width: 760px) {
    .site-header .nav-account,
    .site-header nav,
    nav.nav-account,
    nav,
    .hdr .nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
        gap: 2px !important;
        padding: 6px 0 !important;
        position: static !important;
        height: auto !important;
    }
    .site-header .nav-account::-webkit-scrollbar { display: none; }
    .site-header .nav-link,
    .site-header .nav a,
    .hdr .nav a {
        flex: 0 0 auto;
        white-space: normal;
        padding: 7px 10px;
        border-radius: 3px;
    }
    .site-header .nav-link.active { background: rgba(214,63,47,.12); }
    /* die Fade-Maske der Wischleiste ist hier sinnlos */
    .site-header .nav-account,
    .site-header nav { -webkit-mask-image: none; mask-image: none; }
}

/* --- nav im Fluss (mobil, Kontoseiten) --- */
@media (max-width: 760px) {
  nav.nav-im-fluss {
    position: static !important;
    background: #0a0f1a;
    border-bottom: 1px solid #241a2e;
    padding: 4px 10px 8px;
  }
}


/* ===== Reiterleiste im Konto (Neufassung 2026-11-14) =====
   Vorher: .account-tabs stapelte acht weisse Knoepfe untereinander — auf
   390 px nahm die Leiste den halben Bildschirm ein und sah wie ein Menue
   aus einem anderen Programm aus. Gemessen: 8 Knoepfe, je 44 px, alle
   untereinander statt nebeneinander.
   Jetzt: eine Zeile, waagerecht scrollbar, ruhige Beschriftung, aktiver
   Bereich mit Linie darunter. Kein Knopf-Look, keine zweite Navigation. */
.account-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: .15rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 1.25rem 0 1rem !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.account-tabs::-webkit-scrollbar { height: 3px; }
.account-tabs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18); border-radius: 2px;
}
.account-tabs .account-tab-button {
  flex: 0 0 auto !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: var(--gray-light, #9aa7b4) !important;
  font-size: .86rem !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  padding: .6rem .75rem !important;
  min-height: 44px !important;
  height: auto !important;
  width: auto !important;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  box-shadow: none !important;
}
.account-tabs .account-tab-button:hover,
.account-tabs .account-tab-button:focus-visible {
  color: #fff !important;
  background: rgba(255,255,255,.05) !important;
}
.account-tabs .account-tab-button.active,
.account-tabs .account-tab-button[aria-selected="true"] {
  color: #fff !important;
  border-bottom-color: var(--accent-gold, #e0b25c) !important;
}
@media (max-width: 640px) {
  .account-tabs { margin: 1rem -1rem .75rem !important; padding: 0 1rem !important; }
  .account-tabs .account-tab-button { font-size: .8rem !important; padding: .55rem .6rem !important; }
}
