/* Toobad Server - Hausgestaltung: Obsidian-Grau mit Smaragd.
   Gleiche Sprache wie Emerald, SideEye und NetzScan. */

:root {
  --grund:      #1e1f22;
  --flaeche:    #2b2d31;
  --flaeche-2:  #313338;
  --rahmen:     #3f4147;
  --rahmen-hell:#4b4e55;
  --text:       #dcddde;
  --text-leise: #a3a6aa;
  --text-still: #6b6f76;
  --smaragd:    #10b981;
  --smaragd-d:  #0d9668;
  --smaragd-w:  rgba(16, 185, 129, .12);
  --rot:        #ef4444;
  --rot-w:      rgba(239, 68, 68, .12);
  --gelb:       #f59e0b;
  --gelb-w:     rgba(245, 158, 11, .12);
  --blau:       #60a5fa;
  --rundung:    10px;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--grund); color: var(--text);
  font: 15px/1.55 var(--schrift);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--smaragd); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Ladeschirm ── */
.ladeschirm { min-height: 100vh; display: grid; place-items: center; }
.ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--rahmen); border-top-color: var(--smaragd);
  animation: dreh .8s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ── Grundgerüst ── */
.huelle { min-height: 100vh; display: flex; flex-direction: column; }

.kopf {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem;
  background: var(--flaeche); border-bottom: 1px solid var(--rahmen);
  position: sticky; top: 0; z-index: 20;
}
.marke { display: flex; align-items: center; gap: .55rem; font-weight: 600; letter-spacing: -.01em; }
.marke svg { color: var(--smaragd); }
.marke b { color: var(--smaragd); font-weight: 600; }

