:root {
  /* Farben von herzberg-relocation.de: Sand, Navy, Rot */
  --bg: #efebe3;
  --flaeche: #ffffff;
  --flaeche-2: #f4f1ea;
  --text: #2b2723;
  --text-2: #5c554d;
  --linie: #e3ddd1;
  --akzent: #16294a;        /* Navy: Links, Knöpfe, Navigation */
  --akzent-hell: #e6eaf1;
  --marke-rot: #c00000;     /* Firmenrot: Logo, Überschriften-Akzent, aktive Navigation */
  --navy-tief: #0e1b2e;
  --ueberschrift: #1a2233;
  --warn: #9a4a0b;
  --warn-hell: #fdf0e3;
  --fehler: #9a0000;
  --fehler-hell: #fbe9e9;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(14, 27, 46, .06), 0 2px 8px rgba(14, 27, 46, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1b2e;
    --flaeche: #16243a;
    --flaeche-2: #1b2b44;
    --text: #ece8e1;
    --text-2: #a9b2c0;
    --linie: #2a3a54;
    --akzent: #9db8e3;
    --akzent-hell: #22365a;
    --marke-rot: #e05a5a;
    --ueberschrift: #f4f1ea;
    --warn: #f0b27a;
    --warn-hell: #3a2a1a;
    --fehler: #f19999;
    --fehler-hell: #3a1f1f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 72px;
}
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ueberschrift); font-family: Raleway, "Segoe UI", system-ui, sans-serif; font-weight: 600; }
h1 { font-size: 1.35rem; margin: 0 0 .25rem; }
.seitenkopf h1::after { content: ""; display: block; width: 36px; height: 3px; background: var(--marke-rot); border-radius: 2px; margin-top: 6px; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
h3 { font-size: .95rem; margin: 0 0 .4rem; }
.leise { color: var(--text-2); font-size: .88em; }
.nowrap { white-space: nowrap; }

/* Kopf und Navigation */
.kopf {
  background: var(--flaeche); border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 20;
}
.kopf-innen { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.kopf { border-bottom: 3px solid var(--marke-rot); }
.marke { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); white-space: nowrap; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.marke:hover { text-decoration: none; }
.marke img { height: 34px; width: auto; display: block; }
@media (prefers-color-scheme: dark) { .marke img { background: #fff; border-radius: 6px; padding: 3px 6px; } }
@media (max-width: 560px) { .marke img { height: 28px; } .marke span { display: none; } }
.nav-oben { display: none; gap: 4px; flex: 1; }
.nav-oben a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.nav-oben a.aktiv, .nav-oben a:hover { background: var(--akzent-hell); color: var(--akzent); text-decoration: none; }
.nav-oben a.aktiv { box-shadow: inset 0 -2px 0 var(--marke-rot); }
.kopf-rechts a.aktiv { color: var(--akzent); font-weight: 600; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.nav-unten {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--flaeche);
  border-top: 1px solid var(--linie); display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-unten a { text-align: center; padding: 8px 2px 9px; font-size: .72rem; color: var(--text-2); }
.nav-unten a b { display: block; font-size: 1.15rem; line-height: 1.2; font-weight: 400; }
.nav-unten a.aktiv { color: var(--akzent); font-weight: 600; box-shadow: inset 0 2px 0 var(--marke-rot); }
.nav-unten a.plus b { background: var(--marke-rot); color: var(--flaeche); border-radius: 50%; width: 28px; height: 28px;
  line-height: 28px; margin: 0 auto 1px; }
@media (min-width: 900px) {
  .nav-oben { display: flex; }
  .nav-unten { display: none; }
  body { padding-bottom: 0; }
}

main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

/* Karten, Raster */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px; margin-bottom: 14px; }
.karte-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.raster-2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .raster-2 { grid-template-columns: 1fr 1fr; } .raster-detail { grid-template-columns: 1.5fr 1fr; } }

/* Kennzahlen */
.kennzahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .kennzahlen { grid-template-columns: repeat(4, 1fr); } }
.kz { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--schatten); color: var(--text); }
a.kz:hover { text-decoration: none; border-color: var(--akzent); }
.kz .wert { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kz .etikett { font-size: .8rem; color: var(--text-2); }
.kz.hervor { border-color: var(--warn); background: var(--warn-hell); }
.kz.hervor .wert { color: var(--warn); }

/* Status-Plaketten */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.s-grau { background: #eceeec; color: #4a524e; }
.s-blau { background: #e2ecfa; color: #1f4f8f; }
.s-tuerkis { background: #daf1f0; color: #11645f; }
.s-hellgruen { background: #e5f4dc; color: #3c6b1f; }
.s-gruen { background: #cdebd3; color: #1b6331; }
.s-dunkelgruen { background: #1f6b3a; color: #fff; }
.s-violett { background: #ece5f8; color: #5a3a92; }
.s-gold { background: #f6e7b0; color: #6b4d00; border-color: #d9b949; }
.s-rot { background: #f8e0e0; color: #9b1c1c; }
.s-orange { background: #fde8d4; color: #94470c; }
.s-dunkelgrau { background: #5b635f; color: #fff; }
@media (prefers-color-scheme: dark) {
  .s-grau { background: #2f3532; color: #c5cbc7; }
  .s-blau { background: #1d2e45; color: #9cc1f2; }
  .s-tuerkis { background: #173a39; color: #8ad8d2; }
  .s-hellgruen { background: #233820; color: #b3dd96; }
  .s-gruen { background: #1b3a24; color: #8fd6a2; }
  .s-violett { background: #2e2540; color: #c7b3ec; }
  .s-rot { background: #3e2020; color: #f2a5a5; }
  .s-orange { background: #3d2a18; color: #f3b57c; }
  .s-gold { background: #3a3014; color: #ecd27a; border-color: #7a6420; }
}
.chip { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--flaeche-2); border: 1px solid var(--linie); font-size: .78rem; color: var(--text-2); }

/* Tabellen und Listen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 699px) {
  .tabelle.stapeln thead { display: none; }
  .tabelle.stapeln tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--linie); }
  .tabelle.stapeln tr:last-child { border-bottom: 0; }
  .tabelle.stapeln td { display: block; border: 0; padding: 2px 0; }
  .tabelle.stapeln td[data-l]::before { content: attr(data-l) ": "; color: var(--text-2); font-size: .8rem; }
}
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.liste > li:last-child { border-bottom: 0; }
.zwei-status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.zwei-status .leise { font-size: .72rem; }

/* Nachhaken */
.nachhak { display: grid; gap: 8px; }
.nachhak-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.kontakt { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf-kontakt { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--akzent); color: var(--akzent); font-weight: 600; background: var(--flaeche); min-height: 42px; }
.knopf-kontakt:hover { background: var(--akzent-hell); text-decoration: none; }
.wv-ueberfaellig { color: var(--fehler); font-weight: 600; }
.wv-heute { color: var(--warn); font-weight: 600; }
.stufe { font-size: .75rem; padding: 1px 6px; border-radius: 6px; background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.hinweis { background: var(--warn-hell); color: var(--warn); border-radius: 8px; padding: 8px 10px; font-size: .88rem; }

/* Formulare */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); min-height: 42px;
}
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.feld { margin-bottom: 12px; }
.feld .hilfe { font-size: .78rem; color: var(--text-2); margin-top: 2px; }
.feld .fehler, .errorlist { color: var(--fehler); font-size: .82rem; margin: 2px 0 0; padding: 0; list-style: none; }
.formraster { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .formraster { grid-template-columns: repeat(2, 1fr); } .formraster .breit { grid-column: 1 / -1; } }
.checkliste ul, .checkliste div { list-style: none; padding: 0; margin: 0; }
.checkliste label { display: flex; align-items: center; gap: 6px; font-weight: 400; color: var(--text); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--akzent); background: var(--akzent); color: var(--flaeche); font-weight: 600; cursor: pointer; min-height: 42px; text-decoration: none; }
.knopf:hover { filter: brightness(1.08); text-decoration: none; }
.knopf.zweit { background: var(--flaeche); color: var(--akzent); }
.knopf.klein { padding: 5px 10px; min-height: 34px; font-size: .85rem; }
.knopf.warn { background: var(--flaeche); color: var(--warn); border-color: var(--warn); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form select, .inline-form input { width: auto; min-width: 0; flex: 1 1 160px; }
details.aufklapp > summary { cursor: pointer; color: var(--akzent); font-weight: 600; list-style: none; padding: 4px 0; }
details.aufklapp > summary::-webkit-details-marker { display: none; }
details.aufklapp > summary::before { content: "▸ "; }
details.aufklapp[open] > summary::before { content: "▾ "; }

/* Filter */
.filter { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.filter .breit { grid-column: 1 / -1; }
@media (min-width: 900px) { .filter { grid-template-columns: 2fr repeat(5, 1fr) auto auto; align-items: end; } .filter .breit { grid-column: auto; } }
.filter label { font-size: .74rem; }
.filter-status { margin: -4px 0 12px; font-size: .85rem; }

/* Logbuch */
.logbuch { list-style: none; margin: 0; padding: 0; }
.logbuch li { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linie); }
.logbuch li:last-child { border-bottom: 0; }
.logbuch .zeit { font-size: .78rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.logbuch .kopfzeile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; }
.logbuch .art { font-weight: 600; }
.logbuch .inhalt { white-space: pre-line; margin-top: 2px; }

/* Meldungen */
.meldungen { list-style: none; padding: 0; margin: 0 0 14px; }
.meldungen li { padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; background: var(--akzent-hell); color: var(--akzent); }
.meldungen li.warning, .meldungen li.info { background: var(--warn-hell); color: var(--warn); }
.meldungen li.error { background: var(--fehler-hell); color: var(--fehler); }

.eckdaten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin: 0; }
@media (min-width: 700px) { .eckdaten { grid-template-columns: repeat(4, 1fr); } }
.eckdaten dt { font-size: .74rem; color: var(--text-2); }
.eckdaten dd { margin: 0; font-weight: 600; }
.zuordnung-block { border-top: 1px solid var(--linie); padding: 12px 0; }
.zuordnung-block:first-of-type { border-top: 0; padding-top: 4px; }
.leer { color: var(--text-2); padding: 12px 0; }
.anmelden { max-width: 380px; margin: 10vh auto; }
.demo-hinweis { background: var(--warn-hell); color: var(--warn); text-align: center; font-size: .8rem; padding: 3px 8px; }

.tabelle.fest { table-layout: fixed; }
.tabelle.fest td { overflow-wrap: anywhere; }
.anlass { font-size: .8rem; font-weight: 600; color: var(--warn); }
.knopf-kontakt.neben { border-color: var(--linie); color: var(--text-2); font-weight: 500; }
@media (max-width: 699px) {
  .nur-breit { display: none; }
  .kopf-innen { gap: 10px; padding: 8px 16px; }
  .knopf-kontakt { padding: 7px 10px; min-height: 40px; font-size: .9rem; }
  .kontakt { gap: 6px; }
  main { padding: 12px 16px; }
  .kz .wert { font-size: 1.35rem; }
}
section[id] { scroll-margin-top: 70px; }
.qr { display: flex; justify-content: center; margin: 8px 0 12px; }
.qr svg { width: 260px; height: 260px; border-radius: 8px; }
.schluessel { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: .05em; word-break: break-all; background: var(--flaeche-2); padding: 8px; border-radius: 8px; }
.schritte { padding-left: 20px; margin: 8px 0; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; margin: 12px 0 16px; }
.codes li { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 6px; padding: 6px; text-align: center; }

/* Objekt prüfen */
.pruef-schnell { display: flex; gap: 8px; margin-bottom: 14px; }
.pruef-schnell input { flex: 1; }
.pruef-suche .inline-form input { flex: 1 1 260px; }
.formraster-3 { gap: 0 14px; }
@media (min-width: 900px) { .formraster-3 { grid-template-columns: repeat(3, 1fr); } }
.treffer { display: grid; gap: 6px; }
.treffer-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.klein-text { font-size: .8rem; }
.punkte { display: flex; flex-wrap: wrap; gap: 5px; }
.punkt { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; border-radius: 6px; font-size: .8rem; }
.punkt b { font-weight: 700; }
.p-ok { background: #e5f4dc; color: #2f5d17; }
.p-mittel { background: var(--warn-hell); color: var(--warn); }
.p-unklar { background: var(--flaeche-2); color: var(--text-2); border: 1px dashed var(--linie); }
.p-schlecht { background: var(--fehler-hell); color: var(--fehler); }
@media (prefers-color-scheme: dark) { .p-ok { background: #233820; color: #b3dd96; } }
.gruppe-gut { border-left: 4px solid #3c8a3f; }
.gruppe-abstriche { border-left: 4px solid var(--warn); }
details.gruppe-knapp > summary { font-size: 1.05rem; }
.inline-aufklapp > summary { display: inline-block; padding: 5px 10px; border: 1px solid var(--akzent); border-radius: 8px; font-size: .85rem; min-height: 34px; }
details.inline-aufklapp > summary::before, details.inline-aufklapp[open] > summary::before { content: ""; }
.inline-aufklapp[open] { flex-basis: 100%; }
.vorschlaege { border-left: 4px solid var(--akzent); }

/* Aufgaben: Team-Liste im Dashboard */
main.voll { max-width: none; padding: 0; }
.aufgaben-rahmen { display: block; width: 100%; height: calc(100vh - 57px); height: calc(100dvh - 57px); border: 0; background: var(--bg); }
@media (max-width: 899px) { .aufgaben-rahmen { height: calc(100vh - 57px - 64px); height: calc(100dvh - 53px - 64px - env(safe-area-inset-bottom)); } }
.demo-hinweis ~ main.voll .aufgaben-rahmen { height: calc(100dvh - 80px); }

/* Logo auf Anmeldeseiten */
.anmelden-logo { text-align: center; margin: 8px 0 18px; }
.anmelden-logo img { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 6px 12px; box-shadow: var(--schatten); }

/* Kunden eingeklappt, Leiste mit Namen öffnet und schließt */
details.kunde-klapp { padding: 0; }
.kunde-leiste { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: var(--radius); }
.kunde-leiste::-webkit-details-marker { display: none; }
.kunde-leiste::before { content: "▸"; display: inline-block; width: 1em; color: var(--marke-rot); font-size: .95rem; }
details[open] > .kunde-leiste::before { content: "▾"; }
details[open] > .kunde-leiste { border-bottom: 1px solid var(--linie); border-radius: var(--radius) var(--radius) 0 0; background: var(--flaeche-2); }
.kunde-leiste:hover { background: var(--flaeche-2); }
.kunde-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kunde-titel strong { font-size: 1.02rem; color: var(--ueberschrift); }
.kunde-inhalt { padding: 10px 14px 14px; }
.klapp-steuer { margin-bottom: 10px; }

/* Weitere Angaben im Kundenprofil */
.abschnitt { margin: 16px 0 8px; font-size: .9rem; }
.details-liste { margin: 0; display: grid; gap: 8px 18px; }
@media (min-width: 800px) { .details-liste { grid-template-columns: 1fr 1fr; } }
.details-liste dt { font-size: .74rem; color: var(--text-2); }
.details-liste dd { margin: 0; }
.beachten { margin-top: 3px; color: var(--text); border-left: 3px solid var(--marke-rot); padding-left: 6px; }

/* Suchprofil aus Home-Search-Profil und Top-10 */
.kriterien { display: grid; gap: 6px; margin-bottom: 10px; }
.krit-etikett { display: inline-block; min-width: 118px; font-size: .78rem; font-weight: 700; margin-right: 6px; }
.krit-etikett.muss { color: var(--akzent); }
.krit-etikett.nicht { color: var(--marke-rot); }
.top10 { margin-top: 10px; }
.top10 ol { margin: 4px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
@media (max-width: 700px) { .top10 ol { columns: 1; } }
