/**
 * KPIs Pro unificados — MASTER Insights tones
 * Importante: data-tone debe ganar a #ecosistema (especificidad + !important en tokens)
 */
:root {
    --gc-kpi-blue: #60a5fa;
    --gc-kpi-teal: #2dd4bf;
    --gc-kpi-amber: #fbbf24;
    --gc-kpi-violet: #a78bfa;
    --gc-kpi-rose: #fb7185;
    --gc-kpi-indigo: #818cf8;
    --gc-kpi-master: #3b82f6;
}

.operativa-cta-kpis,
.operativa-day-kpis,
.eco-cms-kpis,
.eco-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    width: 100%;
}

.eco-stat-row {
    margin-top: 1.35rem;
    max-width: 52rem;
}

.operativa-cta-kpis li,
.operativa-day-kpis li,
.eco-cms-kpis li,
.eco-stat-row li {
    list-style: none;
    margin: 0;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Base KPI chip (button + estático lite) */
.operativa-day-kpis button.eco-stat-chip,
.operativa-day-kpis .eco-stat-chip--static,
.eco-cms-kpis button.eco-stat-chip,
.eco-cms-kpis .eco-stat-chip--static,
.eco-stat-row button.eco-stat-chip,
.eco-stat-row .eco-stat-chip--static,
#ecosistema .operativa-day-kpis button.eco-stat-chip,
#ecosistema .operativa-day-kpis .eco-stat-chip--static,
#ecosistema .eco-cms-kpis button.eco-stat-chip,
#ecosistema .eco-cms-kpis .eco-stat-chip--static,
#ecosistema .eco-stat-row button.eco-stat-chip,
#ecosistema .eco-stat-row .eco-stat-chip--static,
#ecosistema button.eco-feature-chip.eco-stat-chip,
#ecosistema .eco-feature-chip.eco-stat-chip--static {
    --eco-tone: var(--gc-kpi-master);
    --eco-glow: rgba(44, 90, 160, 0.18);
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.65rem;
    width: 100%;
    min-height: 4.35rem;
    padding: 0.8rem 0.9rem !important;
    text-align: left !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 3px solid var(--eco-tone) !important;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, var(--eco-glow), transparent 55%),
        linear-gradient(165deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 10px 22px -14px rgba(15, 23, 42, 0.28) !important;
    color: #0f172a !important;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.operativa-day-kpis .eco-stat-chip--static,
.eco-cms-kpis .eco-stat-chip--static,
.eco-stat-row .eco-stat-chip--static,
#ecosistema .eco-stat-chip--static {
    cursor: default;
}

/* Tonos Insights MASTER — claros (no navy); button + estático lite */
.operativa-day-kpis .eco-stat-chip[data-tone="blue"],
.eco-cms-kpis .eco-stat-chip[data-tone="blue"],
.eco-stat-row .eco-stat-chip[data-tone="blue"],
#ecosistema .eco-stat-chip[data-tone="blue"] {
    --eco-tone: #60a5fa !important;
    --eco-glow: rgba(96, 165, 250, 0.22) !important;
}
.operativa-day-kpis .eco-stat-chip[data-tone="teal"],
.eco-cms-kpis .eco-stat-chip[data-tone="teal"],
.eco-stat-row .eco-stat-chip[data-tone="teal"],
#ecosistema .eco-stat-chip[data-tone="teal"] {
    --eco-tone: #2dd4bf !important;
    --eco-glow: rgba(45, 212, 191, 0.22) !important;
}
.operativa-day-kpis .eco-stat-chip[data-tone="amber"],
.eco-cms-kpis .eco-stat-chip[data-tone="amber"],
.eco-stat-row .eco-stat-chip[data-tone="amber"],
#ecosistema .eco-stat-chip[data-tone="amber"] {
    --eco-tone: #fbbf24 !important;
    --eco-glow: rgba(251, 191, 36, 0.24) !important;
}
.operativa-day-kpis .eco-stat-chip[data-tone="violet"],
.eco-cms-kpis .eco-stat-chip[data-tone="violet"],
.eco-stat-row .eco-stat-chip[data-tone="violet"],
#ecosistema .eco-stat-chip[data-tone="violet"] {
    --eco-tone: #a78bfa !important;
    --eco-glow: rgba(167, 139, 250, 0.22) !important;
}
.operativa-day-kpis .eco-stat-chip[data-tone="rose"],
.eco-cms-kpis .eco-stat-chip[data-tone="rose"],
.eco-stat-row .eco-stat-chip[data-tone="rose"],
#ecosistema .eco-stat-chip[data-tone="rose"] {
    --eco-tone: #fb7185 !important;
    --eco-glow: rgba(251, 113, 133, 0.22) !important;
}
.operativa-day-kpis .eco-stat-chip[data-tone="indigo"],
.eco-cms-kpis .eco-stat-chip[data-tone="indigo"],
.eco-stat-row .eco-stat-chip[data-tone="indigo"],
#ecosistema .eco-stat-chip[data-tone="indigo"] {
    --eco-tone: #818cf8 !important;
    --eco-glow: rgba(129, 140, 248, 0.24) !important;
}

