/* Bauvento Design-System: Farbtokens + Sidebar/Topbar-Shell + gemeinsame
   Komponenten (Buttons, Tabellen, Dialoge, Formulare). Wird von jeder Seite
   vor ihrem eigenen, seiteneigenen <style>-Block eingebunden - Regeln hier
   sind bewusst allgemein gehalten, seiteneigene Blöcke überschreiben/ergänzen
   nur noch das, was wirklich modul-spezifisch ist (z.B. Status-Badge-Farben). */

:root {
  --vento: #2CA9A6;
  --vento-deep: #1F7A78;
  --vento-tint: #E3F4F1;
  --sun: #F2924A;
  --sun-tint: #FCEAD9;
  --sky: #F5F8F7;
  --card: #FFFFFF;
  --ink: #232A29;
  --ink-soft: #63706D;
  --line: #E1E8E5;
  --sidebar-breite: 236px;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, sans-serif;
  background: var(--sky);
  color: var(--ink);
  margin: 0;
}

a { color: inherit; }

/* ---- Sidebar ---- */
.bv-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-breite);
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
}

.bv-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.3rem 1.2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.bv-brand img { width: 28px; height: 28px; }
.bv-brand span { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }

.bv-nav { display: flex; flex-direction: column; gap: .15rem; padding: .8rem; flex: 1; }

.bv-nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem .6rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 500;
}
.bv-nav-item:hover { background: var(--sky); color: var(--ink); }
.bv-nav-item.aktiv { background: var(--vento-tint); color: var(--vento-deep); font-weight: 700; }

.bv-nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bv-nav-icon svg { width: 17px; height: 17px; }

.bv-nav-luecke { flex: 1; }

.bv-nav-fuss { padding: .8rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; }

/* ---- Topbar + Content ---- */
.bv-content { margin-left: var(--sidebar-breite); min-height: 100vh; }

/* Sehr dezente Stadtsilhouette (moderne Architektur) hinter dem Inhalt jeder
   angemeldeten Seite - fixed statt scrollend, pointer-events:none, kein
   z-index nötig: als ::before steht sie im Malreihenfolge-Sinn VOR Topbar/
   Main und wird von deren undurchsichtigem Hintergrund einfach überdeckt. */
.bv-content::before {
  content: "";
  position: fixed;
  left: var(--sidebar-breite);
  right: 0;
  bottom: 0;
  height: 360px;
  background-image: url("../assets/stadt-silhouette.svg");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  opacity: .05;
  pointer-events: none;
}

.bv-topbar {
  position: sticky;
  top: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: .9rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.bv-topbar-titel { font-weight: 700; font-size: 1rem; }

.bv-topbar-aktionen { display: flex; align-items: center; gap: .6rem; }

/* ---- Buttons ---- */
.primaer-button {
  background: var(--vento);
  color: white;
  border: none;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .88rem;
}
.primaer-button:hover { background: var(--vento-deep); }

.sekundaer-button, .konto-link {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: .55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: .85rem;
  display: inline-block;
}
.sekundaer-button:hover, .konto-link:hover { background: var(--sky); }

.mini-button {
  background: transparent;
  border: 1px solid var(--line);
  padding: .3rem .6rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: .78rem;
  margin-right: .3rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.mini-button:hover { background: var(--sky); }

#abmelden-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: .5rem .9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
}
#abmelden-button:hover { background: var(--sky); color: var(--ink); }

/* ---- Layout-Hilfen ---- */
main { padding: 2rem 1.75rem; max-width: 1100px; }
h1 { margin-top: 0; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; }
.untertitel { color: var(--ink-soft); margin-top: -.2rem; font-size: .88rem; }

/* ---- Tabellen ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(35, 42, 41, .06);
}
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); font-size: .85rem; }
th { background: var(--sky); color: var(--ink-soft); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ---- Dialoge/Formulare ---- */
dialog { border: none; border-radius: 14px; padding: 0; width: 440px; max-width: 92vw; }
dialog::backdrop { background: rgba(35, 42, 41, .45); }
.formular-inhalt { padding: 1.5rem; }
.formular-inhalt h2 { margin-top: 0; }
.formular-inhalt label { display: block; margin-bottom: .9rem; font-size: .85rem; }
.formular-inhalt input, .formular-inhalt select, .formular-inhalt textarea {
  width: 100%;
  margin-top: .3rem;
  padding: .55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-sizing: border-box;
  font-family: inherit;
}
.feld-reihe { display: flex; gap: .6rem; }
.feld-reihe label { flex: 1; }
.checkbox-zeile { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.checkbox-zeile input { width: auto; margin: 0; }
.formular-aktionen { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }

/* ---- Fehler/Hinweise ---- */
#fehlermeldung, #nicht-berechtigt, .fehler { color: #C0362C; margin-top: 1rem; }
