﻿/* ============ Flete Express ? estilos base ============ */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    min-width: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1:focus { outline: none; }

/* Pantalla de carga / centrada */
.fx-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: var(--mud-palette-background, #F6F7FB);
}

/* ---------- Login (hero log?stico full-bleed) ---------- */
.fx-login {
    --fx-login-ink: #0a1520;
    --fx-login-navy: #12263a;
    --fx-login-brand: #814a4c;
    --fx-login-brand-bright: #a66b6d;
    --fx-login-amber: #c47a2c;
    --fx-login-asphalt: #1a1f26;
    --fx-login-panel: rgba(250, 249, 247, .92);
    --fx-login-panel-border: rgba(255, 255, 255, .28);
    --fx-login-text: #14181f;
    --fx-login-muted: #5c6573;
    --fx-login-font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --fx-login-font-ui: "Figtree", "Segoe UI", sans-serif;
    --fx-login-cycle: 55s;

    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: clamp(20px, 4vw, 48px);
    font-family: var(--fx-login-font-ui);
    color: #fff;
    background: var(--fx-login-ink);
}

/* Escenario edge-to-edge */
.fx-login-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.fx-login-slides {
    position: absolute;
    inset: 0;
}

.fx-login-slide {
    position: absolute;
    inset: -6%;
    background-color: var(--fx-login-navy);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    will-change: opacity, transform;
    animation:
        fxLoginCrossfade var(--fx-login-cycle) infinite,
        fxLoginKenBurns var(--fx-login-cycle) infinite;
}

/*
 * Slides 1–10: URLs las inyecta Login.razor (LoginBackgroundCatalog, estacional Panamá).
 * Aquí solo delays + Ken Burns alternado. ~5.5s/slide, ciclo 55s.
 */
.fx-login-slide--1 {
    animation-delay: 0s, 0s;
}
.fx-login-slide--2 {
    animation-delay: calc(var(--fx-login-cycle) * -.1), calc(var(--fx-login-cycle) * -.1);
    animation-name: fxLoginCrossfade, fxLoginKenBurnsAlt;
}
.fx-login-slide--3 {
    animation-delay: calc(var(--fx-login-cycle) * -.2), calc(var(--fx-login-cycle) * -.2);
}
.fx-login-slide--4 {
    animation-delay: calc(var(--fx-login-cycle) * -.3), calc(var(--fx-login-cycle) * -.3);
    animation-name: fxLoginCrossfade, fxLoginKenBurnsAlt;
}
.fx-login-slide--5 {
    animation-delay: calc(var(--fx-login-cycle) * -.4), calc(var(--fx-login-cycle) * -.4);
}
.fx-login-slide--6 {
    animation-delay: calc(var(--fx-login-cycle) * -.5), calc(var(--fx-login-cycle) * -.5);
    animation-name: fxLoginCrossfade, fxLoginKenBurnsAlt;
}
.fx-login-slide--7 {
    animation-delay: calc(var(--fx-login-cycle) * -.6), calc(var(--fx-login-cycle) * -.6);
}
.fx-login-slide--8 {
    animation-delay: calc(var(--fx-login-cycle) * -.7), calc(var(--fx-login-cycle) * -.7);
    animation-name: fxLoginCrossfade, fxLoginKenBurnsAlt;
}
.fx-login-slide--9 {
    animation-delay: calc(var(--fx-login-cycle) * -.8), calc(var(--fx-login-cycle) * -.8);
}
.fx-login-slide--10 {
    animation-delay: calc(var(--fx-login-cycle) * -.9), calc(var(--fx-login-cycle) * -.9);
    animation-name: fxLoginCrossfade, fxLoginKenBurnsAlt;
}

/* 10 slides ? slot 10% ? crossfade ~1s en bordes */
@keyframes fxLoginCrossfade {
    0%   { opacity: 0; }
    1.8% { opacity: 1; }
    8.2% { opacity: 1; }
    10%  { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes fxLoginKenBurns {
    0%   { transform: scale(1.05) translate3d(0, 0, 0); }
    100% { transform: scale(1.16) translate3d(-2.2%, 1.4%, 0); }
}

@keyframes fxLoginKenBurnsAlt {
    0%   { transform: scale(1.08) translate3d(1.5%, -1%, 0); }
    100% { transform: scale(1.18) translate3d(-1.8%, 2%, 0); }
}

.fx-login-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(10, 21, 32, .78) 0%, rgba(18, 38, 58, .55) 42%, rgba(129, 74, 76, .42) 100%),
        linear-gradient(180deg, rgba(10, 21, 32, .35) 0%, rgba(10, 21, 32, .72) 100%);
}

.fx-login-routes {
    position: absolute;
    inset: -20%;
    opacity: .28;
    background:
        linear-gradient(105deg, transparent 48%, rgba(196, 122, 44, .55) 49.5%, transparent 51%),
        linear-gradient(125deg, transparent 42%, rgba(255, 255, 255, .18) 49%, transparent 56%),
        linear-gradient(85deg, transparent 55%, rgba(166, 107, 109, .35) 58%, transparent 62%);
    background-size: 140% 140%;
    animation: fxLoginRouteDrift 22s ease-in-out infinite alternate;
    mix-blend-mode: soft-light;
}

@keyframes fxLoginRouteDrift {
    0%   { transform: translate3d(-2%, 1%, 0) rotate(-1deg); }
    100% { transform: translate3d(3%, -2%, 0) rotate(1.5deg); }
}

.fx-login-particles {
    position: absolute;
    inset: 0;
    opacity: .45;
    background-image:
        radial-gradient(circle at 12% 22%, rgba(255, 255, 255, .55) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 78% 18%, rgba(196, 122, 44, .7) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 64% 68%, rgba(255, 255, 255, .4) 0 1.2px, transparent 2.2px),
        radial-gradient(circle at 28% 74%, rgba(166, 107, 109, .65) 0 1.4px, transparent 2.4px),
        radial-gradient(circle at 88% 52%, rgba(255, 255, 255, .35) 0 1px, transparent 2px),
        radial-gradient(circle at 46% 36%, rgba(255, 255, 255, .5) 0 1.2px, transparent 2.2px);
    animation: fxLoginParticles 18s linear infinite;
}

@keyframes fxLoginParticles {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-18px, -28px, 0); }
}

.fx-login-vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px 40px rgba(8, 12, 18, .55);
}

/* Contenido sobre el hero */
.fx-login-frame {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 400px);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    width: min(1080px, 100%);
}

.fx-login-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: 520px;
    animation: fxLoginBrandIn .9s cubic-bezier(.22, 1, .36, 1) both;
}

.fx-login-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 88px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow:
        0 18px 40px -18px rgba(0, 0, 0, .75),
        0 2px 0 rgba(255, 255, 255, .35) inset;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45));
}

.fx-login-logo {
    width: 94px;
    height: auto;
    display: block;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .4));
}

.fx-login-brand-name {
    margin: 0;
    font-family: var(--fx-login-font-display);
    font-size: clamp(2.6rem, 6vw, 4.1rem);
    font-weight: 800;
    line-height: .95;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, .55),
        0 2px 4px rgba(0, 0, 0, .55),
        0 10px 28px rgba(0, 0, 0, .5),
        0 0 1px rgba(0, 0, 0, .9);
}

.fx-login-tagline {
    margin: 4px 0 0;
    max-width: 28ch;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 500;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .92);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, .65),
        0 6px 18px rgba(0, 0, 0, .4);
}

.fx-login-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    animation: fxLoginPanelIn 1s cubic-bezier(.22, 1, .36, 1) .18s both;
}

.fx-login-panel {
    width: 100%;
    padding: clamp(22px, 3vw, 30px);
    color: var(--fx-login-text);
    background: var(--fx-login-panel);
    border: 1px solid var(--fx-login-panel-border);
    border-radius: 16px;
    border-left: 3px solid var(--fx-login-brand);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    box-shadow: 0 22px 48px -28px rgba(0, 0, 0, .65);
}

@keyframes fxLoginBrandIn {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes fxLoginPanelIn {
    from {
        opacity: 0;
        transform: translate3d(0, 22px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.fx-login-title {
    margin: 0;
    font-family: var(--fx-login-font-display);
    font-size: clamp(1.55rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--fx-login-text);
}

.fx-login-lead {
    margin: 6px 0 22px;
    color: var(--fx-login-muted);
    font-size: .92rem;
}

.fx-login-foot {
    margin-top: 28px;
    text-align: center;
    font-size: .72rem;
    color: var(--fx-login-muted);
}

.fx-form { display: flex; flex-direction: column; gap: 18px; }
.fx-field { display: flex; flex-direction: column; gap: 7px; }
.fx-field-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--fx-login-muted);
}
.fx-login .fx-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: .95rem;
    font-family: var(--fx-login-font-ui);
    color: var(--fx-login-text);
    background: #fff;
    border: 1.5px solid #d9dde5;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-login .fx-input:focus {
    border-color: var(--fx-login-brand);
    box-shadow: 0 0 0 3px rgba(129, 74, 76, .16);
}
.fx-login .fx-btn-primary {
    margin-top: 8px;
    width: 100%;
    padding: 13px 16px;
    font-size: .98rem;
    font-weight: 700;
    font-family: var(--fx-login-font-ui);
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(135deg, var(--fx-login-brand-bright), var(--fx-login-brand));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 12px 26px -14px rgba(129, 74, 76, .9);
    transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.fx-login .fx-btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 30px -14px rgba(129, 74, 76, .95);
}
.fx-login .fx-btn-primary:active { transform: translateY(0); }
.fx-login .fx-alert-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, .10);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, .25);
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .88rem;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .fx-login {
        place-items: stretch;
        align-content: center;
        padding: 28px 18px 32px;
    }

    .fx-login-frame {
        grid-template-columns: 1fr;
        gap: 22px;
        width: min(440px, 100%);
        margin-inline: auto;
    }

    .fx-login-hero {
        align-items: center;
        text-align: center;
        max-width: none;
    }

    .fx-login-tagline {
        max-width: 34ch;
    }

    .fx-login-logo-wrap {
        width: 100px;
        height: 74px;
    }

    .fx-login-logo {
        width: 80px;
    }

    .fx-login-brand-name {
        font-size: clamp(2.15rem, 9vw, 2.85rem);
    }
}

@media (max-width: 520px) {
    .fx-login {
        padding: 22px 14px 26px;
    }

    .fx-login-panel {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .fx-login-lead {
        margin-bottom: 18px;
    }

    .fx-login .fx-input {
        min-height: 48px;
        font-size: 1rem;
    }

    .fx-login .fx-btn-primary {
        min-height: 48px;
        padding: 12px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fx-login-slide,
    .fx-login-routes,
    .fx-login-particles,
    .fx-login-hero,
    .fx-login-main {
        animation: none !important;
    }

    .fx-login-slide {
        opacity: 0;
        transform: none;
    }

    .fx-login-slide--1 {
        opacity: 1;
    }
}

/* Logo */
.fx-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(17,17,17,.08);
    box-shadow: 0 8px 18px -12px rgba(17,17,17,.45);
    overflow: hidden;
}
.fx-brand-logo img {
    width: 40px;
    height: auto;
    display: block;
}
.fx-brand-logo--lg {
    width: 112px; height: 82px;
    border-radius: 14px;
    background: #fff;
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 18px 42px -26px rgba(0,0,0,.65);
}
.fx-brand-logo--lg img {
    width: 92px;
}

/* ---------- Shell ---------- */
/* Buscar módulo (lupa del appbar) */
.fx-module-search-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(52vh, 420px);
    overflow: auto;
    margin: 0 -4px;
    padding: 0 4px;
}
.fx-module-search-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
.fx-module-search-item:hover,
.fx-module-search-item.is-active {
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 10%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 22%, transparent);
}
.fx-module-search-title {
    font-weight: 650;
    font-size: .92rem;
    line-height: 1.25;
}
.fx-module-search-meta {
    font-size: .72rem;
    color: var(--mud-palette-text-secondary, #666);
}

.fx-appbar {
    border-bottom: 1px solid var(--mud-palette-divider);
    backdrop-filter: saturate(180%) blur(6px);
}
.fx-appbar--admin { border-bottom-color: rgba(129, 74, 76, .45); }
.fx-appbar--region { border-bottom-color: rgba(71, 85, 105, .45); }
.fx-appbar--corporativo { border-bottom-color: rgba(196, 122, 44, .5); }
.fx-appbar--sucursal { border-bottom-color: rgba(34, 197, 94, .45); }

.fx-drawer,
.mud-drawer.fx-drawer,
aside.mud-drawer.fx-drawer {
    border-right: 1px solid rgba(255, 255, 255, .08);
    /* Forzar fondo oscuro de marca (MudBlazor 9 a veces pinta Surface blanco encima). */
    --mud-palette-drawer-background: #151515;
    --mud-palette-drawer-text: #f3f3f3;
    --mud-palette-drawer-icon: #d4d4d8;
    --mud-palette-surface: transparent;
    background: linear-gradient(180deg, #111111 0%, #5f3537 72%, #814a4c 100%) !important;
    background-color: #151515 !important;
    color: #f3f3f3 !important;
}
/* Solo hijos transparentes: NO el root .fx-drawer (si no, se ve el fondo blanco de la p?gina). */
.fx-drawer .mud-drawer-paper,
.fx-drawer .mud-paper,
.fx-drawer .mud-drawer-content,
.fx-drawer > .mud-drawer-content,
.fx-drawer > .fx-brand,
.fx-drawer > .mud-divider,
.fx-drawer > .fx-app-version {
    background: transparent !important;
    background-color: transparent !important;
    color: #f3f3f3 !important;
}
.fx-drawer--admin { border-right: 3px solid #a66b6d; }
.fx-drawer--region { border-right: 3px solid #94a3b8; }
.fx-drawer--corporativo { border-right: 3px solid #e0a86a; }
.fx-drawer--sucursal { border-right: 3px solid #4ade80; }

.fx-perfil-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(42vw, 280px);
    margin-left: 4px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    min-height: 34px;
    line-height: 1.1;
    flex-shrink: 1;
    overflow: hidden;
}
.fx-perfil-badge-icon {
    flex-shrink: 0;
}
.fx-perfil-badge-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.fx-perfil-badge-role {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}
.fx-perfil-badge-detail {
    font-size: .68rem;
    font-weight: 500;
    opacity: .9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.fx-perfil-badge--admin {
    color: #5f3537;
    background: rgba(129, 74, 76, .12);
    border-color: rgba(129, 74, 76, .28);
}
.fx-perfil-badge--region {
    color: #334155;
    background: rgba(71, 85, 105, .12);
    border-color: rgba(71, 85, 105, .28);
}
.fx-perfil-badge--corporativo {
    color: #8a5318;
    background: rgba(196, 122, 44, .14);
    border-color: rgba(196, 122, 44, .32);
}
.fx-perfil-badge--sucursal {
    color: #166534;
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .28);
}
.fx-drawer .fx-perfil-tone--admin { color: #e8b4b6 !important; }
.fx-drawer .fx-perfil-tone--region { color: #cbd5e1 !important; }
.fx-drawer .fx-perfil-tone--corporativo { color: #f0c48a !important; }
.fx-drawer .fx-perfil-tone--sucursal { color: #86efac !important; }

.fx-perfil-tone--admin { color: #814a4c !important; font-weight: 700; }
.fx-perfil-tone--region { color: #475569 !important; font-weight: 700; }
.fx-perfil-tone--corporativo { color: #c47a2c !important; font-weight: 700; }
.fx-perfil-tone--sucursal { color: #16a34a !important; font-weight: 700; }

.mud-theme-dark .fx-perfil-badge--admin {
    color: #e8b4b6;
    background: rgba(179, 111, 114, .22);
    border-color: rgba(179, 111, 114, .4);
}
.mud-theme-dark .fx-perfil-badge--region {
    color: #cbd5e1;
    background: rgba(148, 163, 184, .18);
    border-color: rgba(148, 163, 184, .35);
}
.mud-theme-dark .fx-perfil-badge--corporativo {
    color: #f0c48a;
    background: rgba(196, 122, 44, .22);
    border-color: rgba(196, 122, 44, .4);
}
.mud-theme-dark .fx-perfil-badge--sucursal {
    color: #86efac;
    background: rgba(34, 197, 94, .18);
    border-color: rgba(34, 197, 94, .35);
}
.mud-theme-dark .fx-user-menu-trigger {
    background: #1b1b1e;
    border-color: rgba(255, 255, 255, .12);
    color: #f7f7f8;
}
.mud-theme-dark .fx-user-menu-trigger:hover {
    background: #242428;
    border-color: rgba(179, 111, 114, .45);
}
.mud-theme-dark .fx-user-menu-name { color: #f7f7f8; }

.fx-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #f3f3f3;
}

.fx-drawer .mud-navmenu {
    flex: 0 0 auto;
    margin-top: 0 !important;
}

.fx-drawer .mud-divider {
    flex: 0 0 auto;
    border-color: rgba(255, 255, 255, .14) !important;
}

.fx-app-version {
    margin-top: auto;
    padding: 12px 18px 16px;
    font-size: 0.72rem;
    color: rgba(243, 243, 243, .62);
    letter-spacing: 0.02em;
}

.fx-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 6px;
    flex: 0 0 auto;
}
.fx-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.fx-brand-title { font-weight: 700; font-size: 1.02rem; color: #ffffff; }
.fx-brand-sub { font-size: .72rem; color: rgba(243, 243, 243, .72); }
.fx-drawer .fx-brand-logo {
    background: #ffffff;
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .55);
}

.fx-nav { padding: 4px 8px; }
.fx-nav .mud-nav-link,
.fx-drawer .mud-nav-link,
.fx-drawer .mud-expand-panel-header,
.fx-drawer .mud-expand-panel-header .mud-typography,
.fx-drawer .mud-nav-link .mud-nav-link-text {
    position: relative;
    margin: 2px 0;
    border-radius: 6px;
    color: #f3f3f3 !important;
    transition: background-color .16s ease, color .16s ease;
}
.fx-nav .mud-nav-link .mud-nav-link-icon,
.fx-drawer .mud-nav-link .mud-nav-link-icon,
.fx-drawer .mud-expand-panel-icon {
    color: rgba(243, 243, 243, .85) !important;
    opacity: 1 !important;
}
.fx-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) {
    background: rgba(255, 255, 255, .10) !important;
    color: #ffffff !important;
}
.fx-nav .mud-nav-link.active:not(.mud-nav-link-disabled) {
    color: #ffffff !important;
    font-weight: 700;
    background: rgba(129, 74, 76, .55) !important;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.fx-nav .mud-nav-link.active:not(.mud-nav-link-disabled)::before {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 4px;
    border-radius: 0 3px 3px 0;
    background: #e8b4b6;
    content: "";
}
.fx-nav .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: #e8b4b6 !important;
    opacity: 1;
}
.fx-menu-groups .mud-expand-panel {
    background: transparent !important;
    color: #f3f3f3 !important;
    box-shadow: none !important;
    border: none !important;
}
.fx-menu-groups .mud-expand-panel .mud-expand-panel-header {
    color: #f3f3f3 !important;
    background: transparent !important;
}
.fx-menu-groups .mud-expand-panel .mud-expand-panel-content {
    background: transparent !important;
    color: #f3f3f3 !important;
}
.fx-menu-groups .mud-expand-panel .mud-expand-panel-icon {
    color: rgba(243, 243, 243, .85) !important;
}
.fx-menu-groups .mud-expand-panel:has(.mud-nav-link.active) > .mud-expand-panel-header {
    color: #e8b4b6 !important;
    font-weight: 700;
    background: rgba(129, 74, 76, .35) !important;
    box-shadow: inset 3px 0 0 #e8b4b6;
}
.fx-menu-groups .fx-menu-tools.mud-expand-panel,
.fx-menu-groups .fx-menu-tools.mud-expand-panel.mud-panel-expanded {
    margin: 2px 0 4px !important;
    background: transparent !important;
}
.fx-menu-groups .fx-menu-tools > .mud-expand-panel-header,
.fx-menu-groups .fx-menu-tools > .mud-expand-panel-header.mud-expand-panel-header-gutters {
    min-height: 36px;
    padding: 6px 8px 6px 4px;
    font-size: .9rem;
}
.fx-menu-groups .fx-menu-tools .mud-expand-panel-content,
.fx-menu-groups .fx-menu-tools .mud-expand-panel-content.mud-expand-panel-gutters {
    padding: 0 0 4px 8px;
}
.fx-nav-group {
    display: block;
    padding: 14px 16px 4px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .68rem !important;
    color: rgba(243, 243, 243, .7) !important;
}
.fx-nav-credit {
    display: block;
    line-height: 1.35;
    color: rgba(243, 243, 243, .65) !important;
    opacity: .95;
}

.fx-drawer .fx-brand-title {
    color: #ffffff !important;
}
.fx-drawer .fx-brand-sub {
    color: rgba(243, 243, 243, .85) !important;
}
.fx-drawer .fx-app-version {
    color: rgba(243, 243, 243, .7) !important;
}

.fx-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--mud-palette-divider);
}
.fx-user-chip:hover { background: var(--mud-palette-action-default-hover); }
.fx-user-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.fx-user-name { font-weight: 600; font-size: .86rem; }
.fx-user-role { font-size: .72rem; color: var(--mud-palette-text-secondary); }
.fx-user-chip-arrow { color: var(--mud-palette-text-secondary); }
@media (max-width: 600px) { .fx-user-meta { display: none; } }

.fx-main { background: var(--mud-palette-background); min-height: 100vh; }
.fx-content { padding: 24px 28px; max-width: 1400px; margin: 0 auto; }

/* ---------- P?gina ---------- */
.fx-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 20px;
}

.fx-page-head > div:first-child {
    flex: 1 1 220px;
    min-width: 0;
}

.fx-page-head .mud-button-root {
    flex: 0 0 auto;
}
.fx-page-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.fx-page-sub { margin: 4px 0 0; color: var(--mud-palette-text-secondary); font-size: .9rem; }

.fx-panel {
    padding: 24px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 16px;
    background: var(--mud-palette-surface);
}

.fx-client-edit {
    max-width: 1180px;
    margin: 0 auto;
}

.fx-client-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.fx-client-kicker {
    color: var(--mud-palette-primary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fx-client-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.fx-client-edit .fx-panel {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.fx-client-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--mud-palette-divider);
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
}

.fx-client-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    color: #fff;
    background: var(--mud-palette-primary);
    font-size: .95rem;
    font-weight: 800;
}

.fx-client-summary-name {
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.fx-client-tabs {
    padding: 0 18px 16px;
}

.fx-form-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.fx-form-section-last {
    border-bottom: 0;
    padding-bottom: 10px;
}

.fx-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.fx-ruc-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fx-ruc-input {
    flex: 1 1 auto;
}

.fx-ruc-button {
    height: 40px;
    margin-top: 4px;
    white-space: nowrap;
}

.fx-toggle-box {
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
    background: var(--mud-palette-background);
}

.fx-commercial-grid {
    align-items: stretch;
}

.fx-directions-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0 12px;
}

.fx-required-note {
    display: block;
    padding: 0 18px 16px;
}

@media (max-width: 720px) {
    .fx-client-hero,
    .fx-client-summary,
    .fx-directions-head {
        align-items: stretch;
        flex-direction: column;
    }

    .fx-client-actions {
        justify-content: flex-start;
    }

    .fx-ruc-row {
        flex-direction: column;
    }

    .fx-ruc-button {
        width: 100%;
        margin-top: 0;
    }
}

.fx-page-date { color: var(--mud-palette-text-secondary); font-size: .85rem; white-space: nowrap; }

.fx-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.fx-toolbar-search { flex: 1 1 320px; min-width: 220px; }
.fx-toolbar-date { flex: 0 0 170px; min-width: 150px; }
.fx-toolbar-caja .fx-toolbar-search { flex: 1 1 280px; }
@media (max-width: 720px) {
    .fx-toolbar-search,
    .fx-toolbar-date { flex: 1 1 100%; }
}

.fx-table .mud-table-toolbar { display: none; }
.fx-table .mud-table-container { overflow-x: auto; }
.fx-table .mud-table-root,
.fx-table table {
    width: 100%;
    min-width: 0;
}
.fx-table .mud-table-head .mud-table-cell,
.fx-table thead th {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    padding: 12px 14px;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.fx-table .mud-table-cell,
.fx-table td {
    vertical-align: top;
    white-space: normal;
    overflow-wrap: break-word;
    padding: 12px 14px;
}
.fx-table-nopager .mud-table-pagination {
    display: none;
}

/* Recepci?n / inventario bodega */
.fx-section-head-text {
    min-width: 0;
    flex: 1 1 auto;
}

.fx-label-wrap {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.25;
}

/* Modo tabla (pantalla ancha): no aplastar s?labas; si no cabe, scroll ? no break-all */
.fx-recepcion-table .mud-table-root {
    width: 100%;
}

.fx-recepcion-inventario .mud-table-root {
    min-width: 1240px;
}

.fx-recepcion-table .mud-table-cell,
.fx-recepcion-table .mud-table-head .mud-table-cell {
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
}

.fx-recepcion-table .fx-recepcion-nowrap {
    white-space: nowrap;
}

.fx-recepcion-table .fx-wrap-chip,
.fx-recepcion-table .mud-chip.fx-wrap-chip {
    height: auto;
    min-height: 22px;
    max-width: 14rem;
    white-space: normal;
    line-height: 1.25;
    padding-top: 4px;
    padding-bottom: 4px;
}

.fx-recepcion-table .fx-wrap-chip .mud-chip-content {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: left;
}

.fx-recepcion-table .fx-wrap-action {
    height: auto;
    min-height: 28px;
    max-width: 12rem;
    white-space: normal;
    text-align: left;
    line-height: 1.25;
    padding-top: 4px;
    padding-bottom: 4px;
    overflow-wrap: break-word;
    word-break: normal;
}

/*
 * Modo tarjeta MudBlazor: la clase mud-*-table está SIEMPRE en el DOM;
 * el apilado real solo aplica dentro del @media de Mud. Nuestros estilos
 * de tarjeta deben respetar el mismo corte (Md = 1280px, igual que la MudTable).
 */
@media (max-width: 1280px) {
    .fx-recepcion-table.mud-lg-table .mud-table-container,
    .fx-recepcion-table.mud-xl-table .mud-table-container,
    .fx-recepcion-table.mud-md-table .mud-table-container,
    .fx-recepcion-table.mud-sm-table .mud-table-container,
    .fx-recepcion-table.mud-xs-table .mud-table-container {
        overflow-x: hidden;
    }

    .fx-recepcion-inventario.mud-lg-table .mud-table-root,
    .fx-recepcion-inventario.mud-xl-table .mud-table-root,
    .fx-recepcion-inventario.mud-md-table .mud-table-root,
    .fx-recepcion-inventario.mud-sm-table .mud-table-root,
    .fx-recepcion-inventario.mud-xs-table .mud-table-root {
        min-width: 0;
    }

    .fx-recepcion-table.mud-lg-table .mud-table-row,
    .fx-recepcion-table.mud-xl-table .mud-table-row,
    .fx-recepcion-table.mud-md-table .mud-table-row,
    .fx-recepcion-table.mud-sm-table .mud-table-row,
    .fx-recepcion-table.mud-xs-table .mud-table-row {
        margin-bottom: 10px;
        border: 1px solid #e4e8ee;
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
    }

    .fx-recepcion-table.mud-lg-table .mud-table-cell,
    .fx-recepcion-table.mud-xl-table .mud-table-cell,
    .fx-recepcion-table.mud-md-table .mud-table-cell,
    .fx-recepcion-table.mud-sm-table .mud-table-cell,
    .fx-recepcion-table.mud-xs-table .mud-table-cell {
        justify-content: flex-start;
        align-items: flex-start;
        gap: 12px;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        min-width: 0;
    }

    .fx-recepcion-table.mud-lg-table .mud-table-cell:before,
    .fx-recepcion-table.mud-xl-table .mud-table-cell:before,
    .fx-recepcion-table.mud-md-table .mud-table-cell:before,
    .fx-recepcion-table.mud-sm-table .mud-table-cell:before,
    .fx-recepcion-table.mud-xs-table .mud-table-cell:before {
        flex: 0 0 8rem;
        width: 8rem;
        max-width: 8rem;
        padding-right: 0;
        color: #64748b;
        font-weight: 500;
    }

    .fx-recepcion-table.mud-lg-table .fx-recepcion-nowrap,
    .fx-recepcion-table.mud-xl-table .fx-recepcion-nowrap,
    .fx-recepcion-table.mud-md-table .fx-recepcion-nowrap,
    .fx-recepcion-table.mud-sm-table .fx-recepcion-nowrap,
    .fx-recepcion-table.mud-xs-table .fx-recepcion-nowrap {
        white-space: nowrap;
    }

    .fx-recepcion-table.mud-lg-table .fx-recepcion-guia-cell,
    .fx-recepcion-table.mud-xl-table .fx-recepcion-guia-cell,
    .fx-recepcion-table.mud-md-table .fx-recepcion-guia-cell,
    .fx-recepcion-table.mud-sm-table .fx-recepcion-guia-cell,
    .fx-recepcion-table.mud-xs-table .fx-recepcion-guia-cell {
        background: #f8fafc;
        font-size: 1.02rem;
        border-bottom: 1px solid #eef2f6 !important;
    }

    .fx-recepcion-table.mud-lg-table .fx-wrap-chip,
    .fx-recepcion-table.mud-xl-table .fx-wrap-chip,
    .fx-recepcion-table.mud-md-table .fx-wrap-chip,
    .fx-recepcion-table.mud-sm-table .fx-wrap-chip,
    .fx-recepcion-table.mud-xs-table .fx-wrap-chip,
    .fx-recepcion-table.mud-lg-table .fx-wrap-action,
    .fx-recepcion-table.mud-xl-table .fx-wrap-action,
    .fx-recepcion-table.mud-md-table .fx-wrap-action,
    .fx-recepcion-table.mud-sm-table .fx-wrap-action,
    .fx-recepcion-table.mud-xs-table .fx-wrap-action {
        max-width: 100%;
    }

    .fx-recepcion-table.mud-lg-table .fx-wrap-action .mud-button-label,
    .fx-recepcion-table.mud-xl-table .fx-wrap-action .mud-button-label,
    .fx-recepcion-table.mud-md-table .fx-wrap-action .mud-button-label,
    .fx-recepcion-table.mud-sm-table .fx-wrap-action .mud-button-label,
    .fx-recepcion-table.mud-xs-table .fx-wrap-action .mud-button-label {
        white-space: normal;
        text-align: left;
        overflow-wrap: break-word;
        word-break: normal;
    }
}

.fx-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.fx-route-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.fx-route-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr) auto auto;
    align-items: start;
    gap: 12px;
}

.fx-route-filter-arrow {
    color: var(--mud-palette-text-secondary);
    margin-top: 12px;
}

.fx-native-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fx-native-select span {
    color: var(--mud-palette-text-secondary);
    font-size: .78rem;
    font-weight: 600;
}

.fx-native-select select {
    width: 100%;
    min-height: 40px;
    padding: 0 38px 0 12px;
    color: var(--mud-palette-text-primary);
    font: inherit;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
    outline: none;
}

.fx-native-select select:focus {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary);
}

.fx-native-select select:disabled {
    color: var(--mud-palette-text-disabled);
    background: var(--mud-palette-action-disabled-background);
}

.fx-route-card {
    padding: 18px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
    background: var(--mud-palette-surface);
}

.fx-route-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fx-route-path {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.fx-route-point {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fx-route-point .mud-typography {
    overflow-wrap: anywhere;
}

.fx-route-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--mud-palette-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    flex: 0 0 auto;
}

.fx-route-dot-end {
    background: var(--mud-palette-success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-success) 16%, transparent);
}

.fx-route-arrow {
    color: var(--mud-palette-text-secondary);
    flex: 0 0 auto;
}

.fx-route-meta,
.fx-route-config-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fx-route-configs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.fx-route-config {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
    overflow: hidden;
    background: var(--mud-palette-background);
}

.fx-route-config-head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
}

.fx-route-steps .mud-table-container {
    max-height: 420px;
    overflow: auto;
}

.fx-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
}

.fx-group-state-list {
    display: grid;
    gap: 14px;
}

.fx-group-state-card {
    padding: 0;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    overflow: hidden;
}

.fx-group-state-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mud-palette-divider);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}

.fx-group-state-table {
    display: grid;
}

.fx-group-state-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.fx-group-state-row:last-child {
    border-bottom: 0;
}

.fx-group-empty {
    padding: 16px;
    color: var(--mud-palette-text-secondary);
    font-size: .9rem;
}

.fx-user-groups {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.fx-user-section {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}

.fx-user-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--mud-palette-divider);
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
}

.fx-user-group-title {
    margin: 0;
    color: var(--mud-palette-primary);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.fx-user-classify-select {
    min-width: 180px;
    max-width: 220px;
}

.fx-user-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 4px 2px;
    margin-top: 4px;
    border-bottom: 1px dashed color-mix(in srgb, var(--mud-palette-primary) 18%, var(--mud-palette-divider));
}

.fx-user-subhead:first-child {
    margin-top: 0;
}

.fx-user-group-kicker {
    color: #ff4081;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fx-user-lines {
    display: grid;
    padding: 12px 14px 14px;
    gap: 8px;
}

.fx-user-line {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) minmax(120px, .6fr) minmax(200px, 1fr) 110px 40px;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 8px;
    background: var(--mud-palette-surface);
}

.fx-user-line-corp {
    /* identity | sucursal | empresa | precio | cr?dito | status | edit */
    grid-template-columns: minmax(180px, 1.2fr) minmax(90px, .5fr) minmax(120px, .75fr) minmax(90px, .45fr) minmax(100px, .5fr) 100px 40px;
}

.fx-user-identity {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.fx-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    color: #fff;
    background: var(--mud-palette-primary);
    font-weight: 800;
    flex: 0 0 auto;
}

.fx-user-line-name,
.fx-user-line-cell {
    color: var(--mud-palette-text-primary);
    font-size: .9rem;
}

.fx-user-line-name {
    overflow-wrap: anywhere;
}

.fx-user-line-mail {
    color: #ff4081;
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.fx-user-line-cell {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fx-user-line-cell > span:not(.fx-user-line-label) {
    overflow-wrap: anywhere;
}

.fx-user-credit-cell {
    min-width: 0;
}

.fx-user-line-label {
    color: var(--mud-palette-text-secondary);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fx-credit-ok {
    color: var(--mud-palette-success);
    font-weight: 800;
}

.fx-credit-missing {
    color: var(--mud-palette-error);
    font-weight: 800;
}

.fx-corporate-credit-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
}

.fx-corporate-credit-ok {
    background: color-mix(in srgb, var(--mud-palette-success) 8%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-success) 32%, var(--mud-palette-divider));
}

.fx-corporate-credit-warning {
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-warning) 36%, var(--mud-palette-divider));
}

.fx-user-status {
    align-self: center;
    justify-content: center;
    min-width: 92px;
}

.fx-perm-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.fx-perm-group-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.fx-perm-group-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 40%, var(--mud-palette-divider));
}

.fx-perm-group-card.is-active {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
}

.fx-perm-group-card.is-dirty {
    border-color: var(--mud-palette-warning);
    box-shadow: inset 0 0 0 1px var(--mud-palette-warning);
}

.fx-perm-group-name {
    font-weight: 600;
    font-size: .95rem;
}

.fx-perm-group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .78rem;
    color: var(--mud-palette-text-secondary);
}

.fx-perm-group-dirty {
    font-size: .72rem;
    font-weight: 600;
    color: var(--mud-palette-warning);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fx-perm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fx-perm-search {
    flex: 1 1 240px;
    max-width: 360px;
}

.fx-perm-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.fx-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.fx-permission-card {
    padding: 16px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
}

.fx-permission-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.fx-permission-card-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.fx-permission-list {
    display: grid;
    gap: 0;
    margin-top: 8px;
}

.fx-permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
    cursor: pointer;
}

.fx-permission-row:last-child {
    border-bottom: 0;
}

.fx-permission-row.is-off {
    opacity: .62;
}

.fx-corp-addresses .fx-panel {
    border: 1px solid rgba(15, 23, 42, .08);
}

.fx-corp-form {
    position: static;
}

.fx-corp-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.fx-ai-suggestion {
    border-radius: 8px;
}

.fx-address-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.fx-ai-suggestion-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.fx-ai-suggestion-content strong,
.fx-ai-suggestion-content span,
.fx-ai-suggestion-content small {
    display: block;
}

.fx-ai-suggestion-content span {
    margin-top: 3px;
    color: #1f2937;
}

.fx-ai-suggestion-content small {
    margin-top: 3px;
    color: #64748b;
}

.fx-corp-similar-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.fx-corp-similar {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .08);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: #334155;
    cursor: pointer;
}

.fx-corp-similar strong,
.fx-corp-similar small {
    display: block;
}

.fx-corp-similar small {
    margin-top: 2px;
    color: #64748b;
}

