/* NO MERCY Dashboard: echtes Schwarz, Ebenen nur über Helligkeit, Rot als Markenfarbe. */
:root {
  color-scheme: dark;
  --grund: #000;
  --flaeche: #111;
  --hoch: #1a1a1a;
  --tief: #2a2a2a;
  --linie: #1f1f1f;
  --linie-stark: #333;
  --text: #f2f2f2;
  --leise: #b4b4b4;
  --meta: #949494;
  --rot: #e5242f;
  --rot-tief: #2a0d10;
  --gruen: #3ecf8e;
  --gruen-tief: #0d2a1e;
  --gelb: #f1c40f;
  --gelb-tief: #2a230a;
  --radius: 14px;
  --radius-klein: 10px;
  --leiste: 232px;
  --kurve: cubic-bezier(0.2, 0.7, 0.2, 1);
  --schnell: 160ms;
  --mittel: 320ms;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { background: var(--grund); }
body { margin: 0; background: var(--grund); color: var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 0.92em; }
.zahl, .zelle-wert, .chip-zahl { font-variant-numeric: tabular-nums; }
.meta { color: var(--meta); font-size: 12px; }
.hilfe { color: var(--leise); font-size: 13px; }
.leer { color: var(--meta); padding: 6px 0; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--rot); color: #fff; }

.springe { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--text); color: #000; padding: 8px 14px; border-radius: 999px; }
.springe:focus { left: 8px; }

/* ---------- Rahmen ---------- */
.rahmen { display: grid; grid-template-columns: var(--leiste) 1fr; min-height: 100vh; }
.haupt { min-width: 0; display: flex; flex-direction: column; }
.inhalt { padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; width: 100%; }

.seitenleiste {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px 12px; border-right: 1px solid var(--linie); background: var(--grund);
}
.leiste-kopf { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; }
.wortmarke { display: flex; align-items: center; gap: 10px; font-family: 'Anton', 'Inter', sans-serif; font-size: 20px; letter-spacing: 0.04em; }
.wortmarke b { color: var(--rot); font-weight: 400; }
.marke-zeichen {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--rot); color: #fff; font-size: 13px; letter-spacing: 0.02em;
}
.nav-gruppe { display: flex; flex-direction: column; gap: 2px; }
.nav-titel { color: var(--meta); font-size: 12px; padding: 0 10px 6px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border-radius: var(--radius-klein); color: #bbb; text-decoration: none;
  transition: background var(--schnell), color var(--schnell);
}
.nav-link:hover { background: var(--flaeche); color: var(--text); }
.nav-link[aria-current='page'] { color: #fff; background: var(--hoch); }
.nav-link[aria-current='page']::before {
  content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--rot); animation: strich var(--mittel) var(--kurve);
}
.nav-link[aria-current='page'] .icon { color: var(--rot); }
.ich { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--linie); }
.ich-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.oben {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 32px; border-bottom: 1px solid var(--linie);
  background: rgb(0 0 0 / 0.78); backdrop-filter: blur(14px) saturate(140%);
}
.server { display: flex; align-items: center; gap: 10px; min-width: 0; }
.server b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--leise); white-space: nowrap; }
.puls { width: 8px; height: 8px; border-radius: 50%; background: var(--meta); position: relative; }
.bot-status.an .puls { background: var(--gruen); }
.bot-status.an .puls::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--gruen); animation: puls 2.4s ease-out infinite; }
.bot-status.aus .puls { background: var(--rot); }

.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--tief); }
.avatar.gross { width: 56px; height: 56px; }
.platzhalter { display: grid; place-items: center; color: var(--leise); font-weight: 600; }
.symbol-knopf {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--leise); cursor: pointer; transition: background var(--schnell), color var(--schnell);
}
.symbol-knopf:hover { background: var(--hoch); color: var(--text); }
.nur-handy { display: none; }

