:root {
  --bg: #090c14;
  --bg-2: #101624;
  --bg-3: #171e2e;
  --line: rgba(255,255,255,.08);
  --text: #e8edf7;
  --muted: #8b97b0;
  --lime: #c8f542;
  --cyan: #5ce1e6;
  --amber: #ffb020;
  --rose: #ff6b7a;
  --ok: #3ee0a0;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(200,245,66,.08), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(92,225,230,.07), transparent 45%),
    var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: linear-gradient(180deg, #101624 0%, #0c111c 100%);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 8px 22px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #0b1020;
  display: grid; place-items: center;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand-name { font-weight: 650; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
}
.nav a:hover, .nav a.is-active {
  background: rgba(200,245,66,.08);
  color: var(--text);
}
.nav a.is-active { box-shadow: inset 0 0 0 1px rgba(200,245,66,.18); }

.main { flex: 1; min-width: 0; padding: 22px 28px 48px; }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 22px;
}
.page-kicker { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.page-title { font-size: 32px; letter-spacing: -.04em; margin: 4px 0 0; }
.top-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg-2);
  border-radius: 999px; padding: 6px 10px; font-size: 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--rose); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: rgba(16,22,36,.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 550; }
.kpi { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 34px; letter-spacing: -.05em; }
.kpi small { font-size: 14px; color: var(--muted); margin-left: 6px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--amber); }
.bad { color: var(--rose); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 550; font-size: 12px; letter-spacing: .04em; }
td, th { padding: 10px 8px; border-bottom: 1px solid var(--line); }
tr:hover td { background: rgba(255,255,255,.02); }

.btn, button.btn {
  border: 0; cursor: pointer;
  background: var(--lime); color: #111;
  border-radius: 12px; padding: 10px 14px; font-weight: 650;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.tiny { padding: 6px 10px; font-size: 12px; }
.btn.danger { background: var(--rose); color: #1a0b0d; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: 12px; }
input, select, textarea {
  background: #0c121e; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: rgba(200,245,66,.45); }
textarea { width: 100%; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }

.messages { list-style: none; padding: 0; }
.messages li { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; background: rgba(62,224,160,.12); }
.messages li.error { background: rgba(255,107,122,.12); }

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card { width: min(420px, 100%); }

.bar {
  height: 8px; background: #0c121e; border-radius: 99px; overflow: hidden;
}
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), var(--cyan)); }

.worker {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { display: none; }
  .main { padding: 16px; }
}
