:root {
  --bg: #08111f;
  --panel: #101b2d;
  --panel-soft: #13233a;
  --line: #24354f;
  --text: #eff6ff;
  --muted: #a9bdd8;
  --primary: #63b3ed;
  --warn: #f6ad55;
  --danger: #fc8181;
  --success: #68d391;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #08111f 0%, #0d1728 100%);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
textarea {
  width:100%; min-height: 110px; padding: 12px 14px; border-radius: 12px; border:1px solid var(--line);
  background: #08111f; color: var(--text); resize: vertical;
}
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .card {
  background: rgba(16, 27, 45, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.login-card { width: min(560px, 100%); padding: 28px; }
.brand { display:flex; gap:14px; align-items:center; margin-bottom: 16px; }
.large-brand { margin-bottom: 20px; }
.brand-mark {
  width: 54px; height: 54px; border-radius: 16px; display:grid; place-items:center;
  background: linear-gradient(135deg, #3b82f6, #14b8a6); font-weight:700; font-size: 22px;
}
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h1,h2,h3 { margin: 0; }
.muted { color: var(--muted); }
.notice {
  background: rgba(99,179,237,.12); border:1px solid rgba(99,179,237,.25); color: var(--text);
  padding: 12px 14px; border-radius: 12px; margin: 12px 0;
}
.notice.warn { background: rgba(246,173,85,.12); border-color: rgba(246,173,85,.28); }
.field { display:flex; flex-direction:column; gap:8px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 13px; }
input, select {
  width:100%; padding: 12px 14px; border-radius: 12px; border:1px solid var(--line);
  background: #08111f; color: var(--text);
}
.shell { display:grid; grid-template-columns: 300px 1fr; min-height:100vh; }
.sidebar {
  border-left:1px solid var(--line); background: rgba(7,12,22,.82); padding:20px; display:flex; flex-direction:column; gap:16px;
}
.nav { display:grid; gap:8px; }
.nav button {
  text-align:start; border:none; background: transparent; color: var(--text);
  padding: 12px 14px; border-radius: 12px; cursor:pointer;
}
.nav button.active, .nav button:hover { background: var(--panel-soft); }
.main { padding: 22px; }
.topbar { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom: 18px; }
.actions, .inline, .button-wrap { display:flex; gap:10px; flex-wrap:wrap; }
.stack { display:grid; gap:16px; }
.compact-stack { gap:10px; }
.layout-2 { display:grid; grid-template-columns: 1.15fr .85fr; gap:16px; }
.grid-4 { display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; }
.card { padding:18px; }
.metric-value { font-size: 34px; font-weight: 700; margin-top: 10px; }
.btn, .btn-secondary, .btn-ghost, .btn-danger {
  border:none; border-radius: 12px; padding: 10px 14px; cursor:pointer; color: #08111f; font-weight: 600;
}
.btn { background: #63b3ed; }
.btn-secondary { background: #c8d7ea; }
.btn-ghost { background: transparent; color: var(--text); border:1px solid var(--line); }
.btn-danger { background: #fc8181; }
.kv-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.kv-item { background:#0b1422; border:1px solid var(--line); border-radius:14px; padding:12px; display:grid; gap:6px; }
.kv-item span { color: var(--muted); font-size: 13px; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
.table { width:100%; border-collapse: collapse; }
.table th, .table td { border-bottom:1px solid var(--line); padding: 12px 10px; vertical-align: top; }
.table th { color: var(--muted); font-size:13px; text-align:start; }
.compact button { padding:8px 11px; }
.pill {
  display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:5px 10px;
  background:#1c2b3f; border:1px solid var(--line); font-size: 12px;
}
.pill.success { background: rgba(104,211,145,.14); border-color: rgba(104,211,145,.28); }
.pill.warn { background: rgba(246,173,85,.14); border-color: rgba(246,173,85,.28); }
.pill.danger { background: rgba(252,129,129,.14); border-color: rgba(252,129,129,.28); }
.console {
  background:#08111f; border:1px solid var(--line); border-radius: 14px; padding: 14px;
  overflow:auto; white-space: pre-wrap; word-break: break-word; max-height: 360px; margin:0;
}
.space-between { display:flex; justify-content:space-between; align-items:center; gap:14px; }
.list-item { background:#0b1422; border:1px solid var(--line); border-radius:14px; padding:14px; }
.plain-list { margin:0; padding-inline-start: 18px; }
.audits-table td, .audits-table th { font-size: 13px; }
.ltr {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}
.code {
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 12.5px;
}
@media (max-width: 1280px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-left:none; border-bottom:1px solid var(--line); }
  .grid-4, .layout-2, .form-grid, .kv-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
}
