:root {
  --navy-950: #061018;
  --navy-900: #08131c;
  --navy-850: #0d1b25;
  --navy-800: #13242e;
  --navy-700: #1c323d;
  --ink: #eaf2ef;
  --muted: #8da3a7;
  --muted-2: #5d747b;
  --paper: #f5f7f4;
  --paper-2: #edf1ed;
  --line: #dce4de;
  --line-dark: rgba(224, 241, 234, 0.12);
  --lime: #d9f27b;
  --lime-strong: #bada58;
  --cyan: #8bc5d0;
  --amber: #f2c76b;
  --red: #ef8d8d;
  --green: #83d5ad;
  --shadow: 0 22px 60px rgba(10, 28, 35, 0.1);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: #13222a; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(135, 183, 75, 0.65); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: var(--navy-900); color: var(--ink); display: flex; flex: 0 0 248px; flex-direction: column; min-height: 100vh; padding: 26px 16px 18px; position: sticky; top: 0; }
.brand-block { align-items: center; display: flex; justify-content: space-between; padding: 0 8px 26px; }
.brand { align-items: center; display: inline-flex; gap: 12px; }
.brand-symbol { display: inline-block; height: 27px; position: relative; transform: rotate(-30deg); width: 26px; }
.brand-symbol i { background: var(--lime); border-radius: 3px; display: block; height: 9px; left: 0; position: absolute; width: 26px; }
.brand-symbol i:first-child { top: 3px; }
.brand-symbol i:last-child { bottom: 3px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .08em; line-height: 1; }
.brand small { color: var(--muted); display: block; font-size: 8px; font-weight: 750; letter-spacing: .16em; margin-top: 5px; }
.desk-status { align-items: center; background: rgba(220, 242, 130, .065); border: 1px solid rgba(220, 242, 130, .12); display: flex; gap: 10px; margin: 0 2px 26px; padding: 12px 13px; }
.desk-status strong, .desk-status small { display: block; }
.desk-status strong { color: var(--lime); font-size: 9px; letter-spacing: .14em; }
.desk-status small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.status-pip { border-radius: 50%; display: inline-block; flex: 0 0 auto; height: 7px; width: 7px; }
.status-pip--lime { background: var(--lime); box-shadow: 0 0 0 4px rgba(217, 242, 123, .1), 0 0 15px rgba(217, 242, 123, .8); }
.status-pip--blue { background: var(--cyan); box-shadow: 0 0 0 4px rgba(139, 197, 208, .1); }
.primary-nav { display: grid; gap: 3px; }
.nav-label { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .16em; margin: 0 11px 8px; text-transform: uppercase; }
.nav-label--spaced { margin-top: 25px; }
.nav-item { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 5px; color: #a7b9bb; display: flex; font-size: 12px; gap: 11px; min-height: 38px; padding: 0 10px; text-align: left; transition: background .18s ease, color .18s ease, border-color .18s ease; width: 100%; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: var(--ink); }
.nav-item.is-active { background: rgba(217, 242, 123, .12); border-color: rgba(217, 242, 123, .16); color: var(--lime); }
.nav-item b { background: #25424c; border-radius: 20px; color: #b4c8ca; font-size: 10px; font-weight: 750; margin-left: auto; min-width: 21px; padding: 3px 6px; text-align: center; }
.nav-item.is-active b { background: var(--lime); color: var(--navy-900); }
.nav-icon { align-items: center; color: var(--muted-2); display: inline-flex; font-size: 17px; height: 18px; justify-content: center; width: 18px; }
.nav-item.is-active .nav-icon { color: var(--lime); }
.sidebar-footer { margin-top: auto; }
.mode-card { background: var(--navy-850); border: 1px solid var(--line-dark); margin: 18px 2px 13px; padding: 13px; }
.mode-card__top { align-items: center; display: flex; gap: 9px; }
.mode-card strong { color: var(--cyan); font-size: 9px; letter-spacing: .09em; }
.mode-card p { color: var(--muted-2); font-size: 10px; line-height: 1.5; margin: 9px 0 0 16px; }
.sidebar-mail { border-top: 1px solid var(--line-dark); color: var(--muted); display: flex; font-size: 9px; justify-content: space-between; padding: 16px 8px 0; }
.sidebar-mail span { color: var(--lime); font-size: 14px; }

.app-main { flex: 1; min-width: 0; }
.topbar { align-items: center; background: rgba(245, 247, 244, .95); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 92px; padding: 0 clamp(22px, 4vw, 64px); position: sticky; top: 0; z-index: 10; }
.topbar-left { align-items: center; display: flex; gap: 14px; }
.topbar-kicker { color: #829399; font-size: 9px; font-weight: 800; letter-spacing: .15em; margin: 0 0 6px; }
.topbar-kicker span { color: var(--lime-strong); padding: 0 5px; }
.topbar h1 { font-size: 23px; letter-spacing: -.045em; margin: 0; }
.topbar-actions { align-items: center; display: flex; gap: 9px; }
.quiet-button { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 4px; color: #61757b; display: inline-flex; font-size: 10px; font-weight: 750; gap: 7px; letter-spacing: .06em; min-height: 38px; padding: 0 10px; text-transform: uppercase; }
.quiet-button:hover { background: var(--paper-2); border-color: var(--line); color: #21333a; }
.quiet-button span { font-size: 17px; font-weight: 400; }
.button { align-items: center; border: 0; border-radius: 3px; display: inline-flex; font-size: 10px; font-weight: 850; gap: 15px; justify-content: center; letter-spacing: .11em; min-height: 45px; padding: 0 18px; text-transform: uppercase; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { box-shadow: 0 8px 24px rgba(26, 47, 51, .13); transform: translateY(-1px); }
.button--lime { background: var(--lime); color: var(--navy-900); }
.button--lime:hover { background: #e4fa9e; }
.button--dark { background: var(--navy-900); color: var(--ink); }
.button--compact { min-height: 38px; padding: 0 14px; }
.operator-avatar { align-items: center; background: var(--navy-900); border: 3px solid #dfe8df; border-radius: 50%; color: var(--lime); display: flex; font-size: 11px; font-weight: 800; height: 35px; justify-content: center; margin-left: 5px; width: 35px; }
.icon-button { align-items: center; background: transparent; border: 0; color: inherit; display: inline-flex; font-size: 23px; height: 35px; justify-content: center; padding: 0; width: 35px; }
.mobile-only { display: none; }

.main-content { margin: 0 auto; max-width: 1500px; padding: clamp(24px, 4vw, 54px) clamp(22px, 4vw, 64px) 100px; }
.loading-state { align-items: center; color: #71858a; display: flex; gap: 12px; min-height: 380px; justify-content: center; }
.loader { animation: spin 1s linear infinite; border: 2px solid #d6e2dc; border-radius: 50%; border-top-color: var(--lime-strong); height: 22px; width: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-intro { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 28px; }
.page-intro h2 { color: #12232b; font-size: clamp(25px, 3vw, 37px); letter-spacing: -.06em; line-height: 1.02; margin: 0; max-width: 610px; }
.page-intro h2 em { color: #87a44d; font-style: normal; }
.page-intro p { color: #819196; font-size: 12px; line-height: 1.6; margin: 8px 0 0; max-width: 620px; }
.eyebrow { align-items: center; color: #819196; display: flex; font-size: 9px; font-weight: 850; gap: 8px; letter-spacing: .16em; margin: 0 0 13px; text-transform: uppercase; }
.eyebrow::before { background: var(--lime-strong); border-radius: 50%; content: ""; height: 6px; width: 6px; }
.inline-link { color: #789a42; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.inline-link:hover { color: #2c4b37; }

.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.kpi-card { background: #fff; border: 1px solid var(--line); min-height: 119px; padding: 17px 18px; position: relative; }
.kpi-card::after { background: var(--lime); bottom: 0; content: ""; height: 3px; left: 0; position: absolute; right: 0; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.kpi-card:hover::after { transform: scaleX(1); }
.kpi-card__top { align-items: center; color: #84949a; display: flex; font-size: 9px; font-weight: 850; justify-content: space-between; letter-spacing: .11em; text-transform: uppercase; }
.kpi-icon { align-items: center; background: #eef3eb; border-radius: 50%; color: #718b45; display: inline-flex; font-size: 16px; height: 27px; justify-content: center; width: 27px; }
.kpi-card strong { color: #182b33; display: block; font-size: 30px; letter-spacing: -.07em; line-height: 1; margin-top: 22px; }
.kpi-card small { color: #9aabb0; display: block; font-size: 10px; margin-top: 8px; }
.kpi-card--attention { background: #fffdf7; border-color: #ece2c6; }
.kpi-card--attention .kpi-icon { background: #fff3d8; color: #b18326; }
.kpi-card--attention strong { color: #9a731f; }
.kpi-card--risk { background: #fffafa; border-color: #f0dede; }
.kpi-card--risk .kpi-icon { background: #fae7e7; color: #b65353; }
.kpi-card--risk strong { color: #b65353; }

.workspace-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .85fr); }
.panel { background: #fff; border: 1px solid var(--line); }
.panel-head { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 67px; padding: 0 20px; }
.panel-head h3 { color: #1a3038; font-size: 13px; letter-spacing: -.02em; margin: 0; }
.panel-head small { color: #91a1a5; font-size: 10px; }
.panel-head__title { align-items: center; display: flex; gap: 10px; }
.count-badge { align-items: center; background: #eff4e7; border-radius: 20px; color: #789940; display: inline-flex; font-size: 10px; font-weight: 800; height: 22px; justify-content: center; min-width: 22px; padding: 0 7px; }
.panel-action { background: transparent; border: 0; color: #7e9a48; font-size: 10px; font-weight: 800; letter-spacing: .09em; padding: 7px 0; text-transform: uppercase; }
.panel-action:hover { color: #294b35; }
.approval-list { display: grid; gap: 0; }
.approval-item { align-items: center; border-bottom: 1px solid #edf1ed; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) auto; padding: 17px 20px; }
.approval-item:last-child { border-bottom: 0; }
.approval-item:hover { background: #fbfcf9; }
.item-eyebrow { color: #9aaaad; font-size: 8px; font-weight: 850; letter-spacing: .12em; margin: 0 0 7px; text-transform: uppercase; }
.approval-title { color: #1a3038; font-size: 13px; font-weight: 750; margin: 0; }
.approval-meta { color: #829399; font-size: 10px; line-height: 1.5; margin: 6px 0 0; }
.approval-meta strong { color: #5c747a; font-weight: 700; }
.approval-actions { align-items: center; display: flex; gap: 6px; }
.small-button { align-items: center; border: 1px solid var(--line); border-radius: 3px; display: inline-flex; font-size: 9px; font-weight: 850; justify-content: center; letter-spacing: .08em; min-height: 30px; padding: 0 10px; text-transform: uppercase; }
.small-button--ghost { background: #fff; color: #688087; }
.small-button--ghost:hover { background: var(--paper-2); }
.small-button--approve { background: #edf7d1; border-color: #d4eaa4; color: #5f7c27; }
.small-button--approve:hover { background: #dff3ac; }
.small-button--reject { background: #fff; border-color: #eed8d8; color: #ad6d6d; }
.small-button--reject:hover { background: #fff3f3; }
.empty-state { color: #8fa0a3; font-size: 12px; padding: 34px 20px; text-align: center; }

.pipeline-panel { margin-top: 18px; }
.case-list { display: grid; }
.case-row { align-items: center; border-bottom: 1px solid #edf1ed; cursor: pointer; display: grid; gap: 15px; grid-template-columns: minmax(170px, 1.5fr) minmax(110px, .8fr) 90px minmax(90px, .8fr) 120px; padding: 16px 20px; transition: background .16s ease; }
.case-row:last-child { border-bottom: 0; }
.case-row:hover { background: #fbfcf9; }
.case-row__title { color: #20353d; font-size: 12px; font-weight: 760; margin: 0; }
.case-row__sub { color: #91a0a4; display: block; font-size: 10px; margin-top: 5px; }
.case-category { color: #71848a; font-size: 10px; }
.case-value { color: #354d54; font-size: 11px; font-weight: 750; text-align: right; }
.stage-pill, .risk-pill, .provider-pill { align-items: center; border-radius: 20px; display: inline-flex; font-size: 8px; font-weight: 850; justify-content: center; letter-spacing: .08em; padding: 5px 8px; text-transform: uppercase; white-space: nowrap; }
.stage-pill { background: #eef2ef; color: #6c7e83; }
.stage-pill--qualified { background: #e8f2d5; color: #658135; }
.stage-pill--active { background: #dff2ed; color: #3d806e; }
.stage-pill--waiting_reply { background: #fff3d8; color: #9b762f; }
.stage-pill--risk_hold { background: #f9e5e5; color: #af5b5b; }
.risk-pill { background: #e7f3ee; color: #4f8d73; }
.risk-pill--review { background: #fff2d8; color: #a07826; }
.risk-pill--hold { background: #f9e5e5; color: #a95252; }
.confidence { align-items: center; display: flex; gap: 8px; }
.confidence-bar { background: #e7ece7; border-radius: 3px; height: 4px; overflow: hidden; width: 48px; }
.confidence-bar span { background: var(--lime-strong); display: block; height: 100%; }
.confidence small { color: #84969a; font-size: 9px; }

.right-stack { display: grid; gap: 18px; align-content: start; }
.agent-panel { background: var(--navy-900); border: 0; color: var(--ink); overflow: hidden; position: relative; }
.agent-panel::before { border: 1px solid rgba(217, 242, 123, .12); border-radius: 50%; content: ""; height: 310px; left: -50px; position: absolute; top: 82px; width: 310px; }
.agent-panel .panel-head { border-bottom-color: var(--line-dark); position: relative; }
.agent-panel .panel-head h3 { color: var(--ink); }
.agent-panel .panel-head small { color: var(--muted); }
.agent-list { padding: 11px 20px 19px; position: relative; }
.agent-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 22px minmax(0, 1fr) auto; padding: 10px 0; }
.agent-node { background: var(--navy-700); border: 1px solid rgba(217, 242, 123, .22); border-radius: 50%; height: 20px; position: relative; width: 20px; }
.agent-node::after { background: var(--lime); border-radius: 50%; content: ""; height: 5px; left: 7px; position: absolute; top: 7px; width: 5px; }
.agent-row strong { display: block; font-size: 11px; font-weight: 700; }
.agent-row small { color: var(--muted-2); display: block; font-size: 9px; margin-top: 3px; }
.agent-status { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.agent-status--attention { color: var(--red); }
.provider-pill { background: rgba(139, 197, 208, .12); color: var(--cyan); font-size: 8px; margin-left: 4px; padding: 3px 6px; }
.provider-pill--rules { background: rgba(217, 242, 123, .1); color: var(--lime); }
.provider-pill--grok { background: rgba(163, 138, 241, .13); color: #b9a5fb; }
.activity-panel .activity-list { padding: 4px 20px 14px; }
.activity-item { border-bottom: 1px solid #edf1ed; display: grid; gap: 11px; grid-template-columns: 9px minmax(0, 1fr); padding: 14px 0; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { background: var(--lime-strong); border-radius: 50%; height: 7px; margin-top: 4px; width: 7px; }
.activity-dot--hold { background: var(--red); }
.activity-dot--waiting { background: var(--amber); }
.activity-title { color: #29414a; font-size: 11px; font-weight: 750; margin: 0; }
.activity-detail { color: #87979b; font-size: 10px; line-height: 1.45; margin: 4px 0 0; }
.activity-time { color: #acb8b8; display: block; font-size: 9px; margin-top: 5px; }

.desk-hero { background: var(--navy-900); color: var(--ink); display: grid; gap: 30px; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); margin-bottom: 18px; min-height: 220px; overflow: hidden; padding: 32px 34px; position: relative; }
.desk-hero::before, .desk-hero::after { border: 1px solid rgba(217, 242, 123, .1); border-radius: 50%; content: ""; position: absolute; }
.desk-hero::before { height: 440px; right: 5%; top: -200px; width: 440px; }
.desk-hero::after { height: 300px; right: 13%; top: -130px; width: 300px; }
.desk-hero__copy { position: relative; z-index: 1; }
.desk-hero .eyebrow { color: var(--muted); }
.desk-hero h2 { font-size: clamp(27px, 4vw, 47px); letter-spacing: -.075em; line-height: .98; margin: 0; max-width: 570px; }
.desk-hero h2 em { color: var(--lime); font-style: normal; }
.desk-hero p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0 0; max-width: 500px; }
.desk-hero__signal { align-self: end; border-left: 1px solid rgba(217, 242, 123, .3); margin-left: auto; max-width: 310px; padding-left: 19px; position: relative; z-index: 1; }
.desk-hero__signal strong { color: var(--lime); display: block; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.desk-hero__signal p { color: #c1d0cc; font-size: 11px; margin: 8px 0 0; }
.section-title { align-items: center; display: flex; justify-content: space-between; margin: 31px 0 13px; }
.section-title h3 { color: #253b43; font-size: 13px; letter-spacing: -.02em; margin: 0; }
.section-title small { color: #8d9ca1; font-size: 10px; }

.toolbar { align-items: center; background: #fff; border: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; margin-bottom: 18px; padding: 12px 14px; }
.search-box { align-items: center; background: #f7f9f6; border: 1px solid var(--line); display: flex; flex: 1; gap: 8px; max-width: 400px; padding: 0 11px; }
.search-box span { color: #8c9ca0; font-size: 18px; }
.search-box input { background: transparent; border: 0; color: #29414a; font-size: 11px; min-height: 34px; outline: 0; width: 100%; }
.filter-row { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-button { background: transparent; border: 1px solid transparent; border-radius: 20px; color: #839398; font-size: 9px; font-weight: 800; padding: 7px 10px; text-transform: uppercase; }
.filter-button:hover, .filter-button.is-active { background: #edf3e2; color: #68833a; }
.table-head { background: #f7f9f6; color: #8d9da0; display: grid; font-size: 8px; font-weight: 850; gap: 15px; grid-template-columns: minmax(170px, 1.5fr) minmax(110px, .8fr) 90px minmax(90px, .8fr) 120px; letter-spacing: .12em; padding: 11px 20px; text-transform: uppercase; }

.module-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-card { background: #fff; border: 1px solid var(--line); padding: 22px; }
.module-card h3 { color: #223841; font-size: 15px; margin: 0; }
.module-card p { color: #7f9196; font-size: 11px; line-height: 1.6; margin: 9px 0 19px; }
.module-card--dark { background: var(--navy-900); border-color: var(--navy-900); color: var(--ink); }
.module-card--dark h3 { color: var(--ink); }
.module-card--dark p { color: var(--muted); }
.check-list { display: grid; gap: 10px; margin: 0; padding: 0; }
.check-list li { align-items: flex-start; color: #60767c; display: flex; font-size: 11px; gap: 9px; list-style: none; line-height: 1.45; }
.check-list li::before { color: #82a24b; content: "✓"; font-weight: 900; }
.module-card--dark .check-list li { color: #a8baba; }
.module-card--dark .check-list li::before { color: var(--lime); }
.risk-board { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.risk-card { background: #fff; border: 1px solid #eedede; padding: 18px; }
.risk-card__label { color: #b36363; font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.risk-card h3 { color: #52373b; font-size: 13px; line-height: 1.25; margin: 10px 0 7px; }
.risk-card p { color: #9a7f82; font-size: 10px; line-height: 1.5; margin: 0; }
.evidence-board { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.evidence-card { border: 1px solid var(--line); min-height: 140px; padding: 18px; }
.evidence-card--fact { background: #f7fbf4; border-color: #dcebd0; }
.evidence-card--inference { background: #fffaf0; border-color: #f0e5c5; }
.evidence-card--unknown { background: #fafafa; }
.evidence-card__status { font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.evidence-card--fact .evidence-card__status { color: #6d913f; }
.evidence-card--inference .evidence-card__status { color: #a37b27; }
.evidence-card--unknown .evidence-card__status { color: #8c9a9e; }
.evidence-card h3 { color: #30474d; font-size: 12px; margin: 12px 0 7px; }
.evidence-card p { color: #819195; font-size: 10px; line-height: 1.5; margin: 0; }

.toast { background: var(--navy-900); bottom: 25px; box-shadow: 0 18px 45px rgba(8, 19, 28, .25); color: var(--ink); font-size: 11px; left: 50%; max-width: min(420px, calc(100vw - 40px)); opacity: 0; padding: 13px 17px; pointer-events: none; position: fixed; transform: translate(-50%, 14px); transition: opacity .2s ease, transform .2s ease; z-index: 50; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-left: 3px solid var(--red); }
.toast.is-success { border-left: 3px solid var(--lime); }

.case-dialog { background: #fff; border: 0; box-shadow: 0 30px 100px rgba(8, 26, 31, .25); color: #19323a; max-height: calc(100vh - 50px); max-width: 760px; padding: 0; width: calc(100% - 32px); }
.case-dialog::backdrop { background: rgba(6, 16, 24, .58); backdrop-filter: blur(3px); }
.dialog-head { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 24px 27px 20px; }
.dialog-kicker { color: #8e9da0; font-size: 8px; font-weight: 900; letter-spacing: .15em; margin: 0 0 8px; }
.dialog-head h2 { font-size: 23px; letter-spacing: -.05em; margin: 0; }
.case-dialog-body { max-height: calc(100vh - 160px); overflow: auto; padding: 24px 27px 30px; }
.case-detail-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 23px; }
.detail-stat { background: #f6f8f5; border: 1px solid #e6ece6; padding: 11px; }
.detail-stat span { color: #92a0a3; display: block; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.detail-stat strong { color: #27404a; display: block; font-size: 14px; margin-top: 8px; }
.detail-section { border-top: 1px solid var(--line); padding-top: 17px; }
.detail-section + .detail-section { margin-top: 20px; }
.detail-section h3 { color: #2b444b; font-size: 12px; margin: 0 0 11px; }
.detail-section > p { color: #72868b; font-size: 11px; line-height: 1.6; margin: 0; }
.evidence-line { align-items: flex-start; border-bottom: 1px solid #eef2ee; display: grid; gap: 9px; grid-template-columns: 74px minmax(0, 1fr); padding: 11px 0; }
.evidence-line:last-child { border-bottom: 0; }
.evidence-line__status { font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.evidence-line__status--fact { color: #6c913f; }
.evidence-line__status--inference { color: #a47c29; }
.evidence-line__status--unknown { color: #8c9a9e; }
.evidence-line p { color: #657b81; font-size: 10px; line-height: 1.5; margin: 0; }
.evidence-line small { color: #9ba9ab; display: block; font-size: 9px; margin-top: 3px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.form-stack { display: grid; gap: 17px; padding: 25px 27px 28px; }
.form-stack label, .form-two label { display: grid; gap: 7px; }
.form-stack label > span, .form-two label > span { color: #75888d; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.form-stack input, .form-stack textarea, .form-stack select { background: #fafcf9; border: 1px solid var(--line); border-radius: 2px; color: #284049; outline: 0; padding: 10px 11px; width: 100%; }
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus { border-color: #9dbc63; }
.form-stack textarea { resize: vertical; }
.form-two { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-footer { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
.form-note { color: #91a0a3; font-size: 10px; line-height: 1.4; margin: 0; }

.chat-launcher { align-items: center; background: var(--navy-900); border: 0; bottom: 20px; box-shadow: 0 16px 40px rgba(8, 19, 28, .18); color: var(--ink); display: inline-flex; font-size: 10px; font-weight: 800; gap: 9px; letter-spacing: .08em; padding: 12px 15px; position: fixed; right: 24px; text-transform: uppercase; z-index: 20; }
.chat-launcher span { color: var(--lime); font-size: 16px; }
.chat-dock { background: #fff; border: 1px solid var(--line); bottom: 20px; box-shadow: 0 25px 70px rgba(10, 31, 36, .22); display: flex; flex-direction: column; max-height: min(570px, calc(100vh - 40px)); opacity: 0; pointer-events: none; position: fixed; right: 24px; transform: translateY(15px); transition: opacity .2s ease, transform .2s ease; width: min(390px, calc(100vw - 30px)); z-index: 25; }
.chat-dock.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.chat-dock__head { align-items: center; background: var(--navy-900); color: var(--ink); display: flex; justify-content: space-between; padding: 16px 17px; }
.chat-dock__head > div { align-items: center; display: flex; gap: 10px; }
.chat-dock__head strong, .chat-dock__head small { display: block; }
.chat-dock__head strong { font-size: 12px; }
.chat-dock__head small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.chat-dock__head .icon-button { color: var(--muted); font-size: 20px; height: 25px; width: 25px; }
.chat-orb { align-items: center; background: rgba(217, 242, 123, .15); border: 1px solid rgba(217, 242, 123, .3); border-radius: 50%; color: var(--lime); display: inline-flex; font-size: 17px; height: 31px; justify-content: center; width: 31px; }
.chat-messages { display: grid; flex: 1; gap: 11px; max-height: 380px; overflow: auto; padding: 16px; }
.chat-message { display: flex; gap: 8px; max-width: 92%; }
.chat-message--user { justify-self: end; }
.chat-message p { background: #f0f4ee; color: #597077; font-size: 11px; line-height: 1.5; margin: 0; padding: 10px 11px; }
.chat-message--user p { background: var(--navy-900); color: #d5e1dd; }
.message-mark { align-items: center; background: #eef4df; color: #729440; display: inline-flex; flex: 0 0 auto; font-size: 8px; font-weight: 900; height: 22px; justify-content: center; width: 26px; }
.chat-form { border-top: 1px solid var(--line); display: flex; padding: 9px; }
.chat-form input { border: 0; color: #3b555c; flex: 1; font-size: 11px; outline: 0; padding: 8px; }
.chat-form button { background: var(--lime); border: 0; color: var(--navy-900); font-size: 17px; height: 34px; width: 38px; }

@media (max-width: 1180px) {
  .sidebar { flex-basis: 220px; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .right-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-panel { grid-row: span 2; }
}
@media (max-width: 820px) {
  .sidebar { box-shadow: 20px 0 50px rgba(8, 19, 28, .25); left: 0; position: fixed; transform: translateX(-105%); transition: transform .2s ease; width: 260px; z-index: 30; }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  .topbar { min-height: 75px; padding: 0 18px; }
  .topbar-kicker { font-size: 8px; }
  .topbar h1 { font-size: 19px; }
  .topbar-actions .quiet-button { display: none; }
  .main-content { padding: 25px 17px 90px; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-intro h2 { font-size: 30px; }
  .kpi-grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { min-height: 105px; padding: 14px; }
  .kpi-card strong { font-size: 25px; margin-top: 17px; }
  .kpi-card__top { font-size: 8px; }
  .kpi-card:nth-child(5) { grid-column: span 2; }
  .right-stack { grid-template-columns: minmax(0, 1fr); }
  .agent-panel { grid-row: auto; }
  .desk-hero { grid-template-columns: 1fr; min-height: 0; padding: 26px 22px; }
  .desk-hero__signal { margin-left: 0; max-width: none; }
  .module-grid, .risk-board, .evidence-board { grid-template-columns: minmax(0, 1fr); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .table-head { display: none; }
  .case-row { gap: 9px; grid-template-columns: minmax(0, 1fr) auto; padding: 15px 16px; }
  .case-row .case-category { display: none; }
  .case-row .case-value { grid-column: 2; grid-row: 1; }
  .case-row .confidence { grid-column: 1; }
  .case-row .stage-pill { grid-column: 2; grid-row: 2; }
  .approval-item { align-items: flex-start; grid-template-columns: minmax(0, 1fr); }
  .approval-actions { justify-content: flex-start; }
  .case-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-two { grid-template-columns: minmax(0, 1fr); }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .chat-launcher { bottom: 16px; right: 16px; }
  .chat-dock { bottom: 16px; right: 15px; }
}
@media (max-width: 430px) {
  .topbar .button--compact { font-size: 0; gap: 0; padding: 0; width: 38px; }
  .topbar .button--compact span { font-size: 18px; }
  .operator-avatar { height: 32px; width: 32px; }
  .case-dialog { width: calc(100% - 18px); }
  .dialog-head, .case-dialog-body, .form-stack { padding-left: 18px; padding-right: 18px; }
  .evidence-line { grid-template-columns: 65px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
