:root {
  color-scheme: light;
  --page: #d9e5f4;
  --page-deep: #17345d;
  --page-deeper: #0f284c;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #dce6f2;
  --text: #182338;
  --muted: #697789;
  --muted-2: #8a98aa;
  --blue: #1d5fbf;
  --gold: #c3842e;
  --green: #087a49;
  --red: #e11d35;
  --orange: #d26b00;
  --shadow: 0 12px 30px rgba(24, 50, 88, 0.11);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1180px;
  background:
    linear-gradient(180deg, rgba(15, 40, 76, 0.96) 0, rgba(23, 52, 93, 0.9) 62px, rgba(217, 229, 244, 0.98) 63px),
    var(--page);
  color: var(--text);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  color: #f8fbff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg, var(--page-deeper), var(--page-deep));
}

.brand, .top-actions, .toolbar-btn, .user-btn, .main-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 278px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff4dc;
  background: linear-gradient(145deg, #e7b662, #a86516);
}

.brand-mark svg { width: 18px; height: 18px; }

h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.main-nav {
  justify-content: center;
  gap: 28px;
  height: 100%;
  color: rgba(255, 255, 255, 0.78);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.main-nav a.active { color: #fff; }

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #6fb2ff, #d8aa5c);
}

.top-actions {
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-btn, .icon-btn, .user-btn {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
}

.toolbar-btn, .user-btn {
  gap: 7px;
  padding: 0 10px;
}

.toolbar-btn svg, .user-btn svg, .icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn {
  position: relative;
  width: 34px;
  display: grid;
  place-items: center;
}

.icon-btn.alert b {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 10px;
  line-height: 1;
}

.avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dce8f6;
  color: var(--page-deep);
  font-size: 12px;
  font-weight: 800;
}

main {
  width: 100%;
  max-width: 1620px;
  margin: 0 auto;
  padding: 14px 20px 0;
  flex: 1;
}

.kpi-band, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  border-color: #d7e3f1;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  box-shadow: none;
}

.kpi-band {
  min-height: 126px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.kpi-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 22px 28px;
  border-right: 1px solid var(--line);
}

.kpi-card:last-child { border-right: 0; }

.kpi-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: linear-gradient(180deg, #f8fbff, #e6f1ff);
  border: 1px solid #c8dcf5;
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.kpi-label svg {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  color: #15233d;
  font-size: 30px;
  line-height: 1;
  font-weight: 820;
  letter-spacing: 0;
}

.kpi-card strong span {
  margin-left: 7px;
  font-size: 14px;
  font-weight: 650;
}

.kpi-card strong.danger { color: var(--red); }

.kpi-card p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 0;
  color: var(--text);
  font-size: 13px;
}

.kpi-card p svg { width: 13px; height: 13px; }

.good { color: var(--green); font-style: normal; font-weight: 720; }
.danger { color: var(--red); font-style: normal; font-weight: 720; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 25vw, 420px);
  align-items: stretch;
  gap: 12px;
  margin-top: 12px;
}

.module-page {
  display: grid;
  gap: 8px;
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  min-height: 118px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: #f8fbff;
  background: linear-gradient(120deg, rgba(15, 40, 76, 0.98), rgba(30, 81, 141, 0.92));
  box-shadow: var(--shadow);
}

.page-hero h2 {
  color: #fff;
  font-size: 28px;
}

.page-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(248, 251, 255, 0.78);
  line-height: 1.65;
  font-size: 14px;
}

.page-hero .hero-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  color: #d7e5f8;
  font-size: 13px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 420px;
  gap: 8px;
  align-items: start;
}

.page-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat,
.insight-item,
.report-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
}

.mini-stat {
  min-height: 104px;
  padding: 16px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stat strong {
  display: block;
  margin-top: 12px;
  color: #10203a;
  font-size: 24px;
}

.mini-stat p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.insight-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.insight-item {
  padding: 13px 14px;
}

.insight-item strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #17233a;
  font-size: 14px;
}

