/* ============================================================
   Termiverse Provisioning-Konsole · Command-Deck-Designsystem
   Tokens rekonstruiert aus der Vermarktungsseite:
   Hintergrund #0A0D15, Bernstein #F2A93C, Cyan-Orbits, Mono-Eyebrows.
   (Exakte Werte ersetzbar, sobald die Marketing-style.css vorliegt.)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg:        #0A0D15;
  --bg-2:      #0d1220;
  --panel:     #11162270;
  --panel-2:   #141b2b;
  --line:      #1e2840;
  --line-2:    #2a3a5e;
  --ink:       #e7ecf6;
  --ink-dim:   #93a0bd;
  --ink-faint: #5b678a;
  --amber:     #F2A93C;
  --amber-2:   #ffc163;
  --cyan:      #3ad7c9;
  --cyan-dim:  #1d7d77;
  --red:       #ff6b6b;
  --green:     #4ade80;
  --radius:    12px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Sora', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 80% -10%, #15244033, transparent 60%),
    radial-gradient(700px 500px at -10% 110%, #2a1a0033, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--amber); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── App-Shell ── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0c1019, #0a0d15);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.wordmark .v { color: var(--amber); }
.tagline { font-family: var(--mono); font-size: 9px; letter-spacing: .22em; color: var(--ink-faint); text-transform: uppercase; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-dim); font-family: var(--sans); font-size: 14px;
  padding: 10px 12px; border-radius: 9px;
}
.nav button:hover { background: #ffffff08; color: var(--ink); }
.nav button.active { background: #f2a93c14; color: var(--amber); }
.nav button .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.sidebar .foot { margin-top: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding: 8px; }

.main { padding: 30px 36px 60px; max-width: 1200px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-head h1 { font-size: 26px; font-weight: 700; margin: 4px 0 0; letter-spacing: -.02em; }
.grad { background: linear-gradient(90deg, var(--amber), var(--amber-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Panels / Tabellen ── */
.panel {
  background: var(--panel); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.panel + .panel { margin-top: 18px; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-head h2 { font-size: 14px; margin: 0; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); padding: 11px 18px; border-bottom: 1px solid var(--line); font-weight: 500; }
td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff05; }
.mono { font-family: var(--mono); }
.dim { color: var(--ink-dim); }

/* ── Stat-Karten ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.stat .n { font-size: 30px; font-weight: 700; font-family: var(--mono); }
.stat .n.amber { color: var(--amber); }
.stat .n.cyan { color: var(--cyan); }
.stat .l { color: var(--ink-dim); font-size: 13px; margin-top: 2px; }

/* ── Kapazitäts-Balken ── */
.cap { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.cap .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cap .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); }
.cap .bar > i.full { background: linear-gradient(90deg, #7a3a1a, var(--amber)); }
.cap small { font-family: var(--mono); color: var(--ink-dim); }

/* ── Badges ── */
.badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); text-transform: uppercase; }
.badge.active   { color: var(--green); border-color: #1f5b39; background: #4ade8012; }
.badge.failed   { color: var(--red); border-color: #5b1f1f; background: #ff6b6b12; }
.badge.suspended{ color: var(--amber); border-color: #5b471f; background: #f2a93c12; }
.badge.provisioning, .badge.dns_pending, .badge.dns_ok, .badge.setup { color: var(--cyan); border-color: var(--cyan-dim); background: #3ad7c912; }
.badge.paused, .badge.offline, .badge.removed { color: var(--ink-dim); }

/* ── Buttons ── */
.btn { font-family: var(--sans); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: #ffffff08; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: var(--ink-dim); }
.btn-primary { background: linear-gradient(180deg, var(--amber-2), var(--amber)); border: 0; color: #1a1205; } /* dunkle Schrift = lesbar (Marketing-Korrektur) */
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: none; border-color: var(--line); color: var(--ink-dim); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-danger { color: var(--red); border-color: #5b1f1f; background: #ff6b6b0d; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Formulare ── */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 6px; }
.input, select.input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; color: var(--ink); padding: 10px 12px; font-family: var(--mono); font-size: 13.5px; }
.input:focus { outline: none; border-color: var(--amber); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Modal ── */
.overlay { position: fixed; inset: 0; background: #050710cc; backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px; width: 100%; max-width: 460px; padding: 24px; }
.modal h3 { margin: 0 0 18px; font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ── DNS-Check / Terminal-Log ── */
.dns { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; margin: 6px 0 16px; font-family: var(--mono); font-size: 12.5px; }
.dns.ok { border-color: #1f5b39; background: #4ade8009; }
.dns.bad { border-color: #5b471f; background: #f2a93c09; }
.term {
  background: #060912; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  padding: 14px 16px; height: 320px; overflow-y: auto; white-space: pre-wrap;
  color: #c4d0e8;
}
.term .t-start { color: var(--cyan); }
.term .t-ok { color: var(--green); }
.term .t-error { color: var(--red); }
.term .t-done { color: var(--amber); }

.empty { padding: 40px 18px; text-align: center; color: var(--ink-faint); }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--amber); border-radius: 9px; padding: 13px 17px; z-index: 80; max-width: 360px; }
.toast.err { border-left-color: var(--red); }

/* ── Login ── */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 100%; max-width: 360px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 30px; }
.login .brand { justify-content: center; padding-bottom: 8px; }
.login p.sub { text-align: center; color: var(--ink-dim); margin: 0 0 22px; font-size: 13px; }
.hidden { display: none !important; }
