:root {
  --bg: #0e1116;
  --panel: #171b22;
  --panel-2: #1e242e;
  --line: #2a3140;
  --text: #e8edf5;
  --muted: #93a0b4;
  --accent: #7aa2ff;
  --good: #3dd68c;
  --bad: #ff8b7b;
  --shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h1 { margin: 0 0 8px; font-size: 28px; }
.muted { color: var(--muted); }
label { display: block; margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%;
  background: #10141b;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.primary, .ghost {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 11px 14px;
}
.primary { background: var(--accent); color: #08111f; font-weight: 650; }
.ghost { background: transparent; border-color: var(--line); }
.full { width: 100%; margin-top: 18px; }
.error { color: var(--bad); min-height: 1.2em; margin-top: 10px; }

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  background: #12161d;
}
.brand { padding: 8px 10px 18px; font-weight: 700; letter-spacing: .02em; }
.nav-btn {
  display: flex;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.nav-btn.active, .nav-btn:hover { background: var(--panel-2); color: var(--text); }
.main { padding: 22px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
h2 { margin: 0; font-size: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.launch {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  min-height: 148px;
  box-shadow: var(--shadow);
}
.launch strong { display: block; font-size: 18px; margin: 10px 0 6px; }
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; background: #243049; color: var(--accent); font-weight: 700;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar select, .toolbar input { width: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.kpi span { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.kpi strong { display: block; font-size: 26px; margin-top: 8px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
canvas { width: 100%; height: 260px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; background: #243049; }
.badge.off { background: #3a2430; color: #ffb4a8; }
.note { color: var(--muted); padding: 8px 0 16px; }
.search { max-width: 320px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { display: flex; gap: 6px; overflow: auto; }
  .nav-btn { width: auto; white-space: nowrap; }
}
