:root {
  --bg: #09100f;
  --surface: #101a18;
  --surface-2: #162320;
  --line: #293b37;
  --text: #edf7f2;
  --muted: #9db1aa;
  --accent: #70e0b4;
  --accent-ink: #06261b;
  --danger: #ff8d87;
  --warning: #f5cd7a;
  --radius: 16px;
  --shadow: 0 20px 55px rgb(0 0 0 / .22);
  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 80% 0, #18312a 0, transparent 28rem), var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .65rem 1rem; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .8rem clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); background: rgb(9 16 15 / .84); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--text); text-decoration: none; }
.brand-mark { width: 2.35rem; height: 2.35rem; border-radius: 11px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .72rem; margin-top: .12rem; }
nav { display: flex; align-items: center; gap: .35rem; }
nav > a, .link-button { border: 0; padding: .55rem .72rem; border-radius: 9px; color: var(--muted); background: transparent; text-decoration: none; cursor: pointer; }
nav > a:hover, nav > a[aria-current="page"], .link-button:hover { color: var(--text); background: var(--surface-2); }
.inline { display: inline; }
.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 5vw, 4.5rem) 0; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); padding: 1.4rem max(1rem, calc((100% - 1180px)/2)); font-size: .82rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.65rem); letter-spacing: -.055em; margin-bottom: .5rem; }
h2 { font-size: 1.1rem; }
.eyebrow { color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .55rem; }
.muted, small { color: var(--muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-heading p { max-width: 44rem; }
.actions, .form-actions { display: flex; gap: .75rem; align-items: center; }
.button, button.primary, .danger-button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.75rem; padding: .65rem 1rem; border-radius: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button, button.primary { border: 1px solid var(--line); color: var(--text); background: var(--surface-2); }
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.ghost { background: transparent; }
.danger-button { color: #260706; background: var(--danger); border: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.metric, .panel, .auth-card, .credential-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(22 35 32 / .98), rgb(16 26 24 / .98)); box-shadow: var(--shadow); }
.metric { padding: 1.25rem; }
.metric span, .metric small { display: block; }
.metric span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.metric strong { display: block; font-size: 2.35rem; letter-spacing: -.06em; margin: .3rem 0; }
.panel { padding: 1.25rem; }
.panel-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; }
.compact-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.compact-list strong, .compact-list small { display: block; }
.status-dot { width: .65rem; height: .65rem; border-radius: 99px; background: var(--muted); }
.status-dot.online { background: var(--accent); box-shadow: 0 0 0 4px rgb(112 224 180 / .12); }
.pill { display: inline-flex; width: max-content; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.pill.good { color: var(--accent); border-color: rgb(112 224 180 / .35); }
.pill.bad { color: var(--danger); border-color: rgb(255 141 135 / .35); }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.activity-list time { color: var(--muted); font-size: .8rem; }
.activity-list.detailed li { grid-template-columns: 10rem 1fr; }
.empty, .empty-state { color: var(--muted); padding: 1.5rem 0; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: .85rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td .block { display: block; margin-top: .2rem; }
.danger { color: var(--danger); }
.row-actions { display: flex; align-items: center; justify-content: end; gap: .25rem; }
.row-actions form { display: inline; }
.auth-card, .credential-card { width: min(620px, 100%); margin: 5vh auto; padding: clamp(1.5rem, 4vw, 3rem); }
.stack { display: grid; gap: 1rem; margin-top: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
label { display: grid; gap: .45rem; color: var(--text); font-weight: 650; }
input { min-height: 2.75rem; width: 100%; padding: .65rem .75rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
input:focus { outline: 3px solid rgb(112 224 180 / .18); border-color: var(--accent); }
label.check { grid-template-columns: auto 1fr; align-items: center; align-content: center; font-weight: 500; }
label.check input { width: 1.15rem; min-height: 1.15rem; accent-color: var(--accent); }
.wide { grid-column: 1 / -1; }
.warning { color: var(--warning); }
.optional { color: var(--muted); font-size: .78rem; font-weight: 500; }
.form-actions { justify-content: end; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 1rem; padding: 1.25rem; border: 1px solid rgb(255 141 135 / .4); border-radius: var(--radius); }
.danger-zone h2, .danger-zone p { margin-bottom: .25rem; }
.credentials { display: grid; gap: .75rem; margin: 1.5rem 0; }
.credentials div { display: grid; grid-template-columns: 10rem 1fr; gap: .75rem; align-items: center; padding: .85rem; border-radius: 10px; background: var(--bg); }
.credentials dt { color: var(--muted); }
.credentials dd { margin: 0; overflow-wrap: anywhere; }
code { color: var(--accent); }
.notice { padding: .9rem 1rem; border-radius: 11px; margin-bottom: 1rem; background: var(--surface-2); border: 1px solid var(--line); }
.notice.success { border-color: rgb(112 224 180 / .4); }
.notice.error { border-color: rgb(255 141 135 / .5); color: var(--danger); }
.notice.warning { border-color: rgb(245 205 122 / .4); color: var(--warning); }
.top-gap { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .site-header { align-items: flex-start; position: static; flex-direction: column; gap: .75rem; }
  nav { width: 100%; overflow-x: auto; padding-bottom: .25rem; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 1.25rem, 1180px); padding-top: 2rem; }
  .page-heading, .danger-zone { align-items: stretch; flex-direction: column; }
  .page-heading .actions { display: grid; }
  .metric-grid, .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .credentials div { grid-template-columns: 1fr; }
  .activity-list li, .activity-list.detailed li { grid-template-columns: 1fr; gap: .25rem; }
}
