:root {
  --bg: #0a0a0c;
  --bg-2: #111115;
  --karte: #16161b;
  --karte-2: #1c1c23;
  --rand: #2a2a32;
  --text: #f2f2f4;
  --leise: #9a9aa6;
  --rot: #d1121f;
  --rot-hell: #ff3b46;
  --gruen: #2ecc71;
  --gelb: #f1c40f;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1100px 500px at 50% -10%, rgba(209, 18, 31, 0.16), transparent 70%), var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Login ---------- */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px 16px;
}
.login h1 {
  font: 400 clamp(3.4rem, 14vw, 7rem)/0.9 Anton, Impact, sans-serif;
  margin: 0;
  text-shadow: 0 0 40px rgba(209, 18, 31, 0.5);
}
.login h1 span { color: var(--rot); }
.login p { color: var(--leise); max-width: 420px; margin: 18px auto 28px; }
.kicker { color: var(--rot-hell); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.78rem; font-weight: 600; margin: 0 0 10px; }

.knopf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--rot);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.knopf:hover { background: var(--rot-hell); }
.knopf:active { transform: translateY(1px); }
.knopf.zweit { background: var(--karte-2); border: 1px solid var(--rand); }
.knopf.zweit:hover { background: #24242c; }
.knopf:disabled { opacity: 0.5; cursor: wait; }

.hinweis {
  max-width: 460px;
  margin: 0 auto 22px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(209, 18, 31, 0.45);
  background: rgba(209, 18, 31, 0.12);
}

/* ---------- Layout ---------- */

.leiste {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rand);
}
.server { display: flex; align-items: center; gap: 10px; min-width: 0; }
.server img, .server .platzhalter { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.server .platzhalter { display: grid; place-items: center; background: var(--karte-2); }
.server b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 0.8rem; color: var(--leise); display: flex; align-items: center; gap: 6px; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--leise); }
.punkt.an { background: var(--gruen); box-shadow: 0 0 8px var(--gruen); }
.punkt.aus { background: var(--rot); }
.ich { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.ich img { width: 30px; height: 30px; border-radius: 50%; }
.ich a { color: var(--leise); text-decoration: none; }
.ich a:hover { color: var(--text); }
@media (max-width: 560px) { .ich span { display: none; } }

.tabs {
  display: flex;
  gap: 6px;
  padding: 12px clamp(16px, 3vw, 32px) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  border: 1px solid transparent;
  background: none;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--leise);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.tabs button:hover { color: var(--text); background: var(--karte); }
.tabs button[aria-selected='true'] { color: var(--text); background: var(--karte-2); border-color: var(--rand); }

main { padding: 20px clamp(16px, 3vw, 32px) 64px; max-width: 1180px; margin: 0 auto; }
h2 { font: 400 1.9rem/1.1 Anton, Impact, sans-serif; letter-spacing: 0.02em; margin: 8px 0 16px; }
h3 { font-size: 1.02rem; margin: 0 0 4px; }
.leise { color: var(--leise); }
.klein { font-size: 0.85rem; }

/* ---------- Karten ---------- */

.raster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.raster.breit { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.zahl { font: 400 2.3rem/1 Anton, Impact, sans-serif; margin-top: 6px; }
.zahl small { font: 500 0.85rem Inter, sans-serif; color: var(--leise); }
.abschnitt { margin-top: 28px; }

.balken { height: 8px; border-radius: 99px; background: var(--karte-2); overflow: hidden; margin-top: 8px; }
.balken > div { height: 100%; border-radius: 99px; background: var(--gruen); }
.balken.mittel > div { background: var(--gelb); }
.balken.voll > div { background: var(--rot); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--rand); }
.liste li:first-child { border-top: 0; }
.liste .wann { margin-left: auto; color: var(--leise); font-size: 0.8rem; white-space: nowrap; }

/* ---------- Setup ---------- */

.feld { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--rand); }
.feld:first-of-type { border-top: 0; }
.feld .kopf { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.feld label { font-weight: 600; }
.marke { font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; background: rgba(46, 204, 113, 0.14); color: var(--gruen); white-space: nowrap; }
.marke.fehlt { background: rgba(241, 196, 15, 0.14); color: var(--gelb); }

select, input[type='number'], input[type='search'] {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 9px 12px;
}
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--rot-hell); outline-offset: 1px; }

.mehrfach { border: 1px solid var(--rand); border-radius: 10px; background: var(--bg-2); }
.mehrfach input[type='search'] { border: 0; border-bottom: 1px solid var(--rand); border-radius: 10px 10px 0 0; }
.mehrfach .optionen { max-height: 220px; overflow: auto; padding: 6px; }
.mehrfach label { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-weight: 400; cursor: pointer; }
.mehrfach label:hover { background: var(--karte-2); }
.mehrfach .fuss { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-top: 1px solid var(--rand); }

.farbe { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

.vorschau { columns: 2 220px; column-gap: 20px; font-size: 0.88rem; }
.vorschau div { break-inside: avoid; padding: 2px 0; }
.vorschau .ebene { color: var(--leise); margin-top: 6px; }
.vorschau code { color: var(--rot-hell); }

.befehl code { color: var(--rot-hell); font-weight: 600; }
.befehl ul { margin: 8px 0 0; padding-left: 18px; color: var(--leise); font-size: 0.9rem; }

.leer { color: var(--leise); font-style: italic; }

/* ---------- Toasts ---------- */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--karte-2); border: 1px solid var(--rand); border-left: 4px solid var(--leise); border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; white-space: pre-line; }
.toast.ok { border-left-color: var(--gruen); }
.toast.fehler { border-left-color: var(--rot); }
