/* ==========================================================================
   Website-Verwaltung Rettungsdienst Spree-Neiße
   Styleguide der Website: Rot #BC1010 · Blau #004799 · Navy #061746
   ========================================================================== */

@font-face{font-family:'Barlow Semi Condensed';font-weight:600;font-display:swap;src:url('../fonts/barlow-semi-condensed-600-latin.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-weight:700;font-display:swap;src:url('../fonts/barlow-semi-condensed-700-latin.woff2') format('woff2')}
@font-face{font-family:'Open Sans';font-weight:400;font-display:swap;src:url('../fonts/open-sans-400-latin.woff2') format('woff2')}
@font-face{font-family:'Open Sans';font-weight:600;font-display:swap;src:url('../fonts/open-sans-600-latin.woff2') format('woff2')}
@font-face{font-family:'Roboto Condensed';font-weight:500;font-display:swap;src:url('../fonts/roboto-condensed-500-latin.woff2') format('woff2')}

:root {
  --rot: #BC1010;
  --rot-dunkel: #9a0d0d;
  --blau: #004799;
  --navy: #061746;
  --dunkel: #08236A;
  --tint: rgba(0, 71, 153, .08);
  --hairline: rgba(6, 23, 70, .12);
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --text: #061746;
  --text-soft: rgba(6, 23, 70, .70);
  --gruen: #1f7a4d;
  --f-head: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Open Sans', 'Segoe UI', sans-serif;
  --f-label: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --radius: 16px;
  --radius-sm: 11px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --sb-breite: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--f-body); font-size: 15px; line-height: 1.6;
  color: var(--text); background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--f-head); font-weight: 700; line-height: 1.1;
  text-transform: uppercase; color: var(--navy);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-label); font-weight: 500; font-size: 11.5px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--blau);
  margin-bottom: 12px;
}
.eyebrow::before { content: ''; width: 26px; height: 3px; background: var(--rot); border-radius: 2px; }

/* -------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-label); font-weight: 500; font-size: 13.5px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 24px; border-radius: 999px;
  transition: background-color .3s var(--ease), transform .2s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-rot { background: var(--rot); color: #fff; }
.btn-rot:hover:not(:disabled) { background: var(--rot-dunkel); }
.btn-blau { background: var(--blau); color: #fff; }
.btn-blau:hover:not(:disabled) { background: var(--dunkel); }
.btn-hell { background: #fff; color: var(--navy); border: 1.5px solid var(--hairline); }
.btn-hell:hover:not(:disabled) { border-color: var(--blau); }
.btn-klein { padding: 9px 18px; font-size: 12px; }

.offen-marke {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  margin-left: 8px; padding: 0 6px; border-radius: 999px;
  background: #fff; color: var(--rot);
  font-family: var(--f-head); font-weight: 700; font-size: 12px;
}
.bau-log {
  margin-top: 16px; background: var(--navy); color: rgba(255,255,255,.85);
  border-radius: var(--radius-sm); padding: 16px 18px;
  font-family: var(--f-label); font-size: 13px; line-height: 1.7;
  max-height: 260px; overflow-y: auto;
}
.bau-log b { color: #fff; }
.bau-log .warn { color: #ffc46b; }
.bau-log .fehl { color: #ff8a8a; }
.bau-log .gut { color: #7fd6a6; }

/* --------------------------------------------------------------- Login */
.login-screen {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(0, 71, 153, .55), transparent 62%),
    radial-gradient(700px 420px at -10% 110%, rgba(188, 16, 16, .30), transparent 62%),
    var(--navy);
}
.login-card {
  width: min(420px, 100%); background: #fff; border-radius: var(--radius);
  padding: 40px 38px 30px; box-shadow: 0 40px 90px -30px rgba(6, 23, 70, .55);
}
.login-logo { height: 46px; width: auto; margin-bottom: 26px; }
.login-card h1 { font-size: 30px; margin-bottom: 24px; }
.login-card label {
  display: block; font-family: var(--f-label); font-weight: 500; font-size: 11.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft);
  margin: 16px 0 6px;
}
.login-card input {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm); background: var(--bg-soft);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.login-card input:focus { border-color: var(--blau); background: #fff; outline: none; }
.login-card .btn { width: 100%; margin-top: 26px; }
.login-fuss {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--text-soft); text-align: center;
}
.fehler {
  margin-top: 16px; padding: 11px 15px; border-radius: var(--radius-sm);
  background: rgba(188, 16, 16, .08); border-left: 3px solid var(--rot);
  font-size: 13.5px; color: var(--rot-dunkel);
}

