:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #f8fafc;
  color: #0a0f1a;
  font-size: 16px;
  --navy: #0a0f1a;
  --muted: #495970;
  --line: #dde5f0;
  --surface: #fff;
  --blue: #0f62fe;
  --highlight: #99d8ff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, select, input, textarea { font: inherit; }
button, select { min-height: 42px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #597cfa; outline-offset: 3px; }
.skip { position: absolute; z-index: 10; top: .5rem; left: .5rem; padding: .8rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 233px minmax(0, 1fr); }
.sidebar { background: linear-gradient(160deg,#111c35,var(--navy) 65%); color: #d2dbec; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 1.35rem .9rem 1rem; overflow-y: auto; }
.brand { display: grid; gap: .7rem; margin: 0 .32rem 1.35rem; }
.brand-image { background: #fff; padding: .42rem .58rem; border-radius: .65rem; display: block; width: fit-content; }
.brand-image img,.sign-logo { display: block; object-fit: contain; max-width: 100%; }
.brand small { display: block; font-size: .83rem; color: #d0deef; }
.workspace-menu { display:none; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav button { width: 100%; border: 0; border-radius: .58rem; color: #d0dcf1; background: transparent; text-align: left; padding: .65rem .8rem; display: flex; gap: .7rem; align-items: center; }
.sidebar nav button:hover, .sidebar nav button[aria-current] { color: white; background: #214476; }
.nav-mark { color: #aabdeb; width: 1rem; text-align: center; }
.sidebar nav button[aria-current] .nav-mark { color: var(--highlight); }
.sidebar-foot { display: flex; gap: .55rem; align-items: center; margin-top: auto; padding: .9rem .4rem .3rem; border-top: 1px solid #435374; font-size: .86rem; }
.status-dot { width: .48rem; height: .48rem; border-radius: 50%; background: var(--highlight); }
.topbar { min-height: 67px; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: .75rem clamp(1.15rem, 3vw, 2.6rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: .65rem; color: var(--muted); font-size: .89rem; }
.breadcrumb strong { color: #172443; }
.identity { display: flex; gap: .8rem; align-items: center; font-weight: 600; font-size: .9rem; }
.identity { flex-wrap: wrap; }
.environment-badge { border: 1px solid #b8cdec; background:#eff6ff; color:#274c7a; border-radius:999px; padding:.28rem .6rem; white-space:nowrap; }
main { margin: auto; max-width: 1500px; padding: 1.9rem clamp(1.15rem, 3vw, 2.6rem) 3rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.35rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.025em; line-height: 1.17; }
h2 { font-size: 1.24rem; letter-spacing: -.015em; }
h3 { font-size: 1.04rem; }
.section-heading p, .muted, .card p, .sign-card p { color: var(--muted); line-height: 1.5; }
.section-heading p, .card p { margin-top: .35rem; }
label { font-weight: 650; font-size: .88rem; }
.scope-filter { display: grid; gap: .25rem; min-width: 180px; }
select, input, textarea { background: #fff; border: 1px solid #b9c7df; border-radius: .5rem; color: #172443; padding: .55rem .7rem; width: 100%; }
select { appearance: none; padding-right: 1.9rem; background-image: linear-gradient(45deg, transparent 50%, #344b76 50%), linear-gradient(135deg, #344b76 50%, transparent 50%); background-position: calc(100% - 16px) 54%, calc(100% - 11px) 54%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { min-height: 85px; resize: vertical; }
.primary, .secondary { border: 1px solid transparent; border-radius: .55rem; padding: .55rem .85rem; font-size: .88rem; font-weight: 650; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #1c3ab2; }
.secondary { background: white; color: #243b69; border-color: #c9d5ec; }
.secondary:hover { background: #eaf0fb; }
.primary:disabled { opacity: .58; cursor: not-allowed; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.15rem; }
.metric, .card, .table-card { border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; min-width:0; box-shadow:0 6px 19px #2037580a; }
.metric { padding: 1rem 1.1rem; min-height: 101px; }
.metric span { display: block; color: var(--muted); font-size: .9rem; font-weight: 600; }
.metric strong { display: block; margin-top: .32rem; font-size: clamp(1.22rem,2.25vw,1.85rem); color: #122b5a; overflow-wrap:anywhere; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(235px, .8fr); gap: 1rem; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.05rem; }
.card-header, .dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.card small { display: block; line-height: 1.5; margin-top: .4rem; font-size: .86rem; color: var(--muted); }
.card .actions { margin-top: .8rem; display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.card .actions label { display: grid; flex: 1 1 100%; }
.card .actions select { margin-top: .28rem; }
.chart-row { display:grid; grid-template-columns:minmax(105px,1fr) minmax(50px,2fr) 2rem; align-items:center; gap:.6rem; margin-top:.85rem; font-size:.88rem; }
.chart-row meter { width:100%; height:.77rem; accent-color:var(--blue); }
.chart-row meter::-webkit-meter-bar { border:0; border-radius:20px; background:#e5eefc; }
.chart-row meter::-webkit-meter-optimum-value { border-radius:20px; background:#0f62fe; }
.empty-panel { margin-bottom:.85rem; }
.agent-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem .75rem; margin-top:.8rem; font-size:.85rem; color:var(--muted); }
.card .agent-summary { margin:.65rem 0; }
.product-facts { display:grid; grid-template-columns:minmax(105px,.85fr) minmax(0,1.15fr); gap:.55rem .7rem; line-height:1.45; }
.product-facts dt { color:var(--muted); font-weight:650; }
.product-facts dd { margin:0; overflow-wrap:anywhere; }
.ci-card .card-header { flex-wrap:wrap; }
.ci-run { margin:.8rem 0 0; border:1px solid var(--line); border-radius:.7rem; padding:.55rem .7rem; }
.ci-run summary { cursor:pointer; font-size:.95rem; }
.ci-run summary .muted { display:block; margin:.25rem 0 0 1rem; font-size:.88rem; }
.ci-run .ci-source { display:block; overflow-wrap:anywhere; margin:.7rem 0; font-size:.9rem; }
.ci-steps { padding-left:1.7rem; line-height:1.6; overflow-wrap:anywhere; }
.search-results { display:grid; gap:.5rem; margin-top:.8rem; }
.search-results button { text-align:left; }
.table-card { overflow: hidden; min-width: 0; }
.table-card h2 { padding: 1rem 1.05rem; }
.table-card + .table-card, .stack { margin-top: 1rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .65rem .85rem; }
th { font-size: .84rem; color: #364b73; background: #e9eefb; }
td { font-size: .9rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td strong, td span { overflow-wrap: anywhere; }
.pill { display: inline-flex; font-size: .79rem; line-height: 1.25; font-weight: 650; padding: .28rem .55rem; border-radius: 99rem; white-space: nowrap; color: #2c4784; background: #eaf0ff; }
.pill.ok { color: #165437; background: #e1f5e9; }
.pill.warn { color: #71440a; background: #fff0ce; }
.pill.problem { color: #8c2541; background: #fce7ed; }
.empty { margin: 0; padding: 1rem 1.05rem; color: var(--muted); line-height: 1.6; }
td .secondary { min-height: 35px; padding: .35rem .58rem; }
.notice { padding: .72rem .9rem; margin: 0 0 1rem; border: 1px solid #9db4f4; border-radius: .58rem; background: #e9efff; color: #243d83; }
.notice.error, .error { color: #8c2541; }
.notice.error { border-color: #e2a8b9; background: #fceef2; }
.sign-in { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; background: radial-gradient(ellipse at 20% 15%,#dceaff,#f8fafc 68%); }
.sign-card { max-width: 460px; width: 100%; padding: 2.1rem; border-radius: 1.1rem; background: white; border: 1px solid var(--line); box-shadow:0 18px 46px #1d396318; }
.sign-logo { display: flex; align-items: center; gap: .65rem; font-weight: 750; letter-spacing: .05em; margin-bottom: 1.5rem; }
.sign-card h1 { font-size: 1.95rem; }
.sign-card p { margin-top: .55rem; }
#corporate-sign-in { display: inline-flex; margin-top: 1.15rem; text-decoration: none; }
.sign-card p.error { color: #8c2541; }
.sign-card form, .review-form { display: grid; gap: .65rem; margin-top: 1.15rem; }
dialog { border: 1px solid var(--line); border-radius: .9rem; color: #172443; background: #f5f7fd; width: min(660px, calc(100% - 1.6rem)); max-height: 90vh; padding: 1.1rem; }
dialog::backdrop { background: #111c36a8; }
.dialog-heading { margin-bottom: 1rem; }
.dialog-text { margin: .65rem 0; line-height: 1.6; }
.evidence { margin-top: .65rem; background: white; border: 1px solid var(--line); border-radius: .65rem; padding: .8rem; }
.evidence dl { margin: .45rem 0 0; display: grid; grid-template-columns: minmax(95px, 1fr) minmax(0, 1.6fr); gap: .3rem .65rem; }
.evidence dt { color: var(--muted); font-weight: 600; }
.evidence dd { margin: 0; overflow-wrap: anywhere; }
.review-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.spaced { margin-top: .85rem; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: .8rem 1rem .65rem; }
  .brand { margin: 0 0 .65rem; grid-template-columns: auto minmax(0,1fr); align-items:center; }
  .workspace-menu { display:block; width:fit-content; border:1px solid #738ab0; border-radius:.55rem; background:#1b2d4a; color:white; padding:.38rem .68rem; }
  .sidebar nav { display:none; }
  .workspace-menu[aria-expanded=true]+nav { display: flex; flex-wrap: wrap; gap: .15rem; margin-top:.35rem; }
  .sidebar nav button { width: auto; padding: .5rem .55rem; font-size: .86rem; gap: .35rem; }
  .sidebar-foot { display: none; }
  .section-heading { flex-wrap: wrap; align-items: start; }
  .scope-filter { min-width: 0; width: min(240px, 100%); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 400px) { .sign-card { padding: 1.3rem; } th, td { padding: .5rem; } .identity { gap:.4rem; } .identity button{padding:.45rem .55rem} }
@media (max-width: 560px) {
  .table-wrap table,.table-wrap tbody { display:block; }
  .table-wrap thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .table-wrap tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem .8rem; padding:.8rem 1rem; border-top:1px solid var(--line); }
  .table-wrap tbody td { display:block; padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
  .table-wrap tbody td:first-child { grid-column:1/-1; }
  .table-wrap tbody td::before { content:attr(data-label); display:block; margin-bottom:.15rem; color:var(--muted); font-size:.79rem; }
}
