/* esmartbooks Business Overview
   Dashboard-only styles.
   Nothing below targets global KPI cards or other pages.
*/

/* Dashboard-only semantic chart palette; paired with the existing dark theme tokens below. */
.route-dashboard {
  --dash-income:#0B8178;
  --dash-expenses:#AC6505;
  --dash-profit:#2563EB;
  --dash-category-3:#7450C5;
  --dash-category-4:#C43D50;
  --dash-category-5:#087D99;
  --dash-category-6:#526c89;
  --dash-chart-track:#E2E8F0;
  --dash-chart-label:#334155;
  --dash-chart-grid:#7b8ea3;
  --dash-exp-hover:#edf4f6;
  --dash-exp-selected:#dcecf2;
  --dash-donut-divider:#fff;
}

.route-dashboard .esb-dashboard{
  width:100%;
  min-width:0;
}

.route-dashboard .esb-dashboard-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.route-dashboard .esb-dashboard-actions .esb-dash-period-field{
  display:flex;
  align-items:center;
  gap:7px;
}

.route-dashboard .esb-dashboard-actions .esb-dash-period-field>span{
  color:var(--muted,#6b6c72);
  font-size:.75rem;
}

.route-dashboard .esb-dashboard-actions .esb-dash-period{
  position:relative !important;
  width:auto !important;
  min-width:168px !important;
  max-width:220px !important;
  height:auto !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  overflow:visible !important;
}
.route-dashboard .esb-dashboard-actions .esb-dash-period-btn{
  width:100% !important;
  min-width:168px !important;
  height:36px !important;
  padding:0 28px 0 10px !important;
  border:1px solid #c5d0dc !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#0c2340 !important;
  font-size:.84rem !important;
  font-weight:700 !important;
  text-align:left !important;
  cursor:pointer !important;
}
.route-dashboard .esb-dashboard-actions .esb-dash-period-btn:after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  width:0;
  height:0;
  margin-top:-2px;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:6px solid #0c2340;
  pointer-events:none;
}
.route-dashboard .esb-dash-period-menu{
  position:absolute;
  z-index:30;
  top:calc(100% + 4px);
  left:0;
  min-width:100%;
  margin:0;
  padding:4px;
  border:1px solid #c5d0dc;
  border-radius:8px;
  background:#fff;
  box-shadow:0 12px 28px rgba(12,35,64,.16);
}
.route-dashboard .esb-dash-period-menu[hidden]{
  display:none !important;
}
.route-dashboard .esb-dash-period-opt{
  display:block;
  width:100%;
  margin:0;
  padding:8px 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#0c2340;
  font:inherit;
  font-size:.84rem;
  font-weight:650;
  text-align:left;
  cursor:pointer;
}
.route-dashboard .esb-dash-period-opt:hover,
.route-dashboard .esb-dash-period-opt.is-on{
  background:#e8eef6;
}
.route-dashboard .esb-dash-span{
  margin:2px 0 0;
  color:#64748b;
  font-size:.78rem;
  font-weight:650;
}

