/* CG ERP petty cash two-row dashboard (V39.5.28): DISPLAY ONLY. */
.cg-dash-petty:has(.pc-petty-top){
  /* Keep inherited panel dimensions, padding and colors. */
  display:flex!important; flex-direction:column!important; justify-content:flex-start!important;
  min-width:0!important;
}
.cg-dash-petty .pc-petty-top{
  display:grid!important; grid-template-columns:minmax(0,1fr) minmax(190px,36%)!important;
  align-items:start!important; gap:12px!important; min-width:0!important;
}
.cg-dash-petty .pc-petty-identity{min-width:0!important;padding-top:1px!important}
.cg-dash-petty .pc-petty-top .cg-petty-title{font-size:clamp(23px,2vw,30px)!important;line-height:1.13!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}
.cg-dash-petty .pc-petty-top .cg-petty-incharge{font-size:clamp(10px,.82vw,12px)!important;line-height:1.3!important;margin-top:3px!important;overflow-wrap:anywhere!important}
.cg-dash-petty .pc-top-balance{padding:9px 14px!important;min-width:0!important;align-self:start!important}
.cg-dash-petty .pc-top-balance span{font-size:clamp(10px,.85vw,12px)!important;white-space:nowrap!important}
.cg-dash-petty .pc-top-balance strong{font-size:clamp(20px,1.85vw,26px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;font-variant-numeric:tabular-nums!important;letter-spacing:-.025em!important}
.cg-dash-petty .cg-petty-metrics.pc-petty-bottom{
  display:grid!important;grid-template-columns:1.24fr 1.24fr .95fr .95fr!important;
  gap:10px!important; margin-top:12px!important;
  margin-bottom:0!important; min-width:0!important;max-width:100%!important;
  overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;
}
.cg-dash-petty .pc-petty-bottom>.cg-petty-metric{min-width:0!important;min-height:0!important;padding:10px 11px!important;overflow:visible!important}
.cg-dash-petty .pc-petty-bottom>.cg-petty-metric span{font-size:clamp(10px,.82vw,12px)!important;white-space:nowrap!important}
.cg-dash-petty .pc-petty-bottom>.cg-petty-metric strong{
  font-size:clamp(17px,1.5vw,22px)!important;line-height:1.2!important;
  font-weight:800!important;white-space:nowrap!important;overflow:visible!important;
  text-overflow:clip!important;letter-spacing:-.045em!important;font-variant-numeric:tabular-nums!important;
}
.cg-dash-petty .pc-petty-bottom .cg-petty-metric-card span{color:#b1d8f5!important}
.cg-dash-petty .pc-petty-bottom .cg-petty-metric-cash span{color:#b5efcb!important}
/* When cards are too narrow to display a full amount, scroll the ONE bottom row. */
@media(max-width:1250px){
 .cg-dash-petty .cg-petty-metrics.pc-petty-bottom{grid-template-columns:minmax(152px,1.24fr) minmax(152px,1.24fr) minmax(138px,.95fr) minmax(138px,.95fr)!important}
 .cg-dash-petty .pc-petty-bottom>.cg-petty-metric strong{font-size:16px!important}
}
@media(max-width:700px){
 .cg-dash-petty .pc-petty-top{grid-template-columns:minmax(0,1fr) minmax(143px,43%)!important;gap:7px!important}
 .cg-dash-petty .pc-top-balance{padding:8px!important}
 .cg-dash-petty .pc-top-balance strong{font-size:15px!important}
 .cg-dash-petty .pc-petty-top .cg-petty-title{font-size:18px!important}
 .cg-dash-petty .cg-petty-metrics.pc-petty-bottom{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
}
/* Wallet selector stays usable without sitting on the top-right balance. */
.cg-dash-petty:has(.pc-petty-top) .cg-petty-selector{position:static!important;order:0!important;width:min(100%,240px)!important;margin:0 0 6px!important}
