:root {
    --ink: #202747;
    --muted: #565d75;
    --primary: #3545c5;
    --line: #dedde8;
    --canvas: #f8f9fd;
    --passed: #3b9272;
    --failed: #d25762;
    --blocked: #8069c6;
    --error: #9d3855;
    --review: #df8d47;
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--primary); text-underline-offset: 4px; }
a:hover { color: #2935a3; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.skip { position: fixed; top: -100px; left: 16px; padding: 10px; background: white; z-index: 1; }
.skip:focus { top: 10px; }
.topbar { height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.brand { font-size: 30px; font-weight: 750; text-decoration: none; letter-spacing: -.06em; color: var(--ink); }
.brand > span { color: #ce5a24; }
.brand small { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 14px; letter-spacing: 0; color: var(--muted); }
.tenant { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; }
.tenant-icon { display: grid; place-items: center; background: #e9ecff; color: var(--primary); border-radius: 9px; width: 32px; height: 32px; }
.demo { background: #ffead7; color: #854727; padding: 3px 8px; border-radius: 6px; font-size: 13px; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 36px; }
.nav-label { font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 12px; }
.monitor-label { margin-top: 26px; }
.sidebar a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 9px 12px; font-size: 14px; border-radius: 8px; }
.sidebar a > span { color: var(--primary); font-size: 17px; width: 17px; text-align: center; }
.sidebar a:hover, .sidebar a[aria-current] { background: #edf0ff; color: #303eae; }
.sidebar a[aria-current] { font-weight: 700; }
main { padding: 30px clamp(20px, 3vw, 46px) 48px; max-width: 1540px; width: 100%; margin-inline: auto; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 24px 28px; border-radius: 18px; background: linear-gradient(115deg, #edf0ff, #faf9ff 67%, #ffe9d6); border: 1px solid #dedff4; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; font-weight: 650; letter-spacing: -.045em; margin: 5px 0 8px; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.024em; }
h3 { font-size: 1rem; letter-spacing: -.01em; }
.intro > div > p:last-child, .muted, small { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: #3a469d; }
.eyebrow i, .chip span, .badge i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e87641; margin-right: 5px; }
.chip { white-space: nowrap; border: 1px solid #dedde8; background: #fff; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; padding: 6px 10px; }
.monitor-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 14px; }
.monitor-tabs a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; border-bottom: 2px solid transparent; padding: 10px 12px; }
.monitor-tabs a[aria-current], .monitor-tabs a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 9px #20274705; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat { display: flex; flex-direction: column; align-items: start; padding: 14px 16px; gap: 3px; }
.stat > span:nth-child(2) { font-size: 14px; font-weight: 600; }
.stat strong { font-size: 29px; letter-spacing: -.045em; line-height: 1.1; }
.stat small { font-size: 13px; }
.stat-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-weight: 750; margin-bottom: 4px; }
.blue { background: #edf0ff; color: #3545c5; }
.green { background: #e8f4ed; color: #206248; }
.peach { background: #ffead7; color: #8f4822; }
.purple { background: #eee4f8; color: #69439c; }
.filters { display: flex; gap: 12px; align-items: end; padding: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; }
label { color: var(--ink); font-size: 14px; font-weight: 650; display: grid; gap: 4px; min-width: 0; }
input, select, textarea, button { font: inherit; }
input, select, textarea { background: #fff; color: var(--ink); border: 1px solid #c9cada; border-radius: 7px; padding: 8px 10px; min-height: 40px; max-width: 100%; }
select { appearance: none; padding-right: 30px; background: linear-gradient(45deg, transparent 50%, #565d75 50%) right 14px center / 5px 5px no-repeat, linear-gradient(135deg, #565d75 50%, transparent 50%) right 9px center / 5px 5px no-repeat, white; }
.button { border: 1px solid var(--primary); background: var(--primary); color: white; border-radius: 7px; min-height: 40px; padding: 8px 13px; font-size: 14px; font-weight: 650; cursor: pointer; }
.button:hover { background: #2935a3; }
.button:disabled { opacity: .65; cursor: wait; }
.secondary { background: #edf0ff; border-color: #dce0f4; color: #303eae; }
.secondary:hover { background: #dce2ff; }
.insights, .case-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.panel { padding: 18px; }
.panel > .muted, .case-list-head .muted { font-size: 14px; margin-top: 3px; }
.chart-scroll { overflow-x: auto; padding-bottom: 22px; }
.chart { display: flex; height: 142px; align-items: end; gap: 6px; min-width: 440px; margin-top: 16px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), #eeeff7 calc(25% - 1px) 25%); }
.column { flex: 1; height: 100%; position: relative; display: flex; align-items: end; justify-content: center; }
.stack { display: flex; flex-direction: column-reverse; overflow: hidden; border-radius: 4px 4px 0 0; width: min(85%, 34px); }
.chart-label { position: absolute; top: 100%; color: var(--muted); font-size: 12px; padding-top: 4px; white-space: nowrap; }
.chart-note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.distribution { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: #f1f1f6; margin-top: 15px; }
.fill.passed { background: var(--passed); }
.fill.failed { background: var(--failed); }
.fill.blocked { background: var(--blocked); }
.fill.error { background: var(--error); }
.fill.review_required { background: var(--review); }
.legend, .history, .agent-monitors { list-style: none; padding: 0; }
.legend { margin: 9px 0 0; }
.legend li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.case-list { margin-top: 14px; }
.case-list-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
.case-filters { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.case-filters input { width: 160px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 10px 18px; border-top: 1px solid #ededf4; white-space: nowrap; }
th { background: #f6f7fd; font-weight: 650; }
td a { font-weight: 700; }
tbody tr:hover { background: #fafaff; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 3px 8px; border-radius: 7px; background: #eceef4; color: var(--ink); font-size: 13px; font-weight: 650; }
.badge i { background: currentColor; margin: 0; width: 6px; height: 6px; }
.badge.passed { background: #e8f4ed; color: #206248; }
.badge.failed { background: #fce7ea; color: #9d2d40; }
.badge.blocked { background: #eee8fb; color: #604496; }
.badge.error { background: #f6e4eb; color: #852745; }
.badge.review_required { background: #ffead7; color: #854727; }
.back { display: inline-block; margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.case-grid { margin-top: 18px; align-items: start; }
.context { display: grid; grid-template-columns: auto 1fr; gap: 7px 15px; margin-bottom: 0; font-size: 14px; }
.context dt { color: var(--muted); }
.context dd { margin: 0; overflow-wrap: anywhere; }
.step { border: 1px solid #dce0f4; border-radius: 9px; margin-top: 12px; padding: 12px; background: #fbfbff; }
.step h3 { margin-bottom: 5px; }
summary { cursor: pointer; font-size: 14px; }
.step summary > .badge { margin: 3px 0 0 6px; }
.mode { margin-top: 8px; font-size: 13px; }
.history { max-height: 22rem; overflow: auto; margin: 6px 0 0; }
.history li { border-top: 1px solid #ededf4; padding: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.history li p { margin-top: 3px; }
.agent-panel { margin-top: 18px; }
.agent-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agent-panel h3 { margin-top: 14px; }
.agent-monitors { margin: 6px 0 0; }
@media (max-width: 1040px) {
    .shell { grid-template-columns: 185px minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .insights, .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .topbar { height: 62px; padding-inline: 15px; }
    .shell { display: block; }
    .sidebar { display: block; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; }
    .sidebar nav { display: flex; gap: 3px; overflow-x: auto; }
    .sidebar a { white-space: nowrap; padding: 7px; }
    .sidebar a span, .nav-label { display: none; }
    main { padding: 14px 12px 30px; }
    .intro { align-items: start; flex-direction: column; padding: 16px; }
    .stat { padding: 11px; }
    th, td { padding-inline: 12px; }
}

.monitor-owners { margin-top: 14px; }
.owner-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 36px;
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: .875rem;
}
.owner-list li {
    display: grid;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.case-sidebar { display: grid; gap: 14px; min-width: 0; }

.review-dialog {
    width: min(440px, calc(100% - 32px));
    color: var(--ink);
    padding: 22px;
}
.review-dialog::backdrop { background: #20274770; }
.review-fields { display: grid; gap: 12px; border: 0; margin: 16px 0; padding: 0; min-width: 0; }
.review-fields :disabled { background-color: #f6f7fd; color: var(--muted); cursor: not-allowed; }
.review-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
