
/* V227 — Mobile KPI:
   label top-left, icon top-right, helper bottom-left, value bottom-right.
   Larger typography to match upper dashboard cards. */

@media (max-width:1100px){
  .v220-global-kpi-summary{
    gap:12px!important;
    padding:14px!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10):not(.v223-kpi-detail-wrap){
    position:relative!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:118px!important;
    padding:15px 16px!important;
    border-radius:13px!important;
    overflow:hidden!important;
  }

  /* Top-right icon */
  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child{
    position:absolute!important;
    top:14px!important;
    right:14px!important;
    left:auto!important;
    bottom:auto!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    margin:0!important;
    border-radius:11px!important;
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child svg{
    width:19px!important;
    height:19px!important;
  }

  /* Text/value container fills card */
  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:last-child{
    position:static!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }

  /* Label top-left */
  .v220-global-kpi-summary .eyebrow{
    display:block!important;
    max-width:calc(100% - 58px)!important;
    margin:0!important;
    padding:0!important;
    font-size:11px!important;
    line-height:1.3!important;
    letter-spacing:.055em!important;
    font-weight:800!important;
    white-space:normal!important;
  }

  /* Main value bottom-right */
  .v220-global-kpi-summary .stat-figure{
    position:absolute!important;
    right:15px!important;
    bottom:14px!important;
    left:auto!important;
    top:auto!important;
    width:auto!important;
    max-width:62%!important;
    margin:0!important;
    padding:0!important;
    text-align:right!important;
    font-size:clamp(21px,4.3vw,28px)!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:-.045em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }

  /* Helper text bottom-left */
  .v220-global-kpi-summary .stat-figure span{
    position:absolute!important;
    left:0!important;
    bottom:0!important;
    transform:translate(calc(-100% - 10px),0)!important;
    width:max-content!important;
    max-width:130px!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1.25!important;
    font-weight:550!important;
    letter-spacing:0!important;
    text-align:left!important;
    white-space:normal!important;
    color:var(--muted-foreground)!important;
  }

  /* If no helper span, visual balance still stays clean. */
  .v220-global-kpi-summary > div:not(.w-full):not(.h-10):not(.v223-kpi-detail-wrap)::after{
    content:"";
    position:absolute;
    left:15px;
    right:15px;
    bottom:51px;
    height:1px;
    background:linear-gradient(90deg,color-mix(in srgb,var(--border) 55%,transparent),transparent);
    pointer-events:none;
  }
}

@media (max-width:560px){
  .v220-global-kpi-summary{
    gap:9px!important;
    padding:10px!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10):not(.v223-kpi-detail-wrap){
    min-height:108px!important;
    padding:13px 14px!important;
    border-radius:11px!important;
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child{
    top:12px!important;
    right:12px!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child svg{
    width:17px!important;
    height:17px!important;
  }

  .v220-global-kpi-summary .eyebrow{
    max-width:calc(100% - 52px)!important;
    font-size:10px!important;
  }

  .v220-global-kpi-summary .stat-figure{
    right:13px!important;
    bottom:12px!important;
    max-width:64%!important;
    font-size:clamp(19px,5.2vw,25px)!important;
  }

  .v220-global-kpi-summary .stat-figure span{
    max-width:108px!important;
    font-size:8.8px!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10):not(.v223-kpi-detail-wrap)::after{
    left:13px;
    right:13px;
    bottom:47px;
  }
}
