/* Hollowcrest Panel. Dark operations console: neutral ink, hairline rules, color only where it carries meaning. */

:root {
  --ink-0: #0e1012;          /* page */
  --ink-1: #14171a;          /* surface */
  --ink-2: #1a1e22;          /* raised / hover */
  --ink-3: #22272c;          /* pressed / track */
  --rule: #262b31;           /* hairlines */
  --rule-strong: #343a41;
  --text: #e7e4dd;           /* warm off-white */
  --text-2: #a7aaa9;
  --text-3: #6f7579;
  --gold: #d6a84e;
  --gold-ink: #1c1405;
  --gold-soft: rgba(214, 168, 78, .14);
  --ok: #57b88a;
  --boot: #6fa8dc;
  --warn: #e0a640;
  --bad: #e5604f;
  --idle: #7d8389;
  --ok-soft: rgba(87, 184, 138, .13);
  --boot-soft: rgba(111, 168, 220, .13);
  --warn-soft: rgba(224, 166, 64, .13);
  --bad-soft: rgba(229, 96, 79, .13);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --gutter: 24px;
  --maxw: 1240px;
  --bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
kbd, code, .mono { font-family: var(--mono); font-size: .92em; }
kbd {
  padding: 1px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px;
  border-radius: 4px; background: var(--ink-2); color: var(--text);
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 50; background: var(--gold); color: var(--gold-ink); padding: 6px 10px; border-radius: var(--r); }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 16, 18, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar-inner {
  max-width: var(--maxw); margin: 0 auto; height: var(--bar-h);
  padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; }
.crest { width: 20px; height: 20px; color: var(--gold); flex: none; }
.brand-name { font-weight: 650; letter-spacing: .01em; }
.brand-sub { color: var(--text-3); font-weight: 500; padding-left: 9px; border-left: 1px solid var(--rule-strong); }
.tabs { display: flex; gap: 2px; height: 100%; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; height: 100%;
  text-decoration: none; color: var(--text-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.tab-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center;
}
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.who { color: var(--text-2); }
.who b { color: var(--text); font-weight: 600; }
.rank {
  margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); background: var(--ink-3);
}
.rank-owner { color: var(--gold); background: var(--gold-soft); }
.link-state { font-size: 12px; color: var(--warn); }

/* ---------- Layout ---------- */
.view { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 64px; outline: none; }
.loading { color: var(--text-3); }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--text-3); margin-top: 4px; }
.page-head .spacer { flex: 1; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 15px; }
.section-head .meta { color: var(--text-3); font-size: 13px; }
.section-head .spacer { flex: 1; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--rule-strong); background: var(--ink-2); color: var(--text);
  font-weight: 550; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--ink-3); border-color: #414850; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--ink-2); border-color: var(--rule); color: var(--text); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: #e2b65c; border-color: #e2b65c; }
