:root {
  --bg: #090b0d;
  --panel: #111418;
  --panel-2: #171b20;
  --line: #252b32;
  --text: #f3f6f8;
  --muted: #89939e;
  --green: #b7f35c;
  --green-soft: rgba(183, 243, 92, .12);
  --red: #ff6b6b;
  --amber: #f3bb5c;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
aside { position: sticky; top: 0; height: 100vh; padding: 28px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #0c0f12; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; font-weight: 750; font-size: 20px; padding: 0 10px 30px; }
.brand-mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--green); color: #111; font: 900 25px/1 ui-monospace, monospace; box-shadow: 0 0 40px rgba(183,243,92,.15); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
nav { display: grid; gap: 6px; }
nav button { color: var(--muted); border: 0; background: transparent; text-align: left; padding: 12px 14px; border-radius: 10px; display: flex; gap: 12px; align-items: center; }
nav button span { width: 18px; text-align: center; color: #69737d; }
nav button:hover, nav button.active { color: var(--text); background: var(--panel-2); }
nav button.active span { color: var(--green); }
.aside-bottom { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); }
.status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; margin-bottom: 13px; }
.status-line i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px var(--green); }
main { min-width: 0; padding: 42px 5vw 70px; max-width: 1500px; width: 100%; margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 34px; gap: 20px; }
h1, h2, h3, p { margin-top: 0; }
header h1 { margin: 3px 0 0; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.045em; }
.eyebrow { color: var(--green); font: 700 11px/1.4 ui-monospace, monospace; letter-spacing: .16em; margin-bottom: 7px; }
.muted { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .muted { font-size: 12px; }
button { color: var(--text); border: 1px solid var(--line); background: var(--panel-2); padding: 10px 15px; border-radius: 10px; transition: .15s ease; }
button:hover { border-color: #414a54; transform: translateY(-1px); }
.primary { background: var(--green); color: #111; border-color: var(--green); font-weight: 750; }
.primary:hover { background: #c7ff72; border-color: #c7ff72; }
.ghost { background: transparent; }
.danger { color: var(--red); }
.small-button { padding: 7px 9px; font-size: 12px; width: 100%; }
.icon-button { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; }
.metric, .card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); }
.metric { padding: 20px; min-height: 138px; display: flex; flex-direction: column; justify-content: space-between; }
.metric .label { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 38px; letter-spacing: -.05em; }
.metric small { color: var(--muted); }
.metric .good { color: var(--green); }
.split { grid-template-columns: 1.45fr 1fr; }
.card { overflow: hidden; }
.card-head { padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; margin: 0; }
.card-head span { color: var(--muted); font-size: 12px; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty strong { color: var(--text); display: block; margin-bottom: 5px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: #69737d; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; text-align: left; padding: 12px 18px; background: rgba(255,255,255,.015); }
td { padding: 15px 18px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,.012); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.host { font-weight: 650; }
.subline { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 5px 9px; font-size: 11px; background: #20252b; color: #c6cdd3; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #69737d; }
.badge.active::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.badge.provisioning::before { background: var(--amber); }
.badge.failed::before, .badge.degraded::before { background: var(--red); }
.tag { display: inline-block; padding: 4px 7px; border-radius: 6px; color: var(--green); background: var(--green-soft); font: 700 10px ui-monospace, monospace; text-transform: uppercase; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.actions button { padding: 6px 9px; font-size: 11px; }
.edge-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.edge-card { padding: 20px; }
.edge-top { display: flex; justify-content: space-between; margin-bottom: 28px; }
.edge-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.edge-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.edge-meta span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.edge-meta strong { font-size: 12px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.toggle { width: 38px; height: 22px; border-radius: 20px; padding: 2px; border: 0; background: #343b43; }
.toggle::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(16px); background: #111; }
.zone { margin-bottom: 16px; }
.zone-title { display: flex; align-items: center; gap: 10px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 65% 20%, rgba(183,243,92,.08), transparent 28%), var(--bg); }
.login-card { width: min(430px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 22px; background: rgba(17,20,24,.94); box-shadow: 0 30px 100px #000; }
.login-card h1 { font-size: 35px; letter-spacing: -.05em; margin: 23px 0 14px; }
.login-card .muted { line-height: 1.6; font-size: 14px; }
label { display: grid; gap: 7px; color: #aeb6bd; font-size: 12px; margin: 18px 0; }
input, select, textarea { width: 100%; color: var(--text); background: #0c0f12; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
textarea { resize: vertical; min-height: 76px; }
.compose-output { min-height: 340px; white-space: pre; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.wide { width: 100%; display: flex; justify-content: space-between; }
.form-error { min-height: 18px; color: var(--red); font-size: 12px; margin: 10px 0 0; }
dialog { width: min(560px, calc(100% - 28px)); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 0; box-shadow: 0 30px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
dialog form { padding: 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.modal-head .icon-button { border: 0; background: transparent; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 18px; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px; margin: 0; border: 1px solid var(--line); border-radius: 9px; }
.check input { width: auto; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--text); color: #111; border-radius: 10px; padding: 12px 16px; font-size: 13px; transform: translateY(80px); opacity: 0; transition: .25s; z-index: 5; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: static; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding-bottom: 14px; }
  nav { grid-template-columns: repeat(5, 1fr); overflow-x: auto; }
  nav button { justify-content: center; white-space: nowrap; }
  nav button span { display: none; }
  .aside-bottom { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 0 0; }
  .aside-bottom .status-line { margin: 0 auto 0 0; }
  .aside-bottom .small-button { width: auto; }
  main { padding: 28px 18px 50px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  nav { grid-template-columns: repeat(5, max-content); }
  header { align-items: flex-start; }
  .header-actions .muted, #refresh { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 110px; }
  .form-grid, .check-grid { grid-template-columns: 1fr; }
}
