/* Layout follows the available dashboard width, including an open sidebar. */
.kc-dashboard-layout{container:kc-dashboard / inline-size;inline-size:100%;max-inline-size:none;min-inline-size:0;gap:clamp(12px,2vw,24px)}
.kc-dashboard-layout :where(*){box-sizing:border-box}
.kc-dashboard-layout :is(.kc-dashboard-studio,.dash-content,.kc-role-dashboard,.crm-target-overview,.crm-target-summary,.ai-dashboard,.exec-sample){inline-size:100%;max-inline-size:100%;min-inline-size:0}
.kc-dashboard-layout :is(.dash-content,.kc-role-dashboard)>*{min-inline-size:0;max-inline-size:100%}
.kc-dashboard-layout :is(h1,h2,h3,p,strong,label,button){overflow-wrap:anywhere}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system){display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:0;padding:clamp(16px,3cqi,36px);gap:clamp(16px,2cqi,28px)}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-hero-copy{position:relative;width:auto;max-width:100%;min-width:0;pointer-events:auto}
.kc-dashboard-layout .dash-sales-stage{
 position:relative;inset:auto;max-width:none;width:auto;
 height:clamp(285px,34cqi,440px);min-height:0;aspect-ratio:auto;
 margin:0 clamp(40px,5cqi,66px);
}
.kc-dashboard-layout .dash-sales-stage :is(.dash-sales-orbit,.dash-fire-sun){top:45%}
.kc-dashboard-layout .dash-sales-stage .dash-sales-orbit{height:calc(var(--orbit-size) * .72)}
.kc-dashboard-layout .dash-sales-system{position:relative;inset:auto;inline-size:100%;max-inline-size:100%;min-inline-size:0;block-size:auto;align-self:center;pointer-events:auto}

