/* Florian – Oberfläche.
   Dunkle Einsatzkonsole, Akzent in Feuerrot, Signalgelb für Wartendes. */

:root {
  --grund: #0d1117;
  --flaeche: #151b23;
  --flaeche-hoch: #1c232d;
  --linie: rgba(255, 255, 255, .09);
  --linie-stark: rgba(255, 255, 255, .16);

  --text: #e7ecf3;
  --text-leise: #93a1b4;
  --text-still: #6b7787;

  --feuer: #e5383b;
  --feuer-hell: #ff5a52;
  --feuer-tief: #b5161b;
  --signal: #f2b33d;
  --gruen: #3fb950;
  --blau: #4a9eda;

  --art-uebung: #e5383b;
  --art-event: #f2b33d;
  --art-veranstaltung: #4a9eda;
  --art-fahrt: #3fb950;

  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schmal: "Barlow Condensed", "Oswald", "Roboto Condensed", "Arial Narrow", var(--schrift);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --rund: 10px;
  --rund-klein: 6px;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--schmal);
  font-weight: 600;
  letter-spacing: .005em;
  margin: 0 0 .35em;
  line-height: 1.12;
}
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--feuer-hell); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ Gerüst */
.rahmen { display: flex; min-height: 100vh; }

.leiste {
  width: 226px;
  flex: 0 0 226px;
  background: var(--flaeche);
  border-right: 1px solid var(--linie);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.glut {
  height: 2px;
  background: linear-gradient(90deg, var(--feuer-tief), var(--feuer), var(--signal));
}

.marke { padding: 18px 18px 16px; }
.marke .name {
  font-family: var(--schmal);
  font-size: 25px;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
}
.marke .name::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--feuer);
  box-shadow: 0 0 0 4px rgba(229, 56, 59, .16);
}
.marke .zusatz { color: var(--text-still); font-size: 12px; display: block; margin-top: 2px; }

.navi { padding: 4px 10px 12px; flex: 1; overflow-y: auto; }
.navi a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 1px;
  border-radius: var(--rund-klein);
  color: var(--text-leise);
  font-size: 13.5px;
}
.navi a:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.navi a.aktiv {
  background: rgba(229, 56, 59, .12);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--feuer);
}
.navi .gruppe {
  display: block;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-still);
  padding: 16px 10px 5px;
}
.navi .zaehler {
  background: var(--signal);
  color: #241a00;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

.leiste-fuss {
  border-top: 1px solid var(--linie);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-still);
}
.leiste-fuss .person { color: var(--text); font-size: 13.5px; display: block; }
.leiste-fuss form { display: inline; }
.leiste-fuss button {
  background: none; border: 0; color: var(--text-leise);
  padding: 0; cursor: pointer; font: inherit;
}
.leiste-fuss button:hover, .leiste-fuss a:hover { color: var(--feuer-hell); }

.inhalt { flex: 1; min-width: 0; }

.kopf {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 17, 23, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
  padding: 18px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.kopf p { margin: 2px 0 0; color: var(--text-leise); font-size: 13px; }
.bereich { padding: 22px 26px 70px; max-width: 1200px; }

/* --------------------------------------------------------- Bausteine */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  padding: 18px;
  margin-bottom: 16px;
}
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.karte.eng { padding: 0; overflow: hidden; }

.gitter { display: grid; gap: 16px; }
.gitter.zwei { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

/* Termin */
.termin {
  display: flex;
  gap: 14px;
  padding: 11px 13px;
  background: var(--flaeche-hoch);
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  margin-bottom: 8px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.termin::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--art-uebung);
}
.termin.art-event::before { background: var(--art-event); }
.termin.art-veranstaltung::before { background: var(--art-veranstaltung); }
.termin.art-fahrt::before { background: var(--art-fahrt); }
.termin:hover { border-color: var(--linie-stark); }
.termin.abgesagt { opacity: .55; }
.termin.abgesagt .titel { text-decoration: line-through; }