.route-dashboard .esb-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
  gap:16px;
  min-width:0;
}
.route-dashboard .esb-dash-list{
  list-style:none;
  margin:12px 0 0;
  padding:0;
}
.route-dashboard .esb-dash-list li{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:4px 0;
}
.route-dashboard .esb-dash-list small{
  color:var(--muted,#6b6c72);
  font-weight:500;
}
#esb-dash-layout .field{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}

.route-dashboard .esb-dash-card{
  position:relative;
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
  min-height:0;
  padding:16px;
  overflow:hidden;
}

.route-dashboard .esb-dash-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.route-dashboard .esb-dash-card-head h2{
  margin:0;
  color:var(--text,#393a3d);
  font-size:1rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}

.route-dashboard .esb-dash-card-body{
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:0;
  min-height:0;
}

.route-dashboard .esb-dash-card-foot{
  margin-top:auto;
  padding-top:10px;
  border-top:
    1px solid
    var(--border,#e5e7eb);
}

.route-dashboard .esb-dash-link{
  border:0;
  background:none;
  padding:0;
  color:var(--link,#0077c5);
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.route-dashboard .esb-dash-big{
  flex:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text,#393a3d);
  font-size:1.75rem;
  font-weight:800;
  line-height:1.1;
}

.route-dashboard .esb-dash-sub{
  margin:5px 0 12px;
  color:var(--muted,#6b6c72);
  font-size:.77rem;
}

.route-dashboard .esb-dash-empty{
  display:grid;
  place-items:center;
  flex:1;
  min-height:120px;
  margin:0;
  padding:12px;
  color:var(--muted,#6b6c72);
  text-align:center;
}


/* =========================================================
   CASH FLOW
   ========================================================= */

.route-dashboard .esb-cf-plot{
  display:grid;
  grid-template-columns:56px minmax(0,1fr);
  grid-template-rows:auto minmax(200px,1fr) auto;
  gap:10px 8px;
  flex:1 1 auto;
  min-width:0;
  padding-top:8px;
}
.route-dashboard .esb-cf-axis-title{
  grid-column:1/-1;
  color:var(--dash-chart-label);
  font-size:13px;
}
.route-dashboard .esb-cf-x-title{grid-column:2;text-align:center}
.route-dashboard .esb-cf-scale{position:relative;margin-bottom:30px;color:var(--dash-chart-label);font-size:13px;font-variant-numeric:tabular-nums}
.route-dashboard .esb-cf-scale span{position:absolute;right:0;transform:translateY(-50%);white-space:nowrap}
.route-dashboard .esb-cf-chart{
  position:relative;
  display:flex;
  align-items:stretch;
  justify-content:space-around;
  gap:clamp(3px,1vw,10px);
  min-height:200px;
  min-width:0;
}
.route-dashboard .esb-cf-grid{position:absolute;inset:0 0 30px;pointer-events:none}
.route-dashboard .esb-cf-grid i{position:absolute;left:0;right:0;border-top:1px solid var(--dash-chart-grid)}

.route-dashboard .esb-cf-group{
  position:relative;
  flex:1;
  display:grid;
  grid-template-columns:
    repeat(
      2,
      minmax(4px,28px)
    );
  grid-template-rows:minmax(0,1fr) 24px;
  align-items:end;
  justify-content:center;
  gap:6px 4px;
  height:100%;
  min-width:0;
}

.route-dashboard .esb-cf-month{
  grid-column:1/-1;
  margin-top:6px;
  color:var(--dash-chart-label);
  font-size:13px;
  text-align:center;
  justify-self:center;
  min-width:3ch;
  white-space:nowrap;
}

.route-dashboard .esb-cf-bar{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
}

.route-dashboard .esb-cf-bar i{
  display:block;
  width:100%;
  min-height:0;
  border-radius:2px 2px 0 0;
  transition:
    height .2s,
    filter .15s;
}

.route-dashboard .esb-cf-bar:hover i{
  filter:brightness(.9);
}

.route-dashboard .esb-cf-bar .money-in,
.route-dashboard .esb-chart-legend .money-in{
  background:var(--dash-income);
}

.route-dashboard .esb-cf-bar .money-out,
.route-dashboard .esb-chart-legend .money-out{
  background:var(--dash-expenses);
}

.route-dashboard .esb-chart-legend{
  display:flex;
  justify-content:center;
  gap:8px 18px;
  flex-wrap:wrap;
  margin-top:12px;
  color:var(--dash-chart-label);
  font-size:13px;
}

.route-dashboard .esb-chart-legend span{
  display:flex;
  align-items:center;
  gap:6px;
}

.route-dashboard .esb-chart-legend i{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:50%;
}


/* =========================================================
   EXPENSES DONUT
   ========================================================= */

.route-dashboard .esb-exp-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  align-content:center;
  justify-items:center;
  flex:1 1 auto;
  min-height:0;
  padding:0;
}

.route-dashboard .esb-exp-visual{position:relative;width:220px;max-width:100%}
.route-dashboard .esb-exp-donut{
  display:block;
  width:100%;
  max-width:100%;
  margin:auto;
  overflow:visible;
}

.route-dashboard .esb-exp-slice{
  stroke:
    var(--dash-donut-divider);
  stroke-width:1.5;
  cursor:pointer;
  transition:
    opacity .15s,
    filter .15s;
}

.route-dashboard .esb-exp-slice:hover,
.route-dashboard .esb-exp-slice:focus-visible,
.route-dashboard .esb-exp-slice.is-hovered,
.route-dashboard .esb-exp-slice.is-selected{
  stroke:var(--dash-chart-label);
  stroke-width:3;
  outline:none;
}
.route-dashboard .esb-exp-slice.s1,
.route-dashboard .esb-exp-row i.s1{
  fill:var(--dash-income);
  background:var(--dash-income);
}

.route-dashboard .esb-exp-slice.s2,
.route-dashboard .esb-exp-row i.s2{
  fill:var(--dash-expenses);
  background:var(--dash-expenses);
}

.route-dashboard .esb-exp-slice.s3,
.route-dashboard .esb-exp-row i.s3{
  fill:var(--dash-category-3);
  background:var(--dash-category-3);
}

.route-dashboard .esb-exp-slice.s4,
.route-dashboard .esb-exp-row i.s4{
  fill:var(--dash-category-4);
  background:var(--dash-category-4);
}

.route-dashboard .esb-exp-slice.s5,
.route-dashboard .esb-exp-row i.s5{
  fill:var(--dash-category-5);
  background:var(--dash-category-5);
}
.route-dashboard .esb-exp-slice.s6,
.route-dashboard .esb-exp-row i.s6{
  fill:var(--dash-category-6);
  background:var(--dash-category-6);
}

.route-dashboard .esb-exp-legend{
  display:grid;
  width:min(100%,28rem);
  gap:6px;
  min-width:0;
}

.route-dashboard .esb-exp-row{
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:center;
  width:100%;
  gap:8px;
  min-width:0;
  padding:4px 6px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--dash-chart-label);
  text-align:left;
  cursor:pointer;
}
.route-dashboard .esb-exp-row:hover,
.route-dashboard .esb-exp-row.is-hovered{background:var(--dash-exp-hover)}
.route-dashboard .esb-exp-row.is-selected{background:var(--dash-exp-selected);border-color:var(--dash-chart-label)}

.route-dashboard .esb-exp-row>i{
  flex:0 0 auto;
  width:8px;
  height:8px;
  margin-top:0;
  border-radius:50%;
}

.route-dashboard .esb-exp-name{
  min-width:0;
  color:var(--dash-chart-label);
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:14px;
  line-height:1.4;
}
.route-dashboard .esb-exp-row b{
  max-width:14ch;
  color:var(--dash-chart-label);
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:14px;
  text-align:right;
}

/* =========================================================
   PROFIT AND LOSS
   ========================================================= */

.route-dashboard .esb-pnl-chart{
  display:grid;
  align-content:center;
  flex:1 1 auto;
  gap:22px;
  margin-top:8px;
}

.route-dashboard .esb-pnl-row{
  display:grid;
  gap:7px;
  width:100%;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.route-dashboard .esb-pnl-label b{
  display:block;
  font-size:1rem;
}

.route-dashboard .esb-pnl-label small{
  display:block;
  color:var(--muted,#6b6c72);
}

.route-dashboard .esb-pnl-track{
  display:block;
  width:100%;
  height:17px;
  overflow:hidden;
  border-radius:3px;
  background:#edf0f2;
}

.route-dashboard .esb-pnl-track i{
  display:block;
  height:100%;
  transition:width .2s;
}

.route-dashboard .esb-pnl-track .income{
  background:var(--dash-income);
}

.route-dashboard .esb-pnl-track .expenses{
  background:var(--dash-expenses);
}


/* =========================================================
   INVOICES
   ========================================================= */

.route-dashboard .esb-inv-summary,
.route-dashboard .esb-inv-paid{
  display:flex;
  align-items:baseline;
  gap:8px;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.route-dashboard .esb-inv-summary b,
.route-dashboard .esb-inv-paid b{
  font-size:1rem;
}

.route-dashboard .esb-inv-summary span,
.route-dashboard .esb-inv-paid span{
  color:var(--muted,#6b6c72);
  font-size:.75rem;
}

.route-dashboard .esb-inv-two{
  display:grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0,1fr)
    );
  gap:12px;
  margin:12px 0 7px;
}

.route-dashboard .esb-inv-two button{
  min-width:0;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.route-dashboard .esb-inv-two button:last-child{
  text-align:right;
}

.route-dashboard .esb-inv-two b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:1.2rem;
}

.route-dashboard .esb-inv-two small{
  color:var(--muted,#6b6c72);
}

.route-dashboard .esb-inv-status-bar{
  display:flex;
  width:100%;
  height:15px;
  margin-bottom:25px;
  overflow:hidden;
  border-radius:3px;
  background:#e2e8f0;
}

.route-dashboard .esb-inv-status-bar i{
  display:block;
  height:100%;
}

.route-dashboard .esb-inv-status-bar .overdue{
  background:#f47321;
}

.route-dashboard .esb-inv-status-bar .not-due{
  background:#cbd5e1;
}

.route-dashboard .esb-inv-paid-bar{
  display:flex;
  width:100%;
  height:15px;
  margin-top:8px;
  overflow:hidden;
  border-radius:3px;
  background:#d5dee8;
}

.route-dashboard .esb-inv-paid-bar i{
  display:block;
  height:100%;
  background:var(--dash-income);
}


/* =========================================================
   SALES LINE CHART
   ========================================================= */

.route-dashboard .esb-sales-chart{
  display:block;
  width:100%;
  flex:1 1 auto;
  height:100%;
  min-height:170px;
  max-height:none;
  overflow:visible;
}

.route-dashboard .esb-sales-chart .grid{
  stroke:var(--dash-chart-grid);
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}

.route-dashboard .esb-sales-chart .sales-area{
  fill:url(#esbSalesFill);
  stroke:none;
}
.route-dashboard .esb-sales-chart .sales-line{
  fill:none;
  stroke:var(--dash-income);
  stroke-width:2.5;
  stroke-linejoin:round;
  stroke-linecap:round;
}

.route-dashboard .esb-sales-chart text{
  fill:var(--dash-chart-label);
  font-size:18px;
}

.route-dashboard .esb-sales-point{
  cursor:pointer;
}

.route-dashboard .esb-sales-point circle{
  fill:#fff;
  stroke:var(--dash-income);
  stroke-width:2.5;
  transition:r .12s;
}

.route-dashboard .esb-sales-point:hover circle,
.route-dashboard .esb-sales-point:focus circle{
  r:7;
}


/* =========================================================
   BANK ACCOUNTS
   ========================================================= */

.route-dashboard .esb-bank-list{
  display:grid;
  align-content:start;
  flex:1;
}

.route-dashboard .esb-bank-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  padding:14px 0;
  border:0;
  border-bottom:
    1px solid
    var(--border,#e5e7eb);
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.route-dashboard .esb-bank-row:last-child{
  border-bottom:0;
}

.route-dashboard .esb-bank-row span{
  min-width:0;
}

.route-dashboard .esb-bank-row b,
.route-dashboard .esb-bank-row small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.route-dashboard .esb-bank-row small{
  margin-top:3px;
  color:var(--muted,#6b6c72);
}

.route-dashboard .esb-bank-row strong{
  flex:0 0 auto;
  max-width:45%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:860px){

  .route-dashboard .esb-dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .route-dashboard .esb-dash-card[data-widget="inventory"]{
    grid-column:1 / -1;
  }

}

@media(max-width:760px){

  .route-dashboard .esb-dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  
    gap:6px;
  }

  .route-dashboard .esb-dash-card{
    min-height:auto;
  }


}

@media(max-width:480px){

  .route-dashboard .esb-dash-card{
    padding:14px;
  }

  .route-dashboard .esb-dash-card-head{
    align-items:flex-start;
  }

  .route-dashboard .esb-dash-card-head h2{
    white-space:normal;
  }


  .route-dashboard .esb-exp-visual{
    width:190px;
  }

}

/* Consolidated: the obsolete 1000px micro-font dashboard grid was removed.
   The responsive dashboard layout below owns mobile KPI presentation. */

/* ESB_DASHBOARD_MOBILE_FRAME_START */

@media (max-width:760px){

  /* keep 2-column layout */
  .route-dashboard .esb-dashboard-grid,
  .dash-board{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    align-items:stretch !important;
  }

  .route-dashboard .esb-dashboard-grid > *,
  .dash-board > *{
    min-width:0 !important;
    width:100% !important;
  }

  /* card frame */
  .route-dashboard .esb-dash-card,
  .route-dashboard .dash-card,
  .dash-board > .panel,
  .dash-board > div{
    min-height:178px !important;
    height:100% !important;
    padding:9px 9px 8px !important;
    border-radius:8px !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  /* compact header */
  .route-dashboard .esb-dash-card-head,
  .route-dashboard .esb-dash-card-header,
  .route-dashboard .dash-card-head,
  .route-dashboard .dash-card-header{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 66px !important;
    gap:6px !important;
    align-items:start !important;
    margin-bottom:6px !important;
  }

  /* title */
  .route-dashboard .esb-dash-card-title,
  .route-dashboard .esb-dash-title,
  .route-dashboard .dash-card-title,
  .route-dashboard .metric-title,
  .route-dashboard .panel-title{
    font-size:.68rem !important;
    line-height:1.1 !important;
    letter-spacing:.01em !important;
    margin:0 !important;
    word-break:break-word !important;
  }

  /* period selector */
  .route-dashboard .esb-dash-period,
  .route-dashboard .dash-period,
  .route-dashboard .card-period select,
  .route-dashboard .panel select{
    width:66px !important;
    min-width:66px !important;
    max-width:66px !important;
    height:30px !important;
    padding:0 18px 0 7px !important;
    font-size:.68rem !important;
    border-radius:6px !important;
  }

  /* values */
  .route-dashboard .esb-dash-value,
  .route-dashboard .esb-hero-value,
  .route-dashboard .esb-dash-amount,
  .route-dashboard .amount-display,
  .route-dashboard .dash-value{
    font-size:1rem !important;
    line-height:1.05 !important;
    margin:2px 0 2px !important;
  }

  /* subtitles / helper text */
  .route-dashboard .esb-dash-subtitle,
  .route-dashboard .esb-dash-meta,
  .route-dashboard .dash-subtitle,
  .route-dashboard .muted,
  .route-dashboard small{
    font-size:.72rem !important;
    line-height:1.15 !important;
  }

  /* chart area */
  .route-dashboard .esb-cashflow-chart,
  .route-dashboard .esb-dash-chart,
  .route-dashboard .esb-chart,
  .route-dashboard .esb-line-chart,
  .route-dashboard .dash-chart{
    height:84px !important;
    min-height:84px !important;
    max-height:84px !important;
    margin-top:4px !important;
  }

  .route-dashboard .esb-cashflow-chart svg,
  .route-dashboard .esb-dash-chart svg,
  .route-dashboard .esb-chart svg,
  .route-dashboard .esb-line-chart svg,
  .route-dashboard .dash-chart svg{
    width:100% !important;
    height:84px !important;
    max-height:84px !important;
    display:block !important;
  }

  /* legend / month labels */
  .route-dashboard .legend,
  .route-dashboard .chart-legend,
  .route-dashboard .esb-legend,
  .route-dashboard .months,
  .route-dashboard .month-labels{
    font-size:.62rem !important;
    line-height:1.05 !important;
    gap:4px !important;
  }

  /* empty states centered */
  .route-dashboard .empty-state,
  .route-dashboard .no-data,
  .route-dashboard .no-expenses,
  .route-dashboard .no-records{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    min-height:72px !important;
    font-size:.8rem !important;
    line-height:1.2 !important;
    padding:4px !important;
  }

  /* toolbar */
  .route-dashboard .page-head,
  .route-dashboard .page-toolbar,
  .route-dashboard .dash-toolbar{
    gap:8px !important;
    margin-bottom:8px !important;
  }

  .route-dashboard .page-head h1,
  .route-dashboard .page-title,
  .route-dashboard .dash-title{
    font-size:1rem !important;
    line-height:1.15 !important;
    margin:0 !important;
  }

  .route-dashboard .page-head .btn,
  .route-dashboard .page-toolbar .btn,
  .route-dashboard .dash-toolbar .btn{
    min-height:34px !important;
    padding:6px 10px !important;
    font-size:.78rem !important;
    border-radius:6px !important;
  }
}

@media (max-width:360px){

  .route-dashboard .esb-dashboard-grid,
  .dash-board{
    gap:6px !important;
  }

  .route-dashboard .esb-dash-card,
  .route-dashboard .dash-card,
  .dash-board > .panel,
  .dash-board > div{
    min-height:166px !important;
    padding:8px 8px 7px !important;
  }

  .route-dashboard .esb-dash-card-head,
  .route-dashboard .esb-dash-card-header,
  .route-dashboard .dash-card-head,
  .route-dashboard .dash-card-header{
    grid-template-columns:minmax(0,1fr) 58px !important;
  }

  .route-dashboard .esb-dash-period,
  .route-dashboard .dash-period,
  .route-dashboard .card-period select,
  .route-dashboard .panel select{
    width:58px !important;
    min-width:58px !important;
    max-width:58px !important;
    height:28px !important;
    font-size:.62rem !important;
    padding-left:5px !important;
  }

  .route-dashboard .esb-dash-value,
  .route-dashboard .esb-hero-value,
  .route-dashboard .esb-dash-amount,
  .route-dashboard .amount-display,
  .route-dashboard .dash-value{
    font-size:.94rem !important;
  }

  .route-dashboard .esb-cashflow-chart,
  .route-dashboard .esb-dash-chart,
  .route-dashboard .esb-chart,
  .route-dashboard .esb-line-chart,
  .route-dashboard .dash-chart{
    height:76px !important;
    min-height:76px !important;
    max-height:76px !important;
  }

  .route-dashboard .esb-cashflow-chart svg,
  .route-dashboard .esb-dash-chart svg,
  .route-dashboard .esb-chart svg,
  .route-dashboard .esb-line-chart svg,
  .route-dashboard .dash-chart svg{
    height:76px !important;
    max-height:76px !important;
  }
}

/* ESB_DASHBOARD_MOBILE_FRAME_END */

.route-dashboard .esb-age-bar{
  display:flex;
  width:100%;
  height:14px;
  overflow:hidden;
  border-radius:3px;
  background:#e2e8f0;
}
.route-dashboard .esb-age-bar i{
  display:block;
  height:100%;
}
.route-dashboard .esb-age-bar .current,
.route-dashboard .esb-age-legend .current{background:var(--dash-category-5);}
.route-dashboard .esb-age-bar .d30,
.route-dashboard .esb-age-chip.d30,
.route-dashboard .esb-age-legend .d30{background:#f4b000;}
.route-dashboard .esb-age-bar .d60,
.route-dashboard .esb-age-chip.d60,
.route-dashboard .esb-age-legend .d60{background:#f47321;}
.route-dashboard .esb-age-bar .d90,
.route-dashboard .esb-age-chip.d90,
.route-dashboard .esb-age-legend .d90{background:#d14343;}
.route-dashboard .esb-age-bar .d90p,
.route-dashboard .esb-age-chip.d90p,
.route-dashboard .esb-age-legend .d90p{background:#8c1d18;}
.route-dashboard .esb-age-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  margin:8px 0 12px;
  color:var(--muted,#6b6c72);
  font-size:.72rem;
}
.route-dashboard .esb-age-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.route-dashboard .esb-age-legend i{
  width:8px;
  height:8px;
  border-radius:2px;
}
.route-dashboard .esb-late-list,
.route-dashboard .esb-activity,
.route-dashboard .esb-pipe{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.route-dashboard .esb-late-row,
.route-dashboard .esb-act-row,
.route-dashboard .esb-pipe-step{
  display:grid;
  align-items:center;
  gap:8px;
  width:100%;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.route-dashboard .esb-late-row{
  grid-template-columns:minmax(0,1fr) auto auto;
}
.route-dashboard .esb-late-row b,
.route-dashboard .esb-act-row b,
.route-dashboard .esb-pipe-step b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.84rem;
}
.route-dashboard .esb-late-row small,
.route-dashboard .esb-act-row small,
.route-dashboard .esb-pipe-step small,
.route-dashboard .esb-pipe-step em{
  color:var(--muted,#6b6c72);
  font-size:.72rem;
  font-style:normal;
  font-weight:500;
}
.route-dashboard .esb-age-chip.d30{color:#3b2a00;}
.route-dashboard .esb-age-chip,
.route-dashboard .esb-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  padding:2px 6px;
  border-radius:999px;
  color:#fff;
  font-size:.68rem;
  font-style:normal;
  font-weight:700;
}
.route-dashboard .esb-status.open{background:var(--dash-income);}
.route-dashboard .esb-status.paid{background:#1b7f4e;}
.route-dashboard .esb-status.draft{background:var(--dash-category-4);}
.route-dashboard .esb-status.void{background:var(--dash-category-5);}
.route-dashboard .esb-status.overdue{background:#d14343;}
.route-dashboard .esb-pipe-step{
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "name value"
    "bar bar";
}
.route-dashboard .esb-pipe-step span{grid-area:name;min-width:0;}
.route-dashboard .esb-pipe-step strong{grid-area:value;text-align:right;font-size:.95rem;}
.route-dashboard .esb-pipe-step em{grid-area:count;text-align:right;}
.route-dashboard .esb-pipe-step i{
  grid-area:bar;
  height:8px;
  background:var(--dash-income);
}
.route-dashboard .esb-pipe-step i.empty{
  background:#e2e8f0;
}
.route-dashboard .esb-act-row{
  grid-template-columns:64px minmax(88px,120px) minmax(0,1.4fr) auto minmax(96px,auto);
  padding:8px 0;
  border-bottom:1px solid #eef2f6;
}
.route-dashboard .esb-act-date{
  color:var(--muted,#6b6c72);
  font-size:.72rem;
  font-weight:700;
}
.route-dashboard .esb-act-who{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#334155;
  font-size:.84rem;
}
.route-dashboard .esb-late-row strong{
  grid-column:3;
}
.route-dashboard .esb-act-row strong,
.route-dashboard .esb-late-row strong{
  font-size:.84rem;
  text-align:right !important;
  white-space:nowrap;
}

.route-dashboard .panel.esb-dash-card{
  border:1px solid #e3ebf3 !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 1px 2px rgba(15,39,68,.04), 0 12px 28px rgba(15,39,68,.05) !important;
  padding:18px 18px 14px !important;
}
.route-dashboard .esb-dash-card-head h2{
  color:#0c2340;
}
.route-dashboard .esb-dash-big,
.route-dashboard .esb-dash-big.amount-display{
  text-align:left !important;
  color:#0c2340;
  font-size:1.65rem;
  letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
}
.route-dashboard .esb-dash-card[data-widget="recent"]{
  grid-column:1 / -1;
  height:auto;
  min-height:0;
}
.route-dashboard .esb-dash-card[data-widget="churn"]{
  grid-column:auto;
  height:100%;
  min-height:340px;
}
.route-dashboard .esb-churn{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.route-dashboard .esb-churn .esb-dash-sub{
  margin-bottom:0;
}
.route-dashboard .esb-churn-lost{
  margin-top:4px;
}
.route-dashboard .esb-churn .esb-rank i.loss,
.route-dashboard .esb-churn-lost .esb-rank i.loss{
  background:#c2410c;
}
.route-dashboard .esb-health{
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:8px;
}
.route-dashboard .esb-health-pill{
  display:inline-flex;
  width:fit-content;
  margin:8px 0 0;
  padding:5px 10px;
  border-radius:999px;
  background:#eef3f8;
  color:#16365c;
  font-size:.75rem;
  font-weight:800;
}
.route-dashboard .esb-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  flex:1;
  align-content:start;
}
.route-dashboard .esb-stat{
  min-width:0;
  padding:10px 12px;
  border-radius:10px;
  background:#f4f7fb;
}
.route-dashboard .esb-stat small{
  display:block;
  color:#64748b;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.route-dashboard .esb-stat b{
  display:block;
  margin-top:4px;
  overflow:hidden;
  color:#0c2340;
  font-size:1.02rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.route-dashboard .esb-stat em{
  margin-left:4px;
  color:#64748b;
  font-size:.68rem;
  font-style:normal;
  font-weight:700;
}
.route-dashboard .esb-prod-compare{
  display:flex;
  flex-direction:column;
  gap:0;
}
.route-dashboard .esb-prod + .esb-prod{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #eef2f6;
}
.route-dashboard .esb-prod header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.route-dashboard .esb-prod header b{
  min-width:0;
  overflow:hidden;
  color:#0c2340;
  font-size:.84rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.route-dashboard .esb-prod header small{
  flex:0 0 auto;
  color:#64748b;
  font-size:.72rem;
  font-weight:700;
  white-space:nowrap;
}
.route-dashboard .esb-prod .esb-rank{
  cursor:default;
}
.route-dashboard .esb-rank-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.route-dashboard .esb-rank{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"name amount" "bar bar";
  gap:2px 12px;
  width:100%;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.route-dashboard .esb-rank span{grid-area:name;min-width:0;}
.route-dashboard .esb-rank b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.84rem;
}
.route-dashboard .esb-rank small{color:#6b7280;font-size:.72rem;}
.route-dashboard .esb-rank strong{
  grid-area:amount;
  font-size:.84rem;
  text-align:right !important;
  white-space:nowrap;
}
.route-dashboard .esb-rank i{
  grid-area:bar;
  display:block;
  height:6px;
  border-radius:99px;
  background:var(--dash-income);
}
.route-dashboard .esb-inv-paid b{text-align:left !important;}
@media (max-width:900px){
  .route-dashboard .esb-act-row{
    grid-template-columns:58px minmax(0,1fr) auto auto;
  }
  .route-dashboard .esb-act-who{display:none;}
}

/* Dark dashboard: secondary text was light-theme gray on the navy cards. */
html[data-theme="dark"] .route-dashboard .esb-act-who,
html[data-theme="dark"] .route-dashboard .esb-late-row b,
html[data-theme="dark"] .route-dashboard .esb-rank b,
html[data-theme="dark"] .route-dashboard .esb-prod header b{
  color:#e7f0fa;
}
html[data-theme="dark"] .route-dashboard .esb-act-row small,
html[data-theme="dark"] .route-dashboard .esb-act-date,
html[data-theme="dark"] .route-dashboard .esb-late-row small,
html[data-theme="dark"] .route-dashboard .esb-pipe-step small,
html[data-theme="dark"] .route-dashboard .esb-pipe-step em,
html[data-theme="dark"] .route-dashboard .esb-rank small,
html[data-theme="dark"] .route-dashboard .esb-prod header small,
html[data-theme="dark"] .route-dashboard .esb-dash-sub,
html[data-theme="dark"] .route-dashboard .esb-dash-empty{
  color:#c5d4e6;
}
html[data-theme="dark"] .route-dashboard .esb-dash-link{
  color:#9fd4ff;
}
html[data-theme="dark"] .route-dashboard .esb-dash-link:hover{
  color:#d7eeff;
}
html[data-theme="dark"] .route-dashboard .esb-status.open{
  background:#2f6fa8;
  color:#fff;
}
html[data-theme="dark"] .route-dashboard .esb-act-row{
  border-bottom-color:#2a4560;
}

/* Match statistic tiles to the dark dashboard and keep labels readable. */
html[data-theme="dark"] .route-dashboard .esb-stat{
  background:#152d45!important;
  color:#e7f0fa!important;
}
html[data-theme="dark"] .route-dashboard .esb-stat small,
html[data-theme="dark"] .route-dashboard .esb-stat em{
  color:#c5d4e6!important;
}
html[data-theme="dark"] .route-dashboard .esb-stat b{
  color:#e7f0fa!important;
}

/* Data colors must contrast with navy chart cards, independently of brand colors. */
/* Gradient stop colors are set by chartColor() for each theme. */
@media screen {
html[data-theme="dark"] .route-dashboard {
  --dash-income:#2DD4BF;
  --dash-expenses:#FBBF58;
  --dash-category-3:#B59AFF;
  --dash-category-4:#FB7185;
  --dash-category-5:#67D3E5;
  --dash-category-6:#94a3b8;
  --dash-chart-track:#243d56;
  --dash-chart-label:#E2E8F0;
  --dash-chart-grid:#6485a3;
  --dash-exp-hover:#173b50;
  --dash-exp-selected:#205365;
  --dash-donut-divider:#0e2136;
  --sb-chart-sales:var(--dash-income);
  --sb-chart-receipts:var(--dash-expenses);
  --sb-chart-s0:var(--dash-income);
  --sb-chart-s1:var(--dash-expenses);
  --sb-chart-s2:var(--dash-category-3);
  --sb-chart-s3:var(--dash-category-4);
  --sb-chart-s4:var(--dash-category-5);
  --sb-chart-tick:var(--dash-chart-label);
  --sb-chart-hole:#0e2136;
}
html[data-theme="dark"] .route-dashboard :is(.esb-cf-bar, .esb-chart-legend) .money-in,
html[data-theme="dark"] .route-dashboard .esb-pnl-track .income,
html[data-theme="dark"] .route-dashboard .esb-inv-paid-bar i {
  background:var(--dash-income) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-cf-bar, .esb-chart-legend) .money-out,
html[data-theme="dark"] .route-dashboard .esb-pnl-track .expenses {
  background:var(--dash-expenses) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-pnl-track, .esb-inv-paid-bar, .esb-inv-status-bar, .esb-age-bar) {
  background:var(--dash-chart-track) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-exp-slice.s1, .esb-exp-row i.s1) {
  fill:var(--dash-income) !important; background:var(--dash-income) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-exp-slice.s2, .esb-exp-row i.s2) {
  fill:var(--dash-expenses) !important; background:var(--dash-expenses) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-exp-slice.s3, .esb-exp-row i.s3) {
  fill:var(--dash-category-3) !important; background:var(--dash-category-3) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-exp-slice.s4, .esb-exp-row i.s4) {
  fill:var(--dash-category-4) !important; background:var(--dash-category-4) !important;
}
html[data-theme="dark"] .route-dashboard :is(.esb-exp-slice.s5, .esb-exp-row i.s5) {
  fill:var(--dash-category-5) !important; background:var(--dash-category-5) !important;
}
html[data-theme="dark"] .route-dashboard .esb-sales-chart .sales-line { stroke:var(--dash-income) !important; }
/* Gradient stop colors are set by chartColor() for each theme. */
html[data-theme="dark"] .route-dashboard .esb-sales-point circle {
  fill:#0e2136; stroke:var(--dash-income) !important;
}
html[data-theme="dark"] .route-dashboard .esb-pnl-label { color:var(--dash-chart-label); }
html[data-theme="dark"] .route-dashboard .esb-pipe-step:nth-child(3n+1) i { background:var(--dash-income) !important; }
html[data-theme="dark"] .route-dashboard .esb-pipe-step:nth-child(3n+2) i { background:var(--dash-expenses) !important; }
html[data-theme="dark"] .route-dashboard .esb-pipe-step:nth-child(3n) i { background:var(--dash-category-3) !important; }
html[data-theme="dark"] .route-dashboard :is(.esb-age-bar, .esb-age-legend) .d90 { background:var(--dash-category-4) !important; }
html[data-theme="dark"] .route-dashboard :is(.esb-age-bar, .esb-age-legend) .d90p { background:var(--dash-category-3) !important; }
html[data-theme="dark"] .route-dashboard .esb-dashboard-actions .esb-dash-period-btn,
html[data-theme="dark"] .route-dashboard .esb-dash-period-menu{
  background:#0e2136 !important;
  color:#f4f8ff !important;
  border-color:#35506b !important;
}
html[data-theme="dark"] .route-dashboard .esb-dashboard-actions .esb-dash-period-btn:after{
  border-top-color:#f4f8ff;
}
html[data-theme="dark"] .route-dashboard .esb-dash-period-opt{
  color:#f4f8ff;
  background:transparent;
}
html[data-theme="dark"] .route-dashboard .esb-dash-period-opt:hover,
html[data-theme="dark"] .route-dashboard .esb-dash-period-opt.is-on{
  background:#16324c;
}
}


/* Money position band and Needs attention list (2026-10-25).
   The band replaces the former toolbar banner and the four-figure strip. It is dark in both themes,
   like the banner it replaces; the attention list follows the app theme through its tokens. */
.route-dashboard .esb-pos{
  --pos-ink:#fff;--pos-muted:#a9bed4;--pos-rule:rgba(255,255,255,.14);--pos-track:rgba(255,255,255,.08);
  --pos-cash:#5fd0cf;--pos-cur:#5fd0cf;--pos-a1:#f3c46b;--pos-a2:#f0a35a;--pos-a3:#ec7f5f;--pos-a4:#e45f63;
  position:relative;z-index:6;
  display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:clamp(20px,3vw,40px);
  margin:0 0 20px;padding:clamp(20px,2.4vw,30px);
  border:1px solid #284765;border-radius:18px;
  background:radial-gradient(ellipse at top right,rgba(18,158,155,.22),transparent 62%),#0c2340;
  color:var(--pos-ink);font-variant-numeric:tabular-nums;
}
.route-dashboard .esb-pos-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 14px}
.route-dashboard .esb-pos-head h2{margin:0;font-size:clamp(1.3rem,1.9vw,1.6rem);letter-spacing:-.02em;color:var(--pos-ink)}
.route-dashboard .esb-pos-head p{margin:0;color:var(--pos-muted);font-size:.86rem}
/* Statement lines: sign, label, bar, amount. The whole line opens the register behind the figure. */
.route-dashboard .esb-pos-line{
  all:unset;box-sizing:border-box;cursor:pointer;width:100%;
  display:grid;grid-template-columns:18px minmax(150px,1.1fr) minmax(90px,1fr) minmax(120px,auto);align-items:center;gap:6px 14px;
  padding:12px 10px;border-radius:10px;border-bottom:1px solid var(--pos-rule);
}
.route-dashboard .esb-pos-line:hover{background:rgba(255,255,255,.05)}
.route-dashboard .esb-pos-line:focus-visible,.route-dashboard .esb-pos-profit:focus-visible{outline:3px solid #79ddd3;outline-offset:2px}
.route-dashboard .esb-pos-sign{color:var(--pos-muted);font-size:1.15rem;font-weight:600;text-align:center}
.route-dashboard .esb-pos-label{display:flex;flex-direction:column;gap:2px;font-size:.98rem;font-weight:650;color:var(--pos-ink);min-width:0}
.route-dashboard .esb-pos-label small{font-size:.8rem;font-weight:500;color:var(--pos-muted)}
.route-dashboard .esb-pos-bar{display:flex;height:8px;border-radius:99px;background:var(--pos-track);overflow:hidden}
.route-dashboard .esb-pos-bar.is-empty{background:transparent}
.route-dashboard .esb-pos-seg{display:block;height:100%;min-width:3px}
.route-dashboard .esb-pos-seg.cash,.route-dashboard .esb-pos-seg.cur{background:var(--pos-cur)}
.route-dashboard .esb-pos-seg.a1{background:var(--pos-a1)}
.route-dashboard .esb-pos-seg.a2{background:var(--pos-a2)}
.route-dashboard .esb-pos-seg.a3{background:var(--pos-a3)}
.route-dashboard .esb-pos-seg.a4{background:var(--pos-a4)}
.route-dashboard .esb-pos-amt{font-size:1.18rem;font-weight:700;text-align:right;white-space:nowrap;color:var(--pos-ink)}
/* The total closes the statement with a rule above and a double rule under the figure. */
.route-dashboard .esb-pos-line.is-total{border-bottom:0;margin-top:2px}
.route-dashboard .esb-pos-line.is-total .esb-pos-label{font-size:1.04rem}
.route-dashboard .esb-pos-line.is-total .esb-pos-amt{font-size:1.5rem;text-decoration:underline double;text-decoration-color:#79ddd3;text-underline-offset:7px}
.route-dashboard .esb-pos-empty{margin:8px 0 0;color:var(--pos-muted)}
/* Side: period controls, then profit. */
.route-dashboard .esb-pos-side{display:flex;flex-direction:column;gap:12px;min-width:0;padding-left:clamp(0px,2.4vw,32px);border-left:1px solid var(--pos-rule)}
.route-dashboard .esb-pos .esb-dashboard-actions{justify-content:flex-end}
.route-dashboard .esb-pos .esb-dash-period-field>span,.route-dashboard .esb-pos .esb-dash-span{color:var(--pos-muted)}
.route-dashboard .esb-pos .esb-dash-span{margin:0;text-align:right;font-size:.82rem}
.route-dashboard .esb-pos-profit-wrap{margin-top:8px}
.route-dashboard .esb-pos-profit{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:4px;width:100%;padding:16px 16px 14px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid var(--pos-rule)}
.route-dashboard .esb-pos-profit:hover{background:rgba(255,255,255,.09)}
.route-dashboard .esb-pos-kicker{font-size:.84rem;color:var(--pos-muted);font-weight:600}
.route-dashboard .esb-pos-profit strong{font-size:clamp(1.6rem,2.3vw,2rem);font-weight:750;letter-spacing:-.02em;color:var(--pos-ink)}
.route-dashboard .esb-pos-profit em{font-style:normal;font-size:.84rem;color:var(--pos-muted)}
.route-dashboard .esb-pos-profit em.up{color:#79ddd3}
.route-dashboard .esb-pos-profit em.down{color:#f3a08e}
.route-dashboard .esb-pos-pl{margin:10px 2px 0;display:grid;gap:6px}
.route-dashboard .esb-pos-pl div{display:flex;justify-content:space-between;gap:12px;font-size:.88rem}
.route-dashboard .esb-pos-pl dt{color:var(--pos-muted)}
.route-dashboard .esb-pos-pl dd{margin:0;color:var(--pos-ink);font-weight:600}
/* Needs attention */
.route-dashboard .esb-attn{margin:0 0 24px;padding:18px 20px 10px;border:1px solid var(--line,#d6e2e9);border-radius:16px;background:var(--panel,#fff)}
.route-dashboard .esb-attn h2{margin:0 0 6px;font-size:1.05rem;color:var(--ink,#0c2340)}
.route-dashboard .esb-attn-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));column-gap:28px}
.route-dashboard .esb-attn-list li{margin:0;padding:0;border-bottom:1px solid var(--line,#e3eaf0)}
.route-dashboard .esb-attn-row{all:unset;box-sizing:border-box;cursor:pointer;width:100%;display:grid;grid-template-columns:10px minmax(0,1fr) auto 16px;align-items:center;gap:12px;padding:12px 6px;border-radius:8px}
.route-dashboard .esb-attn-row:hover{background:var(--hover,#f2f6f9)}
.route-dashboard .esb-attn-row:focus-visible{outline:3px solid var(--accent,#087f85);outline-offset:1px}
.route-dashboard .esb-attn-dot{width:10px;height:10px;border-radius:50%;background:#087f85}
.route-dashboard .tone-late .esb-attn-dot{background:#d24c47}
.route-dashboard .tone-soon .esb-attn-dot{background:#d99a22}
.route-dashboard .esb-attn-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.route-dashboard .esb-attn-text b{font-size:.93rem;color:var(--ink,#0c2340)}
.route-dashboard .esb-attn-text small{font-size:.8rem;color:var(--muted,#5b6b7c);overflow-wrap:anywhere}
.route-dashboard .esb-attn-row strong{font-size:.95rem;font-weight:700;color:var(--ink,#0c2340);white-space:nowrap;font-variant-numeric:tabular-nums}
.route-dashboard .esb-attn-go{width:16px;height:16px;fill:none;stroke:var(--muted,#5b6b7c);stroke-width:2}
.route-dashboard .esb-attn-empty{margin:4px 0 10px;color:var(--muted,#5b6b7c);font-size:.9rem}
html[data-theme="dark"] .route-dashboard .esb-attn{background:#0f2236;border-color:#24405c}
html[data-theme="dark"] .route-dashboard .esb-attn :is(h2,.esb-attn-text b,.esb-attn-row strong){color:#eef4fa}
html[data-theme="dark"] .route-dashboard .esb-attn :is(.esb-attn-text small,.esb-attn-empty){color:#9fb3c8}
html[data-theme="dark"] .route-dashboard .esb-attn-list li{border-color:#24405c}
html[data-theme="dark"] .route-dashboard .esb-attn-row:hover{background:#16324c}
.route-dashboard .esb-pos .esb-dashboard-actions .esb-dash-period,
.route-dashboard .esb-pos .esb-dashboard-actions .esb-dash-period-btn{min-width:132px!important}
.route-dashboard .esb-pos .esb-dashboard-actions{flex-wrap:nowrap}
.route-dashboard .esb-pos-line.is-total .esb-pos-bar{visibility:hidden}
.route-dashboard .esb-pos-profit strong{text-align:left!important;align-self:flex-start!important;margin-left:0!important}
@media (max-width:1100px){
  .route-dashboard .esb-pos{grid-template-columns:minmax(0,1fr);row-gap:14px}
  /* Controls first, then the statement, then profit. */
  .route-dashboard .esb-pos-side{display:contents}
  .route-dashboard .esb-pos .esb-dashboard-actions{order:-2;justify-content:flex-start;flex-wrap:wrap}
  .route-dashboard .esb-pos .esb-dash-span{order:-1;text-align:left;margin-top:-6px}
  .route-dashboard .esb-pos-profit-wrap{margin-top:0}
}
@media (max-width:640px){
  .route-dashboard .esb-pos{padding:18px 14px;border-radius:16px}
  .route-dashboard .esb-pos-line{grid-template-columns:16px minmax(0,1fr) auto;padding:11px 4px}
  .route-dashboard .esb-pos-bar{grid-column:2 / -1;grid-row:2}
  .route-dashboard .esb-pos-amt{font-size:1.05rem}
  .route-dashboard .esb-pos-line.is-total .esb-pos-amt{font-size:1.25rem}
  .route-dashboard .esb-pos-head{flex-direction:column;gap:2px}
  .route-dashboard .esb-attn{padding:14px 12px 6px}
  html body .route-dashboard .esb-pos-profit strong{font-size:1.7rem!important;text-align:left!important}
  html body .route-dashboard .esb-pos-amt{font-size:1.05rem!important}
  html body .route-dashboard .esb-pos-line.is-total .esb-pos-amt{font-size:1.25rem!important}
}

@media(min-width:901px){.route-dashboard .esb-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.route-dashboard .esb-dash-card[data-widget="cashflow"]{grid-column:1 / -1}}
/* Consistent financial workspace spacing and responsive card flow. */
@media screen {
 .route-dashboard .esb-dashboard-grid{align-items:start;gap:16px}
 .route-dashboard .esb-pos{border-radius:12px;padding:20px;margin-bottom:16px;gap:24px}
 .route-dashboard .esb-pos-head h2{font-size:20px}
 .route-dashboard .esb-attn{margin-bottom:16px}
 .route-dashboard .esb-dash-card{border-radius:12px;min-width:0}
 #esb-dash-layout{display:grid;gap:0;margin-top:12px;max-height:55vh;overflow-y:auto}
 #esb-dash-layout [data-widget-row]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);margin:0}
 #esb-dash-layout [data-widget-row]>label{display:flex;align-items:center;gap:8px;min-width:0;margin:0}
 #esb-dash-layout [data-widget-row]>span{display:flex;gap:4px;flex-shrink:0}
 #esb-dash-layout [data-widget-row] .btn{padding:5px 8px;min-height:32px}
}
@media(min-width:901px){.route-dashboard .esb-dashboard-grid>[data-widget="cashflow"]{grid-column:1 / -1}}
@media(max-width:900px){.route-dashboard .esb-dashboard-grid{grid-template-columns:minmax(0,1fr)!important}}
/* Balanced accounting overview: compact charts and no empty half rows. */
@media screen {
 .route-dashboard .esb-dashboard-grid{grid-auto-flow:row dense;align-items:stretch}
 .route-dashboard .esb-dashboard-grid>.esb-dash-card{height:auto;align-self:stretch}
 .route-dashboard .esb-dashboard-grid>.esb-dash-card:last-child:nth-child(odd){grid-column:1 / -1}
 .route-dashboard .esb-dashboard-grid>.esb-dash-card[data-widget="cashflow"]{grid-column:auto}
 .route-dashboard .esb-dashboard-grid>.esb-dash-card[data-widget="cashflow"]:last-child:nth-child(odd){grid-column:1 / -1}
 .route-dashboard .esb-pos>.esb-hero-top{grid-column:1 / -1;margin:0;padding:0}
 .route-dashboard .esb-pos{row-gap:16px}
 .route-dashboard .panel.esb-dash-card{padding:16px!important;box-shadow:0 1px 3px rgba(15,39,68,.05)!important}
 .route-dashboard .esb-dash-card-head{margin-bottom:8px}
 .route-dashboard .esb-dash-card-head h2{font-size:17px}
 .route-dashboard .esb-dash-big.amount-display{font-size:26px!important;line-height:1.25}
 .route-dashboard .esb-sales-chart{height:220px!important;min-height:180px!important;max-height:240px!important;flex:0 0 auto}
 .route-dashboard .esb-cf-plot{flex:0 0 auto;grid-template-rows:auto 210px auto;gap:8px; margin-bottom:12px}
 .route-dashboard .esb-cf-chart{min-height:0}
 .route-dashboard .esb-dash-card-foot{padding-top:12px}
 .route-dashboard .esb-dash-sub{margin-bottom:12px}
}
@media(max-width:600px){
 .route-dashboard .esb-sales-chart{height:190px!important;min-height:0!important}
 .route-dashboard .esb-cf-plot{grid-template-rows:auto 180px auto}
 .route-dashboard .esb-dashboard-grid>.esb-dash-card{grid-column:1 / -1}
}

/* =========================================================
   International dashboard pass (2026-11-09)
   Cash flow card with comparison panel, combo charts,
   receivables vs payables ageing.
   ========================================================= */
@media screen and (min-width:901px){
 .route-dashboard .esb-dashboard-grid>.esb-dash-card[data-widget="cashflow"]{grid-column:1 / -1}
}
.route-dashboard .esb-cf-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;flex:1;min-width:0}
@media (min-width:901px){
 .route-dashboard .esb-cf-layout{grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:28px}
 .route-dashboard .esb-cf-side{border-left:1px solid var(--border,#e5e7eb);padding-left:24px}
}
.route-dashboard .esb-cf-main{display:flex;flex-direction:column;min-width:0}
.route-dashboard .esb-cf-main .esb-cf-plot{grid-template-rows:auto 230px}
.route-dashboard .esb-cf-side{display:flex;flex-direction:column;gap:16px;min-width:0}
.route-dashboard .esb-cf-side .esb-dash-link{align-self:flex-start;margin-top:auto}
.route-dashboard .esb-cf-sum{display:grid;gap:0;margin:0}
.route-dashboard .esb-cf-sum>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:7px 0;border-bottom:1px solid var(--border,#e5e7eb)}
.route-dashboard .esb-cf-sum>div:last-child{border-bottom:0}
.route-dashboard .esb-cf-sum dt{display:flex;align-items:center;gap:7px;color:var(--muted,#64748b);font-size:13px}
.route-dashboard .esb-cf-sum dt i{width:8px;height:8px;border-radius:50%}
.route-dashboard .esb-cf-sum dt i.money-in{background:var(--dash-income)}
.route-dashboard .esb-cf-sum dt i.money-out{background:var(--dash-expenses)}
.route-dashboard .esb-cf-sum dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text,#1f2937);white-space:nowrap}
.route-dashboard .esb-cf-sum .is-net dt{color:var(--text,#1f2937);font-weight:700}
.route-dashboard .esb-cf-sum .is-net dd{font-size:1.05rem}
.route-dashboard :is(.esb-cf-sum dd,.esb-cf-net b).is-up{color:var(--dash-income)}
.route-dashboard :is(.esb-cf-sum dd,.esb-cf-net b).is-down{color:var(--dash-category-4)}
.route-dashboard .esb-cf-cover-head{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--muted,#64748b);margin-bottom:6px}
.route-dashboard .esb-cf-cover-head b{color:var(--text,#1f2937);font-variant-numeric:tabular-nums}
.route-dashboard .esb-cf-cover-track{display:block;height:8px;border-radius:99px;background:var(--dash-chart-track);overflow:hidden}
.route-dashboard .esb-cf-cover-track i{display:block;height:100%;border-radius:99px}
.route-dashboard :is(.esb-cf-cover-track,.esb-cf-net-track) i.is-up{background:var(--dash-income)}
.route-dashboard :is(.esb-cf-cover-track,.esb-cf-net-track) i.is-down{background:var(--dash-category-4)}
.route-dashboard .esb-cf-net h3{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--text,#1f2937)}
.route-dashboard .esb-cf-net ul{list-style:none;margin:0;padding:0;display:grid;gap:4px;max-height:236px;overflow-y:auto}
.route-dashboard .esb-cf-net li{display:grid;grid-template-columns:3.2em minmax(0,1fr) 5em;align-items:center;gap:8px;font-size:12.5px;color:var(--dash-chart-label)}
.route-dashboard .esb-cf-net b{text-align:right;font-variant-numeric:tabular-nums;font-weight:650}
.route-dashboard .esb-cf-net-track{position:relative;height:10px}
.route-dashboard .esb-cf-net-track::before{content:"";position:absolute;left:50%;top:-2px;bottom:-2px;border-left:1px solid var(--dash-chart-grid);opacity:.6}
.route-dashboard .esb-cf-net-track i{position:absolute;top:0;bottom:0;border-radius:2px}
.route-dashboard .esb-cf-net-track i.is-up{left:50%}
.route-dashboard .esb-cf-net-track i.is-down{right:50%}
.route-dashboard .esb-cf-net-note{margin:8px 0 0;font-size:12px;color:var(--muted,#64748b)}

/* Combo chart */
.route-dashboard .esb-cb{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:200px auto;gap:6px 8px;margin-top:4px;min-width:0}
.route-dashboard .esb-cb-scale{position:relative;font-size:12px;color:var(--dash-chart-label);font-variant-numeric:tabular-nums}
.route-dashboard .esb-cb-scale span{position:absolute;right:0;transform:translateY(50%);white-space:nowrap}
.route-dashboard .esb-cb-plot{position:relative;min-width:0}
.route-dashboard .esb-cb-grid{position:absolute;inset:0;pointer-events:none}
.route-dashboard .esb-cb-grid i{position:absolute;left:0;right:0;border-top:1px solid var(--dash-chart-grid);opacity:.35}
.route-dashboard .esb-cb-grid i.is-zero{opacity:.9}
.route-dashboard .esb-cb-cols{position:absolute;inset:0;display:flex}
.route-dashboard .esb-cb-col{position:relative;flex:1;min-width:0}
.route-dashboard .esb-cb-bar{position:absolute;width:min(22px,30%);padding:0;border:0;border-radius:2px 2px 0 0;cursor:pointer;transition:filter .15s}
.route-dashboard .esb-cb-col .esb-cb-bar:nth-child(1){right:50%;margin-right:1px}
.route-dashboard .esb-cb-col .esb-cb-bar:nth-child(2){left:50%;margin-left:1px}
.route-dashboard .esb-cb-bar:hover,.route-dashboard .esb-cb-bar:focus-visible{filter:brightness(.88)}
.route-dashboard :is(.esb-cb-bar,.esb-chart-legend i,.esb-agec-bar,.esb-agec-totals i).money-in{background:var(--dash-income)}
.route-dashboard :is(.esb-cb-bar,.esb-chart-legend i,.esb-agec-bar,.esb-agec-totals i).money-out{background:var(--dash-expenses)}
.route-dashboard :is(.esb-cb-bar,.esb-chart-legend i).money-billed{background:var(--dash-category-3)}
.route-dashboard .esb-chart-legend i.net-line{background:var(--dash-profit)}
.route-dashboard .esb-chart-legend i.is-line{width:14px;height:3px;border-radius:2px}
.route-dashboard .esb-cb-line{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.route-dashboard .esb-cb-line polyline{fill:none;stroke:var(--dash-profit);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.route-dashboard .esb-cb-dot{position:absolute;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:var(--dash-profit);box-shadow:0 0 0 2px var(--surface,#fff);pointer-events:none}
.route-dashboard .esb-cb-dot.is-down{background:var(--dash-category-4)}
.route-dashboard .esb-cb-x{grid-column:2;display:flex;font-size:12px;color:var(--dash-chart-label)}
.route-dashboard .esb-cb-x span{flex:1;min-width:0;text-align:center;white-space:nowrap}
.route-dashboard .esb-cb-x span.is-hidden{visibility:hidden}

/* Receivables vs payables */
.route-dashboard .esb-agec-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}
.route-dashboard .esb-agec-totals button{display:grid;gap:2px;text-align:left;padding:10px 12px;border:1px solid var(--border,#e5e7eb);border-radius:10px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.route-dashboard .esb-agec-totals button:hover{border-color:var(--dash-chart-grid)}
.route-dashboard .esb-agec-totals small{display:flex;align-items:center;gap:6px;color:var(--muted,#64748b);font-size:12.5px}
.route-dashboard .esb-agec-totals small i{width:8px;height:8px;border-radius:50%}
.route-dashboard .esb-agec-totals b{font-size:1.2rem;font-variant-numeric:tabular-nums;color:var(--text,#1f2937)}
.route-dashboard .esb-agec-totals em{font-style:normal;font-size:12px;color:var(--dash-category-4)}
.route-dashboard .esb-agec-rows{display:grid;gap:6px}
.route-dashboard .esb-agec-row{display:grid;grid-template-columns:6.5em repeat(2,minmax(0,1fr));align-items:center;gap:12px;font-size:12.5px;color:var(--dash-chart-label)}
.route-dashboard .esb-agec-rows.is-single .esb-agec-row{grid-template-columns:6.5em minmax(0,1fr)}
.route-dashboard .esb-agec-row.is-head{font-weight:700;color:var(--muted,#64748b);font-size:12px}
.route-dashboard .esb-agec-row>span[role="cell"]:not(:first-child){display:flex;align-items:center;gap:8px;min-width:0}
.route-dashboard .esb-agec-bar{display:block;height:10px;border-radius:2px;flex:0 0 auto;max-width:calc(100% - 4.5em)}
.route-dashboard .esb-agec-row b{font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
@media (max-width:600px){
 .route-dashboard .esb-cb{grid-template-columns:42px minmax(0,1fr);grid-template-rows:170px auto}
 .route-dashboard .esb-cf-main .esb-cf-plot{grid-template-rows:auto 180px}
 .route-dashboard .esb-agec-row{grid-template-columns:5.2em repeat(2,minmax(0,1fr));gap:8px}
}
/* With cash flow spanning the full row, the parity of the remaining cards flips. */
@media screen and (min-width:901px){
 .route-dashboard .esb-dashboard-grid:has(>[data-widget="cashflow"])>.esb-dash-card:last-child:nth-child(odd):not([data-widget="cashflow"]){grid-column:auto}
 .route-dashboard .esb-dashboard-grid:has(>[data-widget="cashflow"])>.esb-dash-card:last-child:nth-child(even):not([data-widget="cashflow"]){grid-column:1 / -1}
}
.route-dashboard .esb-cf-plot[hidden]{display:none!important}
.route-dashboard .esb-agec-totals :is(small,b,em){justify-self:start;text-align:left}

/* Month columns are hover targets for the chart tooltip; highlight the band being read. */
.route-dashboard :is(.esb-cb-col,.esb-cf-group){border-radius:4px;transition:background-color .12s}
.route-dashboard :is(.esb-cb-col,.esb-cf-group):hover{background:color-mix(in srgb,var(--dash-chart-grid) 14%,transparent)}
.route-dashboard :is(.esb-cf-sum>div,.esb-agec-row:not(.is-head),.esb-chart-legend span){cursor:default}
.route-dashboard .esb-agec-row:not(.is-head):hover{background:color-mix(in srgb,var(--dash-chart-grid) 10%,transparent);border-radius:4px}

/* Forecast months on the dashboard charts (2026-11-16): hatched and lighter on a faint band, so they read as estimates. */
.route-dashboard :is(.esb-cf-group,.esb-cb-col).is-forecast{background:repeating-linear-gradient(135deg,transparent 0 7px,color-mix(in srgb,var(--dash-category-5) 9%,transparent) 7px 8px);border-radius:6px}
html body #app#app.route-dashboard .esb-cf-group.is-forecast i,html body #app#app.route-dashboard .esb-cb-col.is-forecast .esb-cb-bar{opacity:.55;background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.5) 0 2px,transparent 2px 5px)!important}
.route-dashboard .esb-cb-line polyline.is-forecast{stroke-dasharray:5 4}
.route-dashboard .esb-cb-dot.is-forecast{opacity:.6}
.route-dashboard .esb-sales-chart .sales-line.is-forecast{stroke-dasharray:6 5;opacity:.75}
.route-dashboard .esb-sales-point.is-forecast circle{opacity:.6}
.route-dashboard .esb-chart-legend i.is-forecast-key{background:repeating-linear-gradient(135deg,var(--dash-category-5) 0 2px,transparent 2px 5px)!important;box-shadow:inset 0 0 0 1px var(--dash-category-5)}
