/* Scoped dashboard presentation: neutral surfaces, meaningful accent colours. */
#dashboard .bb-dashboard {
  --bb-dash-bg: #fff;
  --bb-dash-soft: #f7f9fc;
  --bb-dash-line: #e4e9ef;
  --bb-dash-ink: #202c3d;
  --bb-dash-muted: #647084;
  --bb-dash-blue: #2269c2;
  --bb-dash-green: #168168;
  --bb-dash-red: #c6474d;
  --bb-dash-amber: #ad751c;
  --bb-dash-category-0: #468be0;
  --bb-dash-category-1: #31af91;
  --bb-dash-category-2: #edb557;
  --bb-dash-category-3: #9984da;
  --bb-dash-category-4: #e78288;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  color: var(--bb-dash-ink);
  font-size: 13px;
  line-height: 1.5;
}
html[data-theme="dark"] #dashboard .bb-dashboard {
  --bb-dash-bg: #171c1a;
  --bb-dash-soft: #1c2320;
  --bb-dash-line: #303a35;
  --bb-dash-ink: #e4eae6;
  --bb-dash-muted: #a3afa8;
  --bb-dash-blue: #78aff2;
  --bb-dash-green: #56c9a3;
  --bb-dash-red: #f18d91;
  --bb-dash-amber: #e8bb65;
}
#dashboard .bb-dashboard *, #dashboard .bb-dashboard *::before, #dashboard .bb-dashboard *::after { box-sizing: border-box; }
#dashboard .bb-dashboard h2, #dashboard .bb-dashboard h3, #dashboard .bb-dashboard p { margin: 0; }
#dashboard .bb-dashboard h2 { font-size: 25px; line-height: 1.3; font-weight: 650; letter-spacing: -.6px; color: var(--bb-dash-ink); }
#dashboard .bb-dashboard h3 { font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.2px; color: var(--bb-dash-ink); }
#dashboard .bb-dashboard button { font: inherit; cursor: pointer; }
#dashboard .bb-dashboard button:focus-visible { outline: 2px solid var(--bb-dash-blue); outline-offset: 4px; }
#dashboard .bb-dash-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 2px 4px; }
#dashboard .bb-dash-heading > div { min-width: 0; }
#dashboard .bb-dash-heading h2 { margin: 4px 0 5px; overflow-wrap: anywhere; }
#dashboard .bb-dash-heading p { color: var(--bb-dash-muted); }
#dashboard .bb-dash-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.25px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-period { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--bb-dash-bg); border: 1px solid var(--bb-dash-line); color: var(--bb-dash-ink); border-radius: 7px; text-align: left; font-size: 12px; }
#dashboard .bb-dash-period > svg { flex-shrink: 0; color: var(--bb-dash-muted); }
#dashboard .bb-dash-period small { display: block; font-size: 11px; color: var(--bb-dash-muted); margin-top: 2px; }
#dashboard .bb-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; min-width: 0; }
#dashboard .bb-dash-card { min-width: 0; background: var(--bb-dash-bg); border: 1px solid var(--bb-dash-line); border-radius: 9px; box-shadow: 0 2px 4px rgb(15 23 42 / 2%); overflow: hidden; }
#dashboard .bb-dash-card-head { min-height: 77px; padding: 18px 23px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--bb-dash-line); }
#dashboard .bb-dash-card-head > div { min-width: 0; }
#dashboard .bb-dash-card-head p { font-size: 11px; margin-top: 4px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 0; border: 0; border-radius: 3px; background: transparent; color: var(--bb-dash-blue); white-space: nowrap; font-size: 12px; font-weight: 600; text-decoration: none; }
#dashboard .bb-dash-link:hover { text-decoration: underline; }
#dashboard .bb-dash-body { padding: 22px 23px; }
#dashboard .bb-dash-outstanding { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#dashboard .bb-dash-outstanding > div { min-width: 0; }
#dashboard .bb-dash-outstanding span, #dashboard .bb-dash-metric > span { display: block; font-size: 12px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-outstanding strong { display: block; margin-top: 3px; font-size: clamp(23px, 1.8vw, 29px); line-height: 1.4; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboard .bb-dash-document-count { flex-shrink: 0; padding: 5px 9px; background: var(--bb-dash-soft); color: var(--bb-dash-muted); border: 1px solid var(--bb-dash-line); border-radius: 5px; font-size: 11px; }
#dashboard .bb-dash-document-count span { display: inline; margin-left: 4px; }
#dashboard .bb-dash-balance-bar { display: flex; overflow: hidden; height: 6px; margin: 19px 0 19px; border-radius: 3px; background: var(--bb-dash-line); }
#dashboard .bb-dash-current-bar, #dashboard .bb-dash-dot-current { background: var(--bb-dash-blue); }
#dashboard .bb-dash-balance--amber .bb-dash-current-bar, #dashboard .bb-dash-balance--amber .bb-dash-dot-current { background: var(--bb-dash-amber); }
#dashboard .bb-dash-overdue-bar, #dashboard .bb-dash-dot-overdue { background: var(--bb-dash-red); }
#dashboard .bb-dash-balance-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
#dashboard .bb-dash-balance-split > div + div { border-left: 1px solid var(--bb-dash-line); padding-left: 22px; }
#dashboard .bb-dash-balance-split span { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-balance-split i { width: 6px; height: 6px; border-radius: 50%; }
#dashboard .bb-dash-balance-split strong { display: block; font-size: 16px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboard .bb-dash-positive { color: var(--bb-dash-green) !important; }
#dashboard .bb-dash-negative { color: var(--bb-dash-red) !important; }
#dashboard .bb-dash-cash-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, 27%); }
#dashboard .bb-dash-cash-chart { min-width: 0; padding: 23px; }
#dashboard .bb-dash-chart-summary { display: flex; flex-wrap: wrap; gap: 16px 34px; margin-bottom: 19px; }
#dashboard .bb-dash-metric { min-width: 0; }
#dashboard .bb-dash-metric strong { display: block; font-size: 17px; line-height: 1.5; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboard .bb-dash-chart { position: relative; width: 100%; height: 215px; }
#dashboard .bb-dash-chart canvas { width: 100% !important; max-height: 215px; }
#dashboard .bb-dash-chart-note { font-size: 10px; color: var(--bb-dash-muted); margin-top: 12px; }
#dashboard .bb-dash-cash-summary { background: var(--bb-dash-soft); padding: 30px 24px; border-left: 1px solid var(--bb-dash-line); min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
#dashboard .bb-dash-cash-total { font-size: clamp(23px, 1.9vw, 30px); font-weight: 600; letter-spacing: -.8px; line-height: 1.4; margin: 8px 0 3px; overflow-wrap: anywhere; max-width: 100%; font-variant-numeric: tabular-nums; }
#dashboard .bb-dash-cash-summary > p { color: var(--bb-dash-muted); font-size: 11px; }
#dashboard .bb-dash-cash-summary dl { width: 100%; border-top: 1px solid var(--bb-dash-line); padding: 16px 0 5px; margin: 23px 0 12px; }
#dashboard .bb-dash-cash-summary dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px; margin-bottom: 12px; }
#dashboard .bb-dash-cash-summary dt { font-size: 12px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-cash-summary dd { margin: 0; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#dashboard .bb-dash-cash-summary dl.bb-dash-cash-flow { border-top: 0; border-bottom: 1px solid var(--bb-dash-line); padding: 0 0 6px; margin: 0 0 14px; }
#dashboard .bb-dash-cash-flow dd { font-size: 13px; }
#dashboard .bb-dash-cash-end { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.25px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-empty { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; gap: 9px; }
#dashboard .bb-dash-empty-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--bb-dash-line); background: var(--bb-dash-soft); color: var(--bb-dash-muted); border-radius: 50%; margin-bottom: 4px; }
#dashboard .bb-dash-empty strong { color: var(--bb-dash-ink); font-size: 13px; font-weight: 600; }
#dashboard .bb-dash-empty p { color: var(--bb-dash-muted); font-size: 12px; max-width: 280px; }
#dashboard .bb-dash-profit { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--bb-dash-line); padding-top: 16px; margin-top: 14px; }
#dashboard .bb-dash-profit strong { font-size: 18px; font-weight: 600; }
#dashboard .bb-dash-expenses { min-height: 330px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
#dashboard .bb-dash-donut { width: 158px; height: 158px; border-radius: 50%; padding: 20px; flex-shrink: 0; }
#dashboard .bb-dash-donut > div { height: 100%; border-radius: 50%; background: var(--bb-dash-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#dashboard .bb-dash-donut span { font-size: 10px; color: var(--bb-dash-muted); }
#dashboard .bb-dash-donut strong { font-size: 12px; font-weight: 650; max-width: 110px; overflow-wrap: anywhere; margin-top: 4px; }
#dashboard .bb-dash-legend { flex: 1 1 180px; max-width: 100%; list-style: none; padding: 0; margin: 0; }
#dashboard .bb-dash-legend li { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; }
#dashboard .bb-dash-legend i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; margin-top: 5px; }
#dashboard .bb-dash-legend span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
#dashboard .bb-dash-legend small { display: block; color: var(--bb-dash-muted); font-size: 10px; margin-top: 2px; }
#dashboard .bb-dash-legend strong { font-size: 12px; font-weight: 600; }
#dashboard .bb-dash-account-list { list-style: none; padding: 0; margin: -5px 0; }
#dashboard .bb-dash-account-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
#dashboard .bb-dash-account-list li + li { border-top: 1px solid var(--bb-dash-line); }
#dashboard .bb-dash-account-icon { display: grid; place-items: center; width: 35px; height: 35px; background: var(--bb-dash-soft); border-radius: 6px; color: var(--bb-dash-muted); flex-shrink: 0; }
#dashboard .bb-dash-account-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
#dashboard .bb-dash-account-name small { display: block; font-size: 10px; color: var(--bb-dash-muted); font-weight: 400; }
#dashboard .bb-dash-account-list strong { font-size: 13px; font-weight: 600; }
#dashboard .bb-dash-statement { margin: 0; }
#dashboard .bb-dash-statement > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; }
#dashboard .bb-dash-statement dt { color: var(--bb-dash-muted); }
#dashboard .bb-dash-statement dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
#dashboard .bb-dash-statement > .bb-dash-statement-total { border-top: 1px solid var(--bb-dash-line); margin-top: 8px; padding-top: 16px; font-weight: 650; font-size: 16px; }
#dashboard .bb-dash-statement-total dt { color: var(--bb-dash-ink); }
#dashboard .bb-dash-note { color: var(--bb-dash-muted); font-size: 11px; margin-top: 12px; }
#dashboard .bb-dash-ranking { list-style: none; margin: 0; padding: 0; }
#dashboard .bb-dash-ranking li + li { margin-top: 18px; }
#dashboard .bb-dash-ranking li > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
#dashboard .bb-dash-ranking span { min-width: 0; overflow-wrap: anywhere; }
#dashboard .bb-dash-ranking b { color: var(--bb-dash-muted); font-size: 10px; font-weight: 500; display: inline-block; width: 20px; }
#dashboard .bb-dash-ranking strong { font-size: 12px; font-weight: 600; }
#dashboard .bb-dash-track { height: 4px; background: var(--bb-dash-line); border-radius: 3px; margin-left: 20px; }
#dashboard .bb-dash-track span { display: block; height: 100%; border-radius: 3px; background: var(--bb-dash-blue); }
#dashboard .bb-dash-count { display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 12px; background: var(--bb-dash-soft); color: var(--bb-dash-red); border: 1px solid var(--bb-dash-line); }
#dashboard .bb-dash-attention { list-style: none; margin: -6px 0; padding: 0; }
#dashboard .bb-dash-attention li { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
#dashboard .bb-dash-attention li + li { border-top: 1px solid var(--bb-dash-line); }
#dashboard .bb-dash-attention-dot { width: 6px; height: 6px; background: var(--bb-dash-amber); border-radius: 50%; flex-shrink: 0; }
#dashboard .bb-dash-attention li > span:nth-child(2) { flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
#dashboard .bb-dash-collection { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 15px; margin-top: 18px; border-top: 1px solid var(--bb-dash-line); }
#dashboard .bb-dash-collection small { color: var(--bb-dash-muted); font-size: 10px; margin-left: 5px; }
#dashboard .bb-dash-collection strong { font-size: 19px; font-weight: 600; }
#dashboard .bb-dash-quick { padding: 18px 23px; display: flex; gap: 24px; align-items: center; }
#dashboard .bb-dash-quick h3 { flex-shrink: 0; }
#dashboard .bb-dash-quick > div { display: flex; flex-wrap: wrap; gap: 10px; }
#dashboard .bb-dash-quick button { display: flex; align-items: center; gap: 8px; padding: 8px 11px; font-size: 12px; border: 1px solid var(--bb-dash-line); border-radius: 5px; background: var(--bb-dash-bg); color: var(--bb-dash-ink); }
#dashboard .bb-dash-quick button span { color: var(--bb-dash-blue); font-size: 17px; line-height: 1; }
#dashboard .bb-dash-quick button:hover, #dashboard .bb-dash-period:hover { background: var(--bb-dash-soft); border-color: var(--bb-dash-muted); }
#dashboard .bb-dash-table-wrap { max-width: 100%; overflow-x: auto; }
#dashboard .bb-dash-table { width: 100%; border: 0; border-collapse: collapse; border-radius: 0; margin: 0; background: var(--bb-dash-bg); }
#dashboard .bb-dash-table th, #dashboard .bb-dash-table td { padding: 13px 23px; border: 0; border-bottom: 1px solid var(--bb-dash-line); text-align: left; color: var(--bb-dash-ink); font-size: 12px; background: transparent; white-space: nowrap; }
#dashboard .bb-dash-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .65px; color: var(--bb-dash-muted); background: var(--bb-dash-soft); }
#dashboard .bb-dash-table tbody tr:last-child td { border-bottom: 0; }
#dashboard .bb-dash-table .bb-dash-money { text-align: right; font-variant-numeric: tabular-nums; }
#dashboard .bb-dash-type { font-size: 11px; border: 1px solid var(--bb-dash-line); padding: 3px 7px; border-radius: 4px; }
#dashboard .bb-dash-footer { font-size: 11px; color: var(--bb-dash-muted); text-align: center; padding: 0 12px 14px; }
@media (max-width: 1250px) {
  #dashboard .bb-dash-heading { flex-wrap: wrap; }
  #dashboard .bb-dash-cash-layout { grid-template-columns: minmax(0, 1fr) 235px; }
  #dashboard .bb-dash-quick { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 700px) {
  #dashboard .bb-dashboard, #dashboard .bb-dash-grid { gap: 16px; }
  #dashboard .bb-dash-grid, #dashboard .bb-dash-cash-layout { grid-template-columns: minmax(0, 1fr); }
  #dashboard .bb-dash-heading { gap: 14px; padding: 4px 0; }
  #dashboard .bb-dash-heading h2 { font-size: 23px; }
  #dashboard .bb-dash-heading-actions, #dashboard .bb-dash-period { width: 100%; }
  #dashboard .bb-dash-period > span { flex: 1; }
  #dashboard .bb-dash-card-head, #dashboard .bb-dash-body, #dashboard .bb-dash-cash-chart, #dashboard .bb-dash-quick { padding: 17px; }
  #dashboard .bb-dash-card-head { gap: 10px; }
  #dashboard .bb-dashboard h3 { font-size: 15px; }
  #dashboard .bb-dash-card-head p { font-size: 10px; }
  #dashboard .bb-dash-cash-summary { border-left: 0; border-top: 1px solid var(--bb-dash-line); padding: 24px 17px; }
  #dashboard .bb-dash-chart-summary { gap: 16px; }
  #dashboard .bb-dash-chart-summary .bb-dash-metric { flex: 1 1 110px; }
  #dashboard .bb-dash-metric strong { font-size: 16px; }
  #dashboard .bb-dash-chart { height: 190px; }
  #dashboard .bb-dash-chart canvas { max-height: 190px; }
  #dashboard .bb-dash-expenses { min-height: 240px; }
  #dashboard .bb-dash-balance-split > div + div { padding-left: 15px; }
  #dashboard .bb-dash-balance-split strong { font-size: 15px; }
  #dashboard .bb-dashboard button { min-height: 40px; }
  #dashboard .bb-dash-table th, #dashboard .bb-dash-table td { padding: 11px 17px; }
}