.btn-danger { color: #ffd9d3; border-color: rgba(229, 96, 79, .45); background: rgba(229, 96, 79, .12); }
.btn-danger:hover { background: rgba(229, 96, 79, .22); border-color: rgba(229, 96, 79, .7); }
.btn-solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-solid-danger:hover { background: #ee6f5f; border-color: #ee6f5f; }
.btn-block { width: 100%; height: 40px; font-size: 14px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Vitals strip ---------- */
.vitals {
  display: grid; grid-template-columns: 1.25fr 1fr 1.35fr 1fr .8fr; gap: 1px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--rule); overflow: hidden;
}
.vital { padding: 16px 18px 14px; background: var(--ink-1); min-width: 0; }
.vital-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; }
.vital-value small { font-size: 14px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.vital-foot { color: var(--text-3); font-size: 12.5px; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.vital-foot b { color: var(--text-2); font-weight: 550; }
.spark { display: block; width: 100%; height: 28px; margin-top: 8px; }

.meter { position: relative; height: 6px; border-radius: 3px; background: var(--ink-3); margin-top: 12px; overflow: hidden; }
.meter > span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.meter .fill-ok { background: var(--ok); }
.meter .fill-warn { background: var(--warn); }
.meter .fill-bad { background: var(--bad); }
.meter .fill-host { background: rgba(231, 228, 221, .18); }
.meter .tick { width: 2px; left: auto; background: var(--text); border-radius: 0; opacity: .7; }

.stack { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--ink-3); margin-top: 12px; gap: 2px; }
.stack > span { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }

.bg-ready { background: var(--ok); }
.bg-starting, .bg-preparing { background: var(--boot); }
.bg-draining, .bg-stopping { background: var(--warn); }
.bg-crashed { background: var(--bad); }

/* ---------- Alerts ---------- */
.alerts { margin-top: 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--ink-1); }
.alert { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--rule); position: relative; }
.alert:first-child { border-top: 0; }
.alert::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; }
.alert.critical::before { background: var(--bad); }
.alert.warning::before { background: var(--warn); }
.alert.info::before { background: var(--idle); }
.alert-sev { width: 64px; flex: none; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.alert.critical .alert-sev { color: var(--bad); }
.alert.warning .alert-sev { color: var(--warn); }
.alert.info .alert-sev { color: var(--text-3); }
.alert-msg { flex: 1; min-width: 0; }
.alert-detail { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.all-clear { margin-top: 16px; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.all-clear .dot { background: var(--ok); }

/* ---------- Status ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--idle); }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; text-transform: capitalize; }
.state-ready .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.state-starting .dot, .state-preparing .dot { background: var(--boot); box-shadow: 0 0 0 3px var(--boot-soft); animation: pulse 1.4s ease-in-out infinite; }
.state-draining .dot, .state-stopping .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.state-crashed .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.state-crashed { color: #f08b7d; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .state .dot { animation: none !important; } }

.tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--warn); background: var(--warn-soft);
}

/* ---------- Server table ---------- */
.fleet { border: 1px solid var(--rule); border-radius: 8px; background: var(--ink-1); overflow: hidden; }
.fleet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fleet th:nth-child(1) { width: 27%; }
.fleet th:nth-child(2) { width: 14%; }
.fleet th:nth-child(3), .fleet th:nth-child(4) { width: 9%; }
.fleet th:nth-child(5), .fleet th:nth-child(6) { width: 10%; }
.fleet th:nth-child(7) { width: 7%; }
.fleet th:nth-child(8) { padding-left: 32px; }
.fleet td.col-node { padding-left: 32px; }
.fleet th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--rule); background: var(--ink-1);
}
.fleet td { padding: 0 16px; height: 42px; border-top: 1px solid var(--rule); white-space: nowrap; }
.fleet .num { text-align: right; }
.fleet .muted { color: var(--text-3); }
.fleet tr.srv { cursor: pointer; }
.fleet tr.srv:hover td { background: var(--ink-2); }
.fleet tr.srv td:first-child { padding-left: 28px; }
.srv-name { font-family: var(--mono); font-size: 13px; font-weight: 400; text-decoration: none; color: var(--text); }
.srv-name:hover { text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.fleet tr.grp td { height: 46px; background: var(--ink-1); border-top: 1px solid var(--rule-strong); }
.fleet tr.grp:first-of-type td { border-top: 0; }
.grp-name { font-weight: 600; }
.grp-meta { color: var(--text-3); font-size: 12.5px; margin-left: 10px; }
.fleet tr.empty td { color: var(--text-3); font-size: 13px; padding-left: 28px; height: 36px; }
.fleet tr.realm td {
  height: 34px; background: var(--ink-0); border-top: 1px solid var(--rule-strong);
  font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--gold);
}
.fleet tr.realm:first-child td { border-top: 0; }

/* ---------- Charts ---------- */
.charts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chart { border: 1px solid var(--rule); border-radius: 8px; background: var(--ink-1); padding: 14px 16px 10px; min-width: 0; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.chart-head h3 { font-size: 13px; font-weight: 600; }
.chart-now { font-size: 13px; color: var(--text-2); }
.chart svg { display: block; width: 100%; height: 132px; margin-top: 10px; overflow: visible; }
.chart .axis { fill: var(--text-3); font-size: 10.5px; font-family: var(--sans); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .hover-line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.chart-key i { display: inline-block; width: 10px; height: 2px; vertical-align: 3px; margin-right: 6px; }
.chart-tip { font-size: 12px; color: var(--text-2); min-height: 18px; margin-top: 2px; }

/* TPS tones: plain when healthy, amber below 18, red below 15 */
.tps-warn { color: var(--warn); }
.tps-bad { color: #f08b7d; font-weight: 600; }
.fleet td.tps-bad, .fleet td.tps-warn { font-weight: 600; }

/* ---------- Server page ---------- */
.crumb { color: var(--text-3); text-decoration: none; font-size: 13px; display: inline-flex; gap: 6px; margin-bottom: 14px; }
.crumb:hover { color: var(--text); }
.srv-title { font-family: var(--mono); font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.srv-sub { display: flex; align-items: center; gap: 14px; margin-top: 8px; color: var(--text-3); flex-wrap: wrap; }
.facts {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 0;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--rule); overflow: hidden;
}
.fact { padding: 14px 16px; background: var(--ink-1); min-width: 0; }
.fact dt { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.fact dd { margin: 6px 0 0; font-size: 17px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact dd.small { font-size: 12.5px; font-family: var(--mono); font-weight: 450; color: var(--text-2); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--rule); border-radius: 8px; background: var(--ink-1); overflow-x: auto; }
.timeline li { flex: 1; min-width: 132px; padding: 12px 16px; border-left: 1px solid var(--rule); position: relative; }
.timeline li:first-child { border-left: 0; }
.timeline .t-state { display: flex; align-items: center; gap: 8px; font-weight: 550; text-transform: capitalize; }
.timeline .t-at { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.timeline .t-gap { color: var(--text-2); font-size: 12px; position: absolute; top: 12px; right: 12px; }

.term { border: 1px solid var(--rule); border-radius: 8px; background: #0a0b0c; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--rule); background: var(--ink-1); }
.term-bar .title { font-size: 12.5px; color: var(--text-2); }
.term-bar .spacer { flex: 1; }
.term-filter {
  height: 28px; width: 200px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--rule-strong);
  background: var(--ink-0); color: var(--text); font-size: 12.5px;
}
.term-body {
  height: 420px; overflow: auto; padding: 10px 14px; margin: 0;
  font: 12.5px/1.6 var(--mono); color: #c9cbc6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.term-body .l-warn { color: var(--warn); }
.term-body .l-err { color: #f08b7d; }
.term-body .l-dim { color: var(--text-3); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.live .dot { width: 6px; height: 6px; background: var(--ok); }
.live.paused .dot { background: var(--idle); }

.excerpt { margin: 0; padding: 12px 14px; background: #0a0b0c; border-top: 1px solid var(--rule); font: 12px/1.6 var(--mono); color: #c9cbc6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }

/* ---------- Lists (crashes, audit, releases) ---------- */
.panel { border: 1px solid var(--rule); border-radius: 8px; background: var(--ink-1); overflow: hidden; }
.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.rows td { padding: 10px 16px; border-top: 1px solid var(--rule); vertical-align: top; }
.rows tr:first-child td { border-top: 0; }
.rows .num { text-align: right; }
.rows .muted { color: var(--text-3); }
.rows .nowrap { white-space: nowrap; }
.ev { font-family: var(--mono); font-size: 12.5px; }
.ev-bad { color: #f08b7d; }
.ev-warn { color: var(--warn); }

.crash { border-top: 1px solid var(--rule); }
.crash:first-child { border-top: 0; }
.crash summary { list-style: none; display: grid; grid-template-columns: 200px 1fr auto auto; gap: 16px; align-items: center; padding: 12px 16px; cursor: pointer; }
.crash summary::-webkit-details-marker { display: none; }
.crash summary:hover { background: var(--ink-2); }
.crash .first-line { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chev { width: 14px; height: 14px; color: var(--text-3); transition: transform .15s; }
details[open] > summary .chev { transform: rotate(90deg); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.input {
  height: 32px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--rule-strong);
  background: var(--ink-1); color: var(--text); font-size: 13px; min-width: 0;
}
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r); overflow: hidden; }
.seg button { height: 30px; padding: 0 12px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 550; }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button[aria-pressed="true"] { background: var(--ink-3); color: var(--text); }

.release-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.drop {
  border: 1px dashed var(--rule-strong); border-radius: 8px; padding: 22px 18px; text-align: center;
  color: var(--text-2); background: var(--ink-0); transition: border-color .12s, background-color .12s;
}
.drop.over { border-color: var(--gold); background: var(--gold-soft); }
.drop strong { color: var(--text); display: block; margin-bottom: 4px; font-weight: 600; }
.drop .fine { margin-top: 6px; }
.upload-form { padding: 16px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.progress { height: 4px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s; }
.note { color: var(--text-3); font-size: 12.5px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; }
.pill { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 4px; background: var(--ink-2); border: 1px solid var(--rule); color: var(--text-2); }
.subhead { padding: 12px 16px 0; }

.empty-state { padding: 40px 16px; text-align: center; color: var(--text-3); }
.empty-state strong { display: block; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.fine { color: var(--text-3); font-size: 12.5px; }

/* ---------- Banner, dialog, toasts ---------- */
.banner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; border: 1px solid rgba(224, 166, 64, .35); background: var(--warn-soft); color: #f3d39a; font-size: 13px; }

.sheet {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--rule-strong); border-radius: 10px;
  background: var(--ink-1); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.sheet::backdrop { background: rgba(5, 6, 7, .62); }
.sheet form { padding: 20px; }
.sheet h2 { font-size: 16px; }
.sheet-body { color: var(--text-2); margin: 10px 0 20px; }
.sheet-body p { margin: 0 0 8px; }
.sheet-body .mono { color: var(--text); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast {
  padding: 11px 14px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--rule-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
  animation: toast-in .16s ease-out;
}
.toast .dot { margin-top: 5px; }
.toast.ok .dot { background: var(--ok); }
.toast.warn .dot { background: var(--warn); }
.toast.bad .dot { background: var(--bad); }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 360px; }
.brand-lg { margin-bottom: 40px; }
.brand-lg .crest { width: 24px; height: 24px; }
.login h1 { font-size: 24px; margin-bottom: 20px; }
.login-note { margin: -12px 0 20px; color: var(--text-3); font-size: 13px; }
.token-input {
  height: 44px; width: 100%; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--ink-1); font: 15px/1 var(--mono); letter-spacing: .04em;
}
.token-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.steps { margin: 0 0 24px; padding-left: 20px; color: var(--text-2); }
.steps li { margin: 4px 0; padding-left: 2px; }
.login-form { display: grid; gap: 10px; }
.code-input {
  height: 52px; width: 100%; padding: 0 14px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--ink-1); font: 600 22px/1 var(--mono); letter-spacing: .18em; text-align: center; text-transform: uppercase;
}
.code-input::placeholder { color: #3d4349; }
.code-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); border: 1px solid rgba(229, 96, 79, .4); color: #f6b8ad; font-size: 13px; }
.login .fine { margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .vitals { grid-template-columns: repeat(3, 1fr); }
  .vital:first-child { grid-column: span 2; }
  .charts { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .release-grid { grid-template-columns: 1fr; }
  .col-node, .col-boot { display: none; }
}

@media (max-width: 720px) {
  .fleet table { table-layout: auto; }
  :root { --gutter: 16px; --bar-h: 52px; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  /* backdrop-filter would make the bar the containing block of the fixed bottom tabs */
  .bar { backdrop-filter: none; background: var(--ink-0); }
  .bar-inner { gap: 12px; }
  .brand-sub, .who, .link-state:empty { display: none; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: rgba(14, 16, 18, .96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--rule); gap: 0; z-index: 20;
  }
  .tabs a { flex: 1; justify-content: center; border-bottom: 0; border-top: 2px solid transparent; margin: -1px 0 0; font-size: 13px; }
  .tabs a[aria-current="page"] { border-top-color: var(--gold); }
  .view { padding-top: 20px; }
  .page-head h1 { font-size: 20px; }

  .vitals { grid-template-columns: 1fr 1fr; }
  .vital { padding: 14px; }
  .vital:first-child { grid-column: 1 / -1; }
  .vital-value { font-size: 22px; }

  .alert { flex-wrap: wrap; gap: 6px 12px; }
  .alert-sev { width: auto; }
  .alert-msg { flex-basis: 100%; order: 3; }
  .alert .btn { order: 2; margin-left: auto; }

  .fleet thead { display: none; }
  .fleet tr.srv { display: grid; grid-template-columns: 1fr auto; padding: 10px 16px 10px 20px; border-top: 1px solid var(--rule); gap: 2px 10px; }
  .fleet tr.srv td { display: block; height: auto; padding: 0 !important; border: 0; }
  .fleet tr.srv td.c-name { grid-column: 1; }
  .fleet tr.srv td.c-state { grid-column: 2; grid-row: 1; justify-self: end; }
  .fleet tr.srv td.c-meta-m { grid-column: 1 / -1; color: var(--text-3); font-size: 12.5px; }
  .fleet tr.srv td.c-d { display: none; }
  .fleet tr.grp td, .fleet tr.realm td { display: table-cell; }
  .fleet tr.grp td.c-d { display: none; }
  .grp-meta { display: block; margin: 2px 0 0; }

  .charts { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .term-body { height: 60vh; }
  .term-filter { width: 120px; }
  .crash summary { grid-template-columns: 1fr auto; }
  .crash .first-line { grid-column: 1 / -1; grid-row: 2; }
  .crash .c-exit { display: none; }
  .rows .hide-m { display: none; }
  .toasts { right: 16px; left: 16px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (min-width: 721px) { .c-meta-m { display: none; } }
