:root {
  color-scheme: light;
  --canvas: #f3f4f1;
  --surface: #fafaf8;
  --ink: #161918;
  --muted: #6d7470;
  --quiet: #929893;
  --rule: #d7dad5;
  --rule-strong: #b9beba;
  --accent: #3559d7;
  --good: #177354;
  --warn: #9a6418;
  --danger: #a33636;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 13px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; }

.masthead {
  min-height: 58px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(250, 250, 248, .94);
}
.brand, .header-actions, .login-brand { display: flex; align-items: center; }
.brand { gap: 11px; font-weight: 620; letter-spacing: -.01em; }
.header-actions { gap: 9px; color: var(--muted); font-size: 12px; }
.division { margin-left: 4px; padding-left: 15px; border-left: 1px solid var(--rule); color: var(--muted); font-weight: 450; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }

main { max-width: 1460px; margin: 0 auto; padding: 38px 40px 64px; }
.report-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.eyebrow, .section-number { margin: 0; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.report-heading h1 { margin: 5px 0 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; font-weight: 520; letter-spacing: -.045em; }
.report-meta { display: grid; justify-items: end; gap: 3px; color: var(--muted); font-size: 11px; }
.report-meta strong { color: var(--ink); font-weight: 520; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.summary-grid article { min-width: 0; padding: 20px 22px 19px; border-right: 1px solid var(--rule); }
.summary-grid article:first-child { padding-left: 0; }
.summary-grid article:last-child { border-right: 0; }
.summary-grid span { display: block; color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; }
.summary-grid strong { display: block; margin: 7px 0 12px; font-size: clamp(25px, 2.4vw, 36px); line-height: 1; font-weight: 480; letter-spacing: -.04em; }
.summary-grid small { color: var(--muted); font-size: 11px; }
.meter { width: min(100%, 180px); height: 2px; background: var(--rule); }
.meter i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s ease; }
.meter i.warning { background: var(--warn); }
.meter i.critical { background: var(--danger); }

.panel { margin-top: 34px; border-top: 1px solid var(--ink); }
.panel-title { min-height: 54px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.panel-title > div { display: flex; align-items: baseline; gap: 12px; }
.panel-title h2 { margin: 0; font-size: 13px; font-weight: 650; }
.panel-title > span { color: var(--muted); font-size: 10px; letter-spacing: .02em; text-align: right; }
.section-number { color: var(--quiet); letter-spacing: .06em; }

.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service { min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.service:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--rule); }
.service:nth-child(even) { padding-left: 24px; }
.service strong { min-width: 0; font-size: 12px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; }
.service small { min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.status-dot.up { background: var(--good); }
.status-dot.down { background: var(--danger); }

.two-column { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(300px, .8fr); gap: 40px; }
.activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 11px 0; border-bottom: 1px solid var(--rule); text-align: left; }
th { color: var(--quiet); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
td:first-child { max-width: 430px; padding-right: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td:not(:first-child), th:not(:first-child) { padding-left: 16px; text-align: right; }
.metric-bad { color: var(--danger); font-weight: 620; }

.muted, small { color: var(--muted); }
.recovery { padding-bottom: 0; }
.recovery > p { min-height: 38px; margin: 15px 0 4px; font-size: 11px; }
.recovery label { display: block; margin-top: 13px; color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
input, select, button { width: 100%; border: 1px solid var(--rule-strong); border-radius: 0; background: var(--surface); color: var(--ink); padding: 9px 10px; }
input, select { margin-top: 6px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 1px; border-color: var(--accent); }
button { cursor: pointer; font-weight: 620; }
button:disabled { opacity: .48; cursor: wait; }
.control-button { margin-top: 16px; border-color: var(--ink); background: var(--ink); color: #fff; }
.control-button:hover { background: #292d2b; }
.control-button.is-vps { border-color: var(--danger); background: var(--danger); }
.text-button { width: auto; border: 0; border-left: 1px solid var(--rule); padding: 3px 0 3px 12px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 520; }
.text-button:hover { color: var(--ink); }

.event-list { min-height: 82px; }
.event { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; }
.event strong { font-size: 11px; font-weight: 580; }
.event span { color: var(--muted); font-size: 10px; }
.empty { padding: 18px 0; color: var(--quiet); font-size: 11px; }

.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(360px, calc(100vw - 40px)); padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.login-brand { gap: 10px; margin-bottom: 48px; font-weight: 620; }
.login-card h1 { margin: 6px 0 4px; font-size: 32px; line-height: 1.1; font-weight: 520; letter-spacing: -.04em; }
.login-card > .muted { margin-top: 0; }
.login-card label { display: block; margin: 16px 0; color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.login-card button { margin-top: 4px; border-color: var(--ink); background: var(--ink); color: #fff; }
.error { padding: 10px; border-left: 2px solid var(--danger); background: #f6eaea; color: var(--danger); font-size: 11px; }

@media (max-width: 900px) {
  .masthead { padding: 0 18px; }
  main { padding: 28px 20px 48px; }
  .report-heading { align-items: start; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid article { padding: 18px 16px; border-bottom: 1px solid var(--rule); }
  .summary-grid article:first-child { padding-left: 0; }
  .summary-grid article:nth-child(2) { border-right: 0; }
  .summary-grid article:nth-child(3) { padding-left: 0; border-bottom: 0; }
  .summary-grid article:nth-child(4) { border-bottom: 0; }
  .two-column, .activity-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 620px) {
  .division, .report-meta { display: none; }
  .service-list { grid-template-columns: 1fr; }
  .service:nth-child(odd), .service:nth-child(even) { padding: 12px 0; border-right: 0; }
  .panel-title > span { display: none; }
}
