:root {
  color-scheme: dark;
  --ink: #eef3fc;
  --muted: #a5b2c9;
  --paper: #0a0e1d;
  --line: #253450;
  --surface: #11192b;
  --raised: #18243a;
  --dark: #0b1020;
  --field: #0c1425;
  --accent: #65e4f3;
  --accent-text: #9debf5;
  --accent-surface: #113342;
  --green: #8be3b7;
  --red: #ffafbf;
  --mono: "Cascadia Mono", Consolas, monospace;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .56; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1176px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; top: 8px; left: 8px; padding: 10px; background: var(--surface); transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.top { background: var(--dark); border-bottom: 1px solid var(--line); }
.top-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 750; letter-spacing: .14em; }
.brand img { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; }
.top-links, .actions, .row, .tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-links { gap: 18px; font-size: 14px; font-weight: 650; }
.top-balance { color: var(--accent-text); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); color: var(--ink); font-size: 14px; font-weight: 680; text-align: center; }
.button:hover { border-color: #51849a; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #091b25; }
.button.primary:hover { background: #a1f2fb; border-color: #a1f2fb; }
.button.danger { color: var(--red); }
.button.small { min-height: 34px; padding: 4px 10px; }
.button.subtle { background: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: 32px; }
h3 { font-size: 22px; }
p + p { margin-top: 10px; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.mono, code { font-family: var(--mono); }
.period { background: var(--field); border: 1px solid var(--line); padding: 4px; display: flex; flex-wrap: wrap; gap: 4px; border-radius: 8px; }
.period button { min-height: 34px; border: 0; border-radius: 5px; background: transparent; padding: 4px 12px; font-size: 14px; color: var(--muted); }
.period button[aria-pressed=true] { background: var(--accent-surface); color: var(--accent-text); }
.plans, .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.panel, .plan, .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 22px; min-width: 0; }
.panel { align-content: start; }
.plan { display: grid; gap: 18px; border-radius: 11px; padding: 23px; }
.plan-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; flex-wrap: wrap; }
.plan-slots { color: var(--accent-text); background: var(--accent-surface); border-radius: 5px; padding: 3px 7px; font-size: 13px; font-weight: 650; }
.plan .button { background: transparent; border-color: #347284; color: var(--accent-text); }
.plan .button:hover { background: var(--accent-surface); border-color: var(--accent); }
.plan h3 { font-size: 24px; }
.plan .price { font-size: clamp(28px, 4vw, 38px); font-weight: 750; letter-spacing: -.06em; line-height: 1; }
.plan .price span { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.spec { display: grid; gap: 7px; padding-block: 14px 0; margin: 0; border-top: 1px solid var(--line); }
.spec div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; text-align: right; font-weight: 650; }
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 30px; align-items: start; padding-block: 32px 48px; }
.sidebar { display: grid; gap: 4px; position: sticky; top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.sidebar a { padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; font-size: 15px; }
.sidebar a:hover { background: var(--raised); }
.sidebar a[aria-current=page] { background: var(--accent-surface); color: var(--accent-text); border-color: #265467; font-weight: 700; }
.sidebar hr { margin: 8px 0; width: 100%; border: 0; border-top: 1px solid var(--line); }
.sidebar-logout { padding: 7px 3px 2px; }
.content { display: grid; gap: 16px; min-width: 0; }
.heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 5px; }
.heading h1, .fleet h3 { overflow-wrap: anywhere; }
.heading p { margin-top: 6px; }
.stat { padding: 16px 18px; border-top: 2px solid #3c8199; }
.stat strong { font-size: 24px; display: block; }
.stat-link:hover { border-color: #498797; background: var(--raised); }
.stack { display: grid; gap: 14px; }
.stack.tight { gap: 8px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.auth { max-width: 460px; margin-block: clamp(24px, 6vh, 64px); }
.auth-art { overflow: hidden; background: #0a0e20; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.auth-art img { display: block; width: 100%; height: auto; }
.auth .panel { padding: clamp(18px, 5vw, 32px); gap: 22px; border-radius: 0 0 12px 12px; box-shadow: 0 18px 56px #0005; }
.auth h1 { font-size: clamp(28px, 5vw, 36px); }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); padding: 4px; }
.auth-tabs a { text-align: center; padding: 8px 9px; border-radius: 5px; font-size: 14px; color: var(--muted); font-weight: 650; }
.auth-tabs a[aria-current=page] { color: var(--accent-text); background: var(--accent-surface); }
.auth button[type=submit] { width: 100%; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px; }
.filter-bar .search-field { min-width: 180px; flex: 1 1 240px; }
.filter-bar label select { min-width: 145px; }
.paging { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.funds-warning { color: var(--red); font-size: 14px; font-weight: 650; }
form { margin: 0; }
label { display: grid; gap: 5px; color: #c2cfe5; font-size: 14px; font-weight: 650; }
label.check { display: flex; align-items: center; gap: 8px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: 9px 10px; color: var(--ink); background: var(--field); border: 1px solid #354764; border-radius: 6px; }
select { appearance: none; padding-right: 30px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 15px) 50% / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 10px) 50% / 5px 5px no-repeat, var(--field); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
textarea { min-height: 95px; resize: vertical; }
textarea.editor { min-height: 300px; font-family: var(--mono); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a, .text-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.fleet { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fleet .muted { overflow-wrap: anywhere; }
.badge { display: inline-flex; min-width: max-content; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 5px; background: var(--raised); color: #c2cfe5; font-size: 14px; }
.badge.live { background: #153530; color: var(--green); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.badge.warn { background: #3e2233; color: var(--red); }
.tabs { border-bottom: 1px solid var(--line); gap: 5px; }
.tabs a { padding: 8px 12px; font-size: 14px; border-bottom: 2px solid transparent; }
.tabs a[aria-current=page] { border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.terminal { min-height: 250px; max-height: 56vh; overflow: auto; margin: 0; border-radius: 6px; padding: 13px; background: #080e19; border: 1px solid var(--line); color: #dbe6f3; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.log-command { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.notice { position: fixed; z-index: 5; right: 15px; bottom: 15px; max-width: min(410px, calc(100% - 30px)); padding: 12px 16px; color: var(--ink); background: var(--accent-surface); border: 1px solid #37576d; border-radius: 7px; box-shadow: 0 5px 15px #0005; }
.notice.error { background: #812431; }
.loading { padding: 40px; color: var(--muted); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-weight: 680; }
details[open] > summary { margin-bottom: 14px; }
@media (max-width: 850px) {
  .shell { grid-template-columns: 155px minmax(0, 1fr); gap: 14px; }
  .wrap { width: calc(100% - 34px); }
}
@media (max-width: 660px) {
  .plans, .shell, .split { grid-template-columns: 1fr; }
  .brand { font-size: 15px; letter-spacing: .10em; }
  .sidebar { display: flex; position: static; flex-wrap: wrap; }
  .sidebar hr { display: none; }
  .sidebar a { padding: 6px 8px; font-size: 14px; }
  .sidebar-logout { padding: 0; }
  .top-inner { min-height: 58px; }
  .top-links { gap: 7px; }
  .top-balance { font-size: 13px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel, .plan { padding: 15px; }
  .fleet { grid-template-columns: 1fr; }
}
