:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2a3542;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cf0;
  --good: #3ecf8e;
  --bad: #f07178;
  --warn: #e6c07b;
  --radius: 10px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.nav { background: #0b1015; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 16px; }
.brand { font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.brand span { color: var(--muted); font-weight: 500; font-size: 12px; }
.nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); margin-bottom: 2px; }
.nav a:hover, .nav a.active { background: var(--panel); color: #fff; }
.nav-foot { margin-top: auto; color: var(--muted); font-size: 12px; line-height: 1.5; }
.main { padding: 20px 28px 40px; }
.top h1 { margin: 0 0 16px; font-size: 22px; font-weight: 650; }
.content { max-width: 1200px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 24px; font-weight: 700; }
.card .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.ok { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-weight: 600; background: #141b23; }
tr:last-child td { border-bottom: 0; }
.btn, button, input[type=submit] {
  background: var(--accent); color: #041018; border: 0; border-radius: 8px;
  padding: 8px 14px; font-weight: 650; cursor: pointer;
}
.btn.danger { background: var(--bad); color: #1a0506; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.warn { background: var(--warn); color: #1a1405; }
form.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
input, select, textarea {
  background: #0f151c; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-width: 140px; font: inherit;
}
textarea { min-width: 320px; min-height: 80px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: rgba(62,207,142,.15); color: var(--good); }
.flash.err { background: rgba(240,113,120,.15); color: var(--bad); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-box { width: min(380px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login-box h1 { margin: 0 0 6px; font-size: 22px; }
.login-box p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.login-box label { margin-bottom: 12px; width: 100%; }
.login-box input { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 16px; }
.tl-item { margin-bottom: 14px; position: relative; }
.tl-item::before { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; position: absolute; left: -21px; top: 5px; }
.bar { height: 8px; background: #243040; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: sticky; top: 0; z-index: 5; flex-direction: row; flex-wrap: wrap; }
  .nav nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-foot { width: 100%; }
}
