/* 观澜 · 作战总览双栏、组别筛选、焦点雷达与同龄对比专用样式 */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 18px;
  align-items: stretch;
}
.overview-grid > .panel { min-width: 0; }

/* 战况色阶图例 */
.battle-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 11px;
}
.battle-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.battle-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.battle-legend .lg-done { background: var(--success); }
.battle-legend .lg-sprint { background: var(--sprint); }
.battle-legend .lg-steady { background: var(--accent); }
.battle-legend .lg-risk { background: var(--orange); }

/* 右侧作战焦点面板 */
.focus-panel { display: flex; flex-direction: column; }
.focus-glint { font-size: 18px; color: var(--accent); opacity: .85; }
.focus-body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  gap: 12px;
  height: 100%;
}
.focus-item {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-raised);
  padding: 15px 16px;
  box-shadow: var(--inner-shadow);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.focus-item:hover { background: var(--surface-hover); border-color: var(--accent-edge); }
.focus-near {
  background: linear-gradient(135deg, var(--sprint-soft), var(--surface-raised) 80%);
  border-color: var(--sprint-edge);
}
.focus-audit {
  background: var(--surface-raised);
  cursor: default;
}
.focus-audit.has-alert {
  background: linear-gradient(135deg, var(--warning-soft), var(--surface-raised) 82%);
  border-color: var(--warning-edge);
}
.focus-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.focus-label i {
  font-style: normal;
  border-radius: 7px;
  background: var(--accent-soft);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-size: 12px;
}
.focus-near .focus-label i { background: var(--sprint-soft); color: var(--sprint); }
.focus-audit.has-alert .focus-label i { background: var(--warning-soft); color: var(--orange); }
.focus-number {
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.5px;
  font-weight: 700;
  margin: 10px 0 3px;
  font-variant-numeric: tabular-nums;
}
.focus-near .focus-number { color: var(--sprint); }
.focus-number small { font-size: 11px; font-weight: 500; letter-spacing: 0; margin-left: 5px; color: var(--muted); }
.focus-item p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.focus-bottom {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.focus-bottom strong { font-size: 12px; font-weight: 650; color: var(--ink); }
.focus-bottom span { font-size: 11px; color: var(--muted); }
.focus-audit-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.focus-audit-row strong { font-size: 26px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.focus-audit.has-alert .focus-audit-row strong { color: var(--orange); }
.focus-audit-row small { font-size: 11px; color: var(--muted); font-weight: 500; }
.focus-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.focus-links a { font-size: 11px; color: var(--accent-ink); font-weight: 550; }
.focus-links a:hover { text-decoration: underline; }
.focus-foot { font-size: 11px; color: var(--muted); margin-top: auto; text-align: center; padding-top: 6px; }
.focus-placeholder { margin-top: 10px; }

/* 所属组徽章与筛选栏 */
.team-badges, .focus-bottom .team-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
  max-width: 100%;
}
.team-badge, .focus-bottom .team-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
}
.team-badge.team-wencheng { color: var(--team-blue); background: var(--team-blue-bg); border-color: var(--team-blue-edge); }
.team-badge.team-xigua { color: var(--team-green); background: var(--team-green-bg); border-color: var(--team-green-edge); }
.team-badge.team-unassigned { color: var(--team-gray); background: var(--team-gray-bg); border-color: var(--team-gray-edge); }
.batch-cell > .team-badges, .batch-choice .team-badges, .focus-bottom > .team-badges { margin-top: 5px; }
.focus-links .team-badge { font-size: 10px; padding: 1px 5px; }