.fx-corp-address-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fx-corp-address-head .mud-input-control {
    max-width: 280px;
}

.fx-corp-filterbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, .7fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.fx-province-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fx-province-chip {
    border: 1px solid rgba(129, 74, 76, .24);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fx-province-chip strong {
    font-size: .78rem;
}

.fx-province-chip span {
    color: #64748b;
    font-size: .76rem;
}

.fx-province-chip.active {
    background: rgba(129, 74, 76, .10);
    border-color: #814a4c;
    color: #814a4c;
}

.fx-guide-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fx-guide-origin {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.fx-guide-origin-hidden {
    display: none;
}

.fx-guide-item {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.fx-guide-item + .fx-guide-item {
    margin-top: 14px;
}

.fx-guide-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fx-guide-fragil {
    min-height: 40px;
    align-items: center;
}

.fx-guide-summary {
    position: sticky;
    top: 88px;
}

.fx-guide-progress-cell {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 42px;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.fx-guide-progress-cell span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-align: right;
}

.fx-guides-table .mud-table-container {
    overflow-x: auto;
}

.fx-guides-table .mud-table-cell {
    white-space: normal;
    overflow-wrap: break-word;
}

.fx-guides-table .mud-table-root {
    width: 100%;
    min-width: 0;
}

.fx-guide-main-cell {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    min-width: 0;
}

.fx-guide-destinatario {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1f2937;
}

.fx-guide-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .45rem;
    font-size: .78rem;
    color: #667085;
    line-height: 1.3;
}

.fx-guide-meta-secondary {
    margin-top: .1rem;
}

.fx-guide-meta-ok {
    color: #15803d;
    font-weight: 600;
}

.fx-guide-meta-warn {
    color: #b45309;
    font-weight: 600;
}

.fx-guide-pack {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    white-space: nowrap;
}

.fx-guide-progress-inline {
    font-weight: 600;
    color: #475467;
    white-space: nowrap;
}

/* Modo tarjeta nativo de MudBlazor (Breakpoint.Md): limpio como el resto del sistema */
.fx-guides-table.mud-xs-table .mud-table-row:not(.fx-guide-child-row),
.fx-guides-table.mud-sm-table .mud-table-row:not(.fx-guide-child-row),
.fx-guides-table.mud-md-table .mud-table-row:not(.fx-guide-child-row),
.fx-guides-table.mud-lg-table .mud-table-row:not(.fx-guide-child-row) {
    margin-bottom: 10px;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.fx-guides-table.mud-xs-table .mud-table-cell,
.fx-guides-table.mud-sm-table .mud-table-cell,
.fx-guides-table.mud-md-table .mud-table-cell,
.fx-guides-table.mud-lg-table .mud-table-cell {
    align-items: flex-start;
    gap: 12px;
}

.fx-guides-table.mud-xs-table .mud-table-cell[data-label=""],
.fx-guides-table.mud-sm-table .mud-table-cell[data-label=""],
.fx-guides-table.mud-md-table .mud-table-cell[data-label=""],
.fx-guides-table.mud-lg-table .mud-table-cell[data-label=""] {
    justify-content: flex-start;
}

.fx-guides-table.mud-xs-table .mud-table-cell[data-label=""]::before,
.fx-guides-table.mud-sm-table .mud-table-cell[data-label=""]::before,
.fx-guides-table.mud-md-table .mud-table-cell[data-label=""]::before,
.fx-guides-table.mud-lg-table .mud-table-cell[data-label=""]::before {
    display: none;
    content: none;
}

.fx-guides-table.mud-xs-table .fx-guide-main-cell,
.fx-guides-table.mud-sm-table .fx-guide-main-cell,
.fx-guides-table.mud-md-table .fx-guide-main-cell,
.fx-guides-table.mud-lg-table .fx-guide-main-cell {
    width: 100%;
    text-align: left;
}

.fx-guides-table.mud-xs-table .mud-chip,
.fx-guides-table.mud-sm-table .mud-chip,
.fx-guides-table.mud-md-table .mud-chip,
.fx-guides-table.mud-lg-table .mud-chip {
    height: auto;
    min-height: 22px;
    white-space: normal;
}

.fx-guides-table.mud-xs-table .fx-guide-child-row > td,
.fx-guides-table.mud-sm-table .fx-guide-child-row > td,
.fx-guides-table.mud-md-table .fx-guide-child-row > td,
.fx-guides-table.mud-lg-table .fx-guide-child-row > td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
}

.fx-guides-table.mud-xs-table .fx-guide-child-row > td::before,
.fx-guides-table.mud-sm-table .fx-guide-child-row > td::before,
.fx-guides-table.mud-md-table .fx-guide-child-row > td::before,
.fx-guides-table.mud-lg-table .fx-guide-child-row > td::before {
    display: none;
    content: none;
}

.fx-tracking-panel {
    margin-top: 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.fx-tracking-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: #fbf9f9;
}

.fx-tracking-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0;
    padding: 14px;
}

.fx-tracking-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
}

.fx-tracking-step::before {
    content: "";
    position: absolute;
    left: 26px;
    right: -8px;
    top: 24px;
    height: 2px;
    background: #dbe2ef;
}

.fx-tracking-step.done::before {
    background: #22c55e;
}

.fx-tracking-marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    color: #64748b;
    background: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.fx-tracking-step.done .fx-tracking-marker {
    color: #fff;
    border-color: #22c55e;
    background: #22c55e;
}

.fx-tracking-step.current .fx-tracking-marker {
    box-shadow: 0 0 0 4px rgba(129, 74, 76, .14);
    border-color: #814a4c;
}

.fx-tracking-step.current:not(.done) .fx-tracking-marker {
    color: #fff;
    background: #814a4c;
}

.fx-tracking-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.fx-tracking-copy strong {
    color: #111827;
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.fx-tracking-copy span {
    color: #64748b;
    font-size: .76rem;
}

/* Variante inline del tracking (dentro de la fila expandida) */
.fx-tracking-inline {
    margin: 6px 8px 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fbf9f9;
    overflow: hidden;
}
.fx-tracking-inline .fx-tracking-head {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
}

/* Detalle expandido de Mis gu?as: ancho completo de la tabla, dos secciones apiladas */
.fx-guides-table .fx-guide-child-row > td.fx-guide-expand-cell,
.fx-guides-table .fx-guide-child-row > td {
    padding: 0 !important;
    border-top: 0 !important;
    vertical-align: top;
    width: 100%;
}

.fx-guide-expand {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f1f5f9;
    overflow: hidden;
}

.fx-guide-section {
    width: 100%;
    background: #fff;
    border-top: 1px solid #dbe3ee;
}

.fx-guide-section-packages { background: #fffaf8; }
.fx-guide-section-progress { background: #f8fafc; }

.fx-guide-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 16px 20px 12px;
    box-sizing: border-box;
}

.fx-guide-section-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #12213a;
}

.fx-guide-section-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: .84rem;
}

.fx-guide-section-head-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.fx-guide-section-head-side strong {
    font-size: 1.05rem;
    color: #814a4c;
}

.fx-guide-section-empty {
    margin: 0;
    padding: 8px 20px 18px;
    color: #64748b;
    font-size: .86rem;
}

.fx-guide-section-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 0 12px 16px;
    box-sizing: border-box;
}

.fx-guide-section-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}

.fx-guide-section-table th,
.fx-guide-section-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e8edf4;
    font-size: .86rem;
    vertical-align: middle;
}

.fx-guide-section-table th {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
    background: #fff;
}

.fx-guide-section-table tbody tr:last-child td { border-bottom: 0; }

.fx-guide-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff1e8;
    color: #9a3412;
    font-size: .72rem;
    font-weight: 700;
}

.fx-guide-facts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 0 20px 16px;
    box-sizing: border-box;
}

.fx-guide-facts > div {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.fx-guide-facts span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fx-guide-facts strong {
    display: block;
    color: #12213a;
    font-size: .9rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.fx-guide-progress-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
    padding: 0 20px 20px;
    box-sizing: border-box;
}

.fx-guide-progress-step {
    display: grid;
    justify-items: start;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.fx-guide-progress-step.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.fx-guide-progress-step.is-current {
    border-color: #d6a5a7;
    background: #faf5f5;
    box-shadow: inset 0 0 0 1px rgba(129, 74, 76, .18);
}

.fx-guide-progress-step.is-pending { opacity: .78; }

.fx-guide-progress-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
}

.fx-guide-progress-step.is-done .fx-guide-progress-marker {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}

.fx-guide-progress-step.is-current .fx-guide-progress-marker {
    border-color: #814a4c;
    background: #814a4c;
    color: #fff;
}

.fx-guide-progress-step strong {
    color: #12213a;
    font-size: .82rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fx-guide-progress-step span {
    color: #64748b;
    font-size: .74rem;
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .fx-guide-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .fx-guide-section-head,
    .fx-guide-section-head-side {
        flex-direction: column;
        align-items: stretch;
    }
    .fx-guide-section-head-side { justify-content: flex-start; }
    .fx-guide-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-left: 12px;
        padding-right: 12px;
    }
    .fx-guide-progress-full {
        grid-template-columns: 1fr 1fr;
        padding-left: 12px;
        padding-right: 12px;
    }
    .fx-guide-section-table { min-width: 0; }
    .fx-guide-section-table thead { display: none; }
    .fx-guide-section-table,
    .fx-guide-section-table tbody,
    .fx-guide-section-table tr,
    .fx-guide-section-table td {
        display: block;
        width: 100%;
    }
    .fx-guide-section-table tr {
        padding: 10px 0;
        border-bottom: 1px solid #e8edf4;
    }
    .fx-guide-section-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 4px;
        border: 0;
    }
    .fx-guide-section-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
    }
}

/* MudTable envuelve ChildRowContent en su propio <tr>. Como necesitamos
   ocultar visualmente los hijos no expandidos, anulamos su tama?o. */
.fx-table tr.fx-row-collapsed > td {
    padding: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    height: 0 !important;
}
.fx-table tr.fx-row-collapsed > td > .fx-tracking-inline,
.fx-table tr.fx-row-collapsed > td > .fx-guide-expand {
    display: none;
}

.fx-guide-detail-section {
    margin: 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    overflow: hidden;
}

.fx-guide-items-section {
    background: rgba(129, 74, 76, .045);
}

.fx-guide-progress-section {
    background: rgba(37, 99, 235, .045);
}

.fx-guide-detail-section + .fx-guide-detail-section {
    margin-top: 0;
}

.fx-guide-detail-section .fx-tracking-head {
    background: rgba(255, 255, 255, .82);
}

.fx-guide-detail-section .fx-package-table {
    margin: 10px 14px 14px;
    width: calc(100% - 28px);
    background: #fff;
    border-radius: 8px;
}

.fx-query-tabs {
    margin-top: 14px;
}

.fx-consulta-global-table .fx-query-subrow > td {
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: rgba(248, 250, 252, .85);
}

.fx-query-subrow-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 20px;
    padding: 4px 8px 2px;
}

.fx-query-subrow-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.fx-query-subrow-block.fx-query-subrow-detalle {
    flex: 1 1 220px;
}

.fx-query-subrow-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}

.fx-main-full {
    margin-left: 0 !important;
    width: 100%;
}

.fx-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.fx-section-title h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--fx-ink);
}

.fx-section-title p {
    margin: 4px 0 0;
    color: var(--fx-muted);
    font-size: .9rem;
}

.fx-row-fragil td {
    background: rgba(220, 38, 38, .06);
}

.fx-cell-muted {
  display: inline-block;
  max-width: 360px;
  color: var(--fx-muted);
  font-size: .82rem;
  line-height: 1.35;
}

.fx-pickup-alert {
  border-left: 6px solid #7f1d1d;
  box-shadow: 0 8px 24px rgba(127, 29, 29, .18);
}

.fx-corte-alert .fx-corte-alert-cta {
  background: #fff !important;
  color: #7f1d1d !important;
  font-weight: 700;
  white-space: nowrap;
}

.fx-cierre-checklist {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.fx-cierre-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e6e8ef;
  background: #fff;
}

.fx-cierre-item.is-pending {
  border-color: rgba(185, 28, 28, .35);
  background: #fef2f2;
}

.fx-cierre-item.is-ok {
  border-color: rgba(22, 101, 52, .25);
  background: #f0fdf4;
}

.fx-cierre-item.is-info {
  background: #fafbfc;
}

