
/* V221 — Professional global KPI summary + mobile copyright.
   Visual-only; no KPI formulas or data logic changed. */

/* Professional container */
.v220-global-kpi-summary{
  position:relative;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--brand-green) 16%,var(--border))!important;
  background:
    radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--brand-green) 8%,transparent),transparent 34%),
    linear-gradient(180deg,color-mix(in srgb,var(--background) 98%,var(--muted)),var(--background))!important;
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 10px 30px rgba(15,23,42,.055)!important;
}

.v220-global-kpi-summary::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:4px;
  background:linear-gradient(180deg,var(--brand-green),color-mix(in srgb,var(--amber-brand) 70%,var(--brand-green)));
}

/* Heading block */
.v220-global-kpi-summary > .w-full{
  position:relative;
  padding:1px 0 10px 2px;
  border-bottom:1px solid color-mix(in srgb,var(--border) 78%,transparent);
}

.v220-global-kpi-summary > .w-full > div:first-child{
  font-size:10px!important;
  letter-spacing:.14em!important;
  color:var(--brand-green)!important;
}

.v220-global-kpi-summary > .w-full > div:last-child{
  margin-top:3px!important;
  font-size:11px!important;
  line-height:1.45!important;
}

/* KPI items */
.v220-global-kpi-summary > div:not(.w-full):not(.h-10){
  position:relative;
  min-width:0;
}

.v220-global-kpi-summary .eyebrow{
  font-weight:800!important;
  letter-spacing:.08em!important;
  color:var(--muted-foreground);
}

.v220-global-kpi-summary .stat-figure{
  font-weight:800!important;
  letter-spacing:-.035em!important;
  color:var(--foreground);
}

/* Desktop: 3 distinct KPI cards inside the summary */
@media (min-width:1101px){
  .v220-global-kpi-summary{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
    padding:18px!important;
  }

  .v220-global-kpi-summary > .w-full{
    grid-column:1/-1!important;
  }

  .v220-global-kpi-summary > .h-10.w-px{
    display:none!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10){
    width:100%!important;
    margin:0!important;
    min-height:112px;
    padding:14px 15px;
    border:1px solid color-mix(in srgb,var(--border) 82%,transparent);
    border-radius:12px;
    background:color-mix(in srgb,var(--background) 96%,var(--muted));
    box-shadow:0 1px 2px rgba(15,23,42,.025);
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3{
    display:flex!important;
    align-items:flex-start!important;
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child{
    width:42px!important;
    height:42px!important;
    flex:0 0 42px!important;
    border-radius:11px!important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand-green) 10%,transparent);
  }

  .v220-global-kpi-summary .stat-figure{
    margin-top:5px;
    font-size:23px!important;
    line-height:1.15!important;
  }
}

/* Mobile/tablet: 3 KPI cards on one row */
@media (max-width:1100px){
  .v220-global-kpi-summary{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    padding:12px!important;
    align-items:stretch!important;
  }

  .v220-global-kpi-summary > .w-full{
    grid-column:1/-1!important;
    padding-bottom:8px!important;
  }

  .v220-global-kpi-summary > .h-10.w-px{
    display:none!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10){
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    min-height:92px;
    padding:9px 8px;
    border:1px solid color-mix(in srgb,var(--border) 82%,transparent);
    border-radius:10px;
    background:color-mix(in srgb,var(--background) 97%,var(--muted));
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3{
    display:block!important;
  }

  .v220-global-kpi-summary > div.flex.items-center.gap-3 > div:first-child{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    margin-bottom:6px!important;
    border-radius:8px!important;
  }

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

  .v220-global-kpi-summary .eyebrow{
    font-size:8px!important;
    line-height:1.2!important;
    letter-spacing:.045em!important;
    white-space:normal!important;
  }

  .v220-global-kpi-summary .stat-figure{
    margin-top:4px!important;
    font-size:clamp(12px,2.25vw,17px)!important;
    line-height:1.12!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }

  .v220-global-kpi-summary .stat-figure span{
    display:none!important;
  }
}

/* Very small phones: preserve one row but tighten intelligently */
@media (max-width:560px){
  .v220-global-kpi-summary{
    gap:5px!important;
    padding:9px!important;
  }

  .v220-global-kpi-summary > div:not(.w-full):not(.h-10){
    min-height:84px;
    padding:8px 6px;
    border-radius:9px;
  }

  .v220-global-kpi-summary .eyebrow{
    font-size:7.2px!important;
  }

  .v220-global-kpi-summary .stat-figure{
    font-size:clamp(10.5px,3vw,14px)!important;
  }
}

/* Mobile-only copyright footer */
.v221-mobile-copyright{
  display:none;
}

@media (max-width:1100px){
  .v221-mobile-copyright{
    display:block!important;
    width:100%;
    margin:2px 0 16px;
    padding:12px 10px 4px;
    border-top:1px solid color-mix(in srgb,var(--border) 76%,transparent);
    text-align:center;
    font-size:10.5px;
    line-height:1.5;
    font-weight:600;
    letter-spacing:.025em;
    color:var(--muted-foreground);
  }
}