/* ---------- Seitenkopf ---------- */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 4px; }
.seitenkopf h1 { font-size: 24px; line-height: 1.2; }
.unterzeile { color: var(--leise); margin-top: 4px; font-size: 15px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--text); color: #000; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform var(--schnell) var(--kurve), background var(--schnell), opacity var(--schnell);
}
.knopf:hover { background: #fff; }
.knopf:active { transform: scale(0.96); }
.knopf:disabled { opacity: 0.55; cursor: progress; }
.knopf.zweit { background: var(--tief); color: var(--text); }
.knopf.zweit:hover { background: #363636; }
.knopf.gefahr { background: var(--rot-tief); color: #ff8a8f; }
.knopf.gefahr:hover { background: #3a1216; }
.knopf.breit { width: 100%; height: 44px; }
.knopf.laedt { position: relative; color: transparent !important; }
.knopf.laedt::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: #777 #777 transparent transparent; animation: dreh 0.7s linear infinite;
}
.link { border: 0; background: none; color: var(--leise); cursor: pointer; padding: 4px 0; font-size: 13px; transition: color var(--schnell); }
.link:hover { color: var(--text); }

/* ---------- Karten und Zahlen ---------- */
.karte { background: var(--flaeche); border-radius: var(--radius); padding: 18px 20px; }
.karte h2 { font-size: 16px; }
.karte-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.zellen { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--flaeche); border-radius: var(--radius); }
.zellen .zelle { padding: 18px 20px; }
.zellen .zelle + .zelle { border-left: 1px solid var(--linie); }
.zelle-label { color: var(--leise); font-size: 13px; }
.zelle-wert { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 2px 0; }
.stat-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--linie); border-radius: var(--radius-klein); overflow: hidden; }
.stat-zeile .zelle { background: var(--hoch); padding: 12px 14px; }
.stat-zeile .zelle-wert { font-size: 20px; }

.raster-haupt { display: grid; grid-template-columns: 1fr 384px; gap: 20px; align-items: start; }
.spalte { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--linie); }
.zeilen li:first-child { border-top: 0; }
.zeile-haupt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.art-punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.balken-zeile + .balken-zeile { margin-top: 14px; }
.balken-text { display: flex; justify-content: space-between; margin-bottom: 6px; }
.balken { height: 8px; border-radius: 999px; background: var(--tief); overflow: hidden; }
.balken > div { height: 100%; width: var(--breite); border-radius: inherit; background: var(--text); transform-origin: left; animation: wachse 0.9s var(--kurve) both; }
.balken.mittel > div { background: var(--gelb); }
.balken.voll > div { background: var(--rot); }
.ki-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.marke { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--tief); color: var(--leise); white-space: nowrap; }
.marke.ok { background: var(--gruen-tief); color: var(--gruen); }
.marke.warn { background: var(--gelb-tief); color: var(--gelb); }