.fx-cierre-copy {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.fx-cierre-copy strong {
  color: #1f2330;
}

.fx-cierre-copy span {
  color: #697186;
  font-size: .86rem;
}

.fx-pickup-alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fx-suc-cola-urgente {
  border: 1px solid rgba(220, 38, 38, .35);
  box-shadow: 0 4px 14px rgba(220, 38, 38, .08);
}

.fx-suc-cola-card:hover {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.fx-pickup-client-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.45;
}

.fx-pickup-client-list li + li {
  margin-top: 0.25rem;
}

/* Avisos internos para la operaci?n de sucursales */
.fx-branch-notice-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.fx-branch-notice { margin: 0; border-left: 6px solid currentColor; box-shadow: 0 5px 16px rgba(15, 23, 42, .12); }
.fx-branch-notice-content { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.fx-branch-notice-content .mud-typography-subtitle2 { margin-bottom: 3px; font-weight: 800; }
.fx-branch-notice-content .mud-chip { flex: 0 0 auto; }
.fx-branch-notice-compose { padding: 16px; }
.fx-login-public-notices {
    display: grid;
    width: 100%;
    gap: 8px;
    margin: 0;
}
.fx-login-public-notices-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.fx-login-public-notices .mud-alert {
    margin: 0;
    font-size: .82rem;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
}

.fx-tv-monitor {
  min-height: 100vh;
  padding: 28px 34px;
  background: #111827;
  color: #f9fafb;
}

/* Escala a viewport (lienzo 1920×1080) — solo cuando FitViewport=true */
html.fx-tv-fit-active,
html.fx-tv-fit-active body {
  overflow: hidden;
  height: 100%;
  margin: 0;
}
.fx-tv-fit {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #111827;
  position: relative;
}
.fx-tv-fit-stage {
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  overflow: hidden;
  will-change: transform;
}
.fx-tv-fit .fx-tv-monitor {
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 28px 16px;
  gap: 0;
}
/* Tipografía fija al lienzo 1920×1080 (no vw del monitor real) */
.fx-tv-fit .fx-tv-head {
  flex-shrink: 0;
  padding-bottom: 12px;
  gap: 1.25rem;
}
.fx-tv-fit .fx-tv-head h1 {
  font-size: 2.55rem;
  margin: 4px 0 2px;
}
.fx-tv-fit .fx-tv-head p { font-size: .95rem; }
.fx-tv-fit .fx-tv-clock strong { font-size: 2.75rem; }
.fx-tv-fit .fx-tv-kpis {
  margin: 12px 0 10px;
  gap: 12px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-kpi {
  padding: 10px 12px;
}
.fx-tv-fit .fx-tv-kpi strong { font-size: 2.35rem; }
.fx-tv-fit .fx-tv-mode {
  margin: 0 0 8px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-sort {
  margin: 4px 0 6px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-recent {
  margin: 0 0 8px;
  padding: 8px 12px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-board-meta {
  margin: 0 0 10px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-footer {
  margin-top: 10px;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-cards {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  gap: 14px 16px;
  align-content: stretch;
}
.fx-tv-fit .fx-tv-cards--eight {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.fx-tv-fit .fx-tv-empty {
  flex: 1 1 auto;
  min-height: 0;
}
/* Tarjetas: llenan la celda y repartén el contenido en vertical */
.fx-tv-fit .fx-tv-card,
.fx-tv-fit .fx-tv-cards--roomy .fx-tv-card {
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 14px 16px 12px;
  gap: 6px;
  justify-content: flex-start;
  overflow: hidden;
}
.fx-tv-fit .fx-tv-card-top { flex-shrink: 0; }
.fx-tv-fit .fx-tv-card-guide {
  font-size: 1.7rem;
  line-height: 1.1;
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.fx-tv-fit .fx-tv-cards--roomy .fx-tv-card-guide {
  font-size: 1.85rem;
}
.fx-tv-fit .fx-tv-card-route {
  font-size: 1rem;
  flex-shrink: 0;
}
.fx-tv-fit .fx-tv-cards--roomy .fx-tv-card-route {
  font-size: 1.05rem;
}
.fx-tv-fit .fx-tv-card-detail {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  font-size: .9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: normal;
}
.fx-tv-fit .fx-tv-card-metrics {
  margin-top: auto;
  flex-shrink: 0;
  gap: 8px;
}
.fx-tv-fit .fx-tv-card-metrics > div {
  padding: 8px 4px;
}
.fx-tv-fit .fx-tv-card-metrics strong {
  font-size: 1.65rem;
}
.fx-tv-fit .fx-tv-cards--roomy .fx-tv-card-metrics strong {
  font-size: 1.8rem;
}
.fx-tv-fit .fx-tv-cards--roomy .fx-tv-card-pct {
  font-size: 1.25rem;
}
.fx-tv-fit .fx-tv-card-bar {
  flex-shrink: 0;
  margin-top: 2px;
}
.fx-tv-fit .fx-tv-card-foot {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: .8rem;
}
.fx-tv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.16);
  padding-bottom: 20px;
}

.fx-tv-kicker {
  color: #fca5a5;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.fx-tv-head h1 {
  margin: 5px 0 4px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

.fx-tv-head p { margin: 0; color: #cbd5e1; font-size: 1rem; }
.fx-tv-clock { text-align: right; color: #cbd5e1; }
.fx-tv-clock strong { display: block; color: #fff; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; }
.fx-tv-clock span { font-size: 1rem; }
.fx-tv-exit {
  display: inline-block;
  margin-top: 10px;
  font-size: .85rem;
  color: #fca5a5;
  text-decoration: none;
  border: 1px solid rgba(252, 165, 165, .45);
  border-radius: 6px;
  padding: 4px 10px;
}
.fx-tv-exit:hover { color: #fff; border-color: #fca5a5; background: rgba(127, 29, 29, .35); }

.fx-tv-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.fx-tv-mode button {
  border: 1px solid rgba(255,255,255,.2);
  background: #1f2937;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.fx-tv-mode button.is-on {
  background: #814a4c;
  border-color: #a66b6d;
  color: #fff;
}
.fx-tv-mode-hint { color: #94a3b8; font-size: .9rem; }

.fx-tv-recent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, .35);
  background: rgba(22, 101, 52, .22);
  overflow: hidden;
}
.fx-tv-recent strong {
  color: #86efac;
  white-space: nowrap;
  font-size: .95rem;
}
.fx-tv-recent-track {
  display: flex;
  gap: 8px;
  overflow: hidden;
  flex-wrap: wrap;
}
.fx-tv-recent-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .45);
  color: #bbf7d0;
  font-weight: 700;
  font-size: .9rem;
}
.fx-tv-card-detail {
  color: #94a3b8;
  font-size: .88rem;
  white-space: pre-line;
  line-height: 1.35;
  max-height: 2.8em;
  overflow: hidden;
}
.fx-tv-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  color: #94a3b8;
  font-size: .9rem;
}
.fx-tv-sort > span { margin-right: 4px; font-weight: 600; color: #cbd5e1; }
.fx-tv-sort button {
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(15, 23, 42, .55);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .85rem;
  cursor: pointer;
}
.fx-tv-sort button.is-on {
  border-color: #f87171;
  background: rgba(127, 29, 29, .45);
  color: #fff;
  font-weight: 600;
}

.fx-tv-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.fx-tv-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.fx-tv-board-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 14px;
}
.fx-tv-board-meta strong {
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: .02em;
}
.fx-tv-board-meta span { color: #94a3b8; font-size: .95rem; }

.fx-tv-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-height: 48vh;
  align-content: start;
}
.fx-tv-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 14px;
  border-radius: 12px;
  border: 1px solid #374151;
  background: #1f2937;
  min-height: 168px;
}
.fx-tv-card.is-red {
  border-color: rgba(239, 68, 68, .55);
  box-shadow: inset 5px 0 0 #ef4444;
  background: linear-gradient(180deg, #2a1518 0%, #1f2937 55%);
}
.fx-tv-card.is-yellow {
  border-color: rgba(251, 191, 36, .45);
  box-shadow: inset 5px 0 0 #fbbf24;
  background: linear-gradient(180deg, #2a2414 0%, #1f2937 55%);
}
.fx-tv-card.is-green {
  border-color: rgba(34, 197, 94, .45);
  box-shadow: inset 5px 0 0 #22c55e;
  background: linear-gradient(180deg, #14241a 0%, #1f2937 55%);
}
.fx-tv-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fx-tv-card-status {
  flex: 1;
  color: #f8fafc;
  font-size: .95rem;
  letter-spacing: .04em;
}
.fx-tv-card-pct {
  color: #e2e8f0;
  font-size: 1.15rem;
  font-weight: 800;
}
.fx-tv-card-guide {
  color: #fff;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
}
.fx-tv-card-route {
  color: #cbd5e1;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-tv-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.fx-tv-card-metrics > div {
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .45);
}
.fx-tv-card-metrics span {
  display: block;
  color: #94a3b8;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fx-tv-card-metrics strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
}
.fx-tv-card-bar { margin-top: 2px; }
.fx-tv-card-foot {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: .82rem;
  margin-top: auto;
}

.fx-tv-cards--roomy .fx-tv-card {
  min-height: 220px;
  padding: 18px 20px 16px;
  gap: 10px;
}
.fx-tv-cards--roomy .fx-tv-card-guide {
  font-size: clamp(1.85rem, 2.8vw, 2.45rem);
}
.fx-tv-cards--roomy .fx-tv-card-route {
  font-size: 1.15rem;
}
.fx-tv-cards--roomy .fx-tv-card-metrics strong {
  font-size: 1.75rem;
}
.fx-tv-cards--roomy .fx-tv-card-pct {
  font-size: 1.3rem;
}

@media (max-width: 1400px) {
  .fx-tv-cards:not(.fx-tv-cards--eight) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx-tv-kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .fx-tv-cards:not(.fx-tv-cards--eight) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Kiosco TV login */
.fx-tv-kiosk {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #111827 0%, #1f2937 55%, #3f2a2b 100%);
  color: #f8fafc;
}
.fx-tv-kiosk-card {
  width: min(420px, 100%);
  padding: 28px 24px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.fx-tv-kiosk-card h1 {
  margin: 8px 0 4px;
  font-size: 1.8rem;
}
.fx-tv-kiosk-card p { margin: 0 0 18px; color: #cbd5e1; }
.fx-tv-kiosk-card label {
  display: block;
  margin: 12px 0 6px;
  color: #94a3b8;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.fx-tv-kiosk-card input,
.fx-tv-kiosk-card select {
  width: 100%;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #fff;
  font-size: 1.2rem;
}
.fx-tv-kiosk-card button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: #814a4c;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}
.fx-tv-kiosk-error {
  margin-top: 12px;
  color: #fca5a5;
  font-weight: 600;
}

/* Manifiesto digital m?vil */
.fx-manifest-digital {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}
.fx-manifest-digital-head h1 { margin: 0; font-size: 1.35rem; }
.fx-manifest-digital-head p { margin: 4px 0 12px; color: #64748b; }
.fx-manifest-digital-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.fx-manifest-digital-meta div {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.fx-manifest-digital-meta b { display: block; font-size: .72rem; color: #64748b; text-transform: uppercase; }
.fx-manifest-digital-provincia {
  margin: 18px 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #1f2937;
}
.fx-manifest-digital-distrito {
  margin: 8px 0 4px;
  padding-left: 8px;
  font-weight: 700;
  color: #814a4c;
}
.fx-manifest-digital-client {
  margin: 16px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #814a4c;
  color: #fff;
  font-weight: 700;
}
.fx-manifest-digital-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.fx-manifest-digital-item strong { font-size: 1.05rem; }
.fx-manifest-digital-item span { color: #64748b; font-size: .9rem; }
.fx-manifest-digital-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.95);
  border-top: 1px solid #e2e8f0;
  backdrop-filter: blur(6px);
}

.fx-tv-kpi {
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: #1f2937;
}

.fx-tv-kpi span { display: block; color: #cbd5e1; font-size: 1rem; }
.fx-tv-kpi strong { display: block; margin-top: 4px; color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; }
.fx-tv-kpi .is-warning, .fx-tv-guide .is-warning { color: #fbbf24; }
.fx-tv-kpi .is-success, .fx-tv-guide .is-success { color: #4ade80; }

.fx-tv-progress-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 16px; }
.fx-tv-progress-summary > div { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; border: 1px solid #374151; border-radius: 8px; background: #17202e; }
.fx-tv-progress-summary span { color: #cbd5e1; font-size: .95rem; }
.fx-tv-progress-summary strong { color: #fff; font-size: 1.65rem; }
.fx-tv-list-wrap { overflow: hidden; border: 1px solid #374151; border-radius: 10px; background: #1f2937; }
.fx-tv-list { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fx-tv-list th { padding: 10px 8px; background: #374151; color: #e5e7eb; font-size: .78rem; text-align: left; text-transform: uppercase; }
.fx-tv-list td { padding: 9px 8px; border-top: 1px solid #374151; color: #f9fafb; font-size: .92rem; vertical-align: middle; }
.fx-tv-list tbody tr.is-red { border-left: 5px solid #ef4444; }
.fx-tv-list tbody tr.is-yellow { border-left: 5px solid #fbbf24; }
.fx-tv-list tbody tr.is-green { border-left: 5px solid #22c55e; opacity: .8; }
.fx-tv-list th:nth-child(1) { width: 12%; }
.fx-tv-list th:nth-child(2) { width: 12%; }
.fx-tv-list th:nth-child(3) { width: 14%; }
.fx-tv-list th:nth-child(4) { width: 19%; }
.fx-tv-list th:nth-child(5), .fx-tv-list th:nth-child(6), .fx-tv-list th:nth-child(7) { width: 6%; }
.fx-tv-list th:nth-child(8) { width: 13%; }
.fx-tv-list th:nth-child(9) { width: 12%; }
.fx-tv-light { display: inline-block; width: 15px; height: 15px; margin-right: 6px; border-radius: 50%; vertical-align: -2px; box-shadow: 0 0 8px currentColor; }
.fx-tv-light.is-red { color: #ef4444; background: #ef4444; }
.fx-tv-light.is-yellow { color: #fbbf24; background: #fbbf24; }
.fx-tv-light.is-green { color: #22c55e; background: #22c55e; }
.fx-tv-list td.is-success, .fx-tv-kpi .is-success, .fx-tv-progress-summary .is-success { color: #4ade80; }
.fx-tv-list td.is-warning, .fx-tv-kpi .is-warning, .fx-tv-progress-summary .is-warning { color: #fbbf24; }
.fx-tv-guide-number { display: block; font-size: 1.1rem; }
.fx-tv-subline { display: block; overflow: hidden; color: #9ca3af; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.fx-tv-number { font-size: 1.3rem !important; font-weight: 800; text-align: center; }
.fx-tv-progress-cell strong { display: block; margin-bottom: 4px; font-size: 1.15rem; }
.fx-tv-guide-foot { display: flex; justify-content: space-between; margin-top: 7px; color: #cbd5e1; font-size: .85rem; }
.fx-tv-footer { display: flex; justify-content: space-between; margin-top: 16px; color: #cbd5e1; font-size: .9rem; }
.fx-tv-empty { display: flex; min-height: 48vh; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: #d1d5db; }
.fx-tv-empty .mud-icon-root { color: #4ade80; font-size: 5rem; }
.fx-tv-empty strong { color: #fff; font-size: 2.2rem; }
.fx-tv-empty span { font-size: 1.1rem; }

@media (max-width: 1100px) {
  .fx-tv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .fx-tv-monitor { padding: 18px; }
  .fx-tv-head { align-items: flex-start; flex-direction: column; }
  .fx-tv-clock { text-align: left; }
  .fx-tv-list-wrap { overflow-x: auto; }
  .fx-tv-list { min-width: 1050px; }
  .fx-tv-footer { flex-direction: column; gap: 5px; }
}

/* Kiosco: una sola pantalla. El tamaño sale del área visible (dvh/vw), no de una resolución fija. */
html:has(.fx-tv-board),
html:has(.fx-tv-board) body {
  height: 100%;
  overflow: hidden;
}
.fx-tv-board.fx-tv-monitor {
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(8px, 1.2vh, 18px) clamp(12px, 1.4vw, 28px);
  gap: 0;
}
.fx-tv-board .fx-tv-head {
  flex-shrink: 0;
  align-items: center;
  flex-direction: row;
  gap: clamp(0.75rem, 1.5vw, 2rem);
  padding-bottom: clamp(6px, 0.8vh, 14px);
}
.fx-tv-board .fx-tv-head h1 {
  margin: 2px 0;
  font-size: clamp(1.35rem, 3.6vh, 2.55rem);
  line-height: 1.05;
}
.fx-tv-board .fx-tv-head p {
  font-size: clamp(0.75rem, 1.5vh, 1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-tv-board .fx-tv-kicker {
  font-size: clamp(0.62rem, 1.2vh, 0.78rem);
}
.fx-tv-board .fx-tv-clock { text-align: right; flex-shrink: 0; }
.fx-tv-board .fx-tv-clock strong {
  font-size: clamp(1.35rem, 4vh, 2.75rem);
}
.fx-tv-board .fx-tv-clock span { font-size: clamp(0.75rem, 1.5vh, 1rem); }
.fx-tv-board .fx-tv-exit {
  margin-top: clamp(4px, 0.5vh, 8px);
  padding: 2px 8px;
  font-size: clamp(0.7rem, 1.3vh, 0.85rem);
}
.fx-tv-board .fx-tv-kpis,
.fx-tv-board .fx-tv-kpis--5 {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(8px, 1vh, 14px);
  margin: clamp(6px, 0.9vh, 12px) 0;
  flex-shrink: 0;
}
.fx-tv-board .fx-tv-kpi {
  padding: clamp(6px, 0.7vh, 12px) clamp(8px, 0.7vw, 14px);
  min-width: 0;
}
.fx-tv-board .fx-tv-kpi span {
  font-size: clamp(0.72rem, 1.5vh, 0.95rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-tv-board .fx-tv-kpi strong {
  margin-top: 2px;
  font-size: clamp(1.35rem, 4vh, 2.6rem);
}
.fx-tv-board .fx-tv-mode,
.fx-tv-board .fx-tv-sort {
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: clamp(6px, 0.6vw, 10px);
  margin: 0 0 clamp(4px, 0.6vh, 8px);
}
.fx-tv-board .fx-tv-mode button,
.fx-tv-board .fx-tv-sort button {
  flex-shrink: 0;
  white-space: nowrap;
  padding: clamp(4px, 0.55vh, 8px) clamp(8px, 0.7vw, 14px);
  font-size: clamp(0.72rem, 1.45vh, 0.85rem);
}
.fx-tv-board .fx-tv-mode-hint {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.7rem, 1.4vh, 0.9rem);
}
.fx-tv-board .fx-tv-recent {
  flex-shrink: 0;
  flex-wrap: nowrap;
  min-width: 0;
  margin: 0 0 clamp(4px, 0.6vh, 8px);
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 0.8vw, 12px);
  gap: 8px;
}
.fx-tv-board .fx-tv-recent-track {
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
}
.fx-tv-board .fx-tv-recent-chip {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: clamp(0.72rem, 1.4vh, 0.9rem);
}
.fx-tv-board .fx-tv-board-meta {
  flex-shrink: 0;
  margin: 0 0 clamp(4px, 0.6vh, 8px);
}
.fx-tv-board .fx-tv-board-meta strong {
  font-size: clamp(0.9rem, 1.8vh, 1.15rem);
}
.fx-tv-board .fx-tv-board-meta span {
  font-size: clamp(0.72rem, 1.4vh, 0.95rem);
  white-space: nowrap;
}
.fx-tv-board .fx-tv-cards,
.fx-tv-board .fx-tv-cards--eight {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  gap: clamp(8px, 1vh, 14px);
  align-content: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.fx-tv-board .fx-tv-empty {
  flex: 1 1 auto;
  min-height: 0;
}
.fx-tv-board .fx-tv-card,
.fx-tv-board .fx-tv-cards--roomy .fx-tv-card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: clamp(8px, 1vh, 14px) clamp(10px, 0.8vw, 16px);
  gap: clamp(3px, 0.45vh, 6px);
}
.fx-tv-board .fx-tv-card-top,
.fx-tv-board .fx-tv-card-route,
.fx-tv-board .fx-tv-card-metrics,
.fx-tv-board .fx-tv-card-bar,
.fx-tv-board .fx-tv-card-foot {
  flex-shrink: 0;
}
.fx-tv-board .fx-tv-card-guide,
.fx-tv-board .fx-tv-cards--roomy .fx-tv-card-guide {
  flex-shrink: 0;
  font-size: clamp(1.05rem, 2.5vh, 1.85rem);
  line-height: 1.1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.fx-tv-board .fx-tv-card-route,
.fx-tv-board .fx-tv-cards--roomy .fx-tv-card-route {
  font-size: clamp(0.75rem, 1.6vh, 1.05rem);
}
.fx-tv-board .fx-tv-card-detail {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  font-size: clamp(0.68rem, 1.35vh, 0.88rem);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}
.fx-tv-board .fx-tv-card-metrics {
  margin-top: auto;
  gap: clamp(4px, 0.5vh, 8px);
}
.fx-tv-board .fx-tv-card-metrics > div {
  padding: clamp(3px, 0.4vh, 6px) 4px;
}
.fx-tv-board .fx-tv-card-metrics span {
  font-size: clamp(0.58rem, 1.1vh, 0.72rem);
}
.fx-tv-board .fx-tv-card-metrics strong,
.fx-tv-board .fx-tv-cards--roomy .fx-tv-card-metrics strong {
  font-size: clamp(1rem, 2.3vh, 1.7rem);
}
.fx-tv-board .fx-tv-card-pct,
.fx-tv-board .fx-tv-cards--roomy .fx-tv-card-pct {
  font-size: clamp(0.85rem, 1.7vh, 1.25rem);
}
.fx-tv-board .fx-tv-card-status { font-size: clamp(0.68rem, 1.3vh, 0.95rem); }
.fx-tv-board .fx-tv-card-foot {
  margin-top: 0;
  font-size: clamp(0.65rem, 1.2vh, 0.82rem);
}
.fx-tv-board .fx-tv-card-foot span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.fx-tv-board .fx-tv-footer {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: clamp(4px, 0.6vh, 10px);
  font-size: clamp(0.68rem, 1.3vh, 0.9rem);
}
.fx-tv-board .fx-tv-footer span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 680px) {
  .fx-pickup-alert-content {
    align-items: stretch;
    flex-direction: column;
  }
  .fx-cierre-item {
    align-items: stretch;
    flex-direction: column;
  }
  .fx-cierre-item .mud-button-root {
    width: 100%;
  }
  .fx-branch-notice-content { align-items: stretch; flex-direction: column; }
  .fx-branch-notice-content .mud-chip { align-self: flex-start; }
}

/* Resumen / desglose por provincia */
.fx-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 14px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.fx-stat-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    color: #1f2937;
    font-size: .82rem;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease;
}
.fx-stat-pill strong {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}
.fx-stat-total {
    background: rgba(129, 74, 76, .08);
    border-color: rgba(129, 74, 76, .25);
    color: #814a4c;
}
.fx-stat-total strong {
    color: #814a4c;
}
.fx-stat-prov {
    cursor: pointer;
    user-select: none;
}
.fx-stat-prov:hover {
    background: #fbf9f9;
    border-color: rgba(129, 74, 76, .35);
}
.fx-stat-prov.active {
    background: rgba(129, 74, 76, .12);
    border-color: rgba(129, 74, 76, .55);
    color: #814a4c;
}
.fx-stat-prov.active strong {
    color: #814a4c;
}
.fx-stats-divider {
    display: inline-block;
    width: 1px;
    height: 22px;
    background: rgba(15, 23, 42, .12);
    margin: 0 4px;
}
.fx-stats-empty {
    color: #94a3b8;
    font-size: .82rem;
    font-style: italic;
}

/* Fila resaltada por deep-link o filtro de provincia */
.fx-table .mud-table-row.fx-row-selected td {
    background: rgba(129, 74, 76, .07);
}
.fx-table .mud-table-row.fx-row-prov-highlight td {
    background: rgba(129, 74, 76, .035);
}

.fx-billing-stat {
    display: grid;
    gap: 6px;
    min-height: 88px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
}

.fx-billing-stat span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fx-billing-stat strong {
    color: #111827;
    font-size: 1.35rem;
}

.fx-billing-stat.due {
    background: rgba(129, 74, 76, .07);
    border-color: rgba(129, 74, 76, .24);
}

.fx-billing-stat.due strong {
    color: #814a4c;
}

.fx-amazon-track {
    display: grid;
    gap: 16px;
}

.fx-corp-guia-simple {
    display: grid;
    gap: 0;
    max-width: 880px;
}

.fx-amazon-track-hero {
    padding: 4px 2px 8px;
}

.fx-amazon-track-hero p {
    margin: 4px 0 0;
    color: var(--mud-palette-text-secondary);
    font-size: .95rem;
}

.fx-amazon-eta {
    margin: 8px 0 0 !important;
    color: var(--mud-palette-primary) !important;
    font-weight: 800;
    font-size: 1.05rem !important;
}

.fx-amazon-eta small {
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.fx-amazon-list {
    display: grid;
    gap: 12px;
    padding: 4px 0 8px;
}

.fx-amazon-card {
    display: grid;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 16px 18px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.fx-amazon-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 35%, var(--mud-palette-divider));
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}

.fx-amazon-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
}

.fx-amazon-card-top strong {
    font-size: 1.05rem;
}

.fx-amazon-card-top span {
    color: var(--mud-palette-primary);
    font-weight: 800;
}

.fx-amazon-card-sub {
    margin: 0;
    color: var(--mud-palette-text-secondary);
    font-size: .88rem;
}

.fx-amazon-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
}

.fx-amazon-mini-step {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.fx-amazon-mini-step span {
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: #e2e8f0;
}

.fx-amazon-mini-step.is-done span { background: #22c55e; }
.fx-amazon-mini-step.is-now span { background: var(--mud-palette-primary); }
.fx-amazon-mini-step.is-pending span { background: #e2e8f0; }

.fx-amazon-mini-step small {
    color: #64748b;
    font-size: .68rem;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-amazon-mini-step.is-now small {
    color: var(--mud-palette-primary);
    font-weight: 700;
}

.fx-amazon-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: .86rem;
}

.fx-amazon-card-foot em {
    font-style: normal;
    font-weight: 800;
    color: #c2410c;
}

.fx-amazon-card-foot span {
    color: var(--mud-palette-primary);
    font-weight: 700;
}

/* === Dashboard corporativo === */
.fx-dash-alert {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fb923c;
    border-left: 6px solid #ea580c;
    border-radius: 10px;
    padding: 16px 20px;
}
.fx-dash-alert-body {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.fx-dash-alert-text { flex: 1 1 280px; display: grid; gap: 2px; }
.fx-dash-alert-text strong { color: #9a3412; font-size: 1rem; }
.fx-dash-alert-text span { color: #c2410c; font-size: .86rem; }
.fx-dash-alert-amount { color: #9a3412; font-size: 2rem; font-weight: 800; line-height: 1; white-space: nowrap; }

.fx-dash-notice {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-left: 6px solid #2563eb;
    border-radius: 10px;
    padding: 16px 20px;
}
.fx-dash-notice .fx-dash-alert-text strong { color: #1e3a8a; }
.fx-dash-notice .fx-dash-alert-text span { color: #1d4ed8; }

.fx-dash-kpi {
    position: relative;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-left-width: 4px;
    border-radius: 10px;
    padding: 14px 16px 12px;
    display: grid;
    gap: 4px;
    min-height: 96px;
}
.fx-dash-kpi-blue   { border-left-color: #38bdf8; }
.fx-dash-kpi-green  { border-left-color: #22c55e; }
.fx-dash-kpi-amber  { border-left-color: #f59e0b; }
.fx-dash-kpi-purple { border-left-color: #814a4c; }
.fx-dash-kpi-red    { border-left-color: #ef4444; }
.fx-dash-kpi-label { color: var(--mud-palette-text-secondary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fx-dash-kpi-value { font-size: 1.7rem; font-weight: 800; color: #0f172a; line-height: 1.1; }
.fx-dash-kpi-foot  { color: var(--mud-palette-text-secondary); font-size: .82rem; }

.fx-dash-mini {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fx-dash-mini-label { color: var(--mud-palette-text-secondary); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.fx-dash-mini-value { font-size: 1.2rem; font-weight: 800; color: #0f172a; }

.fx-page-sub-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin: 0; }
.fx-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }

/* KPI cards estilo "relleno" usados en la p?gina de detalle de gu?a */
.fx-dash-kpi-fill {
    background: linear-gradient(135deg, #814a4c 0%, #111111 100%);
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 6px 16px rgba(129, 74, 76, .22);
}
.fx-dash-kpi-fill.fx-dash-fill-blue {
    background: linear-gradient(135deg, #814a4c 0%, #a66b6d 100%);
}
.fx-dash-fill-label { font-size: .72rem; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }
.fx-dash-fill-value { font-size: 1.65rem; font-weight: 800; line-height: 1.1; }

.fx-card-title { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0 0 14px; }
.fx-card-label { display: block; color: #94a3b8; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.fx-card-value { display: block; color: #0f172a; font-size: .92rem; line-height: 1.35; word-break: break-word; }

/* Detalle guía: Origen | Destino lado a lado */
.fx-od-col {
    height: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
}
.fx-od-col--origen { border-left: 3px solid #2563eb; }
.fx-od-col--destino { border-left: 3px solid #ea580c; }
.fx-od-col-title {
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 12px;
    color: #0f172a;
}
.fx-od-col--origen .fx-od-col-title { color: #1d4ed8; }
.fx-od-col--destino .fx-od-col-title { color: #c2410c; }
.fx-od-field { margin-bottom: 10px; }
.fx-od-field:last-child { margin-bottom: 0; }

.fx-summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.fx-detail-history { list-style: none; padding: 0; margin: 0; }
.fx-detail-history li { padding: 8px 0; border-bottom: 1px dashed rgba(15,23,42,.1); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx-detail-history li:last-child { border-bottom: 0; }
.fx-detail-history-date { color: #475569; font-size: .82rem; min-width: 110px; }
.fx-detail-history-state { font-weight: 600; color: #0f172a; }
.fx-detail-history-user { color: #94a3b8; font-size: .8rem; }
.fx-detail-history-map { margin-left: auto; }

/* Ruta visual del env?o (detalle de gu?a) */
.fx-guia-ruta-panel { overflow: hidden; }
.fx-guia-ruta-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

/* Evidencia de entrega (perfil admin / sucursal) */
.fx-entrega-evidencia-card {
    padding: 14px 16px 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 55%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.fx-entrega-evidencia-card > .fx-card-label:first-child {
    color: #64748b;
    margin-bottom: 6px;
}
.fx-entrega-fotos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.fx-entrega-foto {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    width: min(160px, 42vw);
    padding: 0;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 10px;
    background: #f8fafc;
    cursor: zoom-in;
    overflow: hidden;
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-entrega-foto:hover {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.fx-entrega-foto img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e2e8f0;
}
.fx-entrega-foto span {
    padding: 0 10px 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}
.fx-entrega-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(2px);
}
.fx-entrega-lightbox-inner {
    width: min(960px, 100%);
    max-height: min(92vh, 100%);
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.fx-entrega-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 8px 4px 16px;
    color: #e2e8f0;
    font-size: .85rem;
    font-weight: 600;
}
.fx-entrega-lightbox img {
    display: block;
    width: 100%;
    max-height: calc(92vh - 52px);
    object-fit: contain;
    background: #020617;
}

/* Comparativa dashboard */
.fx-dash-compare {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    padding: 14px 16px;
    min-height: 110px;
    display: grid;
    gap: 6px;
    align-content: space-between;
}
.fx-dash-compare-label { color: var(--mud-palette-text-secondary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fx-dash-compare-row { display: flex; align-items: center; gap: 10px; }
.fx-dash-compare-now { font-size: 1.7rem; font-weight: 800; color: #0f172a; line-height: 1.1; }
.fx-dash-compare-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
}
.fx-dash-compare-delta.up { color: #16a34a; background: rgba(34, 197, 94, .12); }
.fx-dash-compare-delta.down { color: #dc2626; background: rgba(239, 68, 68, .12); }
.fx-dash-compare-prev { color: var(--mud-palette-text-secondary); font-size: .78rem; }

/* Barras de provincias (mini chart) */
.fx-prov-bars { display: grid; gap: 8px; }
.fx-prov-bar { display: grid; grid-template-columns: 130px 1fr 50px; align-items: center; gap: 12px; }
.fx-prov-bar-label { color: #0f172a; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-prov-bar-track { background: rgba(129, 74, 76, .10); border-radius: 999px; height: 14px; overflow: hidden; position: relative; }
.fx-prov-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #814a4c 0%, #111111 100%);
    border-radius: 999px;
    transition: width .25s ease-out;
}
.fx-prov-bar-value { color: #0f172a; font-size: .9rem; font-weight: 700; text-align: right; }
@media (max-width: 720px) {
    .fx-prov-bar { grid-template-columns: 100px 1fr 40px; gap: 8px; }
}

/* Manual del corporativo */
.fx-panel-body { padding: 18px 20px 22px; }
.fx-manual-steps,
.fx-manual-tips { padding-left: 22px; margin: 0; color: #1f2937; font-size: .92rem; line-height: 1.7; }
.fx-manual-steps li,
.fx-manual-tips li { padding: 2px 0; }
.fx-manual-link { color: #814a4c; font-weight: 600; }

.fx-manual-states,
.fx-manual-types { display: grid; gap: 10px; }
.fx-manual-state,
.fx-manual-type { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center; }
.fx-manual-state span,
.fx-manual-type span { color: #1f2937; font-size: .9rem; line-height: 1.4; }
@media (max-width: 720px) {
    .fx-manual-state,
    .fx-manual-type { grid-template-columns: 1fr; }
}

.fx-ayuda-buscar { margin-bottom: 18px; }
.fx-ayuda-cuenta { margin: 0 0 12px; color: #64748b; font-size: .88rem; }
.fx-ayuda-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    padding: 16px 18px 8px;
    margin: 0 0 12px;
    background: #fff;
}
.fx-ayuda-card h3 { margin: 0 0 6px; font-size: 1.05rem; color: #0f172a; }
.fx-ayuda-card > p { margin: 0 0 10px; color: #1f2937; line-height: 1.45; }
.fx-ayuda-donde span {
    display: inline-block;
    margin-right: 8px;
    font-weight: 700;
    color: #814a4c;
}
.fx-ayuda-ojo { color: #64748b; font-size: .9rem; }
.fx-ayuda-credito { margin-top: 28px; }

/* Trigger del men? de perfil (esquina superior derecha) */
.fx-user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    cursor: pointer;
    color: #0f172a;
    transition: background-color .12s ease, border-color .12s ease;
    font-family: inherit;
    min-height: 40px;
}
.fx-user-menu-trigger:hover { background: #fafafa; border-color: rgba(129, 74, 76, .35); }
.fx-user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #814a4c 0%, #111111 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .04em;
}
.fx-user-menu-info { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.fx-user-menu-name { color: #0f172a; font-size: .88rem; font-weight: 700; }
.fx-user-menu-role { font-size: .72rem; font-weight: 700; }
@media (max-width: 720px) {
    .fx-user-menu-info { display: none; }
    .fx-user-menu-trigger { padding: 4px; }
    .fx-perfil-badge {
        max-width: min(46vw, 170px);
        padding: 3px 8px 3px 6px;
        gap: 6px;
        min-height: 30px;
    }
    .fx-perfil-badge-role { font-size: .72rem; }
    .fx-perfil-badge-detail {
        display: none;
    }
}

.fx-guide-summary-line,
.fx-guide-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.fx-guide-summary-line span {
    color: #64748b;
}

.fx-guide-total {
    margin-top: 6px;
    border-bottom: 0;
    font-size: 1.05rem;
}

.fx-guide-total strong {
    font-size: 1.25rem;
    color: #4f46e5;
}

.fx-guide-cambio {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 4px;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid rgba(22, 163, 74, .22);
}

.fx-guide-cambio span {
    font-size: .95rem;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fx-guide-cambio strong {
    font-size: 1.85rem;
    line-height: 1;
    color: #15803d;
    font-variant-numeric: tabular-nums;
}

.fx-pago-linea {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 10px;
    padding: 12px;
    background: #f8fafc;
}

.fx-pago-linea-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.fx-pago-linea-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.fx-pago-linea-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 700px) {
    .fx-pago-linea-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.fx-pago-campo {
    border-radius: 8px;
    padding: 8px;
}

.fx-pago-campo-metodo {
    background: #eef2ff;
    border: 1px solid rgba(79, 70, 229, .22);
}

.fx-pago-campo-monto {
    background: #ecfdf5;
    border: 1px solid rgba(21, 128, 61, .28);
}

.fx-pago-campo-monto .mud-input-slot,
.fx-pago-campo-monto input {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
}

.fx-cash-denoms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fx-cash-denom {
    border: 1px solid rgba(15, 23, 42, .14);
    background: #fff;
    color: #0f172a;
    border-radius: 8px;
    min-width: 52px;
    padding: 8px 10px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.fx-cash-denom:hover:not(:disabled) {
    border-color: rgba(79, 70, 229, .45);
    background: #eef2ff;
    color: #3730a3;
}

.fx-cash-denom:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.fx-cash-denom.is-clear {
    border-style: dashed;
    color: #64748b;
    font-weight: 500;
}

.fx-corp-address-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.fx-corp-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.fx-corp-client-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.fx-corp-client-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: #fbf9f9;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.fx-corp-client-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.fx-corp-client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #814a4c;
    font-weight: 700;
    font-size: .86rem;
}

.fx-corp-client-addresses {
    display: grid;
}

.fx-corp-address-preview {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    background: #fff;
    color: #64748b;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.fx-corp-address-preview:hover {
    background: #fbf9f9;
}

.fx-corp-address-preview span {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fx-corp-address-preview strong {
    color: #814a4c;
    font-size: .78rem;
    font-weight: 700;
}

.fx-corp-address-row {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(320px, 1.25fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.fx-corp-address-row:last-child {
    border-bottom: 0;
}

.fx-corp-client-head strong,
.fx-corp-client-head span,
.fx-corp-address-row strong,
.fx-corp-address-row span,
.fx-corp-address-row small {
    display: block;
}

.fx-corp-client-head strong,
.fx-corp-address-row strong {
    color: #111827;
    font-size: .92rem;
}

.fx-corp-client-head span,
.fx-corp-address-row span {
    color: #64748b;
    font-size: .8rem;
    margin-top: 2px;
}

.fx-corp-address-row small {
    color: #8b93a7;
    font-size: .76rem;
    margin-top: 3px;
}

.fx-label-sheet {
    display: grid;
    grid-template-columns: repeat(2, 450px);
    gap: 8px 10px;
    align-items: start;
    justify-content: start;
}

.fx-package-label {
    width: 450px;
    height: 300px;
    border: 1.5px solid #111827;
    background: #fff;
    color: #111827;
    page-break-inside: avoid;
    break-inside: avoid;
    position: relative;
    font-family: "Consolas", "Courier New", monospace;
}

.fx-package-label-fragil {
    border-color: #dc2626;
    box-shadow: inset 0 0 0 2px #fecaca;
}

.fx-package-label-main {
    box-sizing: border-box;
    height: 100%;
    padding: 8px 10px 6px;
    font-size: 13px;
    line-height: 1.22;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fx-ticket-brand {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
    text-transform: uppercase;
}

.fx-ticket-rule {
    height: 0;
    margin: 5px 0;
    border: 0;
    border-top: 2px solid #111;
}

.fx-ticket-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 8px;
    align-items: start;
}

.fx-ticket-top-text {
    min-width: 0;
    padding-top: 2px;
}

.fx-ticket-guia {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
}

.fx-ticket-fecha {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
}

.fx-package-qr {
    width: 86px;
    height: 86px;
    justify-self: end;
    overflow: visible;
}

.fx-package-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.fx-ticket-line {
    margin-top: 2px;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-ticket-line-strong {
    font-size: 14px;
    font-weight: 700;
}

.fx-ticket-route {
    display: flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
}

.fx-ticket-route-orig {
    font-size: 12.5px;
    font-weight: 600;
}

.fx-ticket-route-dest {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: uppercase;
    line-height: 1.05;
}

.fx-ticket-fragil {
    color: #b91c1c;
    font-size: 15px;
    letter-spacing: .04em;
}

.fx-ticket-pago {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fx-ticket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    font-size: 12.5px;
    font-weight: 600;
}

.fx-ticket-footer span:last-child {
    font-weight: 700;
}

@media (max-width: 1100px) {
    .fx-user-line-corp {
        grid-template-columns: minmax(160px, 1.1fr) minmax(80px, .45fr) minmax(110px, .7fr) minmax(80px, .4fr) minmax(90px, .45fr) 92px 36px;
        gap: 10px;
        padding: 12px 10px;
    }
}

@media (max-width: 720px) {
    .fx-user-group-title {
        font-size: 1.25rem;
    }

    .fx-user-group-head,
    .fx-user-subhead,
    .fx-user-line,
    .fx-user-line-corp {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .fx-corp-form {
        position: static;
    }

    .fx-corp-address-head,
    .fx-corp-address-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .fx-corp-address-head {
        flex-direction: column;
    }

    .fx-corp-filterbar {
        grid-template-columns: 1fr;
    }

    .fx-route-filter {
        grid-template-columns: 1fr;
    }

    .fx-route-filter-arrow {
        transform: rotate(90deg);
        margin-top: 0;
    }

    .fx-route-head,
    .fx-route-path {
        align-items: stretch;
        flex-direction: column;
    }

    .fx-route-arrow {
        transform: rotate(90deg);
        align-self: flex-start;
        margin-left: 2px;
    }

    .fx-guide-summary {
        position: static;
    }

    .fx-tracking-timeline {
        grid-template-columns: 1fr;
    }

    .fx-tracking-step::before {
        left: 23px;
        right: auto;
        top: 34px;
        bottom: -10px;
        width: 2px;
        height: auto;
    }
}

/* ---------- Responsive general ---------- */
@media (max-width: 960px) {
    .fx-content {
        padding: 18px;
        max-width: none;
    }

    .fx-panel {
        padding: 18px;
        border-radius: 12px;
    }

    .fx-page-head,
    .fx-client-hero,
    .fx-panel-head,
    .fx-corp-address-head,
    .fx-tracking-head,
    .fx-guide-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .fx-page-head > *,
    .fx-client-hero > *,
    .fx-panel-head > *,
    .fx-corp-address-head > * {
        min-width: 0;
    }

    .fx-page-title {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .fx-page-sub {
        font-size: .86rem;
    }

    .fx-client-actions,
    .fx-toolbar,
    .fx-corp-form-actions {
        justify-content: stretch;
    }

    .fx-client-actions .mud-button-root,
    .fx-toolbar .mud-button-root,
    .fx-corp-form-actions .mud-button-root {
        flex: 1 1 auto;
    }

    .fx-permission-grid {
        grid-template-columns: 1fr;
    }

    .fx-perm-groups {
        grid-template-columns: 1fr;
    }

    .fx-perm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fx-perm-search {
        max-width: none;
    }

    .fx-perm-toolbar-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .fx-appbar .mud-toolbar {
        min-height: 56px;
        padding-left: 6px;
        padding-right: 8px;
    }

    .fx-appbar .mud-icon-button {
        padding: 8px;
    }

    .fx-user-menu .mud-button-label {
        max-width: 118px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fx-brand {
        padding: 14px 14px 6px;
    }

    .fx-brand-logo {
        width: 44px;
        height: 44px;
    }

    .fx-brand-logo img {
        width: 36px;
    }

    .fx-login-logo-wrap {
        width: 96px;
        height: 70px;
        border-radius: 12px;
    }

    .fx-login-logo {
        width: 78px;
    }

    .fx-content {
        padding: 14px;
    }

    .fx-panel {
        padding: 14px;
        border-radius: 10px;
    }

    .fx-client-tabs {
        padding-left: 12px;
        padding-right: 12px;
    }

    .fx-form-section {
        padding: 16px 0;
    }

    .fx-section-head {
        align-items: flex-start;
    }

    .fx-toolbar-search,
    .fx-toolbar-date,
    .fx-corp-address-head .mud-input-control {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .fx-stats {
        padding: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .fx-stat-pill {
        flex: 0 0 auto;
    }

    .fx-corp-client-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .fx-corp-client-head > :last-child {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .fx-guide-progress-cell {
        min-width: 130px;
    }

    .fx-prov-bar {
        grid-template-columns: 86px 1fr 36px;
    }

    .fx-dash-alert-body,
    .fx-dash-mini,
    .fx-dash-compare-row,
    .fx-guide-summary-line,
    .fx-guide-total {
        align-items: flex-start;
        flex-direction: column;
    }

    .fx-dash-alert-amount {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .fx-content {
        padding: 12px 10px;
    }

    .fx-page-head {
        margin-bottom: 14px;
    }

    .fx-page-title {
        font-size: 1.22rem;
    }

    .fx-panel,
    .fx-route-card,
    .fx-user-section,
    .fx-corp-client-card,
    .fx-tracking-panel,
    .fx-tracking-inline {
        border-radius: 8px;
    }

    .fx-stat {
        padding: 16px;
        border-radius: 10px;
    }

    .fx-stat-value {
        font-size: 1.55rem;
    }

    .fx-route-configs {
        grid-template-columns: 1fr;
    }

    .fx-route-config {
        min-width: 0;
    }

    .fx-tracking-timeline {
        padding: 10px;
    }
}

@media print {
    @page {
        size: letter;
        margin: .25in;
    }

    html,
    body {
        background: #fff !important;
    }

    .mud-appbar,
    .mud-drawer,
    .fx-label-actions,
    .mud-popover-provider,
    .mud-snackbar-location-top-right,
    .mud-snackbar-location-bottom-right {
        display: none !important;
    }

    .mud-main-content,
    .fx-main,
    .fx-content,
    .fx-page,
    .fx-label-page {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        background: #fff !important;
    }

    .fx-label-sheet {
        width: 9.6in;
        display: grid;
        grid-template-columns: repeat(2, 4.5in);
        grid-auto-rows: 3in;
        gap: .06in .10in;
    }

    .fx-package-label {
        min-height: 0;
        width: 4.5in;
        height: 3in;
        overflow: hidden;
        border: 1px solid #111;
        box-shadow: none !important;
    }

    .fx-package-label-fragil {
        border: 2px solid #dc2626 !important;
    }

    .fx-package-label-main {
        padding: .07in .09in .05in;
        font-size: 11px;
        line-height: 1.18;
    }

    .fx-ticket-brand {
        font-size: 17px;
    }

    .fx-ticket-rule {
        margin: .04in 0;
        border-top-width: 1.5px;
    }

    .fx-ticket-top {
        grid-template-columns: minmax(0, 1fr) .78in;
        gap: .08in;
    }

    .fx-ticket-guia {
        font-size: 15px;
    }

    .fx-ticket-fecha,
    .fx-ticket-line,
    .fx-ticket-footer {
        font-size: 11px;
    }

    .fx-ticket-line-strong,
    .fx-ticket-pago {
        font-size: 12px;
    }

    .fx-ticket-route-orig {
        font-size: 11px;
    }

    .fx-ticket-route-dest {
        font-size: 16px;
    }

    .fx-package-qr {
        width: .78in;
        height: .78in;
    }

    .fx-ticket-fragil {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ---------- Stat card ---------- */
.fx-stat {
    padding: 20px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 16px;
    background: var(--mud-palette-surface);
    transition: transform .15s ease, box-shadow .15s ease;
}
a.fx-stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
a.fx-stat-link:hover .fx-stat {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -18px rgba(31,35,51,.35);
}
.fx-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -18px rgba(31,35,51,.35);
}
.fx-stat-head { display: flex; align-items: center; justify-content: space-between; }
.fx-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 12px;
}
.fx-stat-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: .78rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.fx-stat-delta.up { color: #16a34a; background: rgba(34,197,94,.12); }
.fx-stat-delta.down { color: #dc2626; background: rgba(239,68,68,.12); }
.fx-stat-value { font-size: 1.8rem; font-weight: 700; margin-top: 14px; }
.fx-stat-label { color: var(--mud-palette-text-secondary); font-size: .85rem; margin-top: 2px; }

/* Dashboard global del administrador */
.fx-admin-filter-panel .fx-panel-body { padding-top: 10px; }
.fx-admin-filter-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.fx-admin-kpi {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 17px 19px;
    color: #fff;
    background: #814a4c;
    border-radius: 8px;
}
.fx-admin-kpi .mud-typography { color: rgba(255,255,255,.82); font-weight: 600; }
.fx-admin-kpi strong { display: block; margin: 4px 0; font-size: 2rem; line-height: 1; }
.fx-admin-kpi span { color: rgba(255,255,255,.9); font-size: .82rem; }
.fx-admin-dashboard-loading { min-height: 280px; display: flex; flex-direction: column; gap: 12px; }

.fx-admin-guides-table .mud-table-container {
    overflow-x: hidden;
}

.fx-admin-guides-table .mud-table-cell {
    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: top;
}

.fx-admin-guide-status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.fx-admin-guides-table.mud-xs-table .mud-table-row,
.fx-admin-guides-table.mud-sm-table .mud-table-row,
.fx-admin-guides-table.mud-md-table .mud-table-row,
.fx-admin-guides-table.mud-lg-table .mud-table-row {
    margin-bottom: 10px;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.fx-admin-guides-table.mud-xs-table .mud-table-cell,
.fx-admin-guides-table.mud-sm-table .mud-table-cell,
.fx-admin-guides-table.mud-md-table .mud-table-cell,
.fx-admin-guides-table.mud-lg-table .mud-table-cell {
    align-items: flex-start;
}

/* Monitor global de manifiestos */
.fx-admin-manifest-filter { margin-top: 8px; }
.fx-admin-manifest-filter-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.fx-admin-manifest-select { min-width: 300px; }
.fx-admin-manifest-filter > .mud-typography { display: block; padding: 0 16px 14px; }
.fx-admin-manifest-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 4px 10px; color: var(--mud-palette-text-secondary); font-size: .86rem; }
.fx-admin-manifest-summary strong { color: var(--mud-palette-text-primary); }
.fx-admin-manifest-list { display: grid; gap: 12px; }
.fx-admin-manifest-item { overflow: hidden; border: 1px solid rgba(15,23,42,.1); border-radius: 8px; }
.fx-admin-manifest-header { width: 100%; display: flex; justify-content: space-between; gap: 18px; border: 0; padding: 15px 17px; background: #f7f1f1; color: #3a2f30; text-align: left; cursor: pointer; font: inherit; border-bottom: 1px solid #eadfdf; }
.fx-admin-manifest-header:hover { background: #f0e6e6; }
.fx-admin-manifest-main { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.fx-admin-manifest-main strong { color: #814a4c; font-size: 1rem; }
.fx-admin-manifest-main small { color: #7a8799; }
.fx-admin-manifest-main span { color: #4b5563; font-size: .82rem; }
.fx-admin-manifest-totals { display: flex; min-width: 170px; flex-direction: column; align-items: flex-end; gap: 2px; }
.fx-admin-manifest-totals strong, .fx-admin-manifest-money { color: #16723b; }
.fx-admin-manifest-totals small { color: #6b7280; font-size: .78rem; }
.fx-admin-manifest-totals .mud-icon-root { margin-top: 2px; }
.fx-admin-manifest-details { padding: 16px; background: #fff; }
.fx-admin-manifest-detail-loading { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--mud-palette-text-secondary); }
.fx-admin-manifest-empty { margin-top: 18px; min-height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; text-align: center; }

/* Dashboard financiero del administrador */
.fx-finance-filter-panel { padding: 13px 16px; }
.fx-finance-filterbar { display: flex; align-items: center; gap: 10px; }
.fx-finance-filterbar .mud-input-control { width: 190px; }
.fx-finance-filterbar .mud-input-control:nth-child(3) { width: 220px; }
.fx-finance-kpi { min-height: 112px; padding: 17px; border: 1px solid #e9edf4; border-bottom: 3px solid #814a4c; border-radius: 8px; }
.fx-finance-kpi span, .fx-finance-kpi small { display: block; color: #718096; font-size: .73rem; text-transform: uppercase; }
.fx-finance-kpi strong { display: block; margin: 7px 0; font-size: 1.42rem; color: #12213a; }
.fx-finance-kpi small { text-transform: none; }
.fx-finance-kpi.is-debt { border-bottom-color: #dc2626; }.fx-finance-kpi.is-debt strong, .fx-finance-debt { color: #b91c1c; }
.fx-finance-kpi.is-invoiced { border-bottom-color: #111111; }.fx-finance-kpi.is-pending { border-bottom-color: #814a4c; }
.fx-finance-chart-panel, .fx-finance-methods-panel { height: 100%; }
.fx-finance-bars { display: grid; gap: 11px; padding: 8px 18px 20px; }
.fx-finance-bar-row { display: grid; grid-template-columns: 90px minmax(110px, 1fr) 110px 76px; align-items: center; gap: 8px; font-size: .78rem; }
.fx-finance-bar-track { height: 9px; overflow: hidden; background: #edf2f7; border-radius: 99px; }.fx-finance-bar-track i { display: block; height: 100%; min-width: 2px; background: #814a4c; border-radius: inherit; }
.fx-finance-bar-row strong { text-align: right; color: #12213a; }.fx-finance-bar-row small { color: #718096; }
.fx-finance-bar-row.is-dual { align-items: center; }
.fx-finance-dual-tracks { display: grid; gap: 4px; }
.fx-finance-bar-track.is-monto i { background: #814a4c; }
.fx-finance-bar-track.is-cantidad i { background: #4a6b8a; }
.fx-finance-dual-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .74rem; color: #64748b; }
.fx-finance-dual-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fx-finance-dual-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 99px; }
.fx-finance-dual-legend .is-monto::before { background: #814a4c; }
.fx-finance-dual-legend .is-cantidad::before { background: #4a6b8a; }
.fx-finance-filter-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.fx-finance-filter-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.fx-finance-filter-select { min-width: 220px; max-width: 320px; }
.fx-finance-pivot-wrap { overflow-x: auto; padding: 0 12px 18px; }
.fx-finance-pivot { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .76rem; }
.fx-finance-pivot th,
.fx-finance-pivot td { padding: 8px 10px; border-bottom: 1px solid #edf0f5; white-space: nowrap; vertical-align: top; }
.fx-finance-pivot thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; color: #64748b; font-weight: 600; text-align: right; border-bottom: 1px solid #e2e8f0; }
.fx-finance-pivot thead th:first-child,
.fx-finance-pivot tbody th,
.fx-finance-pivot tfoot th { text-align: left; position: sticky; left: 0; z-index: 1; background: #fff; min-width: 140px; color: #334155; }
.fx-finance-pivot thead th:first-child { z-index: 3; background: #f8fafc; }
.fx-finance-pivot tbody td,
.fx-finance-pivot tfoot td { text-align: right; color: #12213a; }
.fx-finance-pivot td strong,
.fx-finance-pivot td.is-total strong { display: block; font-weight: 600; }
.fx-finance-pivot td small { display: block; color: #94a3b8; font-size: .68rem; margin-top: 1px; }
.fx-finance-pivot .fx-finance-pivot-empty { color: #cbd5e1; }
.fx-finance-pivot tfoot th,
.fx-finance-pivot tfoot td,
.fx-finance-pivot td.is-total { background: #f8fafc; font-weight: 600; }
.fx-finance-pivot tfoot th { z-index: 2; }
.fx-finance-methods { display: grid; gap: 7px; padding: 6px 18px 20px; }.fx-finance-methods div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid #edf0f5; }.fx-finance-methods span { font-size: .84rem; color: #334155; }.fx-finance-methods strong { color: #814a4c; }.fx-finance-methods small { color: #718096; grid-column: 1 / -1; font-size: .72rem; }
.fx-finance-no-chart { min-height: 170px; display: grid; place-items: center; padding: 18px; color: #718096; font-size: .87rem; text-align: center; }
.fx-finance-income { color: #16723b; }
.fx-finance-account-table .mud-table-container { overflow-x: hidden; }
.fx-finance-account-table .mud-table-cell { white-space: normal; }
.fx-finance-account-condition { display: grid; align-items: start; gap: 5px; }
.fx-finance-account-condition > span { color: #334155; font-size: .83rem; }
.fx-finance-account-condition .mud-chip { width: fit-content; max-width: 100%; }
.fx-finance-account-values { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }

/* Pulso de la empresa (/admin) */
.fx-pulso-banner {
    display: flex;
    align-items: stretch;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1px solid #e9edf4;
    background: #f7faf7;
}
.fx-pulso-banner.is-bien { background: linear-gradient(135deg, #e8f7ee 0%, #f7fbf8 55%, #fff 100%); border-color: #b7e0c5; }
.fx-pulso-banner.is-regular { background: linear-gradient(135deg, #fff7e8 0%, #fffcf5 55%, #fff 100%); border-color: #f0d29a; }
.fx-pulso-banner.is-mal { background: linear-gradient(135deg, #fdecec 0%, #fff7f7 55%, #fff 100%); border-color: #f0b4b4; }
.fx-pulso-banner-main { display: flex; gap: 16px; align-items: flex-start; width: 100%; }
.fx-pulso-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: #fff;
    background: #16723b;
}
.fx-pulso-banner.is-regular .fx-pulso-badge { background: #b45309; }
.fx-pulso-banner.is-mal .fx-pulso-badge { background: #b91c1c; }
.fx-pulso-banner h2 { margin: 0 0 6px; font-size: 1.55rem; font-weight: 800; color: #12213a; line-height: 1.2; }
.fx-pulso-banner p { margin: 0 0 8px; color: #334155; font-size: 1rem; line-height: 1.45; max-width: 62ch; }
.fx-pulso-banner small { color: #718096; font-size: .78rem; }
.fx-pulso-card {
    height: 100%;
    padding: 16px 17px;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    border-top: 4px solid #94a3b8;
    background: #fff;
}
.fx-pulso-card.is-bien { border-top-color: #16723b; }
.fx-pulso-card.is-regular { border-top-color: #b45309; }
.fx-pulso-card.is-mal { border-top-color: #b91c1c; }
.fx-pulso-card-q {
    display: block;
    font-size: .8rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 4px;
}
.fx-pulso-card strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.1;
    color: #12213a;
    margin-bottom: 8px;
}
.fx-pulso-card.is-bien strong { color: #16723b; }
.fx-pulso-card.is-regular strong { color: #b45309; }
.fx-pulso-card.is-mal strong { color: #b91c1c; }
.fx-pulso-card p {
    margin: 0 0 10px;
    color: #475569;
    font-size: .88rem;
    line-height: 1.4;
    min-height: 3.6em;
}
.fx-pulso-credito {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px dashed #c7d2e0;
    border-radius: 12px;
    background: #f8fafc;
}
.fx-pulso-credito-text { flex: 1 1 280px; max-width: 70ch; }
.fx-pulso-credito h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: #0B3A66; }
.fx-pulso-credito p { margin: 0; color: #334155; font-size: .92rem; line-height: 1.45; }
.fx-pulso-details {
    margin: 8px 0 0;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.fx-pulso-details > summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-weight: 700;
    color: #0B3A66;
    background: #f7f9fc;
    user-select: none;
}
.fx-pulso-details > summary::-webkit-details-marker { display: none; }
.fx-pulso-details > summary::after {
    content: "▾";
    float: right;
    color: #94a3b8;
}
.fx-pulso-details[open] > summary::after { content: "▴"; }
.fx-pulso-details-body { padding: 8px 16px 20px; }
@media (max-width: 600px) {
    .fx-pulso-banner-main { flex-direction: column; }
    .fx-pulso-banner h2 { font-size: 1.3rem; }
}

/* Resumen ejecutivo del administrador */
.fx-exec-filterbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fx-exec-filterbar .mud-input-control { width: 180px; }
.fx-exec-filterbar .mud-input-control:nth-child(3) { width: 210px; }
.fx-exec-compare-note { display: block; margin: 14px 0 -4px; color: #718096; }
.fx-exec-ask {
    padding: 22px 22px 18px;
    border: 1px solid #e9edf4;
    border-radius: 14px;
    background: #fff;
}
.fx-exec-ask-title {
    margin: 0 0 14px;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0B3A66;
}
.fx-exec-ask-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.fx-exec-ask-input .mud-input-filled {
    border-radius: 12px !important;
}
.fx-exec-ask-meta {
    margin: 8px 0 12px;
    font-size: .85rem;
}
.fx-exec-ask-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fx-exec-ask-pill {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: #e8eef6;
    color: #0B3A66;
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.fx-exec-ask-pill:hover {
    background: #d7e3f2;
}
@media (max-width: 700px) {
    .fx-exec-ask-row { grid-template-columns: 1fr; }
}
.fx-exec-section-title { margin: 22px 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #814a4c; }
.fx-exec-kpi { min-height: 138px; height: 100%; padding: 16px 17px; border: 1px solid #e9edf4; border-bottom: 3px solid #814a4c; border-radius: 8px; }
.fx-exec-kpi > span { display: block; color: #718096; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.fx-exec-kpi strong { display: block; margin: 7px 0 2px; font-size: 1.5rem; line-height: 1.1; color: #12213a; }
.fx-exec-kpi small { display: block; margin-top: 5px; color: #718096; font-size: .76rem; }
.fx-exec-kpi.is-invoiced { border-bottom-color: #111111; }
.fx-exec-kpi.is-revenue { border-bottom-color: #16723b; } .fx-exec-kpi.is-revenue strong { color: #16723b; }
.fx-exec-kpi.is-debt { border-bottom-color: #dc2626; } .fx-exec-kpi.is-debt strong { color: #b91c1c; }
.fx-exec-kpi.is-portfolio { border-bottom-color: #b45309; }
.fx-exec-kpi.is-warn { border-bottom-color: #b45309; }
.fx-exec-kpi-inline { margin-top: 4px; }
.fx-exec-delta { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; }
.fx-exec-delta .mud-icon-root { font-size: 1rem; }
.fx-exec-delta.is-good { color: #16723b; }
.fx-exec-delta.is-bad { color: #b91c1c; }
.fx-exec-delta.is-neutral { color: #718096; font-weight: 600; }
.fx-exec-debt { color: #b91c1c; }

.fx-exec-alert-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 18px 14px; }
.fx-exec-alert-tile { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: #f7f9fc; border: 1px solid #e9edf4; border-radius: 8px; }
.fx-exec-alert-tile .mud-icon-root { color: #94a3b8; }
.fx-exec-alert-tile strong { display: block; font-size: 1.35rem; line-height: 1.1; color: #12213a; }
.fx-exec-alert-tile span { font-size: .74rem; color: #718096; }
.fx-exec-alert-tile.is-alert { background: #fef4f4; border-color: #f3c9c9; }
.fx-exec-alert-tile.is-alert .mud-icon-root, .fx-exec-alert-tile.is-alert strong { color: #b91c1c; }

.fx-exec-chart { padding: 6px 12px 12px; }
.fx-exec-no-chart { min-height: 200px; display: grid; place-items: center; padding: 18px; color: #718096; font-size: .87rem; text-align: center; }
.fx-exec-aging { display: grid; gap: 6px; padding: 4px 18px 18px; }
.fx-exec-aging > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf0f5; font-size: .82rem; }
.fx-exec-aging > div:last-child { border-bottom: 0; }
.fx-exec-aging span { color: #64748b; }
.fx-exec-aging strong { color: #12213a; white-space: nowrap; }
.fx-exec-aging > div.is-risk strong { color: #b91c1c; }

.fx-exec-rank-progress { display: grid; gap: 5px; }
.fx-exec-rank-progress > span { font-size: .76rem; color: #64748b; }

.fx-exec-espera-link { display: inline-block; margin-top: 4px; font-size: .74rem; font-weight: 600; cursor: pointer; }
.fx-exec-espera-sucursales {
    margin: 0 12px 12px;
    border: 1px solid #e9edf4;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}
.fx-exec-espera-sucursales .fx-tracking-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #e9edf4;
}
.fx-exec-espera-sucursales .fx-tracking-head strong { font-size: .82rem; color: #12213a; }
.fx-exec-espera-sucursales .fx-tracking-head span { font-size: .72rem; color: #718096; }
.fx-exec-espera-sucursal-table { margin: 0 !important; background: #fff; }
.fx-exec-espera-sucursal-table th,
.fx-exec-espera-sucursal-table td { font-size: .78rem; }
.fx-table tr.fx-row-collapsed > td > .fx-exec-espera-sucursales { display: none; }

.fx-exec-task { display: flex; align-items: flex-start; gap: 12px; height: 100%; min-height: 108px; padding: 15px 16px; border: 1px solid #e9edf4; border-radius: 8px; }
.fx-exec-task .mud-icon-root { color: #94a3b8; }
.fx-exec-task strong { display: block; font-size: 1.5rem; line-height: 1.1; color: #12213a; }
.fx-exec-task span { display: block; margin-top: 2px; font-size: .78rem; color: #475569; }
.fx-exec-task small { display: block; margin-top: 5px; font-size: .72rem; color: #718096; }
.fx-exec-task.is-pending { background: #fffaf3; border-color: #f0d9b5; }
.fx-exec-task.is-pending .mud-icon-root, .fx-exec-task.is-pending strong { color: #b45309; }

@media (max-width: 960px) {
  .fx-exec-alert-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fx-exec-filterbar .mud-input-control, .fx-exec-filterbar .mud-input-control:nth-child(3) { width: calc(50% - 5px); }
  .fx-exec-filterbar .mud-button-root { width: 100%; }
  .fx-exec-filterbar .mud-button-group-root { width: 100%; }
  .fx-exec-filterbar .mud-button-group-root .mud-button-root { width: auto; flex: 1 1 0; }
  .fx-exec-kpi { min-height: 120px; }
}
.fx-finance-account-values small { color: #718096; font-size: .72rem; }
.fx-finance-account-values strong { font-size: .82rem; }

/* Centro de reportes administrativos */
.fx-admin-report-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 16px; }
.fx-admin-report-filter .mud-input-control { width: 190px; }
.fx-admin-report-kpi { min-height: 108px; padding: 17px; border: 1px solid #e5eaf1; border-bottom: 3px solid #814a4c; border-radius: 8px; }
.fx-admin-report-kpi span, .fx-admin-report-kpi small { display: block; color: #718096; font-size: .74rem; }.fx-admin-report-kpi strong { display: block; margin: 7px 0; color: #172033; font-size: 1.55rem; }.fx-admin-report-kpi.is-danger { border-bottom-color: #dc2626; }.fx-admin-report-kpi.is-danger strong { color: #b91c1c; }.fx-admin-report-kpi.is-warning { border-bottom-color: #d97706; }.fx-admin-report-kpi.is-warning strong { color: #a16207; }.fx-admin-report-kpi.is-dark { border-bottom-color: #111; }.fx-admin-report-kpi.is-dark strong { color: #111; }
.fx-admin-report-kpi.is-selected { box-shadow: inset 0 0 0 2px #814a4c; background: #faf7f7; }
.fx-admin-report-kpi.is-danger.is-selected { box-shadow: inset 0 0 0 2px #dc2626; background: #fef2f2; }
.fx-admin-report-kpi.is-warning.is-selected { box-shadow: inset 0 0 0 2px #d97706; background: #fffbeb; }
.fx-report-progress { display: inline-flex; width: 62px; margin-right: 5px; vertical-align: middle; }
.fx-trace-search { display: flex; align-items: center; gap: 10px; }.fx-trace-search .mud-input-control { width: 220px; }
.fx-trace-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 8px; padding: 13px 16px; background: #f8eeee; border: 1px solid #ead6d7; border-radius: 8px; }.fx-trace-head span, .fx-trace-head strong { display: block; }.fx-trace-head span { margin-bottom: 4px; color: #718096; font-size: .72rem; text-transform: uppercase; }.fx-trace-head strong { color: #172033; font-size: .88rem; }

/* Reporte de cuentas por cobrar */
.fx-cxc-filter { display: flex; align-items: center; gap: 10px; padding: 13px 16px; }.fx-cxc-filter .mud-input-control { min-width: 180px; }
.fx-cxc-aging-panel { margin-top: 16px; overflow: hidden; }.fx-cxc-aging-title { display: flex; justify-content: space-between; gap: 14px; padding: 13px 16px; color: #334155; font-size: .86rem; border-bottom: 1px solid #e8edf3; }.fx-cxc-aging-title strong { color: #12213a; }
.fx-cxc-aging { display: grid; grid-template-columns: repeat(5, 1fr); }
.fx-cxc-aging > button {
    appearance: none; margin: 0; padding: 14px 16px; border: 0; border-right: 1px solid #e8edf3;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    background: #fff; text-align: left; cursor: pointer; font: inherit; transition: background .15s ease;
}
.fx-cxc-aging > button:last-child { border-right: 0; }
.fx-cxc-aging > button:hover { background: #f8fafc; }
.fx-cxc-aging > button:focus-visible { outline: 2px solid #814a4c; outline-offset: -2px; z-index: 1; }
.fx-cxc-aging > button.is-active { background: #f7f1f1; box-shadow: inset 0 -3px 0 #814a4c; }
.fx-cxc-aging > button > span,
.fx-cxc-aging > div > span {
    display: block; width: 100%; color: #718096; font-size: .76rem; line-height: 1.2;
}
.fx-cxc-aging > button > strong,
.fx-cxc-aging > div > strong {
    display: block; width: 100%; color: #12213a; font-size: 1rem; line-height: 1.25; font-weight: 700;
}
.fx-cxc-aging .is-green { color: #16723b; }.fx-cxc-aging .is-orange { color: #a16207; }.fx-cxc-aging .is-red { color: #b91c1c; }.fx-cxc-aging .is-purple { color: #814a4c; }
.fx-cxc-aging-filter {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    padding: 10px 16px; border-top: 1px solid #e8edf3; background: #faf7f7; color: #5c3537; font-size: .82rem;
}
.fx-cxc-client-list { display: grid; gap: 14px; margin-top: 16px; }
.fx-cxc-client-card { overflow: hidden; border: 1px solid #e6ebf1; }
.fx-cxc-client-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: #f7f1f1;
    color: #3a2f30;
    text-align: left;
    cursor: pointer;
}
.fx-cxc-client-summary-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.fx-cxc-client-summary-main h2 { margin: 0; font-size: .98rem; color: #5c3537; }
.fx-cxc-client-summary-main span { color: #7a8799; font-size: .77rem; }
.fx-cxc-client-summary-nums {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, auto));
    gap: 10px 18px;
    flex-shrink: 0;
}
.fx-cxc-client-summary-nums div { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fx-cxc-client-summary-nums span { font-size: .7rem; color: #7a8799; text-transform: uppercase; letter-spacing: .02em; }
.fx-cxc-client-summary-nums strong { font-size: .88rem; white-space: nowrap; }
.fx-cxc-client-detail { padding: 12px 16px 16px; border-top: 1px solid #eadfdf; }
.fx-cxc-mark { background: color-mix(in srgb, #F59E0B 35%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.fx-cxc-client-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; color: #3a2f30; background: #f7f1f1; border-bottom: 1px solid #eadfdf; }
.fx-cxc-client-head h2 { margin: 0; font-size: .98rem; color: #5c3537; }
.fx-cxc-client-head span { color: #7a8799; font-size: .77rem; }
.fx-cxc-client-head > strong { align-self: center; color: #814a4c; white-space: nowrap; }
.fx-cxc-cufe { display: inline-block; max-width: 180px; overflow: hidden; color: #596b83; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.fx-cxc-empty { display: grid; justify-items: center; gap: 8px; min-height: 230px; margin-top: 16px; align-content: center; text-align: center; }
@media (max-width: 720px) {
    .fx-cxc-client-summary { flex-direction: column; align-items: stretch; }
    .fx-cxc-client-summary-nums { grid-template-columns: repeat(3, 1fr); }
    .fx-cxc-client-summary-nums div { align-items: flex-start; }
}

/* Estado de cuenta cr?dito */
.fx-estado-cuenta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-estado-cuenta-filter { display: flex; align-items: center; gap: 10px; padding: 13px 16px; flex-wrap: wrap; }
.fx-estado-cuenta-filter .mud-input-control { min-width: 180px; }
.fx-estado-cuenta-search { min-width: 260px; flex: 1 1 260px; }
.fx-estado-cuenta-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 4px; border: 1px solid #e8edf3; border-radius: 8px; overflow: hidden; }
.fx-estado-cuenta-kpis > div { padding: 14px 16px; border-right: 1px solid #e8edf3; background: #fff; }
.fx-estado-cuenta-kpis > div:last-child { border-right: 0; }
.fx-estado-cuenta-kpis span { display: block; color: #718096; font-size: .72rem; text-transform: uppercase; }
.fx-estado-cuenta-kpis strong { display: block; margin-top: 4px; color: #12213a; font-size: 1.15rem; }
.fx-estado-cuenta-kpis .is-debt strong { color: #b91c1c; }
.fx-estado-cuenta-detail { margin-top: 16px; padding: 0; overflow: hidden; }
.fx-estado-cuenta-detail-head { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; color: #3a2f30; background: #f7f1f1; border-bottom: 1px solid #eadfdf; }
.fx-estado-cuenta-detail-head h2 { margin: 0 0 4px; font-size: 1.05rem; color: #5c3537; }
.fx-estado-cuenta-detail-head span, .fx-estado-cuenta-doc { color: #7a8799; font-size: .78rem; }
.fx-estado-cuenta-doc { margin-top: 6px; }
.fx-estado-cuenta-detail-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
/* El encabezado usa texto gris; los filled deben forzar contraste legible. */
.fx-estado-cuenta-detail-btns .mud-button-filled-success,
.fx-estado-cuenta-detail-btns .mud-button-filled-success .mud-button-label,
.fx-estado-cuenta-detail-btns .mud-button-filled-success .mud-icon-root {
  color: #ffffff !important;
}
.fx-estado-cuenta-detail-btns .mud-button-filled-primary,
.fx-estado-cuenta-detail-btns .mud-button-filled-primary .mud-button-label,
.fx-estado-cuenta-detail-btns .mud-button-filled-primary .mud-icon-root {
  color: #ffffff !important;
}
.fx-estado-cuenta-detail-btns .mud-button-outlined-primary,
.fx-estado-cuenta-detail-btns .mud-button-outlined-primary .mud-button-label,
.fx-estado-cuenta-detail-btns .mud-button-outlined-primary .mud-icon-root {
  color: var(--mud-palette-primary) !important;
}

/* Abono crédito: paneles con borde y encabezado (monto / medios) */
.fx-abono-panel {
  border: 1px solid #eadfdf;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.fx-abono-panel-head {
  margin: 0;
  padding: 10px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5c3537;
  background: #f7f1f1;
  border-bottom: 1px solid #eadfdf;
}
.fx-abono-panel-body {
  padding: 12px 14px;
}
.fx-abono-guias {
  display: inline-block;
  max-width: 28rem;
  white-space: normal;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.fx-abono-guias-sep {
  color: #9aa3af;
}
.fx-estado-cuenta-detail .fx-estado-cuenta-kpis { margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid #e8edf3; }
.fx-estado-cuenta-detail .fx-cxc-aging { border-bottom: 1px solid #e8edf3; }
.fx-estado-cuenta-detail .fx-table { margin: 0 !important; }
.fx-estado-cuenta-summary { margin-top: 16px; padding: 0; overflow: hidden; }
.fx-estado-cuenta-row { cursor: pointer; }

@media (max-width: 900px) {
    .fx-estado-cuenta-kpis { grid-template-columns: repeat(2, 1fr); }
    .fx-estado-cuenta-kpis > div:nth-child(2n) { border-right: 0; }
    .fx-estado-cuenta-kpis > div:nth-child(n+3) { border-top: 1px solid #e8edf3; }
    .fx-estado-cuenta-detail-head { flex-direction: column; }
}

/* Reporte global de entregas */
.fx-delivery-filter { display: flex; align-items: center; gap: 8px; }.fx-delivery-filter .mud-input-control { width: 150px; }.fx-delivery-filter .mud-input-control:nth-child(3) { width: 175px; }.fx-delivery-filter .mud-input-control:nth-child(4) { width: 155px; }
.fx-delivery-kpi { min-height: 112px; padding: 17px; border: 1px solid #e3eaf3; border-radius: 8px; }.fx-delivery-kpi span, .fx-delivery-kpi small { display: block; color: #8292aa; font-size: .74rem; text-transform: uppercase; }.fx-delivery-kpi strong { display: block; margin: 5px 0; font-size: 2rem; line-height: 1; }.fx-delivery-kpi small { text-transform: none; }
.fx-delivery-kpi.is-blue { color: #fff; background: #814a4c; border-color: #814a4c; }.fx-delivery-kpi.is-blue span, .fx-delivery-kpi.is-blue small { color: rgba(255,255,255,.8); }.fx-delivery-kpi.is-blue strong { color: #fff; }.fx-delivery-kpi.is-red strong { color: #b91c1c; }.fx-delivery-kpi.is-green strong { color: #16723b; }.fx-delivery-kpi.is-dark { color: #fff; background: #111111; border-color: #111111; }.fx-delivery-kpi.is-dark span, .fx-delivery-kpi.is-dark small { color: rgba(255,255,255,.72); }.fx-delivery-kpi.is-dark strong { color: #fff; }
.fx-delivery-provinces { display: grid; gap: 0; padding: 4px 16px 16px; }.fx-delivery-provinces div { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 11px 0; border-bottom: 1px solid #edf0f5; }.fx-delivery-provinces strong { color: #2b2b2b; font-size: .88rem; }.fx-delivery-provinces span { color: #814a4c; font-size: .8rem; }.fx-delivery-provinces small { grid-column: 1 / -1; color: #8292aa; font-size: .72rem; }

.fx-report-head + .fx-panel,
.fx-report-head + .mud-grid,
.fx-report-head + .mud-alert,
.fx-report-head + .fx-admin-manifest-summary,
.fx-report-head + .fx-splash {
    margin-top: 14px;
}
.fx-report-head,
.fx-cobranza-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    color: #3a2f30;
    background: #fff;
    border: 1px solid #eadfdf;
    border-top: 3px solid #814a4c;
    border-radius: 10px;
}
.fx-report-head.is-stack,
.fx-cobranza-head.is-stack {
    flex-direction: column;
    align-items: stretch;
}
.fx-report-head h1,
.fx-cobranza-head h1,
.fx-report-head .fx-page-title {
    margin: 0;
    font-size: 1.22rem;
    color: #5c3537;
    font-weight: 700;
}
.fx-report-head p,
.fx-cobranza-head p,
.fx-report-head .fx-page-sub {
    margin: 4px 0 0;
    color: #8a7a7b !important;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.fx-report-filter,
.fx-cobranza-filter {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.fx-report-filter .mud-input-control,
.fx-cobranza-filter .mud-input-control {
    width: 170px;
    min-width: 140px;
    flex: 0 0 auto;
}
.fx-report-filter .mud-input-control.fx-report-filter-wide,
.fx-cobranza-filter .mud-input-control.fx-report-filter-wide {
    width: 220px;
}
.fx-report-filter .mud-input-control.fx-report-filter-search,
.fx-cobranza-filter .mud-input-control.fx-report-filter-search {
    width: auto;
    min-width: 220px;
    flex: 1 1 240px;
}
.fx-report-filter-row {
    display: grid;
    grid-template-columns: minmax(200px, 1.6fr) 150px 150px 150px auto;
    gap: 10px;
    align-items: end;
    width: 100%;
}
.fx-report-filter-row-audit {
    grid-template-columns: 140px 140px 150px 150px minmax(180px, 1.4fr) auto auto;
}
.fx-report-filter-row .mud-input-control {
    width: 100% !important;
    min-width: 0 !important;
    flex: none;
}
.fx-report-filter-row .mud-button-root {
    height: 40px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .fx-report-filter-row-audit {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .fx-report-filter-row {
        grid-template-columns: 1fr 1fr;
    }
    .fx-report-filter-row .mud-button-root {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.fx-cobranza-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }.fx-cobranza-tab { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 10px 14px; color: #6b7280; background: transparent; border-radius: 8px; font: inherit; font-size: .77rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }.fx-cobranza-tab:hover { color: #814a4c; background: #f8eeee; }.fx-cobranza-tab.is-active { color: #814a4c; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.1); }
.fx-cobranza-overview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; margin: -3px 0 14px; color: #74839b; font-size: .84rem; }
.fx-cobranza-overview strong { color: #2b2b2b; }
.fx-cobranza-global {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
    margin: 0 0 16px; padding: 18px 20px; border: 1px solid #d8e7d4; border-radius: 10px; background: linear-gradient(135deg, #f3faf1, #fff);
}
.fx-cobranza-global span { display: block; color: #5f7a58; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fx-cobranza-global strong { display: block; margin-top: 4px; color: #1f6b2e; font-size: 2rem; line-height: 1.1; }
.fx-cobranza-global-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: #6b7280; font-size: .86rem; }
.fx-cobranza-global-meta span { color: #6b7280; font-size: .86rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.fx-cobranza-branch-card { position: relative; min-height: 142px; padding: 17px; border: 1px solid #e0e7f0; border-radius: 8px; }.fx-cobranza-branch-icon { display: grid; width: 30px; height: 30px; place-items: center; background: #f8eeee; border-radius: 8px; }.fx-cobranza-branch-card > .mud-chip { position: absolute; top: 17px; right: 15px; font-size: .66rem; text-transform: uppercase; }.fx-cobranza-branch-card > span { display: block; margin-top: 12px; color: #7c8290; font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.fx-cobranza-branch-card > strong { display: block; margin-top: 5px; color: #2b2b2b; font-size: 1.55rem; }.fx-cobranza-branch-card > small { color: #8a9ab5; font-size: .74rem; }.fx-cobranza-detail-panel { overflow: hidden; }
.fx-cobranza-metodo-block { margin: 0 16px 18px; }
.fx-cobranza-metodo-block:first-of-type { margin-top: 4px; }
.fx-cobranza-metodo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 8px 0 6px; }
.fx-cobranza-metodo-head h3 { margin: 0; color: #2b2b2b; font-size: 1.05rem; letter-spacing: .04em; }
.fx-cobranza-metodo-head span { color: #6b7280; font-size: .84rem; }
.fx-cobranza-metodo-head strong { margin-left: auto; color: #1f6b2e; font-size: 1.05rem; }
.fx-cobranza-ref { font-weight: 800; letter-spacing: .03em; }
.fx-cobranza-ref.is-empty { color: #c62828; font-weight: 700; }

@media (max-width: 600px) {
    .fx-admin-filter-actions { flex-wrap: wrap; }
    .fx-admin-filter-actions .mud-button-root { flex: 1 1 auto; }
    .fx-admin-kpi { min-height: 108px; }
    .fx-admin-manifest-filter-row { align-items: stretch; flex-wrap: wrap; }
    .fx-admin-manifest-select { min-width: 100%; flex-basis: 100%; }
    .fx-admin-manifest-header { flex-direction: column; gap: 8px; }
    .fx-admin-manifest-totals { align-items: flex-start; }
    .fx-finance-head { align-items: stretch; flex-direction: column; }
    .fx-finance-head p { margin-left: 0; }
    .fx-finance-filterbar { flex-wrap: wrap; }
    .fx-finance-filterbar .mud-input-control, .fx-finance-filterbar .mud-input-control:nth-child(3) { width: calc(50% - 4px); }
    .fx-finance-filterbar .mud-button-root { width: 100%; }
    .fx-finance-bar-row { grid-template-columns: 78px minmax(70px, 1fr) 86px; }.fx-finance-bar-row small { display: none; }
    .fx-finance-filter-controls { width: 100%; justify-content: stretch; }
    .fx-finance-filter-select { min-width: 0; max-width: none; width: 100%; }
    .fx-finance-dual-legend { width: 100%; }
    .fx-finance-account-table .mud-table-head { display: none; }
    .fx-finance-account-table .mud-table-row { display: grid; grid-template-columns: 54px 88px minmax(0, 1fr); gap: 5px 8px; padding: 10px 12px; }
    .fx-finance-account-table .mud-table-cell { display: block; padding: 0; border: 0; }
    .fx-finance-account-table .mud-table-cell:nth-child(4) { grid-column: 1 / -1; padding-top: 2px; border-top: 1px solid #edf0f5; }
    .fx-finance-account-table .mud-table-cell:nth-child(4) .fx-finance-account-values { grid-template-columns: 1fr auto; align-items: center; }
    .fx-admin-report-filter .mud-input-control { width: calc(50% - 5px); }
    .fx-admin-report-filter .mud-button-root { flex: 1 1 100%; }
    .fx-trace-search { align-items: stretch; flex-wrap: wrap; }.fx-trace-search .mud-input-control, .fx-trace-search .mud-button-root { width: 100%; }
    .fx-trace-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fx-cxc-filter { align-items: stretch; flex-wrap: wrap; }.fx-cxc-filter .mud-input-control, .fx-cxc-filter .mud-button-root { min-width: calc(50% - 5px); flex: 1 1 45%; }
    .fx-cxc-aging { grid-template-columns: repeat(2, 1fr); }.fx-cxc-aging > button:nth-child(2n) { border-right: 0; }.fx-cxc-aging > button:nth-child(n+3) { border-top: 1px solid #e8edf3; }.fx-cxc-aging > button:last-child { grid-column: 1 / -1; }.fx-cxc-client-head { flex-direction: column; gap: 4px; }.fx-cxc-client-head > strong { align-self: flex-start; }
    .fx-delivery-filter { align-items: stretch; flex-wrap: wrap; }.fx-delivery-filter .mud-input-control, .fx-delivery-filter .mud-input-control:nth-child(3), .fx-delivery-filter .mud-input-control:nth-child(4) { width: calc(50% - 4px); }.fx-delivery-filter .mud-button-root { width: 100%; }
    .fx-report-head,
    .fx-cobranza-head { align-items: stretch; flex-direction: column; border-radius: 12px; }
    .fx-report-filter,
    .fx-cobranza-filter { flex-wrap: wrap; align-items: stretch; }
    .fx-report-filter .mud-input-control,
    .fx-cobranza-filter .mud-input-control { flex: 1 1 100%; width: 100%; }
    .fx-report-filter .mud-button-root,
    .fx-cobranza-filter .mud-button-root { width: 100%; }
    .fx-cobranza-tab { flex: 1 1 45%; justify-content: center; padding: 10px 8px; font-size: .68rem; }
}

/* Error UI de Blazor */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* Sem?foro de despacho entre centros de distribuci?n. */
.fx-manifest-mounted {
    background-color: #166534 !important;
    color: #fff !important;
}

.fx-manifest-missing {
    background-color: #dc2626 !important;
    color: #fff !important;
}

.fx-manifest-zero {
    background-color: #eef0f2 !important;
    color: #667085 !important;
}

.fx-print-toolbar {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    max-width: 1100px;
    margin: 1rem auto;
}

.fx-manifest-print {
    max-width: 1100px;
    margin: 0 auto 1.25rem;
    padding: .85rem 1rem 1.1rem;
    color: #1f2937;
    background: #fff;
    font-size: .72rem;
    line-height: 1.25;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.fx-manifest-print-head,
.fx-manifest-print-meta,
.fx-manifest-print-signatures,
.fx-manifest-print-summary,
.fx-manifest-print-page-footer {
    display: flex;
    justify-content: space-between;
    gap: .65rem;
}

.fx-manifest-print-head {
    border-bottom: 1.5px solid #1f2937;
    padding-bottom: .4rem;
    align-items: flex-end;
}

.fx-manifest-print-head h1 {
    margin: 0;
    font-size: .95rem;
    letter-spacing: .02em;
    font-weight: 700;
    color: #1f2937;
}

.fx-manifest-print-head > div:first-child > div {
    font-size: .72rem;
    font-weight: 700;
    color: #1f2937;
}

.fx-manifest-print-head small {
    font-size: .65rem;
    color: #1f2937;
}

.fx-manifest-print-number { text-align: right; }
.fx-manifest-print-number span,
.fx-manifest-print-number strong,
.fx-manifest-print-number small { display: block; color: #1f2937; }
.fx-manifest-print-number span { font-size: .62rem; letter-spacing: .04em; font-weight: 700; }
.fx-manifest-print-number strong { font-size: 1.05rem; color: #1f2937; line-height: 1.1; }
.fx-manifest-print-number small { font-size: .62rem; color: #1f2937; }

.fx-manifest-print-continued {
    margin: .35rem 0;
    font-size: .62rem;
    color: #6b7280;
    font-style: italic;
}

.fx-manifest-print-meta {
    background: transparent;
    padding: .3rem 0;
    margin: .35rem 0 .4rem;
    font-size: .68rem;
    border-bottom: 1px solid #1f2937;
}

.fx-manifest-print-meta div b {
    display: block;
    font-size: .58rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #1f2937;
    font-weight: 700;
}

.fx-manifest-print-meta div span {
    display: block;
    margin-top: .06rem;
    font-weight: 600;
    color: #1f2937;
}

.fx-manifest-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .68rem;
    color: #1f2937;
}

.fx-manifest-print-table th,
.fx-manifest-print-table td {
    border: 1px solid #1f2937;
    padding: .14rem .24rem;
    text-align: left;
    vertical-align: top;
    color: #1f2937;
}

.fx-manifest-print-table th {
    background: transparent;
    color: #1f2937;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 2px solid #1f2937;
}

.fx-manifest-print-table tfoot td {
    background: transparent;
    font-size: .68rem;
    font-weight: 700;
    border-top: 2px solid #1f2937;
}

.fx-manifest-print-table td:nth-child(1),
.fx-manifest-print-table td:nth-child(2),
.fx-manifest-print-table td:nth-child(6),
.fx-manifest-print-table th:nth-child(1),
.fx-manifest-print-table th:nth-child(2),
.fx-manifest-print-table th:nth-child(6) { text-align: center; }

.fx-manifest-print-provincia td {
    background: #1f2937;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.fx-manifest-print-distrito td {
    background: #e7d6d6;
    font-size: .72rem;
    font-weight: 700;
}
.fx-manifest-print-destinatario td,
.fx-manifest-print-client td {
    background: #f3f4f6;
    font-size: .72rem;
    font-weight: 600;
    border-top: 2px solid #1f2937;
    letter-spacing: .01em;
}

.fx-manifest-print-summary {
    margin-top: .5rem;
    padding: .35rem .5rem;
    border: 1.5px solid #1f2937;
    background: transparent;
    gap: .75rem;
}

.fx-manifest-print-summary div {
    flex: 1;
    text-align: center;
}

.fx-manifest-print-summary span {
    display: block;
    font-size: .58rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #1f2937;
    font-weight: 700;
}

.fx-manifest-print-summary strong {
    display: block;
    margin-top: .08rem;
    font-size: .95rem;
    color: #1f2937;
    line-height: 1.1;
}

.fx-manifest-print-signatures {
    margin-top: 1.75rem;
    font-size: .68rem;
}

.fx-manifest-print-signatures div {
    width: 35%;
    border-top: 1px solid #374151;
    padding-top: .28rem;
    text-align: center;
}

.fx-manifest-print-page-footer {
    margin-top: .65rem;
    padding-top: .28rem;
    border-top: 1px solid #d1d5db;
    font-size: .6rem;
    color: #4b5563;
    align-items: center;
    gap: .5rem;
}

.fx-manifest-print-page-footer span:last-child {
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

@media print {
    .fx-print-toolbar { display: none !important; }

    .fx-manifest-print {
        margin: 0;
        max-width: none;
        padding: 0;
        border: none;
        font-size: 8pt;
    }

    .fx-manifest-print-page-break {
        break-after: page;
        page-break-after: always;
    }

    .fx-manifest-print-head h1 { font-size: 11pt; font-weight: 700; }
    .fx-manifest-print-number strong { font-size: 12pt; color: #1f2937; }
    .fx-manifest-print-table { font-size: 7.5pt; color: #1f2937; }
    .fx-manifest-print-table th,
    .fx-manifest-print-table td { padding: .1rem .18rem; color: #1f2937; }
    .fx-manifest-print-provincia td {
        background: #1f2937 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .fx-manifest-print-distrito td {
        background: #e7d6d6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .fx-manifest-print-destinatario td,
    .fx-manifest-print-client td {
        background: #e5e7eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-weight: 700;
    }
    .fx-manifest-print-table th {
        font-weight: 700;
        background: transparent !important;
        color: #1f2937 !important;
        border-bottom-width: 2px;
    }
    .fx-manifest-print-summary {
        border-color: #1f2937;
        background: transparent;
    }
    .fx-manifest-print-summary strong { font-size: 11pt; color: #1f2937; }
    .fx-manifest-print-signatures { margin-top: 1.25rem; }
    .fx-manifest-print-page-footer {
        margin-top: .5rem;
        padding-top: .3rem;
        font-size: 7.5pt;
        color: #1f2937;
    }

    body { background: #fff !important; }

    @page {
        size: letter;
        margin: .35in .4in .4in .4in;
    }
}
.fx-field-error-panel {
    border: 1px solid var(--mud-palette-error) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-error) 35%, transparent);
}

.fx-field-error-alert {
    outline: 2px solid var(--mud-palette-error);
    outline-offset: 1px;
}

.fx-corp-guides-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.fx-corp-guide-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.fx-corp-guide-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    text-align: left;
    border: 1px solid #d8dee6;
    background: #f8fafc;
    border-radius: 10px;
    padding: .85rem 1rem;
    cursor: pointer;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.fx-corp-guide-section strong {
    font-size: 1.35rem;
    line-height: 1.1;
}

.fx-corp-guide-section span {
    font-weight: 600;
}

.fx-corp-guide-section small {
    color: #667085;
}

.fx-corp-guide-section.active {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, #fff);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
}

@media (max-width: 720px) {
    .fx-corp-guide-sections {
        grid-template-columns: 1fr;
    }
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Comunicaci?n interna */
.fx-chat-page { overflow-x: hidden; }
.fx-chat-sidebar {
    min-height: min(78vh, 820px); height: min(78vh, 820px);
    display: flex; flex-direction: column; overflow: hidden;
}
.fx-chat-list {
    display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0;
    align-content: flex-start; justify-content: flex-start;
    overflow-x: hidden; overflow-y: auto; padding: 2px 2px 6px;
}
.fx-chat-list-item {
    width: 100%; max-width: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 1px;
    flex: 0 0 auto; align-self: stretch;
    text-align: left; border: 1px solid #e4e8ee; background: #fff;
    border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit;
    overflow: hidden; min-height: 0; height: auto;
}
.fx-chat-list-item:hover { border-color: #c9d2de; background: #f8fafc; }
.fx-chat-list-item.active { border-color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 8%, #fff); }
.fx-chat-list-title-row {
    display: flex; justify-content: space-between; gap: 6px; align-items: center; min-width: 0;
}
.fx-chat-list-title-row strong {
    min-width: 0; font-size: .88rem; line-height: 1.2; font-weight: 700;
    color: #101828; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-chat-list-meta {
    display: flex; flex-wrap: nowrap; gap: 6px;
    color: #98a2b3; font-size: .7rem; line-height: 1.2;
    white-space: nowrap; overflow: hidden;
}
.fx-chat-badge {
    display: inline-flex; flex: 0 0 auto; min-width: 18px; height: 18px; align-items: center; justify-content: center;
    padding: 0 5px; border-radius: 99px; background: #b42318; color: #fff; font-size: .68rem; font-weight: 700;
}
.fx-chat-thread {
    min-height: min(78vh, 820px); height: min(78vh, 820px);
    display: flex; flex-direction: column; overflow: hidden;
}
.fx-chat-thread-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; min-width: 0; }
.fx-chat-thread-head > div { min-width: 0; overflow: hidden; }
.fx-chat-messages {
    flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto;
    display: flex; flex-direction: column;
    gap: 8px; padding: 8px; background: #f6f7f9; border-radius: 10px; border: 1px solid #e8edf3;
}
.fx-chat-bubble { max-width: min(85%, 100%); padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid #e4e8ee; overflow-wrap: anywhere; }
.fx-chat-bubble.mine { align-self: flex-end; background: color-mix(in srgb, var(--mud-palette-primary) 12%, #fff); border-color: color-mix(in srgb, var(--mud-palette-primary) 35%, #e4e8ee); }
.fx-chat-bubble.theirs { align-self: flex-start; }
.fx-chat-bubble-meta { font-size: .72rem; color: #667085; margin-bottom: 4px; overflow-wrap: anywhere; }
.fx-chat-bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: .92rem; }
.fx-chat-composer {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end;
    margin-top: 8px; flex: 0 0 auto; min-width: 0; overflow: hidden;
}
.fx-chat-composer .mud-input-control,
.fx-chat-composer .mud-input,
.fx-chat-composer .mud-input-slot { max-width: 100%; min-width: 0; }
.fx-chat-composer textarea { resize: none; max-height: 3.2rem; overflow-x: hidden !important; overflow-y: auto !important; }
.fx-chat-empty { flex: 1; min-height: 360px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; color: #667085; padding: 24px; }
.fx-chat-inbox-alert .mud-alert-message { width: 100%; }
.fx-chat-inbox-content { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.fx-chat-inbox-content .mud-typography-subtitle2 { margin-bottom: 2px; font-weight: 800; }
.fx-chat-inbox-content .mud-button-root { flex: 0 0 auto; }
@media (max-width: 640px) {
  .fx-chat-inbox-content { align-items: stretch; flex-direction: column; }
  .fx-chat-inbox-content .mud-button-root { align-self: flex-start; }
}
.fx-chat-modal {
    position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 16px; pointer-events: none;
}
.fx-chat-modal > .mud-paper { width: min(520px, 100%); pointer-events: auto; }
.fx-chat-inbox-insist > .mud-paper { text-align: center; }
.fx-chat-inbox-insist-icon { margin-bottom: 8px; }
.fx-chat-inbox-insist-actions {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px;
}
.fx-nav-mensajes-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.35rem; height: 1.35rem; padding: 0 5px; margin-left: 8px;
    border-radius: 999px; background: #d97706; color: #fff;
    font-size: .7rem; font-weight: 800; line-height: 1;
}

@media (max-width: 960px) {
    .fx-chat-sidebar, .fx-chat-thread { min-height: 0; height: auto; max-height: none; }
    .fx-chat-messages { min-height: 280px; max-height: 52vh; }
    .fx-chat-list { max-height: 42vh; }
    .fx-chat-list-item {
        padding: 5px 8px;
    }
}


/* ===== Calendario operativo (sucursal / admin) ===== */
.fx-cal-page { --fx-cal-ink: #12263a; --fx-cal-muted: #5c6573; --fx-cal-line: #dde3ea; --fx-cal-accent: #0b3a66; --fx-cal-amber: #c47a2c; }
.fx-cal-hero { align-items: flex-end; gap: 16px; }
.fx-cal-kicker {
    margin: 0 0 4px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--fx-cal-amber); font-weight: 700;
}
.fx-cal-nav { display: flex; align-items: center; gap: 6px; }
.fx-cal-nav-wide { flex-wrap: wrap; }
.fx-cal-month {
    min-width: 9.5rem; text-align: center; font-weight: 800; font-size: 1.05rem;
    color: var(--fx-cal-ink); text-transform: capitalize;
}
.fx-cal-summary {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
    margin: 0 0 14px; animation: fxCalFadeUp .45s ease both;
}
.fx-cal-sum-item {
    padding: 12px 10px; border-radius: 12px; background:
        linear-gradient(160deg, #f7f9fc 0%, #eef3f8 100%);
    border: 1px solid var(--fx-cal-line); text-align: center;
}
.fx-cal-sum-val { display: block; font-size: 1.35rem; font-weight: 800; color: var(--fx-cal-accent); line-height: 1.1; }
.fx-cal-sum-lbl { display: block; margin-top: 4px; font-size: .72rem; color: var(--fx-cal-muted); font-weight: 600; }
.fx-cal-legend {
    display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px;
    font-size: .78rem; color: var(--fx-cal-muted); animation: fxCalFadeUp .5s ease both;
}
.fx-cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fx-cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fx-cal-dot-c { background: #3b82f6; }
.fx-cal-dot-r { background: #22a06b; }
.fx-cal-dot-m { background: #d97706; }
.fx-cal-dot-t { background: #7c3aed; }
.fx-cal-dot-rx { background: #4f46e5; }
.fx-cal-dot-e { background: #0f766e; }
.fx-cal-board {
    padding: 12px; border-radius: 16px;
    background:
        radial-gradient(1200px 400px at 10% -20%, rgba(11, 58, 102, .08), transparent 55%),
        linear-gradient(180deg, #fbfcfe 0%, #f3f6fa 100%);
    border: 1px solid var(--fx-cal-line);
    animation: fxCalFadeUp .55s ease both;
}
.fx-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.fx-cal-head {
    text-align: center; font-weight: 700; font-size: .72rem; letter-spacing: .06em;
    text-transform: uppercase; padding: 6px 2px; color: var(--fx-cal-muted);
}
.fx-cal-cell {
    min-height: 96px; border: 1px solid var(--fx-cal-line); border-radius: 12px;
    padding: 8px; text-align: left; background: #fff; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    animation: fxCalCellIn .4s ease both; animation-delay: var(--fx-cal-delay, 0ms);
    display: flex; flex-direction: column; gap: 4px;
}
.fx-cal-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(18, 38, 58, .1);
    border-color: color-mix(in srgb, var(--fx-cal-accent) 35%, var(--fx-cal-line));
}
.fx-cal-cell:focus-visible { outline: 2px solid var(--fx-cal-accent); outline-offset: 2px; }
.fx-cal-empty { visibility: hidden; pointer-events: none; animation: none; }
.fx-cal-feriado { background: linear-gradient(160deg, #fff8ef, #ffefd6); }
.fx-cal-today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fx-cal-accent) 55%, transparent); }
.fx-cal-selected { border-color: var(--fx-cal-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fx-cal-accent) 30%, transparent); }
.fx-cal-has { background: linear-gradient(180deg, #fff 0%, #f7fafc 100%); }
.fx-cal-daynum { font-weight: 800; font-size: .95rem; color: var(--fx-cal-ink); }
.fx-cal-feriado-label {
    font-size: .62rem; color: #a35f00; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
}
.fx-cal-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.fx-chip {
    font-size: .65rem; border-radius: 999px; padding: 2px 6px; font-weight: 700; line-height: 1.2;
}
.fx-chip-c { background: #dbeafe; color: #1d4ed8; }
.fx-chip-r { background: #dcfce7; color: #166534; }
.fx-chip-m { background: #ffedd5; color: #9a3412; }
.fx-chip-t { background: #ede9fe; color: #5b21b6; }
.fx-chip-rx { background: #e0e7ff; color: #3730a3; }
.fx-chip-e { background: #ccfbf1; color: #115e59; }
.fx-chip-caja { background: #d1fae5; color: #065f46; }
.fx-chip-rec { background: #fef3c7; color: #92400e; }
.fx-chip-debt { background: #fee2e2; color: #991b1b; }
.fx-cal-dot-caja { background: #059669; }
.fx-cal-dot-rec { background: #d97706; }
.fx-cal-dot-debt { background: #dc2626; }
.fx-cal-sum-debt .fx-cal-sum-val { color: #b91c1c; }

.fx-cal-modal-tabs {
    display: flex; gap: 4px; padding: 8px 16px 0; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    flex: 0 0 auto;
}
.fx-cal-modal-tabs button {
    border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: #64748b;
    cursor: pointer; border-bottom: 2px solid transparent; font-size: .9rem;
}
.fx-cal-modal-tabs button.active { color: #0b3a66; border-bottom-color: #0b3a66; }
.fx-cal-rec-form { display: grid; gap: 8px; }
.fx-cal-rec-item {
    display: flex; align-items: flex-start; gap: 8px; padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}
.fx-cal-rec-item.done .fx-cal-rec-copy strong { text-decoration: line-through; color: #94a3b8; }
.fx-cal-rec-copy { flex: 1; display: grid; gap: 2px; min-width: 0; }
.fx-cal-rec-copy small { color: #697186; font-size: .8rem; }

.fx-cal-modal-root {
    position: fixed; inset: 0; z-index: 1700; display: grid; place-items: center;
    padding: 16px; background: rgba(10, 21, 32, .48);
    backdrop-filter: blur(4px);
    animation: fxCalBackdrop .22s ease both;
}
.fx-cal-modal {
    width: min(720px, 100%);
    height: min(86vh, 900px);
    max-height: min(86vh, 900px);
    background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 28px 60px rgba(10, 21, 32, .28);
    display: flex; flex-direction: column;
    animation: fxCalModalIn .28s cubic-bezier(.2, .8, .2, 1) both;
    border: 1px solid rgba(255,255,255,.35);
}
.fx-cal-modal-loading { flex: 1; min-height: 220px; display: grid; place-items: center; }
.fx-cal-modal-head {
    flex: 0 0 auto;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    padding: 18px 20px 12px;
    background: linear-gradient(135deg, #12263a 0%, #0b3a66 55%, #1a4f7a 100%);
    color: #fff;
}
.fx-cal-modal-head h2 {
    margin: 0; font-size: 1.25rem; font-weight: 800; text-transform: capitalize; line-height: 1.25;
}
.fx-cal-modal-head .fx-cal-kicker { color: #f0c48a; }
.fx-cal-modal-head .mud-icon-button { color: #fff !important; }
.fx-cal-badge-feriado {
    display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
    background: rgba(255, 186, 73, .2); color: #ffd89a; font-size: .75rem; font-weight: 700;
}
.fx-cal-modal-kpis {
    flex: 0 0 auto;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
    padding: 14px 16px 8px; background: #f6f8fb; border-bottom: 1px solid var(--fx-cal-line);
}
.fx-cal-kpi {
    display: block; width: 100%;
    border-radius: 10px; padding: 10px 6px; text-align: center; background: #fff;
    border: 1px solid var(--fx-cal-line);
    cursor: pointer;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.fx-cal-kpi:hover:not(:disabled) {
    border-color: #94a3b8;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.fx-cal-kpi.active {
    border-width: 2px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.fx-cal-kpi-c.active { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
.fx-cal-kpi-r.active { border-color: #166534; box-shadow: 0 0 0 3px rgba(22, 101, 52, .15); }
.fx-cal-kpi-m.active { border-color: #9a3412; box-shadow: 0 0 0 3px rgba(154, 52, 18, .15); }
.fx-cal-kpi-t.active { border-color: #5b21b6; box-shadow: 0 0 0 3px rgba(91, 33, 182, .15); }
.fx-cal-kpi-rx.active { border-color: #3730a3; box-shadow: 0 0 0 3px rgba(55, 48, 163, .15); }
.fx-cal-kpi-e.active { border-color: #115e59; box-shadow: 0 0 0 3px rgba(17, 94, 89, .15); }
.fx-cal-kpi.is-empty,
.fx-cal-kpi:disabled {
    opacity: .45;
    cursor: default;
    box-shadow: none;
}
.fx-cal-kpi strong { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1; }
.fx-cal-kpi span { display: block; margin-top: 4px; font-size: .68rem; color: var(--fx-cal-muted); font-weight: 600; }
.fx-cal-kpi-c strong { color: #1d4ed8; }
.fx-cal-kpi-r strong { color: #166534; }
.fx-cal-kpi-m strong { color: #9a3412; }
.fx-cal-kpi-t strong { color: #5b21b6; }
.fx-cal-kpi-rx strong { color: #3730a3; }
.fx-cal-kpi-e strong { color: #115e59; }
.fx-cal-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 16px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.fx-cal-section { margin-top: 12px; }
.fx-cal-section h3 {
    position: sticky; top: 0; z-index: 1;
    margin: 0 0 8px; padding: 8px 0 6px;
    font-size: .82rem; font-weight: 800; color: var(--fx-cal-ink);
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(180deg, #fff 70%, rgba(255,255,255,0));
}
.fx-cal-section h3 em {
    font-style: normal; font-size: .72rem; padding: 2px 8px; border-radius: 999px;
    background: #e8eef5; color: var(--fx-cal-accent); font-weight: 800;
}
.fx-cal-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-cal-section li a {
    display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
    border-radius: 10px; border: 1px solid var(--fx-cal-line); background: #fff;
    text-decoration: none; color: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.fx-cal-section li a:hover { border-color: color-mix(in srgb, var(--fx-cal-accent) 40%, var(--fx-cal-line)); background: #f7fafc; }
.fx-cal-section li strong { color: var(--fx-cal-accent); font-size: .92rem; }
.fx-cal-section li span { color: var(--fx-cal-muted); font-size: .8rem; }
.fx-cal-section-meta {
    margin: 0 0 8px; font-size: .75rem; color: var(--fx-cal-muted); font-weight: 600;
}
.fx-cal-more {
    margin-top: 10px; width: 100%;
    border: 1px dashed color-mix(in srgb, var(--fx-cal-accent) 35%, var(--fx-cal-line));
    background: #f7fafc; color: var(--fx-cal-accent);
    border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: .85rem; cursor: pointer;
}
.fx-cal-more:hover { background: #eef4fa; }
.fx-cal-empty-day {
    display: grid; place-items: center; gap: 8px; padding: 36px 16px; color: var(--fx-cal-muted); text-align: center;
}
.fx-cal-empty-day p { margin: 0; font-weight: 600; }

@keyframes fxCalFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fxCalCellIn {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fxCalBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fxCalModalIn {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
    .fx-cal-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fx-cal-modal-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fx-cal-cell { min-height: 76px; padding: 6px; }
    .fx-chip { font-size: .58rem; }
}
@media (max-width: 560px) {
    .fx-cal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fx-cal-board { padding: 8px; }
    .fx-cal-grid { gap: 4px; }
}

/* Hist?rico interactivo (timeline) */
.fx-hist-timeline {
    padding: 8px 12px 20px;
}
.fx-hist-timeline-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a2332;
    margin-bottom: 12px;
}
.fx-hist-spine {
    position: relative;
    padding-left: 108px;
}
.fx-hist-spine::before {
    content: "";
    position: absolute;
    left: 96px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #d8dee8;
    border-radius: 2px;
}
.fx-hist-year-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 8px -4px;
    padding: 4px 14px;
    border-radius: 999px;
    background: #2f6fed;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    position: relative;
    left: -12px;
    z-index: 1;
}
.fx-hist-row {
    display: grid;
    grid-template-columns: 88px 16px 1fr;
    gap: 8px;
    align-items: start;
    margin: 0 0 14px -108px;
    padding-left: 0;
}
.fx-hist-month-label {
    text-align: right;
    font-size: .72rem;
    color: #7a8699;
    padding-top: 10px;
    text-transform: lowercase;
}
.fx-hist-node {
    width: 10px;
    height: 10px;
    margin: 12px auto 0;
    border-radius: 50%;
    background: #c5cdd9;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d0d7e2;
    z-index: 1;
}
.fx-hist-row.is-selected .fx-hist-node {
    background: #2f6fed;
    box-shadow: 0 0 0 1px #2f6fed;
}
.fx-hist-callout {
    text-align: left;
    border: 1px solid #e4e9f1;
    background: #f4f7fb;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.fx-hist-callout:hover {
    border-color: #b8c7e0;
    background: #eef3fa;
}
.fx-hist-row.is-selected .fx-hist-callout {
    border-color: #9db6e8;
    background: #e8f0fc;
    box-shadow: 0 2px 8px rgba(47, 111, 237, .12);
}
.fx-hist-callout-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 650;
    color: #1a2332;
    font-size: .9rem;
}
.fx-hist-callout-metrics {
    margin-top: 4px;
    font-size: .78rem;
    color: #5a6578;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.fx-hist-callout-extra {
    margin-top: 6px;
    font-size: .75rem;
    color: #374151;
    font-weight: 500;
}
@media (max-width: 600px) {
    .fx-hist-spine { padding-left: 72px; }
    .fx-hist-spine::before { left: 64px; }
    .fx-hist-row {
        grid-template-columns: 56px 14px 1fr;
        margin-left: -72px;
    }
    .fx-hist-month-label { font-size: .65rem; }
}

/* ——— CRM Atención ——— */
.crm-atencion .crm-search-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.crm-atencion .crm-search-input .mud-input-slot {
    font-size: 1.15rem;
}
.crm-hit, .crm-guia, .crm-cola-item {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: #fff;
}
.crm-hit:hover, .crm-cola-item:hover, .crm-guia:hover {
    border-color: rgba(37, 99, 235, .35);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.crm-guia { cursor: default; }
.crm-guia.is-hist { opacity: .92; background: #f8fafc; }
.crm-guia-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.crm-guia-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.crm-guia-headline { font-size: .95rem; font-weight: 600; color: #1e293b; margin-top: 2px; }
.crm-guia-sub { font-size: .82rem; color: #64748b; margin-top: 2px; }
.crm-guia-chips {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.crm-guia-grid {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
}
.crm-guia-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    align-items: baseline;
}
.crm-guia-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
}
.crm-guia-value {
    font-size: .9rem;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}
.crm-guia-value.is-pagado { color: #047857; }
.crm-guia-value.is-por-cobrar { color: #c2410c; }
@media (max-width: 600px) {
    .crm-guia-row { grid-template-columns: 1fr; gap: 2px; }
}
.crm-persona {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: #fff;
}
.crm-kpi {
    border-radius: 10px;
    padding: 10px 12px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.crm-kpi span { font-size: .75rem; color: #64748b; font-weight: 600; }
.crm-kpi strong { font-size: 1.35rem; line-height: 1.1; color: #0f172a; }
.crm-kpi.is-warn { background: #fff7ed; }
.crm-kpi.is-warn strong { color: #c2410c; }
.crm-kpi.is-ok { background: #ecfdf5; }
.crm-kpi.is-ok strong { color: #047857; }
.crm-kpi.is-down { background: #fef2f2; }
.crm-kpi.is-down strong { color: #b91c1c; }
.crm-kpi small { font-size: .75rem; color: #64748b; line-height: 1.3; }
.crm-lectura { font-size: .95rem; color: #0f172a; margin: 0; }
.crm-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.crm-bars i {
    display: block; height: 6px; border-radius: 99px; background: #0f172a; min-width: 4px;
}
.crm-bars i.is-prev { background: #cbd5e1; }
.crm-linea { display: flex; flex-direction: column; }
.crm-seccion {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
}
.crm-seccion strong { color: #0f172a; font-size: .95rem; }
.crm-seccion span { color: #64748b; font-size: .78rem; }
.crm-pendiente {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
}
.crm-pendiente-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.crm-pendiente-head strong { color: #0f172a; }
.crm-pendiente-head span { color: #64748b; font-size: .8rem; }
.crm-etapa {
    display: inline-block;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 99px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 700;
}
.crm-linea-item {
    display: grid;
    grid-template-columns: 96px 16px 1fr;
    gap: 10px;
}
.crm-linea-fecha { text-align: right; padding-top: 2px; }
.crm-linea-fecha strong { display: block; font-size: .85rem; color: #0f172a; }
.crm-linea-fecha span { font-size: .72rem; color: #94a3b8; }
.crm-linea-rail { position: relative; }
.crm-linea-rail::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    transform: translateX(-50%);
}
.crm-linea-rail span {
    position: relative;
    z-index: 1;
    display: block;
    width: 10px;
    height: 10px;
    margin: 6px auto 0;
    border-radius: 50%;
    background: #0f172a;
}
.crm-linea-rail span.is-done { background: #047857; }
.crm-linea-body {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.crm-linea-guia { font-weight: 700; color: #0f172a; text-decoration: none; }
.crm-linea-guia:hover { text-decoration: underline; }
.crm-linea-rol, .crm-linea-estado {
    display: inline-block;
    margin-left: 6px;
    font-size: .72rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 8px;
}
.crm-linea-rol.is-envio { background: #e0f2fe; color: #0369a1; }
.crm-linea-rol.is-recepcion { background: #f3e8ff; color: #7e22ce; }
.crm-linea-estado { background: #f1f5f9; color: #334155; }
.crm-linea-dinero { text-align: right; }
.crm-linea-dinero strong { display: block; }
.crm-linea-dinero span { font-size: .75rem; }
.crm-linea-dinero .is-pagado { color: #047857; }
.crm-linea-dinero .is-por-cobrar { color: #c2410c; }
.crm-linea-sub { font-size: .85rem; color: #1e293b; margin-top: 4px; }
.crm-linea-meta { font-size: .78rem; color: #64748b; margin-top: 2px; }
@media (max-width: 600px) {
    .crm-linea-item { grid-template-columns: 84px 12px 1fr; }
}
.crm-muted { color: #64748b !important; }
.crm-nota {
    border-left: 3px solid #cbd5e1;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}
.crm-cola { border: 1px solid rgba(15, 23, 42, .08); border-radius: 12px; }

/* —— Monitoreo entregas PAP (/sucursal/entregas-pap) —— */
.fx-pap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}
.fx-pap-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.35;
    white-space: nowrap;
}
.fx-pap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.fx-pap-pill--rojo {
    background: #fecaca;
    color: #991b1b;
}
.fx-pap-pill--amarillo {
    background: #fde68a;
    color: #92400e;
}
.fx-pap-pill--verde {
    background: #bbf7d0;
    color: #166534;
}
.fx-pap-pill--cobrado {
    background: #d1fae5;
    color: #065f46;
}
.fx-pap-pill--sincobro {
    background: #fee2e2;
    color: #991b1b;
}
.fx-pap-pill--facturada {
    background: #dbeafe;
    color: #1e40af;
}
.fx-pap-pill--sinfactura {
    background: #f1f5f9;
    color: #475569;
}
.fx-pap-pill--factura-alerta {
    background: #ffedd5;
    color: #9a3412;
}

/* —— Antigüedad de lo pendiente (0-2 h / 2-8 h / 8-24 h / 24 h+) —— */
.fx-pap-legend-edad {
    margin-top: 4px;
}
.fx-pap-pill--edad-reciente {
    background: #e0f2fe;
    color: #075985;
}
.fx-pap-pill--edad-demorada {
    background: #fef3c7;
    color: #92400e;
}
.fx-pap-pill--edad-vieja {
    background: #fed7aa;
    color: #9a3412;
}
.fx-pap-pill--edad-atascada {
    background: #991b1b;
    color: #fff;
}
.fx-pap-atascadas {
    border-left: 4px solid #991b1b;
}
.fx-pap-atascadas .fx-panel-head h2 {
    color: #991b1b;
}

/* —— Control de auto-refresco del monitor —— */
.fx-pap-refresco {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: .25rem;
}
.fx-pap-refresco-estado {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: #475569;
}
.fx-pap-refresco-estado.is-busy {
    color: #1d4ed8;
}
.fx-pap-refresco-estado strong {
    color: #b45309;
}
.fx-pap-tipo-cobro {
    font-size: .78rem;
    color: #64748b;
    margin-top: 2px;
}
.fx-pap-chofer {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.fx-pap-chofer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.fx-pap-chofer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.fx-pap-chofer-sub {
    font-size: .85rem;
    color: #64748b;
    margin-top: 2px;
}
.fx-pap-chofer-foot {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid rgba(15, 23, 42, .06);
    font-size: .9rem;
    color: #475569;
}
.fx-pap-chofer-foot strong { color: #0f172a; }

.fx-pap-kpi-ring {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fx-pap-kpi-ring .fx-dash-kpi-value { font-size: 1.35rem; }
.fx-pap-dona-leyenda { padding: 0 16px 14px; }
.fx-pap-chart-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: .9rem;
    padding: 16px;
}
.fx-pap-cuadro {
    width: 100%;
    height: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.fx-pap-cuadro {
    border-left: 6px solid var(--fx-pap-c, #2563eb);
}
.fx-pap-cuadro:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.fx-pap-cuadro:focus-visible {
    outline: 2px solid var(--fx-pap-c, #2563eb);
    outline-offset: 2px;
}
.fx-pap-cuadro.is-on {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--fx-pap-c, #2563eb) 45%, transparent);
}
.fx-pap-cuadro-id {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.fx-pap-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.fx-pap-mini-track {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-pap-c, #2563eb) 18%, white);
    overflow: hidden;
}
.fx-pap-mini-track > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}
.fx-pap-hbar-head { flex-wrap: wrap; }
.fx-pap-hbar { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.fx-pap-hbar-leyenda {
    display: flex;
    gap: 14px;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}
.fx-pap-hbar-leyenda i {
    display: inline-block;
    width: 14px;
    height: 10px;
    margin-right: 4px;
    border-radius: 999px;
    vertical-align: middle;
    background: #64748b;
}
.fx-pap-hbar-leyenda i.is-soft { opacity: .28; }
.fx-pap-hbar-row {
    display: grid;
    grid-template-columns: minmax(150px, 240px) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.fx-pap-hbar-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
    color: #0f172a;
}
.fx-pap-hbar-name .fx-pap-dot { margin-top: 0; }
.fx-pap-hbar-name > span:last-child {
    min-width: 0;
    line-height: 1.25;
}
.fx-pap-hbar-slot { min-width: 0; }
.fx-pap-hbar-track {
    display: flex;
    height: 18px;
    min-width: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
}
.fx-pap-hbar-fill,
.fx-pap-hbar-rest {
    display: block;
    height: 100%;
    min-width: 0;
}
.fx-pap-hbar-rest { opacity: .28; }
.fx-pap-hbar-nums {
    font-size: .82rem;
    color: #475569;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
    .fx-pap-hbar-row { grid-template-columns: 1fr; gap: 4px; }
}
.fx-pap-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
}
.fx-pap-metric span {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}
.fx-pap-metric strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.2;
}
.fx-pap-metric em {
    display: block;
    font-style: normal;
    font-size: .75rem;
    color: #64748b;
}
.fx-pap-cuadro-note {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: .78rem;
    color: #64748b;
}
.fx-pap-detalle {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.fx-pap-detalle > summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    padding: 14px 16px;
    list-style: none;
}
.fx-pap-detalle > summary::-webkit-details-marker { display: none; }
.fx-pap-detalle-body { padding: 0 16px 8px; }

/* Filas semáforo (RowClassFunc) — MudTable aplica la clase en <tr> */
.fx-pap-row--rojo > td {
    background: #fef2f2 !important;
}
.fx-pap-row--amarillo > td {
    background: #fffbeb !important;
}
.fx-pap-row--verde > td {
    background: #f0fdf4 !important;
}
.mud-table-row.fx-pap-row--rojo:hover > td,
.mud-table-row.fx-pap-row--amarillo:hover > td,
.mud-table-row.fx-pap-row--verde:hover > td {
    filter: brightness(0.98);
}

.fx-adv-tree { display: flex; flex-direction: column; gap: 8px; }
.fx-adv-node {
    display: flex; align-items: flex-start; gap: 10px; width: 100%;
    text-align: left; padding: 10px 12px; border-radius: 8px;
    border: 1px solid #e3eaf3; background: #fff; color: inherit;
}
.fx-adv-node.is-clickable { cursor: pointer; }
.fx-adv-node.is-clickable:hover { border-color: #814a4c; }
.fx-adv-node.is-selected { border-color: #814a4c; background: #faf6f6; }
.fx-adv-node.is-current { border-color: #16723b; background: #f0fdf4; }
.fx-adv-node.is-blocked { opacity: .72; cursor: default; }
.fx-adv-dot {
    width: 10px; height: 10px; margin-top: 5px; border-radius: 50%;
    background: #814a4c; flex: 0 0 auto;
}
.fx-adv-node.is-current .fx-adv-dot { background: #16723b; }
.fx-adv-node.is-blocked .fx-adv-dot { background: #cbd5e1; }
.fx-adv-body { display: flex; flex-direction: column; gap: 2px; }
.fx-adv-tag { font-size: .75rem; color: #64748b; }
.fx-adv-tag.is-ok { color: #814a4c; font-weight: 600; }
.fx-adv-tag.is-off { color: #94a3b8; }
.fx-ops-details { margin-top: 16px; }
.fx-ops-details summary { cursor: pointer; font-weight: 600; }
.fx-ops-details-body { margin-top: 8px; }

/* =====================================================================
   DASHBOARD DE SUCURSAL v2  ·  operación de alto movimiento
   Prefijo .fx-suc-v2 para no afectar otros dashboards.
   Reglas de movimiento: solo montaje, 180-240 ms, max 12 px, stagger corto.
   ===================================================================== */

.fx-suc-v2 {
    --fx-suc-line: var(--mud-palette-divider, #E8E8EA);
    --fx-suc-ink: var(--mud-palette-text-primary, #111111);
    --fx-suc-muted: var(--mud-palette-text-secondary, #66666f);
    --fx-suc-surface: var(--mud-palette-surface, #FFFFFF);
    --fx-suc-soft: color-mix(in srgb, var(--mud-palette-text-primary, #111) 4%, var(--mud-palette-surface, #fff));
    --fx-suc-brand: var(--mud-palette-primary, #814a4c);
    --fx-suc-brand-soft: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 10%, var(--mud-palette-surface, #fff));
    --fx-suc-danger: #B91C1C;
    --fx-suc-danger-soft: color-mix(in srgb, #B91C1C 9%, var(--mud-palette-surface, #fff));
    --fx-suc-ok: #16A34A;
    --fx-suc-warn: #F59E0B;
    /* Texto de estado: se mezcla con el color de texto del tema, así funciona en claro y oscuro
       sin necesitar un selector de tema (MudBlazor reescribe las variables en :root). */
    --fx-suc-ok-ink: color-mix(in srgb, var(--mud-palette-success, #22C55E) 42%, var(--mud-palette-text-primary, #111));
    --fx-suc-warn-ink: color-mix(in srgb, var(--mud-palette-warning, #F59E0B) 40%, var(--mud-palette-text-primary, #111));
    --fx-suc-danger-ink: color-mix(in srgb, var(--mud-palette-error, #EF4444) 62%, var(--mud-palette-text-primary, #111));
    --fx-suc-radius: 16px;
    --fx-suc-ease: cubic-bezier(.22, 1, .36, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cifras: nunca deben "bailar" cuando el dashboard se refresca solo. */
.fx-suc-num,
.fx-suc-v2 .fx-stat-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* ---------- Hero de turno ---------- */
.fx-suc-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px 28px;
    padding: 24px 26px;
    border-radius: var(--fx-suc-radius);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(120% 150% at 88% 0%, rgba(255, 255, 255, .16) 0%, transparent 58%),
        linear-gradient(135deg, #111111 0%, #5f3537 58%, #814a4c 100%);
    animation: fxSucRise .24s var(--fx-suc-ease) both;
}
.fx-suc-hero.is-refreshing {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset;
}
.fx-suc-hero-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fx-suc-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}
.fx-suc-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    display: inline-block;
}
.fx-suc-hero-score { display: flex; align-items: center; gap: 16px; }
.fx-suc-score-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px; height: 76px;
    flex: 0 0 auto;
    border-radius: 50%;
}
/* Anillo determinista con conic-gradient: sin depender de internals de MudBlazor.
   La máscara perfora el centro para dejar ver el gradiente del hero, así no hace
   falta un color interior fijo que se rompería en otro tema. */
.fx-suc-score-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(#fff calc(var(--fx-pct, 0) * 1%), rgba(255, 255, 255, .22) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px + 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px + 1px));
    animation: fxSucRing .5s var(--fx-suc-ease) both;
}
.fx-suc-score-ring-value {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.fx-suc-score-ring-value i { font-size: .62rem; font-style: normal; opacity: .8; margin-left: 1px; }
.fx-suc-score-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-suc-score-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}
.fx-suc-score-verdict { font-size: 1.32rem; font-weight: 780; line-height: 1.15; }
.fx-suc-score-meta { font-size: .76rem; color: rgba(255, 255, 255, .66); }

.fx-suc-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-suc-v2 .fx-suc-hero-btn {
    border-color: rgba(255, 255, 255, .42) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: none !important;
}
.fx-suc-v2 .fx-suc-hero-btn--solid { background: #fff !important; color: #5f3537 !important; border-color: #fff !important; }
.fx-suc-v2 .fx-suc-hero-btn:hover { background: rgba(255, 255, 255, .12) !important; }
.fx-suc-v2 .fx-suc-hero-btn--solid:hover { background: rgba(255, 255, 255, .88) !important; }

.fx-suc-hero-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    overflow: hidden;
}
.fx-suc-hero-progress .mud-progress-linear { background: transparent !important; }
.fx-suc-hero-progress .mud-progress-linear-bar { background: rgba(255, 255, 255, .85) !important; }

/* ---------- Alerta crítica (una sola) ---------- */
.fx-suc-critical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--fx-suc-radius);
    border: 1px solid color-mix(in srgb, var(--fx-suc-danger) 34%, transparent);
    border-left: 4px solid var(--fx-suc-danger);
    background: var(--fx-suc-danger-soft);
    animation: fxSucRise .22s var(--fx-suc-ease) both;
}
.fx-suc-critical-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-suc-critical-head > div { flex: 1 1 240px; min-width: 0; }
.fx-suc-critical-pulse {
    flex: 0 0 auto;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--fx-suc-danger);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--fx-suc-danger) 55%, transparent);
    animation: fxSucPulse 2.4s ease-out infinite;
}
.fx-suc-critical-title { margin: 0; font-size: 1.02rem; font-weight: 780; color: var(--fx-suc-ink); line-height: 1.2; }
.fx-suc-critical-sub { margin: 2px 0 0; font-size: .87rem; color: var(--fx-suc-muted); line-height: 1.4; }
.fx-suc-v2 .fx-suc-critical-cta {
    background: var(--fx-suc-danger) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: none !important;
    white-space: nowrap;
}
.fx-suc-critical-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.fx-suc-critical-list li {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--fx-suc-surface);
    border: 1px solid var(--fx-suc-line);
    font-size: .79rem;
    color: var(--fx-suc-muted);
}
.fx-suc-critical-list li strong { color: var(--fx-suc-ink); font-weight: 700; }
.fx-suc-critical-list li.is-more { border-style: dashed; }

/* ---------- Bandeja de prioridades ---------- */
.fx-suc-prio-deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 10px; }
.fx-suc-prio {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--fx-suc-line);
    background: var(--fx-suc-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    animation: fxSucRise .22s var(--fx-suc-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-suc-prio:hover {
    border-color: color-mix(in srgb, var(--fx-suc-brand) 42%, transparent);
    box-shadow: 0 10px 26px -18px rgba(17, 17, 17, .4);
    transform: translateY(-1px);
}
.fx-suc-prio-mark {
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--fx-suc-warn);
}
.fx-suc-prio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--fx-suc-brand-soft);
    color: var(--fx-suc-brand);
}
.fx-suc-prio-body { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.fx-suc-prio-title { font-size: .87rem; font-weight: 700; color: var(--fx-suc-ink); }
.fx-suc-prio-meta {
    font-size: .76rem;
    color: var(--fx-suc-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fx-suc-prio-cifra { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.fx-suc-prio-cifra strong { font-size: 1.24rem; font-weight: 800; color: var(--fx-suc-ink); }
.fx-suc-prio-cifra span { font-size: .66rem; color: var(--fx-suc-muted); }
.fx-suc-prio-arrow { color: var(--fx-suc-muted); flex: 0 0 auto; }

/* ---------- KPIs ---------- */
.fx-suc-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 10px;
    align-items: stretch;
}
.fx-suc-v2 .fx-suc-stat {
    height: 100%;
    padding: 16px 17px;
    border-radius: 14px;
    animation: fxSucRise .2s var(--fx-suc-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-suc-v2 .fx-suc-stat .fx-stat-value { font-size: 1.72rem; margin-top: 10px; }
.fx-suc-stat-hint { margin-top: 3px; font-size: .73rem; color: var(--fx-suc-muted); line-height: 1.3; }

.fx-suc-v2 .fx-suc-stat--urgent {
    border-color: color-mix(in srgb, var(--fx-suc-danger) 40%, transparent);
    background: var(--fx-suc-danger-soft);
}
.fx-suc-v2 .fx-suc-stat--urgent .fx-suc-stat-hint { color: var(--fx-suc-danger); font-weight: 600; }
.fx-suc-v2 .fx-suc-stat--muted { background: var(--fx-suc-soft); }
.fx-suc-v2 .fx-suc-stat--muted .fx-stat-value { color: var(--fx-suc-muted); font-weight: 600; }

.fx-suc-kpi-toggle {
    align-self: center;
    justify-self: start;
    padding: 8px 12px;
    border: 1px dashed var(--fx-suc-line);
    border-radius: 10px;
    background: transparent;
    color: var(--fx-suc-muted);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.fx-suc-kpi-toggle:hover { color: var(--fx-suc-brand); border-color: var(--fx-suc-brand); }

/* ---------- Secciones y paneles ---------- */
.fx-suc-section { display: flex; flex-direction: column; gap: 10px; }
.fx-suc-section-head, .fx-suc-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.fx-suc-section-title { margin: 0; font-size: 1rem; font-weight: 760; color: var(--fx-suc-ink); line-height: 1.2; }
.fx-suc-section-sub { margin: 2px 0 0; font-size: .82rem; color: var(--fx-suc-muted); }
.fx-suc-panel-note { font-size: .74rem; color: var(--fx-suc-muted); }

.fx-suc-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    border-radius: var(--fx-suc-radius);
    border: 1px solid var(--fx-suc-line);
    background: var(--fx-suc-surface);
}
.fx-suc-panel-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Cola operativa ---------- */
.fx-suc-cola { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 10px; }
.fx-suc-cola-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 15px;
    text-align: left;
    border-radius: 14px;
    border: 1px solid var(--fx-suc-line);
    background: var(--fx-suc-surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    animation: fxSucRise .22s var(--fx-suc-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-suc-cola-card:hover {
    border-color: color-mix(in srgb, var(--fx-suc-brand) 40%, transparent);
    box-shadow: 0 12px 28px -20px rgba(17, 17, 17, .45);
    transform: translateY(-2px);
}
.fx-suc-cola-card.is-urgent { border-left: 3px solid var(--fx-suc-danger); }
.fx-suc-cola-card.is-empty { background: var(--fx-suc-soft); }
.fx-suc-cola-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-suc-cola-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--fx-suc-brand-soft);
    color: var(--fx-suc-brand);
}
.fx-suc-cola-card.is-urgent .fx-suc-cola-icon {
    background: var(--fx-suc-danger-soft);
    color: var(--fx-suc-danger);
}
.fx-suc-cola-card.is-empty .fx-suc-cola-icon { background: var(--fx-suc-soft); color: var(--fx-suc-muted); }
.fx-suc-cola-flag {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--fx-suc-danger);
    color: #fff;
}
.fx-suc-cola-title { font-size: .82rem; font-weight: 700; color: var(--fx-suc-muted); line-height: 1.25; }
.fx-suc-cola-cifra { display: flex; align-items: baseline; gap: 5px; color: var(--fx-suc-ink); }
.fx-suc-cola-cifra strong { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.fx-suc-cola-cifra span { font-size: .74rem; color: var(--fx-suc-muted); }
.fx-suc-cola-cifra em { font-size: .74rem; font-style: normal; color: var(--fx-suc-muted); }
.fx-suc-cola-card.is-empty .fx-suc-cola-cifra strong { color: var(--fx-suc-muted); }
.fx-suc-cola-detalle { font-size: .74rem; color: var(--fx-suc-muted); line-height: 1.32; }
.fx-suc-cola-go {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    font-size: .73rem;
    font-weight: 700;
    color: var(--fx-suc-brand);
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity .15s ease, transform .15s ease;
}
.fx-suc-cola-card:hover .fx-suc-cola-go,
.fx-suc-cola-card:focus-visible .fx-suc-cola-go { opacity: 1; transform: translateX(0); }

/* ---------- Split cumplimiento / bodega ---------- */
.fx-suc-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; }

.fx-suc-metrics { display: flex; flex-direction: column; gap: 11px; }
.fx-suc-metric { display: flex; flex-direction: column; gap: 4px; }
.fx-suc-metric-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fx-suc-metric-title { font-size: .81rem; font-weight: 650; color: var(--fx-suc-muted); }
.fx-suc-metric-value { font-size: 1.05rem; font-weight: 800; color: var(--fx-suc-ink); }
.fx-suc-metric-bar {
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-suc-ink) 8%, transparent);
    overflow: hidden;
}
.fx-suc-metric-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    transform-origin: left center;
    animation: fxSucBarGrow .42s var(--fx-suc-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-suc-metric-foot { font-size: .72rem; color: var(--fx-suc-muted); }

.fx-suc-red {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--fx-suc-soft);
    border: 1px solid var(--fx-suc-line);
}
.fx-suc-red-label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--fx-suc-muted);
}
.fx-suc-red-text { font-size: .78rem; color: var(--fx-suc-ink); }

.fx-suc-donut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fx-suc-donut-legend { display: flex; flex-direction: column; gap: 5px; flex: 1 1 150px; min-width: 0; }
.fx-suc-legend-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 2px 0;
    color: inherit;
    text-decoration: none;
    font-size: .79rem;
    transition: color .15s ease;
}
.fx-suc-legend-row:hover { color: var(--fx-suc-brand); }
.fx-suc-legend-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.fx-suc-legend-label { flex: 1 1 auto; min-width: 0; color: var(--fx-suc-muted); }
.fx-suc-legend-row strong { color: var(--fx-suc-ink); font-weight: 750; }

/* ---------- Checklist de cierre ---------- */
.fx-suc-checklist { display: flex; flex-direction: column; gap: 8px; }
.fx-suc-check {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--fx-suc-line);
    background: var(--fx-suc-surface);
}
.fx-suc-check > .mud-button-root { flex: 0 0 auto; }
.fx-suc-check-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--fx-suc-muted); }
.fx-suc-check.is-ok { background: color-mix(in srgb, var(--fx-suc-ok) 8%, var(--fx-suc-surface)); border-color: color-mix(in srgb, var(--fx-suc-ok) 28%, transparent); }
.fx-suc-check.is-ok .fx-suc-check-dot { background: var(--fx-suc-ok); }
.fx-suc-check.is-pending { background: var(--fx-suc-danger-soft); border-color: color-mix(in srgb, var(--fx-suc-danger) 30%, transparent); }
.fx-suc-check.is-pending .fx-suc-check-dot { background: var(--fx-suc-danger); }
.fx-suc-check.is-info .fx-suc-check-dot { background: var(--fx-suc-brand); }
.fx-suc-check-copy { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.fx-suc-check-copy strong { font-size: .86rem; color: var(--fx-suc-ink); }
.fx-suc-check-copy span { font-size: .78rem; color: var(--fx-suc-muted); }

/* ---------- Chips de bodega ---------- */
.fx-suc-bodega-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 8px; }
.fx-suc-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid var(--fx-suc-line);
    background: var(--fx-suc-soft);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.fx-suc-chip:hover { border-color: var(--fx-suc-brand); background: var(--fx-suc-surface); }
.fx-suc-chip-body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.fx-suc-chip-title { font-size: .74rem; font-weight: 650; color: var(--fx-suc-muted); }
.fx-suc-chip-cifra { font-size: .78rem; color: var(--fx-suc-muted); }
.fx-suc-chip-cifra strong { font-size: .95rem; font-weight: 800; color: var(--fx-suc-ink); }
.fx-suc-chip-cifra em { font-style: normal; }

/* ---------- Tablas y estados ---------- */
.fx-suc-table { overflow-x: auto; }
.fx-suc-table .mud-table-head th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--fx-suc-surface);
    font-size: .74rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--fx-suc-muted);
}
.fx-suc-table .mud-table-cell { font-size: .84rem; }

.fx-suc-horas {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.fx-suc-horas.is-ok { color: var(--fx-suc-ok-ink); background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .3); }
.fx-suc-horas.is-warn { color: var(--fx-suc-warn-ink); background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .32); }
.fx-suc-horas.is-late { color: var(--fx-suc-danger-ink); background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .32); }

.fx-suc-empty {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--fx-suc-soft);
    color: var(--fx-suc-muted);
    font-size: .84rem;
    text-align: center;
}

.fx-suc-pagar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--fx-suc-warn) 34%, transparent);
    background: color-mix(in srgb, var(--fx-suc-warn) 10%, var(--fx-suc-surface));
    font-size: .84rem;
    color: var(--fx-suc-ink);
}
.fx-suc-pagar a { font-weight: 700; color: var(--fx-suc-brand); }

/* Esqueleto solo en la primera carga; el refresco normal no lo usa. */
.fx-suc-skeleton { display: grid; gap: 8px; }
.fx-suc-skeleton span {
    display: block;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--fx-suc-soft) 0%, var(--fx-suc-line) 50%, var(--fx-suc-soft) 100%);
    background-size: 220% 100%;
    animation: fxSucShimmer 1.4s linear infinite;
}

/* ---------- Keyframes ---------- */
@keyframes fxSucRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxSucFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fxSucPulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fx-suc-danger) 52%, transparent); }
    70%  { box-shadow: 0 0 0 9px color-mix(in srgb, var(--fx-suc-danger) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fx-suc-danger) 0%, transparent); }
}
@keyframes fxSucBarGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes fxSucShimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}
@keyframes fxSucRing {
    from { opacity: 0; transform: rotate(-28deg) scale(.92); }
    to   { opacity: 1; transform: rotate(0) scale(1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .fx-suc-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .fx-suc-hero { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
    .fx-suc-hero-actions .mud-button-root { flex: 1 1 auto; }
    .fx-suc-score-verdict { font-size: 1.18rem; }
}
@media (max-width: 600px) {
    .fx-suc-v2 { gap: 12px; }
    .fx-suc-panel { padding: 15px 15px; }
    .fx-suc-critical-head { align-items: flex-start; }
    .fx-suc-v2 .fx-suc-critical-cta { width: 100%; }
    .fx-suc-kpis { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
    .fx-suc-cola { grid-template-columns: minmax(0, 1fr); }
    .fx-suc-donut { justify-content: center; }
}

/* ---------- Movimiento reducido: apagar todo ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-suc-hero,
    .fx-suc-critical,
    .fx-suc-prio,
    .fx-suc-v2 .fx-suc-stat,
    .fx-suc-cola-card,
    .fx-suc-metric-bar > span,
    .fx-suc-critical-pulse,
    .fx-suc-skeleton span {
        animation: none !important;
        transition: none !important;
    }
    .fx-suc-critical-pulse { box-shadow: none !important; }
    .fx-suc-cola-go { opacity: 1; transform: none; }
}
/* Error de carga: nunca dejar la pantalla vacía sin explicación. */
.fx-suc-error {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--fx-suc-danger) 34%, transparent);
    background: var(--fx-suc-danger-soft);
    color: var(--fx-suc-ink);
    font-size: .84rem;
}
.fx-suc-error button {
    margin-left: auto;
    padding: 5px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--fx-suc-danger);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}
/* =====================================================================
   PULSO DE LA EMPRESA v2  ·  gerencia (/admin)
   Prefijo .fx-ger. Misma estética que el dashboard de sucursal v2.
   Reglas: animar solo al montar, presupuesto corto, tabular-nums, tema.
   ===================================================================== */

.fx-ger {
    --fx-ger-line: var(--mud-palette-divider, #E8E8EA);
    --fx-ger-ink: var(--mud-palette-text-primary, #111111);
    --fx-ger-muted: var(--mud-palette-text-secondary, #66666f);
    --fx-ger-surface: var(--mud-palette-surface, #FFFFFF);
    --fx-ger-soft: color-mix(in srgb, var(--mud-palette-text-primary, #111) 4%, var(--mud-palette-surface, #fff));
    --fx-ger-brand: var(--mud-palette-primary, #814a4c);
    --fx-ger-good: #16A34A;
    --fx-ger-warn: #F59E0B;
    --fx-ger-bad: #DC2626;
    --fx-ger-good-ink: color-mix(in srgb, #16A34A 40%, var(--mud-palette-text-primary, #111));
    --fx-ger-warn-ink: color-mix(in srgb, #F59E0B 34%, var(--mud-palette-text-primary, #111));
    --fx-ger-bad-ink: color-mix(in srgb, #DC2626 58%, var(--mud-palette-text-primary, #111));
    --fx-ger-radius: 16px;
    --fx-ger-ease: cubic-bezier(.22, 1, .36, 1);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fx-ger .fx-suc-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Hero ---------- */
.fx-ger-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 26px;
    padding: 22px 24px;
    border-radius: var(--fx-ger-radius);
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #111111 0%, #5f3537 58%, #814a4c 100%);
    animation: fxGerRise .24s var(--fx-ger-ease) both;
}
.fx-ger-hero.is-watch {
    background: linear-gradient(135deg, #12263a 0%, #5f3537 62%, #814a4c 100%);
}
.fx-ger-hero.is-bad {
    background: linear-gradient(135deg, #3a0d0d 0%, #7f1d1d 58%, #b91c1c 100%);
}
.fx-ger-hero-main { display: flex; flex-direction: column; gap: 8px; flex: 1 1 320px; min-width: 0; }
.fx-ger-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .74);
}
.fx-ger-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .5); display: inline-block; }
.fx-ger-verdict { display: flex; align-items: flex-start; gap: 13px; }
.fx-ger-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .34);
    white-space: nowrap;
}
.fx-ger-badge.is-loading { opacity: .8; }
.fx-ger-badge.is-danger { background: rgba(255, 255, 255, .92); color: #7f1d1d; }
.fx-ger-verdict-copy { min-width: 0; }
.fx-ger-title {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.01em;
}
.fx-ger-sub {
    margin: 4px 0 0;
    font-size: .9rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .84);
    max-width: 68ch;
}
.fx-ger-meta { margin: 2px 0 0; font-size: .75rem; color: rgba(255, 255, 255, .6); }

.fx-ger-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.fx-ger .fx-ger-hero-btn {
    border-color: rgba(255, 255, 255, .42) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: none !important;
}
.fx-ger .fx-ger-hero-btn--solid { background: #fff !important; color: #5f3537 !important; border-color: #fff !important; }
.fx-ger .fx-ger-hero-btn:hover { background: rgba(255, 255, 255, .12) !important; }
.fx-ger .fx-ger-hero-btn--solid:hover { background: rgba(255, 255, 255, .88) !important; }

.fx-ger-hero-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; }
.fx-ger-hero-progress .mud-progress-linear { background: transparent !important; }
.fx-ger-hero-progress .mud-progress-linear-bar { background: rgba(255, 255, 255, .95) !important; }
/* Barra de carga visible mientras el tablero calcula. */
.fx-ger-hero-progress[aria-hidden="false"] { height: 4px; }

/* ---------- Filtros ---------- */
.fx-ger-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
}
.fx-ger-filter-dates { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.fx-ger-date { flex: 1 1 128px; min-width: 116px; }
.fx-ger-presets { display: flex; gap: 4px; flex: 0 0 auto; }
.fx-ger-preset {
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid var(--fx-ger-line);
    background: transparent;
    color: var(--fx-ger-muted);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fx-ger-preset:hover:not(:disabled) { color: var(--fx-ger-brand); border-color: var(--fx-ger-brand); }
.fx-ger-preset.is-active {
    background: color-mix(in srgb, var(--fx-ger-brand) 12%, transparent);
    border-color: color-mix(in srgb, var(--fx-ger-brand) 45%, transparent);
    color: var(--fx-ger-brand);
}
.fx-ger-preset:disabled { opacity: .55; cursor: progress; }
.fx-ger-filter-branch { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.fx-ger-select { flex: 1 1 150px; min-width: 130px; }
.fx-ger-apply { flex: 0 0 auto; }

.fx-ger-plan-week {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--fx-ger-warn, #F59E0B) 10%, var(--fx-ger-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--fx-ger-warn, #F59E0B) 28%, transparent);
}
.fx-ger-plan-week .fx-ger-block-title { margin: 2px 0 4px; }
.fx-ger-ops-secondary {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px dashed color-mix(in srgb, var(--fx-ger-muted, #94a3b8) 35%, transparent);
}
.fx-ger-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--fx-ger-soft);
    border: 1px solid var(--fx-ger-line);
    color: var(--fx-ger-muted);
    font-size: .78rem;
    line-height: 1.4;
}

/* ---------- Señales ---------- */
.fx-ger-signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 10px; }
.fx-ger-signal {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid var(--fx-ger-line);
    border-top: 3px solid var(--fx-ger-muted);
    background: var(--fx-ger-surface);
    min-width: 0;
    animation: fxGerRise .22s var(--fx-ger-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-ger-signal.is-good { border-top-color: var(--fx-ger-good); }
.fx-ger-signal.is-watch { border-top-color: var(--fx-ger-warn); }
.fx-ger-signal.is-bad { border-top-color: var(--fx-ger-bad); }
.fx-ger-signal-q {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--fx-ger-muted);
}
.fx-ger-signal-value { font-size: 1.68rem; font-weight: 800; line-height: 1.1; color: var(--fx-ger-ink); }
.fx-ger-signal.is-good .fx-ger-signal-value { color: var(--fx-ger-good-ink); }
.fx-ger-signal.is-watch .fx-ger-signal-value { color: var(--fx-ger-warn-ink); }
.fx-ger-signal.is-bad .fx-ger-signal-value { color: var(--fx-ger-bad-ink); }
.fx-ger-signal-text {
    margin: 3px 0 0;
    font-size: .8rem;
    line-height: 1.42;
    color: var(--fx-ger-muted);
}
.fx-ger-signal-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--fx-ger-brand);
    text-decoration: none;
}
.fx-ger-signal-link:hover { text-decoration: underline; }

.fx-ger-signal.is-skeleton { gap: 7px; }
.fx-ger-skel-line {
    display: block;
    height: 11px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--fx-ger-soft) 0%, var(--fx-ger-line) 50%, var(--fx-ger-soft) 100%);
    background-size: 220% 100%;
    animation: fxGerShimmer 1.4s linear infinite;
}

/* ---------- Bloques ---------- */
.fx-ger-block { display: flex; flex-direction: column; gap: 10px; }
.fx-ger-block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.fx-ger-block-title { margin: 0; font-size: .98rem; font-weight: 780; color: var(--fx-ger-ink); line-height: 1.2; }
.fx-ger-block-sub { margin: 2px 0 0; font-size: .8rem; color: var(--fx-ger-muted); }

/* ---------- Cierre diario ---------- */
.fx-cierre { display: flex; flex-direction: column; gap: 18px; }
.fx-cierre-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
    align-items: flex-start;
}
.fx-cierre-kicker { margin: 0; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--fx-ger-muted, #667); }
.fx-cierre-title { margin: 2px 0 4px; font-size: 1.45rem; font-weight: 780; }
.fx-cierre-sub { margin: 0; font-size: .85rem; color: var(--fx-ger-muted, #667); }
.fx-cierre-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-cierre-filters {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 12px; border-radius: 12px; border: 1px solid var(--fx-ger-line, #e5e7eb);
    background: var(--fx-ger-surface, #fff);
}
.fx-cierre-sucursal { min-width: 220px; }
.fx-cierre-filter-error { flex: 1 1 100%; margin: 0 !important; }
.fx-cierre-block { display: flex; flex-direction: column; gap: 10px; }
.fx-cierre-block-title { margin: 0; font-size: 1rem; font-weight: 720; }
.fx-cierre-note { margin: 0; font-size: .78rem; color: var(--fx-ger-muted, #667); }
.fx-cierre-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px;
}
.fx-cierre-card {
    display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
    padding: 14px 16px; border-radius: 14px;
    border: 1px solid var(--fx-ger-line, #e5e7eb);
    background: var(--fx-ger-surface, #fff);
}
.fx-cierre-card h3 { margin: 0; font-size: .95rem; font-weight: 720; }
.fx-cierre-def { margin: 0; font-size: .75rem; color: var(--fx-ger-muted, #667); line-height: 1.35; }
.fx-cierre-value { font-size: 1.45rem; font-weight: 780; letter-spacing: -.02em; }
.fx-cierre-hint { font-size: .8rem; color: var(--fx-ger-muted, #667); }
.fx-cierre-error { margin: 0; color: var(--fx-ger-bad, #b42318); font-weight: 650; }
.fx-cierre-modal { max-width: min(960px, 96vw) !important; width: 96vw; }
.fx-cierre-detalle-total { margin: 0 0 10px; font-size: .9rem; }
.fx-cierre-detalle-hora { color: var(--fx-ger-muted, #667); font-size: .8rem; }
.fx-cierre-pager { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.fx-cierre-cufe { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.fx-ger-legend-toggle {
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
    color: var(--fx-ger-muted);
    font-size: .75rem;
    font-weight: 650;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.fx-ger-legend-toggle:hover {
    border-color: color-mix(in srgb, var(--fx-ger-brand) 40%, transparent);
    color: var(--fx-ger-ink);
}
.fx-ger-legend {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--fx-ger-line);
    background: color-mix(in srgb, var(--fx-ger-surface) 88%, var(--fx-ger-brand) 12%);
}
.fx-ger-legend-title {
    margin: 0 0 6px;
    font-size: .82rem;
    font-weight: 720;
    color: var(--fx-ger-ink);
}
.fx-ger-legend-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: .78rem;
    color: var(--fx-ger-muted);
    line-height: 1.45;
}
.fx-ger-legend-list strong { color: var(--fx-ger-ink); }
.fx-ger-legend-meta {
    margin: 8px 0 0;
    font-size: .72rem;
    color: var(--fx-ger-muted);
}

/* ---------- Bandeja de decisiones ---------- */
.fx-ger-deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); gap: 9px; }
.fx-ger-prio {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px 12px 15px;
    border-radius: 13px;
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    animation: fxGerRise .22s var(--fx-ger-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-ger-prio:hover {
    border-color: color-mix(in srgb, var(--fx-ger-brand) 42%, transparent);
    box-shadow: 0 10px 26px -18px rgba(17, 17, 17, .4);
    transform: translateY(-1px);
}
.fx-ger-prio-mark {
    position: absolute;
    left: 0; top: 11px; bottom: 11px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--fx-ger-warn);
}
.fx-ger-prio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px; height: 31px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: color-mix(in srgb, var(--fx-ger-brand) 10%, var(--fx-ger-surface));
    color: var(--fx-ger-brand);
}
.fx-ger-prio-body { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.fx-ger-prio-title { font-size: .85rem; font-weight: 700; color: var(--fx-ger-ink); }
.fx-ger-prio-meta {
    font-size: .75rem;
    color: var(--fx-ger-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fx-ger-prio-cifra { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; flex: 0 0 auto; }
.fx-ger-prio-cifra strong { font-size: 1.2rem; font-weight: 800; color: var(--fx-ger-ink); }
.fx-ger-prio-cifra span { font-size: .65rem; color: var(--fx-ger-muted); }
.fx-ger-prio-arrow { color: var(--fx-ger-muted); flex: 0 0 auto; }

/* ---------- Tiles ---------- */
.fx-ger-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 8px; }
.fx-ger-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
    animation: fxGerRise .2s var(--fx-ger-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-ger-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--fx-ger-soft);
    color: var(--fx-ger-muted);
}
.fx-ger-tile-body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.fx-ger-tile-body strong { font-size: 1.3rem; font-weight: 800; line-height: 1.05; color: var(--fx-ger-ink); }
.fx-ger-tile-title { font-size: .74rem; font-weight: 650; color: var(--fx-ger-muted); }
.fx-ger-tile-sub { font-size: .66rem; color: var(--fx-ger-muted); opacity: .85; }
.fx-ger-tile.is-alert { border-color: color-mix(in srgb, var(--fx-ger-bad) 30%, transparent); background: color-mix(in srgb, var(--fx-ger-bad) 7%, var(--fx-ger-surface)); }
.fx-ger-tile.is-alert .fx-ger-tile-icon { background: color-mix(in srgb, var(--fx-ger-bad) 14%, transparent); color: var(--fx-ger-bad-ink); }
.fx-ger-tile.is-alert .fx-ger-tile-body strong { color: var(--fx-ger-bad-ink); }

/* ---------- Briefing mula ---------- */
.fx-ger-mula-links { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fx-ger-fuel {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--fx-ger-warn) 12%, var(--fx-ger-surface));
    border: 1px solid color-mix(in srgb, var(--fx-ger-warn) 28%, transparent);
    font-size: .82rem;
    line-height: 1.4;
    color: var(--fx-ger-warn-ink);
}
.fx-ger-mula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.fx-ger-mula-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
}
.fx-ger-mula-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.fx-ger-mula-card-head strong {
    font-size: 1.05rem;
    letter-spacing: .02em;
}
.fx-ger-mula-montaje {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 10px 11px;
    border-radius: 11px;
    background: var(--fx-ger-soft);
}
.fx-ger-mula-kv {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fx-ger-mula-kv > span:first-child {
    font-size: .7rem;
    font-weight: 650;
    color: var(--fx-ger-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fx-ger-mula-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fx-ger-mula-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 11px;
    background: var(--fx-ger-soft);
}
.fx-ger-mula-row.is-done {
    opacity: .72;
}
.fx-ger-mula-row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
@media (max-width: 560px) {
    .fx-ger-mula-montaje { grid-template-columns: 1fr; }
}
.fx-ger-mula-estado {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--fx-ger-muted) 14%, transparent);
    color: var(--fx-ger-muted);
}
.fx-ger-mula-estado.is-ok {
    background: color-mix(in srgb, var(--fx-ger-good) 16%, transparent);
    color: var(--fx-ger-good-ink);
}
.fx-ger-mula-estado.is-warn {
    background: color-mix(in srgb, var(--fx-ger-warn) 18%, transparent);
    color: var(--fx-ger-warn-ink);
}
.fx-ger-mula-estado.is-late {
    background: color-mix(in srgb, var(--fx-ger-bad) 16%, transparent);
    color: var(--fx-ger-bad-ink);
}
.fx-ger-mula-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: .78rem;
    color: var(--fx-ger-muted);
}
.fx-ger-mula-row-meta .is-late { color: var(--fx-ger-bad-ink); font-weight: 700; }
.fx-ger-mula-row-meta .is-ok { color: var(--fx-ger-good-ink); font-weight: 650; }
.fx-ger-mula-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .76rem;
    color: var(--fx-ger-muted);
    padding-top: 2px;
}
.fx-ger-mula-alerta {
    margin: 0;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: .8rem;
    line-height: 1.4;
    background: var(--fx-ger-soft);
    color: var(--fx-ger-ink);
}
.fx-ger-mula-alerta.is-warn {
    background: color-mix(in srgb, var(--fx-ger-warn) 14%, var(--fx-ger-surface));
    border: 1px solid color-mix(in srgb, var(--fx-ger-warn) 30%, transparent);
    color: var(--fx-ger-warn-ink);
}

/* ---------- KPIs ---------- */
.fx-ger-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 9px; }
.fx-ger-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 14px;
    border-radius: 13px;
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
    min-width: 0;
    animation: fxGerRise .2s var(--fx-ger-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-ger-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fx-ger-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px; height: 27px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--fx-ger-brand) 10%, var(--fx-ger-surface));
    color: var(--fx-ger-brand);
}
.fx-ger-kpi-value { font-size: 1.34rem; font-weight: 800; line-height: 1.15; color: var(--fx-ger-ink); margin-top: 4px; }
.fx-ger-kpi-label { font-size: .78rem; font-weight: 650; color: var(--fx-ger-ink); }
.fx-ger-kpi-hint { font-size: .71rem; color: var(--fx-ger-muted); line-height: 1.3; }
.fx-ger-kpi-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--fx-ger-brand);
    text-decoration: none;
}
.fx-ger-kpi-link:hover { text-decoration: underline; }

.fx-ger-kpi.is-good { border-color: color-mix(in srgb, var(--fx-ger-good) 28%, transparent); background: color-mix(in srgb, var(--fx-ger-good) 6%, var(--fx-ger-surface)); }
.fx-ger-kpi.is-warn { border-color: color-mix(in srgb, var(--fx-ger-warn) 32%, transparent); background: color-mix(in srgb, var(--fx-ger-warn) 8%, var(--fx-ger-surface)); }
.fx-ger-kpi.is-bad { border-color: color-mix(in srgb, var(--fx-ger-bad) 32%, transparent); background: color-mix(in srgb, var(--fx-ger-bad) 7%, var(--fx-ger-surface)); }
.fx-ger-kpi.is-bad .fx-ger-kpi-value { color: var(--fx-ger-bad-ink); }
.fx-ger-kpi.is-warn .fx-ger-kpi-value { color: var(--fx-ger-warn-ink); }
.fx-ger-kpi.is-good .fx-ger-kpi-value { color: var(--fx-ger-good-ink); }

.fx-ger-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.fx-ger-delta.is-good { color: var(--fx-ger-good-ink); background: color-mix(in srgb, var(--fx-ger-good) 14%, transparent); }
.fx-ger-delta.is-bad { color: var(--fx-ger-bad-ink); background: color-mix(in srgb, var(--fx-ger-bad) 12%, transparent); }
.fx-ger-delta.is-neutral { color: var(--fx-ger-muted); background: var(--fx-ger-soft); }

/* ---------- Split y paneles ---------- */
.fx-ger-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.fx-ger-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 16px;
    border-radius: var(--fx-ger-radius);
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
    min-width: 0;
}
.fx-ger-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fx-ger-panel-note { font-size: .74rem; color: var(--fx-ger-muted); }

.fx-ger-aging-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fx-ger-aging { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 0; }
.fx-ger-aging > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: .77rem;
    color: var(--fx-ger-muted);
    padding: 2px 0;
}
.fx-ger-aging strong { color: var(--fx-ger-ink); }
.fx-ger-aging .is-risk span { color: var(--fx-ger-bad-ink); font-weight: 650; }
.fx-ger-aging .is-risk strong { color: var(--fx-ger-bad-ink); }

/* ---------- Tablas ---------- */
.fx-ger-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-ger-table .mud-table-cell { font-size: .82rem; }
.fx-ger-table .mud-table-head th {
    font-size: .72rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--fx-ger-muted);
    white-space: nowrap;
}
.fx-ger-cell { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.fx-ger-cell strong { color: var(--fx-ger-ink); }
.fx-ger-cell-sub { font-size: .72rem; color: var(--fx-ger-muted); }
.fx-ger-cell-sub.is-risk { color: var(--fx-ger-bad-ink); }

.fx-ger-mini-bar { display: flex; align-items: center; gap: 7px; min-width: 92px; }
.fx-ger-mini-bar > span:first-child { font-size: .78rem; font-weight: 700; color: var(--fx-ger-ink); white-space: nowrap; }
.fx-ger-mini-track {
    flex: 1 1 auto;
    min-width: 34px;
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-ger-ink) 9%, transparent);
    overflow: hidden;
}
.fx-ger-mini-track > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    transform-origin: left center;
    animation: fxGerBarGrow .4s var(--fx-ger-ease) both;
}

.fx-ger-horas {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.fx-ger-horas.is-ok { color: var(--fx-ger-good-ink); background: color-mix(in srgb, var(--fx-ger-good) 12%, transparent); border-color: color-mix(in srgb, var(--fx-ger-good) 28%, transparent); }
.fx-ger-horas.is-warn { color: var(--fx-ger-warn-ink); background: color-mix(in srgb, var(--fx-ger-warn) 14%, transparent); border-color: color-mix(in srgb, var(--fx-ger-warn) 30%, transparent); }
.fx-ger-horas.is-late { color: var(--fx-ger-bad-ink); background: color-mix(in srgb, var(--fx-ger-bad) 12%, transparent); border-color: color-mix(in srgb, var(--fx-ger-bad) 28%, transparent); }

.fx-ger-pill {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
}
.fx-ger-pill.is-warn { color: var(--fx-ger-warn-ink); background: color-mix(in srgb, var(--fx-ger-warn) 16%, transparent); }
.fx-ger-pill.is-bad { color: var(--fx-ger-bad-ink); background: color-mix(in srgb, var(--fx-ger-bad) 14%, transparent); }

.fx-ger-link-btn {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fx-ger-brand);
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.fx-ger-espera-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.fx-ger-espera-head strong { font-size: .82rem; color: var(--fx-ger-ink); }
.fx-ger-espera-head span { font-size: .73rem; color: var(--fx-ger-muted); }
.fx-ger-espera-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 7px; }
.fx-ger-espera-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--fx-ger-surface);
    border: 1px solid var(--fx-ger-line);
}
.fx-ger-espera-item strong { font-size: .78rem; color: var(--fx-ger-ink); }
.fx-ger-espera-item span { font-size: .72rem; color: var(--fx-ger-muted); }

.fx-ger-tabs :deep(.mud-tabs-toolbar) { background: transparent; }
.fx-ger-tabs .mud-tab { text-transform: none; font-weight: 700; font-size: .82rem; }

/* ---------- Detalle plegable ---------- */
.fx-ger-details {
    border: 1px solid var(--fx-ger-line);
    border-radius: var(--fx-ger-radius);
    background: var(--fx-ger-surface);
    overflow: hidden;
}
.fx-ger-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 700;
    color: var(--fx-ger-ink);
    list-style: none;
}
.fx-ger-details > summary::-webkit-details-marker { display: none; }
.fx-ger-details > summary:hover { background: var(--fx-ger-soft); }
.fx-ger-details[open] > summary { border-bottom: 1px solid var(--fx-ger-line); }
.fx-ger-details[open] > summary .mud-icon-root { transform: rotate(180deg); }
.fx-ger-details > summary .mud-icon-root { transition: transform .2s ease; }
.fx-ger-details-body { display: flex; flex-direction: column; gap: 16px; padding: 14px 16px 18px; }

/* ---------- Esqueleto y estados ---------- */
.fx-ger-skeleton { display: grid; gap: 7px; padding: 4px 0; }
.fx-ger-skeleton > span {
    display: block;
    height: 13px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--fx-ger-soft) 0%, var(--fx-ger-line) 50%, var(--fx-ger-soft) 100%);
    background-size: 220% 100%;
    animation: fxGerShimmer 1.4s linear infinite;
}
.fx-ger-skeleton > span:nth-child(2) { width: 70%; }
.fx-ger-skeleton > span:nth-child(3) { width: 45%; }
.fx-ger-skeleton > p { margin: 2px 0 0; font-size: .76rem; color: var(--fx-ger-muted); }

.fx-ger-empty {
    margin: 0;
    padding: 14px;
    border-radius: 11px;
    background: var(--fx-ger-soft);
    color: var(--fx-ger-muted);
    font-size: .82rem;
    text-align: center;
}

/* ---------- Asistente ---------- */
.fx-ger-ask {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px 18px;
    border-radius: var(--fx-ger-radius);
    border: 1px solid var(--fx-ger-line);
    background: var(--fx-ger-surface);
}
.fx-ger-ask-title { margin: 0 0 2px; font-size: .98rem; font-weight: 780; color: var(--fx-ger-ink); }
.fx-ger-ask-row { display: flex; gap: 8px; align-items: stretch; }
.fx-ger-ask-input { flex: 1 1 auto; min-width: 0; }
.fx-ger-ask-btn { flex: 0 0 auto; }
.fx-ger-ask-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-ger-ask-pill {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px dashed var(--fx-ger-line);
    background: transparent;
    color: var(--fx-ger-muted);
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.fx-ger-ask-pill:hover { color: var(--fx-ger-brand); border-color: var(--fx-ger-brand); }

/* ---------- Keyframes ---------- */
@keyframes fxGerRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxGerBarGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes fxGerShimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .fx-ger-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .fx-ger { gap: 12px; }
    .fx-ger-hero { flex-direction: column; align-items: stretch; padding: 18px 18px; }
    .fx-ger-hero-actions .mud-button-root { flex: 1 1 auto; }
    .fx-ger-title { font-size: 1.22rem; }
    .fx-ger-verdict { flex-direction: column; gap: 8px; }

    /* Filtros: cada grupo ocupa su propia línea y los presets se desplazan. */
    .fx-ger-filters { flex-direction: column; align-items: stretch; gap: 9px; }
    .fx-ger-filter-dates { flex: 1 1 auto; }
    .fx-ger-presets { overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
    .fx-ger-filter-branch { flex: 1 1 auto; }
    .fx-ger-select { flex: 1 1 auto; }

    .fx-ger-signals { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .fx-ger-kpis { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
    .fx-ger-tiles { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
    .fx-ger-deck { grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); }
    .fx-ger-details-body { padding: 12px 12px 16px; }
}

@media (max-width: 620px) {
    .fx-ger-hero { padding: 16px 15px; border-radius: 13px; }
    .fx-ger-title { font-size: 1.1rem; }
    .fx-ger-sub { font-size: .85rem; }
    .fx-ger-eyebrow { font-size: .66rem; }

    .fx-ger-filter-dates { flex-direction: column; }
    .fx-ger-date { flex: 1 1 auto; }
    .fx-ger-filter-branch { flex-direction: column; }
    .fx-ger-apply { width: 100%; }
    .fx-ger-ask-btn { width: auto; }

    .fx-ger-signals { grid-template-columns: minmax(0, 1fr); }
    .fx-ger-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fx-ger-tiles { grid-template-columns: minmax(0, 1fr); }

    .fx-ger-prio { padding: 11px 11px 11px 14px; gap: 8px; }
    .fx-ger-prio-meta { white-space: normal; }
    .fx-ger-prio-cifra strong { font-size: 1.06rem; }

    .fx-ger-ask-row { flex-direction: column; }
    .fx-ger-ask-btn { width: 100%; }

    .fx-ger-aging-wrap { justify-content: center; }
}

@media (max-width: 400px) {
    .fx-ger-kpis { grid-template-columns: minmax(0, 1fr); }
    .fx-ger-prio { flex-wrap: wrap; }
    .fx-ger-prio-body { flex: 1 1 130px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-ger-hero,
    .fx-ger-signal,
    .fx-ger-prio,
    .fx-ger-tile,
    .fx-ger-kpi,
    .fx-ger-mini-track > span,
    .fx-ger-skel-line,
    .fx-ger-skeleton > span {
        animation: none !important;
        transition: none !important;
    }
}
/* =====================================================================
   RUTA DEL ENVÍO v2  ·  línea de tiempo con flujo animado
   Prefijo .fx-ruta2. Componente compartido GuiaRutaTimeline.razor.
   Claridad > efecto: superficie clara, acento solo en lo que está pasando.
   ===================================================================== */

.fx-ruta2 {
    --fx-r2-line: var(--mud-palette-divider, #E2E8F0);
    --fx-r2-ink: var(--mud-palette-text-primary, #0F172A);
    --fx-r2-muted: var(--mud-palette-text-secondary, #64748B);
    --fx-r2-surface: var(--mud-palette-surface, #FFFFFF);
    --fx-r2-done: #15803D;
    --fx-r2-done-soft: color-mix(in srgb, #16A34A 12%, transparent);
    --fx-r2-now: #B45309;
    --fx-r2-now-soft: color-mix(in srgb, #F59E0B 16%, transparent);
    --fx-r2-accent: #814a4c;
    --fx-r2-ease: cubic-bezier(.22, 1, .36, 1);
    position: relative;
    padding: 6px 2px 2px;
}

.fx-ruta2.is-suc {
    --fx-r2-now: #814a4c;
    --fx-r2-now-soft: color-mix(in srgb, #814a4c 14%, transparent);
}

/* Pista horizontal: pasos con conectores alternados. */
.fx-ruta2-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Paso ---------- */
.fx-ruta2-step {
    flex: 0 0 auto;
    width: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 7px;
    min-width: 0;
}

.fx-ruta2-node {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fx-r2-surface);
    border: 2px solid var(--fx-r2-line);
    color: var(--fx-r2-muted);
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
    animation: fxR2Pop .28s var(--fx-r2-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 45ms);
}

.fx-ruta2-step.is-done .fx-ruta2-node {
    background: var(--fx-r2-done);
    border-color: var(--fx-r2-done);
    color: #fff;
}

.fx-ruta2-step.is-now .fx-ruta2-node {
    background: var(--fx-r2-now);
    border-color: var(--fx-r2-now);
    color: #fff;
    box-shadow: 0 0 0 5px var(--fx-r2-now-soft);
}

/* Halo que late solo en el paso actual: indica "aquí está ahora". */
.fx-ruta2-live {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--fx-r2-now);
    animation: fxR2Halo 2.2s ease-out infinite;
    pointer-events: none;
}

/* ---------- Texto del paso ---------- */
.fx-ruta2-copy { display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 0; }
.fx-ruta2-title {
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.22;
    color: var(--fx-r2-ink);
}
.fx-ruta2-step.is-pending .fx-ruta2-title { color: var(--fx-r2-muted); font-weight: 600; }
.fx-ruta2-sub {
    font-size: .65rem;
    line-height: 1.28;
    color: var(--fx-r2-muted);
    overflow-wrap: break-word;
}
.fx-ruta2-fecha {
    margin-top: 3px;
    font-size: .66rem;
    font-weight: 700;
    color: var(--fx-r2-ink);
    font-variant-numeric: tabular-nums;
}
.fx-ruta2-fecha.is-muted { font-weight: 600; color: var(--fx-r2-muted); opacity: .8; }
.fx-ruta2-user { font-size: .62rem; color: var(--fx-r2-muted); }
.fx-ruta2-map {
    margin-top: 2px;
    font-size: .65rem;
    font-weight: 700;
    color: var(--fx-r2-accent);
    text-decoration: none;
}
.fx-ruta2-map:hover { text-decoration: underline; }

/* ---------- Conector ---------- */
.fx-ruta2-seg {
    position: relative;
    flex: 1 1 34px;
    min-width: 34px;
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.fx-ruta2-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: var(--fx-r2-line);
}

.fx-ruta2-seg.is-done .fx-ruta2-line { background: var(--fx-r2-done); }

.fx-ruta2-seg.is-now .fx-ruta2-line {
    /* Tramo en curso: base tenue y relleno vivo que crece de izquierda a derecha. */
    background: color-mix(in srgb, var(--fx-r2-now) 26%, var(--fx-r2-line));
    overflow: hidden;
}
.fx-ruta2-seg.is-now .fx-ruta2-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--fx-r2-now) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: fxR2Sweep 1.6s linear infinite;
}

/* Flechas que avanzan: el corazón del pedido. */
.fx-ruta2-flow {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    pointer-events: none;
}

.fx-ruta2-arrow {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--fx-r2-now);
    opacity: 0;
    animation: fxR2Arrow 1.65s var(--fx-r2-ease) infinite;
    animation-delay: var(--fx-d, 0s);
}

/* ---------- Leyenda ---------- */
.fx-ruta2-legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fx-ruta2-leg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--fx-r2-muted);
}
.fx-ruta2-leg::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fx-r2-line);
}
.fx-ruta2-leg.is-done::before { background: var(--fx-r2-done); }
.fx-ruta2-leg.is-now::before { background: var(--fx-r2-now); }
.fx-ruta2-leg.is-pending::before { background: var(--fx-r2-line); }

/* ---------- Keyframes ---------- */
@keyframes fxR2Pop {
    from { opacity: 0; transform: scale(.82); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes fxR2Halo {
    0%   { opacity: .7; transform: scale(1); }
    75%  { opacity: 0;  transform: scale(1.55); }
    100% { opacity: 0;  transform: scale(1.55); }
}
@keyframes fxR2Sweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes fxR2Arrow {
    0%   { opacity: 0; transform: translateX(-4px); }
    22%  { opacity: 1; transform: translateX(0); }
    70%  { opacity: 1; transform: translateX(6px); }
    100% { opacity: 0; transform: translateX(10px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .fx-ruta2-step { width: 92px; }
    .fx-ruta2-seg { min-width: 26px; flex-basis: 26px; }
    .fx-ruta2-title { font-size: .71rem; }
}

/* En móvil la pista no se aplasta: se desplaza en horizontal y el paso
   actual se centra solo al cargar. */
@media (max-width: 620px) {
    .fx-ruta2 { padding-left: 0; padding-right: 0; }
    .fx-ruta2-step { width: 86px; }
    .fx-ruta2-seg { min-width: 20px; flex-basis: 20px; }
    .fx-ruta2-node { width: 34px; height: 34px; }
    .fx-ruta2-sub { display: none; }
    .fx-ruta2-legend { width: 100%; }
}

/* ---------- Movimiento reducido: sin desplazamiento, sin pulsos ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-ruta2-node,
    .fx-ruta2-live,
    .fx-ruta2-arrow,
    .fx-ruta2-seg.is-now .fx-ruta2-line::after {
        animation: none !important;
        transition: none !important;
    }
    .fx-ruta2-live { opacity: .45; }
    /* Las flechas quedan visibles y estáticas en vez de desaparecer. */
    .fx-ruta2-arrow { opacity: 1; transform: none; animation: none !important; }
    .fx-ruta2-seg.is-now .fx-ruta2-line::after { display: none; }
}

/* ---------- Encabezado del panel de ruta ---------- */
.fx-ruta2-kicker {
    display: inline-block;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fx-r2-accent);
    margin-bottom: 3px;
}
.fx-ruta2-headline {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.22;
    color: var(--mud-palette-text-primary, #0F172A);
}
.fx-ruta2-headsub {
    margin: 3px 0 0;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--mud-palette-text-secondary, #64748B);
}
.fx-ruta2-headsub strong { color: var(--mud-palette-text-primary, #0F172A); }
.fx-ruta2-sep { margin: 0 5px; opacity: .45; }

.fx-guia-ruta-panel .fx-guia-ruta-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mud-palette-divider, #E8E8EA);
}

@media (max-width: 620px) {
    .fx-ruta2-headline { font-size: .98rem; }
    .fx-ruta2-headsub { font-size: .76rem; }
}
/* =====================================================================
   DETALLE DE GUÍA v2  ·  hero de estado + paneles limpios
   Prefijo .fx-guia-. Misma familia visual que .fx-ruta2 y .fx-suc-v2.
   ===================================================================== */

/* ---------- Hero de estado ---------- */
.fx-guia-hero {
    --fx-g-line: var(--mud-palette-divider, #E8E8EA);
    --fx-g-ink: var(--mud-palette-text-primary, #0F172A);
    --fx-g-muted: var(--mud-palette-text-secondary, #64748B);
    --fx-g-surface: var(--mud-palette-surface, #FFFFFF);
    --fx-g-accent: var(--mud-palette-primary, #814a4c);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px 24px;
    flex-wrap: wrap;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-radius: 16px;
    border: 1px solid var(--fx-g-line);
    background:
        radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--fx-g-accent) 7%, transparent) 0%, transparent 62%),
        var(--fx-g-surface);
    animation: fxGuiaHeroIn .26s cubic-bezier(.22, 1, .36, 1) both;
}

.fx-guia-hero-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.fx-guia-hero-kicker {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fx-g-accent);
}
.fx-guia-hero-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-guia-hero-num {
    margin: 0;
    font-size: 1.72rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--fx-g-ink);
    font-variant-numeric: tabular-nums;
}
.fx-guia-hero-estado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    max-width: 100%;
}
.fx-guia-hero-estado.is-good {
    color: color-mix(in srgb, #16A34A 38%, var(--fx-g-ink));
    background: color-mix(in srgb, #16A34A 12%, transparent);
    border-color: color-mix(in srgb, #16A34A 26%, transparent);
}
.fx-guia-hero-estado.is-warn {
    color: color-mix(in srgb, #F59E0B 32%, var(--fx-g-ink));
    background: color-mix(in srgb, #F59E0B 14%, transparent);
    border-color: color-mix(in srgb, #F59E0B 30%, transparent);
}
.fx-guia-hero-estado.is-bad {
    color: color-mix(in srgb, #DC2626 55%, var(--fx-g-ink));
    background: color-mix(in srgb, #DC2626 11%, transparent);
    border-color: color-mix(in srgb, #DC2626 28%, transparent);
}
.fx-guia-hero-estado.is-info {
    color: var(--fx-g-muted);
    background: color-mix(in srgb, var(--fx-g-ink) 5%, transparent);
    border-color: var(--fx-g-line);
}

.fx-guia-hero-ruta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 4px 0 0;
    font-size: .85rem;
    color: var(--fx-g-muted);
}
.fx-guia-hero-ruta strong { color: var(--fx-g-ink); font-weight: 700; }
.fx-guia-hero-ruta .mud-icon-root { color: var(--fx-g-muted); opacity: .7; }
.fx-guia-hero-dot { margin: 0 4px; opacity: .45; }

.fx-guia-hero-stats {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 0 1 auto;
    flex-wrap: wrap;
}
.fx-guia-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 16px;
    min-width: 96px;
    border-left: 1px solid var(--fx-g-line);
}
.fx-guia-hero-stat:first-child { border-left: 0; padding-left: 0; }
.fx-guia-hero-stat:last-child { padding-right: 0; }
.fx-guia-hero-stat-label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--fx-g-muted);
}
.fx-guia-hero-stat-value {
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--fx-g-ink);
    font-variant-numeric: tabular-nums;
}
.fx-guia-hero-stat-value.is-sm { font-size: .86rem; font-weight: 700; }
.fx-guia-hero-stat-note { font-size: .68rem; color: var(--fx-g-muted); }

@keyframes fxGuiaHeroIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Paneles remitente / destinatario ---------- */
.fx-od-col {
    border: 1px solid var(--mud-palette-divider, #E8E8EA) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 3%, var(--mud-palette-surface, #fff)) !important;
    padding: 14px 15px !important;
}
.fx-od-col--origen { border-left: 3px solid #2563EB !important; }
.fx-od-col--destino { border-left: 3px solid #EA580C !important; }
.fx-od-col-title {
    font-size: .68rem !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    color: var(--mud-palette-text-secondary, #64748B) !important;
    margin-bottom: 10px !important;
}
.fx-od-col--origen .fx-od-col-title { color: #1D4ED8 !important; }
.fx-od-col--destino .fx-od-col-title { color: #C2410C !important; }
.fx-od-field { margin-bottom: 9px !important; }
.fx-card-label {
    display: block;
    font-size: .65rem !important;
    font-weight: 700 !important;
    letter-spacing: .05em !important;
    text-transform: uppercase !important;
    color: var(--mud-palette-text-secondary, #94A3B8) !important;
    margin-bottom: 1px;
}
.fx-card-value {
    display: block;
    font-size: .87rem !important;
    line-height: 1.35 !important;
    color: var(--mud-palette-text-primary, #0F172A) !important;
    word-break: break-word;
}
.fx-card-title {
    font-size: .98rem !important;
    font-weight: 800 !important;
    color: var(--mud-palette-text-primary, #0F172A) !important;
    margin: 0 0 12px !important;
    letter-spacing: -.01em;
}

/* ---------- Responsive del hero ---------- */
@media (max-width: 900px) {
    .fx-guia-hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
    .fx-guia-hero-num { font-size: 1.5rem; }
    .fx-guia-hero-stats { width: 100%; }
    .fx-guia-hero-stat { flex: 1 1 0; min-width: 0; padding: 2px 12px; }
}
@media (max-width: 520px) {
    .fx-guia-hero { padding: 14px; border-radius: 13px; }
    .fx-guia-hero-num { font-size: 1.34rem; }
    .fx-guia-hero-estado { font-size: .68rem; padding: 3px 9px; }
    .fx-guia-hero-ruta { font-size: .79rem; }
    /* Las cifras se reparten en 2 filas legibles en vez de aplastarse. */
    .fx-guia-hero-stats { flex-wrap: wrap; gap: 10px 0; }
    .fx-guia-hero-stat { flex: 1 1 46%; border-left: 0; padding: 0; }
    .fx-guia-hero-stat + .fx-guia-hero-stat:nth-child(odd) { border-left: 1px solid var(--fx-g-line); padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-guia-hero { animation: none !important; }
}
/* Paneles del detalle de guía: superficie suave, título con más peso.
   Todo acotado a .fx-guia-detalle para no tocar otras pantallas. */
.fx-guia-detalle .mud-paper.fx-panel {
    border-radius: 14px;
}
.fx-guia-detalle .fx-panel > .fx-card-title:first-child {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mud-palette-divider, #E8E8EA);
    margin-bottom: 14px !important;
}

/* Encabezado de página del detalle: más aire y tipografía firme. */
.fx-guia-detalle .fx-report-head.is-stack h1 {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
    line-height: 1.2;
}
.fx-guia-detalle .fx-report-head.is-stack p {
    margin: 3px 0 0;
    font-size: .84rem;
    color: var(--mud-palette-text-secondary, #64748B);
}

/* Tablas del detalle: encabezado tenue y filas legibles. */
.fx-guia-detalle .fx-table .mud-table-head th {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary, #64748B);
    white-space: nowrap;
}
.fx-guia-detalle .fx-table .mud-table-cell { font-size: .84rem; }

@media (max-width: 600px) {
    .fx-guia-detalle .fx-report-head.is-stack h1 { font-size: 1.14rem; }
    .fx-guia-detalle .fx-panel { padding: 15px 16px; }
}
/* ---------- Barra de acciones del detalle: compacta en móvil ---------- */
.fx-guia-detalle .fx-report-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.fx-guia-detalle .fx-report-filter .mud-button-root,
.fx-guia-detalle .fx-report-filter .mud-chip {
    flex: 0 0 auto;
}

@media (max-width: 620px) {
    /* En pantalla angosta los botones no se estiran: comparten fila y solo
       el primario conserva ancho completo para el objetivo táctil. */
    .fx-guia-detalle .fx-report-filter {
        gap: 6px;
    }
    .fx-guia-detalle .fx-report-filter .mud-button-root {
        min-width: 0;
        padding: 6px 10px;
        font-size: .78rem;
    }
    .fx-guia-detalle .fx-report-filter .mud-button-label {
        font-size: .78rem;
    }
    /* El botón de acción principal (el filled) sí ocupa la fila completa. */
    .fx-guia-detalle .fx-report-filter .mud-button-filled-primary {
        flex: 1 1 100%;
    }
}

@media (max-width: 400px) {
    .fx-guia-detalle .fx-report-filter .mud-button-root {
        padding: 6px 9px;
        font-size: .75rem;
    }
}
/* =====================================================================
   MANEJO DE PAQUETES  ·  /admin/paquetes
   Prefijo .fx-paq. Volumen físico y dinero movido por día/semana/mes/año.
   ===================================================================== */

.fx-paq {
    --fx-paq-ink: var(--mud-palette-text-primary, #111111);
    --fx-paq-muted: var(--mud-palette-text-secondary, #66666f);
    --fx-paq-line: var(--mud-palette-divider, #E8E8EA);
    --fx-paq-surface: var(--mud-palette-surface, #FFFFFF);
    --fx-paq-soft: color-mix(in srgb, var(--mud-palette-text-primary, #111) 4%, var(--mud-palette-surface, #fff));
    --fx-paq-brand: var(--mud-palette-primary, #814a4c);
    --fx-paq-good: #16A34A;
    --fx-paq-bad: #DC2626;
    --fx-paq-ease: cubic-bezier(.22, 1, .36, 1);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- Hero ---------- */
.fx-paq-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 30px;
    padding: 22px 24px;
    border-radius: 16px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(130% 160% at 92% 0%, rgba(255, 255, 255, .14) 0%, transparent 58%),
        linear-gradient(135deg, #111111 0%, #5f3537 60%, #814a4c 100%);
    animation: fxPaqRise .26s var(--fx-paq-ease) both;
}
.fx-paq-hero-main { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; min-width: 0; }
.fx-paq-eyebrow {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 0;
    font-size: .71rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}
.fx-paq-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.5); }

.fx-paq-hero-figure { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fx-paq-big {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.fx-paq-hero-figure-copy { display: flex; flex-direction: column; gap: 2px; }
.fx-paq-big-label {
    font-size: .78rem; font-weight: 600;
    color: rgba(255,255,255,.78);
}
.fx-paq-hero-meta { margin: 2px 0 0; font-size: .78rem; color: rgba(255,255,255,.66); }

.fx-paq-delta {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: .72rem; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    width: fit-content;
}
.fx-paq-delta.is-good { background: rgba(34,197,94,.22); color: #bbf7d0; }
.fx-paq-delta.is-bad { background: rgba(239,68,68,.22); color: #fecaca; }
.fx-paq-delta.is-flat { background: rgba(255,255,255,.16); color: rgba(255,255,255,.82); }

.fx-paq-hero-money {
    display: flex; gap: 0; align-items: stretch; flex-wrap: wrap;
    flex: 0 1 auto;
}
.fx-paq-money-item {
    display: flex; flex-direction: column; gap: 2px;
    padding: 2px 20px;
    border-left: 1px solid rgba(255,255,255,.18);
}
.fx-paq-money-item:first-child { border-left: 0; padding-left: 0; }
.fx-paq-money-label {
    font-size: .66rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255,255,255,.62);
}
.fx-paq-money-value {
    font-size: 1.34rem; font-weight: 800; line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.fx-paq-money-note { font-size: .68rem; color: rgba(255,255,255,.55); }

.fx-paq-hero-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; }
.fx-paq-hero-progress .mud-progress-linear { background: transparent !important; }
.fx-paq-hero-progress .mud-progress-linear-bar { background: rgba(255,255,255,.85) !important; }

/* ---------- Controles ---------- */
.fx-paq-controls {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid var(--fx-paq-line);
    background: var(--fx-paq-surface);
}
.fx-paq-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.fx-paq-tab {
    padding: 7px 14px;
    border-radius: 9px;
    border: 1px solid var(--fx-paq-line);
    background: transparent;
    color: var(--fx-paq-muted);
    font: inherit; font-size: .8rem; font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fx-paq-tab:hover:not(:disabled):not(.is-active) { color: var(--fx-paq-brand); border-color: var(--fx-paq-brand); }
.fx-paq-tab.is-active {
    background: color-mix(in srgb, var(--fx-paq-brand) 12%, transparent);
    border-color: color-mix(in srgb, var(--fx-paq-brand) 45%, transparent);
    color: var(--fx-paq-brand);
}
.fx-paq-tab:disabled { opacity: .55; cursor: progress; }
.fx-paq-branch { display: flex; gap: 8px; align-items: center; }
.fx-paq-select { min-width: 170px; }

.fx-paq-error {
    display: flex; align-items: center; gap: 8px;
    margin: 0; padding: 10px 13px;
    border-radius: 11px;
    border: 1px solid color-mix(in srgb, var(--fx-paq-bad) 32%, transparent);
    background: color-mix(in srgb, var(--fx-paq-bad) 8%, var(--fx-paq-surface));
    color: var(--fx-paq-ink);
    font-size: .83rem;
}

/* ---------- Paneles ---------- */
.fx-paq-panel {
    display: flex; flex-direction: column; gap: 11px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--fx-paq-line);
    background: var(--fx-paq-surface);
    min-width: 0;
}
.fx-paq-panel-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
}
.fx-paq-panel-title { margin: 0; font-size: .98rem; font-weight: 780; color: var(--fx-paq-ink); line-height: 1.2; }
.fx-paq-panel-sub { margin: 2px 0 0; font-size: .8rem; color: var(--fx-paq-muted); }

.fx-paq-legend { display: flex; gap: 12px; flex-wrap: wrap; }
.fx-paq-leg {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .7rem; font-weight: 700;
    color: var(--fx-paq-muted);
}
.fx-paq-leg::before {
    content: ""; width: 9px; height: 3px; border-radius: 999px;
}
.fx-paq-leg.is-paq::before { background: var(--fx-paq-brand); }
.fx-paq-leg.is-money::before { background: var(--fx-paq-good); }

.fx-paq-chart { animation: fxPaqChartIn .4s var(--fx-paq-ease) both; }

.fx-paq-empty {
    margin: 0; padding: 18px;
    border-radius: 11px;
    background: var(--fx-paq-soft);
    color: var(--fx-paq-muted);
    font-size: .83rem;
    text-align: center;
}
.fx-paq-skeleton { display: grid; gap: 8px; }
.fx-paq-skeleton > span {
    display: block; height: 42px; border-radius: 8px;
    background: linear-gradient(90deg, var(--fx-paq-soft) 0%, var(--fx-paq-line) 50%, var(--fx-paq-soft) 100%);
    background-size: 220% 100%;
    animation: fxPaqShimmer 1.4s linear infinite;
}

/* ---------------------------------------------------------------------
   Estado de carga del tablero de rentabilidad
   Antes la pantalla quedaba en blanco: el skeleton solo se mostraba con
   datos nulos y el shimmer tenía 4% de contraste, así que no se percibía.
   --------------------------------------------------------------------- */
.fx-rt-loading {
    display: flex; align-items: center; gap: 14px;
    padding: 4px 2px 18px;
}
.fx-rt-loading-copy { display: flex; flex-direction: column; gap: 2px; }
.fx-rt-loading-copy strong {
    font-size: .95rem; font-weight: 700; color: var(--fx-paq-ink);
}
.fx-rt-loading-copy span {
    font-size: .76rem; color: var(--fx-paq-muted);
}

.fx-rt-skel {
    display: block;
    border-radius: 10px;
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--mud-palette-text-primary, #111) 7%, var(--mud-palette-surface, #fff)) 25%,
        color-mix(in srgb, var(--mud-palette-text-primary, #111) 15%, var(--mud-palette-surface, #fff)) 42%,
        color-mix(in srgb, var(--mud-palette-text-primary, #111) 7%, var(--mud-palette-surface, #fff)) 60%);
    background-size: 260% 100%;
    animation: fxRtSkel 1.25s ease-in-out infinite;
}

.fx-rt-skel-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.fx-rt-skel-kpi { height: 74px; }
.fx-rt-skel-chart { height: 230px; margin-bottom: 16px; }

.fx-rt-skel-rows { display: grid; gap: 9px; }
.fx-rt-skel-row {
    height: 34px;
    animation-delay: calc(var(--fx-i, 0) * 90ms);
}

/* Capa sobre el tablero anterior al cambiar de pestaña o granularidad. */
.fx-rt-loading-overlay {
    position: sticky;
    top: 8px;
    z-index: 6;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--fx-paq-line);
    background: color-mix(in srgb, var(--mud-palette-surface, #fff) 92%, transparent);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgb(0 0 0 / 8%);
    font-size: .78rem;
    font-weight: 600;
    color: var(--fx-paq-ink);
    animation: fxRtOverlayIn .18s var(--fx-paq-ease) both;
    width: fit-content;
}

@keyframes fxRtSkel {
    0%   { background-position: 130% 0; }
    100% { background-position: -30% 0; }
}
@keyframes fxRtOverlayIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .fx-rt-skel { animation: none; }
    .fx-rt-loading-overlay { animation: none; }
}

/* ---------- Barras por viaje ---------- */
.fx-paq-bars { display: flex; flex-direction: column; gap: 9px; }
.fx-paq-bar-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(80px, 2.4fr) auto;
    align-items: center;
    gap: 12px;
    animation: fxPaqRise .22s var(--fx-paq-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-paq-bar-info { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.fx-paq-bar-info strong { font-size: .82rem; color: var(--fx-paq-ink); }
.fx-paq-bar-ruta {
    font-size: .72rem; color: var(--fx-paq-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-paq-bar-cond {
    font-size: .68rem; color: var(--fx-paq-muted); opacity: .8;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-paq-bar-track {
    height: 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-paq-ink) 8%, transparent);
    overflow: hidden;
}
.fx-paq-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--fx-paq-brand) 78%, transparent),
        var(--fx-paq-brand));
    transform-origin: left center;
    animation: fxPaqBarGrow .5s var(--fx-paq-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-paq-bar-figures {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 0; min-width: 88px;
}
.fx-paq-bar-figures strong { font-size: .82rem; color: var(--fx-paq-ink); }
.fx-paq-bar-figures span { font-size: .7rem; color: var(--fx-paq-muted); }

/* ---------- Tabla ---------- */
.fx-paq-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-paq-table .mud-table-head th {
    font-size: .7rem; font-weight: 700;
    letter-spacing: .03em; text-transform: uppercase;
    color: var(--fx-paq-muted);
    white-space: nowrap;
}
.fx-paq-table .mud-table-cell { font-size: .82rem; }
.fx-paq-cell { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.fx-paq-cell strong { color: var(--fx-paq-ink); }
.fx-paq-cell-sub { font-size: .72rem; color: var(--fx-paq-muted); }
.fx-paq-ruta { font-size: .79rem; color: var(--fx-paq-ink); }

/* ---------- Keyframes ---------- */
@keyframes fxPaqRise {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxPaqBarGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes fxPaqChartIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxPaqShimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .fx-paq-hero { flex-direction: column; align-items: stretch; padding: 18px; }
    .fx-paq-big { font-size: 2.1rem; }
    .fx-paq-hero-money { width: 100%; }
    .fx-paq-money-item { flex: 1 1 0; min-width: 0; padding: 2px 14px; }
    .fx-paq-controls { flex-direction: column; align-items: stretch; }
    .fx-paq-branch { justify-content: stretch; }
    .fx-paq-select { flex: 1 1 auto; min-width: 0; }
    .fx-paq-apply { flex: 0 0 auto; }
    .fx-paq-bar-row { grid-template-columns: minmax(120px, 1fr) minmax(60px, 1.6fr) auto; gap: 9px; }
}

@media (max-width: 620px) {
    .fx-paq-hero { padding: 16px 15px; border-radius: 13px; }
    .fx-paq-big { font-size: 1.85rem; }
    .fx-paq-panel { padding: 14px 15px; }
    .fx-paq-tabs { width: 100%; }
    .fx-paq-tab { flex: 1 1 0; min-width: 0; padding: 7px 8px; font-size: .74rem; }

    /* Cada viaje pasa a bloque: la barra ocupa su propia línea. */
    .fx-paq-bar-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "info fig" "bar bar";
        row-gap: 5px;
    }
    .fx-paq-bar-info { grid-area: info; }
    .fx-paq-bar-track { grid-area: bar; }
    .fx-paq-bar-figures { grid-area: fig; }

    .fx-paq-money-value { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-paq-hero,
    .fx-paq-chart,
    .fx-paq-bar-row,
    .fx-paq-bar-fill,
    .fx-paq-skeleton > span {
        animation: none !important;
        transition: none !important;
    }
}
/* ---------- Tablas de paquetes (HTML nativo: control total del layout) ---------- */
.fx-paq-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.fx-paq-tbl thead th {
    padding: 9px 10px;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--fx-paq-muted);
    border-bottom: 1px solid var(--fx-paq-line);
    white-space: nowrap;
}
.fx-paq-tbl thead th.is-num { text-align: right; }
.fx-paq-tbl thead th.is-bar { width: 150px; }
.fx-paq-tbl tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--fx-paq-line) 60%, transparent);
    color: var(--fx-paq-ink);
    vertical-align: middle;
}
.fx-paq-tbl tbody td.is-num { text-align: right; white-space: nowrap; }
.fx-paq-tbl tbody tr {
    transition: background .12s ease;
    animation: fxPaqRowIn .2s var(--fx-paq-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 28ms);
}
.fx-paq-tbl tbody tr:hover {
    background: color-mix(in srgb, var(--fx-paq-ink) 3%, transparent);
}
.fx-paq-tbl tfoot td {
    padding: 9px 10px;
    border-top: 2px solid var(--fx-paq-line);
    font-size: .8rem;
    color: var(--fx-paq-ink);
    background: color-mix(in srgb, var(--fx-paq-ink) 3%, var(--fx-paq-surface));
}
.fx-paq-tbl tfoot td.is-num { text-align: right; white-space: nowrap; }
.fx-paq-tbl.is-compact { font-size: .79rem; }
.fx-paq-tbl.is-compact tbody td { padding: 7px 9px; }
.fx-paq-tbl.is-compact thead th { padding: 7px 9px; }

/* Barra de avance de cobro dentro de la tabla de rutas. */
.fx-paq-cobro { display: flex; align-items: center; gap: 7px; }
.fx-paq-cobro-track {
    flex: 1 1 auto;
    min-width: 44px;
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-paq-ink) 9%, transparent);
    overflow: hidden;
}
.fx-paq-cobro-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transform-origin: left center;
    animation: fxPaqBarGrow .5s var(--fx-paq-ease) both;
}
.fx-paq-cobro-fill.is-good { background: var(--fx-paq-good); }
.fx-paq-cobro-fill.is-warn { background: #F59E0B; }
.fx-paq-cobro-fill.is-bad { background: var(--fx-paq-bad); }
.fx-paq-cobro-pct {
    font-size: .72rem;
    font-weight: 700;
    color: var(--fx-paq-muted);
    min-width: 30px;
    text-align: right;
}

/* ---------- Grupos por período ---------- */
.fx-paq-groups { display: flex; flex-direction: column; gap: 7px; }
.fx-paq-group {
    border: 1px solid var(--fx-paq-line);
    border-radius: 12px;
    background: var(--fx-paq-surface);
    overflow: hidden;
    animation: fxPaqRowIn .22s var(--fx-paq-ease) both;
    animation-delay: calc(var(--fx-i, 0) * 30ms);
}
.fx-paq-group.is-open { border-color: color-mix(in srgb, var(--fx-paq-brand) 34%, transparent); }
.fx-paq-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    padding: 10px 13px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--fx-paq-ink);
    transition: background .12s ease;
}
.fx-paq-group-head:hover { background: color-mix(in srgb, var(--fx-paq-ink) 3%, transparent); }
.fx-paq-group-title { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.fx-paq-group-title strong { font-size: .86rem; text-transform: capitalize; }
.fx-paq-group-count {
    font-size: .7rem;
    color: var(--fx-paq-muted);
    padding: 1px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fx-paq-ink) 6%, transparent);
}
.fx-paq-group-figs {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .78rem;
    font-weight: 700;
    color: var(--fx-paq-ink);
}
.fx-paq-group-figs .is-muted { font-weight: 600; color: var(--fx-paq-muted); }
.fx-paq-group-body {
    padding: 0 6px 8px;
    border-top: 1px solid var(--fx-paq-line);
    animation: fxPaqFadeIn .18s ease both;
}
.fx-paq-group-body .fx-paq-tbl { margin-top: 4px; }

@keyframes fxPaqRowIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxPaqFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Responsive de tablas ---------- */
@media (max-width: 1000px) {
    /* La tabla de rutas conserva lo esencial: ruta, viajes, paquetes y dinero. */
    .fx-paq-tbl thead th:nth-child(4),
    .fx-paq-tbl tbody td:nth-child(4),
    .fx-paq-tbl thead th:nth-child(8),
    .fx-paq-tbl tbody td:nth-child(8),
    .fx-paq-tbl thead th:nth-child(9),
    .fx-paq-tbl tbody td:nth-child(9) {
        display: none;
    }
}

@media (max-width: 720px) {
    .fx-paq-tbl { font-size: .78rem; }
    .fx-paq-tbl thead th,
    .fx-paq-tbl tbody td { padding: 7px 7px; }
    /* En móvil se ocultan columnas de promedio de la tabla de RUTAS (9 columnas).
       Se excluye la tabla de servicios, que usa el mismo ancho pero necesita
       el desvío (7) y el facturado (8) para ser útil. */
    .fx-paq-panel:not(.fx-rt-servicios) > .fx-paq-table .fx-paq-tbl:not(.is-compact) thead th:nth-child(7),
    .fx-paq-panel:not(.fx-rt-servicios) > .fx-paq-table .fx-paq-tbl:not(.is-compact) tbody td:nth-child(7) { display: none; }
    .fx-paq-tbl.is-compact thead th:nth-child(4),
    .fx-paq-tbl.is-compact tbody td:nth-child(4),
    .fx-paq-tbl.is-compact thead th:nth-child(8),
    .fx-paq-tbl.is-compact tbody td:nth-child(8) { display: none; }
    .fx-paq-group-figs { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-paq-tbl tbody tr,
    .fx-paq-group,
    .fx-paq-group-body,
    .fx-paq-cobro-fill {
        animation: none !important;
        transition: none !important;
    }
}
/* =====================================================================
   ANÁLISIS DE RENTABILIDAD  ·  /admin/analisis-rentabilidad
   Prefijo .fx-rt. Reutiliza la base visual de .fx-paq y .fx-ger.
   ===================================================================== */

/* ---------- Pestañas principales ---------- */
.fx-rt-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 5px;
    border-radius: 13px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: var(--fx-paq-surface, #fff);
}
.fx-rt-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: var(--fx-paq-muted, #66666f);
    font: inherit;
    font-size: .83rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.fx-rt-tab:hover:not(.is-active) { background: color-mix(in srgb, currentColor 7%, transparent); }
.fx-rt-tab.is-active {
    background: var(--fx-paq-brand, #814a4c);
    color: #fff;
}
.fx-rt-tab .mud-icon-root { opacity: .9; }

/* ---------- Cobranza explicada ---------- */
.fx-rt-cobro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.fx-rt-cobro-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 13px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: var(--fx-paq-surface, #fff);
    border-left: 3px solid var(--fx-paq-muted, #66666f);
    animation: fxPaqRise .22s var(--fx-paq-ease) both;
}
.fx-rt-cobro-card.is-good {
    border-left-color: var(--fx-paq-good);
    background: color-mix(in srgb, var(--fx-paq-good) 6%, var(--fx-paq-surface, #fff));
}
.fx-rt-cobro-card.is-warn {
    border-left-color: #F59E0B;
    background: color-mix(in srgb, #F59E0B 8%, var(--fx-paq-surface, #fff));
}
.fx-rt-cobro-card.is-bad {
    border-left-color: var(--fx-paq-bad);
    background: color-mix(in srgb, var(--fx-paq-bad) 7%, var(--fx-paq-surface, #fff));
}
.fx-rt-cobro-label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--fx-paq-muted, #66666f);
}
.fx-rt-cobro-value {
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--fx-paq-ink, #111);
    font-variant-numeric: tabular-nums;
}
.fx-rt-cobro-note { font-size: .73rem; color: var(--fx-paq-muted, #66666f); }

.fx-rt-estado {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .71rem;
    font-weight: 700;
    white-space: nowrap;
}
.fx-rt-estado.is-good { color: var(--fx-paq-good-ink, #15803D); background: color-mix(in srgb, var(--fx-paq-good) 14%, transparent); }
.fx-rt-estado.is-warn { color: #B45309; background: rgba(245, 158, 11, .16); }
.fx-rt-estado.is-bad { color: var(--fx-paq-bad-ink, #B91C1C); background: color-mix(in srgb, var(--fx-paq-bad) 13%, transparent); }

/* Celda de riesgo (por cobrar). */
.fx-paq-tbl td.is-risk { color: var(--fx-paq-bad-ink, #B91C1C); font-weight: 700; }

/* ---------- B/. por kg destacado ---------- */
.fx-rt-kg { font-weight: 800; }
.fx-rt-kg.is-good { color: var(--fx-paq-good-ink, #15803D); }
.fx-rt-kg.is-bad { color: var(--fx-paq-bad-ink, #B91C1C); }

/* ---------- Ocupación ---------- */
.fx-paq-ocup {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.fx-paq-ocup.is-good { color: var(--fx-paq-good-ink, #15803D); background: color-mix(in srgb, var(--fx-paq-good) 14%, transparent); }
.fx-paq-ocup.is-warn { color: #B45309; background: rgba(245, 158, 11, .16); }
.fx-paq-ocup.is-bad { color: var(--fx-paq-bad-ink, #B91C1C); background: color-mix(in srgb, var(--fx-paq-bad) 12%, transparent); }

/* ---------- Mapa ---------- */
.fx-rt-metricas { display: flex; gap: 5px; flex-wrap: wrap; }
.fx-rt-metrica {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: transparent;
    color: var(--fx-paq-muted, #66666f);
    font: inherit;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.fx-rt-metrica:hover { color: var(--fx-paq-brand, #814a4c); border-color: var(--fx-paq-brand, #814a4c); }
.fx-rt-metrica.is-active {
    background: color-mix(in srgb, var(--fx-paq-brand, #814a4c) 12%, transparent);
    border-color: color-mix(in srgb, var(--fx-paq-brand, #814a4c) 45%, transparent);
    color: var(--fx-paq-brand, #814a4c);
}

.fx-rt-mapa {
    height: 460px;
    width: 100%;
    border-radius: 13px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    overflow: hidden;
    background: #eef1f5;
}

/* Sankey (ECharts): flujos origen → destino. */
.fx-sankey {
    width: 100%;
    min-height: 280px;
    border-radius: 13px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: #fafbfc;
    margin: 0 0 14px;
}
.fx-sankey-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    color: var(--fx-paq-muted, #6b7280);
    font-size: .88rem;
    padding: 24px;
    text-align: center;
}
.fx-sankey-tip {
    font-size: 12px;
    line-height: 1.45;
    max-width: 260px;
}
.fx-sankey-tip strong {
    display: block;
    margin-bottom: 3px;
    font-size: 12.5px;
}
.fx-sankey-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin: 0 0 10px;
    font-size: .78rem;
    color: var(--fx-paq-muted, #6b7280);
}
.fx-sankey-leyenda-sw {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fx-sankey-leyenda-sw i {
    width: 22px;
    height: 8px;
    border-radius: 3px;
    display: inline-block;
}

/* Tooltip y leyenda del coroplético. */
.fx-mr { min-width: 175px; font-size: 12px; line-height: 1.45; }
.fx-mr strong { display: block; margin-bottom: 3px; font-size: 12.5px; }
.fx-mr .fx-mr-kpi { font-size: 13px; font-weight: 700; margin: 1px 0 4px; }

.fx-mr-leyenda {
    background: rgba(255, 255, 255, .95);
    padding: 8px 10px;
    border-radius: 7px;
    box-shadow: 0 1px 8px rgba(15, 23, 42, .28);
    font-size: 11px;
    line-height: 1.5;
    color: #0f172a;
    max-width: 190px;
}
.fx-mr-leyenda b {
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.fx-mr-lg-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.fx-mr-sw {
    width: 13px; height: 10px;
    border-radius: 2px;
    border: 1px solid rgba(15, 23, 42, .22);
    flex: 0 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .fx-rt-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .fx-rt-tab { flex: 0 0 auto; }
    .fx-rt-mapa { height: 380px; }
}

@media (max-width: 620px) {
    .fx-rt-tab { padding: 7px 11px; font-size: .78rem; }
    /* Una tarjeta por fila: los montos no caben legibles en dos columnas. */
    .fx-rt-cobro-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .fx-rt-cobro-value { font-size: 1.18rem; }
    .fx-rt-mapa { height: 320px; }
    .fx-rt-metricas { width: 100%; }
    .fx-rt-metrica { flex: 1 1 auto; text-align: center; }
}
/* Aviso del mapa cuando no hay geometrías cargadas. */
.fx-mr-aviso {
    background: #fff7ed;
    border: 1px solid #f0c088;
    border-left: 3px solid #b45309;
    color: #7c2d12;
    padding: 9px 12px;
    border-radius: 7px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
    font-size: 12px;
    font-weight: 700;
    max-width: 240px;
    line-height: 1.4;
}
.fx-mr-aviso span {
    display: block;
    margin-top: 3px;
    font-weight: 500;
    color: #92400e;
    font-size: 11.5px;
}
/* ---------- Concentración: Pareto + cuadrantes ---------- */
.fx-rt-pareto-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 9px;
    margin-bottom: 4px;
}
.fx-rt-pareto-card {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: var(--fx-paq-surface, #fff);
    border-left: 3px solid var(--fx-paq-muted, #66666f);
}
.fx-rt-pareto-card.is-a {
    border-left-color: #15803D;
    background: color-mix(in srgb, #16A34A 6%, var(--fx-paq-surface, #fff));
}
.fx-rt-pareto-card.is-wide { grid-column: span 2; }
.fx-rt-pareto-label {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--fx-paq-muted, #66666f);
}
.fx-rt-pareto-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--fx-paq-ink, #111);
    font-variant-numeric: tabular-nums;
}
.fx-rt-pareto-note { font-size: .74rem; color: var(--fx-paq-muted, #66666f); line-height: 1.35; }
.fx-rt-pareto-note.is-strong { font-weight: 600; color: var(--fx-paq-ink, #111); font-size: .8rem; }

/* Insignia ABC. */
.fx-rt-abc {
    display: inline-block;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
}
.fx-rt-abc.a { color: #15803D; background: rgba(22, 163, 74, .14); }
.fx-rt-abc.b { color: #B45309; background: rgba(245, 158, 11, .16); }
.fx-rt-abc.c { color: #B91C1C; background: rgba(220, 38, 38, .12); }

/* Cuadrantes de decisión. */
.fx-rt-quad {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 9px;
    margin-bottom: 6px;
}
.fx-rt-quad-card {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    border-top: 3px solid var(--fx-q, #66666f);
    background: var(--fx-paq-surface, #fff);
}
.fx-rt-quad-title {
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fx-q, #66666f);
}
.fx-rt-quad-value {
    font-size: 1.44rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--fx-paq-ink, #111);
    font-variant-numeric: tabular-nums;
}
.fx-rt-quad-note { font-size: .73rem; color: var(--fx-paq-muted, #66666f); }
.fx-rt-quad-desc {
    margin: 5px 0 0;
    font-size: .73rem;
    line-height: 1.4;
    color: var(--fx-paq-muted, #66666f);
}

.fx-rt-quad-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .71rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--fx-q, #66666f);
    background: color-mix(in srgb, var(--fx-q, #66666f) 12%, transparent);
}

@media (max-width: 620px) {
    .fx-rt-pareto-card.is-wide { grid-column: span 1; }
    .fx-rt-quad { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- Servicios: hallazgos y desvío de precio ---------- */
.fx-rt-hallazgos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9px;
    margin-bottom: 6px;
}
.fx-rt-hallazgo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--fx-paq-line, #E8E8EA);
    background: var(--fx-paq-surface, #fff);
}
.fx-rt-hallazgo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: color-mix(in srgb, currentColor 12%, transparent);
}
.fx-rt-hallazgo-icon.is-good { color: #15803D; }
.fx-rt-hallazgo-icon.is-warn { color: #B45309; }
.fx-rt-hallazgo-icon.is-bad { color: #B91C1C; }
.fx-rt-hallazgo-icon.is-info { color: #1D4ED8; }
.fx-rt-hallazgo > div { min-width: 0; }
.fx-rt-hallazgo strong {
    display: block;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--fx-paq-ink, #111);
    margin-bottom: 2px;
}
.fx-rt-hallazgo p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--fx-paq-muted, #66666f);
}
.fx-rt-hallazgo p strong { display: inline; font-size: inherit; color: var(--fx-paq-ink, #111); }

/* Etiqueta de desvío de precio. */
.fx-rt-desvio {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .71rem;
    font-weight: 700;
    white-space: nowrap;
}
.fx-rt-desvio.is-bad { color: #B91C1C; background: rgba(220, 38, 38, .12); }
.fx-rt-desvio.is-good { color: #15803D; background: rgba(22, 163, 74, .13); }
.fx-rt-desvio.is-neutral { color: var(--fx-paq-muted, #66666f); background: color-mix(in srgb, currentColor 9%, transparent); }


@media (max-width: 620px) {
    .fx-rt-hallazgos { grid-template-columns: minmax(0, 1fr); }

    /* Tabla de servicios en móvil: seis columnas de decisión.
       Se ocultan # (1), peso promedio (4), precio de lista (5) y barra (9).
       Desvío (7) y Facturado (8) SÍ quedan: son el motivo del informe. */
    .fx-rt-servicios .fx-paq-tbl thead th:nth-child(1),
    .fx-rt-servicios .fx-paq-tbl tbody td:nth-child(1),
    .fx-rt-servicios .fx-paq-tbl thead th:nth-child(4),
    .fx-rt-servicios .fx-paq-tbl tbody td:nth-child(4),
    .fx-rt-servicios .fx-paq-tbl thead th:nth-child(5),
    .fx-rt-servicios .fx-paq-tbl tbody td:nth-child(5),
    .fx-rt-servicios .fx-paq-tbl thead th:nth-child(9),
    .fx-rt-servicios .fx-paq-tbl tbody td:nth-child(9),
    .fx-rt-servicios .fx-paq-tbl tfoot td:nth-child(1) {
        display: none;
    }

    .fx-rt-servicios .fx-paq-tbl thead th,
    .fx-rt-servicios .fx-paq-tbl tbody td,
    .fx-rt-servicios .fx-paq-tbl tfoot td {
        padding: 7px 5px;
        font-size: .72rem;
    }

    /* El nombre del servicio no debe partirse en 3 líneas. */
    .fx-rt-servicios .fx-paq-tbl thead th:nth-child(2),
    .fx-rt-servicios .fx-paq-tbl tbody td:nth-child(2) {
        min-width: 88px;
        font-size: .7rem;
    }
    .fx-rt-servicios .fx-paq-cell-sub { display: none; }
}
/* ---------- Ayuda en encabezados de tabla ---------- */
/* OJO: .fx-paq-table usa overflow-x:auto para poder desplazar tablas anchas.
   Un tooltip absoluto hacia arriba quedaría RECORTADO por ese contenedor.
   Solución: el tooltip se ancla hacia abajo y dentro del área visible,
   y el th recibe un z-index alto para quedar encima de las filas. */
.fx-th-help {
    position: relative;
    cursor: help;
    /* z-index alto: el th debe quedar por encima de las filas al abrir la burbuja. */
    z-index: 5;
}
.fx-th-help:hover,
.fx-th-help:focus-within {
    z-index: 60;
}
.fx-th-label {
    text-decoration: underline dotted;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 3px;
}

/* La burbuja vive en el flujo normal del th, oculta con display. */
.fx-th-help .fx-tip {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    width: 240px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #111827;
    color: #f8fafc;
    font-size: .73rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .30);
    pointer-events: none;
}
.fx-th-help:hover .fx-tip,
.fx-th-help:focus-within .fx-tip {
    display: block;
}

/* En las últimas columnas la burbuja se abre hacia la izquierda
   para no salirse del contenedor. */
.fx-th-help.is-end .fx-tip {
    left: auto;
    right: 0;
}

/* El contenedor con overflow-x:auto forma un contexto de recorte que cortaría
   la burbuja. Mientras hay un encabezado en hover, se libera el recorte vertical
   (overflow-y:visible con overflow-x:auto se resuelve como auto en ambos ejes,
   así que se usa un wrapper sin scroll durante el hover). */
.fx-paq-table:has(.fx-th-help:hover) {
    overflow: visible;
}

@media (max-width: 900px) {
    .fx-th-help .fx-tip {
        width: min(220px, 70vw);
        font-size: .71rem;
    }
}
/* ===== Salidas de mula · hora probable de salida ===== */
.fx-salidas-seccion { margin-bottom: 22px; }
.fx-salidas-seccion > .fx-page-sub-title { margin-bottom: 10px; }

.fx-salidas-barras {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fx-salidas-barra-row {
    display: grid;
    grid-template-columns: 52px minmax(72px, 110px) 1fr 64px 64px;
    align-items: center;
    gap: 8px 10px;
    font-size: .82rem;
}
.fx-salidas-barra-dia {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #172033;
}
.fx-salidas-barra-ruta {
    color: #66666f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fx-salidas-barra-track {
    height: 14px;
    border-radius: 999px;
    background: color-mix(in srgb, #814a4c 8%, #f3f3f4);
    overflow: hidden;
}
.fx-salidas-barra-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5f3537, #814a4c);
    min-width: 4px;
}
.fx-salidas-barra-horas {
    text-align: right;
    font-size: .9rem;
    color: #172033;
}
.fx-salidas-barra-bultos {
    text-align: right;
    color: #66666f;
    font-size: .8rem;
}
.fx-salidas-barras-legend {
    display: flex;
    justify-content: flex-end;
    gap: 64px;
    margin-top: 8px;
    padding-right: 0;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #999;
}
@media (max-width: 700px) {
    .fx-salidas-barra-row {
        grid-template-columns: 48px 1fr 56px 56px;
    }
    .fx-salidas-barra-ruta { display: none; }
}

.fx-salida-card,
.fx-salida-resumen { padding: 16px 18px; }

.fx-salida-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.fx-salida-ruta {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    color: #5c3537;
}

.fx-salida-hora {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}
.fx-salida-hora strong {
    font-size: 2.35rem;
    line-height: 1.05;
    font-weight: 800;
    color: #172033;
    letter-spacing: -.5px;
}
.fx-salida-hora span {
    font-size: .82rem;
    font-weight: 600;
    color: #814a4c;
}

.fx-salida-ventana {
    margin-bottom: 14px;
    font-size: .8rem;
    color: #6b7280;
}
.fx-salida-ventana strong { color: #172033; }

.fx-salida-avance { margin-bottom: 10px; }
.fx-salida-avance-texto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: .76rem;
    color: #6b7280;
}
.fx-salida-avance-texto strong { color: #172033; font-size: .82rem; }
.fx-salida-barra { height: 8px; }

.fx-salida-mensaje {
    display: block;
    color: #8a7a7b !important;
    line-height: 1.45;
}

.fx-salida-datos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.fx-salida-datos > div {
    padding: 9px 11px;
    background: #faf7f7;
    border: 1px solid #f0e7e7;
    border-radius: 8px;
}
.fx-salida-datos span {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    color: #8a7a7b;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.fx-salida-datos strong {
    display: block;
    margin-top: 3px;
    font-size: 1.02rem;
    font-weight: 700;
    color: #172033;
}

@media (max-width: 640px) {
    .fx-salida-hora strong { font-size: 1.9rem; }
    .fx-salida-datos { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Desempeño de recogida · /admin/desempeno-recogida
   Las clases .fx-tower-* que usaba el panel nunca tuvieron estilos: la
   página se veía como una lista plana, sin jerarquía ni resumen.
   Prefijo nuevo .fx-rec- con ranking legible.
   --------------------------------------------------------------------- */
.fx-rec-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-rec-count {
    font-size: .72rem; font-weight: 700;
    color: var(--mud-palette-text-secondary, #666);
    white-space: nowrap;
}

.fx-rec-sort {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px; border-radius: 999px;
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 3%, var(--mud-palette-surface, #fff));
}
.fx-rec-sort-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--mud-palette-text-secondary, #666);
    padding: 0 8px 0 10px;
}
.fx-rec-sort-btn {
    appearance: none; border: 0; cursor: pointer;
    padding: 5px 12px; border-radius: 999px;
    font-size: .75rem; font-weight: 700;
    color: var(--mud-palette-text-secondary, #666);
    background: transparent;
    transition: background .15s ease, color .15s ease;
}
.fx-rec-sort-btn:hover { color: var(--mud-palette-text-primary, #111); }
.fx-rec-sort-btn.is-active {
    background: var(--mud-palette-surface, #fff);
    color: var(--mud-palette-primary, #814a4c);
    box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

/* Resumen del grupo: antes la tabla era solo una lista de números */
.fx-rec-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 2%, transparent);
}
.fx-rec-sum-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-rec-sum-item strong {
    font-size: 1.15rem; font-weight: 800; line-height: 1.1;
    color: var(--mud-palette-text-primary, #111);
    font-variant-numeric: tabular-nums;
}
.fx-rec-sum-item span {
    font-size: .68rem; line-height: 1.25;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-rec-sum-item.is-warn strong { color: #B45309; }

.fx-rec-list { display: flex; flex-direction: column; gap: 6px; }

.fx-rec-row {
    display: grid;
    grid-template-columns: 28px minmax(140px, 1.3fr) minmax(80px, 2fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    animation: fxRecRowIn .22s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--fx-i, 0) * 30ms);
    transition: background .14s ease, border-color .14s ease;
}
.fx-rec-row:hover {
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 5%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 22%, transparent);
}
.fx-rec-row.is-selected {
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 9%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 40%, transparent);
}
/* El líder se distingue: antes todos los choferes se veían iguales. */
.fx-rec-row.is-top .fx-rec-rank {
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 14%, transparent);
    color: var(--mud-palette-primary, #814a4c);
    font-weight: 800;
}

.fx-rec-rank {
    display: grid; place-items: center;
    width: 26px; height: 26px; border-radius: 8px;
    font-size: .72rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-secondary, #666);
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 5%, transparent);
}

.fx-rec-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-rec-name {
    font-size: .84rem; font-weight: 700;
    color: var(--mud-palette-text-primary, #111);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-rec-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: .68rem;
    color: var(--mud-palette-text-secondary, #666);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-rec-suc {
    font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: 1px 6px; border-radius: 5px;
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 6%, transparent);
}

.fx-rec-bar-wrap { min-width: 0; }
.fx-rec-bar-track {
    height: 9px; border-radius: 999px; overflow: hidden;
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 7%, transparent);
}
.fx-rec-bar {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--mud-palette-primary, #814a4c) 65%, white),
        var(--mud-palette-primary, #814a4c));
    animation: fxRecBarGrow .5s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--fx-i, 0) * 40ms);
}
.fx-rec-row.is-top .fx-rec-bar {
    background: linear-gradient(90deg, #34D399, #16A34A);
}

.fx-rec-figures {
    display: flex; align-items: center; gap: 14px;
    justify-content: flex-end;
}
.fx-rec-fig { display: flex; flex-direction: column; align-items: flex-end; }
.fx-rec-fig strong {
    font-size: .92rem; font-weight: 800; line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary, #111);
}
.fx-rec-fig small {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .03em;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-rec-fig.is-main strong { font-size: 1.05rem; }
.fx-rec-fig.is-pending strong { color: #B45309; }
.fx-rec-fig.is-truck strong { color: #0369A1; }

/* KPIs del panel de recogida */
.fx-rec-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.fx-rec-kpi {
    appearance: none;
    text-align: left;
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    background: var(--mud-palette-surface, #fff);
    font: inherit;
    cursor: default;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
button.fx-rec-kpi { cursor: pointer; }
button.fx-rec-kpi:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 40%, transparent);
    transform: translateY(-1px);
}
.fx-rec-kpi.is-active {
    border-color: var(--mud-palette-primary, #814a4c);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mud-palette-primary, #814a4c) 18%, transparent);
}
.fx-rec-kpi-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-rec-kpi-value {
    font-size: 1.7rem; font-weight: 800; line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary, #111);
}
.fx-rec-kpi-hint {
    font-size: .68rem; line-height: 1.25;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-rec-kpi.is-pending .fx-rec-kpi-value { color: #B45309; }
.fx-rec-kpi.is-collected .fx-rec-kpi-value { color: #15803D; }
.fx-rec-kpi.is-truck .fx-rec-kpi-value { color: #0369A1; }
.fx-rec-kpi.is-warn.is-active,
.fx-rec-kpi.is-warn:has(.fx-rec-kpi-value:not(:empty)) { }
.fx-rec-kpi.is-warn .fx-rec-kpi-value { color: #B45309; }
.fx-rec-kpi-value.is-bump { animation: fxRecBump .4s ease; }
@keyframes fxRecBump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@keyframes fxRecRowIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fxRecBarGrow {
    from { width: 0; }
}

@media (max-width: 900px) {
    .fx-rec-row {
        grid-template-columns: 26px minmax(120px, 1fr) auto;
        gap: 10px;
        row-gap: 6px;
    }
    .fx-rec-bar-wrap { grid-column: 2 / -1; }
    .fx-rec-figures { gap: 10px; }
    .fx-rec-fig small { font-size: .58rem; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-rec-row, .fx-rec-bar { animation: none; }
}

/* Toolbar, chips y tabla: resto de clases que el panel ya usaba sin estilos. */
.fx-tower-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.fx-tower-period-chips { display: inline-flex; align-items: center; gap: 6px; }
/* Ancho del input, NO del calendario: MudPicker copia Style al panel del popover. */
.fx-tower-date { flex: 0 0 150px; max-width: 160px; }
@media (max-width: 720px) {
    .fx-tower-date { flex: 1 1 100%; max-width: none; }
}
.fx-tower-filter-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px dashed var(--mud-palette-divider, #E8E8EA);
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 2%, transparent);
}
.fx-tower-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .7rem; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    color: var(--mud-palette-text-secondary, #666);
    white-space: nowrap;
}
.fx-tower-live::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; opacity: .5;
}
.fx-tower-live.is-on {
    color: #15803D;
    border-color: color-mix(in srgb, #15803D 35%, transparent);
    background: color-mix(in srgb, #15803D 8%, transparent);
}
.fx-tower-live.is-on::before {
    opacity: 1;
    animation: fxRecPulse 1.8s ease-in-out infinite;
}
.fx-tower-live.is-off { color: var(--mud-palette-text-secondary, #666); }
@keyframes fxRecPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.8); }
}

/* Chip de estado en la tabla de guías */
.fx-tower-action-chip {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 999px;
    font-size: .68rem; font-weight: 700;
    letter-spacing: .02em; white-space: nowrap;
}
.fx-tower-action-chip.is-assign {
    color: #B45309;
    background: color-mix(in srgb, #B45309 12%, transparent);
}
.fx-tower-action-chip.is-collected {
    color: #15803D;
    background: color-mix(in srgb, #15803D 12%, transparent);
}

@media (prefers-reduced-motion: reduce) {
    .fx-tower-live.is-on::before { animation: none; }
}

/* Bloque de referencia de la NC: datos fiscales en solo lectura. */
.fx-nc-ref {
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary, #814a4c) 28%, transparent);
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 5%, transparent);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.fx-nc-ref-head {
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 700;
    color: var(--mud-palette-primary, #814a4c);
}
.fx-nc-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.fx-nc-ref-grid > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-nc-ref-grid span {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-nc-ref-grid strong {
    font-size: .86rem; font-weight: 700;
    color: var(--mud-palette-text-primary, #111);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-nc-ref-cufe { display: flex; flex-direction: column; gap: 2px; }
.fx-nc-ref-cufe span {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-nc-ref-cufe code {
    font-size: .68rem;
    color: var(--mud-palette-text-primary, #111);
    word-break: break-all;
    line-height: 1.35;
}
.fx-nc-excede { color: #DC2626; font-weight: 600; }

/* Números del documento en la lista de emisión fiscal. */
.fx-doc-nums {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fx-doc-nums strong {
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary, #111);
}
.fx-doc-nums small {
    font-size: .68rem; color: var(--mud-palette-text-secondary, #666);
}
.fx-doc-nums small strong { font-weight: 700; }
.fx-doc-borrador {
    display: inline-flex; padding: 1px 8px; border-radius: 999px;
    font-size: .68rem; font-weight: 700;
    color: #B45309;
    background: color-mix(in srgb, #B45309 12%, transparent);
}
.fx-doc-ref {
    display: flex; align-items: center; gap: 3px;
    margin-top: 2px;
    font-size: .68rem;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-doc-num {
    font-size: .9rem;
    letter-spacing: .01em;
}
.fx-doc-hint {
    font-size: .66rem;
    color: var(--mud-palette-text-secondary, #666);
}

/* Estado del documento fiscal */
.fx-doc-estado {
    display: inline-flex; align-items: center;
    padding: 2px 10px; border-radius: 999px;
    font-size: .68rem; font-weight: 700;
    letter-spacing: .02em; white-space: nowrap;
}
.fx-doc-estado.is-autorizada {
    color: #15803D;
    background: color-mix(in srgb, #15803D 13%, transparent);
}
.fx-doc-estado.is-borrador {
    color: #B45309;
    background: color-mix(in srgb, #B45309 13%, transparent);
}
.fx-doc-cafe { margin-top: 3px; }
.fx-doc-cafe .mud-link { font-size: .7rem; font-weight: 700; }

/* Emisión fiscal: sin barra horizontal; cliente en dos líneas. */
.fx-emision-table.fx-table .mud-table-container { overflow-x: hidden; }
.fx-emision-table .mud-table-root,
.fx-emision-table table { table-layout: fixed; width: 100%; min-width: 0; }
.fx-emision-cliente {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fx-doc-warn {
    margin-top: 3px;
    font-size: .66rem;
    font-weight: 700;
    color: #B45309;
    line-height: 1.25;
}
.fx-factura-resumen-mud .mud-dialog-content {
    max-height: min(78vh, 820px);
    overflow-x: hidden !important;
    overflow-y: auto;
}

/* Progreso de emisión: muestra en qué paso va y qué se espera. */
.fx-nc-progress {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary, #814a4c) 30%, transparent);
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 6%, transparent);
}
.fx-nc-progress.is-error {
    border-color: color-mix(in srgb, #DC2626 40%, transparent);
    background: color-mix(in srgb, #DC2626 7%, transparent);
}
.fx-nc-progress-head {
    display: flex; align-items: center; gap: 9px;
    font-size: .86rem; font-weight: 700;
    color: var(--mud-palette-primary, #814a4c);
}
.fx-nc-progress.is-error .fx-nc-progress-head { color: #B91C1C; }
.fx-nc-progress-detail {
    margin: 0;
    font-size: .76rem; line-height: 1.4;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-nc-progress-steps {
    display: flex; align-items: center; gap: 6px;
    margin-top: 4px;
}
.fx-nc-step {
    flex: 1 1 0;
    height: 4px; border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 10%, transparent);
    transition: background .25s ease;
}
.fx-nc-step.is-done { background: #15803D; }
.fx-nc-step.is-active {
    background: var(--mud-palette-primary, #814a4c);
    animation: fxNcPulse 1.1s ease-in-out infinite;
}
@keyframes fxNcPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
    .fx-nc-step.is-active { animation: none; }
}

/* ── Panel «Qué tiene cada usuario» · lista lineal ── */
.fx-poder-totales {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
    padding: 12px 16px; margin-bottom: 14px;
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    border-radius: 12px;
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 5%, transparent);
    font-size: .86rem;
    color: var(--mud-palette-text-secondary, #555);
}
.fx-poder-totales strong {
    font-size: 1.05rem; font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary, #111);
}
.fx-poder-totales .is-pending strong { color: #B45309; }
.fx-poder-totales .is-truck strong   { color: #0369A1; }
.fx-poder-totales .is-done strong    { color: #15803D; }
.fx-poder-totales .is-warn strong    { color: #B91C1C; }

.fx-poder-orden-lbl {
    font-size: .68rem; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary, #666);
}

.fx-poder-lista { display: flex; flex-direction: column; gap: 10px; }

.fx-poder-bloque {
    border: 1px solid var(--mud-palette-divider, #E8E8EA);
    border-radius: 14px;
    background: var(--mud-palette-surface, #fff);
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* Redondeo visual sin overflow: clip, que anularía la cabecera sticky. */
.fx-poder-bloque > .fx-poder-cabecera { border-radius: 14px 14px 0 0; }
.fx-poder-bloque > .fx-poder-guia-grupos:last-child { border-radius: 0 0 14px 14px; }
.fx-poder-bloque.is-open {
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 32%, transparent);
    box-shadow: 0 6px 20px -16px rgba(15, 23, 42, .45);
}

.fx-poder-cabecera {
    display: grid;
    grid-template-columns: minmax(180px, 1.15fr) minmax(0, 3fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--mud-palette-surface, #fff);
    border-bottom: 1px solid transparent;
}
.fx-poder-bloque.is-open .fx-poder-cabecera {
    border-bottom-color: var(--mud-palette-divider, #E8E8EA);
}
.fx-poder-cabecera:hover { background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 4%, transparent); }

.fx-poder-quien { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-poder-nombre { font-weight: 700; font-size: .95rem; color: #0f172a; }
.fx-poder-meta { font-size: .74rem; color: var(--mud-palette-text-secondary, #666); }

.fx-poder-cifras {
    display: grid;
    grid-template-columns: repeat(7, minmax(64px, 1fr));
    gap: 8px;
}
.fx-poder-cifra {
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    padding: 2px 0;
    min-width: 0;
}
.fx-poder-cifra strong {
    font-size: 1.12rem; font-weight: 800; line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary, #111);
}
.fx-poder-cifra small {
    font-size: .62rem; font-weight: 700; letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary, #777);
    white-space: nowrap;
}
.fx-poder-cifra em {
    font-size: .62rem; font-style: normal;
    color: var(--mud-palette-text-secondary, #999);
    white-space: nowrap;
}
.fx-poder-cifra.is-poder strong { color: #0369A1; }
.fx-poder-cifra.is-reserv strong { color: #B45309; }
.fx-poder-cifra.is-truck strong  { color: #0369A1; }
.fx-poder-cifra.is-ruta strong   { color: #7C3AED; }
.fx-poder-cifra.is-warn strong   { color: #B91C1C; }

.fx-poder-chevron { color: var(--mud-palette-text-secondary, #888); }

.fx-poder-guia-grupos {
    padding: 4px 16px 14px;
    border-top: 1px dashed var(--mud-palette-divider, #E8E8EA);
    display: flex; flex-direction: column; gap: 12px;
}

.fx-poder-grupo-head {
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
    margin: 10px 0 5px;
    font-size: .74rem;
    color: var(--mud-palette-text-secondary, #666);
}
.fx-poder-grupo-titulo {
    font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
    color: var(--mud-palette-text-primary, #333);
}
.fx-poder-grupo-count {
    display: inline-block; min-width: 20px; padding: 0 6px;
    border-radius: 999px;
    font-size: .7rem; font-weight: 800; text-align: center;
    background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 9%, transparent);
    color: var(--mud-palette-text-primary, #333);
}
.fx-poder-grupo-nota { font-size: .7rem; opacity: .8; }
.fx-poder-grupo.is-reserv .fx-poder-grupo-count { background: color-mix(in srgb, #B45309 18%, transparent); color: #92400E; }
.fx-poder-grupo.is-truck  .fx-poder-grupo-count { background: color-mix(in srgb, #0369A1 18%, transparent); color: #075985; }
.fx-poder-grupo.is-ruta   .fx-poder-grupo-count { background: color-mix(in srgb, #7C3AED 18%, transparent); color: #5B21B6; }
.fx-poder-grupo.is-done   .fx-poder-grupo-count { background: color-mix(in srgb, #15803D 18%, transparent); color: #166534; }

.fx-poder-vacio { font-size: .78rem; font-style: italic; color: var(--mud-palette-text-secondary, #999); padding-left: 3px; }

.fx-poder-guias { display: flex; flex-direction: column; gap: 3px; }

.fx-poder-guia {
    display: grid;
    grid-template-columns: 58px minmax(130px, 1.6fr) minmax(120px, 1.5fr) minmax(110px, 1.2fr) 46px 78px 108px 82px;
    gap: 10px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    font-size: .78rem;
    line-height: 1.35;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease;
}
.fx-poder-guia:hover {
    background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 7%, transparent);
    border-color: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 24%, transparent);
}
.fx-poder-guia:nth-child(even of :not(.is-head)) { background: color-mix(in srgb, var(--mud-palette-text-primary, #111) 2.6%, transparent); }
.fx-poder-guia:nth-child(even of :not(.is-head)):hover { background: color-mix(in srgb, var(--mud-palette-primary, #814a4c) 7%, transparent); }

/* Fila de rótulos: no es un enlace, solo nombra las columnas. */
.fx-poder-guia.is-head {
    background: transparent !important;
    border-color: transparent !important;
    padding-bottom: 1px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary, #8a8f98);
    cursor: default;
}
.fx-poder-guia.is-head:hover { background: transparent; border-color: transparent; }
.ta-r { text-align: right; }

.fx-poder-guia-nro {
    font-weight: 800; font-variant-numeric: tabular-nums;
    color: var(--mud-palette-primary, #814a4c);
}
.fx-poder-guia-nombre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fx-poder-guia-dest,
.fx-poder-guia-rem { color: var(--mud-palette-text-secondary, #6b7280); overflow: hidden; text-overflow: ellipsis; }
.fx-poder-guia-bultos {
    font-weight: 700; font-variant-numeric: tabular-nums; text-align: right;
}
.fx-poder-guia-cobro { text-align: right; font-variant-numeric: tabular-nums; }
.fx-poder-guia-cobro.is-paid { color: #15803D; }
.fx-poder-guia-estado {
    font-size: .68rem; color: var(--mud-palette-text-secondary, #6b7280);
    overflow: hidden; text-overflow: ellipsis;
}
.fx-poder-guia-fecha {
    font-size: .68rem; color: var(--mud-palette-text-secondary, #6b7280);
    text-align: right; font-variant-numeric: tabular-nums;
}
@media (max-width: 1400px) {
    .fx-poder-cabecera { grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) auto; }
    .fx-poder-cifras { grid-template-columns: repeat(4, minmax(60px, 1fr)); }
}

@media (max-width: 1100px) {
    .fx-poder-cabecera { grid-template-columns: 1fr auto; }
    .fx-poder-cifras { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
    .fx-poder-guia {
        grid-template-columns: 52px minmax(110px, 1fr) minmax(0, 1fr) 40px 74px;
    }
    .fx-poder-guia-rem, .fx-poder-guia-estado, .fx-poder-guia-fecha { display: none; }
    .fx-poder-guia.is-head span:nth-child(4),
    .fx-poder-guia.is-head span:nth-child(7),
    .fx-poder-guia.is-head span:nth-child(8) { display: none; }
}

@media (max-width: 700px) {
    .fx-poder-cifras { grid-template-columns: repeat(2, 1fr); }
    .fx-poder-totales { gap: 4px 12px; font-size: .8rem; }
}

/* ===== Operación crítica mula + asignación por ruta (admin) ===== */
/* Calendario en diálogo: mes completo, sin recorte del encabezado del reporte. */
.fx-operacion-critica .fx-report-head {
    overflow: visible;
}
.fx-critica-fecha {
    width: 180px;
}
.mud-picker-dialog .mud-picker-calendar-container,
.mud-dialog .mud-picker-calendar-container {
    min-width: 280px;
}
.mud-picker-dialog .mud-picker-calendar,
.mud-dialog .mud-picker-calendar {
    height: auto !important;
    min-height: 240px;
}
.mud-picker-dialog .mud-picker-calendar-header,
.mud-dialog .mud-picker-calendar-header {
    padding: 8px 12px 4px;
}
.mud-picker-dialog .mud-picker-calendar-header-transition,
.mud-dialog .mud-picker-calendar-header-transition {
    font-size: 1.05rem;
}
.mud-picker-dialog .mud-day,
.mud-dialog .mud-day {
    width: 36px;
    height: 36px;
    font-size: .85rem;
}

.fx-critica-card { padding: 14px 16px; }
.fx-critica-card.is-danger { box-shadow: inset 3px 0 0 #dc2626; }
.fx-critica-card.is-warning { box-shadow: inset 3px 0 0 #d97706; }
.fx-critica-card.is-success { box-shadow: inset 3px 0 0 #16a34a; }
.fx-critica-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.fx-critica-pct {
    font-size: 1.35rem;
    font-weight: 800;
    color: #172033;
    font-variant-numeric: tabular-nums;
}
.fx-critica-nums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}
.fx-critica-nums span {
    display: block;
    font-size: .7rem;
    color: #718096;
}
.fx-critica-nums strong {
    display: block;
    font-size: .95rem;
    color: #172033;
    font-variant-numeric: tabular-nums;
}
.fx-critica-mediana { padding: 14px 16px; }
.fx-critica-activos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fx-critica-activo-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.fx-critica-activo-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: .82rem;
    color: var(--mud-palette-text-secondary, #64748b);
}
.fx-critica-activo-nums strong {
    color: var(--mud-palette-text-primary, #0f172a);
    font-variant-numeric: tabular-nums;
}
.fx-critica-faltan-btn {
    min-width: 0;
    height: auto;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.fx-critica-faltan-btn strong {
    color: inherit;
}
.fx-critica-row-curso,
.fx-critica-row-camino,
.fx-critica-row-detenida,
.fx-critica-row-activa {
    border-radius: 10px;
    padding: 10px 12px;
}
.fx-critica-row-curso {
    background: color-mix(in srgb, #F59E0B 18%, transparent);
    border: 1px solid color-mix(in srgb, #F59E0B 42%, transparent);
}
.fx-critica-row-camino {
    background: color-mix(in srgb, #0EA5E9 12%, transparent);
    border: 1px solid color-mix(in srgb, #0EA5E9 32%, transparent);
}
.fx-critica-row-detenida {
    background: color-mix(in srgb, #EF4444 12%, transparent);
    border: 1px solid color-mix(in srgb, #EF4444 36%, transparent);
}
.fx-critica-row-activa {
    background: var(--mud-palette-background-gray, #f8fafc);
    border: 1px solid color-mix(in srgb, #94a3b8 28%, transparent);
}
.fx-critica-cerrados {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fx-critica-row-cerrada {
    font-size: .78rem;
    color: var(--mud-palette-text-secondary, #64748b);
    padding: 4px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, #16A34A 8%, transparent);
}
.fx-admin-report-kpi.is-success { border-bottom-color: #16a34a; }
.fx-admin-report-kpi.is-success strong { color: #15803d; }
@media (max-width: 700px) {
    .fx-critica-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Admin Guías — pulso, filtros activos y agrupación */
.fx-guias-ops .fx-guias-pulse {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.fx-guias-chip {
  appearance: none;
  border: 1px solid #e5eaf1;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  font: inherit;
  min-width: 88px;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.fx-guias-chip strong {
  color: #172033;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.fx-guias-chip span {
  color: #718096;
  font-size: .72rem;
}
.fx-guias-chip:hover { background: #faf7f7; border-color: #d7c4c5; }
.fx-guias-chip.is-active {
  background: #faf7f7;
  border-color: #814a4c;
  box-shadow: inset 0 0 0 1px #814a4c;
}
.fx-guias-chip:disabled { opacity: .55; cursor: not-allowed; }
.fx-guias-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #ead6d7;
  border-radius: 8px;
  background: #f8eeee;
  color: #5c3537;
  font-size: .84rem;
}
.fx-guias-saldo {
  display: block;
  margin-top: 4px;
  color: #a16207;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}
.fx-guias-details {
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px 14px;
}
.fx-guias-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 2px;
  font-weight: 700;
  color: #172033;
}
.fx-guias-details > summary::-webkit-details-marker { display: none; }
.fx-guias-details-body { padding-top: 2px; }
.fx-guias-group-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 4px;
}
