/* ============================================================
   Panel de distribuidores y checkout de Firmas con el lenguaje visual de los portales de Ecountia (copiado de
   panel-facturacion.css del facturador; mantener ambos alineados), igual que el panel de FirmaTransaccional: menú lateral oscuro, títulos en Red Hat Display, tarjetas de 24 px, botones con esquinas de 12 px e insignias
   sólidas. En los componentes solo dos colores: navy (#0a1533) y cian (#00c2cc); el azul de marca queda como brillo
   de fondo. Fondos y textos siguen los tokens semánticos (tema claro y oscuro).
   ============================================================ */

.fx, .fx-sus {
    --fx-oscuro: #0a1533;
    --fx-oscuro-hover: #162d69;
    --fx-cian: #00c2cc;
    --fx-cian-hover: #33d0d6;
    --fx-cian-texto: #00747a;
    --fx-ambar: #f5a524;
    --fx-rojo: #d93636;
    --fx-radio: 24px;
    --fx-lateral: 264px;
    --color-titulo: var(--fx-oscuro);
    /* Títulos de app_firmas.css (ds-card__title, fe-*): en navy y no en el azul de marca. */
    --fe-heading: var(--color-titulo);

    /* La escala "primary" del design system se deriva del navy: títulos, botones, enlaces y selecciones quedan en
       navy, sin el azul intermedio. */
    --primary-50: color-mix(in srgb, #0a1533, white 93%);
    --primary-100: color-mix(in srgb, #0a1533, white 84%);
    --primary-200: color-mix(in srgb, #0a1533, white 66%);
    --primary-300: color-mix(in srgb, #0a1533, white 48%);
    --primary-400: color-mix(in srgb, #0a1533, white 28%);
    --primary-500: #0a1533;
    --primary-600: #0a1533;
    --primary-700: color-mix(in srgb, #0a1533, black 15%);
    /* Los tokens semánticos se resuelven en :root con el azul; aquí se vuelven a declarar en navy y cian. */
    --text-accent: #0a1533;
    --border-focus: #00c2cc;
    --btn-primary-bg: #0a1533;
    --btn-primary-bg-hover: #162d69;
    --state-info-bg: color-mix(in srgb, #0a1533, white 93%);
    --state-info-text: #0a1533;
    --state-info-border: color-mix(in srgb, #0a1533, white 84%);

    font-family: var(--f-texto);
}
.fx {
    display: grid;
    grid-template-columns: var(--fx-lateral) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bg-page);
}
html[data-theme="dark"] :is(.fx, .fx-sus) { --color-titulo: var(--text-primary); --primary-200: var(--accent-300); --primary-300: var(--accent-400); --text-accent: var(--accent-400); --state-info-bg: rgba(0,194,204,0.1); --state-info-text: var(--accent-300); --state-info-border: rgba(0,194,204,0.3); }

.fx h1, .fx h2, .fx h3 { font-family: var(--f-display); letter-spacing: -0.02em; }

/* ---------- Menú lateral ---------- */
.fx__lateral {
    position: sticky; top: 0; height: 100vh; z-index: 60;
    display: flex; flex-direction: column; gap: 18px; padding: 22px 16px;
    overflow-x: hidden; overflow-y: auto; isolation: isolate;
    background: var(--fx-oscuro); color: #ffffff;
    scrollbar-width: none; /* sin barra propia: se desplaza con la rueda o el dedo */
}
.fx__lateral::-webkit-scrollbar { display: none; }
.fx__lateral::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.2px, transparent 1.2px); background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 60%); mask-image: linear-gradient(to bottom, #000, transparent 60%);
}
.fx__lateral::after {
    content: ""; position: absolute; z-index: -1; width: 320px; height: 320px; left: -160px; bottom: -120px; border-radius: 50%;
    background: #2e53b7; opacity: .4; filter: blur(80px); pointer-events: none;
}

.fx__marca { display: flex; align-items: center; gap: 12px; padding: 4px 8px 6px; color: #ffffff; text-decoration: none; }
.fx__marca:hover { color: #ffffff; text-decoration: none; }
.fx__marca img { width: 38px; height: 38px; flex: none; }
.fx__marca strong { display: block; font: 700 17px var(--f-display); letter-spacing: -0.01em; }
.fx__marca small { display: block; font-size: 12px; color: rgba(255,255,255,0.6); }

.fx__emitir {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px;
    background: var(--fx-cian); color: var(--fx-oscuro); font-weight: 700; font-size: 14.5px; text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.fx__emitir:hover, .fx__emitir.active { color: var(--fx-oscuro); text-decoration: none; }

.fx__nav { display: flex; flex-direction: column; gap: 2px; }
.fx__seccion { margin: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.fx__enlace {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
    color: rgba(255,255,255,0.72); font-size: 14.5px; text-decoration: none; transition: background .2s ease, color .2s ease;
}
.fx__enlace i { font-size: 17px; transition: color .2s ease; }
.fx__enlace:hover { color: #ffffff; text-decoration: none; }
.fx__enlace.is-active { background: color-mix(in srgb, var(--fx-cian) 16%, transparent); color: #ffffff; font-weight: 600; }
.fx__enlace.is-active i { color: var(--fx-cian); }

.fx__ayuda { margin-top: auto; padding: 16px; border-radius: 18px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); }
.fx__ayuda span { display: block; font-size: 12px; color: rgba(255,255,255,0.65); }
.fx__ayuda strong { display: block; margin-top: 4px; font: 600 14px var(--f-display); }
.fx__ayuda a { margin-top: 12px; display: flex; justify-content: center; align-items: center; gap: 8px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25); color: #ffffff; font-size: 13px; font-weight: 600; text-decoration: none; }
.fx__ayuda a:hover { color: #ffffff; text-decoration: none; }

.fx__velo { display: none; }

/* ---------- Barra superior ---------- */
.fx__principal { min-width: 0; display: flex; flex-direction: column; }
.fx__barra {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px;
    padding: 12px 32px; border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-page) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.fx__toggle { display: none; width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: 20px; cursor: pointer; }
.fx__empresa { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.fx__empresa div { min-width: 0; }
.fx__empresa strong { display: block; font: 700 15px var(--f-display); color: var(--color-titulo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx__empresa small { display: block; font-size: 12px; color: var(--text-secondary); }
.fx__avatar { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--fx-oscuro); color: var(--fx-cian); font: 700 13px var(--f-display); }
.fx .fx__salir { color: var(--text-secondary); }

/* ---------- Contenido ---------- */
.fx .panel-shell { width: 100%; max-width: 1200px; min-height: 0; margin: 0 auto; padding: 32px; background: transparent; }

.fx .panel-hero { margin-bottom: 4px; flex-wrap: wrap; }
.fx .panel-hero__greeting { margin: 0; font: 700 clamp(26px, 3vw, 34px)/1.15 var(--f-display); letter-spacing: -0.02em; color: var(--color-titulo); }
.fx .panel-hero__date { margin: 6px 0 0; font-size: 14px; color: var(--text-secondary); text-transform: none; }
.fx .panel-hero__date::first-letter { text-transform: uppercase; }

.fx .ds-card { border-radius: var(--fx-radio); box-shadow: none; }
.fx .ds-btn, .fx-sus .ds-btn { border-radius: 12px; }
.fx .ds-btn--primary { background: var(--fx-oscuro); border-color: var(--fx-oscuro); color: #ffffff; }
.fx .ds-btn--sm, .fx-sus .ds-btn--sm { border-radius: 10px; }
.fx .ds-input, .fx .ds-select, .fx .ds-textarea, .fx .form-control, .fx .form-select { border-radius: 12px; }
.fx .ds-input:focus, .fx .ds-select:focus, .fx .ds-textarea:focus, .fx .form-control:focus {
    border-color: var(--fx-cian); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fx-cian) 20%, transparent);
}
.fx .ds-alert { border-radius: 16px; }
.fx .ds-tabs { gap: 8px; border-bottom: 0; flex-wrap: wrap; }
.fx .ds-tab { height: 36px; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); font-weight: 600; }
.fx .ds-tab::after { display: none; }
.fx .ds-tab.is-active { background: var(--fx-oscuro); border-color: var(--fx-oscuro); color: #ffffff; }
.fx .ds-table-wrap { border-radius: var(--fx-radio); }
.fx .ds-card > .ds-table-wrap { border-radius: 0; }
.fx .ds-table thead th { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }

/* Insignias sólidas, con texto de alto contraste (nada de fondos pastel). */
.fx .ds-badge { border: 0; border-radius: 999px; padding: 4px 11px; font-weight: 700; background: var(--fx-oscuro); color: #ffffff; }
.fx .ds-badge--success, .fx .ds-badge--accent { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx .ds-badge--warning { background: var(--fx-ambar); color: #0a1533; }
.fx .ds-badge--danger { background: var(--fx-rojo); color: #ffffff; }
.fx .ds-badge--info { background: var(--fx-oscuro); color: #ffffff; }

/* ---------- Inicio: tarjetas de acceso ---------- */
.fx .menu-macro-grid { gap: 16px; }
.fx .menu-macro-card { border-radius: var(--fx-radio); border: 1px solid var(--border); box-shadow: none; min-height: 190px; padding: 24px; }
.fx .menu-macro-card__icon { width: 52px; height: 52px; border-radius: 16px; background: var(--fx-oscuro); color: var(--fx-cian); font-size: 22px; }
.fx .menu-macro-card:hover .menu-macro-card__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx .menu-macro-card__title { font: 700 18px/1.2 var(--f-display); letter-spacing: -0.01em; color: var(--color-titulo); }
.fx .menu-macro-card__arrow { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-subtle); font-size: 15px; opacity: 1; transform: none; }
.fx .menu-macro-card:hover .menu-macro-card__arrow { background: var(--fx-oscuro); color: var(--fx-cian); }
/* La primera tarjeta (Emitir factura) va destacada en navy, como en la landing. */
.fx .menu-macro-card:first-child { background: var(--fx-oscuro); border-color: var(--fx-oscuro); overflow: hidden; }
.fx .menu-macro-card:first-child::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; bottom: -120px; border-radius: 50%; background: #2e53b7; opacity: .55; filter: blur(60px); pointer-events: none; }
.fx .menu-macro-card:first-child .menu-macro-card__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx .menu-macro-card:first-child .menu-macro-card__title { color: #ffffff; }
.fx .menu-macro-card:first-child .menu-macro-card__desc { color: #c4cdda; }
.fx .menu-macro-card:first-child .menu-macro-card__arrow { background: rgba(255,255,255,0.1); color: #ffffff; }

/* Cómo funciona: tarjeta navy con números en cian. */
.fx .panel-steps { position: relative; overflow: hidden; margin-top: 8px; padding: 28px; border-radius: var(--fx-radio); background: var(--fx-oscuro); color: #ffffff; }
.fx .panel-steps::after { content: ""; position: absolute; width: 320px; height: 320px; right: -100px; top: -160px; border-radius: 50%; background: var(--fx-cian); opacity: .18; filter: blur(80px); pointer-events: none; }
.fx .panel-steps__title { position: relative; margin: 0 0 20px; font: 700 20px var(--f-display); color: #ffffff; }
.fx .panel-steps__list { position: relative; }
.fx .panel-step__num { width: 32px; height: 32px; background: var(--fx-cian); color: var(--fx-oscuro); font-weight: 700; }
.fx .panel-step__title { color: #ffffff; font-weight: 600; }
.fx .panel-step__desc { color: #c4cdda; }
.fx .panel-foot { margin-top: 8px; }
.fx .panel-foot a { color: var(--fx-cian-texto); font-weight: 600; }

/* ---------- Hover solo con mouse ---------- */
@media (hover: hover) and (pointer: fine) {
    .fx__emitir:hover { background: var(--fx-cian-hover); transform: translateY(-1px); }
    .fx__enlace:hover { background: rgba(255,255,255,0.06); }
    .fx__ayuda a:hover { background: rgba(255,255,255,0.08); }
    .fx .ds-btn--primary:hover:not(:disabled) { background: var(--fx-oscuro-hover); border-color: var(--fx-oscuro-hover); }
    .fx .menu-macro-card:hover { border-color: var(--fx-cian); transform: translateY(-4px); box-shadow: 0 30px 50px -30px rgba(10,21,51,0.45); }
}

/* ---------- Tema oscuro ---------- */
html[data-theme="dark"] .fx .panel-shell .ds-btn--primary { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
html[data-theme="dark"] .fx .ds-tab.is-active { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
html[data-theme="dark"] .fx .ds-badge--info, html[data-theme="dark"] .fx .ds-badge:not([class*="ds-badge--"]) { background: #ffffff; color: var(--fx-oscuro); }
html[data-theme="dark"] .fx .menu-macro-card:first-child { border-color: var(--border); }
html[data-theme="dark"] .fx .panel-foot a { color: var(--fx-cian); }
html[data-theme="dark"] .fx .fx__avatar { background: var(--fx-cian); color: var(--fx-oscuro); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) :is(.fx, .fx-sus) { --color-titulo: var(--text-primary); --primary-200: var(--accent-300); --primary-300: var(--accent-400); --text-accent: var(--accent-400); --state-info-bg: rgba(0,194,204,0.1); --state-info-text: var(--accent-300); --state-info-border: rgba(0,194,204,0.3); }
    html:not([data-theme="light"]) .fx .panel-shell .ds-btn--primary { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
    html:not([data-theme="light"]) .fx .ds-tab.is-active { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
    html:not([data-theme="light"]) .fx .ds-badge--info, html:not([data-theme="light"]) .fx .ds-badge:not([class*="ds-badge--"]) { background: #ffffff; color: var(--fx-oscuro); }
    html:not([data-theme="light"]) .fx .menu-macro-card:first-child { border-color: var(--border); }
    html:not([data-theme="light"]) .fx .panel-foot a { color: var(--fx-cian); }
    html:not([data-theme="light"]) .fx .fx__avatar { background: var(--fx-cian); color: var(--fx-oscuro); }
}

/* ---------- Celular y tableta: el menú lateral se abre como cajón ---------- */
@media (max-width: 1024px) {
    .fx { grid-template-columns: minmax(0, 1fr); }
    .fx__lateral { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .35s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 60px -10px rgba(0,0,0,0.5); }
    .fx.is-menu-abierto .fx__lateral { transform: none; }
    .fx__velo { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10,21,51,0.5); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
    .fx.is-menu-abierto .fx__velo { opacity: 1; visibility: visible; transition: opacity .3s ease; }
    .fx__toggle { display: grid; place-items: center; }
    .fx__barra { padding: 10px 16px; }
    .fx .panel-shell { padding: 24px; }
    .fx .panel-vigencia { padding: 0 24px; }
}
@media (max-width: 560px) {
    .fx .panel-shell { padding: 20px 16px; }
    .fx .panel-vigencia { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .fx__lateral, .fx__velo { transition: none; }
}

/* ============================================================
   Suscripción (5 pasos): barra navy con el logo blanco y tarjetas con el mismo lenguaje del panel.
   ============================================================ */
.fx-sus { min-height: 100vh; background: var(--bg-page); }
.fx-sus h1, .fx-sus h2, .fx-sus h3, .fx-sus .checkout-section__title, .fx-sus .landing-precio-card__vigencia { font-family: var(--f-display); letter-spacing: -0.02em; }
.fx-sus .panel-header--checkout { position: sticky; top: 0; background: var(--fx-oscuro); box-shadow: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
.fx-sus .panel-header--checkout .ds-theme-img--light { display: none !important; }
.fx-sus .panel-header--checkout .ds-theme-img--dark { display: block !important; }
.fx-sus .panel-header--checkout .panel-header__title { font-family: var(--f-display); color: #ffffff; }
.fx-sus .panel-header--checkout .panel-header__meta, .fx-sus .panel-header--checkout .panel-header__sep { color: rgba(255,255,255,0.65); }
.fx-sus .panel-header--checkout .ds-btn--ghost { color: #ffffff; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; }
.fx-sus .panel-header--checkout .ds-btn--ghost:hover { background: rgba(255,255,255,0.08); color: #ffffff; }

.fx-sus .checkout-card { border-radius: 28px; box-shadow: none; }
.fx-sus .ds-card { border-radius: var(--fx-radio); box-shadow: none; }
.fx-sus .ds-btn--primary { background: var(--fx-oscuro); border-color: var(--fx-oscuro); color: #ffffff; }
.fx-sus .ds-input, .fx-sus .ds-select { border-radius: 12px; }
.fx-sus .ds-input:focus, .fx-sus .ds-select:focus { border-color: var(--fx-cian); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fx-cian) 20%, transparent); }
.fx-sus .ds-alert { border-radius: 16px; }
.fx-sus .checkout-section__icon, .fx-sus .landing-precio-card .landing-precio-card__icon,
.fx-sus .landing-precio-card.is-popular .landing-precio-card__icon, .fx-sus .landing-precio-card:hover .landing-precio-card__icon,
.fx-sus .checkout-loading__icon { border-radius: 16px; background: var(--fx-oscuro); color: var(--fx-cian); }
.fx-sus .landing-precio-card__icon i, .fx-sus .checkout-section__icon i { color: var(--fx-cian); }

/* Tarjetas de plan: borde y anillo cian al elegir, precio en Red Hat Display navy, insignia sólida. */
.fx-sus .landing-precio-card { border-radius: var(--fx-radio); box-shadow: none; }
.fx-sus .landing-precio-card.is-selected, .fx-sus .checkout-metodo.is-selected { border-color: var(--fx-cian) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--fx-cian) 22%, transparent); }
.fx-sus .landing-precio-card .landing-precio-card__amount, .fx-sus .landing-precio-card .landing-precio-card__currency { font-family: var(--f-display); color: var(--color-titulo); background: none; -webkit-text-fill-color: currentColor; }
.fx-sus .checkout-vigencia__badge { background: var(--fx-cian); color: var(--fx-oscuro); border: 0; font-weight: 700; box-shadow: none; }
.fx-sus .checkout-vigencia__iva { color: var(--fx-cian-texto); }
.fx-sus .sus-plan-check { background: var(--fx-cian); color: var(--fx-oscuro); border-color: var(--fx-cian); }
.fx-sus .sus-plan-feats i { color: var(--fx-cian-texto); }
.fx-sus .checkout-metodo { border-radius: 18px; }

@media (hover: hover) and (pointer: fine) {
    .fx-sus .ds-btn--primary:hover:not(:disabled) { background: var(--fx-oscuro-hover); border-color: var(--fx-oscuro-hover); }
}
html[data-theme="dark"] .fx-sus .ds-btn--primary { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
html[data-theme="dark"] .fx-sus :is(.checkout-section__icon, .landing-precio-card__icon, .checkout-loading__icon) { box-shadow: inset 0 0 0 1px rgba(0,194,204,0.35); }
html[data-theme="dark"] .fx-sus .checkout-vigencia__iva, html[data-theme="dark"] .fx-sus .sus-plan-feats i { color: var(--fx-cian); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .fx-sus .ds-btn--primary { background: var(--fx-cian); border-color: var(--fx-cian); color: var(--fx-oscuro); }
    html:not([data-theme="light"]) .fx-sus :is(.checkout-section__icon, .landing-precio-card__icon, .checkout-loading__icon) { box-shadow: inset 0 0 0 1px rgba(0,194,204,0.35); }
    html:not([data-theme="light"]) .fx-sus .checkout-vigencia__iva, html:not([data-theme="light"]) .fx-sus .sus-plan-feats i { color: var(--fx-cian); }
}


/* ============================================================
   Propio del panel de distribuidores de Firmas
   ============================================================ */

/* La cabecera de cada pantalla (panel-header) es la barra superior: sin logo (ya está en el menú lateral). */
.fx .panel-header {
    position: sticky; top: 0; z-index: 50; box-shadow: none; border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-page) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.fx .panel-header__inner { max-width: none; padding: 12px 32px; }
.fx .panel-header__logo { display: none !important; }
.fx .panel-header__title { font: 700 18px/1.25 var(--f-display); letter-spacing: -0.01em; color: var(--color-titulo); }
.fx .panel-header__meta { color: var(--text-secondary); }
.fx .panel-header .ds-btn--ghost { border: 1px solid var(--border); color: var(--text-primary); }

/* Cerrar sesión en la tarjeta de ayuda del menú lateral */
.fx__salir-lateral { margin-top: 8px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: rgba(255,255,255,0.7); font: 600 13px var(--f-texto); cursor: pointer; }
.fx__salir-lateral:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
.fx__ayuda > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tarjetas del panel */
.fx .panel-card, .fx .menu-micro-card, .fx .menu-macro-kpi, .fx .menu-micro-saldo, .fx .firma-card { border-radius: var(--fx-radio); box-shadow: none; }
.fx .menu-micro-card__icon, .fx .menu-macro-kpi__icon { border-radius: 14px; background: var(--fx-oscuro); color: var(--fx-cian); }
.fx .menu-micro-card:hover .menu-micro-card__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx .menu-micro-card__title, .fx .menu-macro-kpi__value, .fx .menu-micro-saldo__value { font-family: var(--f-display); color: var(--color-titulo); }
.fx .menu-micro-card { border: 1px solid var(--border); }
/* KPI con pendientes: borde ámbar e ícono sólido, sin fondo pastel. */
.fx .menu-macro-kpi.is-active { background: var(--bg-card); border-color: color-mix(in srgb, var(--fx-ambar) 60%, var(--border)); }
.fx .menu-macro-kpi.is-active .menu-macro-kpi__icon { background: var(--fx-ambar); color: #0a1533; }
/* Primera tarjeta del inicio (Realizar solicitud) destacada en navy, como en facturación. */
.fx .menu-micro-card:first-child { position: relative; overflow: hidden; background: var(--fx-oscuro); border-color: var(--fx-oscuro); }
.fx .menu-micro-card:first-child .menu-micro-card__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx .menu-micro-card:first-child .menu-micro-card__title { color: #ffffff; }
.fx .menu-micro-card:first-child [class*="__desc"] { color: #c4cdda; }

/* Modales del panel */
.fx .ds-modal, .ds-modal { border-radius: var(--fx-radio, 24px); }
.ds-modal .ds-btn { border-radius: 12px; }

@media (hover: hover) and (pointer: fine) {
    .fx .menu-micro-card:hover, .fx .menu-macro-kpi:hover:not(:disabled) { border-color: var(--fx-cian); transform: translateY(-3px); box-shadow: 0 24px 44px -28px rgba(10,21,51,0.45); }
}
html[data-theme="dark"] .fx .menu-micro-card:first-child { border-color: var(--border); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .fx .menu-micro-card:first-child { border-color: var(--border); }
}

/* Celular: el botón del menú queda fijo sobre la barra superior de cada pantalla. */
.fx__toggle--flotante { display: none; }
@media (max-width: 1024px) {
    .fx__toggle--flotante { display: grid; position: fixed; top: 12px; left: 16px; z-index: 56; }
    .fx .panel-header__inner { padding: 10px 16px 10px 68px; }
    .fx .panel-shell { padding: 24px; }
}
@media (max-width: 560px) {
    .fx .panel-shell { padding: 20px 16px; }
}

/* ---------- Checkout de firma (tipo, vigencia, documentos, pago) ---------- */
.fx-sus .checkout-tipo, .fx-sus .checkout-vigencia, .fx-sus .checkout-radio-card, .fx-sus .checkout-upload, .fx-sus .checkout-metodo { border-radius: 18px; }
.fx-sus :is(.checkout-tipo, .checkout-vigencia, .checkout-radio-card, .checkout-metodo).is-selected {
    border-color: var(--fx-cian) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--fx-cian) 22%, transparent);
}
.fx-sus .checkout-tipo__icon { border-radius: 12px; background: var(--fx-oscuro); color: var(--fx-cian); }
.fx-sus .checkout-tipo.is-selected .checkout-tipo__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx-sus .checkout-tipo.is-selected .checkout-tipo__check { background: var(--fx-cian); color: var(--fx-oscuro); opacity: 1; }
.fx-sus .checkout-tipo__title, .fx-sus .checkout-vigencia__name { font-weight: 700; color: var(--color-titulo); }
.fx-sus .checkout-vigencia__price { font-family: var(--f-display); letter-spacing: -0.02em; color: var(--color-titulo); }
.fx-sus .checkout-vigencia__iva { color: var(--fx-cian-texto); }
.fx-sus .checkout-metodo.is-selected .checkout-metodo__icon { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx-sus .checkout-upload__icon { border-radius: 12px; background: var(--fx-oscuro); color: var(--fx-cian); }
.fx-sus .checkout-section__title { color: var(--color-titulo); }
.fx-sus .checkout-group-title { color: var(--text-secondary); }
.fx-sus .checkout-completed__icon { background: var(--fx-oscuro); color: var(--fx-cian); }
.fx-sus .checkout-completed__icon--success { background: var(--fx-cian); color: var(--fx-oscuro); }
.fx-sus .checkout-completed__title { font-family: var(--f-display); color: var(--color-titulo); }
.fx-sus .checkout-toggle__input:checked + .checkout-toggle__switch { background: var(--fx-cian); border-color: var(--fx-cian); }
.fx-sus .checkout-radio-card.is-selected .checkout-radio-card__dot { border-color: var(--fx-cian); background: var(--fx-cian); }
.fx-sus .checkout-toast-reanudando { border-radius: 12px; background: var(--fx-oscuro); color: #ffffff; }

/* Flujo público de emisión (Firma.razor: términos, contraseña, biometría, entrega, rechazo) */
.firma-layout.fx-sus { background: var(--bg-page); }
.fx-sus .firma-layout__body .ds-card { border-radius: var(--fx-radio); box-shadow: none; }
/* Componente de prueba de vida (Amplify): botones, óvalo y foco con los colores del panel. Amplify declara sus
   variables sobre [data-amplify-theme], así que se sobrescriben ahí mismo. */
.fx-sus [data-amplify-theme] {
    --amplify-colors-primary-10: #e6f9fa;
    --amplify-colors-primary-20: #b3eff2;
    --amplify-colors-primary-40: #33d0d6;
    --amplify-colors-primary-60: #0a1533;
    --amplify-colors-primary-80: #0a1533;
    --amplify-colors-primary-90: #162d69;
    --amplify-colors-primary-100: #0a1533;
    --amplify-colors-font-interactive: #0a1533;
    --amplify-colors-font-hover: #162d69;
    --amplify-colors-font-focus: #0a1533;
    --amplify-colors-font-active: #0a1533;
    --amplify-colors-border-focus: #00c2cc;
    --amplify-colors-border-pressed: #00c2cc;
}
.fx-sus .firma-biometria__camara .amplify-liveness-cancel-button { color: #0a1533 !important; }

html[data-theme="dark"] .fx-sus .checkout-vigencia__iva { color: var(--fx-cian); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .fx-sus .checkout-vigencia__iva { color: var(--fx-cian); }
}

/* ---------- Menú lateral agrupado (bloques plegables) ---------- */
.fx__grupo {
    width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 12px; border: 0; border-radius: 14px;
    background: transparent; color: rgba(255,255,255,0.72); font: 600 14.5px var(--f-texto); text-align: left; cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.fx__grupo > i:first-child { font-size: 17px; }
.fx__grupo span { flex: 1; }
.fx__grupo-flecha { font-size: 12px; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.fx__grupo.is-open .fx__grupo-flecha { transform: rotate(180deg); }
.fx__grupo.is-activo { color: #ffffff; }
.fx__grupo.is-activo > i:first-child { color: var(--fx-cian); }
.fx__grupo-enlaces { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.2,.8,.2,1); }
.fx__grupo-enlaces.is-open { grid-template-rows: 1fr; }
.fx__grupo-enlaces > div { overflow: hidden; display: flex; flex-direction: column; gap: 2px; margin-left: 20px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.12); }
.fx__enlace--sub { padding: 8px 12px; font-size: 14px; }
.fx__enlace--sub.is-active { box-shadow: inset 2px 0 0 var(--fx-cian); }
@media (hover: hover) and (pointer: fine) {
    .fx__grupo:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
}

/* ---------- Dashboard del inicio (macro) ---------- */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dash-kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--fx-radio); background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); text-align: left; font-family: var(--f-texto); }
.dash-kpi__icono { width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; background: var(--fx-oscuro); color: var(--fx-cian); font-size: 18px; }
.dash-kpi__etiqueta { font-size: 13px; color: var(--text-secondary); }
.dash-kpi__valor { font: 700 30px/1.1 var(--f-display); letter-spacing: -0.02em; color: var(--color-titulo); }
.dash-kpi__pie { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); }
.dash-delta { padding: 2px 8px; border-radius: 999px; background: var(--bg-subtle); color: var(--text-primary); font-weight: 700; font-size: 12px; }
.dash-delta.is-sube { background: var(--fx-cian); color: var(--fx-oscuro); }
.dash-delta.is-baja { background: var(--fx-ambar); color: #0a1533; }
.dash-kpi--accion { cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.dash-kpi--accion .dash-kpi__pie { font-weight: 600; color: var(--fx-cian-texto); }
.dash-kpi--accion.is-pendiente { border-color: color-mix(in srgb, var(--fx-ambar) 60%, var(--border)); }
.dash-kpi--accion.is-pendiente .dash-kpi__icono { background: var(--fx-ambar); color: #0a1533; }
.dash-kpi--accion:disabled { cursor: default; }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-card { min-width: 0; padding: 22px; border-radius: var(--fx-radio); background: var(--bg-card); border: 1px solid var(--border); }
.dash-card--ancha { grid-column: span 2; }
.dash-card__cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.dash-card__titulo { margin: 0; font: 700 17px var(--f-display); letter-spacing: -0.01em; color: var(--color-titulo); }
.dash-card__sub { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }
.fx .dash-enlace { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fx-cian-texto); text-decoration: none; }
.dash-vacio { margin: 0; padding: 24px 0; text-align: center; font-size: 14px; color: var(--text-secondary); }
.dash-skeleton { height: 180px; border-radius: 16px; }
.dash-skeleton--lista { height: 200px; }

/* Barras por día: una serie, navy (cian en oscuro), punta redondeada de 4 px y 2 px de separación. */
.dash-barras { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 18px; border-bottom: 1px solid var(--border);
    background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px); background-size: 100% 50%; background-position: 0 18px; background-repeat: repeat-y; }
.dash-barras__max { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--text-muted); }
.dash-barra { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; }
.dash-barra__relleno { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--fx-oscuro); transition: opacity .2s ease; }
.dash-barra.is-hoy .dash-barra__relleno { background: var(--fx-cian); }
.dash-barra__tip { position: absolute; z-index: 2; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 10px; background: var(--fx-oscuro); color: #ffffff; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.dash-barra__tip strong { display: block; }
.dash-barras:hover .dash-barra__relleno { opacity: .45; }
.dash-barra:hover .dash-barra__relleno, .dash-barra:focus .dash-barra__relleno { opacity: 1; }
.dash-barra:hover .dash-barra__tip, .dash-barra:focus .dash-barra__tip { opacity: 1; }
.dash-barras__eje { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

/* Top de distribuidores y ventas por producto: barras horizontales de una sola serie. */
.dash-top { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.dash-top li { display: flex; align-items: center; gap: 12px; }
.dash-top__pos { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-subtle); color: var(--text-primary); font-size: 12px; font-weight: 700; }
.dash-top li:first-child .dash-top__pos { background: var(--fx-cian); color: var(--fx-oscuro); }
.dash-top__info { flex: 1; min-width: 0; }
.dash-top__info > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.dash-top__info strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.dash-top__info span { flex: none; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.dash-top__barra { display: block; height: 6px; margin-top: 6px; border-radius: 6px; background: var(--bg-subtle); overflow: hidden; }
.dash-top__barra i { display: block; height: 100%; border-radius: 6px; background: var(--fx-oscuro); }
.dash-productos { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.dash-productos li { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 14px; font-size: 13.5px; }
.dash-productos .dash-top__barra { margin-top: 0; height: 8px; }
.dash-productos__nombre { color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-productos__valor { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Firmas por renovar */
.dash-renovar__total { margin-bottom: 12px; font-size: 13px; color: var(--text-secondary); }
.dash-renovar__total strong { font: 700 26px var(--f-display); color: var(--color-titulo); margin-right: 4px; }
.dash-renovar { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.dash-renovar li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.dash-renovar li > div { min-width: 0; line-height: 1.3; }
.dash-renovar strong { display: block; font-size: 13.5px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-renovar li > div span { font-size: 12px; color: var(--text-secondary); }
.dash-renovar .ds-badge { flex: none; }

@media (hover: hover) and (pointer: fine) {
    .dash-kpi--accion:hover:not(:disabled) { border-color: var(--fx-cian); transform: translateY(-3px); }
}
html[data-theme="dark"] .dash-barra__relleno, html[data-theme="dark"] .dash-top__barra i { background: var(--fx-cian); }
html[data-theme="dark"] .dash-barra.is-hoy .dash-barra__relleno { background: #ffffff; }
html[data-theme="dark"] .fx .dash-enlace, html[data-theme="dark"] .dash-kpi--accion .dash-kpi__pie { color: var(--fx-cian); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .dash-barra__relleno, html:not([data-theme="light"]) .dash-top__barra i { background: var(--fx-cian); }
    html:not([data-theme="light"]) .dash-barra.is-hoy .dash-barra__relleno { background: #ffffff; }
    html:not([data-theme="light"]) .fx .dash-enlace, html:not([data-theme="light"]) .dash-kpi--accion .dash-kpi__pie { color: var(--fx-cian); }
}
@media (max-width: 1200px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
    .dash-card--ancha { grid-column: auto; }
}
@media (max-width: 560px) {
    .dash-kpis { grid-template-columns: minmax(0, 1fr); }
    .dash-productos li { grid-template-columns: minmax(0, 1fr) auto; }
    .dash-productos .dash-top__barra { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
    .fx__grupo-enlaces, .fx__grupo-flecha { transition: none; }
}

/* Safari de iOS no recorta las esquinas de un contenedor redondeado con overflow: hidden cuando adentro hay
   brillos con blur o elementos animados (se ven cuadradas). La máscara lo obliga a recortar. Solo en iOS: en
   escritorio la máscara cortaría la sombra del hover. */
@supports (-webkit-touch-callout: none) {
    .fx .panel-steps, .fx .menu-macro-card, .fx .menu-micro-card { isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); }
}


/* ============================================================
   Menú blanco, fondo gris y modo oscuro (2026-11-25). Mismo bloque en panel-firmas.css (Firmas) y
   panel-facturacion.css (facturador): mantener ambos iguales.
   - Página gris (#E8EAEE), un poco más gris que el menú y las tarjetas blancas.
   - Menú lateral blanco con opción activa en navy; en oscuro, menú #10151F y página #0A0E17.
   - Menú plegable a solo íconos en escritorio (.fx.is-plegado).
   - Íconos sobre navy en blanco, nunca cian.
   ============================================================ */
:root {
    --pn-pagina: #E8EAEE;
    --pn-tarjeta: #FFFFFF;
    --pn-borde: #DDE3EC;
    --pn-sutil: #EEF0F3;
    --pn-hover: #F5F6F8;

    --side-bg: #FFFFFF;
    --side-borde: #DDE3EC;
    --side-texto: #4F5B71;
    --side-titulo: #6C7A91;
    --side-fuerte: #0A1533;
    --side-caja: #F3F4F6;
    --side-caja-borde: #DDE3EC;
    --side-hover: #F1F3F6;
    --side-hover-texto: #0A1533;
    --side-activo: #0A1533;
    --side-activo-texto: #FFFFFF;
    --side-puntos: rgba(10,21,51,.16);
    --side-brillo: #00C2CC;
    --side-brillo-opacidad: .10;
    --side-plegado: 80px;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pn-pagina: #0A0E17;
        --pn-tarjeta: #141A28;
        --pn-borde: rgba(255,255,255,.08);
        --pn-sutil: rgba(255,255,255,.05);
        --pn-hover: rgba(255,255,255,.07);

        --side-bg: #10151F;
        --side-borde: rgba(255,255,255,.08);
        --side-texto: rgba(255,255,255,.72);
        --side-titulo: rgba(255,255,255,.5);
        --side-fuerte: #FFFFFF;
        --side-caja: rgba(255,255,255,.06);
        --side-caja-borde: rgba(255,255,255,.08);
        --side-hover: rgba(255,255,255,.06);
        --side-hover-texto: #FFFFFF;
        --side-activo: rgba(255,255,255,.12);
        --side-activo-texto: #FFFFFF;
        --side-puntos: rgba(255,255,255,.14);
        --side-brillo: #2E53B7;
        --side-brillo-opacidad: .35;
    }
}
:root[data-theme="dark"] {
    --pn-pagina: #0A0E17;
    --pn-tarjeta: #141A28;
    --pn-borde: rgba(255,255,255,.08);
    --pn-sutil: rgba(255,255,255,.05);
    --pn-hover: rgba(255,255,255,.07);

    --side-bg: #10151F;
    --side-borde: rgba(255,255,255,.08);
    --side-texto: rgba(255,255,255,.72);
    --side-titulo: rgba(255,255,255,.5);
    --side-fuerte: #FFFFFF;
    --side-caja: rgba(255,255,255,.06);
    --side-caja-borde: rgba(255,255,255,.08);
    --side-hover: rgba(255,255,255,.06);
    --side-hover-texto: #FFFFFF;
    --side-activo: rgba(255,255,255,.12);
    --side-activo-texto: #FFFFFF;
    --side-puntos: rgba(255,255,255,.14);
    --side-brillo: #2E53B7;
    --side-brillo-opacidad: .35;
}

/* Fondos del panel: página gris, tarjetas blancas con borde, cajas internas y hover sutiles (sin #E7F0FA). */
.fx, .fx-sus {
    --bg-page: var(--pn-pagina);
    --bg-card: var(--pn-tarjeta);
    --border: var(--pn-borde);
    --bg-subtle: var(--pn-sutil);
    --bg-hover: var(--pn-hover);
    background: var(--pn-pagina);
}
.fx .ds-card, .fx .panel-card, .fx-sus .ds-card { border-color: var(--pn-borde); }

/* ---------- Menú lateral ---------- */
.fx__lateral { background: var(--side-bg); color: var(--side-fuerte); border-right: 1px solid var(--side-borde); }
/* Puntos que predominan abajo y se desvanecen casi por completo hacia arriba. */
.fx__lateral::before {
    background-image: radial-gradient(var(--side-puntos) 1.2px, transparent 1.2px); background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 35%, rgba(0,0,0,.06) 75%, transparent 92%);
    mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 35%, rgba(0,0,0,.06) 75%, transparent 92%);
}
.fx__lateral::after { background: var(--side-brillo); opacity: var(--side-brillo-opacidad); }

.fx__cabeza { display: flex; align-items: center; gap: 8px; }
.fx__cabeza .fx__marca { flex: 1; min-width: 0; }
.fx__marca, .fx__marca:hover { color: var(--side-fuerte); }
.fx__marca span { min-width: 0; }
.fx__marca strong { color: var(--side-fuerte); }
.fx__marca small { color: var(--side-titulo); }
/* Logo según el fondo: isotipo positivo sobre blanco, negativo sobre oscuro. */
.fx .logo-oscuro { display: none; }
:root[data-theme="dark"] .fx .logo-claro { display: none; }
:root[data-theme="dark"] .fx .logo-oscuro { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .fx .logo-claro { display: none; }
    :root:not([data-theme="light"]) .fx .logo-oscuro { display: block; }
}

.fx__plegar {
    flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
    border: 1px solid var(--side-caja-borde); background: var(--side-caja); color: var(--side-texto); font-size: 16px; cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.fx__plegar:hover { background: var(--side-hover); color: var(--side-hover-texto); }

.fx__seccion { color: var(--side-titulo); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fx__enlace { position: relative; color: var(--side-texto); }
.fx__enlace:hover { color: var(--side-hover-texto); }
.fx__enlace.is-active, .fx__enlace.is-active:hover { background: var(--side-activo); color: var(--side-activo-texto); font-weight: 600; box-shadow: none; }
.fx__enlace.is-active i { color: var(--side-activo-texto); }

.fx__ayuda { background: var(--side-caja); border: 1px solid var(--side-caja-borde); color: var(--side-fuerte); }
.fx__ayuda span { color: var(--side-titulo); }
.fx__ayuda strong { color: var(--side-fuerte); }
.fx__ayuda a, .fx__ayuda a:hover { border-color: var(--side-caja-borde); background: var(--side-bg); color: var(--side-fuerte); }

@media (hover: hover) and (pointer: fine) {
    .fx__enlace:hover { background: var(--side-hover); }
    .fx__enlace.is-active:hover { background: var(--side-activo); }
    .fx__ayuda a:hover { background: var(--side-hover); }
}

/* ---------- Menú plegado a solo íconos (escritorio) ---------- */
@media (min-width: 1025px) {
    .fx { transition: grid-template-columns .3s cubic-bezier(.2,.8,.2,1); }
    .fx.is-plegado { grid-template-columns: var(--side-plegado) minmax(0, 1fr); }
    .fx.is-plegado .fx__lateral { padding: 22px 12px; }
    .fx.is-plegado .fx__cabeza { flex-direction: column; gap: 12px; }
    .fx.is-plegado .fx__marca { flex: none; justify-content: center; padding: 4px 0; }
    .fx.is-plegado .fx__marca span,
    .fx.is-plegado .fx__seccion,
    .fx.is-plegado .fx__texto,
    .fx.is-plegado .fx__grupo span,
    .fx.is-plegado .fx__grupo-flecha,
    .fx.is-plegado .fx__grupo-enlaces,
    .fx.is-plegado .fx__ayuda > span,
    .fx.is-plegado .fx__ayuda > strong { display: none; }
    .fx.is-plegado .fx__seccion + .fx__enlace { margin-top: 10px; }
    .fx.is-plegado .fx__emitir { gap: 0; }
    .fx.is-plegado .fx__enlace, .fx.is-plegado .fx__grupo { justify-content: center; gap: 0; padding: 11px 0; }
    .fx.is-plegado .fx__ayuda { padding: 0; background: none; border: 0; }
    .fx.is-plegado .fx__ayuda a, .fx.is-plegado .fx__salir-lateral { gap: 0; }
    /* Contadores y etiquetas (pills): un punto de 9 px sobre el ícono. */
    .fx.is-plegado .fx__enlace :is(.fx__pill, .fx-invita__chip) {
        position: absolute; top: 7px; left: calc(50% + 5px); width: 9px; height: 9px; min-width: 0; margin: 0; padding: 0;
        border-radius: 50%; font-size: 0; line-height: 0; overflow: hidden;
    }
}
@media (max-width: 1024px) {
    .fx__plegar { display: none; }
}

/* ---------- Íconos acentuados: blanco sobre navy, nunca cian ---------- */
.fx .ds-tab.is-active i { color: inherit; }
.fx :is(.fx__avatar, .menu-macro-card__icon, .menu-micro-card__icon, .menu-macro-kpi__icon, .dash-kpi__icono, .rc-pasos li > span),
.fx .menu-macro-card:hover .menu-macro-card__arrow,
.fx .rc-seguro i,
.fx-sus :is(.checkout-section__icon, .checkout-loading__icon, .checkout-tipo__icon, .checkout-upload__icon, .checkout-completed__icon:not(.checkout-completed__icon--success)),
.fx-sus .landing-precio-card .landing-precio-card__icon,
.fx-sus :is(.landing-precio-card__icon, .checkout-section__icon) i { color: #FFFFFF; }

/* ---------- Tarjeta seleccionada: borde y tinte solo en la tarjeta, el ícono no cambia ---------- */
.fx-sus :is(.checkout-tipo, .checkout-vigencia, .checkout-radio-card, .checkout-metodo, .landing-precio-card).is-selected,
.fx .rc-paquete.is-on {
    background: color-mix(in srgb, var(--fx-cian) 7%, var(--bg-card));
}
.fx-sus .checkout-tipo.is-selected .checkout-tipo__icon,
.fx-sus .landing-precio-card.is-selected .landing-precio-card__icon { background: var(--fx-oscuro); color: #FFFFFF; box-shadow: none; }

/* Propio de Firmas: bloques plegables del menú con los colores del menú blanco. */
.fx__grupo { color: var(--side-texto); }
.fx__grupo.is-activo { color: var(--side-fuerte); }
.fx__grupo.is-activo > i:first-child { color: var(--side-fuerte); }
.fx__grupo-enlaces > div { border-left-color: var(--side-borde); }
.fx__enlace--sub.is-active { box-shadow: none; }
.fx__salir-lateral { color: var(--side-texto); }
.fx__salir-lateral:hover { background: var(--side-hover); color: var(--side-hover-texto); }
@media (hover: hover) and (pointer: fine) {
    .fx__grupo:hover { background: var(--side-hover); color: var(--side-hover-texto); }
}
@media (min-width: 1025px) {
    /* Plegado: el bloque de la pantalla actual se marca como opción activa. */
    .fx.is-plegado .fx__grupo { margin-top: 2px; }
    .fx.is-plegado .fx__grupo.is-activo, .fx.is-plegado .fx__grupo.is-activo:hover { background: var(--side-activo); color: var(--side-activo-texto); }
    .fx.is-plegado .fx__grupo.is-activo > i:first-child { color: var(--side-activo-texto); }
}
