:root {
  --ink: #101820;
  --ink-2: #33404c;
  --muted: #6f7a84;
  --line: #e4e8ea;
  --line-strong: #d3dadd;
  --paper: #ffffff;
  --wash: #f4f6f7;
  --wash-2: #eef2f3;
  --blue: #009fdf;
  --blue-deep: #007eb7;
  --blue-soft: #e9f7fd;
  --navy: #152a3a;
  --green: #168568;
  --green-soft: #e9f6f1;
  --amber: #b97811;
  --amber-soft: #fff5df;
  --red: #b14747;
  --red-soft: #fff0ef;
  --shadow: 0 18px 55px rgba(29, 48, 60, .07), 0 2px 9px rgba(29, 48, 60, .035);
  --shadow-soft: 0 8px 28px rgba(29, 48, 60, .055);
  --radius: 18px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% -10%, rgba(0, 159, 223, .07), transparent 29%),
    var(--wash);
  font-family: "DM Sans", "Avenir Next", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(0, 159, 223, .22);
  outline-offset: 2px;
}

.shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  padding: 22px 16px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(248, 250, 250, .9);
  border-right: 1px solid rgba(213, 220, 224, .78);
  backdrop-filter: blur(24px) saturate(1.15);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: white;
  box-shadow: inset 0 0 0 1px #e7ebed, 0 5px 14px rgba(0, 126, 183, .08);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.brand-name {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 500 9px/1.2 "DM Sans", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav { padding: 16px 0 8px; }
