/* Kern-Design nach dem Corporate Design der Stadtwerke Bamberg.
   Farben: Weiß, Rot, Grau, Anthrazit. Digital: Nunito Sans ExtraBold (Überschriften), Roboto (Text).
   Layout: linksbündig, Farbflächen laufen über die volle Breite, eine Inhaltsspalte.
   Was nur ein Modul braucht, steht in modules/<id>/assets/. */
:root {
  --weiss: #ffffff;
  --rot: #d90009;
  --rot-dunkel: #b00007;
  --rot-hell: #fde8e9;
  --grau: #9c9c9c;
  --grau-hell: #e6e7e8;
  --anthrazit: #353c40;
  --anthrazit-hell: #eceeef;

  --papier: #f3f3f3;
  --flaeche: var(--weiss);
  --tinte: var(--anthrazit);
  --tinte-leise: #5d6468;
  --linie: #d6d8d9;
  --rand: #b4b7b9;

  --schrift-text: "Roboto", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --schrift-titel: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--schrift-text);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tinte);
  background: var(--papier);
}

a { color: var(--rot); }
a:hover { color: var(--rot-dunkel); }
form { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--schrift-titel);
  font-weight: 800;
  color: var(--anthrazit);
  text-wrap: balance;
}

/* ---------- Kopf: weiße Fläche mit Logo, darunter anthrazitfarbene Menüleiste ---------- */
.kopf-oben { background: var(--weiss); }
.kopf-innen {
  max-width: 1000px; margin: 0 auto; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}
.marke { display: flex; align-items: center; gap: 16px; min-width: 0; }
.logo { display: block; height: 44px; width: auto; max-width: 100%; }
.logo-text {
  font-family: var(--schrift-titel); font-weight: 800; font-size: 20px; line-height: 1.1;
  color: var(--anthrazit); letter-spacing: -.005em;
}
.marke-name {
  font-family: var(--schrift-titel); font-weight: 800; font-size: 15px; color: var(--tinte-leise);
  padding-left: 16px; border-left: 2px solid var(--grau-hell);
}

.menueband { background: var(--anthrazit); }
.reiter {
  max-width: 1000px; margin: 0 auto; padding: 0 16px;
  display: flex; flex-wrap: wrap; gap: 0 4px;
}
.reiter a {
  color: #fff; text-decoration: none; padding: 12px 16px 9px; font-weight: 500;
  border-bottom: 3px solid transparent;
}
.reiter a:hover { background: #454d52; color: #fff; }
.reiter a.aktiv { background: var(--rot); border-bottom-color: var(--rot); color: #fff; }
.konto { display: flex; align-items: center; gap: 12px; }
.konto-link { display: flex; align-items: center; gap: 8px; color: var(--anthrazit); text-decoration: none; font-weight: 500; }
.konto-link:hover .konto-name { text-decoration: underline; }
.rollen-marke {
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 2px; background: var(--grau-hell); color: var(--anthrazit);
}
.rollen-marke.rolle-admin { background: var(--rot); color: #fff; }
.rollen-marke.rolle-leitstelle { background: var(--anthrazit); color: #fff; }

/* Anmeldung, Ersteinrichtung, Konto */
.anmeldung {
  max-width: 420px; margin: 24px 0; background: var(--flaeche); border: 1px solid var(--linie);
  border-top: 4px solid var(--rot); border-radius: var(--radius); padding: 24px;
}
.anmeldung h1 { margin-bottom: 14px; }
.anmeldung p { margin: 0 0 14px; }
.anmelde-formular { display: grid; gap: 14px; max-width: 420px; }
.anmelde-formular .knopf { justify-self: start; }
.hinweis { color: var(--tinte-leise); font-size: 14px; margin: 16px 0 0 !important; }
.konto-daten { margin-bottom: 24px; }
.konto-daten div { grid-template-columns: 130px minmax(0, 1fr); }
.konto-passwort { max-width: 520px; }

/* ---------- Inhalt ---------- */
.inhalt { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 28px 16px 64px; }
h1 { font-size: 26px; margin: 0; line-height: 1.2; }
h2 { font-size: 18px; margin: 0 0 8px; line-height: 1.3; }
.abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

.meldung { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid; border-left-width: 5px; }
.meldung.ok { background: var(--anthrazit-hell); border-color: var(--anthrazit); color: var(--anthrazit); }
.meldung.fehler { background: var(--rot-hell); border-color: var(--rot); color: #8f0007; }

.leer { text-align: left; padding: 28px 24px; background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--grau); border-radius: var(--radius); color: var(--tinte-leise); }
.leer p { margin: 4px 0; }
.leer strong { color: var(--anthrazit); font-family: var(--schrift-titel); font-weight: 800; }

/* ---------- Knöpfe & Felder ---------- */
.knopf, .text-knopf {
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--rot); color: #fff; border: 1px solid var(--rot);
  padding: 8px 18px; border-radius: var(--radius); line-height: 1.3;
}
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.knopf.klein { padding: 5px 12px; font-size: 14px; }
.knopf.leise { background: transparent; color: var(--anthrazit); border-color: var(--anthrazit); }
.knopf.leise:hover { background: var(--anthrazit); border-color: var(--anthrazit); color: #fff; }
.knopf.gefahr { background: transparent; color: var(--rot); border-color: var(--grau); }
.knopf.gefahr:hover { background: var(--rot-hell); border-color: var(--rot); color: var(--rot-dunkel); }
.text-knopf { background: none; border: 0; color: var(--rot); padding: 0 4px; font-weight: 400; font-size: 13px; text-decoration: underline; }
.text-knopf:hover { background: none; color: var(--rot-dunkel); }

input[type=text], input[type=search], input[type=date], input[type=password], select, textarea {
  font: inherit; color: var(--tinte); background: #fff; width: 100%;
  border: 1px solid var(--rand); border-radius: var(--radius); padding: 7px 10px;
}
input[type=file] { font: inherit; max-width: 100%; }
:focus-visible { outline: 3px solid var(--anthrazit); outline-offset: 2px; }
.knopf:focus-visible, .reiter a:focus-visible { outline-color: var(--anthrazit); outline-offset: 2px; }
.menueband :focus-visible { outline-color: #fff; outline-offset: -3px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 14px; }
label small { font-weight: 400; color: var(--tinte-leise); }

.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- Formularblock ---------- */
.feld-gruppe {
  background: var(--flaeche); border: 1px solid var(--linie); border-top: 4px solid var(--rot);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px;
}
.feld-gruppe > summary { cursor: pointer; font-family: var(--schrift-titel); font-weight: 800; font-size: 16px; }
.feld-gruppe[open] > summary { margin-bottom: 14px; }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.formular .breit { grid-column: 1 / -1; }

/* ---------- Fuß ---------- */
.fuss { background: var(--anthrazit); color: #fff; }
.fuss-innen { max-width: 1000px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.ki-hinweis { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.ki-marke {
  font-family: var(--schrift-titel); font-weight: 800; font-size: 12px; letter-spacing: .06em;
  background: var(--rot); color: #fff; padding: 2px 7px; border-radius: 2px;
}
.fuss small { color: #c9cccd; align-self: center; }

@media (max-width: 640px) {
  .formular { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .marke-name { display: none; }
  .logo { height: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  .knopf, .reiter a { transition: background-color .12s, color .12s; }
}
