:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0d1420;
  --panel-2: #111b2a;
  --line: #223047;
  --text: #e7edf7;
  --muted: #8ea0b9;
  --accent: #8bf0c7;
  --accent-2: #69a9ff;
  --warn: #ffd487;
  --danger: #ff9aa8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 76% 8%, #14243b 0, transparent 34%), var(--bg); color: var(--text); }
button, input { font: inherit; }
.noise { position: fixed; inset: 0; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.topbar { height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(7,11,18,.86); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #3a5475; border-radius: 10px; color: var(--accent); font-weight: 800; letter-spacing: -.05em; }
.brand div { display: grid; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 5px; letter-spacing: .08em; text-transform: uppercase; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.button { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 9px; padding: 9px 14px; cursor: pointer; }
.button:hover { border-color: #496489; }
.button.primary { background: var(--accent); color: #052218; border-color: transparent; font-weight: 700; }
.button.ghost { background: transparent; }
.button.danger { color: var(--danger); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.pill { border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); }
.pill.online { color: var(--accent); border-color: #2f725d; background: #0b2b22; }
.pill.offline { color: var(--danger); }
.login-panel { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 70px; max-width: 1160px; margin: auto; padding: 56px 28px; }
.login-copy h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.05em; max-width: 760px; margin: 12px 0 24px; }
.login-copy p:last-child { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 660px; }
.eyebrow { color: var(--accent); letter-spacing: .16em; font-size: 11px; font-weight: 800; margin: 0 0 9px; }
.token-card { display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(17,27,42,.96), rgba(10,16,25,.96)); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.token-card label { font-weight: 700; }
.token-card input, .control input, .control select { width: 100%; border: 1px solid var(--line); background: #080d15; color: var(--text); border-radius: 8px; padding: 11px 12px; }
.token-card small { color: var(--muted); line-height: 1.5; }
.cockpit { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 220px 1fr; }
.sidebar { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(9,14,23,.66); }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button { text-align: left; border: 0; color: var(--muted); background: transparent; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.sidebar nav button:hover, .sidebar nav button.active { color: var(--text); background: var(--panel-2); }
.sidebar nav button.active { box-shadow: inset 3px 0 var(--accent); }
.boundary-note { display: grid; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; border-top: 1px solid var(--line); padding: 18px 10px 2px; }
.boundary-note strong { color: var(--warn); text-transform: uppercase; letter-spacing: .1em; }
.workspace { padding: 26px 32px 60px; min-width: 0; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.workspace-head h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.head-meta { display: grid; justify-items: end; color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; gap: 5px; }
.view { padding-top: 24px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 13px; background: rgba(13,20,32,.86); padding: 17px; min-width: 0; }
.card h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 13px; }
.metric { font-size: 28px; font-weight: 750; letter-spacing: -.04em; word-break: break-word; }
.metric.small { font-size: 17px; line-height: 1.35; }
.subtle { color: var(--muted); font-size: 12px; margin-top: 7px; }
.section { margin-top: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-head h3 { margin: 0; font-size: 17px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: #0b121d; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.state-list { display: grid; gap: 8px; }
.state-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.state-row:last-child { border-bottom: 0; }
.state-row span { color: var(--muted); }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.control { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); display: grid; gap: 11px; align-content: start; }
.control h3 { margin: 0; font-size: 15px; }
.control p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.progress { height: 7px; border-radius: 99px; background: #192437; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent-2); }
.scenario { display: grid; grid-template-columns: 1.4fr .7fr auto; gap: 18px; align-items: center; }
.scenario-actions { display: flex; gap: 7px; justify-content: end; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; color: var(--muted); font-size: 11px; }
.empty { color: var(--muted); padding: 32px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 460px; background: #152236; border: 1px solid #3e5677; border-radius: 10px; padding: 13px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.4); z-index: 10; }
.toast.error { border-color: #884555; color: #ffd2d9; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .controls { grid-template-columns: 1fr; } .login-panel { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cockpit { grid-template-columns: 1fr; } .sidebar { border-right: 0; border-bottom: 1px solid var(--line); } .sidebar nav { grid-template-columns: repeat(2,1fr); } .boundary-note { display:none; } .workspace { padding: 22px 16px 50px; } .grid { grid-template-columns: 1fr; } .scenario { grid-template-columns: 1fr; } .scenario-actions { justify-content: start; } .topbar { padding: 0 14px; } .pill { display:none; } }

.status { display:inline-block; border-radius:999px; padding:3px 8px; font-size:11px; border:1px solid var(--line); }
.status.ready, .status.info { color:var(--accent); border-color:#2f725d; background:#0b2b22; }
.status.degraded, .status.warning, .status.unconfigured { color:var(--warn); border-color:#705b2d; background:#2b2411; }
.status.critical, .status.unavailable { color:var(--danger); border-color:#884555; background:#2a1118; }
.alert-actions { display:flex; gap:6px; min-width:190px; }
.operations-controls { grid-template-columns:repeat(3,minmax(0,1fr)); }