/* ---------- Einstellungen ---------- */
.abschnitt { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--linie); }
.seitenkopf + .abschnitt { border-top: 0; padding-top: 8px; }
.abschnitt-text h2 { font-size: 16px; font-weight: 500; margin-top: 6px; }
.abschnitt-text p { color: var(--leise); margin-top: 6px; }
.panel { background: var(--flaeche); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.feld { display: flex; flex-direction: column; gap: 8px; }
.feld-kopf { display: flex; align-items: center; gap: 8px; }
.feld label, .feld-kopf label { font-weight: 500; }
.panel-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.panel-fuss:only-child { justify-content: flex-end; margin: 0; }

input[type='text'], input[type='number'], input[type='search'], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-klein);
  border: 1px solid var(--linie-stark); background: var(--hoch); color: var(--text);
  transition: border-color var(--schnell), background var(--schnell);
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23949494' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input:hover, select:hover, textarea:hover { border-color: #444; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rot); background: #141414; }
::placeholder { color: #6f6f6f; }

.suchfeld { position: relative; display: block; }
.suchfeld .icon { position: absolute; left: 12px; top: 12px; color: var(--meta); pointer-events: none; }
.suchfeld input { padding-left: 36px; }

.mehrfach { background: var(--hoch); border-radius: var(--radius-klein); overflow: hidden; }
.mehrfach .suchfeld input { border: 0; border-bottom: 1px solid var(--linie-stark); border-radius: 0; background: transparent; }
.optionen { max-height: 260px; overflow-y: auto; padding: 6px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px; border-radius: 8px; cursor: pointer; transition: background var(--schnell); }
.option:hover { background: var(--tief); }
.option input { accent-color: var(--rot); width: 16px; height: 16px; flex: none; }
.option-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farbpunkt { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mehrfach-fuss { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; border-top: 1px solid var(--linie-stark); }

.dauer { display: grid; grid-template-columns: 96px 140px auto; gap: 8px; align-items: center; justify-content: start; }

.schalter-zeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.schalter-zeile .hilfe { margin-top: 4px; }
.schalter {
  position: relative; width: 44px; height: 26px; flex: none; border: 0; border-radius: 999px; background: var(--tief); cursor: pointer;
  transition: background var(--mittel) var(--kurve);
}
.schalter-knopf { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ddd; transition: transform var(--mittel) var(--kurve), background var(--mittel); }
.schalter[aria-checked='true'] { background: var(--rot); }
.schalter[aria-checked='true'] .schalter-knopf { transform: translateX(18px); background: #fff; }

.vorschau { list-style: none; margin: 0; padding: 4px 0; max-height: 440px; overflow-y: auto; }
.vorschau li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; min-height: 32px; }
.vorschau li.ebene { display: block; color: var(--meta); font-size: 12px; padding: 14px 0 4px; border-top: 1px solid var(--linie); }
.vorschau li.ebene:first-child { border-top: 0; padding-top: 0; }
.vorschau code { color: var(--rot); }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.limit { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Mitglieder ---------- */
.zaehlkarten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zaehlkarte {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid transparent; background: var(--flaeche); text-align: left; cursor: pointer;
  transition: border-color var(--schnell), background var(--schnell), transform var(--schnell) var(--kurve);
}
.zaehlkarte b { font-size: 18px; font-weight: 600; }
.zaehlkarte:hover { background: var(--hoch); }
.zaehlkarte:active { transform: scale(0.98); }
.zaehlkarte[aria-pressed='true'] { border-color: var(--rot); background: var(--rot-tief); }

.mitglieder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.liste-karte { padding: 12px; }
.mitglied-liste { list-style: none; margin: 10px 0 0; padding: 0; max-height: 64vh; overflow-y: auto; }
.mitglied-zeile {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: var(--radius-klein);
  background: transparent; text-align: left; cursor: pointer; transition: background var(--schnell);
}
.mitglied-zeile:hover { background: var(--hoch); }
.mitglied-zeile[aria-pressed='true'] { background: var(--tief); }
.mitglied-name { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitglied-rang { max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.detail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.leer-detail { min-height: 200px; display: grid; place-items: center; }
.person { display: flex; align-items: center; gap: 12px; }
.person h2 { font-size: 18px; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.warns h3 { font-size: 14px; margin-bottom: 6px; }

/* ---------- Logs ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--flaeche); color: var(--leise); cursor: pointer; transition: background var(--schnell), color var(--schnell);
}
.chip:hover { background: var(--hoch); color: var(--text); }
.chip[aria-pressed='true'] { background: var(--text); color: #000; }
.chip-zahl { font-size: 12px; opacity: 0.7; }
.log-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.log { display: flex; flex-direction: column; gap: 12px; box-shadow: inset 3px 0 0 var(--art); }
.log-art { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.log-art .meta { margin-left: auto; }
.log h3 { font-size: 16px; }
.log-felder { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.log-felder dt { color: var(--meta); }
.log-felder dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Werkzeuge ---------- */
.panel-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.panel-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.befehl-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.befehl h2 code { font-size: 15px; color: var(--text); }
.befehl ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.befehl li { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 10px; color: var(--leise); }
.befehl li code { color: var(--text); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-karte { width: min(420px, 100%); background: var(--flaeche); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 16px; animation: auf 0.6s var(--kurve) both; }
.login-karte .wortmarke { font-size: 26px; }
.login-karte h1 { font-size: 24px; margin-top: 8px; }
.login-karte p { color: var(--leise); }
.hinweis { background: var(--rot-tief); color: #ff9ca0; border-radius: var(--radius-klein); padding: 12px 14px; }

/* ---------- Toasts und Dialog (schweben: hier ist Glas und Schatten erlaubt) ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  padding: 12px 16px; border-radius: 12px; background: rgb(28 28 28 / 0.86); backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5); white-space: pre-line; animation: toast-rein var(--mittel) var(--kurve) both;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.ok { box-shadow: inset 3px 0 0 var(--gruen), 0 12px 32px rgb(0 0 0 / 0.5); }
.toast.fehler { box-shadow: inset 3px 0 0 var(--rot), 0 12px 32px rgb(0 0 0 / 0.5); }
.toast.weg { opacity: 0; transform: translateX(12px); }
.dialog {
  width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 24px; background: #161616; color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.6); animation: auf var(--mittel) var(--kurve) both;
}
.dialog::backdrop { background: rgb(0 0 0 / 0.6); backdrop-filter: blur(6px); animation: blende var(--mittel) both; }
.dialog h2 { font-size: 18px; }
.dialog p { color: var(--leise); margin-top: 8px; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.dialog.weg { opacity: 0; transform: scale(0.97); transition: opacity var(--schnell), transform var(--schnell); }

/* ---------- Bewegung ---------- */
.inhalt.rein > * { animation: auf 0.5s var(--kurve) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes auf { from { opacity: 0; transform: translateY(14px); } }
@keyframes blende { from { opacity: 0; } }
@keyframes toast-rein { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes wachse { from { transform: scaleX(0); } }
@keyframes strich { from { transform: scaleY(0); } }
@keyframes puls { from { transform: scale(1); opacity: 0.6; } to { transform: scale(3); opacity: 0; } }
@keyframes dreh { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1180px) {
  .raster-haupt { grid-template-columns: 1fr; }
  .mitglieder-layout { grid-template-columns: 1fr; }
  .detail { position: static; }
  .abschnitt { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .seitenleiste {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform var(--mittel) var(--kurve);
    background: #0b0b0b; box-shadow: 24px 0 64px rgb(0 0 0 / 0.6);
  }
  .seitenleiste.offen { transform: none; }
  .schleier { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / 0.55); backdrop-filter: blur(4px); animation: blende var(--mittel) both; }
  .nur-handy { display: inline-grid; }
  .oben { padding: 0 16px; height: 56px; gap: 10px; }
  .oben .server .meta { display: none; }
  .bot-status { font-size: 0; gap: 0; }
  .inhalt { padding: 20px 16px 48px; gap: 16px; }
  .zellen { grid-template-columns: 1fr 1fr; }
  .zellen .zelle:nth-child(3) { border-left: 0; }
  .zellen .zelle:nth-child(n + 3) { border-top: 1px solid var(--linie); }
  .zaehlkarten { display: flex; overflow-x: auto; scrollbar-width: none; }
  .zaehlkarte { flex: none; min-width: 132px; }
  .zweispaltig { grid-template-columns: 1fr; }
  .dauer { grid-template-columns: 1fr 1fr; }
  .dauer .knopf { grid-column: 1 / -1; }
  .seitenkopf .knopf { width: 100%; }
  .log-raster, .befehl-liste, .panel-liste { grid-template-columns: 1fr; }
}
