:root {
  --bg: #07080b;
  --card: #101117;
  --panel: rgba(16, 17, 23, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f5f8;
  --muted: #9aa0b4;
  --dim: #8b91a8;
  --accent: #7b87ff;
  --green: #3dff8a;
  --danger: #ff6b7a;
  --radius: 20px;
  --maxw: 1200px;
  --font: Manrope, system-ui, sans-serif;
  --display: Onest, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(1200px 600px at 78% -10%, rgba(123, 135, 255, 0.14), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(61, 255, 138, 0.04), transparent 50%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 18px;
  flex: none;
}
.brand-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-txt b { font-size: 15px; }
.brand-txt i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; color: #08090c;
  font-size: 13px; font-weight: 700;
}
.nav-end { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 12px 22px;
  border: 1px solid var(--line); cursor: pointer;
  font-weight: 600; font-size: 14px;
  gap: 8px;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn-solid { background: #fff; color: #08090c; border-color: #fff; }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px #fff8; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { color: #fff; background: transparent; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.04); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 80px;
  min-height: calc(100vh - 54px);
}

.login-card { max-width: 420px; margin: 8vh auto 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.card h1 {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
.label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  font-family: var(--mono);
}
input[type=text] {
  width: 100%;
  border: 1px solid var(--line);
  background: #16161f;
  border-radius: 12px;
  padding: 12px 14px;
  letter-spacing: 0.06em;
  outline: none;
}
input[type=text]:focus { border-color: rgba(123, 135, 255, 0.55); }
#loginForm .btn { width: 100%; margin-top: 16px; }

.err {
  color: var(--danger);
  font-size: 13px;
  margin: 12px 0 0;
}
.err[hidden], [hidden] { display: none !important; }
.dash-err { margin-top: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card .value {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.card .meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
  min-height: 1.4em;
}
.chip {
  display: inline-flex;
  letter-spacing: 0.13em;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 10.5px;
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--dim);
}
.chip.ok { color: var(--green); border-color: rgba(61, 255, 138, 0.28); }
.chip.warn { color: #ffd36b; }
.chip.bad { color: var(--danger); }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}
