@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #000; --ink: #fff; --fg: 255, 255, 255;
  --muted: rgba(var(--fg), .52); --dim: rgba(var(--fg), .2);
  --glass: rgba(var(--fg), .06); --glass-hi: rgba(var(--fg), .09);
  --edge: rgba(var(--fg), .06); --line: rgba(var(--fg), .1);
  --ok: #23a55a; --warn: #f0b232; --bad: #f23f43;
  --radius: 32px; --ease: cubic-bezier(.22, 1, .36, 1);
  --f-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef0f3; --ink: #0b0c0e; --fg: 11, 12, 14;
  --glass: rgba(255, 255, 255, .72); --glass-hi: rgba(255, 255, 255, .95); --edge: rgba(11, 12, 14, .06);
  color-scheme: light;
}
:root[data-theme="light"] .tile, :root[data-theme="light"] .spec, :root[data-theme="light"] .box, :root[data-theme="light"] .chip { box-shadow: inset 0 0 0 1px rgba(11,12,14,.06), 0 1px 2px rgba(11,12,14,.04); }
html, body { transition: background-color .5s var(--ease), color .5s var(--ease); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -.02em; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; font-weight: 500; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -.035em; }
::selection { background: var(--ink); color: var(--bg); }
.num, .mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hide { display: none !important; }

.shell { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.topbar::before { content: ""; position: absolute; inset: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); background: linear-gradient(var(--bg) 72%, transparent); z-index: -1; pointer-events: none; }
.topbar .l { display: flex; align-items: center; gap: 34px; min-width: 0; }
.topbar .r { display: flex; align-items: center; gap: 18px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: var(--ink); flex: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.status-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; white-space: nowrap; transition: background .3s var(--ease), color .3s var(--ease); display: inline-flex; gap: 8px; align-items: center; }
.nav a:hover { color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--bg); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav a.on .badge { background: var(--bad); }

.theme-switch { all: unset; position: relative; width: 44px; height: 24px; border-radius: 999px; cursor: pointer; flex: none; background: rgba(var(--fg), .12); box-shadow: inset 0 0 0 1px rgba(var(--fg), .1); }
.theme-switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; transition: transform .55s var(--ease); }
.theme-switch .knob svg { width: 11px; height: 11px; color: var(--bg); position: absolute; transition: opacity .3s var(--ease); }
.theme-switch .sun { opacity: 0; }
:root[data-theme="light"] .theme-switch .knob { transform: translateX(20px); }
:root[data-theme="light"] .theme-switch .moon { opacity: 0; }
:root[data-theme="light"] .theme-switch .sun { opacity: 1; }

main { padding-block: 18px 40px; min-height: 70vh; }
.view { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .view, .tile, .status-dot::after { animation: none !important; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.055em; line-height: .95; }
.page-head .sub { color: var(--muted); margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.section { margin-top: 44px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.section-head span { color: var(--muted); font-size: 14.5px; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.tile { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); padding: 26px; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; animation: rise .8s var(--ease) both; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--glass); transition: background .4s var(--ease); }
a.tile:hover::before { background: var(--glass-hi); }
.tile .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 18px; }
.spec, .box { border-radius: 24px; padding: 22px; background: var(--glass); box-shadow: inset 0 1px 0 1px var(--edge); min-width: 0; }
.spec { display: grid; gap: 4px; align-content: start; }
.spec small { color: var(--muted); font-size: 13.5px; }
.spec b { font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec span { color: var(--muted); font-size: 14px; font-weight: 400; }
.box h3 { font-size: 19px; margin-bottom: 12px; }
.box p { color: var(--muted); font-weight: 400; letter-spacing: -.01em; }
.box + .box { margin-top: 12px; }
.meter { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; width: var(--w, 0%); background: var(--ink); transition: width .8s var(--ease); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }

.vmcard { min-height: 250px; }
.vmcard .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.vmcard .name { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.05em; line-height: 1; word-break: break-word; }
.vmcard .ip { color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.vmcard .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vmcard .stats small { display: block; color: var(--muted); font-size: 12px; }
.vmcard .stats b { font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.vmcard canvas { width: 100%; height: 44px; display: block; }
.newtile { align-items: flex-start; }
.newtile .plus { font-size: clamp(3rem, 7vw, 5rem); line-height: .8; letter-spacing: -.06em; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; background: rgba(var(--fg), .08); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.running .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(35,165,90,.6); animation: pulse 2.4s var(--ease) infinite; }
.pill.stopped .dot, .pill.shutdown .dot { background: var(--dim); }
.pill.paused .dot, .pill.starting .dot, .pill.creating .dot { background: var(--warn); }
.pill.errored .dot { background: var(--bad); }
.pill.warn { background: rgba(240,178,50,.14); color: var(--warn); }
.pill.bad { background: rgba(242,63,67,.14); color: var(--bad); }
.pill.good { background: rgba(35,165,90,.14); color: var(--ok); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(35,165,90,.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(35,165,90,0); } }

.btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 14.5px; background: rgba(var(--fg), .08); transition: background .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(var(--fg), .14); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; }
.btn[disabled], .btn.busy { opacity: .4; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 1px 0 1px var(--edge); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-size: 14.5px; color: var(--muted); white-space: nowrap; transition: background .3s var(--ease), color .3s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }

.field { display: grid; gap: 8px; min-width: 0; }
.field label, .label { font-size: 14px; color: var(--muted); font-weight: 400; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], input:not([type]), select, textarea {
  all: unset; box-sizing: border-box; width: 100%; padding: 13px 16px; border-radius: 16px; background: rgba(var(--fg), .06); box-shadow: inset 0 0 0 1px rgba(var(--fg), .08); font: inherit; font-size: 15.5px; color: var(--ink); transition: box-shadow .3s var(--ease);
}
textarea { min-height: 96px; white-space: pre-wrap; line-height: 1.45; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; cursor: pointer; }
select option { background: var(--bg); color: var(--ink); }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--ink); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form { display: grid; gap: 16px; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle:last-child { border-bottom: 0; }
.toggle .t b { display: block; font-weight: 500; }
.toggle .t span { color: var(--muted); font-size: 14px; font-weight: 400; }
.switch { all: unset; position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(var(--fg), .14); flex: none; cursor: pointer; transition: background .3s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .45s var(--ease), background .3s var(--ease); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--bg); }
.switch.red[aria-checked="true"] { background: var(--bad); }
.switch.red[aria-checked="true"]::after { background: #fff; }

.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice button { all: unset; cursor: pointer; border-radius: 20px; padding: 16px 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--edge); display: grid; gap: 2px; transition: box-shadow .3s var(--ease), background .3s var(--ease); min-width: 0; }
.choice button:hover { background: var(--glass-hi); }
.choice button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--glass-hi); }
.choice button b { font-weight: 500; }
.choice button small { color: var(--muted); font-size: 13px; }
.choice button[disabled] { opacity: .35; pointer-events: none; }

