/* Roger Cockpit – "Becken bei Nacht"
   Dunkles Beckenblau statt Schwarz, DIN-artige Beschilderungsschrift (Barlow),
   Statusfarben aus dem Bad: Grün, Bojengelb, Rettungsring-Rot.
   Das eine laute Element ist die Schwimmleine; alles andere bleibt ruhig. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }

:root {
  --becken: #0B2533;
  --becken-tief: #081C27;
  --fliese: #0F2F3F;
  --fliese-hell: #15394B;
  --fuge: #22495B;
  --text: #E4F1F3;
  --text-leise: #8FB0BA;
  --wasserlicht: #92E2EE;

  --ok: #3FCF9A;
  --warn: #F5B841;
  --krit: #FF5B3A;
  --wartung: #7E9AEE;
  --unbekannt: #42687A;

  --schrift: "Barlow", system-ui, sans-serif;
  --schrift-schild: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  /* Schriftgrade, Faktor 1,25 */
  --s-klein: 0.875rem;
  --s-text: 1rem;
  --s-gross: 1.25rem;
  --s-h2: 1.5625rem;
  --s-h1: 2.5rem;
  --s-gruss: clamp(2.5rem, 2rem + 3vw, 4rem);

  --rand: 16px;
  --breite: 1180px;
  --radius: 6px;
}

@media (min-width: 720px) { :root { --rand: 32px; } }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--becken);
  /* Beckenboden: ganz feines Fliesenraster */
  background-image:
    linear-gradient(rgba(146, 226, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 226, 238, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--schrift);
  font-size: var(--s-text);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--schrift-schild);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: var(--s-h1); letter-spacing: -0.005em; }
h2 { font-size: var(--s-h2); }
h3 { font-size: var(--s-gross); font-weight: 500; }
p { margin: 0 0 0.75em; max-width: 68ch; }

a { color: var(--wasserlicht); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--wasserlicht); outline-offset: 3px; border-radius: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.leise { color: var(--text-leise); }

/* ------------------------------------------------------------------ Kopf */
.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 18px var(--rand);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: var(--s-gross);
  letter-spacing: 0.01em;
}
.marke-zeichen { width: 32px; height: 12px; }
.marke-zeichen line { stroke: var(--text-leise); stroke-width: 1; }
.marke-zeichen rect { fill: var(--ok); }
.marke-zeichen rect:nth-of-type(2) { fill: var(--text); }

