:root {
  color-scheme: dark;
  --background: #07111f;
  --surface: #091625;
  --surface-subtle: #0b1929;
  --text: #f4f7fb;
  --muted: #9aaac0;
  --border: #24364b;
  --border-strong: #30445c;
  --accent: #2d7cff;
  --success: #31cd65;
  --danger: #ff6575;
  --unknown: #445268;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--background); color: var(--text); }
body { min-width: 320px; font-size: 14px; }
button, a { font: inherit; }
.page-shell { min-height: 100vh; }
.brand-rail { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 92px; display: flex; justify-content: center; border-right: 1px solid var(--border); background: var(--surface); }
.brand-rail a { width: 68px; height: 68px; display: grid; place-items: center; }
.brand-rail img { width: 44px; height: 44px; }
.rail-indicator { position: absolute; top: 86px; left: 0; width: 4px; height: 58px; border-radius: 0 4px 4px 0; background: var(--accent); }
.app-column { min-height: 100vh; margin-left: 92px; display: flex; flex-direction: column; }
.site-header { position: sticky; z-index: 15; top: 0; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); }
.page-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.breadcrumb-mark { color: var(--muted); font-size: 27px; line-height: 1; }
.page-identity h1, .page-identity small { display: block; margin: 0; }
.page-identity h1 { font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.page-identity small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.freshness { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.freshness i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.public-badge { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.refresh { min-width: 104px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 13px; font-weight: 650; }
.refresh:hover { background: var(--surface-subtle); }
.refresh:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 2px; }
.refresh:disabled { opacity: .62; cursor: wait; }
.refresh svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.refresh.loading svg { animation: spin .8s linear infinite; }
main { width: min(1510px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 36px; flex: 1; }
.status-heading { min-height: 90px; display: flex; align-items: center; gap: 20px; padding: 14px 26px; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 10px; background: var(--surface); }
.attention-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border: 3px solid var(--success); border-radius: 50%; color: var(--success); font-size: 19px; font-weight: 800; }
.status-heading span:not(.attention-icon) { font-size: 12px; }
.status-heading h2 { margin: 2px 0 3px; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.status-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.status-heading[data-state="unavailable"] { border-left-color: var(--danger); }
.status-heading[data-state="unavailable"] .attention-icon { border-color: var(--danger); color: var(--danger); }
.service-list { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.service-row { min-height: 116px; display: grid; grid-template-columns: 13px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 0 26px; }
.service-row + .service-row { border-left: 1px solid var(--border); }
.service-row h2, .service-row p { margin: 0; }
.service-row h2 { font-size: 17px; letter-spacing: -.01em; }
.service-row p { color: var(--muted); font-size: 13px; }
.service-row[data-state="operational"] p { color: var(--success); }
.service-row[data-state="unavailable"] p { color: var(--danger); }
.status-light { width: 9px; height: 9px; border-radius: 50%; background: var(--unknown); }
.status-light.operational { background: var(--success); }
.status-light.unavailable { background: var(--danger); }
.status-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 16px; align-items: start; }
.history-section, .incident-section { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.section-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.section-heading h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.section-heading span, .section-note { color: var(--muted); font-size: 11px; }
.history-grid { padding: 22px 16px 0; display: grid; grid-template-columns: repeat(45, minmax(4px, 1fr)); gap: 4px; }
.history-day { aspect-ratio: 1; min-width: 0; border-radius: 2px; background: var(--unknown); }
.history-day.operational { background: var(--success); }
.history-day.unavailable { background: var(--danger); }
.section-note { min-height: 46px; margin: 0; padding: 12px 16px 14px; line-height: 1.5; }
.incident-list p { min-height: 76px; display: flex; align-items: center; margin: 0; padding: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.incident-list p + p { border-top: 1px solid var(--border); }
.incident-list .notice { color: var(--text); }
.incident-list .critical { color: var(--danger); }
footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh.loading svg { animation: none; } }
@media (max-width: 820px) {
  .brand-rail { display: none; }
  .app-column { margin-left: 0; }
  .site-header { min-height: 64px; padding: 0 14px; }
  .page-identity::before { content: ""; width: 34px; height: 34px; flex: 0 0 34px; background: url("/assets/cowebs-console-mark.png") center / contain no-repeat; }
  .breadcrumb-mark, .page-identity small, .public-badge { display: none; }
  .page-identity h1 { font-size: 18px; }
  .freshness #updated { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .refresh { min-width: 40px; width: 40px; padding: 0; }
  .refresh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  main { width: calc(100% - 24px); padding-top: 12px; }
  .status-heading { min-height: 106px; padding: 14px 16px; }
  .service-list, .status-grid { grid-template-columns: 1fr; }
  .service-row { min-height: 86px; padding: 0 18px; }
  .service-row + .service-row { border-top: 1px solid var(--border); border-left: 0; }
  .history-grid { grid-template-columns: repeat(18, minmax(5px, 1fr)); }
  footer { padding: 0 14px; }
}
