* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; overflow: hidden; height: 100vh; }

/* 顶部导航 */
.header { background: #ffffff; color: #102039; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; height: 50px; border-bottom: 1px solid #d9e2ef; box-shadow: 0 1px 4px rgba(15,35,70,0.08); }
.header h1 { font-size: 18px; font-weight: 700; color: #102039; }
.header .filters { display: flex; gap: 12px; align-items: center; color: #333; }
.header select { background: #ffffff; color: #102039; border: 1px solid #b7c7dc; padding: 6px 12px; border-radius: 4px; font-size: 13px; }
.account-menu-wrap { position: relative; }
.account-trigger { display: inline-flex; align-items: center; gap: 6px; color: #102039; font-size: 12px; margin-left: 12px; padding: 5px 10px 5px 6px; border: 1px solid #d9e2ef; border-radius: 18px; background: #f7fbff; cursor: pointer; }
.account-trigger:hover { background: #e6f4ff; border-color: #91caff; }
.account-trigger::before { content: ''; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #69b1ff); display: inline-block; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5); }
.account-menu { position: absolute; right: 0; top: 36px; width: 260px; background: #fff; border: 1px solid #d9e2ef; border-radius: 12px; box-shadow: 0 12px 28px rgba(15,35,70,0.18); z-index: 50; overflow: hidden; }
.account-menu .account-card { padding: 14px 14px 12px; color: #102039; font-size: 12px; line-height: 1.7; }
.account-card-top { display: flex; gap: 10px; align-items: flex-start; }
.account-avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #69b1ff); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.account-menu .account-card .muted { color: #667085; word-break: break-all; }
.account-divider { height: 1px; background: #eef2f7; margin: 0; }
.account-menu button { width: 100%; border: none; background: #fff; color: #102039; text-align: left; padding: 11px 14px; cursor: pointer; font-size: 13px; }
.account-menu button:hover { background: #f5f8ff; }
.account-menu button.danger { color: #cf1322; }

/* 主体布局 */
.main { display: flex; height: calc(100vh - 50px); overflow: hidden; }

/* 左侧导航 */
.sidebar { width: 180px; background: #ffffff; color: #102039; padding: 16px 0; flex-shrink: 0; overflow-y: auto; border-right: 1px solid #d9e2ef; }
.sidebar .nav-item { padding: 10px 20px; cursor: pointer; font-size: 13px; transition: background 0.2s; color: #102039; }
.sidebar .nav-item:hover { background: #edf5ff; }
.sidebar .nav-item.active { background: #e6f4ff; border-left: 4px solid #1677ff; color: #0958d9; font-weight: 700; }

/* 内容区 */
.content { flex: 1; padding: 16px; overflow-y: auto; }
#main-app .content.business-scope-loading { position: relative; min-height: 320px; }
#main-app .content.business-scope-loading > * { visibility: hidden !important; }
#main-app .content.business-scope-loading::after {
  content: attr(data-scope-loading-text);
  visibility: visible;
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #f8fbff;
  color: #47627f;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

/* KPI卡片 */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.overview-secondary { display: none; }
.overview-secondary.visible { display: grid; }
.more-toggle { background: white; border: 1px solid #d9d9d9; color: #1677ff; border-radius: 6px; padding: 7px 10px; cursor: pointer; font-size: 12px; margin: -6px 0 12px 0; }
.kpi-card { background: white; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
button.kpi-card { border: 0; color: inherit; font: inherit; text-align: left; width: 100%; }
.kpi-card .label { font-size: 12px; color: #888; margin-bottom: 4px; }
.kpi-card .value { font-size: 24px; font-weight: 600; color: #1a1a2e; }
.kpi-card .sub { font-size: 11px; color: #888; margin-top: 4px; }
.kpi-card .up { color: #52c41a; }
.kpi-card .down { color: #f5222d; }

/* 图表容器 */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.chart-row.single { grid-template-columns: 1fr; }
.chart-box { background: white; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); min-height: 300px; }
.chart-box h3 { font-size: 14px; color: #666; margin-bottom: 12px; font-weight: 500; }
.chart-title-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.chart-title-actions h3 { margin-bottom:0; }
.detail-export-btn { border:1px solid #1677ff; background:#f0f7ff; color:#0958d9; border-radius:6px; padding:5px 9px; cursor:pointer; font-size:12px; font-weight:700; white-space:nowrap; }
.detail-export-btn:hover { background:#d6eaff; }
.data-validation-label { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.data-validation-entry {
  border: 1px solid #b7d6ff;
  background: #f0f7ff;
  color: #0958d9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
  white-space: nowrap;
}
.data-validation-entry:hover { background:#d6eaff; }
.chart { width: 100%; height: 280px; }
.mini-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-card { border: 1px solid #eef2f7; border-radius: 8px; padding: 12px; background: #fbfdff; }
.mini-card .label { font-size: 12px; color: #667085; margin-bottom: 6px; }
.mini-card .value { font-size: 20px; font-weight: 700; color: #102039; }
.mini-card .sub { font-size: 12px; color: #667085; margin-top: 6px; line-height: 1.5; }
.rank-list { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 34px minmax(160px, 1fr) 130px 90px; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line-soft, #edf1f7); border-radius: 6px; background: #fbfdff; }
.rank-no { color: #667085; font-weight: 800; font-size: 12px; }
.rank-main { min-width: 0; }
.rank-name { font-size: 13px; font-weight: 800; color: #172033; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { margin-top: 4px; height: 6px; border-radius: 999px; background: #edf2f8; overflow: hidden; }
.rank-sub span { display: block; height: 100%; border-radius: 999px; background: #1677ff; }
.rank-value { text-align: right; font-size: 13px; font-weight: 900; color: #102039; }
.rank-meta { text-align: right; font-size: 12px; color: #667085; line-height: 1.5; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.signal-card { border: 1px solid #e5eaf2; border-radius: 8px; padding: 12px; background: #fbfdff; }
.signal-card .label { font-size: 12px; color: #667085; margin-bottom: 5px; }
.signal-card .value { font-size: 22px; font-weight: 900; color: #102039; }
.signal-card .note { font-size: 12px; color: #667085; line-height: 1.5; margin-top: 4px; }
.compact-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.compact-table th { background: #f5f7fb; color: #344054; padding: 7px 8px; text-align: left; border-bottom: 1px solid #e5eaf2; white-space: nowrap; }
.compact-table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.compact-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cashflow-drill-card { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cashflow-drill-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,119,255,0.16); }
.cashflow-drill-row { cursor: pointer; }
.cashflow-drill-row:hover td { background: #f0f7ff; }
.cashflow-drill-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.cashflow-drill-head strong { font-size:13px; color:#102039; }
.cashflow-profit-summary { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.cashflow-profit-card { border:1px solid #e5eaf2; border-radius:8px; padding:11px 12px; background:#fbfdff; }
.cashflow-profit-card .label { font-size:12px; color:#667085; margin-bottom:5px; }
.cashflow-profit-card .value { font-size:20px; font-weight:900; color:#102039; }
.cashflow-profit-card .sub { font-size:11px; color:#667085; margin-top:4px; }
.profit-table { width:100%; border-collapse:collapse; font-size:12px; }
.profit-table th { background:#eaf2ff; color:#173b70; padding:8px; border:1px solid #c8d8ee; text-align:left; white-space:nowrap; }
.profit-table td { padding:7px 8px; border:1px solid #e5eaf2; vertical-align:middle; }
.profit-table td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.profit-table tr.group-row td { background:#f3f7fc; font-weight:900; color:#102039; }
.profit-table tr.profit-row td { background:#fff7e6; font-weight:900; color:#8a4b00; }
.profit-table tr.balance-row td { background:#f6ffed; font-weight:900; color:#245b12; }
.profit-table tr.unclassified-row td { background:#fff1f0; color:#a8071a; }
.profit-brief-table { width:100%; border-collapse:collapse; font-size:13px; }
#cashflow-profit-table { overflow-x:auto; }
.profit-brief-table th { background:#f5f8ff; color:#173b70; padding:10px; border-bottom:1px solid #dbe3ef; text-align:left; white-space:nowrap; }
.profit-brief-table td { padding:11px 10px; border-bottom:1px solid #edf1f7; vertical-align:middle; }
.profit-brief-table td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; font-weight:850; }
.profit-brief-table td.note { color:#667085; line-height:1.55; }
.profit-brief-table tr.clickable { cursor:pointer; }
.profit-brief-table tr.clickable:hover td { background:#f0f7ff; }
.profit-brief-table tr.profit-line td { background:#fff8e8; font-weight:900; color:#8a4b00; }
.profit-brief-table tr.balance-line td { background:#f6ffed; font-weight:900; color:#245b12; }
.profit-brief-table tr.warn-line td { background:#fff1f0; color:#a8071a; font-weight:850; }
.cashflow-profit-drill-backdrop {
  position:fixed;
  inset:0;
  z-index:4998;
  background:rgba(15, 23, 42, 0.38);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}
.cashflow-profit-drill-backdrop.open { opacity:1; pointer-events:auto; }
.cashflow-profit-drill {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  z-index:4999;
  width:min(52vw, 960px);
  min-width:680px;
  margin:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-left:1px solid #dbe3ef;
  box-shadow:-18px 0 48px rgba(15, 23, 42, .22);
  transform:translateX(105%);
  visibility:hidden;
  transition:transform .24s ease, visibility 0s linear .24s;
}
.cashflow-profit-drill.open {
  transform:translateX(0);
  visibility:visible;
  transition:transform .24s ease;
}
.cashflow-profit-drill-header {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid #e5eaf2;
  background:#f8fbff;
}
.cashflow-profit-drill-header h3 { margin:0; color:#102039; font-size:18px; }
.cashflow-profit-drill-eyebrow { display:block; margin-bottom:4px; color:#1677ff; font-size:12px; font-weight:850; }
.cashflow-profit-drill-close {
  width:36px;
  height:36px;
  flex:0 0 36px;
  border:1px solid #d0d8e5;
  border-radius:50%;
  background:#fff;
  color:#344054;
  font-size:24px;
  line-height:30px;
  cursor:pointer;
}
.cashflow-profit-drill-close:hover { color:#1677ff; border-color:#8ab8ff; background:#eef6ff; }
.cashflow-profit-drill-body { flex:1 1 auto; min-height:0; overflow:auto; padding:18px 20px 28px; }
.cashflow-profit-drill-body .metric-note { margin-bottom:0; }
.cashflow-profit-drill-body .compact-table { min-width:720px; }
.cashflow-profit-drill-body .cashflow-table-wrap .compact-table { min-width:980px; }
.cashflow-profit-drill-body .cashflow-profit-breakdown-table {
  min-width:0;
  table-layout:auto;
}
.cashflow-profit-drill-body .cashflow-table-wrap .cashflow-profit-detail-table {
  min-width:980px;
  table-layout:fixed;
}
.cashflow-profit-detail-table th:nth-child(1),
.cashflow-profit-detail-table td:nth-child(1) { width:92px; }
.cashflow-profit-detail-table th:nth-child(2),
.cashflow-profit-detail-table td:nth-child(2) { width:195px; }
.cashflow-profit-detail-table th:nth-child(3),
.cashflow-profit-detail-table td:nth-child(3) { width:78px; }
.cashflow-profit-detail-table th:nth-child(4),
.cashflow-profit-detail-table td:nth-child(4) { width:80px; }
.cashflow-profit-detail-table th:nth-child(5),
.cashflow-profit-detail-table td:nth-child(5),
.cashflow-profit-detail-table th:nth-child(6),
.cashflow-profit-detail-table td:nth-child(6),
.cashflow-profit-detail-table th:nth-child(7),
.cashflow-profit-detail-table td:nth-child(7) { width:118px; }
.cashflow-profit-detail-table th:nth-child(8),
.cashflow-profit-detail-table td:nth-child(8) { width:181px; }
.cashflow-profit-detail-table th:nth-child(2),
.cashflow-profit-detail-table td:nth-child(2),
.cashflow-profit-detail-table th:nth-child(3),
.cashflow-profit-detail-table td:nth-child(3),
.cashflow-profit-detail-table th:nth-child(4),
.cashflow-profit-detail-table td:nth-child(4),
.cashflow-profit-detail-table th:nth-child(8),
.cashflow-profit-detail-table td:nth-child(8) { white-space:normal; overflow-wrap:anywhere; }
.cashflow-profit-detail-table th:nth-child(5),
.cashflow-profit-detail-table td:nth-child(5),
.cashflow-profit-detail-table th:nth-child(6),
.cashflow-profit-detail-table td:nth-child(6),
.cashflow-profit-detail-table th:nth-child(7),
.cashflow-profit-detail-table td:nth-child(7) { padding-right:12px; }
.cashflow-profit-period-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.cashflow-profit-period-card {
  display:block;
  width:100%;
  padding:12px 14px;
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#fff;
  color:#102039;
  text-align:left;
  cursor:pointer;
}
.cashflow-profit-period-card:hover { border-color:#8ab8ff; background:#f7fbff; }
.cashflow-profit-period-card.active { border-color:#1677ff; background:#eef6ff; box-shadow:0 0 0 1px rgba(22,119,255,.1); }
.cashflow-profit-period-card span { display:block; margin-bottom:5px; color:#667085; font-size:12px; font-weight:750; }
.cashflow-profit-period-card strong { display:block; color:#102039; font-size:18px; font-variant-numeric:tabular-nums; }
.cashflow-profit-drill-summary { margin-bottom:12px; padding:10px 12px; border-radius:8px; background:#eef6ff; color:#173b70; font-weight:850; }
.profit-row-label { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.profit-row-hint { color:#1677ff; font-size:12px; font-weight:800; white-space:nowrap; }
body.cashflow-profit-drawer-open #main-app .content { overflow:hidden !important; }
@media (max-width:1100px) {
  .cashflow-profit-drill { width:72vw; min-width:0; }
}
@media (max-width:700px) {
  .cashflow-profit-drill { width:100vw; min-width:0; }
  .cashflow-profit-drill-header { padding:14px 16px; }
  .cashflow-profit-drill-body { padding:14px 14px 22px; }
  .cashflow-profit-period-cards { grid-template-columns:1fr; }
}
.cashflow-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.cashflow-toolbar .left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cashflow-tabs { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid #dbe3ef; border-radius: 8px; background: #f8fbff; }
.cashflow-tabs button { border: none; background: transparent; color: #475467; border-radius: 6px; padding: 7px 12px; cursor: pointer; font-weight: 800; font-size: 13px; }
.cashflow-tabs button.active { background: #1677ff; color: #fff; }
.cashflow-toolbar input, .cashflow-toolbar select { border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 9px; font-size: 13px; background: #fff; color: #102039; }
.cashflow-table-wrap { max-height: 560px; overflow: auto; border: 1px solid #e5eaf2; border-radius: 8px; }
.cashflow-select { width: 138px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 7px; font-size: 12px; background: #fff; color: #102039; }
.cashflow-save-status { display: inline-block; min-width: 54px; font-size: 12px; color: #667085; }
.cashflow-unclassified td { background: #fffaf0; }
.cashflow-workspace { width: 100%; min-width: 0; }
.cashflow-reconcile-card { width: 100%; min-height: 0; }
.cashflow-reconcile-wrap { width: 100%; max-height: calc(100vh - 250px); min-height: 520px; overflow: auto; }
.cashflow-reconcile-table { min-width: 1320px; table-layout: fixed; }
.cashflow-reconcile-table th:nth-child(1), .cashflow-reconcile-table td:nth-child(1) { width: 86px; }
.cashflow-reconcile-table th:nth-child(2), .cashflow-reconcile-table td:nth-child(2) { width: 210px; }
.cashflow-reconcile-table th:nth-child(3), .cashflow-reconcile-table td:nth-child(3),
.cashflow-reconcile-table th:nth-child(4), .cashflow-reconcile-table td:nth-child(4),
.cashflow-reconcile-table th:nth-child(5), .cashflow-reconcile-table td:nth-child(5) { width: 110px; }
.cashflow-reconcile-table th:nth-child(6), .cashflow-reconcile-table td:nth-child(6) { width: 210px; }
.cashflow-reconcile-table th:nth-child(7), .cashflow-reconcile-table td:nth-child(7) { width: 100px; }
.cashflow-reconcile-table th:nth-child(8), .cashflow-reconcile-table td:nth-child(8),
.cashflow-reconcile-table th:nth-child(9), .cashflow-reconcile-table td:nth-child(9) { width: 160px; }
.cashflow-reconcile-table th:nth-child(10), .cashflow-reconcile-table td:nth-child(10) { width: 86px; }
.cashflow-reconcile-table select { width: 100%; min-width: 0; }
.cashflow-actions button { border: none; background: #1677ff; color: #fff; border-radius: 6px; padding: 8px 12px; cursor: pointer; font-weight: 800; font-size: 13px; }
.cashflow-actions button.secondary { background: #0f766e; }

/* ===== 损益表总览工作台 ===== */
.cfo-workbench {
  display: grid;
  gap: 16px;
  padding-bottom: 26px;
}

.cfo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 430px;
  gap: 16px;
  align-items: stretch;
}

.cfo-hero-main {
  min-height: 248px;
  border-radius: 10px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(255,255,255,0.08) 0 1px, transparent 1px) 72% 68% / 48px 48px,
    linear-gradient(15deg, rgba(255,255,255,0.08) 0 1px, transparent 1px) 72% 68% / 48px 48px,
    linear-gradient(135deg, #123454 0%, #135f79 55%, #0f766e 100%);
  overflow: hidden;
}

.cfo-kicker {
  color: #8ee7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.cfo-hero-main h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: 38px;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
}

.cfo-hero-copy {
  max-width: 820px;
  margin: 0;
  color: #e8f8ff;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 850;
}

.cfo-hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.cfo-hero-fact {
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.11);
}

.cfo-hero-fact span {
  display: block;
  color: #a9e9ff;
  font-size: 12px;
  font-weight: 950;
}

.cfo-hero-fact strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 23px;
  line-height: 1.12;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.cfo-hero-fact strong.negative,
.cfo-metric .value.negative,
.cfo-path-value.negative {
  color: #ff9daa;
}

.cfo-hero-fact strong.positive,
.cfo-metric .value.positive,
.cfo-path-value.positive {
  color: #8df0c5;
}

.cfo-conclusion,
.cfo-panel,
.cfo-metric,
.cfo-path-card,
.cfo-action-card {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,35,70,0.05);
}

.cfo-conclusion {
  padding: 20px;
}

.cfo-panel-head,
.cfo-conclusion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfo-panel-head h3,
.cfo-conclusion-head h3 {
  margin: 0;
  color: #102039;
  font-size: 19px;
  font-weight: 950;
}

.cfo-panel-head span,
.cfo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #c9defc;
  border-radius: 999px;
  padding: 0 10px;
  color: #1759bd;
  background: #eef5ff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.cfo-insight-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cfo-insight {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #f5f9fe;
}

.cfo-insight b {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.cfo-insight strong {
  display: block;
  color: #152842;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 5px;
}

.cfo-insight span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 850;
}

.cfo-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.cfo-metric {
  min-height: 94px;
  padding: 16px;
}

.cfo-metric.dark {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #124563, #0e7c91);
}

.cfo-metric .label {
  color: #526b88;
  font-size: 12px;
  font-weight: 950;
}

.cfo-metric.dark .label,
.cfo-metric.dark .sub {
  color: #d8f6ff;
}

.cfo-metric .value {
  margin-top: 8px;
  color: #102039;
  font-size: 27px;
  line-height: 1.12;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.cfo-metric.dark .value {
  color: #fff;
}

.cfo-metric .sub {
  margin-top: 8px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.cfo-middle-grid,
.cfo-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  gap: 16px;
  align-items: stretch;
}

.cfo-panel {
  padding: 18px;
  min-width: 0;
}

.cfo-chart {
  height: 310px;
  margin-top: 12px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: #fbfdff;
}

.cfo-pressure-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cfo-pressure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px 54px;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
}

.cfo-pressure-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cfo-pressure-title {
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}

.cfo-pressure-note {
  margin-top: 4px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.cfo-pressure-value {
  text-align: right;
  color: #dc2626;
  font-size: 16px;
  font-weight: 950;
}

.cfo-level {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: #dc2626;
  font-size: 12px;
  font-weight: 950;
}

.cfo-level.medium { background: #d88919; }
.cfo-level.good { background: #079455; }
.cfo-level.pending { background: #d88919; }

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

.cfo-path-card {
  padding: 14px;
  box-shadow: none;
  background: #f8fbff;
}

.cfo-path-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #102039;
  font-size: 14px;
  font-weight: 950;
}

.cfo-path-bars {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.cfo-path-row {
  display: grid;
  grid-template-columns: 88px 1fr 82px;
  gap: 10px;
  align-items: center;
  color: #334862;
  font-size: 12px;
  font-weight: 900;
}

.cfo-track {
  height: 12px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.cfo-fill {
  height: 100%;
  border-radius: inherit;
  background: #0f9f83;
}

.cfo-fill.red { background: #dc2f45; }
.cfo-fill.blue { background: #2563eb; }
.cfo-fill.purple { background: #6d45e8; }
.cfo-path-value {
  text-align: right;
  color: #102039;
  font-weight: 950;
}

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

.cfo-action-card {
  min-height: 78px;
  padding: 14px;
  box-shadow: none;
  background: #f8fbff;
}

.cfo-action-card strong {
  display: block;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 8px;
}

.cfo-action-card span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

@media (max-width: 1280px) {
  .cfo-hero,
  .cfo-middle-grid,
  .cfo-bottom-grid {
    grid-template-columns: 1fr;
  }

  .cfo-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .cfo-hero-facts,
  .cfo-metric-grid,
  .cfo-path-grid,
  .cfo-action-grid,
  .cfo-pressure-row {
    grid-template-columns: 1fr;
  }

  .cfo-pressure-value,
  .cfo-path-value {
    text-align: left;
  }
}
.issue-list { display: grid; gap: 8px; }
.issue-row { display: grid; grid-template-columns: minmax(110px, 1fr) 70px 100px 1.4fr; gap: 8px; align-items: center; border: 1px solid #fee2e2; background: #fff7f7; border-radius: 8px; padding: 9px 10px; font-size: 12px; }
.issue-row .name { color: #991b1b; font-weight: 900; }
.issue-row .amount { text-align: right; font-weight: 900; color: #991b1b; }
.metric-note { background: #fff7e6; color: #8a5a00; border: 1px solid #ffd591; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:4px 0 10px; }
.section-heading .title { font-size:16px; font-weight:900; color:#102039; }
.section-heading .note { font-size:12px; color:#667085; line-height:1.6; text-align:right; }
.platform-workspace-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 16px;
  padding: 8px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
}
.platform-workspace-tabs button {
  border: 1px solid #d9e2ef;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  min-height: 34px;
}
.platform-workspace-tabs button:hover {
  border-color: #91caff;
  color: #0958d9;
  background: #f0f7ff;
}
.platform-workspace-tabs button.active {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.platform-workspace-tabs .utility {
  margin-left: auto;
  background: #ecfdf3;
  border-color: #a7f3d0;
  color: #047857;
}
.platform-command-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.platform-command-bar button {
  border: 1px solid #d9e2ef;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  min-height: 74px;
}
.platform-command-bar button:hover {
  border-color: #91caff;
  background: #f8fbff;
}
.platform-command-bar .label {
  display: block;
  color: #102039;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
}
.platform-command-bar .hint {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}
.platform-command-bar .primary {
  background: #f0f7ff;
  border-color: #91caff;
}
.platform-customer-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, .7fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}
.platform-customer-toolbar input,
.platform-customer-toolbar select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  color: #102039;
  font-size: 13px;
}
.platform-customer-toolbar button,
.platform-customer-actions button,
.platform-selected-actions button {
  border: 1px solid #d9e2ef;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}
.platform-customer-toolbar button:hover,
.platform-customer-actions button:hover,
.platform-selected-actions button:hover {
  border-color: #91caff;
  background: #f0f7ff;
  color: #0958d9;
}
.platform-customer-actions,
.platform-selected-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-customer-actions .primary,
.platform-selected-actions .primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.platform-customer-actions .success,
.platform-selected-actions .success {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.platform-customer-actions .warning,
.platform-selected-actions .warning {
  background: #fff7e6;
  border-color: #ffd591;
  color: #ad6800;
}
.platform-customer-actions .primary:hover,
.platform-selected-actions .primary:hover,
.platform-customer-actions .success:hover,
.platform-selected-actions .success:hover {
  filter: brightness(.96);
  color: #fff;
}
.platform-selected-customer {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.7fr);
  gap: 12px;
  align-items: start;
}
.platform-selected-customer .name {
  color: #102039;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.35;
}
.platform-selected-customer .meta {
  color: #667085;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 6px;
}
.platform-customer-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.platform-customer-mini-card {
  background: #f8fbff;
  border: 1px solid #d9e8ff;
  border-radius: 8px;
  padding: 10px;
  min-height: 64px;
}
.platform-customer-mini-card .label {
  color: #667085;
  font-size: 12px;
}
.platform-customer-mini-card .value {
  color: #102039;
  font-size: 18px;
  font-weight: 950;
  margin-top: 4px;
}
.platform-customer-console-table tr.selected {
  background: #f0f7ff;
}
.platform-customer-console-table td {
  vertical-align: top;
}
.platform-admin-console {
  --pa-bg: #eef4fb;
  --pa-panel: #ffffff;
  --pa-border: #d8e2ee;
  --pa-ink: #14233a;
  --pa-muted: #617084;
  --pa-blue: #1769e0;
  --pa-green: #0f8a63;
  --pa-amber: #b7791f;
  --pa-red: #c2413a;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 34px);
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pa-bg);
  color: var(--pa-ink);
}
.platform-admin-rail {
  background: #112238;
  color: #dbe7f6;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.platform-admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.platform-admin-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #1769e0;
  font-size: 15px;
  font-weight: 950;
}
.platform-admin-brand-name {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}
.platform-admin-brand-sub {
  margin-top: 3px;
  color: #9fb1c7;
  font-size: 12px;
  font-weight: 800;
}
.platform-admin-rail-title {
  margin: 2px 4px -8px;
  color: #8ea3bd;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-rail .platform-workspace-tabs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.platform-admin-rail .platform-workspace-tabs button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  color: #dbe7f6;
  padding: 11px 12px;
}
.platform-admin-rail .platform-workspace-tabs button:hover {
  border-color: rgba(111,172,255,.55);
  background: rgba(23,105,224,.24);
  color: #fff;
}
.platform-admin-rail .platform-workspace-tabs button.active {
  border-color: #66a6ff;
  background: #1769e0;
  color: #fff;
}
.platform-admin-rail .platform-workspace-tabs .utility {
  margin-left: 0;
  background: rgba(15,138,99,.18);
  border-color: rgba(45,212,191,.32);
  color: #d6fff4;
}
.platform-admin-rail-note {
  color: #cfe0f7;
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 10px;
}
.platform-admin-side-status {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.05);
}
.platform-admin-side-status h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: #fff;
}
.platform-admin-status-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #aabbd0;
  font-size: 12px;
}
.platform-admin-status-line b {
  color: #fff;
  font-weight: 950;
}
.platform-admin-status-line .green { color: #5ee4b5; }
.platform-admin-status-line .amber { color: #ffd166; }
.platform-admin-status-line .red { color: #ff8a80; }
.platform-admin-main {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}
.platform-admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.platform-admin-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #617084;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}
.platform-admin-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #18b26b;
  box-shadow: 0 0 0 5px rgba(24,178,107,.12);
  flex: 0 0 auto;
}
.platform-admin-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-admin-search {
  width: min(390px, 42vw);
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--pa-border);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}
.platform-admin-search input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  color: #14233a;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
}
.platform-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--pa-border);
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-pill.green {
  border-color: #b7efcf;
  background: #effdf6;
  color: #047857;
}
.platform-admin-refresh {
  min-height: 38px;
  border: 1px solid #1769e0;
  background: #1769e0;
  color: #fff;
  border-radius: 8px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.platform-admin-status-note {
  border: 1px solid #cfe3ff;
  background: #f6faff;
  color: #24466f;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}
.platform-admin-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr);
  gap: 16px;
}
.platform-admin-hero,
.platform-admin-panel,
.platform-admin-kpi,
.platform-admin-tenant-panel {
  border: 1px solid var(--pa-border);
  border-radius: 8px;
  background: var(--pa-panel);
  box-shadow: 0 12px 28px rgba(21,42,71,.06);
}
.platform-admin-hero {
  padding: 24px;
  min-height: 245px;
  display: grid;
  align-content: space-between;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 54%, #edf7f5 100%);
}
.platform-admin-eyebrow {
  color: #1769e0;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}
.platform-admin-hero h1 {
  margin: 8px 0 8px;
  color: #102039;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}
.platform-admin-hero p {
  margin: 0;
  max-width: 850px;
  color: #52637a;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
}
.platform-admin-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.platform-admin-hero-actions button,
.platform-admin-mini-action {
  border: 1px solid var(--pa-border);
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.platform-admin-hero-actions .primary,
.platform-admin-mini-action.primary {
  border-color: #1769e0;
  background: #1769e0;
  color: #fff;
}
.platform-admin-hero-actions .success,
.platform-admin-mini-action.success {
  border-color: #0f8a63;
  background: #0f8a63;
  color: #fff;
}
.platform-admin-todo-list,
.platform-admin-list {
  display: grid;
  gap: 9px;
}
.platform-admin-panel {
  padding: 16px;
  min-width: 0;
}
.platform-admin-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.platform-admin-panel-title h3 {
  margin: 0;
  color: #102039;
  font-size: 16px;
  font-weight: 950;
}
.platform-admin-chip,
.platform-admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d8e2ee;
  background: #f8fafc;
  color: #475569;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.platform-admin-chip.green,
.platform-admin-badge.green { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.platform-admin-chip.amber,
.platform-admin-badge.amber { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.platform-admin-chip.red,
.platform-admin-badge.red { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }
.platform-admin-todo {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}
.platform-admin-todo-no {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
  color: #1769e0;
  font-weight: 950;
  font-size: 12px;
}
.platform-admin-todo b,
.platform-admin-list b {
  display: block;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}
.platform-admin-todo span:not(.platform-admin-badge),
.platform-admin-list span:not(.platform-admin-badge) {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 2px;
}
.platform-admin-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.platform-admin-kpi {
  padding: 14px;
  min-height: 104px;
  text-align: left;
}
.platform-admin-kpi.clickable,
.platform-admin-quality-card.clickable,
.platform-admin-module-card.clickable,
.platform-admin-list-item.clickable,
.platform-customer-mini-card.clickable,
.platform-workflow-row.clickable {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
button.platform-admin-kpi {
  appearance: none;
  border: 1px solid #e5edf7;
  color: inherit;
  font: inherit;
  width: 100%;
}
.platform-admin-kpi.clickable:hover,
.platform-admin-quality-card.clickable:hover,
.platform-admin-module-card.clickable:hover,
.platform-admin-list-item.clickable:hover,
.platform-customer-mini-card.clickable:hover,
.platform-workflow-row.clickable:hover,
.platform-focus-pulse {
  transform: translateY(-1px);
  border-color: #9fc7ff;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.12);
}
.platform-click-hint {
  display: inline-block;
  margin-top: 5px;
  color: #0958d9;
  font-weight: 900;
}
.platform-admin-kpi.primary {
  border-color: #9fc7ff;
  background: #f2f7ff;
}
.platform-admin-kpi .label {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-kpi .value {
  margin-top: 7px;
  color: #102039;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}
.platform-admin-kpi .note {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}
.platform-admin-kpi .value.green,
.platform-admin-text-green { color: #0f8a63; }
.platform-admin-kpi .value.amber,
.platform-admin-text-amber { color: #b7791f; }
.platform-admin-kpi .value.red,
.platform-admin-text-red { color: #c2413a; }
.platform-admin-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(310px, .78fr);
  gap: 16px;
}
.platform-admin-middle-grid,
.platform-admin-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.platform-admin-bottom-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.platform-admin-workflow-board,
.platform-admin-ops-board {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.platform-customer-ops-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 12px;
}
.platform-customer-ops-top .platform-admin-workflow-board {
  margin-top: 0;
  grid-template-columns: 1fr;
}
.platform-admin-workflow-board {
  grid-template-columns: minmax(0, 1fr) minmax(420px, .75fr);
}
.platform-onboarding-compact-grid,
.platform-inline-form-grid {
  display: grid;
  gap: 10px;
}
.platform-onboarding-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.platform-onboarding-compact-grid .platform-admin-quality-card b {
  font-size: 14px;
  line-height: 1.3;
}
.platform-onboarding-strip-board {
  grid-template-columns: 1fr;
}
.platform-onboarding-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.platform-onboarding-step {
  min-width: 118px;
  min-height: 96px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fbfdff;
  padding: 9px 10px;
  cursor: pointer;
}
.platform-onboarding-step:hover {
  border-color: #0f766e;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .08);
}
.platform-onboarding-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.platform-onboarding-step-index {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}
.platform-onboarding-step b {
  display: block;
  margin-top: 8px;
  color: #102039;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 950;
}
.platform-onboarding-step span:last-child {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
}
.platform-inline-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.platform-inline-form-grid input,
.platform-inline-form-grid select,
.platform-inline-form-grid textarea {
  width: 100%;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.platform-inline-form-grid textarea {
  grid-column: 1 / -1;
  resize: vertical;
}
.platform-inline-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.platform-inline-form-actions button {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}
.platform-inline-form-actions button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.platform-inline-customer-admin-workspace {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.platform-inline-customer-admin-workspace:empty {
  display: none;
}
.platform-inline-customer-admin-workspace .section-heading,
.platform-inline-customer-admin-workspace #customer-admin-status,
.platform-inline-customer-admin-workspace #customer-admin-summary,
.platform-inline-customer-admin-workspace #customer-admin-context,
.platform-inline-customer-admin-workspace .platform-command-bar,
.platform-inline-customer-admin-workspace [data-customer-section="overview"] {
  display: none !important;
}
.platform-inline-customer-admin-workspace #customer-workspace-tabs {
  margin: 0;
}
.platform-inline-customer-admin-workspace .chart-row {
  margin: 0;
}
.platform-workflow-lanes,
.platform-workflow-side,
.platform-ops-list,
.platform-guard-list {
  display: grid;
  gap: 9px;
}
.platform-workflow-row {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}
.platform-workflow-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.platform-workflow-row-head b {
  display: block;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}
.platform-workflow-row-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}
.platform-workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.platform-workflow-step {
  min-height: 34px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  padding: 6px 7px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}
.platform-workflow-step.done {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.platform-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.platform-ops-metric {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px;
}
.platform-ops-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}
.platform-ops-metric b {
  display: block;
  margin-top: 6px;
  color: #102039;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.platform-guard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}
.platform-admin-tenant-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) auto;
  gap: 8px;
  margin-bottom: 12px;
}
.platform-admin-tenant-tools input,
.platform-admin-tenant-tools select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--pa-border);
  border-radius: 8px;
  background: #fff;
  color: #102039;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 800;
}
.platform-admin-tenant-tools button {
  border: 1px solid var(--pa-border);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.platform-admin-selected {
  margin-bottom: 12px;
}
.platform-admin-selected .platform-selected-customer {
  margin-bottom: 0;
  border-color: #cfe3ff;
  box-shadow: none;
}
.platform-admin-table-wrap {
  overflow: auto;
  border: 1px solid #e5edf7;
  border-radius: 8px;
}
.platform-admin-table-wrap table {
  min-width: 820px;
}
.platform-admin-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}
.platform-admin-bar-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.platform-admin-track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}
.platform-admin-fill {
  height: 100%;
  border-radius: inherit;
  background: #1769e0;
}
.platform-admin-fill.green { background: #0f8a63; }
.platform-admin-fill.amber { background: #d98a12; }
.platform-admin-fill.red { background: #c2413a; }
.platform-admin-matrix {
  display: grid;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  overflow: hidden;
}
.platform-admin-matrix-row {
  display: grid;
  grid-template-columns: 150px repeat(7, minmax(54px, 1fr));
  border-top: 1px solid #e5edf7;
}
.platform-admin-matrix-row:first-child { border-top: none; }
.platform-admin-matrix-cell {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-left: 1px solid #e5edf7;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-matrix-cell:first-child {
  border-left: none;
  justify-content: start;
}
.platform-admin-matrix-row.head .platform-admin-matrix-cell {
  background: #f8fafc;
  color: #102039;
}
.platform-admin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
}
.platform-admin-dot.full { background: #0f8a63; }
.platform-admin-dot.part { background: #d98a12; }
.platform-admin-dot.danger { background: #c2413a; }
.platform-admin-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.platform-admin-module-card,
.platform-admin-quality-card,
.platform-admin-list-item {
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px;
}
.platform-admin-module-card b {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}
.platform-admin-module-card span:last-child {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}
.platform-admin-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.platform-admin-quality-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}
.platform-admin-quality-card b {
  display: block;
  margin: 5px 0;
  color: #102039;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}
.platform-admin-list-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.platform-admin-list-time {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  color: #64748b;
  background: #fbfdff;
  font-size: 13px;
  font-weight: 850;
}
.platform-admin-console {
  --pa-bg: #f4f6f8;
  --pa-panel: #ffffff;
  --pa-panel-soft: #f8fafc;
  --pa-border: #d7dde5;
  --pa-ink: #172033;
  --pa-muted: #667085;
  --pa-blue: #2557d6;
  --pa-green: #0f766e;
  --pa-amber: #b45309;
  --pa-red: #b42318;
  grid-template-columns: 252px minmax(0, 1fr);
  border: none;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(15,118,110,.08), transparent 28%),
    linear-gradient(180deg, #f7f9fb 0%, #eef2f6 100%);
}
.platform-admin-rail {
  position: sticky;
  top: 0;
  height: calc(100vh - 34px);
  overflow: auto;
  background: rgba(255,255,255,.92);
  color: var(--pa-ink);
  border-right: 1px solid var(--pa-border);
  box-shadow: 8px 0 24px rgba(16,24,40,.04);
}
.platform-admin-brand {
  border-bottom-color: #e4e7ec;
}
.platform-admin-brand-mark {
  background: #101828;
  color: #ffffff;
}
.platform-admin-brand-name {
  color: #101828;
}
.platform-admin-brand-sub,
.platform-admin-rail-title {
  color: #667085;
}
.platform-admin-rail .platform-workspace-tabs button {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-color: transparent;
  background: transparent;
  color: #344054;
  border-radius: 8px;
}
.platform-admin-rail .platform-workspace-tabs button:hover {
  border-color: #c7d7fe;
  background: #f2f6ff;
  color: #1d4ed8;
}
.platform-admin-rail .platform-workspace-tabs button.active {
  border-color: #b7c8ff;
  background: #eef4ff;
  color: #173ea5;
  box-shadow: inset 3px 0 0 #2557d6;
}
.platform-nav-label {
  display: block;
  font-size: 13px;
  font-weight: 950;
}
.platform-nav-note {
  display: block;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}
.platform-admin-rail-tools {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}
.platform-admin-rail-tools b {
  color: #101828;
  font-size: 12px;
}
.platform-admin-rail-tools button {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}
.platform-admin-rail-tools button:hover {
  border-color: #7dd3c7;
  background: #effcf9;
  color: #0f766e;
}
.platform-admin-rail-note {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  color: #667085;
}
.platform-admin-side-status {
  border-color: #e4e7ec;
  background: #ffffff;
}
.platform-admin-side-status h4,
.platform-admin-status-line b {
  color: #101828;
}
.platform-admin-status-line {
  border-top-color: #eef2f6;
  color: #667085;
}
.platform-admin-status-line .green { color: #0f766e; }
.platform-admin-status-line .amber { color: #b45309; }
.platform-admin-status-line .red { color: #b42318; }
.platform-admin-main {
  padding: 18px 22px 26px;
}
.platform-admin-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -18px -22px 0;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(215,221,229,.88);
  background: rgba(247,249,251,.94);
  backdrop-filter: blur(10px);
}
.platform-admin-crumb {
  color: #344054;
}
.platform-admin-search,
.platform-admin-pill,
.platform-admin-refresh,
.platform-admin-status-note,
.platform-admin-hero,
.platform-admin-panel,
.platform-admin-kpi,
.platform-admin-tenant-panel,
.platform-admin-module-card,
.platform-admin-quality-card,
.platform-admin-list-item,
.platform-workflow-row,
.platform-ops-metric,
.platform-guard-item {
  border-radius: 8px;
}
.platform-admin-status-note {
  border-color: #d0d5dd;
  background: #ffffff;
  color: #344054;
}
.platform-admin-command-grid {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(380px, 1.15fr) minmax(280px, .9fr);
  gap: 14px;
  align-items: stretch;
}
.platform-admin-command-panel {
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,248,251,.94)),
    linear-gradient(135deg, rgba(15,118,110,.08), rgba(37,87,214,.06));
  box-shadow: 0 18px 42px rgba(16,24,40,.08);
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.platform-admin-command-panel h1 {
  margin: 6px 0 7px;
  color: #101828;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}
.platform-admin-command-panel p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}
.platform-admin-focus-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.platform-admin-focus-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}
.platform-admin-focus-item b {
  color: #101828;
  font-size: 13px;
  font-weight: 950;
}
.platform-admin-focus-item span {
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}
.platform-admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.platform-admin-action-grid button {
  min-height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 950;
}
.platform-admin-action-grid button.primary {
  border-color: #2557d6;
  background: #2557d6;
  color: #ffffff;
}
.platform-admin-action-grid button.success {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}
.platform-admin-action-grid button.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b45309;
}
.platform-admin-action-grid.compact button {
  min-height: 38px;
}
.platform-admin-home-overview {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}
.platform-home-hero {
  position: relative;
  min-height: 268px;
  overflow: hidden;
  border: 1px solid #d7dde8;
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 42%, rgba(52, 211, 153, .20) 0 20%, rgba(52, 211, 153, 0) 42%),
    radial-gradient(circle at 74% 44%, rgba(14, 165, 233, .18) 0 23%, rgba(14, 165, 233, 0) 44%),
    linear-gradient(135deg, #ffffff 0%, #eef7ff 56%, #e9fbf7 100%);
  box-shadow: 0 20px 50px rgba(16, 24, 40, .08);
}
.platform-home-hero::after {
  content: "";
  position: absolute;
  right: 7%;
  top: 20%;
  width: 180px;
  height: 180px;
  border: 34px solid rgba(56, 189, 248, .16);
  border-radius: 50%;
}
.platform-home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 34px 34px 30px;
}
.platform-home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.8px;
}
.platform-home-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}
.platform-home-title h1 {
  margin: 12px 0 0;
  color: #101828;
  font-size: 46px;
  line-height: 1.04;
  font-weight: 950;
}
.platform-home-title p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 800;
}
.platform-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.platform-home-actions button {
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  color: #1d2939;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .06);
}
.platform-home-actions button.primary {
  border-color: #0284c7;
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(2, 132, 199, .22);
}
.platform-home-health {
  min-height: 268px;
  border-radius: 18px;
  padding: 24px 22px;
}
.platform-home-health-head h3 {
  margin: 0;
  color: #101828;
  font-size: 26px;
  font-weight: 950;
}
.platform-home-health-head p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}
.platform-home-score {
  width: 132px;
  height: 132px;
  margin: 20px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#16a34a var(--score-deg, 280deg), #e5e7eb 0);
  position: relative;
}
.platform-home-score::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #ffffff;
}
.platform-home-score-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.platform-home-score-inner b {
  display: block;
  color: #101828;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}
.platform-home-score-inner span {
  display: block;
  margin-top: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}
.platform-home-health-list {
  display: grid;
  gap: 10px;
}
.platform-home-health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #f2f5f8;
}
.platform-home-health-row b {
  display: block;
  color: #101828;
  font-size: 13px;
  font-weight: 950;
}
.platform-home-health-row span {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.platform-home-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.platform-home-metric {
  border: 1px solid #d7dde8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  padding: 18px 18px 16px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, .07);
}
.platform-home-metric span {
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}
.platform-home-metric b {
  display: block;
  margin-top: 10px;
  color: #101828;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}
.platform-home-metric em {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #047857;
  padding: 5px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}
.platform-home-metric em.warn {
  background: #fff7ed;
  color: #b45309;
}
.platform-home-metric em.danger {
  background: #fff1f0;
  color: #b42318;
}
.platform-home-lower {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 340px;
  gap: 18px;
  margin-top: 18px;
}
.platform-home-section {
  border: 1px solid #d7dde8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  padding: 18px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, .07);
}
.platform-home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.platform-home-section-head h3 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 950;
}
.platform-home-section-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}
.platform-home-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.platform-home-filter-row button {
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #ffffff;
  color: #475467;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
}
.platform-home-filter-row button.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}
.platform-home-org-list,
.platform-home-task-list {
  display: grid;
  gap: 10px;
}
.platform-home-org-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, .6fr) minmax(120px, .6fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
}
.platform-home-org-row b,
.platform-home-task-row b {
  color: #101828;
  font-size: 13px;
  font-weight: 950;
}
.platform-home-org-row span,
.platform-home-task-row span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}
.platform-home-task-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: #fbfcfe;
  border: 1px solid #eef2f6;
}
.platform-home-task-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff1f0;
  color: #b42318;
  font-weight: 950;
}
.platform-home-task-icon.green {
  background: #ecfdf3;
  color: #047857;
}
.platform-home-task-icon.amber {
  background: #fff7ed;
  color: #b45309;
}
.platform-home-task-icon.red {
  background: #fff1f0;
  color: #b42318;
}
.platform-admin-selected-command .platform-admin-panel-title {
  margin-bottom: 8px;
}
.platform-admin-selected-command .platform-selected-customer {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.platform-admin-selected-command .platform-selected-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.platform-admin-selected-command .platform-selected-actions button {
  min-height: 36px;
}
.platform-admin-selected-command .platform-customer-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.platform-admin-selected-command .platform-customer-mini-card {
  min-height: 58px;
  background: #f8fafc;
}
.platform-selected-data-line {
  grid-column: 1 / -1;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 800;
}
.platform-admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 4px 0 -4px;
}
.platform-admin-section-heading h2 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 950;
}
.platform-admin-section-heading p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
}
.platform-admin-tenant-panel {
  grid-column: 1 / -1;
}
.platform-admin-kpi {
  box-shadow: 0 10px 28px rgba(16,24,40,.05);
}
.platform-admin-kpi-strip {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  overflow-x: auto;
  padding-bottom: 2px;
}
.platform-admin-table-wrap {
  background: #ffffff;
}
.platform-admin-table-wrap table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}
.platform-admin-panel-title h3 {
  font-size: 15px;
}
.platform-admin-bottom-grid .platform-admin-panel,
.platform-admin-middle-grid .platform-admin-panel {
  min-height: 240px;
}
@media (max-width: 900px) {
  .platform-command-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .platform-customer-toolbar,
  .platform-selected-customer {
    grid-template-columns: 1fr;
  }
  .platform-customer-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .platform-admin-console,
  .platform-admin-command-grid,
  .platform-admin-hero-grid,
  .platform-admin-main-grid,
  .platform-admin-middle-grid,
  .platform-admin-bottom-grid,
  .platform-admin-workflow-board,
  .platform-admin-home-overview,
  .platform-customer-ops-top,
  .platform-home-lower,
  .platform-ops-grid {
    grid-template-columns: 1fr;
  }
  .platform-admin-rail {
    min-height: auto;
  }
  .platform-admin-kpi-strip,
  .platform-admin-quality-grid,
  .platform-home-metric-grid,
  .platform-admin-module-grid,
  .platform-workflow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .platform-home-org-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .platform-admin-tenant-tools {
    grid-template-columns: 1fr;
  }
  .platform-admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .platform-admin-search {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .platform-command-bar {
    grid-template-columns: 1fr;
  }
  .platform-workspace-tabs .utility {
    margin-left: 0;
  }
  .platform-customer-mini-grid {
    grid-template-columns: 1fr;
  }
  .platform-home-title h1 {
    font-size: 34px;
  }
  .platform-home-hero-content {
    padding: 24px 20px;
  }
  .platform-admin-main {
    padding: 12px;
  }
  .platform-admin-topbar {
    margin: -12px -12px 0;
    padding: 12px;
  }
  .platform-admin-action-grid,
  .platform-admin-selected-command .platform-selected-actions,
  .platform-admin-kpi-strip,
  .platform-admin-quality-grid,
  .platform-home-metric-grid,
  .platform-home-task-row,
  .platform-home-org-row,
  .platform-admin-module-grid {
    grid-template-columns: 1fr;
  }
  .platform-admin-matrix-row {
    grid-template-columns: 128px repeat(7, 52px);
  }
}
#overview-action-judgement .chart-box { border-left: 5px solid #1677ff; }
#overview-management-signals .chart-box { border-left: 5px solid #13c2c2; }
.analysis-chain-note { background:#f8fbff; border:1px solid #d9e8ff; color:#24466f; border-radius:8px; padding:10px 12px; margin-bottom:12px; font-size:13px; line-height:1.7; }
.boss-primary-note { background: #fff1f0; color: #7a1c12; border: 1px solid #ffa39e; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.7; display: grid; gap: 4px; }
.boss-primary-note strong { font-size: 16px; color: #cf1322; }
.formula-card { background: white; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.formula-card .formula-title { font-size: 15px; color: #666; margin-bottom: 8px; }
.formula-card .formula-value { font-size: 24px; font-weight: 600; color: #1a1a2e; }
.diagnosis-box { background: white; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.diagnosis-box h3 { font-size: 15px; margin-bottom: 8px; color: #1a1a2e; }
.diagnosis-summary { font-size: 13px; color: #555; margin-bottom: 10px; }
.diagnosis-item { border-top: 1px solid #eee; padding: 10px 0; font-size: 13px; }
.diagnosis-item .title { font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.diagnosis-item .evidence { color: #444; margin-bottom: 4px; }
.diagnosis-item .next { color: #666; }
.missing-data { color: #8a5a00; background: #fff7e6; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 12px; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.boundary-card { background: white; border-radius: 8px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); font-size: 13px; }
.boundary-card h4 { margin-bottom: 8px; color: #1a1a2e; }
.boundary-card ul { padding-left: 18px; line-height: 1.8; }
.check-list { background: #f6ffed; border: 1px solid #b7eb8f; color: #245b12; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.ai-card { background: #f7fbff; border: 1px solid #91caff; border-radius: 8px; padding: 14px; margin-bottom: 16px; font-size: 13px; }
.ai-card h3 { font-size: 15px; margin-bottom: 8px; color: #1a1a2e; display: flex; justify-content: space-between; align-items: center; }
.ai-status { color: #666; font-weight: 400; font-size: 12px; }
.ai-content { color: #333; line-height: 1.8; margin: 8px 0; }
.ai-summary-list { display: grid; gap: 8px; }
.ai-summary-item { background: white; border: 1px solid #d6e4ff; border-radius: 6px; padding: 8px 10px; }
.ai-summary-item .tag { display: inline-block; min-width: 58px; color: #1677ff; font-weight: 600; }
.ai-raw { margin-top: 8px; color: #666; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.ai-toggle { border: none; background: transparent; color: #1677ff; cursor: pointer; font-size: 12px; padding: 0; margin-top: 6px; }
.ai-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ai-actions button { background: #1677ff; color: white; border: none; border-radius: 4px; padding: 6px 10px; cursor: pointer; font-size: 12px; }
.ai-actions button.secondary { background: #595959; }
.ai-message { color: #8a5a00; font-size: 12px; }

.boss-tree { background: white; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.boss-tree h3 { font-size: 15px; color: #1a1a2e; margin-bottom: 8px; }
.boss-tree .headline { font-size: 14px; color: #333; margin-bottom: 10px; line-height: 1.7; }
.boss-judgment { background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.boss-judgment .label { color: #389e0d; font-weight: 700; margin-right: 6px; }
.boss-formula { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.boss-formula .node { background: #f6f8fa; border-radius: 6px; padding: 8px; font-size: 12px; }
.boss-ranking { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.boss-driver-card { background: #fafafa; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
.boss-driver-card h4 { font-size: 13px; color: #1a1a2e; margin-bottom: 6px; }
.boss-list { font-size: 13px; line-height: 1.7; }
.boss-list .item { border-top: 1px solid #eee; padding: 8px 0; }
.boss-list .item:first-child { border-top: none; }
.boss-list .meta { color: #666; font-size: 12px; }
.boss-boundary-brief { color: #888; font-size: 12px; margin-top: 8px; }
.boss-context-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.boss-context-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.7; }
.boss-context-card h4 { font-size: 13px; color: #1a1a2e; margin-bottom: 4px; }
.boss-context-card .value { font-weight: 700; color: #1a1a2e; }
.boss-context-card button { margin-top: 6px; border: none; background: #1677ff; color: white; border-radius: 4px; padding: 5px 8px; cursor: pointer; font-size: 12px; }

/* 面包屑 */
.breadcrumb { font-size: 12px; color: #888; margin-bottom: 12px; }
.breadcrumb span { cursor: pointer; color: #1890ff; }
.breadcrumb span:hover { text-decoration: underline; }

/* 隐藏 */
.hidden { display: none !important; }

body.platform-entry #companyFilter,
body.platform-entry #monthFilter,
body.customer-entry #companyFilter,
body.customer-entry #monthFilter {
  display: none !important;
}

body.platform-entry .sidebar .nav-item:not(.platform-admin-only):not(.customer-admin-only) {
  display: none !important;
}

body.customer-entry .sidebar .nav-item:not(.customer-admin-only) {
  display: none !important;
}

/* 登录页面 */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
  background: white;
  border-radius: 12px;
  padding: 40px;
  width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-size: 24px;
}
.login-box .form-group {
  margin-bottom: 20px;
}
.login-box label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}
.login-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}
.login-box input:focus {
  outline: none;
  border-color: #667eea;
}
.login-box button {
  width: 100%;
  padding: 14px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}
.login-box button:hover {
  background: #5a6fd6;
}
.login-box .error {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}
.login-box .hint {
  color: #888;
  font-size: 12px;
  margin-top: 20px;
  text-align: center;
}
.site-compliance-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.94);
  border-top: 1px solid #dbe3ef;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}
.site-compliance-footer a {
  color: #0958d9;
  text-decoration: none;
  font-weight: 700;
}
.site-compliance-footer a:hover {
  text-decoration: underline;
}

/* 客户版视觉包装 */
:root {
  --page-bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dbe3ef;
  --line-soft: #edf1f7;
  --text: #172033;
  --muted: #667085;
  --primary: #1677ff;
  --primary-soft: #e8f3ff;
  --primary-softer: #f3f8ff;
  --success: #2f9e44;
  --warning: #ad6800;
  --danger: #cf1322;
  --shadow: 0 8px 22px rgba(15, 35, 70, 0.07);
  --shadow-soft: 0 2px 10px rgba(15, 35, 70, 0.05);
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  height: 100vh !important;
  overflow: hidden !important;
}

.login-page {
  position: relative;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(22,119,255,0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22,119,255,0.045) 1px, transparent 1px),
    #f4f7fb;
  background-size: 44px 44px;
}

.login-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  width: min(920px, 100%);
  min-height: 448px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #d8e2ef;
  box-shadow: 0 22px 58px rgba(15, 35, 70, 0.18);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 42px;
  background: linear-gradient(135deg, #102039 0%, #17476f 58%, #0f766e 100%);
  color: #fff;
}

.login-kicker {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  color: #d6fff5;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}

.login-brand h2 {
  margin: 18px 0 10px;
  color: #fff;
  text-align: left;
  font-size: 30px;
  line-height: 1.22;
}

.login-brand p {
  max-width: 360px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.8;
}

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

.login-metrics span {
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  background: #fff;
}

.login-form-title {
  margin-bottom: 24px;
}

.login-form-title strong {
  display: block;
  margin-bottom: 6px;
  color: #102039;
  font-size: 20px;
  line-height: 1.35;
}

.login-form-title span {
  color: #667085;
  font-size: 13px;
}

.login-box .form-group {
  margin-bottom: 16px;
}

.login-box label {
  color: #344054;
  font-weight: 700;
}

.login-box input {
  height: 44px;
  border-color: #cfd8e6;
  border-radius: 8px;
  color: #102039;
  background: #fbfdff;
}

.login-box input:focus {
  border-color: #1677ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

.login-box select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #fbfdff;
  color: #102039;
  font-size: 14px;
}

.login-box select:focus {
  outline: none;
  border-color: #1677ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 62px;
}

.login-box .password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: auto;
  min-width: 46px;
  height: 32px;
  margin: 0;
  padding: 0 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #1677ff;
  font-size: 12px;
}

.login-box .password-toggle:hover {
  transform: translateY(-50%);
  background: #eef6ff;
}

.login-box button {
  margin-top: 4px;
  border-radius: 8px;
  background: #0f766e;
  box-shadow: 0 8px 18px rgba(15,118,110,0.22);
  font-weight: 800;
}

.login-box button:hover {
  background: #0b645d;
}

.login-box .hint {
  margin-top: 18px;
  color: #667085;
}

.login-box .form-group .hint {
  margin-top: 7px;
  text-align: left;
  line-height: 1.5;
}

.login-assistance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #667085;
  font-size: 12px;
}

.login-box .text-button {
  width: auto;
  margin: 0;
  padding: 4px 0;
  background: transparent;
  box-shadow: none;
  color: #1677ff;
  font-size: 13px;
  font-weight: 700;
}

.login-box .text-button:hover {
  background: transparent;
  color: #0958d9;
  text-decoration: underline;
}

.password-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.login-box button.secondary {
  border: 1px solid #cfd8e6;
  background: #fff;
  box-shadow: none;
  color: #344054;
}

.login-box button.secondary:hover {
  background: #f8fafc;
}

@media (max-width: 760px) {
  .login-page {
    align-items: flex-start;
    padding: 18px;
  }

  .login-box {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-brand {
    gap: 22px;
    padding: 28px 24px;
  }

  .login-brand h2 {
    font-size: 24px;
  }

  .login-metrics {
    grid-template-columns: 1fr;
  }

  .login-metrics span {
    min-height: 0;
  }

  .login-form {
    padding: 28px 24px;
  }
}

.header {
  height: 56px;
  padding: 0 22px;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(15,35,70,0.05);
}

.header h1 {
  display: grid;
  gap: 1px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
}

.header h1::after {
  content: "经营收款主口径 · 收入校准 · 订单核对";
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.header .filters {
  gap: 8px;
  flex-wrap: nowrap;
}

.header select,
#staffRole {
  height: 32px;
  min-width: 116px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  padding: 5px 28px 5px 10px;
}

#user-info {
  color: var(--muted) !important;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger {
  height: 32px;
  margin-left: 2px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.account-trigger::before {
  width: 20px;
  height: 20px;
}

.account-menu {
  top: 38px;
  border-radius: 10px;
}

/* ===== 全站统一视觉：更规整、少压迫感 ===== */
button,
input,
select,
textarea {
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

button {
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

input,
select,
textarea,
.cashflow-toolbar input,
.cashflow-toolbar select,
.cashflow-select,
.settlement-detail-table input,
.settlement-detail-table select,
.settlement-detail-table textarea,
.categories-toolbar .cat-toolbar-input,
.categories-toolbar .cat-toolbar-select,
.cashflow-category-card-body .cashflow-cat-table input[type="text"],
.cashflow-category-card-body .cashflow-cat-table .cat-select,
.arrival-check-input,
.arrival-check-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15,35,70,0.03);
}

input:focus,
select:focus,
textarea:focus,
.cashflow-toolbar input:focus,
.cashflow-toolbar select:focus,
.cashflow-select:focus,
.settlement-detail-table input:focus,
.settlement-detail-table select:focus,
.settlement-detail-table textarea:focus,
.categories-toolbar .cat-toolbar-input:focus,
.categories-toolbar .cat-toolbar-select:focus,
.cashflow-category-card-body .cashflow-cat-table input[type="text"]:focus,
.cashflow-category-card-body .cashflow-cat-table .cat-select:focus,
.arrival-check-input:focus,
.arrival-check-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

.chart-box,
.kpi-card,
.formula-card,
.diagnosis-box,
.boundary-card,
.boss-tree,
.boss-context-card,
.ai-card,
.cashflow-category-card,
.settlement-day-card,
.settlement-tabs-card,
.cashflow-reconcile-card {
  border-radius: 12px;
}

table th {
  background: #f6f8fb !important;
  color: #334155 !important;
}

table td {
  line-height: 1.55;
}

.metric-note,
.boss-primary-note,
.check-list,
.ai-card {
  line-height: 1.7;
}

.main {
  height: calc(100vh - 56px);
  overflow: hidden;
}

.sidebar {
  width: 208px;
  padding: 14px 10px;
  background: #fcfdff;
  border-right: 1px solid var(--line);
}

.sidebar::before {
  content: "看板导航";
  display: block;
  padding: 0 10px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar .nav-item {
  margin-bottom: 3px;
  padding: 10px 12px 10px 14px;
  border-radius: 8px;
  color: #25324a;
  font-size: 13px;
  font-weight: 750;
  border-left: 3px solid transparent;
  line-height: 1.35;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.sidebar .nav-item:hover {
  background: var(--primary-softer);
  color: #0958d9;
}

.sidebar .nav-item.active {
  background: var(--primary-soft);
  border-left-color: var(--primary);
  color: #0958d9;
  box-shadow: inset 0 0 0 1px rgba(22,119,255,0.10);
  font-weight: 900;
}

.content {
  padding: 20px 22px;
  scrollbar-gutter: stable;
  height: calc(100vh - 56px);
  overflow-y: scroll !important;
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: #8fa1b8 #edf2f8;
  background:
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 240px);
}

.sidebar {
  overflow-y: scroll !important;
  scrollbar-width: auto;
  scrollbar-color: #8fa1b8 #edf2f8;
}

.content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: #edf2f8;
  border-radius: 999px;
}

.content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: #b8c5d6;
  border: 3px solid #edf2f8;
  border-radius: 999px;
}

.content::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #8fa1b8;
}

.kpi-row,
.chart-row,
.boundary-grid,
.boss-context-row,
.boss-ranking {
  gap: 14px;
}

.kpi-card,
.chart-box,
.formula-card,
.diagnosis-box,
.boundary-card,
.boss-tree,
.boss-context-card,
.ai-card {
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 104px;
  padding: 16px 17px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.kpi-card .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.kpi-card .value {
  margin-top: 7px;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.kpi-card .sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.kpi-card .up,
.kpi-card .value.up,
.mini-card .up,
.signal-card .up {
  color: var(--success) !important;
}

.kpi-card .down,
.kpi-card .value.down,
.mini-card .down,
.signal-card .down {
  color: var(--danger) !important;
}

.chart-box h3,
.boss-tree h3,
.diagnosis-box h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.chart-box {
  min-height: 344px;
  overflow: hidden;
}

.chart-box .chart {
  min-height: 300px;
}

.more-toggle,
.ai-actions button,
.boss-context-card button,
button {
  border-radius: 6px;
}

.ai-card {
  background: #f7fbff;
  border-color: #c9ddff;
}

.boss-tree {
  padding: 20px;
}

.boss-judgment {
  background: #edf9f0;
  border-color: #b7e4c1;
}

.metric-note {
  background: #fff9e8;
  border-color: #ffe3a3;
}

table {
  border-radius: 8px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: var(--text);
}

table th {
  padding: 9px 10px !important;
  background: #f7f9fc !important;
  border-bottom: 1px solid var(--line) !important;
  color: #344054 !important;
  font-size: 12px;
  line-height: 1.35;
}

table td {
  padding: 9px 10px;
  border-bottom-color: #edf1f7;
}

tbody tr:nth-child(even) td {
  background-color: #fbfcfe;
}

tbody tr:hover td {
  background-color: #f2f7ff;
}

td[style*="text-align:right"],
td.num,
.money-cell,
.settlement-detail-table .money-cell,
.compact-table td.num,
.profit-table td.num,
.profit-brief-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

#page-calibration {
  padding-bottom: 28px;
}

#main-app .content {
  display: block;
  min-height: 0;
  height: calc(100vh - 56px) !important;
  overflow-y: scroll !important;
  overflow-x: auto;
}

#page-calibration > div {
  max-height: none;
  overflow-y: visible !important;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #8fa1b8 #edf2f8;
}

th {
  font-weight: 850 !important;
}

#page-calibration > div {
  border-radius: 8px !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
}

#youzan-recon-status {
  padding: 10px 12px;
  background: var(--primary-soft);
  border: 1px solid #c9ddff;
  border-radius: 6px;
}

.settlement-recon-wrap {
  display: grid;
  gap: 12px;
}

.settlement-tabs-card {
  margin: 0 0 14px;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
}

.settlement-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.recon-tabs-card {
  margin: 0 0 16px;
  padding: 8px;
  background: #f8fbff;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
}

.recon-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
}

.recon-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #475467;
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 850;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  box-shadow: none;
}

.recon-tab-btn:hover {
  background: #eef6ff;
  color: #0958d9;
  border-color: #cfe4ff;
}

.recon-tab-btn.active {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
  box-shadow: 0 3px 10px rgba(22,119,255,0.20);
}

.settlement-day-card {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.system-order-card {
  position: relative;
  border-left: 6px solid #1677ff;
}

.system-order-card:nth-of-type(4n + 1) { border-left-color: #1677ff; }
.system-order-card:nth-of-type(4n + 2) { border-left-color: #13c2c2; }
.system-order-card:nth-of-type(4n + 3) { border-left-color: #722ed1; }
.system-order-card:nth-of-type(4n + 4) { border-left-color: #fa8c16; }

.system-order-card .settlement-day-head {
  grid-template-columns: 128px minmax(180px, 1.4fr) minmax(150px, 1.1fr) repeat(5, minmax(116px, 1fr));
}

.system-order-index {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
}

.system-order-index .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1677ff;
  color: #fff;
  font-weight: 950;
  font-size: 13px;
}

.system-order-index .type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.system-order-main {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.system-order-main .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.system-order-main .value {
  color: #102039;
  font-size: 15px;
  font-weight: 950;
  word-break: break-all;
}

.settlement-day-head {
  display: grid;
  grid-template-columns: minmax(116px, 1.1fr) repeat(4, minmax(116px, 1fr));
  gap: 8px;
  align-items: stretch;
  padding: 10px 12px;
  background: #fbfdff;
  border-bottom: 1px solid #edf1f7;
}

.settlement-day-date {
  display: grid;
  align-content: center;
  gap: 2px;
  color: #102039;
  font-weight: 900;
}

.settlement-day-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settlement-mini-stat {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 6px;
  min-width: 0;
}

.settlement-mini-stat .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settlement-mini-stat .value {
  color: #102039;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.settlement-detail-scroll {
  overflow-x: auto;
  max-width: 100%;
  padding: 10px 12px 12px;
}

.settlement-detail-table {
  width: 100%;
  min-width:1280px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  background: #fff;
}

.settlement-detail-table th {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #344054;
  white-space: nowrap;
}

.settlement-detail-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf1f7;
  color: #1f2937;
  vertical-align: middle;
}

.settlement-detail-table th:last-child,
.settlement-detail-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 12px rgba(15, 35, 70, 0.06);
}

.settlement-detail-table th:last-child {
  background: #f8fafc;
  z-index: 3;
}

.settlement-detail-table.no-sticky th:last-child,
.settlement-detail-table.no-sticky td:last-child {
  position: static;
  box-shadow: none;
}

.settlement-detail-table input,
.settlement-detail-table select {
  width: 100%;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
}

.settlement-detail-table textarea {
  width: 100%;
  min-height: 32px;
  max-height: 64px;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  resize: vertical;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
}

.settlement-detail-table .money-cell {
  text-align: right;
  white-space: nowrap;
  font-weight: 800;
}

.settlement-save-cell {
  display: grid;
  gap: 4px;
}

.settlement-save-cell button {
  height: 30px;
  border: none;
  border-radius: 5px;
  background: #1677ff;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.settlement-save-cell span {
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
}

@media (max-width: 1100px) {
  .settlement-day-head {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .system-order-card .settlement-day-head {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 1100px) {
  .cashflow-profit-summary,
  .kpi-row,
  .chart-row,
  .boundary-grid,
  .boss-ranking,
  .boss-context-row {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    width: 190px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
    height: auto;
  }

  .header {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .main {
    height: auto;
    display: block;
  }

  .sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }

  .sidebar::before {
    display: none;
  }

  .sidebar .nav-item {
    white-space: nowrap;
  }

  .content {
    padding: 16px;
  }

  .chart-box {
    min-height: 320px;
  }

  .kpi-card .value {
    font-size: 24px;
  }
}

/* ===== 分类管理样式 ===== */
.cashflow-category-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.cashflow-category-hero h3 { margin-bottom: 6px; }
.cashflow-category-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cashflow-category-add-card {
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #fbfdff;
  padding: 14px;
}
.cashflow-category-add-card .add-title {
  font-size: 14px;
  font-weight: 800;
  color: #102039;
  margin-bottom: 4px;
}
.cashflow-category-add-card .add-note {
  font-size: 12px;
  color: #667085;
  margin-bottom: 12px;
}
.cashflow-category-add-card .add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.cashflow-category-add-card.detail .add-form {
  grid-template-columns: minmax(140px, 0.75fr) minmax(140px, 1fr) auto;
}
.cashflow-category-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cashflow-category-list-head h3 { margin: 0; }
.cashflow-category-list-head span {
  color: #667085;
  font-size: 12px;
}
.cashflow-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.cashflow-category-card {
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  padding: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cashflow-category-card:hover {
  border-color: #c9d7ea;
  box-shadow: 0 3px 10px rgba(15,35,70,0.07);
}
.cashflow-category-card.disabled-row {
  background: #fafafa;
  opacity: 0.72;
}
.cashflow-category-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cashflow-category-card-header .cat-color-bar {
  flex-shrink: 0;
  width: 4px;
  height: 30px;
  border-radius: 999px;
}
.cashflow-category-card-header .cat-name {
  min-width: 0;
  flex: 1;
  font-weight: 800;
  font-size: 14px;
  color: #102039;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cashflow-category-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cashflow-category-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #667085;
  font-size: 12px;
}
.cashflow-category-card-editor,
.cashflow-category-inline-editor {
  display: none;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 9px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid #e5eaf2;
}
.cashflow-category-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.cashflow-category-table th,
.cashflow-category-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}
.cashflow-category-table tbody tr:last-child td { border-bottom: none; }
.cashflow-category-table tbody tr:hover td { background: #fbfdff; }
.cashflow-category-table .disabled-row td {
  background: #fafafa;
  color: #667085;
}
.cashflow-category-wrap {
  padding: 12px;
  background: #fff;
}
.cashflow-category-name {
  font-weight: 800;
  color: #102039;
}
.cashflow-category-parent {
  color: #475467;
}
.cashflow-category-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.cashflow-category-card input[type="text"],
.cashflow-category-table input[type="text"] {
  min-width: 150px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  background: #fff;
  color: #102039;
}
.cat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  border: 1px solid #d9e1ec;
  background: #fff;
  color: #344054;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-action-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
  background: #f0f7ff;
}
.cat-action-btn.rename-btn:hover { border-color: #52c41a; color: #237804; background: #f6ffed; }
.cat-action-btn.disable-btn:hover { border-color: #ff4d4f; color: #cf1322; background: #fff2f0; }
.cat-action-btn.merge-btn:hover { border-color: #fa8c16; color: #d46b08; background: #fff7e6; }
.cat-action-btn.confirm-btn { border-color: #52c41a; color: #237804; background: #f6ffed; }
.cat-action-btn.confirm-btn:hover { border-color: #389e0d; color: #fff; background: #389e0d; }
.cat-action-btn.cancel-btn { border-color: #d0d5dd; color: #475467; background: #fff; }
.cat-action-btn.cancel-btn:hover { border-color: #98a2b3; color: #102039; background: #f2f4f7; }
.cat-action-btn:disabled,
.cat-action-btn:disabled:hover {
  cursor: default;
  transform: none;
  border-color: #e5eaf2;
  color: #98a2b3;
  background: #f8fafc;
}
.cat-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}
.cat-status-active { background: #f6ffed; color: #389e0d; }
.cat-status-inactive { background: #fff2f0; color: #cf1322; }
.cat-sync-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #667085; }
.cat-sync-label input { margin: 0; }
.cashflow-category-empty {
  border: 1px dashed #d9e1ec;
  border-radius: 10px;
  padding: 18px;
  color: #667085;
  background: #fbfdff;
  text-align: center;
}

/* 颜色标签 */
.category-badge-income { display:inline-block; background:#52c41a; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-cost { display:inline-block; background:#ff4d4f; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-salary { display:inline-block; background:#fa8c16; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-rent { display:inline-block; background:#1890ff; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-other { display:inline-block; background:#8c8c8c; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-fund-income { display:inline-block; background:#722ed1; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-fund-expense { display:inline-block; background:#a8071a; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }
.category-badge-contact { display:inline-block; background:#d4b106; color:white; font-size:11px; font-weight:600; padding:2px 9px; border-radius:10px; }

/* ====== 分类管理页面统一样式优化 ====== */
/* 顶部工具栏按钮统一样式 */
.categories-toolbar .cat-toolbar-input {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  background: #fff;
  color: #101828;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 36px;
  box-sizing: border-box;
}
.categories-toolbar .cat-toolbar-input:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22,119,255,0.12);
}
.categories-toolbar .cat-toolbar-input::placeholder {
  color: #98a2b3;
}
.categories-toolbar .cat-toolbar-select {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 7px 28px 7px 12px;
  font-size: 13px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  color: #101828;
  height: 36px;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.categories-toolbar .cat-toolbar-select:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22,119,255,0.12);
}
.categories-toolbar .cat-toolbar-btn {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.15s;
  white-space: nowrap;
  font-weight: 500;
}
.categories-toolbar .cat-toolbar-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
  background: #f5f9ff;
}
.categories-toolbar .cat-toolbar-btn.primary {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
}
.categories-toolbar .cat-toolbar-btn.primary:hover {
  background: #4096ff;
  border-color: #4096ff;
}
/* 大类卡片和明细表格的 select 下拉统一样式 */
.cat-select {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
  color: #101828;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
  height: 30px;
  box-sizing: border-box;
}
.cat-select:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22,119,255,0.12);
}

/* 大类颜色条 */
.cat-color-bar-income { background:#52c41a; }
.cat-color-bar-cost { background:#ff4d4f; }
.cat-color-bar-salary { background:#fa8c16; }
.cat-color-bar-rent { background:#1890ff; }
.cat-color-bar-other { background:#8c8c8c; }
.cat-color-bar-fund-income { background:#722ed1; }
.cat-color-bar-fund-expense { background:#a8071a; }
.cat-color-bar-contact { background:#d4b106; }

@media (max-width: 900px) {
  .cashflow-category-add-grid,
  .cashflow-category-add-card.detail .add-form {
    grid-template-columns: 1fr;
  }
  .cashflow-category-hero {
    flex-direction: column;
  }
}

/* ===== 全局 UI 细节优化：标题、筛选、表格与窄屏导航 ===== */
.header h1,
.section-heading,
.chart-title-actions,
.cashflow-toolbar,
.cashflow-category-list-head {
  min-width: 0;
}

.header h1 {
  max-width: min(560px, 48vw);
  overflow: hidden;
}

#app-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.runtime-status {
  margin-top: 4px;
  color: #52677f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header .filters {
  max-width: 52vw;
}

.header select {
  max-width: 260px;
  text-overflow: ellipsis;
}

.section-heading {
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 2px 0 4px;
}

.section-heading > div:first-child {
  min-width: min(360px, 100%);
}

.section-heading .title {
  line-height: 1.45;
}

.section-heading .note {
  max-width: 520px;
}

.chart-title-actions h3,
.cashflow-category-list-head h3 {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chart-title-actions .detail-export-btn,
.cashflow-actions button,
.cat-action-btn,
.categories-toolbar .cat-toolbar-btn {
  flex-shrink: 0;
}

.cashflow-tabs,
.recon-tabs,
.settlement-tabs {
  scrollbar-width: thin;
  scrollbar-color: #a8b7ca transparent;
}

.cashflow-tabs::-webkit-scrollbar,
.recon-tabs::-webkit-scrollbar,
.settlement-tabs::-webkit-scrollbar {
  height: 8px;
}

.cashflow-tabs::-webkit-scrollbar-thumb,
.recon-tabs::-webkit-scrollbar-thumb,
.settlement-tabs::-webkit-scrollbar-thumb {
  background: #bfccdc;
  border-radius: 999px;
}

.cashflow-tabs button,
.recon-tab-btn {
  min-height: 34px;
}

.cashflow-table-wrap table th,
.settlement-detail-scroll table th,
#analysis-drilldown-table table th,
#project-quality-table table th,
#project-structure-table table th,
#project-drilldown-table table th,
#customer-drilldown-table table th,
#customer-order-visit-anomaly-table table th,
#channel-quality-table table th,
#channel-drilldown-table table th {
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 1px 0 var(--line);
}

.cashflow-table-wrap table,
.settlement-detail-scroll table,
#analysis-drilldown-table table,
#project-quality-table table,
#project-structure-table table,
#project-drilldown-table table,
#customer-drilldown-table table,
#customer-order-visit-anomaly-table table,
#channel-quality-table table,
#channel-drilldown-table table {
  min-width: 720px;
}

.metric-note {
  color: #73510d;
}

.cashflow-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .header {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .header h1 {
    max-width: 100%;
  }

  .header .filters {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
  }

  .header select {
    flex: 1 1 180px;
    min-width: 0;
    max-width: none;
  }

  .account-menu-wrap {
    margin-left: auto;
  }

  .main,
  #main-app .content,
  .content {
    height: calc(100vh - 92px) !important;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(252,253,255,0.98);
    box-shadow: 0 6px 14px rgba(15,35,70,0.08);
  }

  .sidebar .nav-item {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .sidebar .nav-item.active {
    border-bottom-color: var(--primary);
  }

  .section-heading {
    gap: 6px;
  }

  .section-heading .note {
    text-align: left;
  }

  .chart-title-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-title-actions .detail-export-btn {
    width: 100%;
  }
}

/* ===== 客户经营驾驶舱：白色版 ===== */
body:not(.platform-entry):not(.customer-entry) {
  background: #f5f8fc;
}

body:not(.platform-entry):not(.customer-entry) #main-app .header {
  height: 78px;
  margin-left: 260px;
  padding: 0 28px 0 24px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid #dce6f2;
  box-shadow: 0 8px 24px rgba(15,35,70,0.05);
}

body:not(.platform-entry):not(.customer-entry) .client-top-status {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: #102039;
}

body:not(.platform-entry):not(.customer-entry) .client-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34,197,94,0.12);
  flex: 0 0 auto;
}

body:not(.platform-entry):not(.customer-entry) .runtime-status {
  color: #102039;
  font-size: 14px;
  font-weight: 900;
  margin: 0;
}

body:not(.platform-entry):not(.customer-entry) .header .filters {
  margin-left: auto;
  max-width: min(980px, 66vw);
  gap: 10px;
}

.client-header-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bde9d7;
  border-radius: 8px;
  padding: 0 14px;
  color: #087443;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15,35,70,0.04);
}

.client-header-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,0.12);
}

.client-header-chip.neutral {
  color: #35506e;
  border-color: #d9e2ef;
  background: #f8fbff;
}

.client-header-chip.neutral::before {
  background: #6b8bb1;
  box-shadow: 0 0 0 5px rgba(107,139,177,0.12);
}

.client-header-chip.warning {
  color: #ad6800;
  border-color: #ffe0a3;
  background: #fff8e6;
}

.client-header-chip.warning::before {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245,158,11,0.14);
}

.client-header-chip.danger {
  color: #b42318;
  border-color: #ffc9c2;
  background: #fff1f0;
}

.client-header-chip.danger::before {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239,68,68,0.13);
}

body:not(.platform-entry):not(.customer-entry) #monthFilter {
  order: 2;
  min-width: 118px;
}

body:not(.platform-entry):not(.customer-entry) #companyFilter {
  order: 3;
}

body:not(.platform-entry):not(.customer-entry) .account-menu-wrap {
  order: 4;
}

body:not(.platform-entry):not(.customer-entry) .client-report-btn {
  order: 5;
}

body[data-client-page="calibration"]:not(.platform-entry):not(.customer-entry) .client-report-btn,
body[data-client-page="settlement"]:not(.platform-entry):not(.customer-entry) .client-report-btn {
  display: none;
}

body:not(.platform-entry):not(.customer-entry) .header select {
  height: 40px;
  min-width: 96px;
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid #d9e2ef;
  background: #fff;
  color: #102039;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 6px 18px rgba(15,35,70,0.04);
}

body:not(.platform-entry):not(.customer-entry) #companyFilter {
  min-width: 240px;
}

body:not(.platform-entry):not(.customer-entry) .account-trigger {
  height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  color: #102039;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid #d9e2ef;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15,35,70,0.04);
}

body:not(.platform-entry):not(.customer-entry) .account-trigger::before {
  display: none;
}

.client-report-btn {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(37,99,235,0.18);
  white-space: nowrap;
}

body.platform-entry .client-report-btn,
body.customer-entry .client-report-btn {
  display: none;
}

body.platform-entry #main-app .header,
body.platform-entry .sidebar {
  display: none !important;
}

body.platform-entry .main {
  display: block;
  height: 100vh;
  overflow: hidden;
}

body.platform-entry #main-app .content,
body.platform-entry .content {
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  background: #eef4fb;
  scrollbar-gutter: auto;
}

body.platform-entry #page-platformAdmin {
  min-height: 100vh;
}

body.platform-entry .platform-admin-console {
  min-height: 100vh;
  width: 100%;
  border: 0;
  border-radius: 0;
}

.platform-customer-admin-console {
  display: block;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.platform-customer-admin-console .platform-customer-admin-rail {
  display: none;
}

.platform-customer-admin-main {
  display: block;
  padding: 0;
}

body.platform-entry #page-customerAdmin {
  min-height: 100vh;
}

body.platform-entry .platform-customer-admin-console {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  background: #eef4fb;
  overflow: hidden;
}

body.platform-entry .platform-customer-admin-console .platform-customer-admin-rail {
  display: flex;
}

body.platform-entry .platform-customer-admin-main {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}

body.platform-entry [data-platform-section~="customer_ops"].platform-admin-panel,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-panel,
body.platform-entry [data-platform-section~="customer_ops"].platform-admin-workflow-board .platform-admin-panel,
body.platform-entry [data-platform-section~="customer_ops"].platform-admin-main-grid .platform-admin-panel,
body.platform-entry #platform-inline-customer-admin-workspace .chart-box,
body.platform-entry #platform-inline-customer-admin-workspace .table-wrap,
body.platform-entry #platform-customer-console-table,
body.platform-entry #platform-customer-console-table .platform-admin-table-wrap {
  border-color: #d7ded8;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(24, 36, 31, .045);
}

body.platform-entry [data-platform-section~="customer_ops"] h3,
body.platform-entry #platform-inline-customer-admin-workspace h3,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-quality-card b,
body.platform-entry [data-platform-section~="customer_ops"] .platform-workflow-row-head b,
body.platform-entry [data-platform-section~="customer_ops"] .platform-onboarding-step b {
  color: #17231d;
}

body.platform-entry [data-platform-section~="customer_ops"] .metric-note,
body.platform-entry #platform-inline-customer-admin-workspace .metric-note,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-empty {
  border-color: #dde2d9;
  background: #f7f8f5;
  color: #5f6f66;
}

body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-chip,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-badge,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-chip,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-badge {
  border-color: #d7ded8;
  background: #f7f8f5;
  color: #51635a;
}

body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-chip.green,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-badge.green,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-chip.green,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-badge.green {
  border-color: #bcd4c9;
  background: #eef6f2;
  color: #1f6f5b;
}

body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-chip.amber,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-badge.amber,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-chip.amber,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-badge.amber {
  border-color: #dfd4bc !important;
  background: #f7f2e8 !important;
  color: #7a5d22 !important;
}

body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-chip.red,
body.platform-entry [data-platform-section~="customer_ops"] .platform-admin-badge.red,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-chip.red,
body.platform-entry #platform-inline-customer-admin-workspace .platform-admin-badge.red {
  border-color: #e1c2bd !important;
  background: #f7eded !important;
  color: #8e3b35 !important;
}

body.platform-entry [data-platform-section~="customer_ops"] button,
body.platform-entry #platform-inline-customer-admin-workspace button {
  border-color: #cfd8d1 !important;
  background: #fbfbf8 !important;
  color: #25362e !important;
  box-shadow: none !important;
}

body.platform-entry [data-platform-section~="customer_ops"] button.primary,
body.platform-entry [data-platform-section~="customer_ops"] .platform-command-bar button.active,
body.platform-entry [data-platform-section~="customer_ops"] .platform-customer-actions button.primary,
body.platform-entry [data-platform-section~="customer_ops"] .platform-inline-form-actions button.primary,
body.platform-entry #platform-inline-customer-admin-workspace button.primary,
body.platform-entry #platform-user-save-button {
  border-color: #1f6f5b !important;
  background: #1f6f5b !important;
  color: #ffffff !important;
}

body.platform-entry [data-platform-section~="customer_ops"] .platform-customer-actions button.warning {
  border-color: #dfd4bc !important;
  background: #f7f2e8 !important;
  color: #7a5d22 !important;
}

body.platform-entry [data-platform-section~="customer_ops"] input,
body.platform-entry [data-platform-section~="customer_ops"] select,
body.platform-entry [data-platform-section~="customer_ops"] textarea,
body.platform-entry #platform-inline-customer-admin-workspace input,
body.platform-entry #platform-inline-customer-admin-workspace select,
body.platform-entry #platform-inline-customer-admin-workspace textarea {
  border-color: #cfd8d1 !important;
  background-color: #ffffff !important;
  color: #17231d !important;
}

body.platform-entry [data-platform-section~="customer_ops"] table th,
body.platform-entry #platform-inline-customer-admin-workspace table th {
  background: #f1f4f0;
  color: #25362e;
}

body.platform-entry .platform-customer-console-table tr.selected {
  background: #eef4ef;
}

body.platform-entry .platform-customer-console-table button[style*="transparent"] {
  color: #1f6f5b !important;
}

body:not(.platform-entry):not(.customer-entry) .main {
  display: block;
  height: calc(100vh - 78px);
  overflow: visible;
}

body:not(.platform-entry):not(.customer-entry) .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  padding: 20px 18px;
  background: #ffffff;
  border-right: 1px solid #dce6f2;
  box-shadow: 10px 0 28px rgba(15,35,70,0.05);
  z-index: 35;
}

body:not(.platform-entry):not(.customer-entry) .sidebar::before {
  content: none;
}

.client-brand-panel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid #edf1f7;
}

.client-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
}

.client-brand-copy h1 {
  margin: 0;
  color: #102039;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.28;
  max-width: 170px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.client-brand-copy div {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.client-nav-section {
  color: #7a8ca5;
  font-size: 12px;
  font-weight: 900;
  margin: 16px 2px 9px;
}

body:not(.platform-entry):not(.customer-entry) .sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin-bottom: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 8px;
  color: #25324a;
  font-size: 14px;
  font-weight: 900;
}

body:not(.platform-entry):not(.customer-entry) .sidebar .nav-item:hover {
  background: #f0f7ff;
  color: #0958d9;
}

body:not(.platform-entry):not(.customer-entry) .sidebar .nav-item.active {
  background: linear-gradient(135deg, #eaf3ff 0%, #e8fbfb 100%);
  color: #0958d9;
  border-color: #cfe4ff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.12);
}

.nav-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #edf3fb;
  color: #35506e;
  font-size: 13px;
  font-weight: 950;
  flex: 0 0 auto;
}

body:not(.platform-entry):not(.customer-entry) .sidebar .nav-item.active .nav-icon {
  background: #2563eb;
  color: #fff;
}

.client-system-card {
  margin-top: 24px;
  border: 1px solid #d9e2ef;
  background: #fbfdff;
  border-radius: 8px;
  padding: 15px;
  color: #334155;
  font-size: 12px;
  line-height: 1.7;
}

.client-system-card strong {
  display: block;
  color: #102039;
  font-size: 14px;
  margin-bottom: 8px;
}

body:not(.platform-entry):not(.customer-entry) #main-app .content,
body:not(.platform-entry):not(.customer-entry) .content {
  margin-left: 260px;
  width: calc(100vw - 260px);
  max-width: calc(100vw - 260px);
  height: calc(100vh - 78px);
  padding: 24px 28px 36px;
  background: linear-gradient(180deg, #f8fbff 0%, #f5f8fc 100%);
  overflow-y: auto !important;
  overflow-x: hidden;
}

@media (min-width: 981px) and (max-width: 1400px) {
  body:not(.platform-entry):not(.customer-entry) #main-app .header {
    gap: 8px;
    padding-right: 18px;
  }

  body:not(.platform-entry):not(.customer-entry) .client-top-status {
    flex: 0 1 128px;
    max-width: 128px;
  }

  body:not(.platform-entry):not(.customer-entry) .header .filters {
    min-width: 0;
    max-width: calc(100% - 136px);
    gap: 6px;
  }

  body:not(.platform-entry):not(.customer-entry) .client-header-chip {
    max-width: 142px;
    overflow: hidden;
    padding-inline: 10px;
    text-overflow: ellipsis;
  }

  body:not(.platform-entry):not(.customer-entry) #companyFilter {
    width: 180px;
    min-width: 168px;
    max-width: 180px;
  }

  body:not(.platform-entry):not(.customer-entry) .account-menu-wrap,
  body:not(.platform-entry):not(.customer-entry) .account-trigger {
    width: 120px;
    min-width: 0;
    max-width: 120px;
  }

  body:not(.platform-entry):not(.customer-entry) .account-trigger,
  body:not(.platform-entry):not(.customer-entry) .client-report-btn {
    padding-inline: 10px;
  }
}

body:not(.platform-entry):not(.customer-entry) .section-heading {
  border: 1px solid #d9e2ef;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(15,35,70,0.06);
}

body:not(.platform-entry):not(.customer-entry) .section-heading .title {
  font-size: 25px;
  color: #102039;
}

body:not(.platform-entry):not(.customer-entry) .section-heading .note {
  color: #475569;
  font-size: 13px;
  max-width: 800px;
}

body:not(.platform-entry):not(.customer-entry) .kpi-card,
body:not(.platform-entry):not(.customer-entry) .chart-box,
body:not(.platform-entry):not(.customer-entry) .formula-card,
body:not(.platform-entry):not(.customer-entry) .diagnosis-box,
body:not(.platform-entry):not(.customer-entry) .boundary-card,
body:not(.platform-entry):not(.customer-entry) .boss-tree,
body:not(.platform-entry):not(.customer-entry) .boss-context-card,
body:not(.platform-entry):not(.customer-entry) .ai-card,
body:not(.platform-entry):not(.customer-entry) .cashflow-category-card,
body:not(.platform-entry):not(.customer-entry) .settlement-day-card,
body:not(.platform-entry):not(.customer-entry) .settlement-tabs-card,
body:not(.platform-entry):not(.customer-entry) .cashflow-reconcile-card {
  background: #fff;
  border: 1px solid #d9e2ef;
  box-shadow: 0 10px 26px rgba(15,35,70,0.055);
  border-radius: 12px;
}

body:not(.platform-entry):not(.customer-entry) .kpi-card .value {
  font-size: 27px;
  font-weight: 950;
  color: #102039;
}

body:not(.platform-entry):not(.customer-entry) #overview-action-judgement .chart-box {
  border-left: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
  min-height: 250px;
}

.client-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.client-home-main-card,
.client-ai-brief,
.client-action-card {
  border: 1px solid #d9e2ef;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15,35,70,0.07);
}

.client-home-main-card {
  min-height: 310px;
  padding: 28px 30px;
  background:
    linear-gradient(135deg, rgba(37,99,235,0.10) 0%, rgba(24,183,200,0.08) 54%, rgba(255,255,255,0.96) 100%),
    #fff;
}

.client-home-kicker {
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 12px;
}

.client-home-main-card h2 {
  max-width: 860px;
  margin: 0;
  color: #07182f;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 950;
}

.client-home-main-card > p {
  max-width: 960px;
  margin: 12px 0 24px;
  color: #29415f;
  font-size: 15px;
  line-height: 1.8;
}

.client-home-driver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.client-driver-card {
  min-height: 96px;
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.78);
}

.client-driver-card span,
.client-home-signal-row span,
.client-side-title span {
  display: block;
  color: #34516f;
  font-size: 13px;
  font-weight: 900;
}

.client-driver-card strong {
  display: block;
  margin: 7px 0 3px;
  color: #07182f;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 950;
}

.client-driver-card em {
  color: #0f9f7a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.client-home-signal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.client-home-signal-row > div {
  border-top: 1px solid rgba(37,99,235,0.18);
  padding-top: 13px;
}

.client-home-signal-row p {
  margin: 7px 0 0;
  color: #31445f;
  font-size: 13px;
  line-height: 1.75;
}

.client-home-side {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
}

.client-ai-brief,
.client-action-card {
  padding: 20px;
}

.client-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.client-side-title em {
  border-radius: 999px;
  background: #eaf8f1;
  color: #067647;
  padding: 5px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.client-ai-brief p,
.client-action-card #overview-action-list {
  margin: 0;
  color: #31445f;
  font-size: 13px;
  line-height: 1.8;
}

.client-action-card #overview-action-list {
  max-height: 156px;
  overflow: auto;
}

.client-action-item {
  border-top: 1px solid #edf2f8;
  padding: 10px 0;
}

.client-action-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.client-action-item strong {
  display: block;
  margin-bottom: 2px;
}

.client-action-card strong,
.client-home-signal-row strong {
  color: #07182f;
}

body:not(.platform-entry):not(.customer-entry) #overview-core-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body:not(.platform-entry):not(.customer-entry) #overview-core-kpis .kpi-card {
  min-height: 134px;
}

.recon-workbench-shell {
  margin-bottom: 28px;
}

.recon-hero {
  min-height: 190px;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 50%, rgba(24,183,200,0.42) 0, rgba(24,183,200,0.18) 18%, transparent 36%),
    linear-gradient(135deg, #132844 0%, #16395d 58%, #176676 100%);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  box-shadow: 0 18px 40px rgba(15,35,70,0.14);
}

.recon-hero-kicker {
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.recon-hero h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 950;
}

.recon-hero p {
  max-width: 860px;
  margin: 12px 0 0;
  color: #edf7ff;
  font-size: 15px;
  line-height: 1.85;
  font-weight: 800;
}

.recon-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recon-hero-actions button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0 18px;
  color: #fff;
  background: rgba(255,255,255,0.10);
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
}

.recon-hero-actions button.primary {
  color: #102039;
  background: #fff;
}

.recon-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.recon-kpi-card {
  min-width: 0;
  min-height: 118px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 17px 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
}

.recon-kpi-card .label {
  color: #526b88;
  font-size: 13px;
  font-weight: 900;
}

.recon-kpi-card .value {
  margin: 8px 0 5px;
  color: #1d4ed8;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 950;
  white-space: normal;
  overflow-wrap: anywhere;
}

.recon-kpi-card .note {
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.recon-kpi-card.success .value { color: #079455; }
.recon-kpi-card.warning .value { color: #d97706; }
.recon-kpi-card.danger .value { color: #dc2626; }
.recon-kpi-card.dark {
  background: linear-gradient(135deg, #123454 0%, #175a78 100%);
  border-color: #123454;
}
.recon-kpi-card.dark .label,
.recon-kpi-card.dark .note { color: #d7ecff; }
.recon-kpi-card.dark .value { color: #fff; }

.recon-middle-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
  margin-bottom: 16px;
}

.recon-panel {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.05);
}

.recon-panel-head {
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid #e6edf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recon-panel-head strong {
  color: #102039;
  font-size: 16px;
  font-weight: 950;
}

.recon-panel-head span {
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.recon-panel-body {
  padding: 16px 18px 18px;
}

.recon-bar-row {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  color: #102039;
  font-size: 13px;
  font-weight: 900;
}

.recon-bar-track {
  height: 12px;
  border-radius: 999px;
  background: #eaf1f8;
  overflow: hidden;
}

.recon-bar-fill {
  height: 100%;
  width: var(--w, 20%);
  border-radius: inherit;
  background: var(--c, #2563eb);
}

.recon-step-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.recon-step {
  min-height: 120px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 14px 12px;
  background: #fff;
}

.recon-step b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: #fff;
  background: #2563eb;
}

.recon-step strong {
  display: block;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}

.recon-step span {
  display: block;
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.55;
}

.recon-tabs-card,
.settlement-tabs-card {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,35,70,0.05);
}

.recon-action-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr 0.95fr;
  gap: 16px;
  margin: 16px 0;
}

.recon-queue,
.recon-focus,
.recon-assist {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.05);
  min-width: 0;
}

.recon-section-title {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e6edf6;
}

.recon-section-title h3 {
  margin: 0;
  color: #102039;
  font-size: 18px;
  font-weight: 950;
}

.recon-section-title p {
  margin: 6px 0 0;
  color: #526b88;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 800;
}

.recon-search {
  width: calc(100% - 36px);
  height: 38px;
  margin: 14px 18px 8px;
  padding: 0 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
  color: #102039;
  font-size: 13px;
  font-weight: 800;
  box-sizing: border-box;
}

.recon-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 10px;
}

.recon-filter-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  padding: 0 10px;
  color: #35506e;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.recon-filter-row span.active {
  color: #fff;
  border-color: #2563eb;
  background: #2563eb;
}

.recon-queue-list {
  padding: 0 18px 16px;
  display: grid;
  gap: 10px;
}

.recon-queue-item {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 13px 13px 12px;
  background: #fff;
  color: #102039;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.recon-queue-item:hover {
  border-color: #b5cdf5;
  background: #f8fbff;
}

.recon-queue-item:focus-visible {
  outline: 3px solid rgba(37,99,235,0.22);
  outline-offset: 2px;
}

.recon-queue-item.active {
  border-color: #9dc4ff;
  background: #f2f7ff;
  box-shadow: 0 8px 18px rgba(37,99,235,0.10);
  transform: translateY(-1px);
}

.recon-queue-item .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #102039;
  font-size: 15px;
  font-weight: 950;
}

.recon-queue-item .desc {
  margin-top: 6px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.recon-queue-item .meta {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.recon-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #b42318;
  background: #fff1f0;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.recon-badge.warning {
  color: #ad6800;
  background: #fff8e6;
}

.recon-badge.ok {
  color: #067647;
  background: #ecfdf3;
}

.recon-focus-body {
  padding: 16px 18px 18px;
}

.recon-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 15px;
  background: #f4f9ff;
}

.recon-focus-head h3 {
  margin: 0;
  color: #102039;
  font-size: 20px;
  font-weight: 950;
}

.recon-focus-head p {
  margin: 6px 0 0;
  color: #526b88;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 800;
}

.recon-focus-head strong {
  color: #2563eb;
  font-size: 24px;
  font-weight: 950;
  white-space: nowrap;
}

.recon-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.recon-mini {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.recon-mini span {
  display: block;
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.recon-mini strong {
  display: block;
  margin-top: 6px;
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

.recon-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 10px 0 14px;
}

.recon-flow-step {
  min-height: 72px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.recon-flow-step span {
  display: block;
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.recon-flow-step strong {
  display: block;
  margin-top: 6px;
  color: #102039;
  font-size: 15px;
  font-weight: 950;
}

.recon-focus-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.recon-focus-table th,
.recon-focus-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  color: #102039;
}

.recon-focus-table th {
  background: #f5f8fc;
  color: #526b88;
  font-size: 12px;
}

.recon-assist-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
}

.recon-ai-box {
  border-radius: 10px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #123454 0%, #176676 100%);
}

.recon-ai-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 950;
}

.recon-ai-box p {
  margin: 0;
  color: #edf7ff;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

.recon-suggestion {
  margin-top: 12px;
  border-radius: 8px;
  padding: 12px;
  color: #064e3b;
  background: #dcfce7;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 900;
}

.recon-checklist,
.recon-audit-list {
  border: 1px solid #f1d59d;
  border-radius: 10px;
  padding: 14px;
  background: #fff8e6;
}

.recon-audit-list {
  border-color: #d9e2ef;
  background: #fff;
}

.recon-checklist h4,
.recon-audit-list h4 {
  margin: 0 0 10px;
  color: #102039;
  font-size: 14px;
  font-weight: 950;
}

.recon-checkline,
.recon-audit-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 850;
}

.recon-audit-line {
  justify-content: flex-start;
  border-left: 3px solid #2563eb;
  padding-left: 10px;
  margin-top: 8px;
}

/* ===== 经营拆解工作台 ===== */
.bd-workbench {
  display: grid;
  gap: 16px;
  padding-bottom: 26px;
}

.analysis-basis-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 14px 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 35, 70, 0.05);
}

.analysis-basis-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analysis-basis-control > strong {
  margin-right: 6px;
  color: #102039;
  font-size: 14px;
}

.analysis-basis-button {
  min-width: 118px;
  min-height: 40px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  padding: 0 18px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.analysis-basis-button.active.business {
  border-color: #2563eb;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1677ff 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.analysis-basis-button.active.consumption {
  border-color: #0f9f82;
  color: #fff;
  background: linear-gradient(135deg, #10a981 0%, #16b89a 100%);
  box-shadow: 0 8px 18px rgba(16, 169, 129, 0.18);
}

.analysis-basis-caption {
  margin: 0;
  color: #526b88;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 800;
  text-align: right;
}

.analysis-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analysis-metric-grid .bd-metric {
  min-height: 104px;
}

.analysis-metric-grid.consumption .bd-metric.primary {
  border-color: #8edbc9;
  background: linear-gradient(145deg, #f7fffc 0%, #effcf8 100%);
}

.analysis-metric-grid.consumption .bd-metric.primary .value,
.analysis-consumption-text {
  color: #0b9b78 !important;
}

.analysis-primary-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.analysis-secondary-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.analysis-driver-list {
  display: grid;
  gap: 10px;
}

.analysis-driver-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
}

.analysis-driver-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #fff;
  background: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.analysis-driver-card:nth-child(2) .analysis-driver-icon { background: #0f9f82; }
.analysis-driver-card:nth-child(3) .analysis-driver-icon { background: #f59e0b; }

.analysis-driver-copy strong {
  display: block;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}

.analysis-driver-copy span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.analysis-driver-value {
  color: #079455;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.analysis-calendar-compact {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
}

.analysis-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.analysis-calendar-grid .weekday {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.analysis-calendar-day {
  min-height: 44px;
  border-radius: 7px;
  padding: 5px;
  color: #334155;
  background: #f5f8fc;
  font-size: 11px;
}

.analysis-calendar-day.has-data {
  color: #08765f;
  background: #eafaf5;
  font-weight: 900;
}

.analysis-calendar-day b,
.analysis-calendar-day span { display: block; }
.analysis-calendar-day span {
  margin-top: 3px;
  font-size: 10px;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.analysis-calendar-week-summary {
  margin-top: 10px;
}

.analysis-calendar-week-summary-title {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.analysis-calendar-week-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.analysis-calendar-week-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #dce8f4;
  border-radius: 7px;
  background: #f7faff;
}

.analysis-calendar-week-total span {
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.analysis-calendar-week-total strong {
  color: #0f766e;
  font-size: 11px;
  white-space: nowrap;
}

.overview-revenue-bridge {
  margin: 16px 0;
  border-color: #d7e5f2;
}

.overview-revenue-bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}

.overview-revenue-bridge-card {
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fbfdff;
}

.overview-revenue-bridge-card span {
  color: #526b88;
  font-size: 12px;
  font-weight: 900;
}

.overview-revenue-bridge-card strong {
  display: block;
  margin-top: 8px;
  color: #102039;
  font-size: 23px;
  font-weight: 950;
}

.overview-revenue-bridge-card.consumption strong,
.overview-revenue-bridge-card.ratio strong { color: #0b9b78; }

.overview-revenue-bridge-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 430px;
  gap: 16px;
  align-items: stretch;
}

.bd-hero.bd-hero-single {
  grid-template-columns: minmax(0, 1fr);
}

.bd-hero-main {
  min-height: 220px;
  border-radius: 12px;
  padding: 28px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 55%, rgba(24,183,200,0.32) 0, rgba(24,183,200,0.15) 22%, transparent 42%),
    linear-gradient(135deg, #132844 0%, #16395d 58%, #176676 100%);
  box-shadow: 0 18px 40px rgba(15,35,70,0.14);
  overflow: hidden;
}

.bd-kicker {
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.bd-hero-main h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 950;
}

.bd-hero-copy {
  margin: 12px 0 18px;
  max-width: 900px;
  color: #edf7ff;
  font-size: 15px;
  line-height: 1.85;
  font-weight: 800;
}

.bd-formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.bd-formula-card {
  min-height: 82px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 13px 15px;
  background: rgba(255,255,255,0.10);
}

.bd-formula-card span {
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
}

.bd-formula-card strong {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
  white-space: nowrap;
}

.bd-formula-op {
  display: grid;
  place-items: center;
  color: #edf7ff;
  font-size: 26px;
  font-weight: 950;
}

#page-analysis .ai-card {
  margin: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
  min-width: 0;
}

#page-analysis .ai-card h3 {
  margin: 0 0 14px;
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

#page-analysis .ai-content {
  margin: 0;
  color: #40536e;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

#page-analysis .ai-actions {
  margin-top: 14px;
}

#page-analysis .ai-actions button,
.bd-export-btn {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(37,99,235,0.16);
}

.bd-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.bd-metric {
  min-height: 112px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 17px 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
}

.bd-metric.dark {
  color: #fff;
  border-color: #123454;
  background: linear-gradient(135deg, #123454 0%, #175a78 100%);
}

.bd-metric .label {
  color: #526b88;
  font-size: 13px;
  font-weight: 950;
}

.bd-metric.dark .label {
  color: #d7ecff;
}

.bd-metric .value {
  margin-top: 10px;
  color: #102039;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 950;
  white-space: nowrap;
}

.bd-metric.dark .value {
  color: #fff;
}

.bd-metric .sub {
  margin-top: 8px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.bd-metric.dark .sub {
  color: #d7ecff;
}

.bd-positive { color: #079455 !important; }
.bd-warning { color: #d97706 !important; }
.bd-danger { color: #dc2626 !important; }
.bd-blue { color: #2563eb !important; }

.bd-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bd-panel-grid.wide-left {
  grid-template-columns: 1.12fr 0.88fr;
}

.bd-deep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bd-drill-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 16px;
}

.bd-panel {
  min-width: 0;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.05);
  overflow: hidden;
}

.bd-panel-head {
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid #e6edf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfdff;
}

.bd-panel-head h3 {
  margin: 0;
  color: #102039;
  font-size: 16px;
  font-weight: 950;
}

.bd-panel-head span {
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.bd-panel-body {
  padding: 16px 18px 18px;
}

.bd-panel .chart {
  min-height: 280px;
}

.bd-panel.compact .chart {
  min-height: 250px;
}

.bd-note {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fbff;
  color: #42556f;
  font-size: 12px;
  line-height: 1.75;
  font-weight: 850;
}

.calendar-analysis-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
}

.calendar-week-list,
.calendar-day-list {
  display: grid;
  gap: 8px;
}

.calendar-row {
  width: 100%;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.calendar-row.active {
  border-color: #1677ff;
  background: #eff6ff;
}

.calendar-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}

.calendar-row-sub {
  margin-top: 5px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
}

.calendar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
}

.calendar-badge.drag {
  background: #fff1f0;
  color: #cf1322;
}

.calendar-badge.lift {
  background: #ecfdf3;
  color: #039855;
}

.calendar-reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-reason-card {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.calendar-reason-card strong {
  display: block;
  color: #102039;
  font-size: 12px;
  margin-bottom: 6px;
}

.calendar-reason-card div {
  color: #526b88;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.bd-customer-card-grid {
  display: grid;
  gap: 12px;
}

#page-analysis .mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-analysis .mini-card {
  min-height: 88px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  padding: 13px;
  background: #fff;
}

#page-analysis #analysis-drilldown-table table {
  font-size: 12px;
}

/* ===== 项目分析工作台 ===== */
#page-items .ai-card {
  margin: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
  min-width: 0;
}

#page-items .ai-card h3 {
  margin: 0 0 14px;
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

#page-items .ai-content {
  color: #40536e;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

#page-items .ai-actions {
  margin-top: 14px;
}

#page-items .ai-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(37,99,235,0.16);
}

.pa-hero-main {
  background:
    radial-gradient(circle at 86% 58%, rgba(16,164,166,0.30) 0, rgba(16,164,166,0.12) 25%, transparent 45%),
    linear-gradient(135deg, #11233d 0%, #174e76 58%, #176676 100%);
}

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

.pa-hero-fact {
  min-height: 80px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.10);
  min-width: 0;
}

.pa-hero-fact span {
  display: block;
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
}

.pa-hero-fact strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-insight-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pa-insight {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  background: #f5f9fe;
}

.pa-insight-badge {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.pa-insight strong {
  display: block;
  color: #152842;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 3px;
}

.pa-insight span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.pa-quality-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.pa-matrix-area {
  height: 286px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(135deg, rgba(31,111,235,0.04), rgba(16,164,166,0.05));
  position: relative;
  overflow: hidden;
}

.pa-quadrant {
  position: absolute;
  color: #7a899b;
  font-size: 11px;
  font-weight: 900;
}

.pa-q1 { top: 12px; right: 12px; }
.pa-q2 { top: 12px; left: 12px; }
.pa-q3 { bottom: 12px; left: 12px; }
.pa-q4 { bottom: 12px; right: 12px; }

.pa-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255,255,255,0.78);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(18,35,61,0.18);
  cursor: pointer;
}

.pa-bubble.blue { background: linear-gradient(135deg, #2f8df6, #2563eb); }
.pa-bubble.green { background: linear-gradient(135deg, #35c77a, #1f9d68); }
.pa-bubble.amber { background: linear-gradient(135deg, #f2b23b, #d88919); }
.pa-bubble.red { background: linear-gradient(135deg, #ef6a60, #d94a42); }
.pa-bubble.teal { background: linear-gradient(135deg, #27c4c0, #10a4a6); }

.pa-matrix-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.pa-driver-list,
.pa-category-bars,
.pa-breakdown {
  display: grid;
  gap: 12px;
}

.pa-driver-row,
.pa-category-row,
.pa-break-row {
  display: grid;
  grid-template-columns: 132px 1fr 92px;
  gap: 12px;
  align-items: center;
}

.pa-driver-row,
.pa-category-row {
  cursor: pointer;
}

.pa-driver-name,
.pa-category-name {
  color: #334862;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-track {
  height: 18px;
  border: 1px solid #e1eaf4;
  border-radius: 999px;
  background: #edf3fa;
  overflow: hidden;
}

.pa-category-row .pa-track {
  height: 24px;
  border-radius: 9px;
}

.pa-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.pa-fill.green { background: #1f9d68; }
.pa-fill.amber { background: #d88919; }
.pa-fill.red { background: #d94a42; }
.pa-fill.teal { background: #10a4a6; }

.pa-driver-value {
  text-align: right;
  color: #182b45;
  font-size: 12px;
  font-weight: 950;
}

#page-items #project-trend-top-name,
#page-items #project-most-orders-name,
#page-items #project-largest-decline-name {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.18;
}

.pa-warning-note {
  margin-top: 15px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #f0d397;
  border-radius: 10px;
  background: #fff7e8;
  color: #5f420d;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.pa-structure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pa-drill-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.pa-selected-project {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  margin-bottom: 14px;
}

.pa-selected-project strong {
  display: block;
  color: #12213a;
  font-size: 20px;
  font-weight: 950;
}

.pa-selected-project span {
  display: block;
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.pa-selected-money {
  text-align: right;
  color: #2563eb;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
}

#page-items .compact-table {
  font-size: 12px;
}

#page-items .rank-list {
  gap: 10px;
}

#page-items .rank-row {
  border-radius: 8px;
  background: #fbfdff;
}

#page-items .rank-row:hover,
.pa-driver-row:hover,
.pa-category-row:hover {
  background: #f3f8ff;
}

/* ===== 客户分析工作台 ===== */
#page-customers .ai-card {
  margin: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
  min-width: 0;
}

#page-customers .ai-card h3 {
  margin: 0 0 14px;
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

#page-customers .ai-content {
  color: #40536e;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

#page-customers .ai-actions {
  margin-top: 14px;
}

#page-customers .ai-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(37,99,235,0.16);
}

.ca-hero-main {
  background:
    radial-gradient(circle at 86% 58%, rgba(31,157,104,0.22) 0, rgba(31,157,104,0.09) 24%, transparent 45%),
    linear-gradient(135deg, #11233d 0%, #174e76 58%, #1b756a 100%);
}

.ca-section-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.ca-asset-grid {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 16px;
}

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

.ca-rank-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.ca-drill-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.ca-stack-list,
.ca-seg-bars {
  display: grid;
  gap: 12px;
}

.ca-stack-row {
  display: grid;
  grid-template-columns: 72px 1fr 92px;
  gap: 12px;
  align-items: center;
}

.ca-stack-name,
.ca-seg-name {
  color: #334862;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ca-stack-track {
  height: 30px;
  border-radius: 10px;
  background: #edf3fa;
  overflow: hidden;
  display: flex;
}

.ca-new-fill { background: #1f9d68; }
.ca-old-fill { background: #6f63d9; }
.ca-unknown-fill { background: #d88919; }

.ca-stack-value,
.ca-seg-value {
  text-align: right;
  color: #182b45;
  font-size: 12px;
  font-weight: 950;
}

.ca-empty-state {
  min-height: 208px;
  border: 1px dashed #c9d8e8;
  border-radius: 10px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: #f8fbff;
}

.ca-empty-state strong {
  display: block;
  color: #172a45;
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 8px;
}

.ca-empty-state span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 850;
}

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

.ca-quality-card {
  min-height: 94px;
  padding: 14px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #fff;
}

.ca-quality-label {
  color: #526b88;
  font-size: 12px;
  font-weight: 950;
}

.ca-quality-value {
  margin-top: 8px;
  color: #12213a;
  font-size: 22px;
  font-weight: 950;
}

.ca-quality-note {
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ca-seg-row {
  display: grid;
  grid-template-columns: 104px 1fr 68px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.ca-seg-track {
  height: 24px;
  border-radius: 9px;
  background: #edf3fa;
  overflow: hidden;
}

.ca-seg-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.ca-seg-fill.green { background: #1f9d68; }
.ca-seg-fill.amber { background: #d88919; }
.ca-seg-fill.red { background: #d94a42; }
.ca-seg-fill.purple { background: #6f63d9; }

.ca-matrix-area {
  height: 282px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(135deg, rgba(31,111,235,0.04), rgba(31,157,104,0.05));
  position: relative;
  overflow: hidden;
}

.ca-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255,255,255,0.78);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(18,35,61,0.18);
  cursor: pointer;
}

.ca-bubble.blue { background: linear-gradient(135deg, #2f8df6, #2563eb); }
.ca-bubble.green { background: linear-gradient(135deg, #35c77a, #1f9d68); }
.ca-bubble.amber { background: linear-gradient(135deg, #f2b23b, #d88919); }
.ca-bubble.red { background: linear-gradient(135deg, #ef6a60, #d94a42); }
.ca-bubble.purple { background: linear-gradient(135deg, #8c7cf4, #6f63d9); }

.ca-selected-customer {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  margin-bottom: 14px;
}

.ca-selected-customer strong {
  display: block;
  color: #12213a;
  font-size: 20px;
  font-weight: 950;
}

.ca-selected-customer span {
  display: block;
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.ca-selected-money {
  text-align: right;
  color: #2563eb;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
}

.ca-breakdown {
  display: grid;
  gap: 12px;
}

.ca-break-row {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  gap: 12px;
  align-items: center;
}

#page-customers #customer-old-revenue,
#page-customers #customer-anomaly-count {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.18;
}

#page-customers .compact-table {
  font-size: 12px;
}

#page-customers .rank-row {
  grid-template-columns: 44px 1fr 150px;
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}

#page-customers .rank-row:hover,
.ca-seg-row:hover {
  background: #f3f8ff;
}

/* ===== 渠道分析工作台 ===== */
#page-channels .ai-card {
  margin: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
  min-width: 0;
}

#page-channels .ai-card h3 {
  margin: 0 0 14px;
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

#page-channels .ai-content {
  color: #40536e;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

#page-channels .ai-actions {
  margin-top: 14px;
}

#page-channels .ai-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(37,99,235,0.16);
}

.cha-hero-main {
  background:
    radial-gradient(circle at 86% 58%, rgba(216,137,25,0.24) 0, rgba(216,137,25,0.10) 24%, transparent 45%),
    linear-gradient(135deg, #11233d 0%, #174e76 56%, #0f766e 100%);
}

.cha-section-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 16px;
}

.cha-diagnosis-grid,
.cha-rank-grid,
.cha-drill-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.cha-action-grid,
.cha-quality-cards,
.cha-insight-list {
  display: grid;
  gap: 12px;
}

.cha-insight {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  background: #f5f9fe;
}

.cha-insight strong {
  display: block;
  color: #152842;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 4px;
}

.cha-insight span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.cha-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.cha-hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cha-hero-fact {
  min-height: 82px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
}

.cha-hero-fact span {
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
}

.cha-hero-fact strong {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.cha-stack-list,
.cha-bar-list,
.cha-breakdown {
  display: grid;
  gap: 12px;
}

.cha-stack-row,
.cha-bar-row,
.cha-break-row {
  display: grid;
  grid-template-columns: 108px 1fr 90px;
  gap: 12px;
  align-items: center;
}

.cha-stack-name,
.cha-bar-name {
  color: #334862;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cha-stack-track,
.cha-bar-track {
  height: 24px;
  border-radius: 10px;
  background: #edf3fa;
  overflow: hidden;
}

.cha-stack-fill,
.cha-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8df6, #2563eb);
}

.cha-stack-fill.green,
.cha-bar-fill.green { background: linear-gradient(90deg, #35c77a, #1f9d68); }
.cha-stack-fill.amber,
.cha-bar-fill.amber { background: linear-gradient(90deg, #f2b23b, #d88919); }
.cha-stack-fill.red,
.cha-bar-fill.red { background: linear-gradient(90deg, #ef6a60, #d94a42); }
.cha-stack-fill.teal,
.cha-bar-fill.teal { background: linear-gradient(90deg, #20b7c5, #0f766e); }

.cha-stack-value,
.cha-bar-value {
  text-align: right;
  color: #182b45;
  font-size: 12px;
  font-weight: 950;
}

.cha-warning-note {
  margin-top: 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #f0d397;
  border-radius: 10px;
  color: #5f420d;
  background: #fff7e8;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

.cha-bottom-note {
  border: 1px solid #d8e6f4;
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.82);
  color: #42556f;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cha-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cha-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cha-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2563eb;
}

.cha-legend i.green { background: #1f9d68; }
.cha-legend i.amber { background: #d88919; }
.cha-legend i.red { background: #d94a42; }

.cha-matrix-area {
  height: 288px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, #dbe7f3 49.5%, #dbe7f3 50.5%, transparent 50.5%),
    linear-gradient(135deg, rgba(31,111,235,0.04), rgba(15,118,110,0.05));
  position: relative;
  overflow: hidden;
}

.cha-quadrant {
  position: absolute;
  color: #7a899b;
  font-size: 11px;
  font-weight: 900;
}

.cha-q1 { top: 12px; right: 12px; }
.cha-q2 { top: 12px; left: 12px; }
.cha-q3 { bottom: 12px; left: 12px; }
.cha-q4 { bottom: 12px; right: 12px; }

.cha-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255,255,255,0.78);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(18,35,61,0.18);
  cursor: pointer;
}

.cha-bubble.blue { background: linear-gradient(135deg, #2f8df6, #2563eb); }
.cha-bubble.green { background: linear-gradient(135deg, #35c77a, #1f9d68); }
.cha-bubble.amber { background: linear-gradient(135deg, #f2b23b, #d88919); }
.cha-bubble.red { background: linear-gradient(135deg, #ef6a60, #d94a42); }
.cha-bubble.teal { background: linear-gradient(135deg, #20b7c5, #0f766e); }

.cha-matrix-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #526b88;
  font-size: 12px;
  font-weight: 850;
}

.cha-quality-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cha-quality-card,
.cha-action-card {
  min-height: 94px;
  padding: 14px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #fff;
}

.cha-quality-label,
.cha-action-label {
  color: #526b88;
  font-size: 12px;
  font-weight: 950;
}

.cha-quality-value,
.cha-action-value {
  margin-top: 8px;
  color: #12213a;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.cha-quality-note,
.cha-action-note {
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.cha-selected-channel {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  margin-bottom: 14px;
}

.cha-selected-channel strong {
  display: block;
  color: #12213a;
  font-size: 20px;
  font-weight: 950;
}

.cha-selected-channel span {
  display: block;
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.cha-selected-money {
  text-align: right;
  color: #2563eb;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
}

#page-channels .compact-table {
  font-size: 12px;
}

#page-channels .rank-row {
  grid-template-columns: 38px minmax(160px, 1fr) 126px 150px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}

#page-channels .rank-no {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #c9defc;
  border-radius: 10px;
  background: #eef5ff;
  color: #1759bd;
  font-size: 12px;
  font-weight: 950;
}

#page-channels .rank-name {
  color: #142640;
  font-size: 13px;
  font-weight: 950;
}

#page-channels .rank-sub {
  height: 8px;
  margin-top: 8px;
}

#page-channels .rank-value {
  color: #102039;
  font-size: 13px;
  font-weight: 950;
}

#page-channels .rank-meta {
  color: #526b88;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

#page-channels .rank-row:hover,
.cha-bar-row:hover {
  background: #f3f8ff;
}

/* ===== 渠道结算工作台 ===== */
.chs-hero-main {
  background:
    radial-gradient(circle at 86% 58%, rgba(216,137,25,0.25) 0, rgba(216,137,25,0.10) 24%, transparent 45%),
    linear-gradient(135deg, #11233d 0%, #174e76 58%, #165f72 100%);
}

.chs-hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.chs-hero-fact {
  min-height: 82px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
}

.chs-hero-fact span {
  color: #9ddcff;
  font-size: 12px;
  font-weight: 950;
}

.chs-hero-fact strong {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.chs-explain-card {
  margin: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15,35,70,0.06);
  min-width: 0;
}

.chs-explain-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.chs-explain-title {
  color: #102039;
  font-size: 17px;
  font-weight: 950;
}

.chs-status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #8a5a0b;
  background: #fff7e8;
  border: 1px solid #f0d397;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.chs-explain-card p {
  margin: 0;
  color: #40536e;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 800;
}

.chs-insight-list,
.chs-bars,
.chs-action-grid,
.chs-step-list {
  display: grid;
  gap: 12px;
}

.chs-insight-list {
  margin-top: 16px;
}

.chs-insight {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  background: #f5f9fe;
}

.chs-badge,
.chs-step-no {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.chs-insight strong,
.chs-step strong,
.chs-action-card strong {
  display: block;
  color: #152842;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 4px;
}

.chs-insight span,
.chs-step span,
.chs-action-card span {
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.chs-flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr;
  gap: 10px;
  align-items: stretch;
}

.chs-flow-card {
  min-height: 114px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #fff;
}

.chs-flow-label {
  color: #526b88;
  font-size: 12px;
  font-weight: 950;
}

.chs-flow-value {
  margin-top: 10px;
  color: #12213a;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.chs-flow-note {
  margin-top: 9px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.chs-op {
  display: grid;
  place-items: center;
  color: #8294aa;
  font-size: 24px;
  font-weight: 950;
}

.chs-section-grid,
.chs-audit-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.chs-bar-row {
  display: grid;
  grid-template-columns: 124px 1fr 112px;
  gap: 12px;
  align-items: center;
}

.chs-bar-name {
  color: #334862;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chs-track {
  height: 24px;
  border-radius: 10px;
  background: #edf3fa;
  overflow: hidden;
}

.chs-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8df6, #2563eb);
}

.chs-fill.green { background: linear-gradient(90deg, #35c77a, #1f9d68); }
.chs-fill.amber { background: linear-gradient(90deg, #f2b23b, #d88919); }
.chs-fill.red { background: linear-gradient(90deg, #ef6a60, #d94a42); }
.chs-fill.teal { background: linear-gradient(90deg, #20b7c5, #0f766e); }

.chs-bar-value {
  text-align: right;
  color: #182b45;
  font-size: 12px;
  font-weight: 950;
}

.chs-warning-note {
  margin-top: 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #f0d397;
  border-radius: 10px;
  color: #5f420d;
  background: #fff7e8;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

.chs-fee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.chs-fee-card,
.chs-action-card {
  min-height: 98px;
  padding: 14px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #fff;
}

.chs-fee-label {
  color: #526b88;
  font-size: 12px;
  font-weight: 950;
}

.chs-fee-value {
  margin-top: 8px;
  color: #12213a;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.chs-fee-note {
  margin-top: 7px;
  color: #526b88;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.chs-settlement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 980px;
}

.chs-settlement-table th,
.chs-settlement-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
}

.chs-settlement-table td.num,
.chs-settlement-table th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chs-step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #fff;
}

.chs-step-status {
  font-size: 12px;
  font-weight: 950;
  color: #079455;
  white-space: nowrap;
}

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

.chs-bottom-note {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fbff;
  color: #42556f;
  font-size: 12px;
  line-height: 1.75;
  font-weight: 850;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chs-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chs-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.chs-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2563eb;
}

.chs-legend i.green { background: #1f9d68; }
.chs-legend i.amber { background: #d88919; }
.chs-legend i.red { background: #d94a42; }

@media (max-width: 1280px) {
  .bd-hero,
  .bd-panel-grid,
  .bd-panel-grid.wide-left,
  .analysis-primary-grid,
  .analysis-secondary-grid,
  .bd-drill-grid,
  .pa-quality-grid,
  .pa-structure-grid,
  .pa-drill-grid,
  .ca-section-grid,
  .ca-asset-grid,
  .ca-rank-grid,
  .ca-drill-grid,
  .cha-section-grid,
  .cha-diagnosis-grid,
  .cha-rank-grid,
  .cha-drill-grid,
  .chs-section-grid,
  .chs-audit-grid {
    grid-template-columns: 1fr;
  }
  .bd-metric-grid,
  .bd-deep-grid,
  .analysis-metric-grid,
  .ca-data-grid,
  .cha-hero-facts,
  .chs-hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-revenue-bridge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .overview-revenue-bridge-actions {
    grid-column: 1 / -1;
  }
  .chs-flow {
    grid-template-columns: 1fr;
  }
  .chs-op {
    min-height: 16px;
  }
}

@media (max-width: 980px) {
  .bd-formula,
  .bd-metric-grid,
  .bd-deep-grid,
  .analysis-metric-grid,
  .analysis-calendar-compact,
  .overview-revenue-bridge-grid,
  .calendar-analysis-grid,
  .calendar-reason-grid,
  .pa-hero-facts,
  #page-analysis .mini-card-grid {
    grid-template-columns: 1fr;
  }
  .analysis-basis-shell {
    align-items: flex-start;
    flex-direction: column;
  }
  .analysis-basis-caption { text-align: left; }
  .bd-formula-op {
    min-height: 18px;
  }
  .pa-driver-row,
  .pa-category-row,
  .pa-break-row,
  .pa-selected-project,
  .ca-data-grid,
  .ca-quality-grid,
  .ca-stack-row,
  .ca-seg-row,
  .ca-selected-customer,
  .ca-break-row,
  .cha-hero-facts,
  .cha-quality-cards,
  .cha-stack-row,
  .cha-bar-row,
  .cha-break-row,
  .cha-selected-channel,
  .chs-hero-facts,
  .chs-fee-grid,
  .chs-action-grid,
  .chs-bar-row,
  .chs-step {
    grid-template-columns: 1fr;
  }
  .pa-driver-value,
  .pa-selected-money,
  .ca-stack-value,
  .ca-seg-value,
  .ca-selected-money,
  .cha-stack-value,
  .cha-bar-value,
  .cha-selected-money,
  .chs-bar-value {
    text-align: left;
  }
}

@media (max-width: 1180px) {
  .recon-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .recon-middle-grid {
    grid-template-columns: 1fr;
  }
  .recon-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1181px) and (max-width: 1360px) {
  .recon-kpi-card .value {
    font-size: 17px;
    letter-spacing: -0.02em;
  }
}

@media (max-width: 980px) {
  .recon-hero {
    flex-direction: column;
  }
  .recon-kpi-grid,
  .recon-step-grid {
    grid-template-columns: 1fr;
  }
  .recon-bar-row {
    grid-template-columns: 1fr;
  }
  .recon-mini-grid,
  .recon-flow {
    grid-template-columns: 1fr;
  }
}

.client-placeholder {
  min-height: 420px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 26px rgba(15,35,70,0.055);
}

.client-placeholder-icon {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #18b7c8 100%);
  font-size: 28px;
  font-weight: 950;
}

.client-placeholder h2 {
  margin: 4px 0 10px;
  font-size: 28px;
  color: #102039;
}

.client-placeholder p {
  margin: 0;
  max-width: 720px;
  color: #52616f;
  font-size: 15px;
  line-height: 1.8;
}

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

.client-template-card,
.client-tool-card {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-template-card.active {
  border-color: #1677ff;
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(22,119,255,0.12);
}

.client-template-card strong,
.client-tool-card strong {
  color: #102039;
  font-size: 14px;
  line-height: 1.35;
}

.client-template-card span,
.client-tool-card span {
  color: #52616f;
  font-size: 12px;
  line-height: 1.55;
}

.client-template-actions,
.client-tool-actions,
.client-log-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-template-actions button,
.client-tool-actions button,
.client-log-toolbar button {
  border: 1px solid #91caff;
  background: #f0f7ff;
  color: #0958d9;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.client-template-actions button.primary,
.client-tool-actions button.primary {
  border-color: #95de64;
  background: #ecfdf3;
  color: #237804;
}

.client-template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-tool-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 9px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.client-tool-meta span {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  color: #475569;
}

.client-tool-meta b {
  color: #1e3a5f;
  font-size: 12px;
}

.client-tool-meta em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.client-template-meta em {
  font-style: normal;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.client-import-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.client-import-flow span {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.client-import-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 12px;
}

.client-import-tab-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.client-import-tab-btn.active {
  border-color: #1677ff;
  background: #eff6ff;
  color: #0958d9;
  box-shadow: inset 0 0 0 1px rgba(22,119,255,0.08);
}

.client-import-tab-panel {
  display: none;
}

.client-import-tab-panel.active {
  display: block;
}

.client-import-risk-grid,
.client-import-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.client-import-risk-card,
.client-import-info-card {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  color: #334155;
  font-size: 12px;
  line-height: 1.65;
}

.client-import-risk-card {
  border-color: #fed7aa;
  background: #fff7ed;
}

.client-import-risk-card strong,
.client-import-info-card strong {
  display: block;
  color: #102039;
  font-size: 13px;
  margin-bottom: 4px;
}

.client-import-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.client-import-field-list div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
  background: #f8fafc;
}

.client-import-field-list b {
  display: block;
  color: #102039;
  margin-bottom: 4px;
}

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

.client-import-form-grid input,
.client-import-form-grid select {
  padding: 10px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.client-log-toolbar input,
.client-log-toolbar select {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #102039;
  min-width: 160px;
}

@media (max-width: 980px) {
  .client-template-grid,
  .client-tool-grid,
  .client-import-form-grid,
  .client-import-risk-grid,
  .client-import-info-grid,
  .client-import-field-list {
    grid-template-columns: 1fr;
  }

  body:not(.platform-entry):not(.customer-entry) #main-app .header {
    margin-left: 0;
    height: auto;
    min-height: 82px;
  }
  body:not(.platform-entry):not(.customer-entry) .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    top: auto;
    bottom: auto;
  }
  body:not(.platform-entry):not(.customer-entry) .main {
    display: block;
    height: auto;
  }
  body:not(.platform-entry):not(.customer-entry) #main-app .content,
  body:not(.platform-entry):not(.customer-entry) .content {
    margin-left: 0;
    height: calc(100vh - 180px) !important;
  }
  .client-home-hero {
    grid-template-columns: 1fr;
  }
  .client-home-driver-grid,
  .client-home-signal-row,
  body:not(.platform-entry):not(.customer-entry) #overview-core-kpis {
    grid-template-columns: 1fr !important;
  }
  .client-home-main-card h2 {
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  body:not(.platform-entry):not(.customer-entry) #main-app .header {
    margin-left: 0;
    min-height: 0;
    height: auto;
    padding: 12px 14px;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
  }

  body:not(.platform-entry):not(.customer-entry) .client-top-status {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
  }

  body:not(.platform-entry):not(.customer-entry) .runtime-status {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }

  body:not(.platform-entry):not(.customer-entry) .header .filters {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.platform-entry):not(.customer-entry) .header .filters > * {
    min-width: 0;
    max-width: 100%;
  }

  body:not(.platform-entry):not(.customer-entry) .header .filters select,
  body:not(.platform-entry):not(.customer-entry) .client-report-btn,
  body:not(.platform-entry):not(.customer-entry) .account-trigger {
    width: 100%;
  }

  body:not(.platform-entry):not(.customer-entry) .account-menu-wrap {
    width: 100%;
  }

  body:not(.platform-entry):not(.customer-entry) .sidebar {
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden !important;
    flex-wrap: nowrap;
    overscroll-behavior-x: contain;
  }

  body:not(.platform-entry):not(.customer-entry) .client-nav-section,
  body:not(.platform-entry):not(.customer-entry) .client-brand-panel,
  body:not(.platform-entry):not(.customer-entry) .client-system-card {
    display: none;
  }

  body:not(.platform-entry):not(.customer-entry) #main-app .content,
  body:not(.platform-entry):not(.customer-entry) .content {
    width: 100%;
    max-width: 100vw;
    height: auto !important;
    min-height: calc(100vh - 150px);
    overflow-x: hidden;
    padding: 14px;
  }

  body:not(.platform-entry):not(.customer-entry) .section-heading {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  body:not(.platform-entry):not(.customer-entry) .section-heading .title {
    font-size: 20px;
  }

  body:not(.platform-entry):not(.customer-entry) .client-import-form-grid,
  body:not(.platform-entry):not(.customer-entry) .client-log-toolbar,
  body:not(.platform-entry):not(.customer-entry) .categories-toolbar,
  body:not(.platform-entry):not(.customer-entry) .cashflow-category-add-grid {
    grid-template-columns: 1fr !important;
  }

  #client-import-header-modal {
    padding: 8px !important;
    align-items: stretch !important;
  }

  #client-import-header-modal > div {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }

  #client-import-modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    justify-content: stretch !important;
  }

  #client-import-modal-footer button,
  #client-import-modal-diff-actions button {
    flex: 1 1 160px;
  }

  body:not(.platform-entry):not(.customer-entry) .cfo-panel {
    padding: 14px;
  }

  body:not(.platform-entry):not(.customer-entry) .cfo-panel-head,
  body:not(.platform-entry):not(.customer-entry) .cfo-conclusion-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  body:not(.platform-entry):not(.customer-entry) .cfo-panel-head h3,
  body:not(.platform-entry):not(.customer-entry) .cfo-conclusion-head h3 {
    width: 100%;
    min-width: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-height: 1.35;
    font-size: 18px;
  }

  body:not(.platform-entry):not(.customer-entry) .cfo-panel-head span,
  body:not(.platform-entry):not(.customer-entry) .cfo-chip {
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
    padding: 3px 10px;
  }

  body:not(.platform-entry):not(.customer-entry) .cfo-chart {
    height: 280px;
  }
}

[id^="page-"].route-state-active > :not([data-route-load-failure]) {
  visibility: hidden !important;
  pointer-events: none !important;
}
[id^="page-"] > [data-route-load-failure] {
  visibility: visible !important;
  position: relative;
  z-index: 50;
  margin: 18px;
  padding: 24px;
}

.network-status-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 680px);
  padding: 10px 14px;
  border: 1px solid #f0b45a;
  border-radius: 10px;
  color: #6b3f00;
  background: #fff7e8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
}
.network-status-banner[data-tone="success"] {
  border-color: #80c99b;
  color: #14532d;
  background: #ecfdf3;
}
.network-status-banner[data-tone="error"] {
  border-color: #f0a4a4;
  color: #991b1b;
  background: #fff1f2;
}
.network-status-banner button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

button:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

:where(button, a, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .table-wrap {
    overflow-x: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* V3.4.57 — dual revenue workbenches.  The overview follows the approved
   composition: both revenues stay visible at the top, while detailed
   contribution modules switch as one complete analytical basis. */
#page-overview > .client-home-hero,
#page-overview > #overview-core-kpis {
  display: none !important;
}

.dual-overview-workbench,
.dimension-consumption-workbench {
  --dual-blue: #1167ed;
  --dual-teal: #0ba58b;
  --dual-ink: #102039;
  color: var(--dual-ink);
}

.dual-overview-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 14px;
}
.dual-overview-title h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}
.dual-overview-title p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}
.dual-overview-title .period {
  color: #526b88;
  font-size: 13px;
  font-weight: 800;
}

.dual-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.dual-overview-kpi {
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(29, 78, 137, .06);
}
.dual-overview-kpi-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3d8cff, var(--dual-blue));
  box-shadow: 0 0 0 9px rgba(17, 103, 237, .09);
  font-size: 22px;
  font-weight: 900;
}
.dual-overview-kpi.consumption .dual-overview-kpi-icon {
  background: linear-gradient(145deg, #22c7ad, var(--dual-teal));
  box-shadow: 0 0 0 9px rgba(11, 165, 139, .1);
}
.dual-overview-kpi.orange .dual-overview-kpi-icon {
  background: linear-gradient(145deg, #ffba39, #f08a00);
  box-shadow: 0 0 0 9px rgba(240, 138, 0, .1);
}
.dual-overview-kpi.purple .dual-overview-kpi-icon {
  background: linear-gradient(145deg, #7b7cff, #5557d9);
  box-shadow: 0 0 0 9px rgba(85, 87, 217, .1);
}
.dual-overview-kpi-copy { min-width: 0; }
.dual-overview-kpi-copy span {
  display: block;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.dual-overview-kpi-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--dual-ink);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1;
  white-space: nowrap;
}
.dual-overview-kpi.business .dual-overview-kpi-copy strong { color: var(--dual-blue); }
.dual-overview-kpi.consumption .dual-overview-kpi-copy strong { color: var(--dual-teal); }

.dual-overview-primary {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(300px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.dual-surface {
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(29, 78, 137, .05);
  overflow: hidden;
}
.dual-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 8px;
}
.dual-surface-head h3 {
  margin: 0;
  font-size: 17px;
}
.dual-surface-head span {
  color: #7b8ca5;
  font-size: 12px;
  font-weight: 700;
}
.dual-surface-body { padding: 4px 16px 16px; }
.lite-trend-chart {
  position: relative;
  width: 100%;
  height: 320px;
  min-height: 280px;
}
.lite-trend-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.lite-trend-legend {
  position: absolute;
  top: 2px;
  left: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #526b88;
  font-size: 12px;
  font-weight: 800;
}
.lite-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lite-trend-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #1167ed;
}
.lite-trend-legend i.consumption { background: #0ba58b; }

.dual-month-summary {
  display: grid;
  gap: 15px;
  padding: 8px 2px 2px;
}
.dual-month-income {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
}
.dual-month-income .dot {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--dual-blue);
  font-weight: 900;
}
.dual-month-income.consumption .dot { background: var(--dual-teal); }
.dual-month-income span { display: block; color: #526b88; font-size: 13px; font-weight: 800; }
.dual-month-income strong { display: block; margin-top: 2px; font-size: 26px; }
.dual-month-income.business strong { color: var(--dual-blue); }
.dual-month-income.consumption strong { color: var(--dual-teal); }
.dual-ratio-box {
  padding-top: 13px;
  border-top: 1px solid #e7edf5;
}
.dual-ratio-box span { color: #526b88; font-size: 13px; font-weight: 800; }
.dual-ratio-box strong { display: block; margin-top: 5px; color: var(--dual-teal); font-size: 28px; }
.dual-ratio-track { height: 9px; margin-top: 10px; border-radius: 99px; background: #eaf0f7; overflow: hidden; }
.dual-ratio-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c7ad, var(--dual-teal)); }

.revenue-detail-heading,
.dimension-basis-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 10px;
}
.revenue-detail-heading h3,
.dimension-basis-copy h2 { margin: 0; font-size: 18px; }
.revenue-detail-heading p,
.dimension-basis-copy p { margin: 4px 0 0; color: #6b7d95; font-size: 12px; }
.revenue-basis-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid #dce6f2;
  border-radius: 9px;
  background: #f6f9fd;
}
.revenue-basis-control button {
  min-width: 96px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  color: #526b88;
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.revenue-basis-control button.active.business { color: #fff; background: var(--dual-blue); }
.revenue-basis-control button.active.consumption { color: #fff; background: var(--dual-teal); }

.dual-contribution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.dual-contribution-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: #fff;
}
.dual-contribution-card h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
}
.dual-contribution-card h4 em {
  color: #7b8ca5;
  font-size: 11px;
  font-style: normal;
}
.dual-rank-row {
  display: grid;
  grid-template-columns: minmax(70px, 1.1fr) minmax(60px, .85fr) 52px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 12px;
}
.dual-rank-row:last-child { border-bottom: 0; }
.dual-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dual-rank-amount { text-align: right; font-weight: 850; }
.dual-rank-share { color: #526b88; text-align: right; }
.dual-mini-track { grid-column: 1 / -1; height: 4px; margin: -5px 0 4px; border-radius: 99px; background: #eaf0f7; overflow: hidden; }
.dual-mini-track i { display: block; height: 100%; border-radius: inherit; background: var(--dual-blue); }
.dual-overview-workbench.consumption-detail .dual-mini-track i { background: var(--dual-teal); }
.dual-contribution-total {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dce6f2;
  font-size: 12px;
  font-weight: 900;
}

.overview-basis-deep {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}
#page-overview > #overview-management-signals,
#page-overview > #overview-year-trend,
#page-overview > #boss-main-charts,
#page-overview > #mom-comparison {
  display: none !important;
}
.overview-basis-deep .dual-deep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dual-signal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dual-signal-card { padding: 14px; border-radius: 10px; background: #f7fafc; border: 1px solid #e5edf6; }
.dual-signal-card span { color: #667085; font-size: 12px; font-weight: 800; }
.dual-signal-card strong { display: block; margin-top: 6px; font-size: 21px; color: var(--dual-teal); }
.dual-signal-card em { display: block; margin-top: 7px; color: #7b8ca5; font-size: 11px; font-style: normal; }
.dual-overview-workbench:not(.consumption-detail) .dual-signal-card strong { color: var(--dual-blue); }
.dual-list-bars { display: grid; gap: 10px; }
.dual-list-bar { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.6fr) auto; align-items: center; gap: 9px; font-size: 12px; }
.dual-list-bar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dual-list-bar-track { height: 8px; border-radius: 99px; background: #eaf0f7; overflow: hidden; }
.dual-list-bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--dual-teal); }
.dual-list-bar b { white-space: nowrap; }

.dimension-basis-shell {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  padding: 18px 20px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 35, 70, .05);
}
.dimension-basis-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dimension-basis-title-row .dimension-basis-copy h2 {
  font-size: 22px;
}
.dimension-current-basis {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #155eef;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.dimension-current-basis.consumption {
  border-color: #a7f3d0;
  color: #087f68;
  background: #ecfdf5;
}
.dimension-analysis-basis-control {
  padding-top: 14px;
  border-top: 1px solid #e6edf5;
}
.dimension-analysis-basis-control .analysis-basis-button {
  min-width: 132px;
}
.dimension-consumption-workbench { display: none !important; }
.dimension-consumption-hero {
  padding: 20px 22px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(130deg, #086f77, #0ba58b 58%, #2ec7ad);
  box-shadow: 0 12px 30px rgba(11, 165, 139, .18);
}
.dimension-consumption-hero span { display: block; color: rgba(255,255,255,.75); font-size: 12px; font-weight: 850; letter-spacing: .06em; }
.dimension-consumption-hero h2 { margin: 7px 0 5px; font-size: 25px; }
.dimension-consumption-hero p { margin: 0; color: rgba(255,255,255,.88); }
.dimension-consumption-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.dimension-consumption-metric { padding: 16px; border: 1px solid #dce6f2; border-radius: 12px; background: #fff; }
.dimension-consumption-metric span { color: #667085; font-size: 12px; font-weight: 800; }
.dimension-consumption-metric strong { display: block; margin-top: 7px; color: #102039; font-size: 23px; }
.dimension-consumption-metric.primary strong { color: var(--dual-teal); }
.dimension-consumption-main { display: grid; grid-template-columns: 1.35fr .85fr; gap: 14px; }
.dimension-consumption-table { max-height: 480px; overflow: auto; }
.dimension-consumption-table .compact-table { min-width: 720px; }
#page-items.revenue-consumption-detail > .bd-workbench,
#page-customers.revenue-consumption-detail > .bd-workbench,
#page-channels.revenue-consumption-detail > .bd-workbench,
#page-staff.revenue-consumption-detail > .bd-workbench {
  display: grid;
}

.dimension-consumption-status {
  padding: 12px 16px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: #ecfdf5;
}

.dimension-consumption-status[data-state="error"] {
  border-color: #fecaca;
  background: #fff1f2;
}

.revenue-consumption-detail .bd-hero-main {
  background:
    radial-gradient(circle at 86% 58%, rgba(52,211,153,.30) 0, rgba(52,211,153,.12) 25%, transparent 45%),
    linear-gradient(135deg, #103b43 0%, #087f68 58%, #0ba58b 100%);
}

.revenue-consumption-detail .bd-kicker {
  color: #bbf7d0;
}

.revenue-consumption-detail .bd-metric.dark {
  background: linear-gradient(135deg, #076b5d, #0ba58b);
}

.revenue-consumption-detail .pa-fill.green,
.revenue-consumption-detail .pa-fill.teal,
.revenue-consumption-detail .rank-sub span {
  background: #0ba58b;
}

/* Approved breakdown mock-up: compact basis switch, five KPIs and two equal
   analytical rows in the first screen. */
#page-analysis .analysis-basis-shell {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#page-analysis .analysis-basis-caption { display: none; }
#page-analysis .analysis-basis-control { gap: 7px; }
#page-analysis .analysis-basis-control > strong { margin-right: 8px; }
#page-analysis .analysis-basis-button { min-width: 118px; padding: 10px 18px; }
#page-analysis .analysis-primary-grid { grid-template-columns: 1.15fr 1fr; }
#page-analysis .analysis-secondary-grid { grid-template-columns: 1.15fr 1fr; }
#page-analysis .analysis-metric-grid .bd-metric { min-height: 104px; }

@media (max-width: 1280px) {
  .dual-overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dual-contribution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dimension-consumption-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .dual-overview-primary,
  .dimension-consumption-main,
  .overview-basis-deep .dual-deep-grid { grid-template-columns: 1fr; }
  .dual-overview-kpis,
  .dual-signal-grid,
  .dimension-consumption-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .dual-overview-title,
  .revenue-detail-heading { align-items: stretch; flex-direction: column; }
  .dimension-basis-title-row { align-items: flex-start; flex-direction: column; }
  .dimension-analysis-basis-control { align-items: stretch; }
  .dimension-analysis-basis-control > strong { width: 100%; }
  .dimension-analysis-basis-control .analysis-basis-button { flex: 1; min-width: 0; }
  .dual-overview-kpis,
  .dual-contribution-grid,
  .dual-signal-grid,
  .dimension-consumption-grid { grid-template-columns: 1fr; }
  .revenue-basis-control { width: 100%; }
  .revenue-basis-control button { flex: 1; min-width: 0; }
}