/* --------------------------------------------------------------- Shell */
.shell { display: grid; grid-template-columns: var(--sb-breite) 1fr; min-height: 100dvh; }

.sidebar {
  background: var(--navy); color: rgba(255, 255, 255, .72);
  display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100dvh; overflow-y: auto;
}
.sb-brand { padding: 24px 24px 20px; display: block; }
.sb-brand img { height: 40px; width: auto; }
.sb-nav { flex: 1; padding: 8px 14px 20px; display: flex; flex-direction: column; gap: 2px; }
.sb-gruppe {
  font-family: var(--f-label); font-weight: 500; font-size: 10.5px;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .38); padding: 18px 10px 7px;
}
.sb-nav a {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14.5px; color: rgba(255, 255, 255, .78);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.sb-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-nav a.aktiv { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.sb-nav a.aktiv::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; background: var(--rot); border-radius: 0 2px 2px 0;
}
.sb-nav a .bald {
  font-family: var(--f-label); font-size: 10px; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .6);
}
.sb-nav a.gesperrt { opacity: .55; }
.sb-fuss {
  padding: 16px 24px 22px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--f-label); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255, 255, 255, .42);
}

/* -------------------------------------------------------------- Topbar */
.main { display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  padding: 14px clamp(18px, 3vw, 34px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.tb-links { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar h2 { font-size: 22px; letter-spacing: .01em; }
.tb-rechts { display: flex; align-items: center; gap: 14px; }

.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger span {
  position: absolute; left: 9px; width: 22px; height: 2px; border-radius: 2px;
  background: var(--navy); transition: transform .3s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 25px; }

.user-menu { position: relative; }
.user-knopf { display: flex; align-items: center; gap: 11px; padding: 5px; border-radius: 999px; }
.user-kreis {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--blau); color: #fff; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 700; font-size: 14px; letter-spacing: .04em;
}
.user-text { text-align: left; line-height: 1.25; }
.user-text b { display: block; font-size: 13.5px; font-weight: 600; }
.user-text small {
  display: block; font-family: var(--f-label); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
}
.user-klapp {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px;
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  box-shadow: 0 20px 44px -20px rgba(6, 23, 70, .4); overflow: hidden; z-index: 60;
}
.user-klapp button {
  display: block; width: 100%; text-align: left; padding: 12px 18px; font-size: 14px;
  transition: background-color .2s;
}
.user-klapp button:hover { background: var(--bg-soft); }

/* -------------------------------------------------------------- Inhalt */
.inhalt { padding: clamp(20px, 3vw, 34px); flex: 1; }
.karten { display: grid; gap: 16px; }
.karte {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 26px);
}
.karte-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.karte h3 { font-size: 18px; }
.karte-hinweis { font-size: 13.5px; color: var(--text-soft); }

.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kz {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px 22px;
}
.kz b {
  display: block; font-family: var(--f-head); font-weight: 700; font-size: 38px;
  line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums;
}
.kz b.leer { color: rgba(6, 23, 70, .22); }
.kz span {
  display: block; margin-top: 8px; font-family: var(--f-label); font-weight: 500;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft);
}
.kz em {
  display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--text-soft);
}

/* -------------------------------------------------------------- Tabelle */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th {
  text-align: left; font-family: var(--f-label); font-weight: 500; font-size: 10.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blau);
  padding: 0 12px 10px; border-bottom: 2px solid var(--hairline); white-space: nowrap;
}
.tabelle td {
  padding: 12px; border-bottom: 1px solid var(--hairline);
  color: var(--text-soft); vertical-align: middle;
}
.tabelle tr:last-child td { border-bottom: none; }
.tabelle td b { color: var(--navy); font-weight: 600; }
.tabelle .rechts { text-align: right; }
.zeit { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }

.marke {
  display: inline-block; font-family: var(--f-label); font-weight: 500; font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; background: var(--tint); color: var(--blau);
}
.marke.rot { background: rgba(188, 16, 16, .1); color: var(--rot); }
.marke.gruen { background: rgba(31, 122, 77, .12); color: var(--gruen); }
.marke.grau { background: rgba(6, 23, 70, .07); color: var(--text-soft); }

/* --------------------------------------------------------------- Formular */
.feld { margin-bottom: 16px; }
.feld label {
  display: block; font-family: var(--f-label); font-weight: 500; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 6px;
}
.feld input, .feld select, .feld textarea {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm); background: var(--bg-soft);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.feld input:focus, .feld select:focus, .feld textarea:focus {
  border-color: var(--blau); background: #fff; outline: none;
}
.feld .hilfe { margin-top: 6px; font-size: 12.5px; color: var(--text-soft); }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------------------------------------------------------------- Dialog */
.dialog-lage { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.dialog-hg { position: absolute; inset: 0; background: rgba(6, 23, 70, .55); backdrop-filter: blur(4px); }
.dialog {
  position: relative; width: min(520px, 100%); max-height: 88dvh; overflow: auto;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(6, 23, 70, .55);
}
.dialog-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px 16px; border-bottom: 1px solid var(--hairline);
}
.dialog-kopf h3 { font-size: 20px; }
.dialog-x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.dialog-x:hover { background: var(--bg-soft); }
.dialog-x svg { width: 15px; height: 15px; }
.dialog-koerper { padding: 22px 26px; }
.dialog-fuss {
  padding: 16px 26px 22px; display: flex; justify-content: flex-end; gap: 12px;
  border-top: 1px solid var(--hairline); flex-wrap: wrap;
}

/* ----------------------------------------------------------------- Toast */
.toast-raum {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: var(--navy); color: #fff; padding: 13px 20px;
  border-radius: var(--radius-sm); font-size: 14px;
  box-shadow: 0 20px 44px -18px rgba(6, 23, 70, .6);
  animation: toastRein .35s var(--ease);
  border-left: 3px solid var(--gruen);
}
.toast.fehler { border-left-color: var(--rot); }
@keyframes toastRein { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------ Platzhalter */
.bald-karte { text-align: center; padding: clamp(34px, 6vw, 64px) 26px; }
.bald-karte .abschnitt {
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--tint); color: var(--blau);
  font-family: var(--f-head); font-weight: 700; font-size: 22px; margin-bottom: 18px;
}
.bald-karte h3 { font-size: 22px; margin-bottom: 10px; }
.bald-karte p { color: var(--text-soft); max-width: 52ch; margin: 0 auto; font-size: 14.5px; }
.bald-liste {
  margin: 22px auto 0; max-width: 460px; text-align: left; display: grid; gap: 9px;
  list-style: none;
}
.bald-liste li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text-soft); }
.bald-liste li::before {
  content: ''; position: absolute; left: 0; top: .6em; width: 9px; height: 3px;
  border-radius: 2px; background: var(--rot);
}

.leer-hinweis { text-align: center; padding: 40px 20px; color: var(--text-soft); font-size: 14.5px; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sb-breite); z-index: 150;
    transform: translateX(-100%); transition: transform .35s var(--ease);
  }
  body.menu-offen .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(6, 23, 70, .5); }
  body.menu-offen::after {
    content: ''; position: fixed; inset: 0; background: rgba(6, 23, 70, .45); z-index: 140;
  }
  .burger { display: block; }
  .topbar h2 { font-size: 18px; }
  .user-text { display: none; }
  .feld-reihe { grid-template-columns: 1fr; }
  .tabelle { font-size: 13px; }
  .tabelle .weg-mobil { display: none; }
  /* Breite Tabellen dürfen innerhalb ihrer Karte scrollen, statt die
     ganze Seite seitlich zu verschieben */
  .karte { overflow-x: auto; }
}

@media (max-width: 640px) {
  /* Der Veröffentlichen-Knopf sprengt auf schmalen Geräten die Kopfzeile.
     Er steht auf dem Dashboard ohnehin als Kachel zur Verfügung. */
  #btnVeroeffentlichen { display: none; }
  .topbar { padding-inline: 16px; gap: 12px; }
  .inhalt { padding: 16px; }
  .kennzahlen { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kz { padding: 15px 16px; }
  .kz b { font-size: 30px; }
  .kz em { display: none; }
}
