:root {
  --ink: #172126;
  --muted: #5f7077;
  --paper: #f5f7f6;
  --card: #ffffff;
  --line: #d5e1dd;
  --accent: #0b6f67;
  --accent-soft: #dff1ec;
  --danger: #a83232;
  --warn: #8b5a12;
  --shadow: 0 10px 30px #183b3210;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
a { color: var(--accent); }
.topbar { min-height: 68px; background: #112c2b; color: #f5fffb; display: flex; align-items: center; padding: 0 clamp(18px, 4vw, 64px); gap: 42px; }
.brand { font-weight: 900; letter-spacing: .1em; color: #fff; text-decoration: none; font-size: 17px; }
.brand span { color: #8ed6bd; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 22px; flex: 1; }
.topbar nav a { color: #c2d9d2; text-decoration: none; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: #fff; }
.ghost, button { cursor: pointer; }
.ghost { background: transparent; border: 1px solid #ffffff66; color: #fff; padding: 7px 13px; border-radius: 8px; }
.shell { max-width: 1440px; margin: 0 auto; padding: 38px clamp(18px, 4vw, 64px) 70px; }
.page-heading, .detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.05; margin-bottom: 8px; letter-spacing: -.04em; }
h2 { font-size: 17px; margin-bottom: 16px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; margin-bottom: 9px; }
.muted, small { color: var(--muted); }
small { display: block; font-size: 12px; }
.live-dot { color: var(--accent); font-size: 12px; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.cards.compact { grid-template-columns: repeat(4, 1fr); }
.metric, .panel { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; }
.metric { padding: 17px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 29px; display: block; margin-top: 8px; letter-spacing: -.04em; }
.metric-inline strong { display: inline; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { padding: 22px; margin-bottom: 20px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-title h2 { margin-bottom: 0; }
.panel-title a { color: var(--accent); font-size: 12px; }
.panel-title a.secondary { color: #fff; font-size: inherit; }
.coverage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.coverage div { border-left: 3px solid var(--accent-soft); padding-left: 12px; }
.coverage strong { display: block; font-size: 23px; }
.coverage span { color: var(--muted); font-size: 12px; }
.coverage-status { margin: 16px 0 0; color: var(--accent); font-size: 12px; font-weight: 700; }
.registry-summary { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.registry-summary a { text-decoration: none; }
.bar-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 8px 0; }
.bar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #f7fbf9; }
.empty-state { color: var(--muted); border: 1px dashed var(--line); padding: 18px; margin: 0; }
.badge, .severity { display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.badge.large { padding: 7px 12px; }
.badge-stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.online, .fiscal-complete, .status-completed { color: #176646; background: #e5f5eb; }
.degraded, .warning, .fiscal-incomplete, .status-pending, .status-running, .priority-high { color: var(--warn); background: #fff1d5; }
.offline, .unknown { color: #53656c; background: #e9eef0; }
.failed, .priority-critical, .status-failed { color: var(--danger); background: #fde7e7; }
.blocked, .priority-normal { color: #6d4c1c; background: #fff3d8; }
.priority-low { color: #53656c; background: #e9eef0; }
.fiscal-blocked { color: #7d3c13; background: #ffead6; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.filters label { color: var(--muted); display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.filters input, .filters select, .filters textarea, input, select, textarea { border: 1px solid #b8c9c4; background: #fff; border-radius: 7px; color: var(--ink); font: inherit; padding: 8px 10px; min-height: 38px; }
.filters input, .filters select { min-width: 150px; }
.filters button { align-self: end; }
.secondary, button:not(.ghost) { border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 8px 13px; border-radius: 7px; text-decoration: none; font: inherit; }
.secondary:hover, button:not(.ghost):hover { background: #095a54; }
.blocker-filters label { flex: 1 1 170px; }
.compact-filters { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
caption { text-align: left; font-size: 17px; font-weight: 800; margin-bottom: 12px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td a { text-decoration: none; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 4px 0 22px; color: var(--muted); }
.pagination a { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 10px; text-decoration: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 13px; text-decoration: none; color: var(--muted); }
.tabs a.active { color: var(--accent); border-bottom: 3px solid var(--accent); font-weight: 800; }
.facts { display: grid; grid-template-columns: minmax(130px, .7fr) 1fr; gap: 10px 18px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.event-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-time { color: var(--muted); font-size: 12px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.login-card { width: min(100%, 420px); display: grid; gap: 10px; padding: 30px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.login-card .eyebrow, .login-card h1 { margin-bottom: 2px; }
.login-card label { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; }
.login-card button { width: 100%; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid label { display: grid; gap: 5px; color: var(--muted); font-weight: 700; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid select, .form-grid input, .form-grid textarea { width: 100%; }
.form-grid textarea { min-height: 100px; resize: vertical; }
.error, .error-text { color: var(--danger); }
.evidence { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.4 ui-monospace, monospace; }

:focus-visible { outline: 3px solid #f1ae28; outline-offset: 2px; }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .bar-grid { grid-template-columns: repeat(2, 1fr); }
  .page-heading, .detail-head { align-items: flex-start; flex-direction: column; }
  .badge-stack { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 14px 24px; padding-block: 16px; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .shell { padding-top: 26px; }
  .cards, .cards.compact, .split { grid-template-columns: 1fr 1fr; }
  .coverage { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .event-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 520px) {
  .cards, .cards.compact, .split, .bar-grid { grid-template-columns: 1fr; }
  .filters label, .filters input, .filters select, .filters button { width: 100%; }
  .filters button { margin-top: 2px; }
  .login-card { padding: 22px; }
}