.termin .tag {
  font-family: var(--schmal);
  text-align: center;
  min-width: 46px;
  line-height: 1.05;
  padding-left: 4px;
}
.termin .tag .zahl { font-size: 24px; display: block; color: #fff; }
.termin .tag .monat { font-size: 12px; color: var(--text-still); }
.termin .titel { font-weight: 550; color: #fff; }
.termin .titel:hover { color: var(--feuer-hell); }
.termin .meta { color: var(--text-leise); font-size: 12.5px; }
.termin .meta + .meta { margin-top: 1px; }

/* Marker / Status */
.marker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--linie-stark);
  color: var(--text-leise);
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}
.marker.uebung { color: #ff8a86; border-color: rgba(229, 56, 59, .4); background: rgba(229, 56, 59, .1); }
.marker.event, .marker.offen { color: var(--signal); border-color: rgba(242, 179, 61, .4); background: rgba(242, 179, 61, .1); }
.marker.veranstaltung { color: #8ec5ef; border-color: rgba(74, 158, 218, .4); background: rgba(74, 158, 218, .1); }
.marker.fahrt, .marker.akzeptiert, .marker.aktiv { color: #7ee08c; border-color: rgba(63, 185, 80, .4); background: rgba(63, 185, 80, .1); }
.marker.abgelehnt, .marker.inaktiv { color: var(--text-still); }
.marker.gast { color: #fff; background: rgba(255, 255, 255, .1); }
.marker.rolle { font-family: var(--mono); letter-spacing: 0; text-transform: none; }

.wehrpunkt {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

/* --------------------------------------------------- Listen (Zeilen) */
.liste { display: flex; flex-direction: column; }
.listenkopf, .zeile {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--linie);
}
.listenkopf {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-still);
  background: rgba(255, 255, 255, .02);
}
.zeile { color: var(--text); }
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: rgba(255, 255, 255, .035); }
.zeile .haupt { color: #fff; font-weight: 550; }
.zeile .neben { color: var(--text-still); font-size: 12px; }
.zeile .kennung { font-family: var(--mono); font-size: 12.5px; color: var(--text-leise); }
.zeile.inaktiv .haupt { color: var(--text-still); }

.personen { grid-template-columns: 2fr 1.3fr 1fr 1.3fr 96px 104px; }
@media (max-width: 1040px) {
  .personen { grid-template-columns: 1.6fr 1fr 96px; }
  .personen > :nth-child(n+4) { display: none; }
}

.suchleiste {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--linie);
}
.suchleiste input, .suchleiste select { max-width: 240px; }

/* ----------------------------------------------------------- Formular */
label { display: block; font-size: 12px; color: var(--text-leise); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--rund-klein);
  font: inherit;
  background: var(--grund);
  color: var(--text);
}
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .26); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--feuer);
  box-shadow: 0 0 0 3px rgba(229, 56, 59, .18);
}
input[type=color] { padding: 3px; height: 38px; cursor: pointer; }
::placeholder { color: var(--text-still); }
textarea { min-height: 96px; resize: vertical; }
.feld { margin-bottom: 14px; }
.feldreihe { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ankreuzen { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.ankreuzen input { width: auto; accent-color: var(--feuer); margin-top: 3px; }
.ankreuzen label { margin: 0; color: var(--text); font-size: 13.5px; }

.schalter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 550;
  padding: 8px 15px;
  border: 1px solid var(--feuer);
  background: var(--feuer);
  color: #fff;
  border-radius: var(--rund-klein);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s ease, border-color .12s ease;
}
.schalter:hover { background: var(--feuer-hell); border-color: var(--feuer-hell); color: #fff; }
.schalter.ruhig {
  background: var(--flaeche-hoch);
  border-color: var(--linie-stark);
  color: var(--text);
}
.schalter.ruhig:hover { background: #242c37; border-color: rgba(255, 255, 255, .3); color: var(--text); }
.schalter.gefahr { background: transparent; border-color: rgba(229, 56, 59, .5); color: var(--feuer-hell); }
.schalter.gefahr:hover { background: rgba(229, 56, 59, .14); border-color: var(--feuer); color: var(--feuer-hell); }
.schalter.klein { padding: 4px 11px; font-size: 12.5px; }
.schalterreihe { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
th {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-still); font-weight: 600;
}
table tr:last-child td { border-bottom: 0; }
tr.kollision td { background: rgba(242, 179, 61, .08); }

/* ------------------------------------------------------- Rückmeldung */
.hinweiszeile {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--rund-klein);
  border: 1px solid var(--linie-stark);
  background: var(--flaeche);
  margin-bottom: 12px;
  font-size: 13.5px;
}
.hinweiszeile::before { content: "•"; color: var(--text-still); }
.hinweiszeile.erfolg { border-color: rgba(63, 185, 80, .4); background: rgba(63, 185, 80, .08); }
.hinweiszeile.erfolg::before { content: "✓"; color: var(--gruen); }
.hinweiszeile.fehler { border-color: rgba(229, 56, 59, .45); background: rgba(229, 56, 59, .09); }
.hinweiszeile.fehler::before { content: "!"; color: var(--feuer-hell); }
.hinweiszeile.warnung { border-color: rgba(242, 179, 61, .4); background: rgba(242, 179, 61, .08); }
.hinweiszeile.warnung::before { content: "!"; color: var(--signal); }
.hinweiszeile.hinweis::before { content: "i"; color: var(--blau); }

.zugang {
  border: 1px solid rgba(242, 179, 61, .45);
  background: linear-gradient(180deg, rgba(242, 179, 61, .12), rgba(242, 179, 61, .04));
  border-radius: var(--rund);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.zugang h2 { color: var(--signal); }
.geheim {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.geheim input {
  font-family: var(--mono);
  font-size: 14px;
  max-width: 340px;
  background: var(--grund);
  color: #fff;
}

.leer {
  border: 1px dashed var(--linie-stark);
  border-radius: var(--rund);
  padding: 26px;
  text-align: center;
  color: var(--text-still);
  font-size: 13.5px;
}

.alarm {
  border: 1px solid rgba(242, 179, 61, .35);
  background: linear-gradient(180deg, rgba(242, 179, 61, .09), transparent 70%);
  border-radius: var(--rund);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.alarm h2 { color: var(--signal); }

.klein { font-size: 12.5px; color: var(--text-leise); }
.mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-leise); word-break: break-all; }
.trennlinie { border: 0; border-top: 1px solid var(--linie); margin: 18px 0; }

/* --------------------------------------------------------- Vergleich */
.vergleich { overflow-x: auto; }
.vergleich table { min-width: 760px; }
.vergleich td .eintrag { display: block; padding: 3px 0; color: var(--text); }
.vergleich td .eintrag:hover { color: var(--feuer-hell); }

/* ----------------------------------------------------------- Anmelden */
.anmeldeseite {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(229, 56, 59, .18), transparent 70%),
    var(--grund);
}
.anmeldekarte {
  width: min(400px, 100%);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--schatten);
}
.anmeldekarte .kopfzeile { padding: 24px 26px 4px; }
.anmeldekarte .kopfzeile h1 { font-size: 32px; letter-spacing: .02em; }
.anmeldekarte form { padding: 10px 26px 24px; }
.anmeldekarte .schalter { width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .rahmen { flex-direction: column; }
  .leiste { width: 100%; flex: none; height: auto; position: static; }
  .navi { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 10px 10px; }
  .navi .gruppe { display: none; }
  .navi a.aktiv { box-shadow: inset 0 -2px 0 var(--feuer); }
  .kopf { position: static; padding: 16px; }
  .bereich { padding: 16px 16px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