.insight-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-card {
  min-height: 170px;
  padding: 16px;
}

.report-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.report-card strong {
  display: block;
  margin-top: 10px;
  color: #17233a;
  font-size: 17px;
}

.report-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.placeholder-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 420px;
  gap: 8px;
  align-items: stretch;
}

.placeholder-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 42px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96)),
    var(--surface);
}

.placeholder-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--page-deep));
  box-shadow: 0 16px 28px rgba(29, 95, 191, 0.24);
}

.placeholder-mark svg {
  width: 34px;
  height: 34px;
}

.placeholder-panel h2 {
  justify-content: center;
  font-size: 24px;
}

.placeholder-panel p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.placeholder-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.ghost-btn.primary {
  color: #fff;
  border-color: #6ca4ee;
  background: linear-gradient(180deg, #276fd0, #1556ad);
}

.module-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.module-list span,
.module-list a {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #23324a;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  font-size: 13px;
  font-weight: 650;
}

.module-list a {
  text-decoration: none;
  border-color: #9fc2f0;
  color: #0f4f99;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
}

.module-list a svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.module-list a:hover {
  border-color: #5d98df;
  background: linear-gradient(180deg, #f7fbff, #e5f1ff);
}

.left-column {
  display: grid;
  grid-template-rows: 1fr;
  gap: 12px;
}

.control-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.segmented, .chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented button, .chips button, .ghost-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 650;
}

.segmented button.active, .chips button.active {
  border-color: #6ca4ee;
  color: #fff;
  background: linear-gradient(180deg, #276fd0, #1556ad);
  box-shadow: 0 4px 12px rgba(29, 95, 191, 0.18);
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.more { margin-left: auto; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #23324a;
  background: #fbfdff;
}

.ghost-btn svg { width: 15px; height: 15px; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.panel-head.compact { padding-bottom: 6px; }

h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #09244a;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 780;
  letter-spacing: 0;
}

h2 svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.panel-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.table-shell {
  padding: 0 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
}

th, td {
  height: 33px;
  padding: 8px 13px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: #23324a;
  font-weight: 760;
  background: linear-gradient(180deg, #f5f9ff, #edf5ff);
}

td:first-child, th:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
td:last-child, th:last-child { border-right: 0; }

.row-title { color: #273448; font-weight: 600; }
.strong-cell { color: #0f1d33; font-weight: 800; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.attention { color: var(--orange); }

.spark {
  width: 108px;
  height: 20px;
}

.spark polyline {
  fill: none;
  stroke: #2d76df;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-note {
  margin: 10px 16px 14px;
  color: var(--muted);
  font-size: 12px;
}

.executive-overview {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid #d7e3f1;
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  box-shadow: none;
}

.executive-head,
.subpanel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.executive-head h2,
.subpanel-head h3 {
  margin: 0;
  color: #09244a;
  font-size: 16px;
  line-height: 1.35;
}

.executive-head h2 { font-weight: 780; }

.executive-head p,
.subpanel-head p {
  margin: 6px 0 0;
  color: #4b6380;
  font-size: 12px;
  line-height: 1.45;
}

.executive-head > span,
.subpanel-head > span {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  color: #0f5c3b;
  background: #edf8f2;
  border: 1px solid #caead7;
  font-size: 12px;
  font-weight: 760;
}

.executive-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.executive-metric {
  min-height: 122px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  padding: 12px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #5b708a;
  font-size: 13px;
  font-weight: 680;
}

.metric-top svg {
  width: 13px;
  height: 13px;
  color: #7f98b6;
}

.executive-metric strong {
  display: block;
  margin-top: 13px;
  color: #0b2d5b;
  font-size: 27px;
  line-height: 1;
  font-weight: 820;
}

.executive-metric p {
  margin: 9px 0 0;
  font-size: 12px;
  font-weight: 720;
}

.executive-metric .positive,
.cash-safety-card .positive { color: var(--green); }

.executive-metric .negative,
.cash-safety-card .negative { color: var(--red); }

.executive-metric .attention,
.cash-safety-card .attention { color: var(--orange); }

.mini-bars {
  height: 24px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 5px;
  margin-top: 12px;
}

.mini-bars span {
  min-height: 7px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #8fc3ff, #2d76df);
}

.executive-subgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.executive-subpanel {
  min-height: 218px;
  padding: 12px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.subpanel-head h3 {
  font-size: 16px;
  font-weight: 780;
}

.subpanel-head > span {
  min-height: 26px;
  color: #7b5305;
  background: #fff4dc;
  border-color: #f0d29a;
}

.executive-subpanel:last-child .subpanel-head > span {
  color: #1556ad;
  background: #e9f3ff;
  border-color: #c8dcf5;
}

.cash-safety {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.cash-safety-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: #fbfdff;
}

.cash-safety-card span {
  display: block;
  color: #5b708a;
  font-size: 12px;
  font-weight: 680;
}

.cash-safety-card strong {
  display: block;
  margin-top: 8px;
  color: #0b2d5b;
  font-size: 24px;
  line-height: 1;
}

.cash-safety-card p {
  margin: 0;
  color: #4b6380;
  font-size: 12px;
  text-align: right;
}

.profit-bars {
  position: relative;
  height: 154px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 0 12px 2px;
  overflow: hidden;
}

.profit-bars::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 30px;
  height: 1px;
  background: #d7e3f1;
}

.profit-bars article {
  height: 144px;
  display: grid;
  grid-template-rows: 18px minmax(0, 96px) 30px;
  align-content: end;
  justify-items: center;
  align-items: end;
  position: relative;
  z-index: 1;
}

.profit-bars span {
  color: #5b708a;
  font-size: 12px;
}

.profit-bars i {
  width: 30px;
  max-height: 96px;
  display: block;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6ad4c8, #2d76df);
}

.profit-bars strong {
  display: flex;
  align-items: flex-end;
  min-height: 24px;
  color: #5b708a;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.financing-board {
  margin-top: 12px;
  padding: 16px;
}

.financing-head,
.financing-warning-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.financing-head h2,
.financing-warning-head h3,
.financing-decision-card h3,
.financing-approval h3 {
  margin: 0;
  color: #09244a;
  line-height: 1.35;
}

.financing-head h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
}

.financing-head h2 svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.financing-head p,
.financing-warning-head p,
.financing-decision-card > p,
.financing-alert-list p,
.financing-approval p {
  margin: 7px 0 0;
  color: #4b6380;
  font-size: 13px;
  line-height: 1.65;
}

.financing-head > span,
.financing-warning-head > span,
.approval-tags span {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.financing-head > span {
  color: #7b5305;
  background: #fff4dc;
  border: 1px solid #f0d29a;
}

.financing-warning-head > span {
  color: #b42335;
  background: #fff1f3;
  border: 1px solid #ffd7dc;
}

.financing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 14px;
  margin-top: 16px;
}

.financing-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.financing-decision-card,
.financing-warning-panel,
.financing-alert-list article,
.financing-approval,
.approval-grid article {
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.financing-decision-card {
  min-height: 192px;
  padding: 16px;
}

.financing-decision-card:nth-child(5) {
  grid-column: span 1;
}

.financing-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.financing-card-title i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #1556ad;
  background: #e9f3ff;
  border: 1px solid #c8dcf5;
}

.financing-card-title svg {
  width: 17px;
  height: 17px;
}

.financing-decision-card h3,
.financing-warning-head h3,
.financing-approval h3 {
  font-size: 16px;
  font-weight: 800;
}

.financing-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.financing-metrics div {
  min-height: 92px;
  padding: 12px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: #fbfdff;
}

.financing-metrics span,
.approval-grid span {
  display: block;
  color: #5b708a;
  font-size: 12px;
  font-weight: 680;
}

.financing-metrics strong,
.approval-grid strong {
  display: block;
  margin-top: 8px;
  color: #0b2d5b;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 820;
}

.financing-metrics em {
  display: block;
  margin-top: 8px;
  color: #4b6380;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.financing-warning-panel {
  padding: 16px;
}

.financing-alert-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.financing-alert-list article {
  min-height: 78px;
  padding: 13px 16px;
  border-left: 3px solid var(--red);
}

.financing-alert-list strong {
  display: block;
  color: #09244a;
  font-size: 15px;
  font-weight: 800;
}

.financing-approval {
  margin-top: 14px;
  padding: 16px;
}

.approval-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.approval-tags span {
  color: #1556ad;
  background: #e9f3ff;
  border: 1px solid #c8dcf5;
}

.approval-tags span.attention {
  color: #7b5305;
  background: #fff4dc;
  border-color: #f0d29a;
}

.financing-approval h3 {
  margin-top: 14px;
}

.approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.approval-grid article {
  min-height: 74px;
  padding: 12px 14px;
}

.approval-grid article:nth-child(3) {
  min-height: 92px;
}

.approval-grid strong {
  font-size: 17px;
  line-height: 1.45;
}

.sector-panel {
  margin-top: 12px;
  padding-bottom: 18px;
}

.sector-panel .panel-head {
  padding: 16px 22px 10px;
}

.sector-panel .panel-head h2 {
  font-size: 18px;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 0 22px 18px;
}

.sector-card {
  min-width: 0;
  min-height: 232px;
  display: grid;
  grid-template-rows: 54px 1fr 42px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  overflow: hidden;
}

.sector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px 9px;
  color: #09244a;
  font-size: 16px;
  font-weight: 780;
}

.sector-title i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.sector-title svg {
  width: 24px;
  height: 24px;
  color: #7f98b6;
}

.sector-title span:last-child {
  flex: 0 0 40px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.sector-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-card dl {
  display: grid;
  align-content: start;
  gap: 7px;
  margin: 0;
  padding: 0 18px 12px;
}

.sector-card div.metric-row {
  display: grid;
  grid-template-columns: minmax(64px, 72px) minmax(88px, 1fr) minmax(66px, auto);
  align-items: baseline;
  gap: 6px;
  min-height: 29px;
  font-size: 13px;
  line-height: 1.45;
}

.sector-card dt,
.sector-card dd {
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

.sector-card dt {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sector-card dt { color: #5b708a; }

.sector-card dd {
  justify-self: end;
  color: #0b2d5b;
  font-weight: 760;
  overflow: visible;
  text-overflow: clip;
}

.sector-card .change {
  min-width: 66px;
  text-align: right;
  font-weight: 700;
}

.enter-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #1d5fbf;
  border-top: 1px solid #d7e3f1;
  background: #f8fbff;
  font-size: 14px;
  font-weight: 700;
}

.enter-link svg { width: 14px; height: 14px; }

.overview-deep-dive {
  margin-top: 8px;
  padding: 14px;
}

.drill-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f7fc;
}

.drill-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #435168;
  font-size: 13px;
  font-weight: 720;
}

.drill-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--page-deep), var(--blue));
  box-shadow: 0 6px 14px rgba(29, 95, 191, 0.2);
}

.drill-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
}

.drill-main {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.drill-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.drill-metrics article,
.customer-card,
.flow-card,
.segment-list article,
.customer-issues article,
.question-list article,
.risk-list article {
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.drill-metrics article {
  min-height: 92px;
  padding: 14px;
}

.drill-metrics span,
.customer-card span,
.flow-card span {
  display: block;
  color: #5b708a;
  font-size: 12px;
  font-weight: 680;
}

.drill-metrics strong,
.customer-card strong,
.flow-card strong {
  display: block;
  margin-top: 8px;
  color: #0b2d5b;
  font-size: 24px;
  line-height: 1.1;
}

.drill-metrics em {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.drill-chart {
  min-height: 220px;
  padding: 16px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.chart-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-title h3,
.drill-side h3 {
  margin: 0;
  color: #09244a;
  font-size: 15px;
}

.chart-title h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-title h3 svg { width: 18px; height: 18px; color: var(--blue); }

.chart-title p {
  margin: 5px 0 0;
  color: #4b6380;
  font-size: 12px;
}

.chart-title > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0e4e91;
  background: #e6f1ff;
  font-size: 12px;
  font-weight: 760;
}

.trend-bars {
  height: 132px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 11px;
  margin-top: 28px;
}

.trend-bars span {
  min-height: 28px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #5ba7ff, #1d5fbf);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.trend-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.drill-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.drill-side section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.question-list,
.risk-list,
.segment-list,
.customer-issues {
  display: grid;
  gap: 8px;
}

.question-list article {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.question-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--page-deep);
  font-size: 11px;
  font-weight: 800;
}

.question-list p,
.risk-list p,
.segment-list p,
.customer-card p,
.flow-card p {
  margin: 0;
  color: #243b5a;
  font-size: 12px;
  line-height: 1.55;
}

.risk-list article {
  padding: 10px 12px;
  border-left: 3px solid var(--orange);
}

.risk-list strong,
.segment-list strong,
.customer-issues strong {
  display: block;
  color: #09244a;
  font-size: 13px;
}

.overview-customers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
  padding: 18px 20px 20px;
}

.customer-asset-board {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    var(--surface);
}

.customer-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
}

.customer-board-head h2 {
  font-size: 19px;
}

.customer-board-head p,
.customer-section-title p {
  margin: 8px 0 0;
  color: #4d6582;
  line-height: 1.6;
  font-size: 13px;
}

.customer-board-head > span,
.customer-panel-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #bcd2ee;
  border-radius: 999px;
  color: #0f56aa;
  background: #edf5ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.customer-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 2px;
}

.customer-section-title.path-title {
  margin-top: 4px;
}

.customer-section-title h3,
.customer-panel-title h3 {
  margin: 0;
  color: #08244a;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 820;
}

.customer-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.customer-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.customer-card span,
.flow-card span {
  display: block;
  color: #536c89;
  font-size: 13px;
  font-weight: 700;
}

.customer-card strong {
  display: block;
  margin-top: 10px;
  color: #0b2d5b;
  font-size: 25px;
  line-height: 1;
  font-weight: 840;
}

.customer-card p,
.flow-card p,
.segment-list p,
.customer-issues p {
  margin: 9px 0 0;
  color: #385272;
  line-height: 1.55;
  font-size: 12px;
}

.customer-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.flow-card {
  position: relative;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.flow-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-top: 2px solid #9bb8d8;
  border-right: 2px solid #9bb8d8;
  transform: translateY(-50%) rotate(45deg);
  background: #f9fcff;
  z-index: 1;
}

.flow-card strong {
  display: block;
  margin-top: 10px;
  color: #0b2d5b;
  font-size: 22px;
  line-height: 1;
  font-weight: 820;
}

.customer-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.customer-opportunity-panel,
.customer-risk-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.customer-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.segment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.segment-list article {
  min-height: 104px;
  padding: 12px 13px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fbfdff;
}

.segment-card > span {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.segment-card.green > span { color: var(--green); }
.segment-card.yellow > span { color: var(--orange); }
.segment-card.red > span { color: var(--red); }

.customer-issues {
  display: grid;
  gap: 10px;
}

.customer-issues article {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fbfdff;
}

.customer-issues span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 820;
}

.customer-issues article.red span {
  color: var(--red);
}

.customer-issues em {
  color: var(--blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.todo-panel {
  padding: 14px 14px 18px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
}

.todo-head {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.todo-head button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #09244a;
  font-size: 13px;
}

.todo-head svg { width: 14px; height: 14px; }

.todo-group {
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 9px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.todo-group.red { border-color: #ffd7dc; }

.group-head {
  min-height: 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid #d7e3f1;
  background: #f8fbff;
}

.todo-group.red .group-head {
  background: #fff7f8;
}

.dot-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
}

.dot-icon svg { width: 12px; height: 12px; }
.group-head strong { font-size: 14px; }
.group-head span { color: var(--muted); font-size: 12px; }
.group-impact { color: var(--green); font-weight: 750; }
.group-impact.orange { color: var(--orange); }
.group-impact.red { color: var(--red); }

.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid #d7e3f1;
}

.todo-item:last-of-type { border-bottom: 0; }

.todo-item strong {
  display: block;
  color: #09244a;
  font-size: 13px;
  line-height: 1.35;
}

.todo-item small {
  display: block;
  margin-top: 4px;
  color: #5b708a;
  font-size: 11px;
}

.todo-value {
  text-align: right;
  font-size: 12px;
  white-space: nowrap;
}

.todo-value b {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.todo-value span {
  display: block;
  margin-top: 3px;
  color: var(--red);
}

.more-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid #d7e3f1;
  color: #5b708a;
  background: #fbfdff;
  font-size: 12px;
}

.more-row svg { width: 13px; height: 13px; }

footer {
  max-width: 1620px;
  width: calc(100% - 36px);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 88px;
  margin: 8px auto 0;
  padding: 0 12px;
  color: #d7e5f8;
  font-size: 12px;
  background: linear-gradient(90deg, rgba(15, 40, 76, 0.95), rgba(23, 52, 93, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 0 0;
}

.footer-links {
  margin-left: auto;
  display: inline-flex;
  gap: 34px;
}

@media (max-width: 1560px) {
  .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1440px) {
  main { max-width: 1360px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 380px; }
  .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  body { min-width: 0; }
  .topbar { grid-template-columns: 1fr; height: auto; padding: 14px 18px; }
  .main-nav { justify-content: flex-start; overflow-x: auto; }
  .top-actions { justify-content: flex-start; flex-wrap: wrap; }
  .kpi-band, .workspace { grid-template-columns: 1fr; }
  .kpi-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .executive-subgrid {
    grid-template-columns: 1fr;
  }
  .financing-layout,
  .drill-layout,
  .overview-customers {
    grid-template-columns: 1fr;
  }
  .customer-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-card::after {
    display: none;
  }
}

@media (max-width: 760px) {
  main { padding: 10px; }
  .brand { min-width: 0; }
  h1 { font-size: 18px; }
  .control-row, .chips { flex-wrap: wrap; }
  .sector-grid { grid-template-columns: 1fr; }
  .financing-board {
    padding: 12px;
  }
  .financing-head,
  .financing-warning-head {
    flex-direction: column;
  }
  .financing-decision-grid,
  .financing-metrics,
  .approval-grid {
    grid-template-columns: 1fr;
  }
  .executive-overview {
    padding: 12px;
  }
  .executive-head,
  .subpanel-head {
    flex-direction: column;
  }
  .executive-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .executive-metric {
    min-height: 122px;
  }
  .executive-metric strong {
    font-size: 27px;
  }
  .cash-safety-card {
    grid-template-columns: 1fr;
  }
  .cash-safety-card p {
    text-align: left;
  }
  .drill-tabs { flex-wrap: wrap; }
  .drill-metrics,
  .customer-metrics,
  .customer-flow {
    grid-template-columns: 1fr;
  }
  .customer-issues article {
    grid-template-columns: 1fr;
  }
  footer {
    width: calc(100% - 20px);
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .footer-links { margin-left: 0; }
}
