:root {
  --navy: #0b1623;
  --navy-soft: #132337;
  --canvas: #f2f5f7;
  --surface: #ffffff;
  --ink: #172332;
  --muted: #647181;
  --line: #dde4e8;
  --blue: #155eef;
  --red: #c81e1e;
  --orange: #b54708;
  --green: #18794e;
  --shadow: 0 12px 30px rgba(21, 34, 50, 0.07);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.auth-gate { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: var(--navy); }
.auth-card { width: min(420px, 100%); padding: 34px; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.auth-mark { width: 44px; height: 44px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 900; }
.auth-card h1 { margin-bottom: 10px; font-size: 27px; }
.auth-card > p:not(.eyebrow) { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-card > small { display: block; margin-top: 20px; color: var(--muted); font-size: 10px; text-align: center; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 750; }
.auth-form input { min-height: 42px; padding: 0 11px; border: 1px solid #cfd8df; border-radius: 7px; }
.auth-form input:focus { border-color: var(--blue); outline: 3px solid rgba(21,94,239,.12); }
.auth-form .primary-button { min-height: 42px; margin-top: 3px; }
.form-status { min-height: 18px; color: var(--red); font-size: 11px; text-align: center; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 18px; background: var(--navy); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--navy); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: #9fb0c4; font-size: 12px; }
.nav { margin-top: 28px; display: grid; gap: 6px; }
.nav-link { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #afbed0; text-decoration: none; font-size: 14px; font-weight: 650; }
.nav-link span { font-size: 10px; color: #71849a; letter-spacing: .08em; }
.nav-link b { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: #b42318; color: #fff; text-align: center; font-size: 11px; }
.nav-link:hover, .nav-link:focus-visible, .nav-link.active { background: var(--navy-soft); color: #fff; outline: none; }
.sidebar-status { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 15px 10px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: 13px; }
.sidebar-status small { margin-top: 2px; color: #8fa1b6; font-size: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 0 4px rgba(57,217,138,.12); }
.workspace { min-width: 0; padding: 0 34px 46px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.03em; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.environment-pill { padding: 6px 9px; border: 1px solid #f6c7c7; border-radius: 6px; background: #fff2f2; color: #a61b1b; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.reviewer-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.reviewer-button > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #dbe7ff; color: #164ca2; font-size: 11px; font-weight: 850; }
.reviewer-button strong, .reviewer-button small { display: block; }
.reviewer-button strong { font-size: 12px; }
.reviewer-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.signout-button { min-height: 34px; padding: 0 10px; border: 1px solid #cfd8df; border-radius: 6px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 750; cursor: pointer; }
.signout-button:hover, .signout-button:focus-visible { border-color: var(--blue); color: var(--blue); outline: none; }
.preview-banner { margin: 20px 0; padding: 12px 15px; display: flex; gap: 10px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #194b8f; font-size: 13px; }
.preview-banner strong { flex: 0 0 auto; }
.view { display: none; }
.view.active { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-card { position: relative; overflow: hidden; min-height: 135px; padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #94a3b8; }
.summary-card.critical::before { background: var(--red); }
.summary-card.high::before { background: var(--orange); }
.summary-card.good::before { background: var(--green); }
.summary-card span, .summary-card small { display: block; color: var(--muted); }
.summary-card span { font-size: 12px; font-weight: 700; }
.summary-card strong { display: block; margin: 13px 0 7px; font-size: 28px; letter-spacing: -.04em; }
.summary-card.good strong { color: var(--green); }
.summary-card small { font-size: 11px; }
.content-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 16px; }
.lower-grid { grid-template-columns: 1fr 1fr; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.panel-header { min-height: 72px; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-header .eyebrow { margin-bottom: 4px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 750; cursor: pointer; }
.text-button:hover, .text-button:focus-visible { text-decoration: underline; outline: none; }
.alert-list { display: grid; }
.alert-row { width: 100%; min-height: 74px; padding: 13px 19px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover, .alert-row:focus-visible { background: #f8fafc; outline: none; }
.severity-marker { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.severity-marker.critical { background: var(--red); box-shadow: 0 0 0 4px #fee2e2; }
.severity-marker.high { background: var(--orange); box-shadow: 0 0 0 4px #ffedd5; }
.severity-marker.medium { background: #a16207; box-shadow: 0 0 0 4px #fef3c7; }
.alert-row strong, .alert-row small { display: block; }
.alert-row strong { font-size: 13px; }
.alert-row small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.alert-time { color: var(--muted); font-size: 11px; }
.posture-score { color: var(--orange); font-size: 19px; }
.control-list { padding: 8px 19px 12px; }
.control-list > div { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.control-list > div:last-child { border-bottom: 0; }
.control-list span { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.control-list strong { font-size: 11px; }
.control-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.control-dot.danger { background: var(--red); }.control-dot.warning { background: #d97706; }.control-dot.good { background: var(--green); }
.finding-list { padding: 6px 19px 12px; }
.finding-row { min-height: 57px; display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.finding-row:last-child { border-bottom: 0; }
.finding-row strong { font-size: 12px; }
.finding-row small { color: var(--muted); font-size: 10px; }
.risk-pill, .status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.risk-pill.critical { background: #fee2e2; color: #a61b1b; }.risk-pill.high { background: #ffedd5; color: #9a3412; }.risk-pill.medium { background: #fef3c7; color: #854d0e; }.risk-pill.low { background: #e0f2fe; color: #075985; }
.status-pill.new { background: #e0ecff; color: #164ca2; }.status-pill.investigating { background: #fff1d6; color: #8a4b08; }.status-pill.contained { background: #dcfce7; color: #166534; }
.timeline { margin: 0; padding: 7px 19px 12px; list-style: none; }
.timeline li { min-height: 58px; display: grid; grid-template-columns: 43px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }.timeline > li > span { color: var(--muted); font-size: 10px; }.timeline strong, .timeline small { display: block; }.timeline strong { font-size: 12px; }.timeline small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.section-heading { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading h2 { font-size: 25px; }.section-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.primary-button { padding: 10px 14px; border: 0; border-radius: 7px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 750; }
.primary-button:disabled { background: #aeb8c5; cursor: not-allowed; }
.toolbar { padding: 14px; display: flex; align-items: end; gap: 12px; border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: #fff; }
.toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.toolbar .search { flex: 1; }
.toolbar input, .toolbar select { min-height: 38px; padding: 0 11px; border: 1px solid #cfd8df; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; text-transform: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--blue); outline: 3px solid rgba(21,94,239,.12); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 14px; background: #f8fafc; color: var(--muted); text-align: left; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; }
td strong, td small { display: block; } td small { margin-top: 4px; color: var(--muted); }
.row-action { border: 0; background: transparent; color: var(--blue); font-weight: 800; cursor: pointer; }
.case-grid, .finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.case-card, .finding-card { min-height: 220px; padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.case-card h3, .finding-card h3 { margin-bottom: 9px; font-size: 16px; line-height: 1.35; }
.case-card p, .finding-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.card-footer { margin-top: 18px; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.detail-dialog { width: min(620px, calc(100vw - 30px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(7,16,28,.35); }
.detail-dialog::backdrop { background: rgba(7,16,28,.65); }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 22px; cursor: pointer; }
.dialog-body { padding: 27px; }
.dialog-body h2 { margin: 16px 42px 8px 0; font-size: 23px; }
.dialog-body > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.evidence-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.evidence-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; }
.evidence-grid span, .evidence-grid strong { display: block; }.evidence-grid span { margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.evidence-grid strong { font-size: 12px; }
.recommendation { margin-top: 20px; padding: 14px; border-left: 3px solid var(--blue); background: #eff6ff; font-size: 12px; line-height: 1.55; }
.empty-message { padding: 30px; text-align: center; color: var(--muted); }.hidden { display: none !important; }.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.source-notice { margin-bottom: 15px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; border: 1px solid #f3d29e; border-radius: 8px; background: #fff8eb; color: #82510a; font-size: 12px; }
.source-notice strong { flex: 0 0 auto; }.source-notice.connected { border-color: #a7d7bd; background: #eefaf3; color: #17603e; }.source-notice.error { border-color: #f3b8b8; background: #fff1f1; color: #991b1b; }
.source-notice.preview { border-color: #bfdbfe; background: #eff6ff; color: #194b8f; }
.infrastructure-summary { margin-bottom: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.infrastructure-stat { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.infrastructure-stat span, .infrastructure-stat strong { display: block; }.infrastructure-stat span { margin-bottom: 6px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.infrastructure-stat strong { font-size: 14px; }
.infrastructure-panel { margin-top: 0; }.infrastructure-panel .panel-header > small { color: var(--muted); font-size: 10px; }
.provider-heading { margin-top: 26px; border-top: 1px solid var(--line); }
.check-list { padding: 5px 19px 12px; }
.check-row { min-height: 58px; display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }.check-row strong, .check-row small { display: block; }.check-row strong { font-size: 12px; }.check-row small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.check-status { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }.check-status.healthy { background: #dcfce7; color: #166534; }.check-status.warning { background: #fef3c7; color: #854d0e; }.check-status.critical { background: #fee2e2; color: #991b1b; }.check-status.unknown { background: #e2e8f0; color: #475569; }
.threat-list { padding: 5px 19px 12px; }.threat-row { padding: 15px 0; display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 13px; border-bottom: 1px solid var(--line); }.threat-row:last-child { border-bottom: 0; }.threat-row h3 { margin: 0 0 5px; font-size: 13px; }.threat-row p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }.threat-row ul { margin: 7px 0 0; padding-left: 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }.threat-row time { color: var(--muted); font-size: 9px; white-space: nowrap; }

@media (max-width: 1050px) { .summary-grid { grid-template-columns: repeat(2, 1fr); }.case-grid, .finding-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; width: 100%; height: auto; padding: 14px; }.brand { padding-bottom: 14px; }.nav { margin-top: 14px; grid-template-columns: repeat(5, 1fr); }.nav-link { grid-template-columns: 1fr; justify-items: center; padding: 8px 4px; font-size: 11px; }.nav-link span { display: none; }.nav-link b { position: absolute; margin: -22px 0 0 48px; }.sidebar-status { display: none; }.workspace { padding: 0 16px 36px; }.content-grid, .lower-grid { grid-template-columns: 1fr; }.topbar { min-height: 80px; }.reviewer-button > span:last-child { display: none; }.preview-banner { align-items: flex-start; flex-direction: column; }.case-grid, .finding-grid { grid-template-columns: 1fr; }.infrastructure-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .summary-grid { grid-template-columns: 1fr; }.toolbar { align-items: stretch; flex-direction: column; }.toolbar label { width: 100%; }.topbar-actions { gap: 7px; }.environment-pill { font-size: 8px; }.evidence-grid { grid-template-columns: 1fr; }.threat-row { grid-template-columns: 1fr; }.threat-row time { white-space: normal; } }