.list { border-top: 1px solid var(--line); }
.list .item { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.list .item .main { min-width: 0; display: grid; gap: 2px; }
.list .item .main b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.list .item .main span { color: var(--muted); font-size: 14px; font-weight: 400; }
.list .empty { padding: 26px 2px; color: var(--muted); }

table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-weight: 400; color: var(--muted); font-size: 13px; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); }
table.t td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }

.sev { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; }
.sev.critical { background: var(--bad); } .sev.warning { background: var(--warn); } .sev.info { background: var(--muted); }
.alert-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.alert-row .body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.alert-row .body b { font-weight: 500; }
.alert-row .body p { color: var(--muted); font-weight: 400; font-size: 14.5px; }
.alert-row .meta { color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.alert-row.acked { opacity: .5; }

.chart { position: relative; }
.chart canvas { width: 100%; height: 180px; display: block; }
.chart .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.chart .legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--ink); }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; font-variant-numeric: tabular-nums; }

.term { border-radius: 24px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); padding: 14px; }
.term .xterm { height: 520px; }
.term .xterm-viewport { scrollbar-width: thin; }

.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 18px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 400; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
code, .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; letter-spacing: 0; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--dim); }
.copy:hover { border-bottom-color: var(--ink); }

.banner { border-radius: 20px; padding: 14px 18px; background: rgba(240,178,50,.12); color: var(--warn); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.banner.bad { background: rgba(242,63,67,.12); color: var(--bad); }
.banner.info { background: var(--glass); color: var(--ink); }

.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 16px; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 28px; padding: 28px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.5); animation: rise .5s var(--ease); display: grid; gap: 16px; }
.modal h2 { font-size: 26px; letter-spacing: -.04em; }
.modal p { color: var(--muted); font-weight: 400; }
.joblog { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: rgba(var(--fg), .05); border-radius: 14px; padding: 12px 14px; max-height: 220px; overflow: auto; color: var(--muted); letter-spacing: 0; white-space: pre-wrap; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .02em; padding: 16px 18px; border-radius: 16px; background: rgba(var(--fg), .07); word-break: break-all; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 14.5px; animation: rise .45s var(--ease); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.error { background: var(--bad); color: #fff; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(420px, 100%); display: grid; gap: 18px; }
.login .big { font-size: clamp(3.6rem, 14vw, 6rem); letter-spacing: -.06em; line-height: .9; }
.login .err { color: var(--bad); font-weight: 400; min-height: 1.5em; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 30px 34px; color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--line); margin-top: 30px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 1px 0 1px var(--edge); font-size: 14px; font-variant-numeric: tabular-nums; }
.chip.used { opacity: .6; }
.chip button { all: unset; cursor: pointer; color: var(--muted); }
.chip button:hover { color: var(--bad); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sticky { position: sticky; top: 90px; }
.big-num { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) { .topbar .r .clock { display: none; } .topbar .l { gap: 14px; } .tile { padding: 22px; } }
