/* HENDAR UALL-V88 — desktop executive KPI-grid recovery.
 * V87 introduced a 1201–1760px three-column rule which turned Windows
 * desktop viewports (including 2048px displays at 125% scaling) into a 3x2
 * wall of oversized square cards. Restore one six-card RTL row and decouple
 * card height from column width so an expanded sidebar cannot inflate or
 * collapse the vertical content bands.
 */

@media(min-width:1201px){
  #dashboardView #metricsGrid.hendar-v81-kpi-grid{
    --hendar-v88-head-top:22px;
    --hendar-v88-head-inline:18px;
    --hendar-v88-head-height:52px;
    --hendar-v88-head-start-pad:62px;
    --hendar-v88-icon-size:52px;
    --hendar-v88-icon-radius:15px;
    --hendar-v88-icon-svg:25px;
    --hendar-v88-title-size:clamp(13px,.92vw,18px);
    --hendar-v88-currency-size:11px;
    --hendar-v88-stage-inline:18px;
    --hendar-v88-stage-bottom:52px;
    --hendar-v88-stage-height:88px;
    --hendar-v88-stage-columns:minmax(0,1fr) 58px;
    --hendar-v88-stage-gap:10px;
    --hendar-v88-money-size:clamp(17px,1.18vw,23px);
    --hendar-v88-money-spacing:-.045em;
    --hendar-v88-count-size:clamp(34px,2.45vw,46px);
    --hendar-v88-foot-inline:18px;
    --hendar-v88-foot-bottom:10px;
    --hendar-v88-foot-height:36px;
    --hendar-v88-foot-top-pad:7px;
    --hendar-v88-foot-size:13px;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    grid-auto-rows:auto!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    gap:10px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    direction:rtl!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid>.hendar-v81-kpi-shell{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:clamp(176px,15.5vw,316px)!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    margin:0!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-head{
    inset:var(--hendar-v88-head-top) var(--hendar-v88-head-inline) auto!important;
    height:var(--hendar-v88-head-height)!important;
    min-height:var(--hendar-v88-head-height)!important;
    padding:2px 0 0 var(--hendar-v88-head-start-pad)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-icon{
    width:var(--hendar-v88-icon-size)!important;
    height:var(--hendar-v88-icon-size)!important;
    border-radius:var(--hendar-v88-icon-radius)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-icon svg{
    width:var(--hendar-v88-icon-svg)!important;
    height:var(--hendar-v88-icon-svg)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-title{
    font-size:var(--hendar-v88-title-size)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-currency{
    font-size:var(--hendar-v88-currency-size)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v84-kpi-stage{
    inset:auto var(--hendar-v88-stage-inline) var(--hendar-v88-stage-bottom)!important;
    grid-template-columns:var(--hendar-v88-stage-columns)!important;
    gap:var(--hendar-v88-stage-gap)!important;
    height:var(--hendar-v88-stage-height)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid :is(.hendar-v81-kpi-contract,.hendar-v81-kpi-finance) .hendar-v84-kpi-stage{
    grid-template-columns:minmax(0,1fr)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid :is(.hendar-v81-kpi-contract,.hendar-v81-kpi-finance) .hendar-v81-kpi-value{
    font-size:var(--hendar-v88-money-size)!important;
    letter-spacing:var(--hendar-v88-money-spacing)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-count{
    font-size:var(--hendar-v88-count-size)!important;
  }

  #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-foot{
    inset:auto var(--hendar-v88-foot-inline) var(--hendar-v88-foot-bottom)!important;
    min-height:var(--hendar-v88-foot-height)!important;
    padding-top:var(--hendar-v88-foot-top-pad)!important;
    font-size:var(--hendar-v88-foot-size)!important;
  }
}

/* The full 276px sidebar reduces the card's inline budget sooner than the
 * collapsed 92px rail. Both states therefore switch bands independently. */
@media(min-width:1201px) and (max-width:1720px){
  .app-shell:not(.sidebar-collapsed) #dashboardView #metricsGrid.hendar-v81-kpi-grid{
    --hendar-v88-head-top:12px;
    --hendar-v88-head-inline:12px;
    --hendar-v88-head-height:34px;
    --hendar-v88-head-start-pad:40px;
    --hendar-v88-icon-size:34px;
    --hendar-v88-icon-radius:11px;
    --hendar-v88-icon-svg:17px;
    --hendar-v88-title-size:12px;
    --hendar-v88-currency-size:9px;
    --hendar-v88-stage-inline:12px;
    --hendar-v88-stage-bottom:43px;
    --hendar-v88-stage-height:64px;
    --hendar-v88-stage-columns:minmax(0,1fr) 48px;
    --hendar-v88-stage-gap:6px;
    --hendar-v88-money-size:clamp(10.5px,.9vw,14px);
    --hendar-v88-money-spacing:-.05em;
    --hendar-v88-count-size:clamp(25px,2.5vw,36px);
    --hendar-v88-foot-inline:12px;
    --hendar-v88-foot-bottom:8px;
    --hendar-v88-foot-height:25px;
    --hendar-v88-foot-top-pad:6px;
    --hendar-v88-foot-size:11px;
  }
}

@media(min-width:1201px) and (max-width:1550px){
  .app-shell.sidebar-collapsed #dashboardView #metricsGrid.hendar-v81-kpi-grid{
    --hendar-v88-head-top:12px;
    --hendar-v88-head-inline:12px;
    --hendar-v88-head-height:34px;
    --hendar-v88-head-start-pad:40px;
    --hendar-v88-icon-size:34px;
    --hendar-v88-icon-radius:11px;
    --hendar-v88-icon-svg:17px;
    --hendar-v88-title-size:12px;
    --hendar-v88-currency-size:9px;
    --hendar-v88-stage-inline:12px;
    --hendar-v88-stage-bottom:43px;
    --hendar-v88-stage-height:64px;
    --hendar-v88-stage-columns:minmax(0,1fr) 48px;
    --hendar-v88-stage-gap:6px;
    --hendar-v88-money-size:clamp(10.5px,.9vw,14px);
    --hendar-v88-money-spacing:-.05em;
    --hendar-v88-count-size:clamp(25px,2.5vw,36px);
    --hendar-v88-foot-inline:12px;
    --hendar-v88-foot-bottom:8px;
    --hendar-v88-foot-height:25px;
    --hendar-v88-foot-top-pad:6px;
    --hendar-v88-foot-size:11px;
  }
}

/* Only the secondary footer label is suppressed in the physically narrowest
 * six-card case; primary meaning, title, value and icon remain present. */
@media(min-width:1201px) and (max-width:1320px){
  .app-shell:not(.sidebar-collapsed) #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-foot{
    justify-content:flex-end!important;
    gap:3px!important;
    font-size:10px!important;
  }
  .app-shell:not(.sidebar-collapsed) #dashboardView #metricsGrid.hendar-v81-kpi-grid .hendar-v81-kpi-foot span:last-child{
    display:none!important;
  }
}