.team-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 11px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.team-filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.team-filter-controls > .toolbar-label { margin-right: 4px; }
.team-filter {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.team-filter:hover { color: var(--ink); background: var(--surface-hover); border-color: var(--accent-edge); }
.team-filter.active { font-weight: 650; color: var(--team-blue); background: var(--team-blue-bg); border-color: var(--team-blue-edge); }
.team-filter.team-xigua.active { color: var(--team-green); background: var(--team-green-bg); border-color: var(--team-green-edge); }
.team-filter.team-unassigned.active { color: var(--team-gray); background: var(--team-gray-bg); border-color: var(--team-gray-edge); }
.team-filter-bar > p { font-size: 11px; color: var(--muted); }

/* 批次对比选择器与赛马画布 */
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fund-groups { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 14px; padding: 18px 22px; }
.fund-group {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
}
.fund-group header {
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
}
.fund-group header > div { display: flex; align-items: center; gap: 8px; }
.fund-group header strong { font-size: 13px; color: var(--accent-ink); font-weight: 650; }
.fund-orb { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.fund-1 header { background: var(--purple-soft); }
.fund-1 header strong { color: var(--purple); }
.fund-1 .fund-orb { background: var(--purple); }
.fund-2 header { background: var(--teal-soft); }
.fund-2 header strong { color: var(--teal); }
.fund-2 .fund-orb { background: var(--teal); }
.group-count, .group-all { font-size: 11px; color: var(--muted); }
.group-all { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.group-all input { width: 13px; height: 13px; padding: 0; margin: 0; }
.fund-batches { display: grid; gap: 8px; padding: 12px; }
.fund-0 .fund-batches { grid-template-columns: 1fr 1fr; }
.fund-empty { padding: 12px 4px; font-size: 12px; grid-column: 1 / -1; }
.batch-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .14s, background .14s;
}
.batch-choice:hover { border-color: var(--accent-edge); background: var(--surface-hover); }
.batch-choice.chosen { background: var(--accent-soft); border-color: var(--accent-edge); }
.fund-1 .batch-choice.chosen { background: var(--purple-soft); border-color: var(--purple-edge); }
.fund-2 .batch-choice.chosen { background: var(--teal-soft); border-color: var(--teal-edge); }
.batch-choice input { width: 14px; height: 14px; padding: 0; margin: 2px 0 0; flex-shrink: 0; }
.batch-choice > span { min-width: 0; }
.batch-choice strong { font-size: 12px; font-weight: 650; color: var(--ink); display: block; overflow-wrap: anywhere; }
.batch-choice small { font-size: 11px; display: block; margin-top: 4px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.batch-choice i { font-style: normal; margin: 0 4px; }

.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 22px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.selection-summary strong { color: var(--accent-ink); font-size: 14px; margin: 0 3px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: var(--success); border-radius: 50%; margin-right: 7px; }

.comparison-stage .panel-head { padding: 22px 24px 0; }
.comparison-stage .panel-head h2 { font-size: 20px; font-weight: 700; }
.comparison-range { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.comparison-range-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.comparison-range-sub > span { font-size: 12px; font-weight: 650; color: var(--accent-ink); }
.chart-summary {
  margin: 18px 24px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.chart-summary > div { min-width: 64px; }
.chart-summary span { font-size: 11px; color: var(--muted); display: block; }
.chart-summary strong { font-size: 26px; font-weight: 700; display: block; margin-top: 4px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.chart-summary strong small { color: var(--muted); font-size: 12px; margin-left: 3px; font-weight: 500; }
.chart-summary p { margin-left: auto; color: var(--muted); font-size: 11px; text-align: right; line-height: 1.75; }
.compare-canvas { height: 470px; }
.compare-empty { height: 260px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); gap: 10px; }
.empty-chart-icon { font-size: 46px; color: var(--quiet); opacity: .6; }
.comparison-stage .chart-note { padding: 6px 24px 20px; }

/* 同龄阶段里程碑赛马表 */
.milestone-table td, .milestone-table th { font-variant-numeric: tabular-nums; }
.milestone-cell { font-weight: 550; }
.milestone-cell.is-done { color: var(--success); font-weight: 700; }
.milestone-cell.is-top { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.milestone-cell.is-done.is-top { background: var(--success-soft); color: var(--success); }
.milestone-na { color: var(--quiet); opacity: .65; }

/* 群抗衰耐久度体系（耐力条、语义徽章、体检排行与 30 天阶段留存拆解） */
.batch-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  max-width: 212px;
}
.batch-badges-row .team-badges { margin-top: 0; }
.batch-choice .batch-badges-row { max-width: none; }
.subline-quiet { font-size: 10.5px; color: var(--quiet); margin-top: 2px; }

/* 方案 B · 财务对账单式（已回 vs 成本上下对齐 + 独立回本缺口/超额胶囊列） */
#batchTable .batch-table.with-forecast th,
#batchTable .batch-table.with-forecast td { padding: 13px 8px; }
#batchTable .batch-table.with-forecast th:first-child,
#batchTable .batch-table.with-forecast td:first-child { padding-left: 16px; }
#batchTable .batch-table.with-forecast th:last-child,
#batchTable .batch-table.with-forecast td:last-child { padding-right: 16px; }
#batchTable .batch-table.with-forecast .variant-progress { min-width: 96px; }
#batchTable .batch-table.with-forecast .forecast-table-cell { min-width: 152px; }
.ledger-cell { min-width: 140px; max-width: 168px; }
.ledger-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
.ledger-line > span { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.ledger-line > strong { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.ledger-formula { font-size: 10.5px; color: var(--quiet); margin-top: 3px; font-variant-numeric: tabular-nums; white-space: normal; line-height: 1.4; }
.ledger-mobile-gaps { display: none; }
.gap-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.gap-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.gap-badge em { font-style: normal; font-size: 10.5px; font-weight: 600; opacity: .82; }
.gap-badge.done { color: var(--success); background: var(--success-soft); border-color: var(--success-edge); }
.gap-badge.sprint { color: var(--sprint); background: var(--sprint-soft); border-color: var(--sprint-edge); }
.gap-badge.pending { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-edge); }
.gap-badge.risk { color: var(--orange); background: var(--warning-soft); border-color: var(--warning-edge); }

.dur-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dur-badge.is-compact { font-size: 10.5px; padding: 2px 6px; border-radius: 6px; gap: 4px; }
.dur-badge b { font-weight: 750; }
.dur-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }
.dur-badge.dur-strong, .dur-chip.dur-strong { color: var(--success); background: var(--success-soft); border-color: var(--success-edge); }
.dur-badge.dur-normal, .dur-chip.dur-normal { color: var(--sprint); background: var(--sprint-soft); border-color: var(--sprint-edge); }
.dur-badge.dur-weak, .dur-chip.dur-weak { color: var(--orange); background: var(--warning-soft); border-color: var(--warning-edge); }
.dur-badge.dur-bleeding { color: var(--red); background: var(--danger-soft); border-color: var(--danger-edge); }
.dur-badge.dur-new, .dur-chip.dur-new { color: var(--muted); background: var(--surface-soft); border-color: var(--border); }

.dur-ink-strong { color: var(--success) !important; }
.dur-ink-normal { color: var(--sprint) !important; }
.dur-ink-weak { color: var(--orange) !important; }
.dur-ink-bleeding { color: var(--red) !important; }
.dur-pending { color: var(--muted); font-weight: 550; font-size: 12px; }

.dur-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.dur-summary-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dur-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dur-jump-btn { font-weight: 650; color: var(--accent-ink); border-color: var(--accent-edge); background: var(--accent-soft); }

.durability-board .panel-head { padding-bottom: 14px; }
.durability-table th, .durability-table td { padding: 13px 14px; font-variant-numeric: tabular-nums; }
.durability-table th small { display: block; font-size: 10px; font-weight: 450; color: var(--quiet); margin-top: 2px; }
.dur-batch-col .batch-badges-row { max-width: none; }
.dur-inline-meta { font-size: 11px; color: var(--muted); margin-top: 0 !important; display: inline !important; }
.dur-rank-wrap { display: flex; align-items: center; gap: 11px; }
.dur-rank {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dur-rank.is-top { background: var(--line-done); border-color: transparent; color: #ffffff; box-shadow: 0 2px 8px #05966933; }
.dur-rank.is-new { font-size: 10.5px; font-weight: 600; opacity: .78; }

.col-stamina-bar { min-width: 220px; }
.stamina-cell { min-width: 204px; max-width: 256px; }
.stamina-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.stamina-score { font-size: 18px; font-weight: 750; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.stamina-score small { font-size: 11px; font-weight: 550; margin-left: 2px; color: var(--muted); }
.stamina-track {
  height: 8px;
  border-radius: 99px;
  background: var(--progress-track);
  margin-top: 6px;
  overflow: hidden;
}
.stamina-track.is-new {
  background: transparent;
  border: 1px dashed var(--border-strong);
}
.stamina-fill { height: 100%; border-radius: 99px; }
.dur-fill-strong { background: var(--line-done); }
.dur-fill-normal { background: var(--line-sprint); }
.dur-fill-weak { background: var(--line-risk); }
.dur-fill-bleeding { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.stamina-note { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.dur-metric { font-size: 15px; font-weight: 750; color: var(--ink); display: block; }
.col-m1-ref { border-left: 1px dashed var(--border); background: var(--surface-raised); }
.dur-m1-ref { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.durability-board .chart-note { padding-top: 12px; border-top: 1px solid var(--border); }
.durability-board .chart-note code { font-family: inherit; font-weight: 600; color: var(--ink); }

/* 详情页 · 群耐久度与 30 天阶段留存拆解 */
.durability-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  padding: 16px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.dur-kpi-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: var(--inner-shadow);
}
.dur-card-strong { border-color: var(--success-edge); background: linear-gradient(140deg, var(--success-soft), var(--surface-raised) 78%); }
.dur-card-weak { border-color: var(--warning-edge); background: linear-gradient(140deg, var(--warning-soft), var(--surface-raised) 78%); }
.dur-card-bleeding { border-color: var(--danger-edge); background: linear-gradient(140deg, var(--danger-soft), var(--surface-raised) 78%); }
.dur-kpi-label { font-size: 11.5px; font-weight: 600; color: var(--muted); display: block; }
.dur-kpi-value { font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink); margin: 8px 0 6px; line-height: 1.2; }
.dur-kpi-value span { font-size: 12px; font-weight: 500; color: var(--muted); }
.dur-kpi-card p { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.stage-retention-table th, .stage-retention-table td { font-variant-numeric: tabular-nums; }
.stage-ret-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.stage-ret-bar { width: 108px; height: 7px; border-radius: 99px; background: var(--progress-track); overflow: hidden; flex-shrink: 0; }

/* 小白甄选 IP 形象与品牌视觉 */
.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
  flex-shrink: 0;
}
.login-story .brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.login-ip-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  box-shadow: var(--card-shadow);
  max-width: 460px;
}
.login-ip-portrait {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: #ffffff;
  border: 2px solid var(--accent-edge);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}
.login-ip-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.login-ip-copy strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.login-ip-copy span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.heading-main {
  display: flex;
  align-items: center;
  gap: 15px;
}
.heading-ip-avatar {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  object-fit: cover;
  background: #ffffff;
  border: 1.5px solid var(--accent-edge);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
  flex-shrink: 0;
}

/* =========================================================
   Natural Month & Cohort Recovery Matrix (#monthlyMatrixBoard)
   ========================================================= */
.monthly-matrix-board {
  margin-bottom: 18px;
}
.mm-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 960px;
}
#monthlyMatrixBoard .mm-table th,
#monthlyMatrixBoard .mm-table td {
  padding: 8px 6px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
#monthlyMatrixBoard .mm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised);
  text-align: right;
  white-space: nowrap;
}
#monthlyMatrixBoard .mm-table thead th span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
#monthlyMatrixBoard .mm-table thead th small {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 1px;
}
#monthlyMatrixBoard .mm-table .mm-batch-col {
  text-align: left !important;
  min-width: 136px;
  max-width: 162px;
  padding-left: 14px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface-raised);
  border-right: 1px solid var(--border);
}
#monthlyMatrixBoard .mm-table .mm-batch-col > strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}
#monthlyMatrixBoard .mm-table .mm-foot-note {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
#monthlyMatrixBoard .mm-table tbody tr:hover .mm-batch-col {
  background: var(--surface-hover, var(--surface-raised));
}
.mm-col-month[data-pick-month],
.mm-col-r30[data-pick-month] {
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.mm-col-month[data-pick-month]:hover,
.mm-col-r30[data-pick-month]:hover {
  background: rgba(37, 99, 235, 0.08);
}
.mm-col-month.is-selected,
.mm-col-r30.is-selected {
  background: rgba(37, 99, 235, 0.12) !important;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.mm-col-month.is-selected span,
.mm-col-r30.is-selected span {
  color: var(--accent);
}
.mm-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease;
}
.mm-cell > strong.money {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.mm-cell.is-pre {
  color: var(--muted);
  opacity: 0.55;
}
.mm-cell.is-pre .mm-pre {
  display: block;
  font-size: 12px;
}
.mm-cell.is-pre small {
  display: block;
  font-size: 9.5px;
}
.mm-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 3px;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.2;
}
.mm-mini-tag {
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  padding: 0.5px 3.5px;
  border-radius: 3.5px;
  line-height: 1.2;
}
.mm-mini-tag.is-peak {
  color: #0d8259;
  background: rgba(16, 185, 129, 0.14);
}
.mm-mini-tag.is-part {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}
.mm-mini-tag.is-cur {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}
:root[data-theme="dark"] .mm-mini-tag.is-peak {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.22);
}
:root[data-theme="dark"] .mm-mini-tag.is-part {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.24);
}
:root[data-theme="dark"] .mm-mini-tag.is-cur {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.22);
}
.mm-heat-1 { background: rgba(37, 99, 235, 0.025); }
.mm-heat-2 { background: rgba(37, 99, 235, 0.055); }
.mm-heat-3 { background: rgba(13, 148, 136, 0.08); }
.mm-heat-4 { background: rgba(16, 185, 129, 0.12); }
:root[data-theme="dark"] .mm-heat-1 { background: rgba(96, 165, 250, 0.04); }
:root[data-theme="dark"] .mm-heat-2 { background: rgba(96, 165, 250, 0.08); }
:root[data-theme="dark"] .mm-heat-3 { background: rgba(45, 212, 191, 0.11); }
:root[data-theme="dark"] .mm-heat-4 { background: rgba(52, 211, 153, 0.16); }