.navi { display: flex; flex-wrap: wrap; gap: 4px 20px; flex: 1; }
.navi a {
  color: var(--text-leise);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.navi a:hover { color: var(--text); }
.navi a[aria-current="page"] { color: var(--text); border-bottom-color: var(--wasserlicht); }

.abmelden { margin: 0; }

@media (max-width: 719px) {
  .navi { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .abmelden { margin-left: auto; }
}

/* ------------------------------------------------------------------ Seite */
.seite {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 8px var(--rand) 64px;
}

.ankunft { padding: 28px 0 8px; }
.gruss {
  font-size: var(--s-gruss);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.datum { color: var(--text-leise); font-size: var(--s-gross); margin-top: 10px; }

.seitenkopf { padding: 28px 0 24px; }
.seitenkopf p { color: var(--text-leise); margin-top: 8px; }

/* ------------------------------------------------------------------ Schwimmleine */
.leine-block { padding: 28px 0 8px; }

.leine-titel {
  font-family: var(--schrift-schild);
  font-weight: 500;
  font-size: var(--s-h2);
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: none;
}
.leine-block--gestoert .leine-titel,
.leine-block--wackelt .leine-titel { color: #FFC2B5; }

.leine {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.abschnitt { flex: var(--anteil, 1) 1 0; min-width: 0; }
.abschnitt:nth-child(1) { --anteil: 3; }
.abschnitt:nth-child(2) { --anteil: 5; }
.abschnitt:nth-child(3) { --anteil: 7; }

.bojen {
  position: relative;
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0 10px;
  list-style: none;
}
/* das Seil */
.bojen::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(90deg, #5d7f8c 0 6px, #46666f 6px 9px);
  border-radius: 1px;
}
/* Haken an den Enden jedes Abschnitts */
.bojen::after {
  content: "";
  position: absolute;
  inset: 4px 0;
  border-left: 3px solid var(--fuge);
  border-right: 3px solid var(--fuge);
  pointer-events: none;
}
.bojen li { flex: 1 1 0; min-width: 0; display: flex; }

.boje {
  --farbe: var(--unbekannt);
  position: relative;
  flex: 1;
  height: 30px;
  border-radius: 15px / 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.06) 38%, rgba(0, 0, 0, 0.0) 55%, rgba(0, 0, 0, 0.32) 100%),
    var(--farbe);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease;
  animation: auftauchen 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.boje:hover { transform: translateY(-3px); }
.boje:focus-visible { outline-offset: 4px; border-radius: 15px / 50%; }

.boje--ok { --farbe: var(--ok); }
.boje--langsam,
.boje--wackelt { --farbe: var(--warn); }
.boje--gestoert {
  --farbe: var(--krit);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.3) 100%),
    repeating-linear-gradient(90deg, var(--krit) 0 7px, #FFE9E3 7px 11px);
  animation: auftauchen 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, schwanken 1.6s ease-in-out 0.6s infinite;
  animation-delay: calc(var(--i, 0) * 45ms), 0.6s;
}
.boje--wartung {
  background: transparent;
  border: 2px dashed var(--wartung);
  box-shadow: none;
}
.boje--unbekannt { opacity: 0.6; }

@keyframes auftauchen {
  from { transform: translateY(14px) scaleY(0.6); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes schwanken {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* beim automatischen Nachladen nicht erneut auftauchen lassen */
.ohne-auftauchen .boje { animation: none; }
.ohne-auftauchen .boje--gestoert { animation: schwanken 1.6s ease-in-out infinite; }

.abschnitt-name {
  margin: 10px 10px 0;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: var(--s-gross);
}
.abschnitt-name span {
  display: block;
  font-family: var(--schrift);
  font-weight: 400;
  font-size: var(--s-klein);
  color: var(--text-leise);
}

.leine-stand { color: var(--text-leise); font-size: var(--s-klein); margin-top: 18px; }

@media (max-width: 719px) {
  .leine { flex-direction: column; gap: 18px; }
  .abschnitt { width: 100%; }
  .boje { height: 26px; }
}

/* Hinweise unter der Leine */
.hinweise { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; max-width: 80ch; }
.hinweis {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 10px 14px;
  border-left: 4px solid var(--warn);
  background: rgba(245, 184, 65, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hinweis--krit { border-left-color: var(--krit); background: rgba(255, 91, 58, 0.1); }
.hinweis a { color: var(--text); font-weight: 600; text-decoration: none; }
.hinweis a:hover { text-decoration: underline; }
.hinweis span { color: var(--text-leise); }

/* ------------------------------------------------------------------ Felder */
.raster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.feld {
  background: rgba(15, 47, 63, 0.82);
  border: 1px solid var(--fuge);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
}
.feld h2 { margin-bottom: 12px; }
.feld--breit { grid-column: span 2; }
.feld--voll { grid-column: 1 / -1; }
.leer { color: var(--text-leise); }

@media (max-width: 899px) {
  .raster { grid-template-columns: minmax(0, 1fr); }
  .feld--breit, .feld--voll { grid-column: auto; }
}

/* ------------------------------------------------------------------ Status */
.server { margin-bottom: 44px; }
.server-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--fuge);
}
.server-name span { font-family: var(--schrift); font-weight: 400; font-size: var(--s-text); color: var(--text-leise); }

.dienst {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(150px, 1.3fr) 80px 160px 80px 120px;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(34, 73, 91, 0.6);
  scroll-margin-top: 24px;
}
.dienst:target { background: rgba(146, 226, 238, 0.06); box-shadow: -12px 0 0 rgba(146, 226, 238, 0.06), 12px 0 0 rgba(146, 226, 238, 0.06); }
.dienst--kopf { color: var(--text-leise); font-size: var(--s-klein); padding: 10px 0 6px; }

.dienst-name h3 { font-size: var(--s-gross); }
.dienst-name a { font-size: var(--s-klein); color: var(--text-leise); text-decoration: none; }
.dienst-name a:hover { color: var(--wasserlicht); text-decoration: underline; }

.dienst-zustand { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.dienst-zustand small { flex-basis: 100%; color: var(--text-leise); font-size: var(--s-klein); line-height: 1.35; }

.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--unbekannt); flex: none; }
.punkt--ok { background: var(--ok); }
.punkt--langsam, .punkt--wackelt { background: var(--warn); }
.punkt--gestoert { background: var(--krit); box-shadow: 0 0 0 4px rgba(255, 91, 58, 0.25); }
.punkt--wartung { background: transparent; border: 2px dashed var(--wartung); }

.dienst-wert { white-space: nowrap; }
.dienst-ssl--warn { color: var(--warn); }
.dienst-ssl--krit { color: var(--krit); white-space: normal; font-size: var(--s-klein); }

.spark { width: 100%; max-width: 160px; height: 28px; display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--wasserlicht); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-ausfall { fill: var(--krit); opacity: 0.8; }

@media (max-width: 899px) {
  .dienst--kopf { display: none; }
  .dienst {
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding: 16px 0;
  }
  .dienst-name, .dienst-zustand { grid-column: 1 / -1; }
  .dienst-wert::before, .dienst-verlauf::before {
    content: attr(data-label);
    display: block;
    font-size: var(--s-klein);
    color: var(--text-leise);
  }
}

/* ------------------------------------------------------------------ Formulare */
.formular { display: grid; gap: 6px; margin: 16px 0 0; }
.formular label { font-weight: 500; margin-top: 8px; }
.formular button { margin-top: 18px; justify-self: start; }

input, select {
  font: inherit;
  color: var(--text);
  background: var(--becken-tief);
  border: 1px solid var(--fuge);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
  height: 46px;
}
.formular + p { margin-top: 16px; }
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--wasserlicht); }
input::placeholder { color: #5f8592; }

.formular--zeile {
  grid-template-columns: minmax(200px, 1.3fr) minmax(130px, 160px) minmax(0, 2fr) auto;
  align-items: end;
  gap: 12px;
}
.formular--zeile label { display: block; margin: 0 0 6px; }
.formular--zeile button { margin: 0; }
@media (max-width: 719px) {
  .formular--zeile { grid-template-columns: 1fr; }
}

.formular--zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.formular--zwei button { grid-column: 1 / -1; }
@media (max-width: 719px) {
  .formular--zwei { grid-template-columns: 1fr; }
}

.knopf, .knopf-leise {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 10px 18px;
}
.knopf { background: var(--wasserlicht); color: var(--becken-tief); border: 1px solid var(--wasserlicht); }
.knopf:hover { background: #b4ecf4; }
.knopf-leise { background: transparent; color: var(--text-leise); border: 1px solid var(--fuge); padding: 6px 14px; font-weight: 500; }
.knopf-leise:hover { color: var(--text); border-color: var(--text-leise); }

.meldung { padding: 10px 14px; border-radius: var(--radius); margin: 12px 0 0; }
.meldung--krit { background: rgba(255, 91, 58, 0.14); border: 1px solid rgba(255, 91, 58, 0.5); }
.meldung--ok { background: rgba(63, 207, 154, 0.12); border: 1px solid rgba(63, 207, 154, 0.45); }

.fenster { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.fenster li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  border: 1px dashed var(--wartung);
  border-radius: var(--radius);
}
.fenster li span { display: block; color: var(--text-leise); font-size: var(--s-klein); }
.fenster form { margin: 0; }

.protokoll { width: 100%; border-collapse: collapse; font-size: var(--s-klein); }
.protokoll th { text-align: left; font-weight: 500; color: var(--text-leise); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--fuge); }
.protokoll td { padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); vertical-align: top; }
@media (max-width: 719px) {
  .protokoll thead { display: none; }
  .protokoll tr { display: block; padding: 8px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); }
  .protokoll td { display: block; border: 0; padding: 0; }
}

/* ------------------------------------------------------------------ Anmeldung */
.anmeldung .seite {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 32px;
}
.tuer {
  width: 100%;
  max-width: 380px;
  background: rgba(15, 47, 63, 0.9);
  border: 1px solid var(--fuge);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.anmeldung--breit .tuer { max-width: 460px; }
.marke--gross { margin: 0 0 28px; }
.tuer h1 { font-size: 2rem; margin-bottom: 10px; }
.tuer > p { color: var(--text-leise); }
.code-feld { height: 56px; font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; font-family: var(--schrift-schild); }
.nebenbei { margin-top: 18px; font-size: var(--s-klein); }

.schritte { padding-left: 1.2em; margin: 20px 0 0; }
.schritte li { margin-bottom: 20px; padding-left: 4px; }
.schritte li::marker { font-family: var(--schrift-schild); font-weight: 600; color: var(--wasserlicht); }
.qr { background: #fff; border-radius: var(--radius); padding: 8px; width: 216px; margin: 10px 0 12px; }
.qr svg { display: block; width: 200px; height: 200px; }
details summary { cursor: pointer; color: var(--wasserlicht); font-size: var(--s-klein); }
.schluessel { font-family: var(--schrift-schild); font-size: var(--s-gross); letter-spacing: 0.08em; word-break: break-all; }

/* ------------------------------------------------------------------ Bäder */
.aenderung { font-weight: 600; white-space: nowrap; }
.aenderung--hoch { color: var(--ok); }
.aenderung--runter { color: #FF8A70; }
.aenderung--gleich { color: var(--text-leise); }

/* Wetterleiste */
.wetter-tage {
  list-style: none; margin: 0 0 28px; padding: 0;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
}
.wetter-tag {
  display: grid; justify-items: start; gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--fuge); border-radius: var(--radius);
  background: rgba(15, 47, 63, 0.6);
}
.wetter-tag--heute { border-color: var(--text-leise); }
.wetter-name { font-weight: 600; }
.wetter-temp { font-family: var(--schrift-schild); font-size: var(--s-h2); font-weight: 600; line-height: 1.1; }
.wetter-temp span { font-size: var(--s-gross); color: var(--text-leise); font-weight: 500; }
.wetter-regen { font-size: var(--s-klein); color: var(--text-leise); }
.wetter-freibad {
  margin-top: 4px; font-size: var(--s-klein); font-weight: 600;
  color: var(--becken-tief); background: var(--ok); border-radius: 3px; padding: 1px 6px;
}
@media (max-width: 899px) {
  .wetter-tage { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(104px, 1fr); overflow-x: auto; padding-bottom: 4px; }
}

.wetter-symbol {
  width: 28px; height: 28px; margin: 4px 0;
  background: var(--text-leise);
  -webkit-mask: var(--zeichen) center / contain no-repeat;
  mask: var(--zeichen) center / contain no-repeat;
}
.wetter-symbol--sonne, .wetter-symbol--sonne-wolke { background: var(--warn); }
.wetter-symbol--gewitter { background: var(--warn); }
.wetter-symbol--sonne { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5' fill='%23000'/%3E%3Cpath d='M12 2v2.5M12 19.5V22M2 12h2.5M19.5 12H22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M4.9 19.1l1.8-1.8M17.3 6.7l1.8-1.8'/%3E%3C/svg%3E"); }
.wetter-symbol--wolke { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 19a5 5 0 0 1-.6-10A6.5 6.5 0 0 1 19 9.5a4.75 4.75 0 0 1-.5 9.5z'/%3E%3C/svg%3E"); }
.wetter-symbol--sonne-wolke { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='8' r='4'/%3E%3Cpath d='M8 1v2M1 8h2M3 3l1.4 1.4M13 3l-1.4 1.4' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M9 21a4.5 4.5 0 0 1-.5-9 6 6 0 0 1 11.3 1.6A3.75 3.75 0 0 1 19.5 21z'/%3E%3C/svg%3E"); }
.wetter-symbol--regen { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 15a4.5 4.5 0 0 1-.5-9A6 6 0 0 1 18 7a4 4 0 0 1 .5 8z'/%3E%3Cpath d='M8 18l-1 3M12.5 18l-1 3M17 18l-1 3' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.wetter-symbol--schnee { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 15a4.5 4.5 0 0 1-.5-9A6 6 0 0 1 18 7a4 4 0 0 1 .5 8z'/%3E%3Ccircle cx='8' cy='19' r='1.3'/%3E%3Ccircle cx='12.5' cy='20.5' r='1.3'/%3E%3Ccircle cx='17' cy='19' r='1.3'/%3E%3C/svg%3E"); }
.wetter-symbol--gewitter { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 14a4.5 4.5 0 0 1-.5-9A6 6 0 0 1 18 6a4 4 0 0 1 .5 8z'/%3E%3Cpath d='M12.5 13l-3 5h3l-1.5 5 4.5-6.5h-3l1.5-3.5z'/%3E%3C/svg%3E"); }
.wetter-symbol--nebel { --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 8h18M5 12h14M3 16h18M7 20h10'/%3E%3C/svg%3E"); }

/* Bad-Karten */
.baeder-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
@media (max-width: 899px) { .baeder-raster { grid-template-columns: minmax(0, 1fr); } }

.bad {
  background: rgba(15, 47, 63, 0.82);
  border: 1px solid var(--fuge);
  border-radius: var(--radius);
  padding: 20px 22px 16px;
  min-width: 0;
}
.bad-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.bad-kopf h2 span { font-family: var(--schrift); font-size: var(--s-text); font-weight: 400; color: var(--text-leise); margin-left: 6px; }
.bad-kopf p { margin: 0; font-size: var(--s-klein); }

.bad-zahlen { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 14px 0 10px; }
.bad-jetzt { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.bad-zahl { font-family: var(--schrift-schild); font-weight: 600; font-size: 3.5rem; line-height: 0.9; }
.bad-einheit { color: var(--text-leise); }
.bad-werte { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; }
.bad-werte dt { font-size: var(--s-klein); color: var(--text-leise); }
.bad-werte dd { margin: 0; font-family: var(--schrift-schild); font-size: var(--s-gross); font-weight: 600; }
.bad-werte .aenderung { font-family: var(--schrift); font-size: var(--s-klein); margin-left: 4px; }
.bad-fehler { color: #FFC2B5; font-size: var(--s-klein); margin: 8px 0 0; }
.bad-bereiche { margin: 6px 0 0; font-size: var(--s-klein); color: var(--text-leise); }
.bad-logger { color: var(--text-leise); }
.bad-zu { margin: 0; font-size: var(--s-klein); color: var(--text-leise); border: 1px solid var(--fuge); border-radius: 3px; padding: 1px 8px; }
.bad-ruhe { margin: 14px 0 4px; }
.bad-hinweis { margin: 4px 0 10px; max-width: none; }
.bad-hinweis span { color: var(--text); }

.verlauf { margin: 6px 0 0; }
.verlauf svg { display: block; width: 100%; height: auto; overflow: visible; }
.verlauf-raster { stroke: var(--fuge); stroke-width: 1; }
.verlauf-achse { fill: var(--text-leise); font-size: 12px; font-family: var(--schrift); }
.verlauf-vorwoche { fill: none; stroke: var(--text-leise); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.8; }
.verlauf-flaeche { fill: rgba(146, 226, 238, 0.12); }
.verlauf-heute { fill: none; stroke: var(--wasserlicht); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.verlauf-jetzt { fill: var(--becken); stroke: var(--wasserlicht); stroke-width: 2.5; }
.verlauf-legende { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--s-klein); color: var(--text-leise); margin-top: 6px; }
.verlauf-legende span::before { content: ""; display: inline-block; width: 18px; vertical-align: middle; margin-right: 6px; }
.legende-heute::before { border-top: 2.5px solid var(--wasserlicht); }
.legende-vorwoche::before { border-top: 1.5px dashed var(--text-leise); }
.verlauf-legende .leise { margin-left: auto; }
.verlauf-legende .leise::before { display: none; }

/* Umsatz */
.umsatz-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-bottom: 12px; }
.umsatz-kopf h2 { margin: 0; }
.umsatz-summe { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; max-width: none; }
.umsatz-betrag { font-family: var(--schrift-schild); font-weight: 600; font-size: var(--s-h2); }
.umsatz-stand { font-size: var(--s-klein); margin: 12px 0 0; }

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: 9px 12px 9px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); text-align: left; }
.tabelle thead th { font-weight: 500; font-size: var(--s-klein); color: var(--text-leise); border-bottom-color: var(--fuge); }
.tabelle tbody th { font-weight: 600; }
.tabelle .zahl { text-align: right; white-space: nowrap; }
.tabelle td.zahl .aenderung { margin-left: 6px; font-size: var(--s-klein); }
@media (max-width: 719px) {
  .tabelle thead { display: none; }
  .tabelle tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); }
  .tabelle th, .tabelle td { border: 0; padding: 0; }
  .tabelle tbody th { grid-column: 1 / -1; }
  .tabelle td.zahl { text-align: left; }
  .tabelle td { display: none; }
  .tabelle td[data-label] { display: block; }
  .tabelle td[data-label]::before { content: attr(data-label); display: block; font-size: var(--s-klein); color: var(--text-leise); }
}

/* Kurzfassung auf der Startseite */
.bad-kurz { list-style: none; margin: 0 0 14px; padding: 0; }
.bad-kurz li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); }
.bad-kurz-name span { display: block; font-size: var(--s-klein); color: var(--text-leise); }
.bad-kurz-zahl { font-family: var(--schrift-schild); font-weight: 600; font-size: var(--s-h2); }
.bad-kurz-zu { color: var(--text-leise); }
.bad-kurz-summe { color: var(--text-leise); }
.bad-kurz-summe strong { color: var(--text); }

/* ------------------------------------------------------------------ Briefing und News */
.feld-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.feld-kopf h2 { margin: 0; }
.feld-kopf .nebenbei { margin: 0; }
.briefing-neu { margin: 0; }
.knopf-leise:disabled { opacity: 0.45; cursor: not-allowed; }

.briefing-kern {
  font-family: var(--schrift-schild);
  font-weight: 500;
  font-size: var(--s-gross);
  line-height: 1.35;
  margin-bottom: 14px;
}
.briefing-punkte { margin: 0 0 14px; padding-left: 1.1em; display: grid; gap: 8px; max-width: 72ch; }
.briefing-punkte li::marker { color: var(--wasserlicht); }
.briefing-stand { font-size: var(--s-klein); margin: 0; }

.news-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
@media (max-width: 719px) { .news-spalten { grid-template-columns: 1fr; } }
.news-spalte-titel { font-size: var(--s-gross); margin-bottom: 6px; }
.news-spalte-titel a { color: var(--text); text-decoration: none; }
.news-spalte-titel a:hover { color: var(--wasserlicht); }
.kurzmeldungen { list-style: none; margin: 0; padding: 0; }
.kurzmeldungen li { padding: 9px 0; border-bottom: 1px solid rgba(34, 73, 91, 0.6); }
.kurzmeldungen a { color: var(--text); text-decoration: none; display: block; line-height: 1.35; }
.kurzmeldungen a:hover { color: var(--wasserlicht); text-decoration: underline; }
.kurzmeldungen .leise { font-size: var(--s-klein); }

.reiter { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 24px; border-bottom: 1px solid var(--fuge); }
.reiter a {
  padding: 8px 14px; color: var(--text-leise); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.reiter a:hover { color: var(--text); }
.reiter a[aria-current="page"] { color: var(--text); border-bottom-color: var(--wasserlicht); }

.news-tag { margin-bottom: 28px; }
.news-tag-titel { font-size: var(--s-gross); color: var(--text-leise); font-weight: 500; margin-bottom: 4px; }
.meldungen { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.meldung-eintrag {
  position: relative;
  padding: 14px 110px 14px 0;
  border-bottom: 1px solid rgba(34, 73, 91, 0.6);
  scroll-margin-top: 24px;
}
.meldung-eintrag--wichtig { border-left: 3px solid var(--warn); padding-left: 14px; }
.meldung-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: var(--s-klein); margin-bottom: 2px; }
.meldung-quelle { font-weight: 600; color: var(--text-leise); }
.meldung-neu, .meldung-wichtig { font-weight: 600; border-radius: 3px; padding: 0 6px; }
.meldung-neu { color: var(--becken-tief); background: var(--wasserlicht); }
.meldung-wichtig { color: var(--becken-tief); background: var(--warn); }
.meldung-eintrag h3 { font-family: var(--schrift); font-size: var(--s-gross); font-weight: 600; line-height: 1.3; }
.meldung-eintrag h3 a { color: var(--text); text-decoration: none; }
.meldung-eintrag h3 a:hover { color: var(--wasserlicht); text-decoration: underline; }
.meldung-eintrag p { color: var(--text-leise); margin: 4px 0 0; font-size: var(--s-klein); }
.meldung-merken { position: absolute; top: 14px; right: 0; margin: 0; }
@media (max-width: 719px) {
  .meldung-eintrag { padding-right: 0; }
  .meldung-merken { position: static; margin-top: 8px; }
}

/* ------------------------------------------------------------------ Kasse */
/* Serienfarben je Bad: feste Reihenfolge, gegen den dunklen Kartenhintergrund validiert
   (Blau, Magenta, Bernstein; Grün/Gelb/Rot bleiben dem Status vorbehalten). Weitere = neutrales Grau. */
:root { --s1: #3987e5; --s2: #d55181; --s3: #c98500; --s0: #6f8a96; }
.s1 { fill: var(--s1); background: var(--s1); }
.s2 { fill: var(--s2); background: var(--s2); }
.s3 { fill: var(--s3); background: var(--s3); }
.s0 { fill: var(--s0); background: var(--s0); }

.filterleiste { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 24px; }
.segmente { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--fuge); border-radius: var(--radius); overflow: hidden; }
.segmente a { padding: 7px 14px; color: var(--text-leise); text-decoration: none; border-right: 1px solid var(--fuge); }
.segmente a:last-child { border-right: 0; }
.segmente a:hover { color: var(--text); background: rgba(146, 226, 238, 0.06); }
.segmente a[aria-current="true"] { color: var(--becken-tief); background: var(--wasserlicht); font-weight: 600; }

.kennzahlen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 1023px) { .kennzahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kennzahl { border: 1px solid var(--fuge); border-radius: var(--radius); padding: 14px 16px; background: rgba(15, 47, 63, 0.6); }
.kennzahl p { margin: 0; }
.kennzahl-name { font-size: var(--s-klein); color: var(--text-leise); }
.kennzahl-wert { font-family: var(--schrift-schild); font-weight: 600; font-size: 1.9rem; line-height: 1.15; margin-top: 2px !important; }
.kennzahl-vergleich { font-size: var(--s-klein); min-height: 1.4em; }

.auffaellig { margin-bottom: 20px; }
.auffaellig ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; max-width: 90ch; }
.auffaellig li::marker { color: var(--wasserlicht); }

.legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--s-klein); color: var(--text-leise); }
.legende li { display: inline-flex; align-items: center; gap: 6px; }
.legende-farbe { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.tagesbalken { display: block; width: 100%; height: auto; overflow: visible; }
.balken-flaeche { fill: transparent; }
.balken:hover .balken-flaeche { fill: rgba(146, 226, 238, 0.06); }
.achse-wochenende { fill: var(--text); }
.durchschnitt { stroke: var(--text-leise); stroke-width: 1; stroke-dasharray: 3 4; }
.durchschnitt-text { fill: var(--text-leise); font-size: 12px; font-family: var(--schrift); paint-order: stroke; stroke: var(--fliese); stroke-width: 4px; }
.tabelle-aufklappen { margin-top: 10px; font-size: var(--s-klein); }
.tabelle-aufklappen table { margin-top: 8px; }

.raster--zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 899px) { .raster--zwei { grid-template-columns: minmax(0, 1fr); } }
.feld-unterzeile { font-size: var(--s-klein); margin: -6px 0 14px; }

.heatmap {
  display: grid;
  grid-template-columns: 26px repeat(var(--spalten), minmax(0, 1fr));
  gap: 3px;
  align-items: center;
}
.heat-stunde { font-size: 11px; color: var(--text-leise); text-align: center; }
.heat-tag { font-size: var(--s-klein); color: var(--text-leise); }
.heat-zelle { aspect-ratio: 1 / 1; border-radius: 3px; min-height: 10px; }
.heat-zelle:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-legende { display: flex; align-items: center; gap: 3px; font-size: var(--s-klein); margin: 12px 0 0; }
.heat-legende span { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.heat-legende span:first-of-type { margin-left: 6px; }
.heat-legende span:last-of-type { margin-right: 6px; }

.balkenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.balkenliste li { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; }
.balkenliste-name { font-weight: 500; }
.balkenliste-wert { font-family: var(--schrift-schild); font-weight: 600; font-size: var(--s-gross); text-align: right; }
.balkenliste-balken { grid-column: 1 / -1; height: 8px; background: rgba(34, 73, 91, 0.6); border-radius: 4px; overflow: hidden; }
.balkenliste-balken span { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.balkenliste-info { grid-column: 1 / -1; font-size: var(--s-klein); }
.getrennt-titel { font-size: var(--s-klein); margin: 18px 0 6px; }
.getrennt { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.getrennt li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 1px dashed var(--fuge); border-radius: var(--radius); font-size: var(--s-klein); }

.rekorde { margin: 0; display: grid; gap: 14px; }
.rekorde dt { font-size: var(--s-klein); color: var(--text-leise); }
.rekorde dd { margin: 2px 0 0; font-family: var(--schrift-schild); font-size: var(--s-gross); font-weight: 600; }
.rekorde dd .leise, .rekorde dd .aenderung { font-family: var(--schrift); font-size: var(--s-klein); font-weight: 400; }

.tabelle--kompakt th, .tabelle--kompakt td { padding: 7px 10px 7px 0; }
.tabelle-zusatz { display: block; font-weight: 400; font-size: var(--s-klein); }

.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  max-width: 320px; padding: 7px 10px;
  background: var(--becken-tief); color: var(--text);
  border: 1px solid var(--text-leise); border-radius: var(--radius);
  font-size: var(--s-klein); line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------------ Tresor */
.seitenkopf--aktion { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }

.schloss, .schluessel-zeichen {
  display: inline-block;
  width: 12px; height: 12px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: var(--zeichen) center / contain no-repeat;
  mask: var(--zeichen) center / contain no-repeat;
}
.schloss {
  --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5V3.5a3 3 0 0 1 6 0V5h.5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E");
}
.schloss--offen {
  color: var(--ok);
  --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5V3.5a3 3 0 0 1 5.9-.8l-1.45.4A1.5 1.5 0 0 0 4.5 3.5V5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z'/%3E%3C/svg%3E");
}
.schluessel-zeichen {
  margin-right: 5px;
  --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2a3 3 0 0 1 2.83 4H11v2h-1v2H8.5V8H6.83A3 3 0 1 1 4 2zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2z'/%3E%3C/svg%3E");
}

.tresor-status { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-leise); }

.tresor-tuer { max-width: 760px; margin-bottom: 32px; }
.tresor-tuer h2 { display: flex; align-items: center; gap: 10px; }
.tresor-tuer .schloss { width: 18px; height: 18px; color: var(--text-leise); }
.tresor-tuer .hinweis { margin: 4px 0 8px; }
.tresor-tuer .hinweis span { color: var(--text); }

.tresor-liste-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tresor-liste-kopf .knopf { text-decoration: none; }

.zugaenge { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 719px) { .zugaenge { grid-template-columns: 1fr; } }

.zugang {
  position: relative;
  background: rgba(15, 47, 63, 0.82);
  border: 1px solid var(--fuge);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  scroll-margin-top: 24px;
}
.zugang--markiert { border-color: var(--wasserlicht); box-shadow: 0 0 0 1px var(--wasserlicht); }
.zugang-kopf { margin-bottom: 12px; padding-right: 80px; }
.zugang-kopf a { font-size: var(--s-klein); word-break: break-all; }

.zugang-daten { margin: 0; display: grid; gap: 10px; }
.zugang-daten dt { font-size: var(--s-klein); color: var(--text-leise); }
.zugang-daten dd { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.zugang-daten .wert { font-family: var(--schrift-schild); font-size: var(--s-gross); letter-spacing: 0.02em; word-break: break-all; margin-right: auto; }
.zugang-daten .knoepfe { display: inline-flex; gap: 6px; flex: none; margin-left: auto; }
.zugang-daten .verdeckt { color: var(--text-leise); letter-spacing: 0.12em; }
.zugang-notiz dd { white-space: pre-line; color: var(--text-leise); font-size: var(--s-klein); }
.zugang-bearbeiten { position: absolute; top: 18px; right: 20px; font-size: var(--s-klein); }
.zugang-zu { display: flex; align-items: center; gap: 8px; margin: 0; }

.knopf-mini {
  font: inherit; font-size: var(--s-klein); font-weight: 500;
  color: var(--wasserlicht); background: transparent;
  border: 1px solid var(--fuge); border-radius: 4px;
  padding: 3px 10px; cursor: pointer; min-width: 84px;
}
.knopf-mini:hover { border-color: var(--wasserlicht); }

.fehlend { margin-top: 32px; }
.fehlend h3 { font-size: var(--s-gross); margin-bottom: 10px; }
.fehlend ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fehlend a {
  display: inline-block; padding: 6px 12px;
  border: 1px dashed var(--fuge); border-radius: var(--radius);
  color: var(--text-leise); text-decoration: none;
}
.fehlend a:hover { color: var(--text); border-color: var(--wasserlicht); }

.zugang-link { display: inline-flex; align-items: center; margin-left: 12px; font-size: var(--s-klein); }
.dienst-name .zugang-link { color: var(--wasserlicht); }
.dienst-name .zugang-link--leer { color: #5f8592; }

.tresor-form { max-width: 760px; margin-bottom: 20px; }
.formular-voll { grid-column: 1 / -1; }
textarea {
  font: inherit; color: var(--text); background: var(--becken-tief);
  border: 1px solid var(--fuge); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; resize: vertical;
}
textarea:focus-visible { outline-offset: 0; border-color: var(--wasserlicht); }
.loeschen h2 { font-size: var(--s-gross); }
.ankreuzen { display: flex; align-items: center; gap: 10px; font-weight: 400 !important; }
.ankreuzen input { width: 18px; height: 18px; }
.knopf-gefahr {
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: var(--radius); padding: 10px 18px;
  background: transparent; color: var(--krit); border: 1px solid var(--krit);
}
.knopf-gefahr:hover { background: rgba(255, 91, 58, 0.12); }

/* ------------------------------------------------------------------ Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
