/* Financial workspaces — BHub navy, blue and neutral surfaces.
   Additive layer: the existing layouts, states and responsive table behavior remain.
   Shell, shared dialogs and the accounting/control/service modules are owned elsewhere. */

/* Overview: one reading hierarchy, then the work of the month. */
.overview-kpis {
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-color: var(--line);
}
.overview-stat { padding-inline: 24px; }
.overview-stat > span,
.overview-stat > small { color: var(--muted); font-size: 12px; }
.overview-stat > strong,
.overview-stat.lead > strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.7px;
  margin: 10px 0 7px;
}
.overview-stat.lead > strong { font-size: 32px; }
.overview-stat:hover > span { color: var(--accent); }
.overview-workspace { gap: 32px; }
.overview-agenda { padding-left: 26px; border-color: var(--line); }
.overview-agenda h2,
.overview-primary .section-toolbar h2 { font-size: 16px; font-weight: 700; }
.agenda-row { padding: 17px 0; }
.agenda-row strong,
.agenda-row > span:not(.agenda-date) { font-size: 14px; }
.agenda-row small,
.agenda-date { font-size: 12px; }
.agenda-date { color: var(--accent); font-weight: 700; }
.month-brief { padding: 24px 0; }
.month-brief > p { font-size: 12px; }
.month-comparison > button { row-gap: 11px; min-height: 44px; }
.month-comparison > button > span { font-size: 13px; }
.month-comparison strong { font-size: 16px; font-weight: 700; }
.month-comparison i {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--bar), #eaf0f6 var(--bar));
}
.month-comparison i.out {
  background: linear-gradient(to right, #65758b var(--bar), #eaf0f6 var(--bar));
}
.bank-row { min-height: 58px; border-color: var(--line); transition: background .14s; }
.bank-row:hover { background: #f0f5fb; }
.bank-row > span:nth-child(2) { font-size: 14px; }
.bank-row strong { font-size: 14px; font-weight: 700; }
.bank-row small { font-size: 12px; }
.bank-code,
.bank-1,
.bank-2 { background: #edf2f8; color: #405674; border-radius: 6px; font-weight: 700; }
.overview-workspace .count { background: #eaf0f7; color: var(--ink); }
.overview-workspace .completion-track { background: #e6edf5; }
.overview-workspace .completion-track i { background: var(--accent); }
.overview-workspace .inline-attention { background: #f4f8fd; border-color: #d5e5f7; }

/* Shared financial charts: series and legend retain distinct line styles. */
.chart-grid { stroke: #e6ecf3; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; }
.chart-area { fill: #0171e4; opacity: .055; }
.chart-comparison { stroke: #64748b; stroke-width: 1.8; stroke-dasharray: 5 5; }
.reserve-line { stroke: #7d8a9b; stroke-dasharray: 3 5; }
.chart-cursor { stroke: #b9cde3; }
.chart-point { fill: var(--accent); stroke: var(--surface); }
.chart-masked { background: #f0f4f8; color: var(--muted); border-radius: 8px; }
.chart-wrap text { fill: var(--muted); font-size: 12px; }
.line-solid { border-top-color: var(--accent); }
.line-dashed { border-top-color: #64748b; }
.chart-legend,
.chart-context { font-size: 12px; }

/* Cash and scenarios: the selected week is the anchor, not a decorative card. */
.cash-context { font-size: 12px; padding-bottom: 15px; margin-bottom: 25px; }
.cash-context button { font-size: 12px; }
.cash-analysis .metrics { margin-bottom: 25px; }
.cash-analysis .metric > span,
.cash-analysis .metric > small { font-size: 12px; line-height: 1.5; }
.cash-analysis .metric > strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.6px;
  margin-block: 9px;
}
.cash-analysis .metric > .button { font-size: 12px; }
.projection-surface { padding-top: 22px; }
.projection-surface .section-toolbar h2 { font-size: 16px; font-weight: 700; }
.week-picker { gap: 4px; margin-block: 12px 20px; }
.week-picker button { min-height: 44px; border-radius: 6px; }
.week-picker button:hover { background: #edf3fa; }
.week-picker button[aria-pressed=true] {
  color: #075baa;
  background: #e8f2ff;
  border-color: #aacdf7;
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 700;
}
.week-picker button[aria-pressed=true] small { color: #075baa; }
.week-picker small { font-size: 11px; }
.week-inspector {
  padding: 19px 20px;
  background: var(--surface);
  border-color: var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.week-title { margin-bottom: 16px; }
.week-title h3 { font-size: 14px; font-weight: 700; }
.week-title > span:last-child,
.week-title .eyebrow,
.week-inspector > p { font-size: 12px; }
.week-equation div > span { color: var(--muted); font-size: 11px; }
.week-equation strong { color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -.15px; }
.week-equation .math { color: #8290a2; }
.week-equation .result strong { color: #075baa; }
.reserve-note { color: #16704a; font-size: 12px; }
.reserve-note.warning { color: #855b12; }
.projection-table summary,
.annual-report summary { font-size: 14px; font-weight: 700; }
.projection-table summary span,
.annual-report summary span { font-size: 12px; font-weight: 400; }
.decision-lab {
  padding: 23px;
  background: var(--surface);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgb(15 23 39 / 2%);
}
.decision-lab .section-toolbar h2 { font-size: 16px; font-weight: 700; }
.decision-lab > .section-toolbar > .icon { color: var(--muted); }
.decision-lab > p { font-size: 13px; line-height: 1.6; }
.decision-lab .eyebrow { font-size: 11px; letter-spacing: .8px; }
.decision-lab .scenario-choice,
.decision-lab .scenario-delta,
.decision-lab > p.simulation-disclosure { border-color: var(--line); }
.decision-lab .scenario-choice { padding-block: 18px; }
.decision-lab .switch-row { min-height: 44px; }
.decision-lab .switch-row strong { font-size: 14px; font-weight: 700; line-height: 1.45; }
.decision-lab .switch-row small { font-size: 12px; line-height: 1.5; }
.decision-lab .switch-row input[type=checkbox] { background: #8291a6; }
.decision-lab .switch-row input[type=checkbox]:checked { background: var(--accent); }
.decision-lab .amount-field { font-size: 12px; }
.decision-lab .amount-field input { background: var(--surface); font-size: 14px; border-color: #c7d2e0; }
.decision-lab .amount-field small { font-size: 11px; line-height: 1.5; }
.scenario-delta > strong { color: var(--ink); font-size: 28px; font-weight: 700; letter-spacing: -.6px; }
.scenario-delta > span,
.scenario-delta > small { font-size: 12px; }
.decision-lab > p.simulation-disclosure { font-size: 11px; line-height: 1.6; }

/* Analysis and records: comparison is carried by values and labels as well as color. */
.report-context { margin-bottom: 24px; padding-bottom: 17px; }
.report-context .select-group label { font-size: 12px; }
.report-context .select-group select { font-size: 13px; min-height: 40px; }
.report-coverage { font-size: 12px; }
.insight-layout .metric > span,
.insight-layout .metric > small { font-size: 12px; }
.insight-layout .metric strong { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.6px; }
.factor-panel { background: transparent; border-color: var(--line); }
.factor-row { padding-block: 18px; }
.factor-row:hover { background: #f0f5fb; }
.factor-row .rank { color: #7a8799; font-size: 12px; }
.factor-row strong { font-size: 14px; font-weight: 700; }
.factor-row small { font-size: 12px; }
.factor-change { font-size: 14px; font-weight: 700; }
.factor-track { background: #e6edf5; border-radius: 2px; }
.factor-track i { background: #647fa0; border-radius: 2px; }
.advisor-note { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.advisor-note .note-rule { border-color: var(--line); }
.advisor-note p { font-size: 13px; line-height: 1.65; }
.advisor-note .eyebrow,
.advisor-note > small { font-size: 11px; }
.projection-table th,
.annual-table th,
.activity-toolbar ~ .table-scroll th,
.rb-table th { background: #f0f4f8; color: #4d6079; font-size: 12px; font-weight: 700; }
.projection-table td,
.annual-table td,
.activity-toolbar ~ .table-scroll td { font-size: 13px; border-color: var(--line); }
.projection-table tbody tr:hover,
.annual-table tbody tr:hover,
.activity-toolbar ~ .table-scroll tbody tr:hover { background: #f1f6fc; }
.annual-table th:first-child { background: #f0f4f8; color: var(--ink); }
.annual-table tbody th { font-size: 12px; }
.activity-toolbar { padding: 16px; gap: 12px; }
.activity-toolbar .search-field { border-color: #c7d2e0; background: var(--surface); border-radius: 6px; }
.activity-toolbar .search-field input,
.activity-toolbar > select { font-size: 13px; }
.activity-toolbar .search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(1 113 228 / 12%); }
.activity-toolbar ~ .table-footer { font-size: 12px; }

/* Receivables and NFS-e: comparable rows, explicit steps, a quiet review surface. */
.rb-heading { margin-bottom: 25px; }
.rb-heading h1 { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }
.rb-heading p { color: var(--muted); font-size: 13px; }
.rb-stats { margin-bottom: 24px; padding-bottom: 24px; }
.rb-stat dt,
.rb-stat small { color: var(--muted); font-size: 12px; }
.rb-stat strong { color: var(--ink); font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.6px; }
.rb-view-tabs .button { color: var(--muted); font-size: 14px; min-height: 44px; }
.rb-view-tabs .button.active { color: #075baa; border-bottom-color: var(--accent); font-weight: 700; }
.rb-view-tabs .button:hover { background: #edf3fa; }
.rb-tab-count { background: #e8eef6; color: #526580; padding: 1px 6px; font-size: 11px; border-radius: 4px; }
.rb-view-tabs .active .rb-tab-count { color: #075baa; background: #ddecff; }
.rb-filters .field { font-size: 12px; }
.rb-filters input,
.rb-filters select { font-size: 13px; min-height: 40px; }
.rb-filter-note,
.rb-note,
.rb-list-footer { font-size: 12px; }
.rb-table th,
.rb-table td { padding-block: 15px; border-color: var(--line); }
.rb-table tbody tr:hover { background: #f1f6fc; }
.rb-table td,
.rb-table td strong,
.rb-value-cell,
.rb-next-cell,
.rb-deadline-cell { font-size: 14px; }
.rb-table td strong,
.rb-value-cell { font-weight: 700; }
.rb-table td small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.rb-overdue { color: #b42318; }
.rb-table .rb-action-cell > .button { min-height: 40px; font-size: 13px; }
.rb-stage-number { color: #75849a; }
.rb-pipeline strong { color: var(--ink); font-size: 12px; font-weight: 700; }
.rb-pipeline small { font-size: 11px; }
.rb-pipeline li.done .rb-stage-number { color: #16704a; }
.rb-pipeline li.active .rb-stage-number { color: var(--accent); font-weight: 700; }
.rb-timeline li { border-color: #d3dde9; font-size: 13px; }
.rb-timeline li:before { background: #718ba9; }
.rb-timeline li small { font-size: 12px; }
.rb-alert { background: #fff9ec; color: #855b12; border-color: #ecddb7; border-radius: 6px; }
.rb-alert p { font-size: 13px; line-height: 1.6; }
.rb-stepper { gap: 24px; }
.rb-stepper button { min-height: 44px; font-size: 13px; }
.rb-stepper button > span { border-color: #c7d2e0; color: #60718a; background: var(--surface); }
.rb-stepper li.active button { color: #075baa; font-weight: 700; }
.rb-stepper li.active button > span { color: #fff; background: var(--accent); border-color: var(--accent); }
.rb-stepper li.done button > span { color: #075baa; background: #edf5ff; border-color: #c7ddf7; }
.rb-main > h3 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.rb-main > p,
.rb-review p,
.rb-detail p { font-size: 13px; line-height: 1.65; }
.rb-main .field,
.rb-main .field input,
.rb-main .field select,
.rb-main .field textarea { font-size: 13px; }
.rb-aside { background: #f3f6fa; padding: 21px; border-radius: 8px; }
.rb-aside h3 { font-size: 15px; font-weight: 700; }
.rb-aside p,
.rb-aside .rb-review-line { font-size: 12px; }
.rb-review-line,
.rb-review-line strong { font-size: 13px; }
.rb-review-line > strong { font-weight: 700; }
.rb-document { background: var(--surface); border-color: var(--line); border-radius: 6px; }
.rb-document-watermark { color: var(--muted); font-size: 11px; }
.rb-document p { font-size: 13px; }

/* Approvals, monthly closing and the BPO portfolio. */
.decision-list-row { padding: 22px; }
.decision-list-row:hover { background: #f1f6fc; }
.decision-list-row .grow > strong { font-size: 15px; font-weight: 700; }
.decision-list-row p { font-size: 13px; }
.decision-list-row small { font-size: 12px; }
.decision-amount > strong { color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.decision-note { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.decision-note > .icon { color: #657b97; }
.decision-note p,
.decision-note ol { font-size: 13px; }
.decision-note > small { font-size: 12px; }
.month-letter { background: var(--surface); border-color: var(--line); padding: 28px; }
.month-letter h2 { font-size: 24px; font-weight: 700; line-height: 1.3; }
.month-letter p { font-size: 14px; line-height: 1.75; }
.month-letter blockquote { border-left-color: var(--accent); color: var(--ink); font-size: 16px; line-height: 1.7; }
.closing-status { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.closing-status h3 { font-size: 15px; font-weight: 700; }
.closing-check { border-color: var(--line); }
.closing-check > span { color: #8090a3; }
.closing-check.done > span { color: #16704a; }
.closing-check strong { font-size: 14px; font-weight: 700; }
.closing-check small,
.closing-owner strong,
.closing-owner small { font-size: 12px; }
.ops-top strong { color: var(--ink); font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.6px; }
.ops-top > div:last-child strong { font-size: 16px; letter-spacing: 0; }
.ops-top span,
.ops-filter,
.ops-filter select { font-size: 12px; }
.ops-company { padding: 22px; background: var(--surface); }
.ops-company .grow h3 { font-size: 15px; font-weight: 700; }
.ops-company .grow > span,
.ops-job small,
.ops-company-footer > span { font-size: 12px; }
.ops-job strong { font-size: 14px; font-weight: 700; }
.ops-company-footer .button { min-height: 40px; }

/* Compact desktop: keep financial columns readable beside the scenario controls. */
@media (min-width: 851px) and (max-width: 1150px) {
  .overview-stat { padding-inline: 17px; }
  .overview-stat > strong { font-size: 27px; }
  .overview-stat.lead > strong { font-size: 30px; }
  .cash-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; }
  .cash-analysis .metric > strong { font-size: 22px; }
  .cash-analysis .metric > span,
  .cash-analysis .metric > small { font-size: 11px; }
  .decision-lab { padding: 18px; }
  .week-inspector { padding-inline: 15px; }
  .week-equation { gap: 5px; }
  .week-equation strong { font-size: 11px; }
  .week-equation div > span { font-size: 10px; }
  .rb-stat strong { font-size: 26px; }
}

/* Preserve the original tablet grids and the mobile card representation of receipts. */
@media (max-width: 850px) {
  .overview-workspace { gap: 24px; }
  .overview-agenda { padding-left: 20px; }
  .overview-stat { padding-inline: 18px; }
  .overview-stat > strong { font-size: 25px; }
  .overview-stat.lead > strong { font-size: 30px; }
  .cash-layout { grid-template-columns: minmax(0, 1fr); }
  .cash-analysis .metric > strong { font-size: 28px; }
  .decision-lab .scenario-choice { padding-inline: 0 16px; }
  .rb-stat strong { font-size: 27px; }
}
@media (max-width: 600px) {
  .overview-kpis { padding-bottom: 23px; margin-bottom: 25px; gap: 22px 0; }
  .overview-stat { padding: 0 16px 0 0; }
  .overview-stat > strong { font-size: 24px; }
  .overview-stat.lead > strong { font-size: 32px; }
  .overview-stat > span,
  .overview-stat > small { font-size: 12px; }
  .overview-workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .overview-agenda { border-left: 0; padding: 24px 0 0; }
  .month-comparison { gap: 20px; }
  .month-comparison strong { font-size: 16px; }
  .month-comparison > button > span { font-size: 12px; }
  .bank-row { min-height: 60px; }
  .chart-legend { font-size: 11px; gap: 13px; }
  .cash-context { gap: 9px 14px; font-size: 12px; margin-bottom: 25px; }
  .cash-context button { margin-top: 0; min-height: 44px; }
  .cash-analysis .metric:first-child > strong { font-size: 32px; }
  .cash-analysis .metric > strong { font-size: 25px; }
  .cash-analysis .metric > span,
  .cash-analysis .metric > small { font-size: 12px; }
  .week-picker { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .week-picker button { min-height: 46px; }
  .week-inspector { padding: 17px 16px; }
  .week-title h3 { font-size: 14px; }
  .week-title > span:last-child { font-size: 12px; }
  .week-equation { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 17px 8px; }
  .week-equation div > span { font-size: 11px; }
  .week-equation strong { font-size: 14px; }
  .reserve-note { gap: 7px; font-size: 12px; }
  .reserve-note .button { min-height: 44px; }
  .projection-table summary,
  .annual-report summary { font-size: 13px; min-height: 44px; }
  .projection-table summary span,
  .annual-report summary span { font-size: 11px; }
  .decision-lab { padding: 21px; margin-top: 7px; }
  .decision-lab .scenario-choice { display: block; width: 100%; padding: 19px 0; border-top: 1px solid var(--line); }
  .decision-lab .switch-row strong { font-size: 14px; }
  .decision-lab .switch-row small { font-size: 12px; }
  .decision-lab .amount-field input { min-height: 44px; }
  .decision-lab .lab-footer .button { min-height: 44px; }
  .report-context .select-group select { min-height: 44px; font-size: 13px; }
  .insight-layout .metric strong { font-size: 30px; }
  .insight-layout .metric > .button { min-height: 44px; }
  .factor-row { padding-block: 18px; gap: 10px; }
  .factor-row strong { font-size: 14px; }
  .factor-row small { font-size: 12px; }
  .factor-change { font-size: 13px; }
  .activity-toolbar { padding: 13px; gap: 10px; }
  .activity-toolbar > select,
  .activity-toolbar .search-field input,
  .activity-toolbar > .button { min-height: 44px; font-size: 13px; }
  .rb-heading h1 { font-size: 27px; }
  .rb-heading p { font-size: 13px; }
  .rb-stat strong { font-size: 27px; }
  .rb-stat dt,
  .rb-stat small { font-size: 12px; }
  .rb-view-tabs { gap: 7px; }
  .rb-view-tabs .button { min-height: 44px; font-size: 12px; }
  .rb-tab-count { padding-inline: 4px; font-size: 11px; }
  .rb-filters .field { font-size: 12px; }
  .rb-filters select,
  .rb-filters input { min-height: 44px; font-size: 13px; }
  .rb-table tr { background: var(--surface); border-color: var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 1px 2px rgb(15 23 39 / 2%); }
  .rb-table tbody tr:hover { background: var(--surface); }
  .rb-table td[data-label]:before { color: var(--muted); font-size: 11px; }
  .rb-table .rb-client-cell > strong { font-size: 15px; }
  .rb-table .rb-client-cell > small { font-size: 13px; }
  .rb-table td small { font-size: 12px; }
  .rb-table .rb-value-cell { font-size: 17px; }
  .rb-table .rb-action-cell > .button { min-height: 44px; border-color: #c7d2e0; font-size: 13px; }
  .rb-pipeline strong { font-size: 11px; }
  .rb-pipeline small { font-size: 10px; }
  .rb-stepper { gap: 12px; }
  .rb-stepper button { min-height: 44px; gap: 7px; font-size: 12px; }
  .rb-main > h3 { font-size: 22px; }
  .rb-main .field input,
  .rb-main .field select { min-height: 44px; }
  .rb-wizard-footer .button,
  .rb-actions .button,
  .rb-mode .button { min-height: 44px; font-size: 13px; }
  .rb-review-line { gap: 14px; }
  .decision-list-row { padding: 19px 16px; }
  .decision-amount > strong { font-size: 18px; }
  .decision-note { padding: 21px; }
  .month-letter { padding: 22px; }
  .month-letter h2 { font-size: 23px; }
  .month-letter p { font-size: 14px; }
  .month-letter blockquote { font-size: 15px; }
  .closing-status { padding: 21px; }
  .closing-check .button { min-height: 44px; }
  .ops-top strong { font-size: 30px; }
  .ops-top > div:last-child strong { font-size: 15px; line-height: 1.5; }
  .ops-company { padding: 21px 17px; }
  .ops-company .grow h3 { font-size: 15px; }
  .ops-company .grow > span,
  .ops-job small,
  .ops-company-footer > span { font-size: 12px; }
  .ops-company-footer .button,
  .ops-filter select { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .bank-row,
  .decision-lab .switch-row input[type=checkbox] { transition: none; }
}