.operativa-day-kpis .eco-stat-chip-icon,
.operativa-day-kpis .eco-stat-chip-icon.gc-emoji-box,
.eco-cms-kpis .eco-stat-chip-icon,
.eco-cms-kpis .eco-stat-chip-icon.gc-emoji-box,
.eco-stat-row .eco-stat-chip-icon,
.eco-stat-row .eco-stat-chip-icon.gc-emoji-box,
#ecosistema .eco-stat-chip-icon,
#ecosistema .eco-stat-chip-icon.gc-emoji-box {
    flex: 0 0 2.35rem !important;
    flex-shrink: 0 !important;
    display: inline-grid !important;
    place-items: center;
    width: 2.35rem !important;
    height: 2.35rem !important;
    min-width: 2.35rem !important;
    max-width: 2.35rem !important;
    margin: 0 !important;
    border-radius: 12px;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--eco-tone) 28%, #e2e8f0);
    box-shadow: 0 0 0 3px var(--eco-glow);
}

.operativa-day-kpis .eco-stat-chip-text,
.eco-cms-kpis .eco-stat-chip-text,
.eco-stat-row .eco-stat-chip-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-text,
body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-text {
    align-items: center;
    overflow: visible;
}

.operativa-day-kpis .eco-stat-chip-value,
.eco-cms-kpis .eco-stat-chip-value,
.eco-stat-row .eco-stat-chip-value,
#ecosistema .eco-stat-chip-value {
    display: block !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    color: var(--eco-tone) !important;
    margin: 0 !important;
}

.operativa-day-kpis .eco-stat-chip-label,
.eco-cms-kpis .eco-stat-chip-label,
.eco-stat-row .eco-stat-chip-label,
#ecosistema .eco-stat-chip-label {
    display: block !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #64748b !important;
    margin: 0 !important;
    padding: 0.28rem 0 0 !important;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

/* Catálogo lite: título 1 línea; subtítulo contenido en la tarjeta (sin desborde) */
@media (min-width: 721px) {
    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip {
        overflow: hidden !important;
    }

    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-value,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-value {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        max-width: 100% !important;
        font-size: 0.9rem !important;
        letter-spacing: -0.02em !important;
    }

    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-label,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-label {
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        max-width: 100% !important;
        line-height: 1.25 !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
    }
}

/* Escritorio 6 cols: títulos más compactos (Finanzas, Operativa, Inventario…) */
@media (min-width: 1101px) {
    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-value,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-value,
    body.page-plataforma.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-value,
    body.page-servicios.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-value {
        font-size: 0.78rem !important;
        letter-spacing: -0.03em !important;
        line-height: 1.15 !important;
    }

    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-label,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-label,
    body.page-plataforma.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip-label,
    body.page-servicios.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip-label {
        font-size: 0.62rem !important;
    }

    body.gc-content-lite #ecosistema.master-platform--plat-catalog .eco-stat-chip,
    body.gc-content-lite #ecosistema.master-platform--svc-catalog .eco-stat-chip {
        padding-left: 0.28rem !important;
        padding-right: 0.28rem !important;
    }
}

.operativa-day-kpis button.eco-stat-chip:hover,
.operativa-day-kpis button.eco-stat-chip:focus-visible,
.eco-cms-kpis button.eco-stat-chip:hover,
.eco-cms-kpis button.eco-stat-chip:focus-visible,
.eco-stat-row button.eco-stat-chip:hover,
.eco-stat-row button.eco-stat-chip:focus-visible,
#ecosistema button.eco-stat-chip:hover,
#ecosistema button.eco-stat-chip:focus-visible {
    transform: translateY(-3px);
    border-color: var(--eco-tone) !important;
    box-shadow: 0 14px 28px -12px var(--eco-glow) !important;
    outline: none;
}