.mm-cell.is-selected,
.mm-foot-cell.is-selected {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.09) !important;
}
.mm-col-r30 {
  border-left: 1px dashed var(--border-strong);
}
.mm-col-total {
  border-left: 1px solid var(--border);
}
.mm-foot-row td {
  background: var(--surface-raised);
  border-top: 1.5px solid var(--border-strong);
  border-bottom: none;
  padding-top: 11px;
  padding-bottom: 11px;
}
.mm-foot-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mm-foot-cell > strong.money {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

/* Inline Natural Month Strip inside #batchTable */
.th-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 1px;
}
.recent-month-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.rm-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 5.5px;
  font-size: 10px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all 0.14s ease;
}
.rm-chip span {
  opacity: 0.85;
}
.rm-chip b {
  font-weight: 650;
  color: var(--ink);
}
.rm-chip:hover {
  border-color: var(--accent-edge);
  color: var(--ink);
}
.rm-chip.is-active {
  background: rgba(37, 99, 235, 0.13);
  border-color: var(--accent);
  color: var(--accent);
}
.rm-chip.is-active b {
  color: var(--accent);
}
.rm-chip.is-reset {
  font-weight: 600;
  color: var(--accent);
  border-style: dashed;
}

@media (max-width: 1150px) {
  .overview-grid { grid-template-columns: 1fr; }
  .focus-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .focus-foot { grid-column: 1 / -1; }
  .fund-groups { grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; padding: 16px; }
  .fund-0 .fund-batches { grid-template-columns: 1fr; }
  .durability-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .focus-body { display: flex; flex-direction: column; padding: 14px; }
  .team-filter-bar { padding: 11px 12px; }
  .fund-groups { display: flex; flex-direction: column; padding: 14px; gap: 10px; }
  .fund-batches, .fund-0 .fund-batches { grid-template-columns: 1fr 1fr; padding: 10px; }
  .comparison-stage .panel-head { padding: 18px 16px 0; }
  .comparison-range { align-items: flex-start; width: 100%; }
  .comparison-range-sub { width: 100%; justify-content: space-between; }
  .chart-summary { margin: 14px 16px 10px; gap: 16px 24px; }
  .chart-summary p { display: none; }
  .compare-canvas { height: 380px; }
  .comparison-stage .chart-note { padding: 6px 16px 16px; }
  .dur-head-actions { width: 100%; justify-content: flex-start; }
  .durability-kpi-grid { grid-template-columns: 1fr; padding: 14px; gap: 10px; }
  .batch-badges-row { max-width: 124px; }
  #batchTable .batch-table th,
  #batchTable .batch-table td,
  #batchTable .batch-table.with-forecast th,
  #batchTable .batch-table.with-forecast td { padding: 11px 6px; }
  #batchTable .batch-table.with-forecast th:first-child,
  #batchTable .batch-table.with-forecast td:first-child { padding-left: 10px; }
  #batchTable .batch-table.with-forecast th:last-child,
  #batchTable .batch-table.with-forecast td:last-child { padding-right: 10px; }
  #batchTable .batch-cell strong { min-width: 78px; max-width: 116px; }
  #batchTable .batch-table .variant-progress,
  #batchTable .batch-table.with-forecast .variant-progress { min-width: 74px; }
  .ledger-cell { min-width: 114px; max-width: 138px; }
  .ledger-line { gap: 5px; font-size: 10.5px; line-height: 1.5; }
  .ledger-line > span { font-size: 9.5px; }
  .ledger-line > strong { font-size: 11px; }
  .ledger-formula { display: none; }
  .ledger-mobile-gaps { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
  .gap-badge.is-mobile { font-size: 10px; padding: 1.5px 5px; border-radius: 5px; }
  .heading-main { gap: 11px; }
  .heading-ip-avatar { width: 42px; height: 42px; border-radius: 13px; }
  .login-ip-card { padding: 12px 14px; gap: 12px; margin-top: 18px; }
  .login-ip-portrait { width: 58px; height: 58px; border-radius: 14px; }
}