.nav-label {
  padding: 10px 11px 7px;
  color: #8c959d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  margin: 2px 0;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #53606a;
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.72); }
.nav-item.active {
  color: #075777;
  background: white;
  box-shadow: 0 7px 25px rgba(31, 60, 75, .07), inset 0 0 0 1px rgba(0, 159, 223, .12);
  font-weight: 600;
}
.nav-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 17px; height: 17px; }
.nav-caret { margin-left: auto; color: #9ba4aa; font-size: 13px; }
.subnav { display: none; margin: 2px 0 8px 37px; }
.nav-group.open .subnav { display: grid; }
.subnav button {
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  color: #74808a;
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.subnav button:hover, .subnav button.active { color: var(--blue-deep); background: var(--blue-soft); }
.sidebar-footer { margin-top: auto; padding-top: 14px; }
.control-card {
  padding: 12px;
  border: 1px solid #dce5e8;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
}
.control-card strong { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.control-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.control-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  margin-left: var(--sidebar);
  height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(244, 246, 247, .82);
  border-bottom: 1px solid rgba(217, 223, 226, .7);
  backdrop-filter: blur(24px);
}
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs b { color: var(--ink); font-weight: 600; }
.top-spacer { flex: 1; }
.demo-pill, .role-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.demo-pill {
  padding: 7px 10px;
  color: #6b5b30;
  background: #fff8e8;
  border: 1px solid #f0e2ba;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.demo-pill i { width: 6px; height: 6px; border-radius: 50%; background: #d59a25; }
.role-select {
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,255,255,.8);
  color: var(--ink-2);
  font-size: 12px;
}
.icon-button {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255,255,255,.8);
  cursor: pointer;
}
.avatar {
  width: 37px; height: 37px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #1c4259, #0d9edb);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(14, 103, 143, .2);
}

.main { margin-left: var(--sidebar); padding: 34px; }
.page { max-width: 1480px; margin: 0 auto; animation: enter .42s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin-bottom: 9px; color: var(--blue-deep); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 600 clamp(29px, 3vw, 42px)/1.08 "Manrope", sans-serif; letter-spacing: -.045em; }
h2 { font: 600 20px/1.2 "Manrope", sans-serif; letter-spacing: -.025em; }
h3 { font: 600 14px/1.3 "Manrope", sans-serif; letter-spacing: -.015em; }
.page-head p { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.head-actions { margin-left: auto; display: flex; gap: 9px; }
.btn {
  min-height: 39px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #b9c4c9; box-shadow: var(--shadow-soft); }
.btn.primary { color: white; border-color: var(--blue-deep); background: linear-gradient(135deg, #079dd9, #007cae); box-shadow: 0 8px 20px rgba(0, 126, 183, .18); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #edc8c5; background: var(--red-soft); }
.btn.small { min-height: 31px; padding: 0 11px; border-radius: 8px; font-size: 11px; }

.bank-control {
  margin-bottom: 22px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #d7e9ef;
  border-radius: 13px;
  background: linear-gradient(90deg, #f0f9fc, #f8fbfc);
  color: #285267;
  font-size: 11px;
}
.bank-control svg { flex: 0 0 auto; color: var(--blue-deep); }
.bank-control b { color: #163b4f; }
.bank-control .control-tail { margin-left: auto; color: #6b7e87; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.card {
  position: relative;
  border: 1px solid rgba(220, 225, 228, .95);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.card.pad { padding: 20px; }
.metric { padding: 18px 19px 16px; min-height: 126px; overflow: hidden; }
.metric::after {
  content: "";
  position: absolute; right: -28px; bottom: -42px;
  width: 95px; height: 95px;
  border: 17px solid rgba(0, 159, 223, .04);
  border-radius: 50%;
}
.metric-label { color: var(--muted); font-size: 11px; line-height: 1.35; }
.metric-value { margin-top: 13px; font: 600 25px/1 "Manrope", sans-serif; letter-spacing: -.035em; }
.metric-foot { margin-top: 11px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--red); font-weight: 700; }
.spark { margin-left: auto; width: 58px; height: 20px; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.7; }

.section-row { display: flex; align-items: flex-end; gap: 16px; margin: 29px 0 14px; }
.section-row h2 { margin: 0; }
.section-row p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-row .right { margin-left: auto; }
.opportunity-card { padding: 22px 22px 18px; overflow: hidden; }
.opportunity-head { display: flex; align-items: flex-start; gap: 16px; }
.opportunity-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.opportunity-total { margin-left: auto; text-align: right; }
.opportunity-total strong { display: block; font: 600 22px "Manrope"; color: var(--blue-deep); }
.opportunity-total span { color: var(--muted); font-size: 10px; }
.credit-flow {
  position: relative;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.08fr 1fr .92fr .84fr .78fr 1.02fr;
  align-items: end;
  gap: 8px;
}
.credit-flow::before {
  content: "";
  position: absolute;
  left: 4%; right: 4%; top: 21px;
  border-top: 1px dashed #c9d7dc;
}
.stage { position: relative; z-index: 1; min-width: 0; }
.stage-dot {
  width: 11px; height: 11px;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: white;
  border: 3px solid #5abbe2;
  box-shadow: 0 0 0 5px white;
}
.stage-bar {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 12px;
  background: linear-gradient(180deg, #edf8fb, #e7f4f8);
  border: 1px solid #d7ebf2;
}
.stage:nth-child(1) .stage-bar { height: 136px; }
.stage:nth-child(2) .stage-bar { height: 124px; }
.stage:nth-child(3) .stage-bar { height: 109px; }
.stage:nth-child(4) .stage-bar { height: 94px; }
.stage:nth-child(5) .stage-bar { height: 80px; }
.stage:last-child .stage-bar { height: 146px; color: white; border-color: var(--blue-deep); background: linear-gradient(155deg, #0aa3df, #0077a9); }
.stage-bar strong { font: 600 17px/1.1 "Manrope"; letter-spacing: -.025em; white-space: nowrap; }
.stage-bar span { margin-top: 7px; color: #637680; font-size: 9px; line-height: 1.25; }
.stage:last-child .stage-bar span { color: rgba(255,255,255,.72); }
.flow-note { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.confidence { display: inline-flex; align-items: center; gap: 5px; color: var(--green); }

.opportunity-list { overflow: hidden; }
.opp-row {
  padding: 14px 17px;
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) .7fr .8fr .55fr .8fr;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  transition: .18s ease;
}
.opp-row:not(.table-head):hover { background: #fbfdfe; }
.opp-row:last-child { border-bottom: 0; }
.opp-row.table-head { padding-top: 11px; padding-bottom: 10px; color: #8b949b; background: #fafbfb; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.opp-name { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 12px; }
.opp-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue-deep); }
.opp-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.risk-pill, .status, .tag {
  width: fit-content;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.risk-pill.low, .status.green { color: #126c57; background: var(--green-soft); }
.risk-pill.med, .status.amber { color: #8a5d12; background: var(--amber-soft); }
.risk-pill.high, .status.red { color: #9e4242; background: var(--red-soft); }
.status.blue, .tag { color: #08749f; background: var(--blue-soft); }
.status.grey { color: #66737c; background: #edf0f1; }
.score-bar { height: 5px; border-radius: 99px; background: #edf1f2; overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #50bb96, #0c8a68); }

.filter-card { padding: 18px; }
.filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.field label { display: block; margin-bottom: 7px; color: #66727c; font-size: 10px; font-weight: 600; }
.field select, .field input[type="number"], .text-input {
  width: 100%; height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink-2);
  background: white;
  font-size: 11px;
}
.scanner-results { margin-top: 16px; display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; }
.scanner-stat { padding: 16px; border-right: 1px solid var(--line); }
.scanner-stat:last-child { border: 0; }
.scanner-stat span { color: var(--muted); font-size: 9px; }
.scanner-stat strong { display: block; margin-top: 8px; font: 600 18px "Manrope"; letter-spacing: -.03em; }

.sim-layout { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(570px, 1.45fr); gap: 17px; }
.assumption-card { padding: 20px; }
.sim-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.sim-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.live-dot { margin-left: auto; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.live-dot i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(22,133,104,.08); } }
.range-field { margin-bottom: 19px; }
.range-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.range-label span { color: var(--muted); font-size: 10px; }
.range-label strong { margin-left: auto; font: 600 13px "Manrope"; }
.range-wrap { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 9px; color: #94a0a7; font-size: 9px; }
input[type="range"] { width: 100%; accent-color: var(--blue); cursor: pointer; }
.dual-field { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.scenario-strip { padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfb; }
.scenario-change { padding: 9px; border-radius: 9px; background: white; border: 1px solid #edf0f1; }
.scenario-change label { color: var(--muted); font-size: 9px; }
.scenario-change div { margin-top: 5px; font-size: 11px; }
.scenario-change b { color: var(--blue-deep); }
.impact-card { padding: 20px; overflow: hidden; }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.impact-stat { min-height: 108px; padding: 14px; background: white; }
.impact-stat span { color: var(--muted); font-size: 9px; line-height: 1.3; }
.impact-stat strong { display: block; margin-top: 10px; font: 600 19px "Manrope"; letter-spacing: -.03em; }
.impact-stat em { display: block; margin-top: 7px; color: var(--green); font-size: 9px; font-style: normal; }
.impact-stat em.risk { color: var(--red); }
.compare-chart { margin-top: 19px; padding: 16px; border-radius: 14px; background: #f8fafb; border: 1px solid var(--line); }
.chart-head { display: flex; align-items: center; gap: 8px; margin-bottom: 17px; }
.chart-head h3 { margin: 0; }
.legend { margin-left: auto; display: flex; gap: 13px; color: var(--muted); font-size: 9px; }
.legend i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; }
.bar-chart { height: 170px; display: flex; align-items: end; justify-content: space-around; gap: 14px; border-bottom: 1px solid #dce2e5; }
.bar-group { width: 15%; height: 100%; display: flex; align-items: end; justify-content: center; gap: 5px; position: relative; }
.bar { width: 22px; min-height: 8px; border-radius: 5px 5px 0 0; transition: height .35s ease; }
.bar.current { background: #ccd6da; }
.bar.proposed { background: linear-gradient(180deg, #18ace4, #007fae); }
.bar-label { position: absolute; bottom: -22px; width: 92px; color: var(--muted); font-size: 8px; text-align: center; }
.chart-foot { margin: 28px 0 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.model-note { margin-top: 15px; padding: 11px 12px; border-radius: 10px; color: #72581e; background: #fff9ea; font-size: 9px; line-height: 1.45; }

.workflow { padding: 17px 19px; display: flex; align-items: center; }
.workflow-step { display: flex; align-items: center; flex: 1; color: var(--muted); font-size: 10px; }
.workflow-step::after { content: ""; flex: 1; margin: 0 9px; height: 1px; background: var(--line-strong); }
.workflow-step:last-child { flex: 0; }
.workflow-step:last-child::after { display: none; }
.workflow-step i { width: 19px; height: 19px; margin-right: 6px; display: grid; place-items: center; border-radius: 50%; background: #eef1f2; color: #72808a; font-size: 8px; font-style: normal; }
.workflow-step.done { color: var(--green); font-weight: 600; }
.workflow-step.done i { color: white; background: var(--green); }
.workflow-step.current { color: var(--blue-deep); font-weight: 700; }
.workflow-step.current i { color: white; background: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }

.customer-head { padding: 22px; display: flex; gap: 16px; align-items: center; }
.customer-avatar { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px; color: white; background: linear-gradient(145deg, #15384d, #099ed8); font: 600 16px "Manrope"; }
.customer-name h2 { margin: 0 0 5px; }
.customer-meta { color: var(--muted); font-size: 10px; }
.customer-status { margin-left: auto; display: flex; gap: 7px; }
.tabs { margin-top: 14px; padding: 0 13px; display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 10px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; white-space: nowrap; cursor: pointer; }
.tab.active { color: var(--blue-deep); border-bottom-color: var(--blue); font-weight: 700; }
.customer-grid { margin-top: 16px; display: grid; grid-template-columns: 1.25fr .85fr; gap: 16px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-stat { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fcfdfd; }
.profile-stat span { color: var(--muted); font-size: 9px; }
.profile-stat strong { display: block; margin-top: 7px; font: 600 16px "Manrope"; }
.risk-band-panel { padding: 18px; color: white; background: linear-gradient(145deg, #17384b, #0c688d); border: 0; overflow: hidden; }
.risk-band-panel::after { content:"A2"; position:absolute; right:-6px; bottom:-37px; color:rgba(255,255,255,.055); font:700 120px "Manrope"; }
.risk-band-panel p { color: rgba(255,255,255,.67); font-size: 10px; }
.risk-band-panel .limit { margin: 20px 0 4px; font: 600 29px "Manrope"; letter-spacing: -.04em; }
.factor-list { display: grid; gap: 9px; }
.factor { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); font-size: 10px; line-height: 1.4; }
.factor i { width: 17px; height: 17px; display: grid; place-items:center; flex: 0 0 auto; border-radius: 50%; font-size: 9px; font-style: normal; }
.factor.positive i { color: var(--green); background: var(--green-soft); }
.factor.negative i { color: var(--amber); background: var(--amber-soft); }
.trace { overflow: hidden; }
.trace-row { padding: 10px 15px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; border-bottom: 1px solid var(--line); font-size: 10px; }
.trace-row:last-child { border: 0; }
.trace-row span { color: var(--muted); }
.trace-row strong { font-weight: 600; }

.pipeline { padding: 22px 18px; display: grid; grid-template-columns: repeat(8, minmax(90px, 1fr)); gap: 8px; overflow-x: auto; }
.pipeline-step { position: relative; min-height: 105px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.pipeline-step::after { content: "›"; position: absolute; right: -8px; top: 40%; z-index: 2; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: white; border: 1px solid var(--line); color: #99a3a9; }
.pipeline-step:last-child::after { display: none; }
.pipeline-step i { width: 25px; height: 25px; display:grid; place-items:center; border-radius: 8px; background: var(--blue-soft); color: var(--blue-deep); font-size: 10px; font-style: normal; }
.pipeline-step strong { display: block; margin-top: 12px; font-size: 10px; }
.pipeline-step span { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.pipeline-step.policy { color: white; border-color: #20465a; background: #17394b; }
.pipeline-step.policy span { color: rgba(255,255,255,.62); }
.pipeline-step.policy i { color: white; background: rgba(255,255,255,.12); }
.decision-outcomes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.outcome { padding: 15px; border-radius: 12px; border: 1px solid var(--line); background: white; }
.outcome strong { display: block; font: 600 18px "Manrope"; }
.outcome span { color: var(--muted); font-size: 9px; }

.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; color: #89939b; background: #fafbfb; border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: .15s ease; }
.data-table tbody tr:hover { background: #fbfdfe; }
.person { display: flex; align-items: center; gap: 8px; }
.person i { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #176887; background: var(--blue-soft); font-size: 8px; font-style: normal; font-weight: 700; }
.table-toolbar { padding: 14px; display: flex; gap: 10px; border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 340px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fbfcfc; font-size: 10px; }
.sla { font-weight: 700; color: var(--amber); }

.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check { padding: 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 10px; }
.check i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 10px; font-style: normal; }
.offer-summary { padding: 22px; color: white; background: linear-gradient(145deg, #15394d 0%, #0b698f 65%, #079ed7 140%); border: 0; }
.offer-summary .offer-kicker { color: rgba(255,255,255,.62); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.offer-summary h2 { margin: 11px 0 22px; max-width: 420px; font-size: 25px; }
.offer-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.offer-value { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.09); }
.offer-value span { color: rgba(255,255,255,.59); font-size: 8px; }
.offer-value strong { display: block; margin-top: 7px; font-size: 12px; }

.donut-wrap { display: flex; align-items: center; gap: 25px; }
.donut {
  width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(#2a9bc3 0 54%, #71baa2 54% 78%, #e2b45d 78% 92%, #d86d69 92% 100%);
  position: relative;
}
.donut::after { content: "₹8,420 Cr\A Outstanding"; white-space: pre; position:absolute; inset: 25px; display:grid; place-items:center; text-align:center; border-radius:50%; background:white; color:var(--ink); font:600 13px/1.35 "Manrope"; }
.donut-legend { display:grid; gap:10px; flex:1; }
.donut-legend div { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:10px; }
.donut-legend i { width:7px; height:7px; border-radius:2px; }
.donut-legend b { margin-left:auto; color:var(--ink-2); }
.line-chart { width: 100%; height: 230px; }
.line-chart .gridline { stroke: #e7ebed; stroke-width: 1; }
.line-chart .axis { fill: #8b969d; font-size: 8px; }
.line-chart .area { fill: url(#areaGradient); }
.line-chart .curve { fill: none; stroke: var(--blue); stroke-width: 2.5; }

.governance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gov-card { padding: 16px; min-height: 132px; cursor: pointer; transition: .18s ease; }
.gov-card:hover { transform: translateY(-2px); border-color: #c7dce4; box-shadow: var(--shadow); }
.gov-card .gov-icon { width: 33px; height: 33px; display:grid; place-items:center; border-radius:10px; color:var(--blue-deep); background:var(--blue-soft); }
.gov-card h3 { margin: 15px 0 5px; }
.gov-card p { color: var(--muted); font-size: 9px; line-height: 1.45; }
.gov-meta { margin-top: 14px; display:flex; align-items:center; gap:6px; color:var(--muted); font-size:8px; }
.gov-meta i { width:5px; height:5px; border-radius:50%; background:var(--green); }

.integration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.integration { padding: 16px; min-height: 135px; color:inherit; text-align:left; cursor:pointer; transition:.18s ease; }
.integration:hover { transform:translateY(-2px); border-color:#bcdce7; box-shadow:var(--shadow); }
.integration-top { display:flex; align-items:center; gap:10px; }
.integration-logo { width:35px; height:35px; display:grid; place-items:center; border-radius:10px; color:#1a627e; background:#ecf5f8; font-weight:700; font-size:10px; }
.integration h3 { margin:0; }
.integration p { margin: 16px 0 12px; color:var(--muted); font-size:9px; line-height:1.45; }
.integration-foot { display:flex; align-items:center; justify-content:space-between; }
.sync { color:var(--muted); font-size:8px; }
.architecture { padding: 24px; overflow-x:auto; }
.arch-flow { min-width: 1040px; display:flex; align-items:center; gap:7px; }
.arch-node { min-width:95px; min-height:75px; padding:11px 9px; display:flex; flex-direction:column; justify-content:center; border:1px solid var(--line); border-radius:11px; background:#fbfcfc; text-align:center; }
.arch-node strong { font-size:9px; }
.arch-node span { margin-top:4px; color:var(--muted); font-size:7px; }
.arch-node.core { color:white; border-color:var(--navy); background:var(--navy); }
.arch-node.core span { color:rgba(255,255,255,.6); }
.arch-arrow { color:#9aa5ab; font-size:14px; }
.arch-plus { width:22px; text-align:center; color:var(--blue-deep); font-weight:700; }

.empty-page { min-height: 560px; display:grid; place-items:center; text-align:center; }
.empty-page .orb { width: 68px; height:68px; margin: 0 auto 18px; display:grid; place-items:center; border-radius:22px; color:var(--blue-deep); background:var(--blue-soft); font-size:22px; }
.empty-page p { max-width:450px; color:var(--muted); line-height:1.6; }
.empty-page .btn { margin-top:8px; }
.toast { position:fixed; z-index:60; right:25px; bottom:25px; max-width:360px; padding:13px 16px; border-radius:12px; color:white; background:#17384a; box-shadow:0 18px 45px rgba(21,42,58,.25); font-size:11px; line-height:1.45; transform:translateY(18px); opacity:0; pointer-events:none; transition:.25s ease; }
.toast.show { opacity:1; transform:translateY(0); }
.modal-backdrop { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:24px; background:rgba(15,27,35,.36); backdrop-filter:blur(5px); }
.modal { width:min(560px,100%); padding:22px; border-radius:20px; background:white; box-shadow:0 35px 90px rgba(14,32,43,.25); animation:enter .25s ease; }
.modal-head { display:flex; align-items:flex-start; gap:15px; }
.modal-head button { margin-left:auto; }
.modal p { color:var(--muted); font-size:11px; line-height:1.55; }
.modal-actions { margin-top:20px; display:flex; justify-content:flex-end; gap:9px; }
.override-reason { width:100%; min-height:95px; margin-top:8px; padding:11px; resize:vertical; border:1px solid var(--line-strong); border-radius:10px; }

@media (max-width: 1160px) {
  :root { --sidebar: 220px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .scanner-results { grid-template-columns: repeat(3, 1fr); }
  .sim-layout { grid-template-columns: 1fr; }
  .governance-grid, .integration-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { transform:translateX(-100%); }
  .topbar { margin-left:0; padding:0 18px; }
  .main { margin-left:0; padding:22px 17px; }
  .role-select { display:none; }
  .page-head { flex-direction:column; }
  .head-actions { margin-left:0; flex-wrap:wrap; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .customer-grid { grid-template-columns:1fr; }
  .metric-grid { grid-template-columns:1fr 1fr; }
  .credit-flow { grid-template-columns:repeat(3,1fr); align-items:stretch; }
  .credit-flow::before, .stage-dot { display:none; }
  .stage .stage-bar { height:auto !important; min-height:86px; }
  .opp-row { grid-template-columns:1.6fr .7fr .8fr; }
  .opp-row > :nth-child(4), .opp-row > :nth-child(5) { display:none; }
  .impact-grid { grid-template-columns:repeat(2,1fr); }
  .governance-grid, .integration-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 520px) {
  .topbar { height:62px; }
  .demo-pill { display:none; }
  .breadcrumbs { display:none; }
  .main { padding:20px 12px; }
  .metric-grid, .filters, .scanner-results, .profile-metrics, .decision-outcomes, .checks, .governance-grid, .integration-grid, .offer-values { grid-template-columns:1fr; }
  .metric { min-height:112px; }
  .credit-flow { grid-template-columns:1fr 1fr; }
  .workflow { overflow-x:auto; min-width:700px; }
  .table-card { overflow-x:auto; }
  .data-table { min-width:780px; }
  .bank-control { align-items:flex-start; flex-wrap:wrap; line-height:1.45; }
  .bank-control > span:not(.control-tail) { flex:1; min-width:220px; }
  .bank-control .control-tail { flex:0 0 calc(100% - 28px); width:auto; margin-left:28px; }
  .customer-head { align-items:flex-start; flex-wrap:wrap; }
  .customer-name { flex:1; min-width:180px; }
  .customer-status { width:100%; margin-left:0; flex-wrap:wrap; }
  .tabs { padding-left:2px; scrollbar-width:thin; }
}
