:root {
  --ink: #17141d;
  --muted: #6f6978;
  --paper: #f8f7fb;
  --surface: #ffffff;
  --line: #e5e1ec;
  --green: #4400dd;
  --green-2: #eee9ff;
  --lime: #00a4ff;
  --amber: #eb0343;
  --amber-bg: #fff0f5;
  --red: #eb0343;
  --brand-purple: #4400dd;
  --brand-magenta: #c60de9;
  --brand-red: #eb0343;
  --brand-blue: #00a4ff;
  --brand-green: #41cb00;
  --shadow: 0 16px 50px rgba(68, 0, 221, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
.topbar { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 38px; color: #f7fbf8; background: #071712; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; font: 700 22px "Manrope", sans-serif; letter-spacing: -.04em; }
.brand-name strong { display: block; font: inherit; }
.brand-logo { width: 36px; height: 36px; flex: none; }
.case-switcher { text-align: center; }
.case-switcher .eyebrow { color: #8da098; }
.case-switcher strong { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #52625c; border-radius: 50%; font-size: 12px; }
.button { border: 0; border-radius: 10px; padding: 10px 15px; font-weight: 600; cursor: pointer; }
.button-quiet { border: 1px solid var(--line); background: transparent; }
.topbar .button-quiet { color: #f4f8f6; border-color: #3e5049; }
.button-primary { color: #fff; background: var(--green); padding: 13px 18px; }
.shell { width: min(1380px, calc(100% - 64px)); margin: 0 auto 80px; }
.hero { display: grid; grid-template-columns: 1fr 430px; gap: 40px; align-items: end; min-height: 226px; padding: 48px 0 30px; }
.breadcrumb, .hero-meta { color: var(--muted); font-size: 14px; }
.breadcrumb span { margin: 0 8px; color: #b4beb8; }
h1 { margin: 13px 0 8px; font: 600 clamp(34px, 4vw, 54px)/1.05 "Manrope", sans-serif; letter-spacing: -.055em; }
h2 { margin: 4px 0 0; font: 600 19px/1.25 "Manrope", sans-serif; letter-spacing: -.025em; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.decision-card { min-height: 136px; padding: 24px; color: #fff; background: var(--green); border-radius: 18px; box-shadow: var(--shadow); }
.decision-card .decision-top { display: flex; justify-content: space-between; align-items: center; }
.decision-card .eyebrow { color: #a7cec0; }
.decision-card h2 { margin-top: 12px; font-size: 29px; }
.decision-card p { margin: 8px 0 0; color: #c7ddd5; font-size: 13px; }
.confidence { padding: 5px 9px; color: var(--ink); background: var(--lime); border-radius: 999px; font-size: 11px; font-weight: 700; }
.skeleton { animation: pulse 1.2s infinite alternate; }
@keyframes pulse { from { opacity: .6 } to { opacity: 1 } }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid #d4dbd4; }
.tabs { overflow-x: auto; scrollbar-width: none; }.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 0 0 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 600; cursor: pointer; }
.tab { flex: 0 0 auto; }
.tab.active { color: var(--green); border-color: var(--green); }
.panel-section { display: none; padding-top: 24px; }
.panel-section.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.metric { padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.metric strong { display: block; margin-top: 13px; font: 600 25px "Manrope"; letter-spacing: -.04em; }
.metric small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 12px; }
.source-assurance { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(110px, .65fr)); gap: 1px; margin-bottom: 12px; overflow: hidden; color: #eaf6f1; background: #29483d; border: 1px solid #35574a; border-radius: 15px; box-shadow: var(--shadow); }
.assurance-lead, .assurance-stat { padding: 17px 19px; background: #0b2c21; }
.assurance-stat { background: #12372b; }
.assurance-lead strong, .assurance-stat strong { display: block; margin-top: 5px; font: 600 14px "Manrope"; }
.assurance-lead small, .assurance-stat small { display: block; margin-top: 4px; color: #a9c5bb; font-size: 10px; line-height: 1.35; }
.assurance-lead .eyebrow, .assurance-stat .eyebrow { color: #7fa99a; }
.assurance-warning { color: #fff0c8; }
.underwriting-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; margin-top: 12px; }
.overview-metric-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.metric-group { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.metric-group-title { padding: 12px 16px; color: #436056; background: #eff4f1; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.metric-group > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
.mini-metric { min-width: 0; padding: 15px 16px; border-top: 1px solid #edf0ec; }
.mini-metric:nth-child(odd) { border-right: 1px solid #edf0ec; }
.mini-metric span, .mini-metric small { display: block; color: var(--muted); font-size: 9px; }.mini-metric strong { display: block; margin: 7px 0 3px; font: 600 16px "Manrope"; }
.overview-subcategory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.compact-category-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.compact-category-columns > div { padding: 14px 18px 17px; background: #fff; }.compact-category-columns h3 { margin: 0 0 9px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.compact-category-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid #edf0ec; }.compact-category-row:first-of-type { border-top: 0; }
.compact-category-row strong, .compact-category-row small { display: block; }.compact-category-row strong { font-size: 10px; }.compact-category-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }.compact-category-row > b { text-align: right; font-size: 10px; white-space: nowrap; }
.decision-rationale, .action-list { padding: 0 22px 22px; }
.rationale-group { padding: 14px 0; border-top: 1px solid #edf0ec; }
.rationale-group:first-child { border-top: 0; }
.rationale-group h3 { margin: 0 0 8px; font: 600 12px "Manrope"; }
.rationale-group ul, .action-list ol { margin: 0; padding-left: 19px; }
.rationale-group li, .action-list li { margin: 7px 0; color: #52625c; font-size: 12px; line-height: 1.45; }
.rationale-group.positive h3 { color: var(--green); }.rationale-group.caution h3 { color: var(--amber); }
.action-list li::marker { color: var(--green); font-weight: 700; }
.insight-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.intelligence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wide-panel, .risk-panel { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 8px rgba(18, 40, 31, .025); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 21px 22px 17px; }
.count, .tag { padding: 5px 8px; color: var(--muted); background: #f0f3ef; border-radius: 6px; font-size: 10px; font-weight: 600; }
.stream { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 17px 22px; border-top: 1px solid #edf0ec; }
.stream-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stream-meta, .evidence-note { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.stream-value { text-align: right; font: 600 17px "Manrope"; }
.stream-value small { display: block; color: var(--muted); font: 400 10px "DM Sans"; }
.confidence-dot { width: 7px; height: 7px; border-radius: 50%; background: #21a875; box-shadow: 0 0 0 3px #d8f2e8; }
.confidence-dot.review { background: #e39922; box-shadow: 0 0 0 3px #fff0d4; }
.test-list { padding: 0 22px 12px; }
.test { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; padding: 13px 0; border-top: 1px solid #edf0ec; align-items: center; font-size: 13px; }
.test:first-child { border-top: 0; }
.test-icon { display: grid; place-items: center; width: 18px; height: 18px; color: #fff; background: var(--green); border-radius: 50%; font-size: 10px; }
.test-icon.fail { background: var(--amber); }
.test-value { color: var(--muted); font-size: 11px; text-align: right; }
.finding { margin: 0 20px 18px; padding: 14px; background: var(--amber-bg); border-left: 3px solid #d28a19; border-radius: 8px; }
.finding strong { display: block; font-size: 13px; }
.finding p { margin: 5px 0 0; color: #70552e; font-size: 12px; line-height: 1.5; }
.cashflow-chart { height: 240px; display: flex; align-items: flex-end; gap: 18px; padding: 18px 24px 24px; border-top: 1px solid #edf0ec; }
.cashflow-month { flex: 1; min-width: 44px; text-align: center; }
.cashflow-month .bars { height: 160px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.cashflow-month i { width: 14px; min-height: 2px; border-radius: 4px 4px 1px 1px; }
.bar-in { background: var(--green); }.bar-out { background: #b7c8c0; }
.cashflow-month strong { display: block; margin-top: 8px; font-size: 11px; }.cashflow-month small { color: var(--muted); font-size: 9px; }
.category-list { padding: 0 20px 16px; }
.category-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 11px 0 13px; border-top: 1px solid #edf0ec; }
.category-row:first-child { border-top: 0; }.category-row strong { display: block; font-size: 12px; }.category-row small { color: var(--muted); font-size: 9px; }
.category-number { text-align: right; }.category-bar { position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; overflow: hidden; background: #edf1ed; border-radius: 9px; }.category-bar i { display: block; height: 100%; background: #79b59d; border-radius: inherit; }
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 20px 20px; }
.risk-signal { border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; overflow: hidden; }
.risk-signal.triggered { border-color: #e8c487; background: #fffaf0; }.risk-signal.unassessed { color: var(--muted); background: #f5f6f3; }
.risk-signal summary { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; padding: 11px; list-style: none; cursor: pointer; font-size: 11px; font-weight: 600; }
.risk-signal summary::-webkit-details-marker { display: none; }.risk-signal p { margin: 0; padding: 0 12px 12px 39px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.risk-status { width: 18px; height: 18px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 9px; }.triggered .risk-status { background: var(--amber); }.unassessed .risk-status { background: #99a59f; }
.quick-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 0 20px 20px; gap: 8px; }.quick-stats div { padding: 16px; background: #f5f7f4; border-radius: 10px; }.quick-stats strong { display: block; font: 600 24px "Manrope"; }.quick-stats span { color: var(--muted); font-size: 10px; }
.category-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }.category-columns > div { padding: 18px; background: #fff; }.category-columns h3 { margin: 0 0 10px; font-size: 12px; }.category-columns .category-row { display: block; }.category-columns .category-number { text-align: left; margin-top: 3px; }
.evidence-tools { display: flex; justify-content: space-between; gap: 16px; padding: 0 20px 18px; }.evidence-tools input { margin: 0; max-width: 440px; }.filter-buttons { display: flex; gap: 5px; }.filter-buttons button { padding: 8px 11px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--muted); font-size: 11px; cursor: pointer; }.filter-buttons button.active { color: #fff; background: var(--green); border-color: var(--green); }
.category-pill { display: inline-block; padding: 4px 7px; background: #eef5f1; color: var(--green); border-radius: 6px; font-size: 10px; font-weight: 600; }.l2 { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.empty { padding: 5px 22px 22px; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); background: #f7f8f5; text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
th, td { padding: 13px 16px; border-top: 1px solid #edf0ec; white-space: nowrap; }
td:nth-child(2) { max-width: 310px; overflow: hidden; text-overflow: ellipsis; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.credit { color: var(--green); }.debit { color: #743e38; }
.memo-panel { padding: 26px 30px 42px; }
.memo-actions { display: flex; justify-content: space-between; align-items: center; }
.memo-body { max-width: 780px; margin: 18px auto 0; color: #2d3d37; line-height: 1.7; }
.memo-body h1 { font-size: 28px; }.memo-body h2 { margin-top: 28px; font-size: 18px; }.memo-body li { margin: 5px 0; }
.analyst-fab { position: fixed; right: 24px; bottom: 22px; z-index: 5; padding: 13px 17px; color: #fff; background: #071712; border: 0; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-weight: 600; cursor: pointer; }
.analyst-fab span { color: var(--lime); margin-right: 6px; }
.analyst-drawer { position: fixed; z-index: 10; top: 0; right: 0; width: min(440px, 100%); height: 100%; padding: 24px; background: #fff; box-shadow: -20px 0 60px rgba(5,24,17,.16); transform: translateX(105%); transition: transform .25s ease; }
.analyst-drawer.open { transform: translateX(0); }
.drawer-head, .dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 50%; font-size: 22px; cursor: pointer; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin: 28px 0 16px; }
.suggestions button { padding: 8px 10px; color: var(--green); border: 1px solid #cfe0d7; background: #f7fbf8; border-radius: 999px; font-size: 11px; cursor: pointer; }
.answer { min-height: 150px; padding: 18px; background: var(--paper); border-radius: 12px; color: #43534d; font-size: 13px; line-height: 1.65; }
dialog { width: min(600px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.upload-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(2, 18, 12, .62); backdrop-filter: blur(3px); }
dialog form { padding: 26px; }
.dialog-copy { color: var(--muted); font-size: 13px; }
label { display: block; margin: 16px 0; color: #43534d; font-size: 12px; font-weight: 600; }
input { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #ccd5cf; border-radius: 9px; color: var(--ink); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1.4fr .8fr .8fr; }
.file-drop { position: relative; display: grid; justify-items: center; gap: 7px; margin: 20px 0 12px; padding: 25px 18px 20px; border: 1.5px dashed #9db6aa; border-radius: 14px; background: linear-gradient(180deg, #fbfdfb, #f4f8f5); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.file-drop:hover, .file-drop.dragging { border-color: var(--green); background: #eff8f3; transform: translateY(-1px); }
.file-drop.selected { border-style: solid; border-color: #69a88e; background: #edf8f2; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--green); background: var(--green-2); border-radius: 12px; font-size: 20px; font-weight: 700; }
.file-drop strong { font: 600 15px "Manrope"; }.file-drop small { color: var(--muted); font-weight: 400; }
.format-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.format-row b { padding: 4px 7px; color: #567067; background: #fff; border: 1px solid #dce7e1; border-radius: 5px; font-size: 8px; letter-spacing: .08em; }
.processing-note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: #f3f6f3; border-radius: 10px; }
.processing-note > span { color: var(--green); font-size: 18px; }.processing-note strong, .processing-note small { display: block; }.processing-note strong { font-size: 11px; }.processing-note small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.password-panel { margin: 12px 0 18px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; }
.password-panel summary { color: #43534d; font-size: 11px; font-weight: 600; cursor: pointer; }.password-panel label { margin-bottom: 3px; }
.form-section-title { display: flex; justify-content: space-between; align-items: baseline; margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-section-title span { font: 600 13px "Manrope"; }.form-section-title small { color: var(--muted); font-size: 9px; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 5px; }.dialog-actions small { max-width: 390px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.upload-progress { min-height: 480px; padding: 58px 34px 35px; text-align: center; }
.progress-orbit { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 24px; border: 1px solid #bdd6cc; border-radius: 50%; animation: pulse 1s infinite alternate; }
.progress-orbit span { display: grid; place-items: center; width: 46px; height: 46px; color: #071712; background: var(--lime); border-radius: 14px; font: 700 20px "Manrope"; }
.upload-progress h3 { margin: 9px 0 5px; font: 600 23px "Manrope"; }.upload-progress p { margin: 0 auto; max-width: 480px; color: var(--muted); font-size: 12px; }
.progress-track { height: 8px; margin: 30px auto 8px; overflow: hidden; background: #e4eae6; border-radius: 20px; }.progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--green), #42a27d); border-radius: inherit; transition: width .35s ease; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.stage-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 32px 0 26px; padding: 0; list-style: none; text-align: left; }
.stage-list li { position: relative; padding: 29px 10px 11px; color: #8a9691; background: #f5f7f4; border-radius: 9px; font-size: 9px; line-height: 1.3; }
.stage-list li::before { content: ''; position: absolute; top: 11px; left: 11px; width: 8px; height: 8px; border: 2px solid #b7c3bd; border-radius: 50%; }
.stage-list li.active { color: var(--ink); background: #eaf5ef; }.stage-list li.active::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 3px #cce7da; }
.stage-list li.done { color: #456157; }.stage-list li.done::before { content: '✓'; display: grid; place-items: center; width: 12px; height: 12px; color: #fff; border: 0; background: var(--green); font-size: 8px; }
.upload-progress.error .progress-orbit { border-color: #e2b2ac; }.upload-progress.error .progress-orbit span { color: #fff; background: var(--red); }.upload-progress.error .progress-track i { background: var(--red); }
.form-error { min-height: 20px; color: var(--red); font-size: 12px; }
.review-controls { display:grid; grid-template-columns:minmax(180px,1fr) minmax(220px,2fr) auto auto; gap:10px; margin-top:14px; align-items:center; }
.review-controls select, .review-controls input { width:100%; margin:0; border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; color:var(--ink); }
.admin-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; padding: 6px 2px; }.admin-heading h2 { font-size: 27px; }.admin-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-bottom: 12px; }.admin-stats .metric { padding: 16px; }.admin-stats .metric strong { font-size: 21px; }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }.admin-grid .wide-panel { grid-column: 1 / -1; }
.admin-form { padding: 0 22px 22px; }.admin-form select { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #ccd5cf; border-radius: 9px; color: var(--ink); background: #fff; }
.provider-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 8px; }.provider-choice { display: flex; gap: 9px; align-items: flex-start; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }.provider-choice input { width: auto; margin: 2px 0 0; }.provider-choice strong, .provider-choice small { display: block; }.provider-choice strong { font-size: 10px; }.provider-choice small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.3; }
.admin-provider-list, .control-list { padding: 0 20px 18px; }.admin-provider { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid #edf0ec; }.admin-provider:first-child { border-top: 0; }.admin-provider strong, .admin-provider small { display: block; }.admin-provider strong { font-size: 11px; }.admin-provider small { color: var(--muted); font-size: 9px; }.admin-provider > b { color: var(--muted); font-size: 9px; }.provider-state { width: 8px; height: 8px; background: #d79735; border-radius: 50%; box-shadow: 0 0 0 3px #fff0d7; }.provider-state.ready { background: #2b9b70; box-shadow: 0 0 0 3px #d9f1e7; }
.control-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #edf0ec; }.control-row:first-child { border-top: 0; }.control-row strong, .control-row small { display: block; }.control-row strong { font-size: 11px; }.control-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }.control-row > b { color: var(--muted); font-size: 9px; }
.severity-pill { display: inline-block; padding: 4px 7px; border-radius: 6px; background: #eef2ef; font-size: 9px; text-transform: capitalize; }.severity-pill.warning { color: var(--amber); background: var(--amber-bg); }.severity-pill.critical { color: var(--red); background: #fae8e6; }
.compact-button { padding: 7px 9px; white-space: nowrap; font-size: 9px; }
.audit-list { padding: 0 20px 18px; }.audit-event { display: grid; grid-template-columns: 170px 1fr 180px; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0ec; font-size: 10px; }.audit-event:first-child { border-top: 0; }.audit-event span, .audit-event small { color: var(--muted); }
.form-error.success { color: var(--green); }
.files-heading { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:18px; padding:6px 2px; }
.files-heading h2 { font-size:27px; }.files-heading p { margin:7px 0 0; color:var(--muted); font-size:12px; }
.file-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin-bottom:12px; }.file-stats .metric { padding:16px; }.file-stats .metric strong { font-size:22px; }
.file-tools { display:grid; grid-template-columns:minmax(260px,1fr) 240px; gap:10px; padding:0 20px 18px; }.file-tools input,.file-tools select { width:100%; margin:0; padding:11px 12px; border:1px solid #ccd5cf; border-radius:9px; background:#fff; color:var(--ink); }
.file-table td strong,.file-table td small { display:block; }.file-table td small { margin-top:4px; color:var(--muted); font-size:9px; }.file-table td:nth-child(2) { max-width:260px; }
.status-pill { display:inline-block; padding:5px 8px; color:#55665f; background:#eef2ef; border-radius:7px; font-size:9px; font-weight:700; text-transform:capitalize; }.status-pill.completed { color:var(--green); background:var(--green-2); }.status-pill.failed,.status-pill.needs_review,.status-pill.needs_ocr,.status-pill.needs_password { color:var(--red); background:#fae8e6; }.status-pill.processing,.status-pill.received { color:var(--amber); background:var(--amber-bg); }
.file-result { text-transform:uppercase; }.file-result.approve { color:var(--green); }.file-result.refer,.file-result.insufficient_evidence { color:var(--amber); }.file-result.decline { color:var(--red); }
.admin-mode .hero, .admin-mode .analyst-fab { display: none; }.admin-mode .tabs { padding-top: 28px; }
@media (max-width: 900px) {
  .review-controls { grid-template-columns:1fr; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }.admin-grid { grid-template-columns: 1fr; }.admin-grid .wide-panel { grid-column: auto; }.provider-choices { grid-template-columns: 1fr 1fr; }.file-stats { grid-template-columns:repeat(2,1fr); }
  .topbar { grid-template-columns: 1fr auto; padding: 0 20px; }.case-switcher { display: none; }
  .shell { width: min(100% - 28px, 720px); }.hero { grid-template-columns: 1fr; gap: 22px; padding-top: 34px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.content-grid { grid-template-columns: 1fr; }
  .source-assurance { grid-template-columns: 1fr 1fr; }.assurance-lead { grid-column: 1 / -1; }.underwriting-grid, .overview-subcategory-grid { grid-template-columns: 1fr; }.overview-metric-groups { grid-template-columns: 1fr; }
  .insight-summary { grid-template-columns: 1fr 1fr; }.intelligence-grid { grid-template-columns: 1fr; }.wide-panel, .risk-panel { grid-column: auto; }.risk-grid { grid-template-columns: 1fr 1fr; }.category-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .topbar { height: 64px; }.topbar .button { font-size: 11px; padding: 8px 10px; }.avatar { display: none; }
  .tabs { gap: 20px; }.admin-mode .tabs { padding-top: 20px; }
  .shell { width: calc(100% - 20px); }.hero { padding: 28px 4px 22px; }.decision-card { min-height: 124px; }
  .metric-grid { gap: 8px; }.metric { padding: 16px; }.metric strong { font-size: 20px; }
  .content-grid, .stack { gap: 8px; }.panel-head, .stream { padding-left: 17px; padding-right: 17px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; gap: 0; }.analyst-fab { right: 14px; bottom: 14px; }
  .upload-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }.upload-dialog form { padding: 19px; }.dialog-actions { align-items: stretch; flex-direction: column; }.dialog-actions .button { width: 100%; }.form-section-title { display: block; }.form-section-title small { display: block; margin-top: 3px; }.stage-list { grid-template-columns: 1fr 1fr; }.upload-progress { padding: 42px 2px 24px; }
  .assurance-stat { padding: 14px; }
  .compact-category-columns { grid-template-columns: 1fr; }
  .admin-heading,.files-heading { align-items: flex-start; flex-direction: column; gap: 12px; }.admin-stats,.file-stats { grid-template-columns: 1fr 1fr; }.provider-choices { grid-template-columns: 1fr; }.audit-event { grid-template-columns: 1fr; gap: 3px; }.file-tools { grid-template-columns:1fr; padding-left:14px; padding-right:14px; }
  .risk-grid, .category-columns { grid-template-columns: 1fr; }.cashflow-chart { gap: 7px; padding-left: 10px; padding-right: 10px; }.evidence-tools { flex-direction: column; }.filter-buttons { overflow-x: auto; }
}

/* Underwriting workspace navigation and launch pad -------------------------- */
.app-frame { transition: grid-template-columns .22s ease; }
.sidebar { transition: width .22s ease, padding .22s ease; }
.sidebar-brand-row { gap: 8px; }
.sidebar-collapse { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; color: #9bb1a8; border: 1px solid #29483d; border-radius: 8px; background: #102b22; font-size: 20px; cursor: pointer; transition: transform .2s ease, color .15s, background .15s; }
.sidebar-collapse:hover { color: #fff; background: #17382d; }
body.nav-collapsed .app-frame { grid-template-columns: 78px minmax(0, 1fr); }
body.nav-collapsed .sidebar { padding-inline: 11px; }
body.nav-collapsed .sidebar-brand-row { justify-content: center; padding-inline: 0; }
body.nav-collapsed .brand-name, body.nav-collapsed .workspace-label, body.nav-collapsed .nav-group-label, body.nav-collapsed .sidebar .tab > span:not(.nav-icon), body.nav-collapsed .sidebar-footer-copy { display: none; }
body.nav-collapsed .sidebar-collapse { position: absolute; top: 63px; transform: rotate(180deg); }
body.nav-collapsed .sidebar .tabs { padding-top: 48px; overflow: visible; }
body.nav-collapsed .sidebar .tab { grid-template-columns: 1fr; justify-items: center; padding: 7px; }
body.nav-collapsed .sidebar .tab b { position: absolute; right: 2px; top: 1px; min-width: 17px; padding: 2px 4px; color: #082117; background: var(--lime); }
body.nav-collapsed .nav-icon { width: 30px; height: 30px; }
body.nav-collapsed .sidebar-footer { grid-template-columns: 1fr; justify-items: center; padding: 12px 8px; }

body.view-dashboard .hero, body.view-files .hero, body.view-review:not(.case-mode) .hero, body.view-admin .hero { display: none; }
body.view-dashboard .analyst-fab, body.view-files .analyst-fab, body.view-admin .analyst-fab { display: none; }
.dashboard-section { padding-top: 32px; }
.launchpad-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, .72fr); gap: 12px; margin-bottom: 28px; }
.launchpad-copy { min-height: 390px; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 68px); color: #fff; background: radial-gradient(circle at 85% 5%, rgba(223,243,108,.18), transparent 32%), linear-gradient(135deg, #071712 0%, #103a2c 100%); border: 1px solid #234b3e; border-radius: 22px; box-shadow: 0 22px 60px rgba(7,23,18,.13); }
.launchpad-copy .eyebrow { color: #9dc2b4; }
.launchpad-copy h1 { max-width: 760px; margin: 18px 0 16px; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.02; }
.launchpad-copy p { max-width: 760px; margin: 0; color: #bdd0c9; font-size: 14px; line-height: 1.7; }
.launchpad-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.button-light { color: #0b3326; background: #fff; border: 1px solid #dce7e1; }
.launchpad-copy .button-primary { color: #071712; background: var(--lime); }
.launchpad-copy .button-light { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.launchpad-actions .button span { min-width: 20px; display: inline-block; margin-left: 6px; padding: 2px 6px; color: #102d23; background: var(--lime); border-radius: 999px; font-size: 9px; }
.launchpad-guide { padding: 28px; color: #dbe8e3; background: #0c251d; border: 1px solid #23453a; border-radius: 22px; }
.launchpad-guide .eyebrow { color: #75998c; }
.launchpad-guide ol { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.launchpad-guide li { display: grid; grid-template-columns: 31px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid #1c3d32; }
.launchpad-guide li:first-child { border-top: 0; }
.launchpad-guide li > b { width: 28px; height: 28px; display: grid; place-items: center; color: #0a2c20; background: var(--lime); border-radius: 9px; font-size: 10px; }
.launchpad-guide strong, .launchpad-guide small { display: block; }
.launchpad-guide strong { font: 600 12px "Manrope"; }
.launchpad-guide small { margin-top: 4px; color: #8ba79d; font-size: 10px; line-height: 1.45; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 2px 12px; }
.dashboard-heading h2 { font-size: 25px; }
.text-button { padding: 6px; color: var(--green); border: 0; background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.usage-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-bottom: 12px; }
.usage-card { min-width: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.usage-card > span, .usage-card small { display: block; color: var(--muted); font-size: 9px; }
.usage-card strong { display: block; margin: 10px 0 4px; font: 600 25px "Manrope"; letter-spacing: -.04em; }
.usage-card.attention strong { color: var(--amber); }
.usage-spark { height: 4px; margin-top: 13px; overflow: hidden; background: #edf1ee; border-radius: 99px; }
.usage-spark i { display: block; height: 100%; background: #75af96; border-radius: inherit; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 12px; }
.recent-panel .panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.recent-tools { display: grid; grid-template-columns: 1fr 180px; gap: 8px; padding: 0 20px 14px; }
.recent-tools input, .recent-tools select { width: 100%; margin: 0; padding: 10px 11px; color: var(--ink); background: #f9faf8; border: 1px solid var(--line); border-radius: 9px; }
.recent-file-list { padding: 0 20px 18px; }
.recent-file { display: grid; grid-template-columns: 38px minmax(0, 1.35fr) minmax(120px, .7fr) minmax(105px, .55fr) auto auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid #edf0ec; }
.recent-file:first-child { border-top: 0; }
.file-type-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #245b47; background: #e7f2ec; border-radius: 10px; font-size: 9px; font-weight: 800; }
.recent-file strong, .recent-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-file strong { font-size: 11px; }.recent-file small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dashboard-side-stack { display: grid; gap: 12px; align-content: start; }
.queue-entry-card { min-height: 258px; display: flex; flex-direction: column; justify-content: space-between; padding: 26px; color: #fff; background: #164b39; border-radius: 17px; }
.queue-entry-card .eyebrow { color: #9dc8b8; }
.queue-entry-card > div > strong { display: block; margin: 16px 0 3px; color: var(--lime); font: 600 44px "Manrope"; }
.queue-entry-card h2 { font-size: 21px; }.queue-entry-card p { color: #b8d1c7; font-size: 11px; line-height: 1.55; }
.queue-entry-card .button { width: 100%; }
.agent-principles ul { display: grid; gap: 9px; margin: 0; padding: 0 22px 22px; list-style: none; }
.agent-principles li { position: relative; padding-left: 20px; color: #4b5d56; font-size: 11px; line-height: 1.5; }
.agent-principles li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.files-heading-actions { display: flex; gap: 8px; }
.file-tools { grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(145px, .6fr)) auto; align-items: end; padding-top: 2px; }
.file-tools label { margin: 0; color: var(--muted); font-size: 9px; }
.file-tools label > span { display: block; margin: 0 0 6px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.file-tools input, .file-tools select { min-height: 42px; }
.file-register-summary { display: flex; gap: 9px; align-items: center; padding: 0 20px 14px; color: var(--muted); font-size: 9px; }
.file-register-summary strong { color: var(--ink); font-size: 11px; }
.file-table-wrap { max-height: min(660px, calc(100vh - 300px)); overflow: auto; border-top: 1px solid var(--line); }
.file-table thead { position: sticky; top: 0; z-index: 2; }
.file-table tbody tr { transition: background .15s; }
.file-table tbody tr:hover { background: #fbfcfa; }
.file-table td { vertical-align: middle; }
.file-table td:first-child { min-width: 220px; }
.file-table td:nth-child(2) { width: 125px; max-width: none; }
.file-table td:nth-child(3) { min-width: 145px; }
.file-table td:nth-child(5) { min-width: 185px; }
.file-table .empty-state-cell { white-space: normal; }
.file-empty-state { display: grid; justify-items: center; padding: 55px 24px; text-align: center; }
.file-empty-state b { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green); background: var(--green-2); border-radius: 13px; font-size: 18px; }
.file-empty-state strong { margin-top: 14px; font: 600 15px "Manrope"; }
.file-empty-state p { max-width: 430px; margin: 7px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.55; }

/* Case workspace navigation -------------------------------------------------- */
.case-tabs { display: none; position: sticky; top: 68px; z-index: 10; margin: 0 0 4px; padding: 0 4px; overflow-x: auto; background: rgba(244,245,240,.96); border-bottom: 1px solid #d5ddd7; backdrop-filter: blur(14px); scrollbar-width: none; }
.case-tabs::-webkit-scrollbar { display: none; }
body.case-mode .case-tabs { display: flex; }
.case-tab { min-width: 150px; flex: 1 0 auto; display: grid; gap: 3px; padding: 15px 18px 13px; color: #65736d; background: transparent; border: 0; border-bottom: 3px solid transparent; text-align: left; cursor: pointer; }
.case-tab span { font: 600 12px "Manrope"; }.case-tab small { color: #8a9690; font-size: 9px; }
.case-tab:hover { color: var(--green); background: rgba(255,255,255,.55); }
.case-tab.active { color: var(--green); background: #fff; border-bottom-color: var(--green); }
.case-tab.active small { color: #56796c; }
.case-tab b { display: inline-grid; min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; place-items: center; color: #fff; background: #b47618; border-radius: 999px; font: 700 9px "DM Sans"; }
.review-case-tab.active { color: #7e4c05; border-bottom-color: #c17d1c; }
.review-controls { align-items: end; }
.review-controls label { margin: 0; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.review-controls label > span { display: block; margin-bottom: 6px; }
.review-editor-head { grid-column: 1 / -1; padding-bottom: 4px; }
.review-editor-head strong, .review-editor-head small { display: block; }.review-editor-head strong { font: 600 11px "Manrope"; }.review-editor-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }

@media (max-width: 1180px) {
  .launchpad-hero { grid-template-columns: 1fr .72fr; }
  .usage-grid { grid-template-columns: repeat(3, 1fr); }
  .file-tools { grid-template-columns: 1fr 1fr 1fr; }
  .file-tools .search-field { grid-column: span 2; }
}
@media (max-width: 900px) {
  .sidebar-collapse { display: none; }
  body.nav-collapsed .app-frame { display: block; }
  body.nav-collapsed .sidebar { padding: 24px 16px 18px; }
  body.nav-collapsed .brand-name, body.nav-collapsed .sidebar .tab > span:not(.nav-icon) { display: inline; }
  body.nav-collapsed .workspace-label, body.nav-collapsed .nav-group-label, body.nav-collapsed .sidebar-footer-copy { display: block; }
  body.nav-collapsed .sidebar .tabs { padding-top: 0; overflow-y: auto; }
  body.nav-collapsed .sidebar .tab { grid-template-columns: 28px 1fr auto; justify-items: initial; padding: 8px 11px; }
  body.nav-collapsed .sidebar .tab b { position: static; min-width: 22px; padding: 3px 6px; color: #c9ddd4; background: #29483d; }
  body.nav-collapsed .sidebar-footer { grid-template-columns: 9px 1fr; justify-items: initial; padding: 14px; }
  .launchpad-hero, .dashboard-grid { grid-template-columns: 1fr; }
  .launchpad-copy { min-height: 340px; }
  .launchpad-guide ol { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .file-tools { grid-template-columns: 1fr 1fr; }
  .file-tools .search-field { grid-column: 1 / -1; }
  .recent-file { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .recent-file .recent-bank, .recent-file .recent-date { display: none; }
}
@media (max-width: 540px) {
  .dashboard-section { padding-top: 14px; }
  .launchpad-copy, .launchpad-guide { padding: 24px 20px; border-radius: 17px; }
  .launchpad-copy h1 { font-size: 35px; }
  .launchpad-actions, .files-heading-actions { width: 100%; flex-direction: column; }
  .launchpad-actions .button, .files-heading-actions .button { width: 100%; }
  .launchpad-guide ol { grid-template-columns: 1fr; }
  .usage-grid { grid-template-columns: 1fr 1fr; }
  .usage-card { padding: 15px; }.usage-card strong { font-size: 21px; }
  .dashboard-heading { align-items: flex-start; gap: 8px; flex-direction: column; }
  .recent-tools { grid-template-columns: 1fr; padding-inline: 14px; }
  .recent-file-list { padding-inline: 14px; }
  .recent-file { grid-template-columns: 34px minmax(0, 1fr); }
  .recent-file > .status-pill, .recent-file > button { grid-column: 2; justify-self: start; }
  .file-tools { grid-template-columns: 1fr; }
  .file-tools .search-field { grid-column: auto; }
  .file-register-summary { align-items: flex-start; flex-direction: column; }
  .file-table-wrap { max-height: none; overflow: visible; border-top: 0; }
  .file-table thead { display: none; }
  .file-table, .file-table tbody, .file-table tr, .file-table td { display: block; width: 100%; }
  .file-table tbody { display: grid; gap: 10px; padding: 0 12px 14px; }
  .file-table tr { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
  .file-table td { min-width: 0 !important; padding: 7px 0; border: 0; white-space: normal; }
  .file-table td::before { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .file-table td:nth-child(1)::before { content: 'Applicant / file'; }.file-table td:nth-child(2)::before { content: 'Uploaded'; }.file-table td:nth-child(3)::before { content: 'Bank / source'; }.file-table td:nth-child(4)::before { content: 'Processing'; }.file-table td:nth-child(5)::before { content: 'Extraction quality'; }.file-table td:nth-child(6)::before { content: 'Recommendation'; }
  .file-table td:last-child .button { width: 100%; }
}

@media (min-width: 701px) and (max-width: 900px) {
  .app-frame, body.nav-collapsed .app-frame { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
  .sidebar, body.nav-collapsed .sidebar { position: sticky; top: 0; width: auto; height: 100vh; padding: 24px 16px 18px; transform: none; box-shadow: none; }
  .sidebar-collapse { display: grid; }.sidebar-close, .menu-button, .sidebar-scrim { display: none !important; }
  body.nav-collapsed .app-frame { grid-template-columns: 78px minmax(0, 1fr); }
  body.nav-collapsed .sidebar { padding-inline: 11px; }
  body.nav-collapsed .brand-name, body.nav-collapsed .workspace-label, body.nav-collapsed .nav-group-label, body.nav-collapsed .sidebar .tab > span:not(.nav-icon), body.nav-collapsed .sidebar-footer-copy { display: none; }
  body.nav-collapsed .sidebar .tabs { padding-top: 48px; overflow: visible; }
  body.nav-collapsed .sidebar .tab { grid-template-columns: 1fr; justify-items: center; padding: 7px; }
  body.nav-collapsed .sidebar .tab b { position: absolute; right: 2px; top: 1px; }
  body.nav-collapsed .sidebar-footer { grid-template-columns: 1fr; justify-items: center; padding: 12px 8px; }
}

@media (max-width: 700px) {
  .case-tabs { top: 62px; margin-inline: -2px; }
  .case-tab { min-width: 132px; padding: 12px 14px 10px; }
  .case-tab small { display: none; }
}

/* Enterprise application shell ------------------------------------------------ */
.app-frame { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.app-workspace { min-width: 0; }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 18px; color: #eaf2ee; background: #071712; border-right: 1px solid #18352b; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 22px; }
.sidebar-close, .menu-button { display: none; border: 0; background: transparent; cursor: pointer; }
.workspace-label { margin: 0 5px 20px; padding: 15px 14px; background: #102b22; border: 1px solid #1d4034; border-radius: 12px; }
.workspace-label .eyebrow { color: #7f9c91; }
.workspace-label strong, .workspace-label small { display: block; }
.workspace-label strong { margin-top: 7px; font: 600 13px "Manrope"; }
.workspace-label small { margin-top: 3px; color: #8fa79e; font-size: 10px; }
.sidebar .tabs { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; border: 0; }
.admin-mode .sidebar .tabs { padding-top: 0; }
.nav-group-label { margin: 16px 12px 7px; color: #688379; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar .tab { width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 8px 11px; color: #a9bbb4; border: 1px solid transparent; border-radius: 9px; text-align: left; font-size: 12px; }
.sidebar .tab:hover { color: #eef7f2; background: #102a21; }
.sidebar .tab.active { color: #fff; background: #17382d; border-color: #244b3e; }
.sidebar .tab.active::before { content: ''; position: absolute; left: 0; width: 3px; height: 24px; background: var(--lime); border-radius: 0 3px 3px 0; }
.sidebar .tab { position: relative; }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; color: #85a398; background: #102b22; border-radius: 7px; font-size: 13px; }
.sidebar .tab.active .nav-icon { color: #0a241a; background: var(--lime); }
.sidebar .tab b { min-width: 22px; padding: 3px 6px; color: #c9ddd4; background: #29483d; border-radius: 999px; font-size: 9px; text-align: center; }
.sidebar-footer { display: grid; grid-template-columns: 9px 1fr; gap: 10px; align-items: center; margin-top: 16px; padding: 14px; color: #dce9e3; background: #0e271f; border-radius: 11px; }
.sidebar-footer strong, .sidebar-footer small { display: block; }.sidebar-footer strong { font-size: 10px; }.sidebar-footer small { margin-top: 3px; color: #819b91; font-size: 9px; }
.system-dot { width: 8px; height: 8px; background: #d9952a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(217,149,42,.13); }
.sidebar-scrim { display: none; }
.topbar { position: sticky; top: 0; z-index: 12; height: 68px; display: flex; justify-content: space-between; padding: 0 30px; color: var(--ink); background: rgba(249,250,246,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar .case-switcher { text-align: left; }.topbar .case-switcher .eyebrow { color: #8b9791; }.topbar .case-switcher strong { font-weight: 700; }
.topbar .button-primary { padding: 10px 15px; }
.topbar .avatar { border-color: #cbd5cf; }
.signed-in-user { display: flex; align-items: center; gap: 9px; padding-left: 4px; }
.signed-in-copy strong, .signed-in-copy small { display: block; }
.signed-in-copy strong { max-width: 150px; overflow: hidden; font: 600 10px "Manrope"; text-overflow: ellipsis; white-space: nowrap; }
.signed-in-copy small { margin-top: 2px; color: #819087; font-size: 8px; }
.sign-out-button { width: 28px; height: 28px; display: grid; place-items: center; color: #607068; background: transparent; border: 1px solid #d5ddd7; border-radius: 8px; cursor: pointer; transform: rotate(45deg); }
.sign-out-button:hover { color: #163b2d; background: #edf3ee; }
.shell { width: min(1450px, calc(100% - 56px)); margin: 0 auto 80px; }
.hero { min-height: 205px; padding-top: 38px; }
.panel-section { padding-top: 28px; }
.admin-mode .hero { display: none; }
.admin-mode .panel-section { padding-top: 34px; }

/* Administration and model-risk evidence ------------------------------------ */
.readiness-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-bottom: 12px; padding: 18px 20px; color: #fff; background: #17382d; border: 1px solid #285343; border-radius: 15px; }
.readiness-banner.blocked { color: #5a3d12; background: #fff2dc; border-color: #e9c98e; }
.readiness-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #092217; background: var(--lime); border-radius: 11px; font-weight: 800; }
.readiness-banner.blocked .readiness-mark { color: #fff; background: #bd7920; }
.readiness-banner strong, .readiness-banner small { display: block; }.readiness-banner strong { font: 600 15px "Manrope"; }.readiness-banner small { margin-top: 4px; color: #b9d0c7; font-size: 10px; }.readiness-banner.blocked small { color: #806438; }
.readiness-score { text-align: right; font: 600 24px "Manrope"; }.readiness-score small { font: 500 9px "DM Sans"; text-transform: uppercase; letter-spacing: .08em; }
.quality-panel { overflow: visible; }
.quality-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quality-metric { padding: 17px 18px; background: #fff; }.quality-metric span, .quality-metric small { display: block; color: var(--muted); font-size: 9px; }.quality-metric strong { display: block; margin: 7px 0 4px; font: 600 21px "Manrope"; }.quality-metric.danger strong { color: var(--red); }.quality-metric.good strong { color: var(--green); }
.quality-body { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; padding: 20px 22px 23px; }.quality-body h3 { margin: 0 0 12px; font: 600 12px "Manrope"; }
.quality-slice { display: grid; grid-template-columns: 90px 1fr 50px; gap: 10px; align-items: center; margin: 9px 0; font-size: 10px; }.quality-track { height: 7px; overflow: hidden; background: #edf1ee; border-radius: 20px; }.quality-track i { display: block; height: 100%; background: #86af9e; border-radius: inherit; }.quality-slice.danger .quality-track i { background: #d28a67; }
.blocker-list { display: grid; gap: 7px; }.blocker { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 10px; color: #73572d; background: #fff7e9; border-radius: 8px; font-size: 10px; line-height: 1.4; }.blocker b { display: grid; place-items: center; width: 18px; height: 18px; color: #fff; background: #c58221; border-radius: 50%; font-size: 9px; }
.learning-pipeline { padding: 0 20px 20px; }.learning-step { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid #edf0ec; }.learning-step:first-child { border-top: 0; }.learning-step > b { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); background: #e6f2ec; border-radius: 8px; font-size: 10px; }.learning-step strong, .learning-step small { display: block; }.learning-step strong { font-size: 11px; }.learning-step small { margin-top: 3px; color: var(--muted); font-size: 9px; }.learning-step > span { font: 600 15px "Manrope"; }

@media (max-width: 1180px) {
  .app-frame { grid-template-columns: 230px minmax(0, 1fr); }
  .shell { width: calc(100% - 36px); }
  .quality-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app-frame { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(286px, 86vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.22); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-close, .menu-button { display: grid; place-items: center; }
  .sidebar-close { width: 32px; height: 32px; color: #d7e5de; font-size: 22px; }
  .menu-button { width: 34px; height: 34px; margin-right: 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 19; background: rgba(1,14,9,.5); }
  body.nav-open .sidebar-scrim { display: block; }
  .topbar { padding: 0 16px; }.topbar .case-switcher { display: block; flex: 1; }.topbar .case-switcher .eyebrow { display: none; }
  .quality-body { grid-template-columns: 1fr; }.quality-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .topbar { height: 62px; }.topbar .case-switcher strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .button-primary { padding: 9px 10px; font-size: 10px; }
  .signed-in-copy, .sign-out-button { display: none; }
  .shell { width: calc(100% - 20px); }
  .readiness-banner { grid-template-columns: auto 1fr; }.readiness-score { grid-column: 1 / -1; text-align: left; }
  .quality-metrics { grid-template-columns: 1fr 1fr; }.quality-body { padding: 17px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* Persistent workspace rail on desktop and tablet --------------------------- */
@media (min-width: 601px) and (max-width: 900px) {
  .app-frame, body.nav-collapsed .app-frame { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
  .sidebar, body.nav-collapsed .sidebar { position: sticky; inset: auto; top: 0; width: auto; height: 100vh; padding: 24px 16px 18px; transform: none; box-shadow: none; }
  .sidebar-collapse { display: grid; }
  .sidebar-close, .menu-button, .sidebar-scrim { display: none !important; }
  body.nav-collapsed .app-frame { grid-template-columns: 78px minmax(0, 1fr); }
  body.nav-collapsed .sidebar { padding-inline: 11px; }
  body.nav-collapsed .sidebar-brand-row { justify-content: center; padding-inline: 0; }
  body.nav-collapsed .brand-name, body.nav-collapsed .workspace-label, body.nav-collapsed .nav-group-label, body.nav-collapsed .sidebar .tab > span:not(.nav-icon), body.nav-collapsed .sidebar-footer-copy { display: none; }
  body.nav-collapsed .sidebar-collapse { position: absolute; top: 63px; transform: rotate(180deg); }
  body.nav-collapsed .sidebar .tabs { padding-top: 48px; overflow: visible; }
  body.nav-collapsed .sidebar .tab { grid-template-columns: 1fr; justify-items: center; padding: 7px; }
  body.nav-collapsed .sidebar .tab b { position: absolute; right: 2px; top: 1px; min-width: 17px; padding: 2px 4px; }
  body.nav-collapsed .nav-icon { width: 30px; height: 30px; }
  body.nav-collapsed .sidebar-footer { grid-template-columns: 1fr; justify-items: center; padding: 12px 8px; }
}

@media (max-width: 600px) {
  .app-frame, body.nav-collapsed .app-frame { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar, body.nav-collapsed .sidebar { position: sticky; inset: auto; top: 0; width: auto; height: 100vh; padding: 16px 7px 12px; transform: none; box-shadow: none; }
  .sidebar-brand-row, body.nav-collapsed .sidebar-brand-row { justify-content: center; padding: 0 0 22px; }
  .brand-name, .workspace-label, .nav-group-label, .sidebar .tab > span:not(.nav-icon), .sidebar-footer-copy, .sidebar-collapse, .sidebar-close, .menu-button, .sidebar-scrim { display: none !important; }
  .brand-logo { width: 36px; height: 36px; }
  .sidebar .tabs, body.nav-collapsed .sidebar .tabs { padding-top: 0; gap: 8px; overflow: visible; }
  .sidebar .tab, body.nav-collapsed .sidebar .tab { min-height: 42px; grid-template-columns: 1fr; justify-items: center; padding: 5px; }
  .sidebar .tab b, body.nav-collapsed .sidebar .tab b { position: absolute; right: -1px; top: -3px; min-width: 17px; padding: 2px 4px; color: #082117; background: var(--lime); }
  .nav-icon, body.nav-collapsed .nav-icon { width: 32px; height: 32px; }
  .sidebar-footer, body.nav-collapsed .sidebar-footer { grid-template-columns: 1fr; justify-items: center; margin-top: auto; padding: 13px 8px; }
  .topbar { padding-inline: 12px; }
  .shell { width: calc(100% - 16px); }
}

/* Spense colour system and Microsoft profile ------------------------------- */
.sidebar { color: #f6f3ff; background: #160047; border-right-color: #2e0870; }
.sidebar-collapse { color: #c9bdec; background: #260267; border-color: #4816a4; }
.sidebar-collapse:hover { background: #4400dd; }
.nav-group-label { color: #9e8dc8; }
.sidebar .tab { color: #c7bde0; }
.sidebar .tab:hover { color: #fff; background: #28036b; }
.sidebar .tab.active { color: #fff; background: linear-gradient(100deg, rgba(68,0,221,.9), rgba(198,13,233,.45)); border-color: #7135ed; }
.sidebar .tab.active::before { background: var(--brand-blue); }
.nav-icon { color: #c1b1e7; background: #290369; }
.sidebar .tab.active .nav-icon { color: #fff; background: rgba(0,164,255,.24); }
.sidebar .tab b { color: #fff; background: #51218e; }
.sidebar-footer { color: #fff; background: #26035d; }
.sidebar-footer small { color: #aa9acb; }
.system-dot { background: var(--brand-green); box-shadow: 0 0 0 4px rgba(65,203,0,.16); }
.topbar { background: rgba(255,255,255,.94); }
.topbar .case-switcher .eyebrow { color: #827992; }
.button-primary { background: var(--brand-purple); }
.button-primary:hover { background: #3500ae; }
.decision-card { background: linear-gradient(135deg, var(--brand-purple), #6b13ea 62%, var(--brand-magenta)); }
.decision-card .eyebrow, .decision-card p { color: #e4ddff; }
.confidence { color: #161020; background: #fff; }
.source-assurance { background: #3a078e; border-color: #6734c5; }
.assurance-lead { background: #240064; }.assurance-stat { background: #31077d; }
.assurance-lead small,.assurance-stat small { color: #cdc0eb; }.assurance-lead .eyebrow,.assurance-stat .eyebrow { color: #9fddff; }
.launchpad-copy { background: radial-gradient(circle at 84% 3%, rgba(0,164,255,.24), transparent 34%), linear-gradient(135deg, #260065 0%, #4400dd 58%, #7209c7 100%); border-color: #7135ed; box-shadow: 0 22px 60px rgba(68,0,221,.16); }
.launchpad-copy .eyebrow { color: #bfeaff; }.launchpad-copy p { color: #e2dcf4; }
.launchpad-copy .button-primary { color: #fff; background: var(--brand-magenta); }
.launchpad-copy .button-primary:hover { background: #a90bc6; }
.launchpad-actions .button span { color: #fff; background: var(--brand-blue); }
.launchpad-guide { color: #fff; background: #21005b; border-color: #52249c; }
.launchpad-guide .eyebrow { color: #a9dcff; }.launchpad-guide li { border-top-color: #40217a; }
.launchpad-guide li > b { color: #fff; background: var(--brand-blue); }.launchpad-guide small { color: #b9acd3; }
.queue-entry-card { background: linear-gradient(145deg, #8d09cc, var(--brand-magenta)); }
.queue-entry-card .eyebrow,.queue-entry-card p { color: #f5dfff; }.queue-entry-card > div > strong { color: #fff; }
.usage-spark i,.quality-track i,.category-bar i,.progress-track i { background: linear-gradient(90deg, var(--brand-purple), var(--brand-blue)); }
.bar-in { background: var(--brand-purple); }.bar-out { background: var(--brand-blue); }
.confidence-dot { background: var(--brand-green); box-shadow: 0 0 0 3px rgba(65,203,0,.15); }
.confidence-dot.review,.test-icon.fail,.triggered .risk-status { background: var(--brand-red); box-shadow: 0 0 0 3px rgba(235,3,67,.12); }
.test-icon,.risk-status { background: var(--brand-green); }
.category-pill { color: var(--brand-purple); background: #f0ebff; }
.file-type-icon { color: var(--brand-purple); background: #eee9ff; }
.readiness-banner { background: linear-gradient(120deg, #300087, var(--brand-purple)); border-color: #6b32dc; }
.readiness-mark { color: #fff; background: var(--brand-blue); }
.analyst-fab { background: linear-gradient(110deg, var(--brand-purple), var(--brand-magenta)); }
.analyst-fab span { color: #fff; }
.case-tab.active { color: var(--brand-purple); border-bottom-color: var(--brand-purple); }
.case-tab.active small { color: #775fb2; }
.profile-shell { position: relative; }
.profile-trigger { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 14px; cursor: pointer; }
.profile-trigger:hover,.profile-trigger[aria-expanded="true"] { background: #f4f1fa; border-color: var(--line); }
.profile-photo-frame { width: 38px; height: 38px; position: relative; display: grid; flex: none; place-items: center; overflow: hidden; border-radius: 12px; background: #eee9ff; }
.profile-photo-frame.large { width: 48px; height: 48px; border-radius: 14px; }
.profile-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-frame .avatar { width: 100%; height: 100%; display: grid; color: #fff; background: linear-gradient(135deg, var(--brand-purple), var(--brand-magenta)); border: 0; border-radius: inherit; font-weight: 700; }
.profile-chevron { color: #7b7188; font-size: 14px; transition: transform .16s; }.profile-trigger[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }
.profile-menu { width: 310px; position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 22px 65px rgba(40,13,84,.2); }
.profile-menu-head { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 18px; background: linear-gradient(135deg,#faf8ff,#f1edff); border-bottom: 1px solid var(--line); }
.profile-menu-head strong,.profile-menu-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.profile-menu-head strong { font: 600 12px "Manrope"; }.profile-menu-head small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.profile-access { padding: 14px 18px; border-bottom: 1px solid var(--line); }.profile-access>span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.profile-access>div { display: flex; flex-wrap: wrap; gap: 5px; }.profile-access>div span { padding: 5px 7px; color: var(--brand-purple); background: #eee9ff; border-radius: 6px; font-size: 8px; font-weight: 700; text-transform: capitalize; }
.profile-menu form { margin: 0; }
.profile-action { width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 12px 18px; color: var(--ink); background: #fff; border: 0; text-align: left; cursor: pointer; }.profile-action:hover { background: #faf8fd; }.profile-action>span { width: 26px; height: 26px; display: grid; place-items: center; color: var(--brand-purple); background: #f0ebff; border-radius: 8px; }.profile-action strong,.profile-action small { display: block; }.profile-action strong { font-size: 10px; }.profile-action small { margin-top: 3px; color: var(--muted); font-size: 8px; }.logout-action { border-top: 1px solid var(--line); }.logout-action>span,.logout-action strong { color: var(--brand-red); }.logout-action>span { background: #fff0f5; }

@media (max-width: 540px) {
  .profile-trigger { padding: 3px; }.profile-chevron { display: none; }
  .profile-photo-frame { width: 36px; height: 36px; }
  .profile-photo-frame .avatar { display: grid; }
  .profile-menu { position: fixed; top: 68px; right: 10px; width: min(310px,calc(100vw - 84px)); }
}

/* Calm application surfaces: brand colours are accents, not backgrounds. */
.sidebar { background:#17131f; border-right-color:#2d2835; }
.sidebar-collapse { color:#aaa1b4; background:#211c29; border-color:#393140; }
.sidebar-collapse:hover { background:#30283a; }
.nav-group-label { color:#807689; }
.sidebar .tab { color:#b7afbf; }
.sidebar .tab:hover { color:#fff; background:#24202b; }
.sidebar .tab.active { color:#fff; background:#2b2534; border-color:#403849; }
.sidebar .tab.active::before { background:var(--brand-purple); }
.nav-icon { color:#a9a0b3; background:#24202b; }
.sidebar .tab.active .nav-icon { color:#fff; background:var(--brand-purple); }
.sidebar .tab b { color:#dcd5e4; background:#383040; }
.sidebar-footer { background:#211c29; }.sidebar-footer small { color:#8f8499; }
.launchpad-copy { background:radial-gradient(circle at 86% 0,rgba(68,0,221,.16),transparent 34%),linear-gradient(135deg,#19161f,#24202c); border-color:#37313f; box-shadow:0 18px 50px rgba(18,14,25,.13); }
.launchpad-copy .eyebrow { color:#b6a2ea; }.launchpad-copy p { color:#c8c0cf; }
.launchpad-copy .button-primary { color:#fff; background:var(--brand-purple); }.launchpad-copy .button-primary:hover { background:#3500ae; }
.launchpad-guide { color:#f6f3f8; background:#211d28; border-color:#37313f; }
.launchpad-guide .eyebrow { color:#9e91aa; }.launchpad-guide li { border-top-color:#37313f; }
.launchpad-guide li>b { background:#35303d; }.launchpad-guide small { color:#9e95a7; }
.queue-entry-card { background:#24202c; border:1px solid #393341; box-shadow:inset 4px 0 0 var(--brand-magenta); }
.queue-entry-card .eyebrow,.queue-entry-card p { color:#aaa0b2; }.queue-entry-card>div>strong { color:#fff; }
.source-assurance { background:#2b2632; border-color:#3c3545; }
.assurance-lead { background:#1d1923; }.assurance-stat { background:#26212d; }
.assurance-lead small,.assurance-stat small { color:#aaa0b2; }.assurance-lead .eyebrow,.assurance-stat .eyebrow { color:#a998d4; }
.decision-card { background:radial-gradient(circle at 100% 0,rgba(68,0,221,.22),transparent 45%),#211d28; border:1px solid #393341; }
.decision-card .eyebrow,.decision-card p { color:#b8afc1; }
.readiness-banner { background:#24202c; border-color:#393341; }
.readiness-banner strong { color:#fff; }.readiness-banner small { color:#aaa0b2; }
.analyst-fab { background:#211d28; box-shadow:inset 3px 0 0 var(--brand-purple),0 10px 30px rgba(0,0,0,.18); }