.kc-dashboard-layout .dash-sales-stage .dash-fire-sun{width:clamp(90px,14cqi,180px);height:auto;aspect-ratio:1}
.kc-dashboard-layout .dash-sales-legend{position:static;inset:auto;width:100%;padding:12px 0;line-height:1.7}
.kc-dashboard-layout .dash-sales-banner{position:static;inset:auto;grid-column:1/-1;width:100%;min-width:0;margin:0}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px!important}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner>article{min-width:0;padding:10px 12px!important}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner>article+article{border-left:0!important}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner :is(span,small){min-height:0;font-size:clamp(12px,1.4cqi,15px);line-height:1.6}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner strong{font-size:clamp(22px,3cqi,36px);line-height:1.3}
.kc-dashboard-layout .dash-role-nav>div{
 display:grid;grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:minmax(max-content,1fr);
 overflow-x:auto;overscroll-behavior-inline:contain;padding:4px;
}
.kc-dashboard-layout .dash-role-nav button{justify-content:center;white-space:nowrap;min-height:44px;overflow-wrap:normal}
.kc-dashboard-layout .dash-role-nav button>svg{flex-shrink:0}
.kc-dashboard-layout :is(.kc-dash-kpis,.crm-target-kpis,.exec-kpis){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:clamp(10px,1.5cqi,20px)}
.kc-dashboard-layout :is(.kc-dash-kpis,.crm-target-kpis,.exec-kpis)>*{min-width:0;height:100%}
.kc-dashboard-layout :is(.crm-target-overview>.crm-grid,.ai-filters){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))!important;gap:12px}
.kc-dashboard-layout :is(.crm-field,.crm-target-heading,.dash-chart-heading){min-width:0;max-width:100%}
.kc-dashboard-layout :is(.crm-target-heading,.dash-chart-heading){flex-wrap:wrap}
.kc-dashboard-layout :is(input,select,textarea){min-width:0;max-width:100%;min-height:44px}
.kc-dashboard-layout .crm-field :is(input,select,textarea){width:100%}
.kc-dashboard-layout :is(.dash-target-visuals,.sm-rings){grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:clamp(12px,2cqi,24px)}
.kc-dashboard-layout :is(.dash-chart,.dash-attainment,.sm-panel,.kc-target-panel){min-width:0;max-width:100%;padding:clamp(12px,2cqi,24px)}
.kc-dashboard-layout .dash-attainment{display:flex}
.kc-dashboard-layout .sm-months{grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));overflow:visible}
.kc-dashboard-layout .sm-panel .sm-months button{min-width:0;max-width:100%;min-height:44px}
.kc-dashboard-layout :is(.sm-panel svg,.dash-chart svg){display:block;max-width:100%;height:auto}
.kc-dashboard-layout :is(.overflow-x-auto,.crm-master-table,.exec-table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
@container kc-dashboard (max-width:900px){
 .kc-dashboard-layout .dash-hero:has(.dash-sales-system){grid-template-columns:minmax(0,1fr)}
 
 .kc-dashboard-layout .dash-sales-stage .dash-fire-sun{width:clamp(90px,25cqi,160px)}
 .kc-dashboard-layout .kc-role-dashboard>.grid[class*="xl:grid-cols-"]:not(.kc-dash-kpis){grid-template-columns:minmax(0,1fr)}
}
@container kc-dashboard (max-width:480px){
 .kc-dashboard-layout .dash-hero h1{font-size:clamp(20px,6cqi,28px)!important}
 .kc-dashboard-layout .dash-hero-meta{display:flex;flex-wrap:wrap;gap:8px}
 
 .kc-dashboard-layout .crm-target-overview{padding:12px}
 .kc-dashboard-layout .sm-kpi{display:flex;flex-direction:column;align-items:center;text-align:center}
 .kc-dashboard-layout .kc-role-dashboard .kc-dash-kpis>div>div>.min-w-0>p:first-child{min-height:0}
}

/* Bound the application scroll area as well as the dashboard's own canvas. */
.kc-app .crm-dashboard-scroll-area{box-sizing:border-box;min-width:0;min-height:0;width:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
.kc-app>div:has(>.crm-dashboard-scroll-area){min-width:0;min-height:0;flex-basis:0}
.crm-dashboard-scroll-area .kc-dashboard-layout{width:100%;max-width:100%;margin-inline:0}
.crm-dashboard-scroll-area .kc-dashboard-layout :is(.sales-map-panel,.sales-map-grid,.sales-map-detail,.seller-ranking,.kc-target-details,.kc-target-panel){min-width:0;max-width:100%}
.crm-dashboard-scroll-area .kc-dashboard-layout :is(.sales-map-table-scroll,.seller-bars,.overflow-x-auto,.crm-table-scroll){min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
/* Keep the orbit scene behind the header and totals. */
.kc-dashboard-layout .dash-hero:has(.dash-sales-system){position:relative;isolation:isolate;overflow:hidden;grid-template-areas:"copy" "." "totals";grid-template-rows:auto 1fr auto;align-items:start;min-height:clamp(420px,30cqi,500px);height:auto;max-height:none}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-hero-copy{grid-area:copy}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-sales-system{
 position:absolute;inset:auto clamp(16px,2.4cqi,28px);top:50%;width:auto;
 transform:translateY(-50%);grid-area:auto;pointer-events:none;z-index:1;
}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-hero-copy{z-index:2}
.kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-sales-banner{z-index:2}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner{
 background:transparent!important;
 backdrop-filter:none;
 text-align:center;
}
.kc-dashboard-layout .dash-sales-banner{grid-area:totals;height:auto;max-height:none;overflow:visible}
.kc-dashboard-layout .dash-sales-banner .crm-target-banner{height:auto;max-height:none;overflow:visible}

@media(max-height:760px) and (min-width:901px){
 .kc-dashboard-layout .dash-hero:has(.dash-sales-system){padding:20px;gap:12px}
 
}

/* Compact header and totals composition after removing motion controls. */
.kc-dashboard-layout .dash-hero:has(.dash-sales-system){gap:clamp(12px,1.5cqi,20px);padding:clamp(16px,2.4cqi,28px);margin-bottom:16px}

.kc-dashboard-layout .dash-sales-banner .crm-target-banner>article{align-items:center;justify-content:flex-start;gap:6px}
.kc-dashboard-layout .sm-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}


@container kc-dashboard (max-width:480px){
 .kc-dashboard-layout .dash-sales-stage{height:255px;margin-inline:36px}
 .kc-dashboard-layout .dash-sales-planet{width:72px}
 .kc-dashboard-layout .dash-sales-banner .crm-target-banner{grid-template-columns:minmax(0,1fr)}
 .kc-dashboard-layout .dash-sales-banner .crm-target-banner>article{padding:6px 12px!important}
}

/* Match the approved executive overview proportions on wide screens. */
@container kc-dashboard (min-width:901px){
 .kc-dashboard-layout .dash-hero:has(.dash-sales-system){
  min-height:clamp(420px,33cqi,550px);
  padding:clamp(18px,1.7cqi,26px);
 }
 .kc-dashboard-layout .dash-hero:has(.dash-sales-system) .dash-sales-system{
  top:44%;inset-inline:clamp(18px,1.7cqi,26px);
 }
 .kc-dashboard-layout .dash-sales-stage{height:clamp(285px,24.5cqi,440px)}
 .kc-dashboard-layout .dash-sales-stage .dash-fire-sun{width:clamp(125px,10.5cqi,180px)}
 .kc-dashboard-layout .dash-sales-banner .crm-target-banner{
  padding:7px 12px!important;
 }
 .kc-dashboard-layout .dash-sales-banner .crm-target-banner>article{
  gap:4px;padding:4px 12px!important;
 }
 .kc-dashboard-layout .dash-sales-banner .crm-target-banner strong{
  font-size:clamp(26px,2.1cqi,36px);line-height:1.2;
 }
}
