:root {
  --bg: #0b1120;
  --bg-soft: #111a2e;
  --panel: #141e33;
  --panel-2: #1a2540;
  --line: #24324f;
  --text: #e8edf7;
  --muted: #93a1bd;
  --accent: #5b9dff;
  --accent-strong: #2f7ded;
  --ok: #37d399;
  --warn: #f7b955;
  --bad: #ff6b6b;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 15% -10%, #1b2b4d 0%, transparent 60%),
    radial-gradient(900px 480px at 100% 0%, #14243f 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 32, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #2c4a80, #0f1a30);
  border: 1px solid #33507f;
  font: 700 12px/1 var(--mono);
  color: #cfe0ff;
}

.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 36px 24px 64px; }

.hero { max-width: 720px; margin-bottom: 32px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}
h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 20px; }

.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.points li {
  color: var(--muted);
  padding-left: 22px;
  position: relative;
  font-size: 14px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.points strong { color: var(--text); font-weight: 600; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card h2, .card h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.card p.sub { margin: 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.auth-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
@media (max-width: 860px) { .auth-grid { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 6px; background: #0d1526; border: 1px solid var(--line); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tabs button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 inherit;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); }

label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.01em; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: #0c1322;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  margin-bottom: 14px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #2f6bd0; outline-offset: 1px; border-color: #2f6bd0; }

button.primary, button.ghost, button.danger {
  font: 600 14px/1 inherit;
  border-radius: 9px;
  padding: 11px 16px;
  cursor: pointer;
  border: 1px solid transparent;
}
button.primary { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: #07142b; }
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; border-color: var(--line); color: var(--text); }
button.ghost:hover { border-color: #35507c; }
button.danger { background: transparent; border-color: #5c2733; color: #ff8f8f; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
a.button-link {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #07142b;
  font-weight: 600;
  font-size: 14px;
}
a.button-link:hover { text-decoration: none; filter: brightness(1.07); }
select.select-inline {
  margin-bottom: 0;
  width: auto;
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 7px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.msg { margin: 14px 0 0; font-size: 13px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: #0d1526; color: var(--muted); }
.msg.ok { border-color: #1d5a45; color: #93e7c6; background: #0c2019; }
.msg.bad { border-color: #632a35; color: #ffb3b3; background: #210f13; }
.msg.hint { border-color: #3a3320; color: #f4d79a; background: #1c1810; }
.msg code { font-family: var(--mono); font-size: 15px; color: #ffe9a8; letter-spacing: 3px; }

.hidden { display: none !important; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; }
td.mono, .mono { font-family: var(--mono); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-block;
  font: 600 11px/1 inherit;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #0d1526;
  white-space: nowrap;
}
.badge.ok { color: #8ef0c8; border-color: #1d5a45; background: #0c2019; }
.badge.warn { color: #ffd79a; border-color: #5d4a20; background: #1d1608; }
.badge.bad { color: #ffb3b3; border-color: #632a35; background: #210f13; }
.badge.info { color: #b7d4ff; border-color: #2b4574; background: #111c31; }

.stat { background: #0d1526; border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 12px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #0d1526;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.empty { color: var(--muted); font-size: 13px; margin: 0; padding: 6px 0; }

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.section { margin-bottom: 22px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar > div { flex: 1 1 200px; }
.toolbar input, .toolbar select { margin-bottom: 0; }

.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabbar button {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: 600 13px/1 inherit;
  padding: 11px 14px;
  cursor: pointer;
}
.tabbar button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.foot { border-top: 1px solid var(--line); padding: 20px 28px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.wrap-tight { max-width: 760px; margin: 0 auto; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