/* Benefit / device tones */
.menu-benefit-card[data-tone] {
    --bf-tone: var(--gc-kpi-master);
    --bf-glow: rgba(44, 90, 160, 0.14);
    border-top: 3px solid var(--bf-tone);
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, var(--bf-glow), transparent 55%),
        linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}
.menu-benefit-card[data-tone="blue"] { --bf-tone: #60a5fa; --bf-glow: rgba(96, 165, 250, 0.16); }
.menu-benefit-card[data-tone="teal"] { --bf-tone: #2dd4bf; --bf-glow: rgba(45, 212, 191, 0.16); }
.menu-benefit-card[data-tone="amber"] { --bf-tone: #fbbf24; --bf-glow: rgba(251, 191, 36, 0.18); }
.menu-benefit-card[data-tone="violet"] { --bf-tone: #a78bfa; --bf-glow: rgba(167, 139, 250, 0.16); }
.menu-benefit-card[data-tone="rose"] { --bf-tone: #fb7185; --bf-glow: rgba(251, 113, 133, 0.14); }
.menu-benefit-card[data-tone="indigo"] { --bf-tone: #818cf8; --bf-glow: rgba(129, 140, 248, 0.16); }
.menu-benefit-card[data-tone]:hover { border-color: var(--bf-tone); box-shadow: 0 16px 36px -14px var(--bf-glow); }
.menu-benefit-card[data-tone] .operativa-benefit-cta { color: var(--bf-tone); }

.device-card[data-tone] {
    --dv-tone: var(--gc-kpi-master);
    --dv-glow: rgba(44, 90, 160, 0.14);
    border-top: 3px solid var(--dv-tone);
    background:
        radial-gradient(ellipse 80% 45% at 50% 0%, var(--dv-glow), transparent 55%),
        #ffffff;
}
.device-card[data-tone="blue"] { --dv-tone: #60a5fa; --dv-glow: rgba(96, 165, 250, 0.14); }
.device-card[data-tone="teal"] { --dv-tone: #2dd4bf; --dv-glow: rgba(45, 212, 191, 0.14); }
.device-card[data-tone="amber"] { --dv-tone: #fbbf24; --dv-glow: rgba(251, 191, 36, 0.16); }
.device-card[data-tone="violet"] { --dv-tone: #a78bfa; --dv-glow: rgba(167, 139, 250, 0.14); }
.device-card[data-tone="rose"] { --dv-tone: #fb7185; --dv-glow: rgba(251, 113, 133, 0.14); }
.device-card[data-tone="indigo"] { --dv-tone: #818cf8; --dv-glow: rgba(129, 140, 248, 0.14); }
.device-card[data-tone]:hover { border-color: var(--dv-tone); box-shadow: 0 18px 40px -16px var(--dv-glow); }

.operativa-day-card { margin: 0 auto 0.5rem; }
.section-operativa-day { padding-top: 0.5rem; padding-bottom: 2rem; border-top: none; }
.operativa-day-lead {
    margin: 0 auto 1rem;
    max-width: 42rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: #475569;
}
.operativa-day-more-label {
    margin: 1.15rem 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    text-align: center;
}
.operativa-resource-chip {
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    padding: 0.52rem 1.05rem;
    font-size: 0.84rem;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto !important;
}
.operativa-resource-chip:hover,
.operativa-resource-chip:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.03);
    outline: none;
}
.operativa-day-extras {
    margin: 0 0 0.25rem;
}
.web-management-card[data-tone="amber"] {
    border-top: 3px solid #fbbf24;
    border-color: rgba(217, 119, 6, 0.35);
}

/* Flash al saltar al ecosistema cliente/gerente */
#master-audience-grid.eco-target-flash,
.master-audience-card.eco-target-flash {
    outline: 2px solid #60a5fa;
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2);
    transition: outline 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 900px) {
    .operativa-cta-kpis,
    .operativa-day-kpis,
    .eco-cms-kpis,
    .eco-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .operativa-cta-kpis,
    .operativa-day-kpis,
    .eco-cms-kpis,
    .eco-stat-row {
        grid-template-columns: 1fr;
    }
}
