:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --text: #17202a;
  --muted: #667085;
  --line: #d9dee7;
  --panel: #ffffff;
  --critical: #7f1d1d;
  --error: #b42318;
  --warning: #b54708;
  --info: #175cd3;
  --accent: #146c43;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.shell { width: min(1440px, 100%); margin: 0 auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: 0; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: 0; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.muted { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions form { margin: 0; }
.account { color: var(--muted); margin-right: 4px; }
.button { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 8px 12px; text-decoration: none; cursor: pointer; }
.table-link, .back-link { color: #175cd3; text-decoration: none; }
.table-link:hover, .back-link:hover { text-decoration: underline; }
.back-link { display: inline-block; margin-bottom: 10px; font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.metrics div, .band, section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.metrics strong { display: block; font-size: 24px; }
.metrics span { color: var(--muted); font-size: 12px; }
section { margin: 0 0 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; background: #eef2f6; color: var(--text); white-space: nowrap; }
.pill.critical, .pill.error { background: #fee4e2; color: var(--error); }
.pill.warning { background: #fef0c7; color: var(--warning); }
.pill.info { background: #dbeafe; color: var(--info); }
.pill.neutral { background: #edf2f7; color: #344054; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 920px; background: var(--panel); }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 700; background: #f8fafc; }
td { max-width: 420px; }
tbody tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; }
.cluster-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden; }
.cluster-summary div { min-height: 82px; padding: 14px; background: var(--panel); }
.cluster-summary span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.cluster-summary .pill { display: inline-block; color: var(--error); }
.cluster-id { margin-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.incident-stack { display: grid; gap: 10px; }
.incident-card { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.incident-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.incident-heading .muted { margin-left: auto; }
.incident-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 10px 0; }
.incident-card dt { color: var(--muted); }
.incident-card dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.resolution { border-left: 4px solid var(--accent); }
.resolution dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 10px 0 0; }
.resolution dt { color: var(--muted); }
.resolution dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
details { margin-top: 10px; }
summary { color: #175cd3; cursor: pointer; }
pre { overflow-x: auto; padding: 12px; border-radius: 6px; background: #101828; color: #f2f4f7; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); margin: 0; padding: 28px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; background: var(--accent); color: #fff; border-radius: 7px; font-weight: 800; }
.login-copy { margin: 8px 0 22px; }
.login-form { display: grid; gap: 8px; }
.login-form label { margin-top: 6px; font-size: 13px; font-weight: 700; }
.login-form input[type="email"], .login-form input[type="password"] { width: 100%; height: 42px; border: 1px solid #b8c0cc; border-radius: 6px; padding: 8px 10px; background: #fff; }
.login-form input:focus { outline: 2px solid #91c9ae; outline-offset: 1px; border-color: var(--accent); }
.primary-button { height: 42px; margin-top: 12px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.alert { margin: 0 0 14px; border: 1px solid #f1a7a1; border-radius: 6px; padding: 9px 10px; background: #fff1f0; color: var(--error); }
.field-error { color: var(--error); font-size: 12px; }
@media (max-width: 720px) {
  .shell { padding: 14px; }
  header { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .account { width: 100%; }
  .metrics, .summary-grid, .cluster-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .incident-heading { align-items: flex-start; flex-wrap: wrap; }
  .incident-heading .muted { width: 100%; margin-left: 0; }
}