/* Das Menü darf nie umbrechen - lieber schieben als eine zweite Zeile. */
.hauptmenue {
  display: flex; gap: .25rem; margin-left: 1rem; flex: 1;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.hauptmenue::-webkit-scrollbar { display: none; }
.hauptmenue button {
  background: none; border: 0; color: var(--text-leise);
  padding: .45rem .8rem; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: .9rem; display: flex; align-items: center; gap: .4rem;
  white-space: nowrap; flex: none;
}
.hauptmenue button:hover { background: var(--flaeche-2); color: var(--text); }
.hauptmenue button.aktiv { background: var(--smaragd-w); color: var(--smaragd); }
.hauptmenue .zaehler {
  background: var(--smaragd); color: var(--grund); font-size: .7rem; font-weight: 700;
  padding: .05rem .35rem; border-radius: 99px; min-width: 1.1rem; text-align: center;
}

.inhalt { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* ── Bausteine ── */
.karte {
  background: var(--flaeche); border: 1px solid var(--rahmen);
  border-radius: var(--rundung); padding: 1.1rem 1.25rem;
}
.karte + .karte { margin-top: 1rem; }
.karte h2 { margin: 0 0 .9rem; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.karte h2 svg { color: var(--smaragd); }

.gitter { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

h1 { font-size: 1.35rem; font-weight: 600; margin: 0 0 .25rem; letter-spacing: -.02em; }
.unterzeile { color: var(--text-leise); font-size: .9rem; margin: 0 0 1.4rem; }

button, .knopf {
  font: inherit; font-size: .9rem; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--rahmen);
  background: var(--flaeche-2); color: var(--text);
  padding: .5rem .9rem; display: inline-flex; align-items: center; gap: .45rem;
  transition: background .12s, border-color .12s;
}
button:hover:not(:disabled), .knopf:hover { background: var(--rahmen); border-color: var(--rahmen-hell); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.haupt { background: var(--smaragd); border-color: var(--smaragd); color: #06281c; font-weight: 600; }
button.haupt:hover:not(:disabled) { background: var(--smaragd-d); border-color: var(--smaragd-d); }
button.gefahr { color: var(--rot); border-color: rgba(239,68,68,.35); }
button.gefahr:hover:not(:disabled) { background: var(--rot-w); }
button.schlicht { background: none; border-color: transparent; color: var(--text-leise); }
button.schlicht:hover { background: var(--flaeche-2); color: var(--text); }
button.klein { padding: .3rem .6rem; font-size: .82rem; }

input, select, textarea {
  font: inherit; font-size: .9rem; width: 100%;
  background: var(--grund); color: var(--text);
  border: 1px solid var(--rahmen); border-radius: 8px; padding: .55rem .7rem;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--smaragd); box-shadow: 0 0 0 3px var(--smaragd-w);
}
textarea { resize: vertical; min-height: 4.5rem; font-family: inherit; }
label { display: block; font-size: .84rem; color: var(--text-leise); margin-bottom: .3rem; }
.feld + .feld { margin-top: .85rem; }

/* ── Zustandsmarken ── */
.marke-zustand {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; padding: .18rem .55rem; border-radius: 99px;
  border: 1px solid var(--rahmen); color: var(--text-leise); white-space: nowrap;
}
.marke-zustand::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.marke-zustand.laeuft { color: var(--smaragd); border-color: rgba(16,185,129,.3); background: var(--smaragd-w); }
.marke-zustand.aus    { color: var(--text-still); }
.marke-zustand.warn   { color: var(--gelb); border-color: rgba(245,158,11,.3); background: var(--gelb-w); }
.marke-zustand.fehler { color: var(--rot); border-color: rgba(239,68,68,.3); background: var(--rot-w); }

/* ── Serverkacheln ── */
.server-kachel {
  background: var(--flaeche); border: 1px solid var(--rahmen);
  border-radius: var(--rundung); padding: 1rem 1.1rem; cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.server-kachel:hover { border-color: var(--smaragd); transform: translateY(-1px); }
.server-kachel .oben { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.server-kachel .titel { font-weight: 600; }
.server-kachel .tarif { font-size: .78rem; color: var(--text-still); margin-top: .1rem; }
.server-kachel .zahlen { display: flex; gap: 1.1rem; margin-top: .9rem; font-size: .82rem; color: var(--text-leise); }
.server-kachel .zahlen b { color: var(--text); font-weight: 600; }

/* ── Balken ── */
.balken { height: 6px; background: var(--grund); border-radius: 99px; overflow: hidden; margin-top: .35rem; }
.balken i { display: block; height: 100%; background: var(--smaragd); border-radius: 99px; transition: width .3s; }
.balken i.warn { background: var(--gelb); }
.balken i.voll { background: var(--rot); }

/* ── Tabelle ── */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 500; color: var(--text-still); font-size: .78rem;
     text-transform: uppercase; letter-spacing: .04em; padding: .4rem .6rem; }
td { padding: .6rem; border-top: 1px solid var(--rahmen); vertical-align: middle; }
tr:hover td { background: var(--flaeche-2); }
.tabellen-huelle { overflow-x: auto; margin: 0 -1.25rem -1.1rem; padding: 0 1.25rem 1.1rem; }

/* ── Reiter ── */
.reiter { display: flex; gap: .2rem; border-bottom: 1px solid var(--rahmen); margin-bottom: 1.2rem; overflow-x: auto; }
.reiter button {
  background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--text-leise); padding: .6rem .9rem; white-space: nowrap;
}
.reiter button:hover { background: none; color: var(--text); }
.reiter button.aktiv { color: var(--smaragd); border-bottom-color: var(--smaragd); }

/* ── Konsole und Terminal ── */
.konsole {
  background: #131417; border: 1px solid var(--rahmen); border-radius: 8px;
  padding: .8rem 1rem; font: 13px/1.5 var(--mono); color: #c8cbd0;
  height: 26rem; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
#terminal { height: 26rem; border: 1px solid var(--rahmen); border-radius: 8px;
            padding: .5rem; background: #131417; }

/* ── Dateien ── */
.datei-zeile { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem;
               border-radius: 7px; cursor: pointer; }
.datei-zeile:hover { background: var(--flaeche-2); }
.datei-zeile svg { color: var(--text-still); flex: none; }
.datei-zeile.ordner svg { color: var(--smaragd); }
.datei-zeile .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei-zeile .groesse { color: var(--text-still); font-size: .8rem; font-variant-numeric: tabular-nums; }
.brotkrumen { display: flex; align-items: center; gap: .3rem; font-size: .85rem;
              color: var(--text-leise); margin-bottom: .6rem; flex-wrap: wrap; }
.brotkrumen button { background: none; border: 0; color: var(--smaragd); padding: .15rem .3rem; }

/* ── Meldungen ── */
.hinweis { padding: .7rem .9rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1rem;
           border: 1px solid var(--rahmen); background: var(--flaeche-2); color: var(--text-leise); }
.hinweis.fehler { border-color: rgba(239,68,68,.35); background: var(--rot-w); color: #fca5a5; }
.hinweis.gut    { border-color: rgba(16,185,129,.35); background: var(--smaragd-w); color: #6ee7b7; }
.hinweis.warn   { border-color: rgba(245,158,11,.35); background: var(--gelb-w); color: #fcd34d; }

.leer { text-align: center; padding: 1.8rem 1rem; color: var(--text-still); }
.leer svg { color: var(--rahmen-hell); margin-bottom: .6rem; }
.leer p { margin: 0 0 .2rem; }

/* ════════ Startseite ════════ */
.start .kopf { position: sticky; }

.buehne {
  padding: 5rem 1.25rem 4.5rem;
  background:
    radial-gradient(60rem 26rem at 50% -6rem, rgba(16,185,129,.13), transparent 70%),
    var(--grund);
  border-bottom: 1px solid var(--rahmen);
}
.buehne-inhalt { max-width: 46rem; margin: 0 auto; text-align: center; }
.buehne h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.1;
  letter-spacing: -.03em; margin: 1rem 0 0;
}
.buehne-text {
  color: var(--text-leise); font-size: clamp(1rem, 2.2vw, 1.15rem);
  max-width: 34rem; margin: 1rem auto 0;
}
.buehne .reihe { justify-content: center; }

.faehnchen {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: var(--smaragd);
  background: var(--smaragd-w); border: 1px solid rgba(16,185,129,.25);
  padding: .3rem .75rem; border-radius: 99px;
}

button.gross, .knopf.gross { padding: .7rem 1.4rem; font-size: .95rem; border-radius: 9px; }

.bereich { max-width: 1080px; margin: 0 auto; padding: 4rem 1.25rem; }
.streifen { background: var(--flaeche); border-block: 1px solid var(--rahmen); }
.abschnitt {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: -.02em;
  text-align: center; margin: 0 0 .5rem; font-weight: 600;
}
.abschnitt-text {
  text-align: center; color: var(--text-leise);
  max-width: 34rem; margin: 0 auto 2.2rem;
}

/* Tarife */
.preis-gitter { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.preis {
  position: relative; background: var(--grund);
  border: 1px solid var(--rahmen); border-radius: 13px; padding: 1.6rem 1.3rem 1.3rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.preis.hervor { border-color: var(--smaragd); box-shadow: 0 0 0 1px var(--smaragd-w); }
.band {
  position: absolute; top: -.65rem; left: 50%; transform: translateX(-50%);
  background: var(--smaragd); color: #06281c; font-size: .7rem; font-weight: 700;
  padding: .15rem .6rem; border-radius: 99px; letter-spacing: .02em;
}
.preis-name { font-size: 1.05rem; font-weight: 600; color: var(--text-leise); }
.preis-zahl { font-size: 2.3rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.preis-zusatz { font-size: .82rem; color: var(--text-still); margin-top: -.25rem; }
.preis-liste { list-style: none; margin: .9rem 0 1.2rem; padding: 0; flex: 1; }
.preis-liste li {
  display: flex; align-items: center; gap: .55rem;
  font-size: .88rem; color: var(--text-leise); padding: .3rem 0;
}
.preis-liste svg { color: var(--smaragd); flex: none; }

/* Was du bekommst */
.merkmal-gitter { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.merkmal { padding: .25rem; }
.merkmal-zeichen {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--smaragd-w); color: var(--smaragd);
  display: grid; place-items: center; margin-bottom: .85rem;
}
.merkmal h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 600; }
.merkmal p { margin: 0; color: var(--text-leise); font-size: .89rem; }

/* Ablauf */
.schritt-gitter { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.schritt h3 { margin: .7rem 0 .3rem; font-size: .98rem; font-weight: 600; }
.schritt p { margin: 0; color: var(--text-leise); font-size: .87rem; }
.schritt-nr {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--smaragd); color: var(--smaragd);
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}

.schluss { text-align: center; padding-block: 4.5rem; }

.fusszeile {
  border-top: 1px solid var(--rahmen); padding: 1.5rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; max-width: 1080px; margin: 0 auto;
}
.fusszeile .marke { font-size: .9rem; }

/* ── Anmeldeseite ── */
.anmelde-seite { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.anmelde-karte { width: 100%; max-width: 25rem; }
.anmelde-kopf { text-align: center; margin-bottom: 1.8rem; }
.anmelde-kopf .zeichen {
  width: 52px; height: 52px; border-radius: 13px; background: var(--smaragd-w);
  display: grid; place-items: center; margin: 0 auto .9rem; color: var(--smaragd);
}
.anmelde-kopf h1 { font-size: 1.5rem; }
.anmelde-kopf p { color: var(--text-leise); font-size: .9rem; margin: .3rem 0 0; }
.wechsel { text-align: center; margin-top: 1.1rem; font-size: .88rem; color: var(--text-leise); }
.wechsel button { background: none; border: 0; color: var(--smaragd); padding: 0 .2rem; }

/* ── Tarifauswahl ── */
.tarife { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tarif {
  border: 1px solid var(--rahmen); border-radius: var(--rundung);
  padding: .9rem; cursor: pointer; text-align: center; background: var(--flaeche-2);
}
.tarif:hover { border-color: var(--rahmen-hell); }
.tarif.gewaehlt { border-color: var(--smaragd); background: var(--smaragd-w); }
.tarif .name { font-weight: 600; font-size: 1.05rem; }
.tarif .zeile { font-size: .82rem; color: var(--text-leise); margin-top: .3rem; }
.tarif.zu-voll { opacity: .45; cursor: not-allowed; }

/* ── Kleinkram ── */
.reihe { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.reihe.ende { justify-content: flex-end; }
.zwischen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mono { font-family: var(--mono); font-size: .85rem; }
.leise { color: var(--text-leise); }
.still { color: var(--text-still); font-size: .82rem; }
.abstand { margin-top: 1rem; }

.schalter { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.schalter input { width: auto; }

dialog {
  border: 1px solid var(--rahmen); border-radius: 12px; background: var(--flaeche);
  color: var(--text); padding: 0; max-width: 30rem; width: calc(100% - 2rem);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .kopfzeile { padding: 1rem 1.25rem; border-bottom: 1px solid var(--rahmen); font-weight: 600; }
dialog .rumpf { padding: 1.25rem; }
dialog .fusszeile { padding: .85rem 1.25rem; border-top: 1px solid var(--rahmen);
                    display: flex; justify-content: flex-end; gap: .6rem; }

@media (max-width: 700px) {
  /* Marke und Abmelden in der ersten Zeile, das Menü darunter über die volle Breite. */
  .kopf { flex-wrap: wrap; padding: .6rem .9rem; gap: .5rem; }
  .kopf .marke { flex: 1; }
  .hauptmenue { flex: 1 0 100%; order: 3; margin-left: 0; }
  .inhalt { padding: 1rem .9rem 3rem; }
  .karte { padding: 1rem; }
  .buehne { padding: 3.5rem 1rem 3rem; }
  .bereich { padding: 3rem 1rem; }
}

.zurueck-start { margin-top: 1.4rem; }
.anmelde-seite { flex-direction: column; }

@media (max-width: 860px) {
  .kopf > button.schlicht span,
  .kopf > button.schlicht { font-size: 0; gap: 0; padding: .45rem .55rem; }
  .kopf > button.schlicht svg { font-size: 1rem; }
}

/* ── Anmeldung per E-Mail-Code ── */
.trenner {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.2rem 0; color: var(--text-still); font-size: .8rem;
}
.trenner::before, .trenner::after {
  content: ""; flex: 1; height: 1px; background: var(--rahmen);
}
.code-feld {
  font-family: var(--mono); font-size: 1.6rem; letter-spacing: .4em;
  text-align: center; padding: .7rem .5rem .7rem .9rem;
}

.tarif-preis {
  font-size: 1.1rem; font-weight: 600; color: var(--smaragd); margin-top: .15rem;
}

/* ── Hochladen mit Fortschritt ── */
.upload-kasten {
  background: var(--flaeche-2); border: 1px solid var(--rahmen);
  border-radius: 8px; padding: .7rem .85rem; margin-bottom: .8rem;
}
.upload-zeile {
  display: flex; align-items: center; gap: .55rem;
  font-size: .85rem; margin-bottom: .45rem;
}
.upload-zeile svg { color: var(--smaragd); flex: none; }
.upload-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-prozent {
  font-family: var(--mono); font-size: .8rem; color: var(--text-leise);
  font-variant-numeric: tabular-nums;
}

/* ── Tastenkürzel ── */
kbd {
  font: 600 .78rem/1 var(--mono);
  background: var(--grund); color: var(--text-leise);
  border: 1px solid var(--rahmen); border-bottom-width: 2px;
  border-radius: 5px; padding: .22rem .42rem; white-space: nowrap;
}
.kuerzel-fenster td { padding: .45rem .6rem; }
.kuerzel-fenster td:first-child { width: 1%; white-space: nowrap; }

/* ── Ziehen und Fallenlassen ── */
.ablage {
  display: none; align-items: center; justify-content: center;
  gap: .7rem; flex-direction: column;
  border: 2px dashed var(--smaragd); border-radius: 10px;
  background: var(--smaragd-w); color: var(--smaragd);
  padding: 2.2rem 1rem; margin-bottom: .8rem; font-size: .9rem;
}
.karte.zieht .ablage { display: flex; }
.karte.zieht { border-color: var(--smaragd); }
