/* Compact, warm dashboard inspired by the supplied pastel reference.
   Scoped to Dashboard and driven by existing theme/data tokens. */
:root[data-theme="light"] .app:has(#dashboardPage.active) .main{background:#f5eeeb}
:root[data-theme="dark"] .app:has(#dashboardPage.active) .main{background:var(--bg)}
.dashboard-page.active{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"topline topline" "onboarding onboarding" "metrics metrics" "recurring recurring" "finance activity" "projects quick" "insights insights" "corrections corrections";gap:10px;padding:2px 2px 18px}
.dashboard-topline{padding:8px 4px 4px;gap:12px}
.dashboard-welcome h1{font-size:clamp(26px,2.4vw,34px);letter-spacing:-.04em}
.dashboard-welcome p{font-size:13px}
.dashboard-page .dashboard-eyebrow{font-size:9px;letter-spacing:.13em}
.dashboard-primary-actions{gap:7px}
.dashboard-primary-actions .btn{min-height:38px;padding:8px 12px;font-size:11px}
.dashboard-primary-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.dashboard-primary-metrics .metric-card{position:relative;min-width:0;min-height:100px;padding:11px 13px;border:1px solid var(--line);border-radius:17px;box-shadow:var(--dashboard-shadow);overflow:hidden}
.dashboard-primary-metrics .metric-card:nth-child(1){background:color-mix(in srgb,#efc77f 34%,var(--surface))}
.dashboard-primary-metrics .metric-card:nth-child(2){background:color-mix(in srgb,#91b8ea 30%,var(--surface))}
.dashboard-primary-metrics .metric-card:nth-child(3){background:color-mix(in srgb,#c59de2 34%,var(--surface))}
.dashboard-primary-metrics .metric-card:nth-child(4){background:color-mix(in srgb,#efa3b2 29%,var(--surface))}
.dashboard-primary-metrics .metric-card>span{font-size:11px;font-weight:750}
.dashboard-primary-metrics .metric-card>strong{font-size:clamp(17px,1.55vw,22px);margin:3px 0}
.dashboard-primary-metrics .metric-card>small{font-size:9px}
.dashboard-primary-metrics .metric-icon{width:32px;height:32px;margin-bottom:6px;border-radius:11px;background:color-mix(in srgb,var(--surface) 75%,transparent);box-shadow:none}
.dashboard-primary-metrics .metric-art{width:42px;height:42px;right:8px;bottom:6px;opacity:.36}
.dashboard-page .card{border-radius:17px;box-shadow:var(--dashboard-shadow)}
.dashboard-page .card-head{min-height:48px;padding:9px 12px}
.dashboard-page .card-body{padding:10px 12px}
.dashboard-page .card-head h3{font-size:13px}
.dashboard-page .card-head p{font-size:9px}
.dashboard-page .dashboard-title-icon{width:33px;height:33px;border-radius:11px}
.dashboard-middle-row,.dashboard-bottom-row{gap:9px;margin:0}
.dashboard-page .finance-summary{grid-template-columns:minmax(112px,.7fr) minmax(110px,1fr);min-height:132px;gap:10px;padding:0 6px}
.dashboard-page .finance-donut{width:min(100%,128px);padding:9px}
.dashboard-page .finance-donut b{font-size:15px}
.dashboard-page .finance-legend{gap:10px}
.dashboard-page .finance-legend strong{font-size:12px}
.dashboard-page .dashboard-finance-foot{padding-top:5px;font-size:9px}
.dashboard-page .dashboard-agenda-event{min-height:72px;padding:7px}
.dashboard-page .dashboard-date-tile{min-height:55px}
.dashboard-page .dashboard-date-tile b{font-size:21px}
.dashboard-page .dashboard-event-art{width:58px;height:58px}
.dashboard-page .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.dashboard-page .dashboard-quick{min-height:48px;padding:7px;border-radius:12px}
.dashboard-page .dashboard-quick-icon{width:30px;height:30px}
.dashboard-page .dashboard-quick b{font-size:10px}
.dashboard-page .dashboard-quick small{font-size:8px}
.dashboard-page .dashboard-combo-link{margin-top:7px;padding-top:7px}
.dashboard-page .dashboard-area-row{padding:4px 0}
.dashboard-page .dashboard-area-list{max-height:178px;overflow:auto;scrollbar-width:thin}
.dashboard-section-title{margin:0 0 8px;padding:0}
.dashboard-page .company-insights{grid-template-columns:minmax(0,1.15fr) minmax(230px,.85fr);gap:9px;margin:0}
.dashboard-deepdive{grid-area:insights;min-width:0;margin:0}
.dashboard-deepdive-content{display:grid;gap:9px;padding:0 10px 10px}
.dashboard-deepdive-content .dashboard-section-title{padding:6px 4px 0}
.dashboard-deepdive-content .dashboard-recent-card{min-width:0;margin:0!important}
.dashboard-page > #recurringDashboardWidget{grid-area:recurring;min-width:0;margin:0;padding:0;overflow:hidden;border-radius:17px}
#recurringDashboardWidget .recurring-widget-head{min-height:42px;padding:8px 12px;border-radius:17px 17px 0 0}
#recurringDashboardWidget .recurring-widget-head>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#recurringDashboardWidget .recurring-kicker{margin:0;font-size:8px}
#recurringDashboardWidget .recurring-widget-head h3{margin:0;font-size:12px}
#recurringDashboardWidget .recurring-widget-head p{margin:0;color:var(--muted);font-size:9px}
#recurringDashboardWidget .recurring-mini-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:7px 10px 10px}
#recurringDashboardWidget .recurring-mini-row{min-width:0;padding:7px;border-radius:11px;gap:7px}
#recurringDashboardWidget .recurring-mini-date{width:30px;height:34px;flex:none}
#recurringDashboardWidget .recurring-mini-copy b{font-size:10px}
#recurringDashboardWidget .recurring-mini-copy small{font-size:8px}
#recurringDashboardWidget .recurring-mini-amount{font-size:10px;white-space:nowrap}
.dashboard-deepdive>summary{min-height:48px;padding:10px 13px}
.dashboard-deepdive>summary b{font-size:12px}
.dashboard-deepdive>summary small{font-size:10px}
.dashboard-deepdive .insight-box{padding:11px;border-radius:13px}
.dashboard-deepdive .insight-box span,.dashboard-deepdive .insight-box small{font-size:9px}
.dashboard-deepdive .insight-box strong{font-size:15px}
:root[data-theme="dark"] .dashboard-primary-metrics .metric-card{background:color-mix(in srgb,var(--surface) 88%,var(--package-accent,#8b6be8) 12%)}
:root[data-theme="dark"] .dashboard-primary-metrics .metric-card:nth-child(1){background:color-mix(in srgb,var(--surface) 87%,#d7a449 13%)}
:root[data-theme="dark"] .dashboard-primary-metrics .metric-card:nth-child(2){background:color-mix(in srgb,var(--surface) 87%,#6095d8 13%)}
:root[data-theme="dark"] .dashboard-primary-metrics .metric-card:nth-child(3){background:color-mix(in srgb,var(--surface) 87%,#9b6bbf 13%)}
:root[data-theme="dark"] .dashboard-primary-metrics .metric-card:nth-child(4){background:color-mix(in srgb,var(--surface) 87%,#d46e82 13%)}
@media(max-width:1100px){.dashboard-page.active{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"topline topline" "onboarding onboarding" "metrics metrics" "recurring recurring" "finance activity" "projects quick" "insights insights" "corrections corrections";gap:9px}.dashboard-primary-metrics .metric-card{min-height:92px}.dashboard-page .company-insights{grid-template-columns:minmax(0,1fr) minmax(0,.8fr)}}
@media(max-width:760px){.dashboard-page.active{grid-template-columns:minmax(0,1fr);grid-template-areas:"topline" "onboarding" "metrics" "recurring" "finance" "activity" "projects" "quick" "insights" "corrections";gap:8px}.dashboard-topline{display:grid;gap:9px}.dashboard-primary-actions{justify-content:flex-start}.dashboard-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-page .company-insights{grid-template-columns:1fr}#recurringDashboardWidget .recurring-mini-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.dashboard-page.active{padding-inline:0}.dashboard-topline{padding:5px 1px 2px}.dashboard-primary-actions .btn{flex:1;min-width:0;font-size:10px}.dashboard-primary-metrics{gap:7px}.dashboard-primary-metrics .metric-card{min-height:87px;padding:9px 10px}.dashboard-primary-metrics .metric-card>strong{font-size:15px}.dashboard-primary-metrics .metric-card>small{font-size:8px}.dashboard-primary-metrics .metric-icon{width:28px;height:28px}.dashboard-page .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-page .finance-summary{grid-template-columns:minmax(100px,.7fr) minmax(0,1fr);min-height:120px}.dashboard-page .finance-legend strong{font-size:11px}#recurringDashboardWidget .recurring-mini-list{grid-template-columns:1fr}#recurringDashboardWidget .recurring-widget-head>div{align-items:flex-start;flex-direction:column;gap:3px}}

/* Dashboard command center: stable row order with compact, independent cards. */
#dashboardPage.active{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:none;grid-auto-flow:row;gap:12px;align-content:start;overflow-x:clip;}
#dashboardPage.active>*{grid-area:auto;min-width:0;max-width:100%;}
#dashboardPage [hidden]{display:none!important;}
#dashboardPage .dashboard-topline{order:1;grid-column:1/-1;}
#dashboardPage>#onboardingCard{order:2;grid-column:1/-1;}
#dashboardPage .dashboard-primary-metrics{order:3;grid-column:1/-1;}
#dashboardPage>#recurringDashboardWidget{order:5;grid-column:auto;margin:0!important;padding:0;min-width:0;overflow:hidden;}
#dashboardPage .dashboard-finance-card{order:4;}
#dashboardPage .dashboard-next-card{order:6;}
#dashboardPage .dashboard-areas-card{order:7;}
#dashboardPage>#dashboardPendingProjects{order:8;min-width:0;margin:0!important;}
#dashboardPage #dashboardKeyIndicators{order:9;}
#dashboardPage .dashboard-quick-card{order:10;}
#dashboardPage .dashboard-deepdive{order:11;}
#dashboardPage #dashboardBusinessActions{order:12;}
#dashboardPage>.money-corrections,#dashboardPage>.money-corrections-details{order:13;grid-column:1/-1;}
#dashboardPage .dashboard-finance-card .card-body{padding:10px 12px;}
#dashboardPage .finance-summary{grid-template-columns:minmax(90px,.72fr) minmax(0,1fr);min-height:112px;gap:8px;padding:0;}
#dashboardPage .finance-donut{width:min(100%,112px);padding:8px;}
#dashboardPage .finance-legend{gap:7px;}
#dashboardPage .finance-legend>div:not(.finance-secondary){gap:7px;}
#dashboardPage .finance-legend b{font-size:10px;}
#dashboardPage .finance-legend strong{font-size:11px;}
#dashboardPage .finance-secondary{display:flex;align-items:center;justify-content:space-between;gap:5px;padding-top:6px;border-top:1px solid var(--line);}
#dashboardPage .dashboard-finance-foot{gap:7px;font-size:9px;}
#dashboardPage .dashboard-next-card .card-body{padding:9px 10px;}
#dashboardPage .dashboard-next-card .dashboard-agenda-event{grid-template-columns:46px minmax(0,1fr);min-height:0;gap:8px;padding:7px;}
#dashboardPage .dashboard-next-card .dashboard-event-art{display:none;}
#dashboardPage .dashboard-next-card .dashboard-event-copy{min-width:0;}
#dashboardPage .dashboard-next-card .dashboard-event-copy>*{overflow-wrap:anywhere;}
#dashboardPage .dashboard-next-card .next-activity-meta{margin-top:8px;font-size:10px;}
#dashboardPage .dashboard-areas-card .dashboard-area-list{max-height:180px;overflow:auto;scrollbar-width:thin;}
#dashboardPage .dashboard-area-row{padding:5px 0;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-list{display:grid;gap:0;max-height:270px;overflow:auto;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:7px;padding:8px 10px;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-status{grid-column:2;justify-self:start;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-date{grid-column:2;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-finance{grid-column:3;grid-row:1/4;text-align:right;}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-row>.btn{display:none;}
#dashboardPage .dashboard-key-list{display:grid;gap:0;padding:0 10px 8px;}
#dashboardPage .dashboard-indicator-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto 12px;align-items:center;gap:7px;width:100%;padding:8px 2px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left;font:inherit;font-size:11px;cursor:pointer;}
#dashboardPage .dashboard-indicator-row:last-child{border-bottom:0;}
#dashboardPage .dashboard-indicator-row:hover{color:var(--primary);}
#dashboardPage .dashboard-indicator-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:var(--surface-2);color:var(--primary);font-weight:800;}
#dashboardPage .dashboard-indicator-icon.danger{color:var(--danger,#d75656);background:color-mix(in srgb,var(--danger,#d75656) 10%,var(--surface));}
#dashboardPage .dashboard-indicator-icon.warning{color:#b97a16;background:color-mix(in srgb,#e7ac45 16%,var(--surface));}
#dashboardPage .dashboard-indicator-icon.success{color:var(--success,#15936a);background:color-mix(in srgb,var(--success,#15936a) 10%,var(--surface));}
#dashboardPage .dashboard-indicator-row>b{padding:2px 8px;border-radius:999px;background:var(--surface-2);}
#dashboardPage .dashboard-indicator-arrow{color:var(--muted);font-size:18px;}
#dashboardPage .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
#dashboardPage .dashboard-quick{min-height:55px;padding:8px;border-radius:12px;}
#dashboardPage .dashboard-quick-icon{width:30px;height:30px;}
#dashboardPage .dashboard-quick b{font-size:10px;}
#dashboardPage .dashboard-quick small{font-size:9px;}
#dashboardPage .dashboard-combo-link{margin-top:8px;padding-top:8px;}
#dashboardPage .dashboard-business-list{display:grid;gap:6px;padding:9px 11px 11px;}
#dashboardPage .dashboard-business-list>button{display:grid;grid-template-columns:28px minmax(0,1fr) 14px;gap:8px;align-items:center;width:100%;padding:9px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--ink);text-align:left;font:inherit;font-size:10px;cursor:pointer;}
#dashboardPage .dashboard-business-list>button:hover{border-color:var(--primary);color:var(--primary);}
#dashboardPage .dashboard-business-list>button>span{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:color-mix(in srgb,var(--success,#15936a) 11%,var(--surface));color:var(--success,#15936a);font-size:16px;}
#dashboardPage .dashboard-business-list>button>i{font-style:normal;font-size:17px;}
#dashboardPage #recurringDashboardWidget .recurring-widget-head{min-height:48px;padding:9px 12px;gap:6px;border-radius:17px 17px 0 0;}
#dashboardPage #recurringDashboardWidget .recurring-widget-head>div{display:grid;gap:2px;min-width:0;}
#dashboardPage #recurringDashboardWidget .recurring-kicker{margin:0;font-size:8px;}
#dashboardPage #recurringDashboardWidget .recurring-widget-head h3{font-size:13px;}
#dashboardPage #recurringDashboardWidget .recurring-widget-head p{font-size:9px;line-height:1.3;}
#dashboardPage #recurringDashboardWidget .recurring-widget-head>.btn{flex:none;padding:5px 7px;font-size:9px;white-space:nowrap;}
#dashboardPage #recurringDashboardWidget .recurring-mini-list{grid-template-columns:1fr;gap:5px;padding:8px 9px 10px;}
#dashboardPage #recurringDashboardWidget .recurring-mini-row{min-width:0;gap:7px;padding:6px;border-radius:10px;}
#dashboardPage #recurringDashboardWidget .recurring-mini-date{width:31px;height:34px;flex:none;}
#dashboardPage #recurringDashboardWidget .recurring-mini-copy{gap:2px;}
#dashboardPage #recurringDashboardWidget .recurring-mini-copy b{font-size:10px;}
#dashboardPage #recurringDashboardWidget .recurring-mini-copy small{font-size:8px;}
#dashboardPage #recurringDashboardWidget .recurring-mini-copy .is-overdue{color:var(--danger,#d75656);font-weight:750;}
#dashboardPage #recurringDashboardWidget .recurring-mini-copy .is-today{color:#b7791f;font-weight:750;}
#dashboardPage #recurringDashboardWidget .recurring-mini-amount{font-size:10px;white-space:nowrap;}
#dashboardPage #recurringDashboardWidget .recurring-more-link{justify-self:start;padding:3px 2px;border:0;background:transparent;color:var(--primary);font:inherit;font-size:9px;font-weight:750;cursor:pointer;}
#dashboardPage .dashboard-deepdive{align-self:start;min-width:0;margin:0;}
#dashboardPage .dashboard-deepdive>summary{min-height:48px;padding:10px 12px;}
#dashboardPage .dashboard-deepdive>summary b{font-size:12px;}
#dashboardPage .dashboard-deepdive>summary small{font-size:9px;}
#dashboardPage .dashboard-deepdive-content{display:grid;gap:9px;padding:0 9px 9px;}
#dashboardPage .dashboard-deepdive-content .dashboard-section-title{margin:2px 0 0;padding:4px 2px;}
#dashboardPage .dashboard-deepdive-content .dashboard-section-title h2{font-size:13px;}
#dashboardPage .dashboard-deepdive-content .dashboard-section-title p{display:none;}
#dashboardPage .dashboard-deepdive-content .company-insights{grid-template-columns:1fr;gap:7px;margin:0;}
#dashboardPage .dashboard-deepdive-content .insight-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
#dashboardPage .dashboard-deepdive-content .insight-box{padding:8px;border-radius:11px;}
#dashboardPage .dashboard-deepdive-content .insight-box span,#dashboardPage .dashboard-deepdive-content .insight-box small{font-size:8px;}
#dashboardPage .dashboard-deepdive-content .insight-box strong{font-size:13px;}
#dashboardPage .dashboard-deepdive-content .dashboard-recent-card{margin:0!important;}
#dashboardPage .dashboard-insight-accordion{min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);overflow:hidden;}
#dashboardPage .dashboard-insight-accordion>summary{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 11px;color:var(--ink);font-size:11px;font-weight:750;cursor:pointer;}
#dashboardPage .dashboard-insight-accordion[open]>summary{border-bottom:1px solid var(--line);}
#dashboardPage .dashboard-insight-accordion>.dashboard-section-title{padding:8px 10px 0;}
#dashboardPage .dashboard-insight-accordion>.company-insights{padding:8px;}
#dashboardPage .dashboard-insight-accordion>.dashboard-recent-card{margin:8px!important;}
#dashboardPage .dashboard-deepdive-content .table-wrap{max-width:100%;overflow:auto;}
#dashboardPage .dashboard-deepdive-content .table{min-width:560px;}
.dashboard-customize-dialog{width:min(620px,calc(100vw - 28px));max-height:min(85vh,780px);padding:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:0 24px 80px rgba(15,25,35,.28);}
.dashboard-customize-dialog::backdrop{background:rgba(18,25,34,.42);backdrop-filter:blur(3px);}
.dashboard-customize-dialog form{display:grid;gap:12px;max-height:inherit;overflow:auto;padding:18px;}
.dashboard-customize-dialog header,.dashboard-customize-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.dashboard-customize-dialog h2{margin:0;font-size:20px;}
.dashboard-customize-dialog h3{margin:5px 0 0;font-size:13px;}
.dashboard-customize-dialog p{margin:4px 0 0;color:var(--muted);font-size:12px;}
.dashboard-density-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px;}
.dashboard-density-setting .select{width:auto;min-width:150px;}
.dashboard-module-settings{display:grid;gap:5px;margin:0;padding:0;list-style:none;}
.dashboard-pref-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 9px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);font-size:12px;}
.dashboard-pref-row label,.dashboard-quick-settings label{display:flex;align-items:center;gap:7px;}
.dashboard-drag-handle{color:var(--muted);cursor:grab;}
.dashboard-pref-move{display:flex;gap:4px;}
.dashboard-pref-move button{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);cursor:pointer;}
.dashboard-quick-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;font-size:11px;}
.dashboard-customize-dialog footer{padding-top:8px;border-top:1px solid var(--line);}
#dashboardPage.dashboard-density-comfortable{gap:16px;}
#dashboardPage.dashboard-density-comfortable .card-body,#dashboardPage.dashboard-density-comfortable .card-head{padding:15px 16px;}
#dashboardPage.dashboard-density-comfortable .dashboard-indicator-row{padding-block:11px;}
#dashboardPage.dashboard-density-comfortable #recurringDashboardWidget .recurring-mini-row{padding:9px;}
@media(max-width:1180px){#dashboardPage.active{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#dashboardPage .dashboard-topline,#dashboardPage>#onboardingCard,#dashboardPage .dashboard-primary-metrics,#dashboardPage>.money-corrections,#dashboardPage>.money-corrections-details{grid-column:1/-1}#dashboardPage .dashboard-deepdive-content .company-insights{grid-template-columns:minmax(0,1.15fr) minmax(210px,.85fr)}}
@media(max-width:760px){#dashboardPage.active{grid-template-columns:minmax(0,1fr);gap:9px}#dashboardPage .dashboard-topline,#dashboardPage>#onboardingCard,#dashboardPage .dashboard-primary-metrics,#dashboardPage>.money-corrections,#dashboardPage>.money-corrections-details{grid-column:1}#dashboardPage .dashboard-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#dashboardPage .dashboard-primary-actions{display:flex;flex-wrap:wrap}#dashboardPage .dashboard-primary-actions .btn{flex:1 1 155px;min-width:0}#dashboardPage .dashboard-deepdive-content .company-insights{grid-template-columns:1fr}}
@media(max-width:420px){#dashboardPage .dashboard-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#dashboardPage .dashboard-primary-metrics .metric-card{min-height:88px;padding:9px}#dashboardPage .dashboard-primary-metrics .metric-card>strong{font-size:15px}#dashboardPage .dashboard-primary-metrics .metric-card>small{font-size:8px}#dashboardPage .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#dashboardPage .dashboard-pending-main b{overflow-wrap:anywhere}.dashboard-customize-dialog form{padding:13px}.dashboard-customize-dialog footer{flex-wrap:wrap}.dashboard-customize-dialog footer .btn{flex:1 1 130px}}

/* Three-column dashboard canvas: no more full-width stacked modules. */
.dashboard-page.active{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"topline topline topline" "onboarding onboarding onboarding" "metrics metrics metrics" "recurring recurring recurring" "finance activity projects" "pending pending quick" "insights insights insights" "corrections corrections corrections"}
.dashboard-page > #dashboardPendingProjects{grid-area:pending;min-width:0;margin:0!important}
.dashboard-page > .money-corrections-details{grid-area:corrections}
.dashboard-page .dashboard-finance-card .card-body{padding:8px 10px}
.dashboard-page .finance-summary{grid-template-columns:minmax(96px,.72fr) minmax(0,1fr);min-height:114px;gap:8px;padding:0}
.dashboard-page .finance-donut{width:min(100%,112px);padding:8px}
.dashboard-page .finance-legend{gap:7px}
.dashboard-page .finance-legend>div:not(.finance-secondary){gap:7px}
.dashboard-page .finance-legend b{font-size:10px}
.dashboard-page .finance-legend strong{font-size:11px}
.dashboard-page .finance-secondary{display:flex;align-items:center;justify-content:space-between;gap:5px;padding-top:6px;border-top:1px solid var(--line)}
.dashboard-page .dashboard-finance-foot{gap:7px}
.dashboard-page .dashboard-next-card .card-body{padding:8px 10px}
.dashboard-page .dashboard-next-card .dashboard-agenda-event{grid-template-columns:47px minmax(0,1fr);min-height:0;gap:8px;padding:7px}
.dashboard-page .dashboard-next-card .dashboard-date-tile{min-height:45px}
.dashboard-page .dashboard-next-card .dashboard-event-art{display:none}
.dashboard-page .dashboard-next-card .dashboard-event-copy>b{font-size:11px}
.dashboard-page .dashboard-next-card .dashboard-event-copy>span,.dashboard-page .dashboard-next-card .dashboard-event-copy>small{font-size:9px}
.dashboard-page .dashboard-next-card .next-activity-meta{margin-top:7px;padding-top:7px}
.dashboard-page .dashboard-area-row{grid-template-columns:28px minmax(0,76px) minmax(30px,1fr) 17px;gap:5px}
.dashboard-page .dashboard-area-row small{display:none}
.dashboard-page .dashboard-area-list{max-height:162px}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;padding:0 10px}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-row{grid-template-columns:30px minmax(0,1fr) auto;gap:6px;padding:8px 0}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-main{min-width:0}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-status{grid-column:2/-1;grid-row:2;justify-self:start}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-date{grid-column:2/-1;grid-row:3}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-finance{grid-column:2/-1;grid-row:4}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-row>.btn{grid-column:3;grid-row:1}
.dashboard-page > #dashboardPendingProjects .dashboard-pending-row:last-child:nth-child(odd){grid-column:1/-1}
.dashboard-page .dashboard-quick-grid{grid-template-columns:1fr;gap:5px}
.dashboard-page .dashboard-quick{min-height:42px;padding:6px 8px}
.dashboard-page .dashboard-quick small{display:none}
.dashboard-page .dashboard-combo-link{font-size:10px}
@media(max-width:1100px){.dashboard-page.active{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"topline topline" "onboarding onboarding" "metrics metrics" "recurring recurring" "finance activity" "projects quick" "pending pending" "insights insights" "corrections corrections"}.dashboard-page .dashboard-area-row{grid-template-columns:30px minmax(0,95px) minmax(40px,1fr) 18px}.dashboard-page .dashboard-area-row small{display:block}.dashboard-page .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-page .dashboard-quick small{display:block}}
@media(max-width:760px){.dashboard-page.active{grid-template-columns:minmax(0,1fr);grid-template-areas:"topline" "onboarding" "metrics" "recurring" "finance" "activity" "projects" "pending" "quick" "insights" "corrections"}.dashboard-page > #dashboardPendingProjects .dashboard-pending-list{grid-template-columns:1fr}.dashboard-page > #dashboardPendingProjects .dashboard-pending-row:last-child:nth-child(odd){grid-column:auto}}

/* Final dashboard composition: match the reference's compact three-column card grid.
   Cards are ordered by the dashboard preferences module (header, setup, KPIs, then modules). */
#dashboardPage.active{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:none;grid-auto-flow:row;gap:12px;align-content:start;overflow-x:clip;padding:4px 2px 18px}
#dashboardPage.active>*{grid-area:auto;min-width:0;max-width:100%}
#dashboardPage .dashboard-topline{order:1;grid-column:1/-1;padding:8px 4px 4px}
#dashboardPage>#onboardingCard{order:2;grid-column:1/-1;margin:0!important}
#dashboardPage .dashboard-primary-metrics{order:3;grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}
#dashboardPage .dashboard-primary-metrics .metric-card{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto auto;align-items:center;column-gap:9px;row-gap:2px;min-width:0;min-height:106px;padding:12px;border-radius:16px;background:var(--surface);box-shadow:var(--dashboard-shadow)}
#dashboardPage .dashboard-primary-metrics .metric-icon{grid-column:1;grid-row:1/3;width:34px;height:34px;margin:0;border-radius:11px;background:color-mix(in srgb,var(--primary) 9%,var(--surface))}
#dashboardPage .dashboard-primary-metrics .metric-card>span{grid-column:2;grid-row:1;font-size:11px}
#dashboardPage .dashboard-primary-metrics .metric-card>strong{grid-column:2;grid-row:2;min-width:0;margin:0;font-size:clamp(14px,1.3vw,19px);overflow-wrap:anywhere}
#dashboardPage .dashboard-primary-metrics .metric-card>small{grid-column:1/-1;grid-row:3;width:100%;font-size:9px}
#dashboardPage .dashboard-primary-metrics .metric-art{width:34px;height:34px;right:7px;bottom:7px;opacity:.12}
#dashboardPage .dashboard-finance-card{order:4}
#dashboardPage>#recurringDashboardWidget{order:5;grid-column:auto;min-width:0;margin:0!important;padding:0;overflow:hidden}
#dashboardPage .dashboard-next-card{order:6}
#dashboardPage .dashboard-areas-card{order:7}
#dashboardPage>#dashboardPendingProjects{order:8;min-width:0;margin:0!important}
#dashboardPage>#dashboardKeyIndicators{order:9}
#dashboardPage .dashboard-quick-card{order:10}
#dashboardPage>.dashboard-deepdive{order:11;min-width:0}
#dashboardPage>#dashboardBusinessActions{order:12}
#dashboardPage>.money-corrections-details{order:13;grid-column:1/-1}
#dashboardPage .dashboard-finance-card .finance-summary{grid-template-columns:minmax(100px,.72fr) minmax(0,1fr);min-height:120px;gap:8px;padding:0}
#dashboardPage .dashboard-finance-card .finance-donut{width:min(100%,116px);padding:8px}
#dashboardPage .dashboard-finance-card .finance-legend{gap:8px}
#dashboardPage .dashboard-finance-card .finance-legend>div:not(.finance-secondary){gap:7px}
#dashboardPage .dashboard-finance-card .finance-legend b{font-size:10px}
#dashboardPage .dashboard-finance-card .finance-legend strong{font-size:11px}
#dashboardPage>#recurringDashboardWidget .recurring-mini-list{grid-template-columns:1fr;gap:6px;padding:8px 10px 10px}
#dashboardPage>#recurringDashboardWidget .recurring-mini-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 8px}
#dashboardPage>#recurringDashboardWidget .recurring-mini-date{width:34px;height:38px}
#dashboardPage>#recurringDashboardWidget .recurring-mini-copy{min-width:0}
#dashboardPage>#recurringDashboardWidget .recurring-mini-copy b,#dashboardPage>#recurringDashboardWidget .recurring-mini-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#dashboardPage>#recurringDashboardWidget .recurring-mini-amount{font-size:10px;white-space:nowrap}
#dashboardPage .dashboard-next-card .dashboard-agenda-event{grid-template-columns:48px minmax(0,1fr);min-height:0;gap:8px;padding:8px}
#dashboardPage .dashboard-next-card .dashboard-event-art{display:none}
#dashboardPage .dashboard-next-card .dashboard-date-tile{min-height:52px}
#dashboardPage .dashboard-next-card .dashboard-event-copy{min-width:0}
#dashboardPage .dashboard-next-card .dashboard-event-copy>*{overflow-wrap:anywhere}
#dashboardPage .dashboard-areas-card .dashboard-area-list{max-height:180px;overflow:auto;scrollbar-width:thin}
#dashboardPage .dashboard-area-row{grid-template-columns:30px minmax(0,82px) minmax(24px,1fr) 18px;gap:6px;padding:5px 0}
#dashboardPage .dashboard-area-row small{display:none}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-list{display:grid;grid-template-columns:1fr;gap:0;max-height:230px;overflow:auto;padding:0 10px}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-row{grid-template-columns:30px minmax(0,1fr) auto;gap:7px;padding:8px 0}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-main{min-width:0}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-main b{overflow-wrap:anywhere}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-status{grid-column:2;grid-row:2;justify-self:start}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-date{grid-column:2;grid-row:3}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-finance{grid-column:3;grid-row:1/4;text-align:right}
#dashboardPage>#dashboardPendingProjects .dashboard-pending-row>.btn{display:none}
#dashboardPage .dashboard-key-list{display:grid;gap:0;padding:0 10px 8px}
#dashboardPage .dashboard-business-list{display:grid;gap:7px;padding:9px 11px 11px}
#dashboardPage .dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#dashboardPage .dashboard-quick{min-height:58px;padding:8px}
#dashboardPage .dashboard-quick small{display:block}
#dashboardPage .dashboard-deepdive-content .company-insights{grid-template-columns:minmax(0,1.15fr) minmax(190px,.85fr);gap:8px}
#dashboardPage .dashboard-deepdive-content .table-wrap{max-width:100%;overflow:auto}
#dashboardPage .dashboard-deepdive-content .table{min-width:560px}
@media(max-width:1000px){#dashboardPage.active{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#dashboardPage .dashboard-primary-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}#dashboardPage .dashboard-topline,#dashboardPage>#onboardingCard,#dashboardPage .dashboard-primary-metrics,#dashboardPage>.money-corrections-details{grid-column:1/-1}#dashboardPage .dashboard-area-row{grid-template-columns:30px minmax(0,96px) minmax(30px,1fr) 18px}#dashboardPage .dashboard-area-row small{display:block}}
@media(max-width:680px){#dashboardPage.active{grid-template-columns:minmax(0,1fr);gap:9px;padding-inline:0}#dashboardPage .dashboard-topline,#dashboardPage>#onboardingCard,#dashboardPage .dashboard-primary-metrics,#dashboardPage>.money-corrections-details{grid-column:1}#dashboardPage .dashboard-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#dashboardPage .dashboard-primary-metrics .metric-card{min-height:92px;padding:9px}#dashboardPage .dashboard-primary-metrics .metric-card>strong{font-size:clamp(13px,4vw,17px)}#dashboardPage .dashboard-finance-card .finance-summary{grid-template-columns:minmax(100px,.7fr) minmax(0,1fr)}#dashboardPage>#recurringDashboardWidget .recurring-mini-list{grid-template-columns:1fr}#dashboardPage .dashboard-area-row{grid-template-columns:30px minmax(0,90px) minmax(28px,1fr) 18px}#dashboardPage .dashboard-area-row small{display:block}#dashboardPage .dashboard-deepdive-content .company-insights{grid-template-columns:1fr}}
@media(max-width:380px){#dashboardPage .dashboard-primary-metrics{grid-template-columns:1fr}#dashboardPage .dashboard-primary-metrics .metric-card{min-height:76px}#dashboardPage .dashboard-primary-actions .btn{flex:1 1 100%}#dashboardPage .dashboard-quick-grid{grid-template-columns:1fr}}

/* Dashboard card order: recurring payments, financial summary, then the next activity. */
#dashboardPage .dashboard-finance-card{order:5;grid-column:auto;min-width:0}
#dashboardPage>#recurringDashboardWidget{order:4;grid-column:auto!important;grid-row:auto;align-self:stretch;min-width:0;width:auto;max-width:100%;margin:0!important;padding:0;overflow:hidden}
#dashboardPage .dashboard-next-card{order:6;grid-column:auto}
#dashboardPage .dashboard-areas-card{order:7;grid-column:auto}
#dashboardPage>#dashboardPendingProjects{order:8;grid-column:auto}
#dashboardPage>#dashboardKeyIndicators{order:9;grid-column:auto}
#dashboardPage .dashboard-quick-card{order:10;grid-column:auto}
#dashboardPage>.dashboard-deepdive{order:11;grid-column:auto}
#dashboardPage>#dashboardBusinessActions{order:12;grid-column:auto}
#dashboardPage>#recurringDashboardWidget .recurring-widget-head{min-height:64px;padding:12px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:8px}
#dashboardPage>#recurringDashboardWidget .recurring-widget-head>div{min-width:0}
#dashboardPage>#recurringDashboardWidget .recurring-kicker{display:none}
#dashboardPage>#recurringDashboardWidget .recurring-widget-head h3{margin:0;font-size:14px}
#dashboardPage>#recurringDashboardWidget .recurring-widget-head p{margin:3px 0 0;font-size:10px;color:var(--muted)}
#dashboardPage>#recurringDashboardWidget .recurring-mini-list{grid-template-columns:1fr;max-height:230px;overflow:auto;scrollbar-width:thin}
@media(max-width:680px){#dashboardPage>#recurringDashboardWidget{grid-column:1!important}#dashboardPage .dashboard-finance-card,#dashboardPage .dashboard-next-card,#dashboardPage .dashboard-areas-card,#dashboardPage>#dashboardPendingProjects,#dashboardPage>#dashboardKeyIndicators,#dashboardPage .dashboard-quick-card,#dashboardPage>.dashboard-deepdive,#dashboardPage>#dashboardBusinessActions{grid-column:1}}

/* Pin the default dashboard modules to a real three-column layout. CSS order
   alone only sorts grid items; it does not reserve the intended card slots. */
#dashboardPage.active.dashboard-default-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-areas:
    "topline topline topline"
    "onboarding onboarding onboarding"
    "metrics metrics metrics"
    "recurring finance activity"
    "projects pending indicators"
    "quick insights business"
    "corrections corrections corrections";
}
#dashboardPage.active.dashboard-default-grid>.dashboard-topline{grid-area:topline-start/topline-start/topline-end/topline-end}
#dashboardPage.active.dashboard-default-grid>#onboardingCard{grid-area:onboarding-start/onboarding-start/onboarding-end/onboarding-end}
#dashboardPage.active.dashboard-default-grid>.dashboard-primary-metrics{grid-area:metrics-start/metrics-start/metrics-end/metrics-end}
#dashboardPage.active.dashboard-default-grid>#recurringDashboardWidget{grid-area:recurring-start/recurring-start/recurring-end/recurring-end!important}
#dashboardPage.active.dashboard-default-grid>.dashboard-finance-card{grid-area:finance-start/finance-start/finance-end/finance-end}
#dashboardPage.active.dashboard-default-grid>.dashboard-next-card{grid-area:activity-start/activity-start/activity-end/activity-end}
#dashboardPage.active.dashboard-default-grid>.dashboard-areas-card{grid-area:projects-start/projects-start/projects-end/projects-end}
#dashboardPage.active.dashboard-default-grid>#dashboardPendingProjects{grid-area:pending-start/pending-start/pending-end/pending-end}
#dashboardPage.active.dashboard-default-grid>#dashboardKeyIndicators{grid-area:indicators-start/indicators-start/indicators-end/indicators-end}
#dashboardPage.active.dashboard-default-grid>.dashboard-quick-card{grid-area:quick-start/quick-start/quick-end/quick-end}
#dashboardPage.active.dashboard-default-grid>.dashboard-deepdive{grid-area:insights-start/insights-start/insights-end/insights-end}
#dashboardPage.active.dashboard-default-grid>#dashboardBusinessActions{grid-area:business-start/business-start/business-end/business-end}
#dashboardPage.active.dashboard-default-grid>.money-corrections-details,
#dashboardPage.active.dashboard-default-grid>.money-corrections{grid-area:corrections-start/corrections-start/corrections-end/corrections-end!important}
@media(max-width:1180px){
  #dashboardPage.active.dashboard-default-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:
    "topline topline" "onboarding onboarding" "metrics metrics"
    "recurring finance" "activity projects" "pending indicators"
    "quick business" "insights insights" "corrections corrections"}
}
@media(max-width:760px){
  #dashboardPage.active.dashboard-default-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:
    "topline" "onboarding" "metrics" "recurring" "finance" "activity"
    "projects" "pending" "indicators" "quick" "insights" "business" "corrections"}
}
