/* ============================================================================
   TG-MASTER PATCH-12 · Pulido visual del shell completo
   - Brand sidebar con logo SVG nuevo
   - TopBar: identidad unificada + divisor + Ctrl+K que no se pisa
   - Hero del dashboard rediseñado (NUEVA VENTA + CONSULTAR PRECIO + KPIs spectacular)
   - Flotantes reorganizados (mascota, chat, bug, policía)
   ============================================================================ */

/* === BRAND SIDEBAR con logo SVG === */
.brand .brand-mark-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    /* fondo NEGRO para que el toro (rojo + cuernos blancos) resalte;
       borde crimson sutil para presencia de marca */
    background: #0b0c10;
    border: 1px solid rgba(200, 16, 46, 0.40);
    padding: 3px; /* menos padding → el toro se ve completo y centrado, no recortado */
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.22);
    flex-shrink: 0;
    display: block;
}
.brand-link:hover .brand-mark-img {
    box-shadow: 0 8px 22px rgba(200, 16, 46, 0.5);
    transform: translateY(-1px);
    transition: all 0.18s ease;
}

/* === TOPBAR · separador y identidad unificada === */
.top-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.10);
    margin: 0 4px;
    flex-shrink: 0;
}

.top-identity {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    line-height: 1.15;
    flex-shrink: 0;
    transition: all 0.15s;
}
.top-identity:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 166, 35, 0.18);
}
.top-identity .ti-row1 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.top-identity .ti-leg {
    background: rgba(245, 199, 110, 0.15);
    border: 1px solid rgba(245, 199, 110, 0.3);
    color: #f5c76e;
    font-size: 10.5px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 8px;
    letter-spacing: 0.4px;
}
.top-identity .ti-nom {
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.top-identity .ti-row2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.top-identity .ti-rol { color: #f5a623; }
.top-identity .ti-turno { color: #6ee7b7; }
.top-identity .ti-sep { opacity: 0.4; }

/* Reloj compacto */
.top-clock { font-size: 12px !important; opacity: 0.8; }
.top-clock .top-val { color: #aaa !important; font-variant-numeric: tabular-nums; }

/* === Buscador: NO permitir que el shortcut "Ctrl+K" se pise con el siguiente chip === */
.app-top > .buscador-global { margin-right: 4px; }
.bg-trigger {
    overflow: hidden;
}
.bg-shortcut {
    flex-shrink: 0 !important;
}
@media (max-width: 1100px) {
    .bg-shortcut { display: none !important; }
}

/* ============================================================================
   === HERO DEL DASHBOARD · DISEÑO ESPECTACULAR (PATCH-12 v2) ===
   Efectos: glassmorphism, mesh gradient animado, shine sweep, glow ring,
            icono 3D con micro-anim, texto premium, particles flotantes
   ============================================================================ */

/* Hero grid 2 columnas */
.hero-duo {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin: 18px 0 22px 0;
    position: relative;
    z-index: 2;
}

/* Card base con grid interno (icon | textos | arrow) */
.hero-card,
.hero-duo .cp-trigger {
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 18px;
    row-gap: 2px;
    grid-template-areas:
        "ico txt arrow"
        "ico sub arrow";
    align-items: center;
    padding: 22px 26px;
    border-radius: 18px;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    min-height: 116px;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    isolation: isolate;
    will-change: transform;
}

/* === CAPA 1: mesh gradient animado de fondo === */
.hero-venta {
    background:
        radial-gradient(circle at 18% 82%, rgba(255,255,255,0.16) 0%, transparent 36%),
        radial-gradient(circle at 82% 22%, rgba(255,234,128,0.14) 0%, transparent 30%),
        linear-gradient(135deg, #14532d 0%, #15803d 35%, #16a34a 70%, #22c55e 100%);
    background-size: 100% 100%, 100% 100%, 200% 200%;
    animation: heroMeshShift 12s ease-in-out infinite;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 8px 24px rgba(20,83,45,0.35),
        0 2px 6px rgba(0,0,0,0.18);
}
.hero-precio,
.hero-duo .cp-trigger {
    background:
        radial-gradient(circle at 18% 82%, rgba(255,255,255,0.14) 0%, transparent 36%),
        radial-gradient(circle at 82% 22%, rgba(165,180,255,0.16) 0%, transparent 30%),
        linear-gradient(135deg, #1e3a8a 0%, #2563eb 35%, #3b82f6 70%, #60a5fa 100%);
    background-size: 100% 100%, 100% 100%, 200% 200%;
    animation: heroMeshShift 12s ease-in-out infinite;
    animation-delay: -4s;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 8px 24px rgba(30,58,138,0.35),
        0 2px 6px rgba(0,0,0,0.18);
}

@keyframes heroMeshShift {
    0%, 100% { background-position: 0% 50%, 100% 50%, 0% 50%; }
    50%      { background-position: 0% 50%, 100% 50%, 100% 50%; }
}

/* === CAPA 2: shine sweep al hover (brillo que cruza horizontalmente) === */
.hero-card::before,
.hero-duo .cp-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(110deg,
        transparent 30%,
        rgba(255,255,255,0.20) 50%,
        transparent 70%);
    transform: skewX(-18deg);
    transition: left 0.85s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}
.hero-card:hover::before,
.hero-duo .cp-trigger:hover::before {
    left: 130%;
}

/* === HOVER: lift + glow ring === */
.hero-card:hover,
.hero-duo .cp-trigger:hover {
    transform: translateY(-3px) scale(1.005);
}
.hero-venta:hover {
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 0 0 1px rgba(255,255,255,0.10),
        0 0 28px rgba(34,197,94,0.45),
        0 16px 36px rgba(0,0,0,0.42);
}
.hero-precio:hover,
.hero-duo .cp-trigger:hover {
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 0 0 1px rgba(255,255,255,0.10),
        0 0 28px rgba(96,165,250,0.45),
        0 16px 36px rgba(0,0,0,0.42);
}

/* === ICONO PREMIUM glassmorphism === */
.hero-card .hero-ico,
.hero-duo .cp-trigger .cp-trigger-ico {
    grid-area: ico;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.10) 100%);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.25),
        inset 0 -2px 0 rgba(0,0,0,0.10),
        0 6px 18px rgba(0,0,0,0.28);
    transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.32s ease,
                background 0.32s ease;
    position: relative;
    z-index: 2;
}
.hero-card:hover .hero-ico,
.hero-duo .cp-trigger:hover .cp-trigger-ico {
    transform: scale(1.08) rotate(-4deg);
    background: linear-gradient(160deg, rgba(255,255,255,0.36) 0%, rgba(255,255,255,0.14) 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.40),
        inset 0 -2px 0 rgba(0,0,0,0.10),
        0 12px 28px rgba(0,0,0,0.40),
        0 0 0 8px rgba(255,255,255,0.06);
}
/* Animación particular del rayo en NUEVA VENTA */
.hero-venta .hero-ico {
    animation: heroLightning 5.5s ease-in-out infinite;
}
@keyframes heroLightning {
    0%, 88%, 100% { filter: drop-shadow(0 0 4px rgba(255,234,128,0.35)); }
    92%           { filter: drop-shadow(0 0 18px rgba(255,234,128,0.95)) drop-shadow(0 0 6px rgba(255,255,255,0.6)); transform: scale(1.06); }
    96%           { filter: drop-shadow(0 0 4px rgba(255,234,128,0.35)); transform: scale(1); }
}
/* Animación de la lupa en CONSULTAR PRECIO */
.hero-precio .hero-ico,
.hero-duo .cp-trigger .cp-trigger-ico {
    animation: heroSearchWiggle 6.5s ease-in-out infinite;
}
@keyframes heroSearchWiggle {
    0%, 88%, 100% { transform: rotate(0deg); }
    92%           { transform: rotate(-10deg) translateX(-1px); }
    96%           { transform: rotate(10deg) translateX(2px); }
}

/* === TEXTO PRINCIPAL === */
.hero-card .hero-text {
    grid-area: txt;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    z-index: 2;
}
.hero-card .hero-h1 {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.05;
    color: #ffffff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        0 0 22px rgba(255, 255, 255, 0.08);
    margin: 0 0 4px 0;
}
.hero-card .hero-h2 {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
/* Para el cp-trigger original (que tiene 3 spans hermanos), grid-areas ya los acomoda */
.hero-duo .cp-trigger .cp-trigger-txt {
    grid-area: txt;
    align-self: end;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.8px;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 0 22px rgba(255,255,255,0.08);
    z-index: 2;
}
.hero-duo .cp-trigger .cp-trigger-sub {
    grid-area: sub;
    align-self: start;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    margin-top: 2px;
    /* CRÍTICO: si hay overflow, hacer wrap correcto */
    overflow-wrap: break-word;
    word-break: break-word;
    z-index: 2;
}

/* === ARROW al final con glow + slide on hover === */
.hero-card .hero-arrow {
    grid-area: arrow;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease,
                box-shadow 0.25s ease;
    z-index: 2;
    backdrop-filter: blur(6px);
}
.hero-card:hover .hero-arrow {
    transform: translateX(6px);
    background: rgba(255,255,255,0.22);
    box-shadow: 0 0 14px rgba(255,255,255,0.22), inset 0 1px 0 rgba(255,255,255,0.3);
}
/* Para cp-trigger usamos un ::after como arrow sintético */
.hero-duo .cp-trigger::after {
    content: '→';
    grid-area: arrow;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease,
                box-shadow 0.25s ease;
    backdrop-filter: blur(6px);
    z-index: 2;
}
.hero-duo .cp-trigger:hover::after {
    transform: translateX(6px);
    background: rgba(255,255,255,0.22);
    box-shadow: 0 0 14px rgba(255,255,255,0.22), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* === ACTIVO (pulsado) — feedback táctil === */
.hero-card:active,
.hero-duo .cp-trigger:active {
    transform: translateY(-1px) scale(0.998);
    transition-duration: 0.08s;
}

/* === FOCUS (accesibilidad) === */
.hero-card:focus-visible,
.hero-duo .cp-trigger:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 3px;
}

/* === PARTÍCULAS FLOTANTES (decoración sutil) === */
.hero-card::after {
    /* dejar libre por si en futuro se quiere agregar otra capa */
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 720px) {
    .hero-duo {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hero-card,
    .hero-duo .cp-trigger {
        grid-template-columns: 52px 1fr auto;
        column-gap: 14px;
        padding: 16px 18px;
        min-height: 92px;
    }
    .hero-card .hero-ico,
    .hero-duo .cp-trigger .cp-trigger-ico {
        width: 52px;
        height: 52px;
        font-size: 28px;
        border-radius: 13px;
    }
    .hero-card .hero-h1,
    .hero-duo .cp-trigger .cp-trigger-txt {
        font-size: 19px;
        letter-spacing: 0.5px;
    }
    .hero-card .hero-h2,
    .hero-duo .cp-trigger .cp-trigger-sub {
        font-size: 11px;
    }
    .hero-card .hero-arrow,
    .hero-duo .cp-trigger::after {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
@media (max-width: 380px) {
    .hero-card .hero-arrow,
    .hero-duo .cp-trigger::after {
        display: none;
    }
}

/* === Reduce motion (usuarios sensibles a animaciones) === */
@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .hero-duo .cp-trigger,
    .hero-venta,
    .hero-precio {
        animation: none !important;
    }
    .hero-card::before,
    .hero-duo .cp-trigger::before {
        display: none !important;
    }
    .hero-venta .hero-ico,
    .hero-precio .hero-ico,
    .hero-duo .cp-trigger .cp-trigger-ico {
        animation: none !important;
    }
}

/* === KPIs spectacular === */
.kpis-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 22px 0;
}
.kpi-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(30,33,40,0.7) 0%, rgba(20,22,27,0.7) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid #6b7280;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.18s;
    min-height: 96px;
}
.kpi-stat:hover {
    transform: translateY(-1px);
    border-left-color: #f5a623;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.kpi-stat .kpi-lbl {
    font-size: 10.5px;
    color: #9aa0aa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.kpi-stat .kpi-val {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.kpi-stat .kpi-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}
.kpi-stat .kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 10.5px;
}
.kpi-stat .kpi-delta-up   { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.kpi-stat .kpi-delta-down { background: rgba(220,38,38,0.12);  color: #fca5a5; }
.kpi-stat .kpi-delta-flat { background: rgba(255,255,255,0.06); color: #9aa0aa; }

/* Variantes color por tipo (acento izquierdo) */
.kpi-stat-ventas  { border-left-color: #16a34a; }
.kpi-stat-mp      { border-left-color: #2563eb; }
.kpi-stat-stock   { border-left-color: #f59e0b; }
.kpi-stat-caja    { border-left-color: #dc2626; }

/* Stock crítico con pulse rojo cuando hay alertas */
.kpi-stat-stock-alerta {
    border-left-color: #dc2626;
    background: linear-gradient(180deg, rgba(60,30,30,0.6) 0%, rgba(20,22,27,0.7) 100%);
}
.kpi-stat-stock-alerta .kpi-val { color: #fca5a5; }
.kpi-stat-stock-alerta::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 0 0 0 rgba(220,38,38,0.6);
    animation: kpiAlertaPulse 1.6s infinite;
}
@keyframes kpiAlertaPulse {
    0%   { box-shadow: 0 0 0 0 rgba(220,38,38,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
    100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* Mini sparkline decorativo en fondo */
.kpi-stat .kpi-spark {
    position: absolute;
    bottom: 8px;
    right: 10px;
    height: 28px;
    width: 56px;
    opacity: 0.15;
    pointer-events: none;
}

/* === Tip atajos: que no muerda al saludo === */
.mn-tip-atajos {
    margin-bottom: 18px !important;
}

/* === FLOTANTES reorganizados (que nada tape nada) === */
/* Reglas defensivas para que Manolin (mascota) y ChatDock (FAB) no se pisen.
   Manolin queda en bottom-right.
   ChatDock se desplaza más arriba para no pisar la mascota.
   Bug reporter se queda en bottom-left (sin cambios). */
.chat-dock-fab,
.cd-fab {
    bottom: 96px !important;   /* sube por encima de la mascota Manolín */
}
/* Si hay una alarma pulsante flotante (POLICIA / panic) la subimos al top-right
   bien separada de todo lo demás. No tapa ni KPIs ni hero. */
.panic-fab,
.fab-policia,
.alarma-flotante {
    top: 76px !important;
    right: 16px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 40;
}
/* Defensivo: ningún flotante "global" puede tapar las hero-card */
.hero-duo, .kpis-row { position: relative; z-index: 2; }

.fab-cluster {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
    pointer-events: none;
}
.fab-cluster > * { pointer-events: auto; }

/* === MOBILE / TABLET === */
@media (max-width: 720px) {
    .hero-duo {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hero-card { padding: 18px 20px; min-height: 96px; }
    .hero-card .hero-ico { width: 48px; height: 48px; font-size: 28px; }
    .hero-card .hero-h1 { font-size: 20px; letter-spacing: 0.5px; }
    .hero-card .hero-h2 { font-size: 11.5px; }
    .hero-card .hero-arrow { font-size: 22px; }

    .kpis-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .kpi-stat { padding: 12px 14px; min-height: 80px; }
    .kpi-stat .kpi-val { font-size: 20px; }

    /* Topbar: identidad oculta el row2 en mobile */
    .top-identity .ti-row2 { display: none; }
    .top-divider { display: none; }
}
@media (max-width: 480px) {
    .top-identity .ti-nom { display: none; }
    .top-clock { display: none !important; }
}

/* ============================================================================
   TG-MASTER PATCH-14 - Banner global "tenés un cierre a medias"
   Click → retoma el cierre desde el último auto-save
   ============================================================================ */
.cierre-pendiente-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    margin: 0;
    background: linear-gradient(90deg, rgba(245,166,35,0.20) 0%, rgba(245,166,35,0.05) 100%);
    border-bottom: 1px solid rgba(245,166,35,0.40);
    border-left: 4px solid #f5a623;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
    animation: cpbPulse 3s ease-in-out infinite;
}
.cierre-pendiente-banner:hover {
    background: linear-gradient(90deg, rgba(245,166,35,0.30) 0%, rgba(245,166,35,0.10) 100%);
}
.cierre-pendiente-banner .cpb-ico {
    font-size: 22px;
    flex-shrink: 0;
}
.cierre-pendiente-banner .cpb-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.cierre-pendiente-banner .cpb-txt b { font-weight: 800; color: #fbbf24; }
.cierre-pendiente-banner .cpb-sub { font-size: 11px; color: rgba(255,255,255,0.75); }
.cierre-pendiente-banner .cpb-arrow {
    font-size: 22px;
    color: #fbbf24;
    transition: transform 0.2s;
}
.cierre-pendiente-banner:hover .cpb-arrow { transform: translateX(4px); }
@keyframes cpbPulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(245,166,35,0); }
    50%      { box-shadow: inset 0 0 18px 0 rgba(245,166,35,0.18); }
}

/* ============================================================================
   TG-MASTER PATCH-15 · Banner GLOBAL de impersonación (modo espectador)
   ============================================================================ */
.impersonation-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    margin: 0;
    background: linear-gradient(90deg,
        rgba(124, 58, 237, 0.85) 0%,
        rgba(91, 33, 182, 0.85) 100%);
    border-bottom: 2px solid rgba(216, 180, 254, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    animation: ibPulse 2.4s ease-in-out infinite;
    text-decoration: none;
}
.impersonation-banner:hover {
    background: linear-gradient(90deg,
        rgba(139, 92, 246, 0.95) 0%,
        rgba(109, 40, 217, 0.95) 100%);
}
.impersonation-banner .ib-ico {
    font-size: 26px;
    flex-shrink: 0;
    animation: ibIcoFlip 3.5s ease-in-out infinite;
}
@keyframes ibIcoFlip {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-8deg); }
    75%      { transform: rotate(8deg); }
}
.impersonation-banner .ib-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.impersonation-banner .ib-txt b { font-weight: 900; letter-spacing: 1px; }
.impersonation-banner .ib-sub { font-size: 11px; opacity: 0.92; font-weight: 500; }
.impersonation-banner .ib-btn {
    background: rgba(255,255,255,0.18);
    padding: 7px 13px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.30);
    transition: all 0.18s;
    flex-shrink: 0;
}
.impersonation-banner:hover .ib-btn {
    background: rgba(255,255,255,0.28);
    transform: scale(1.02);
}
@keyframes ibPulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(216,180,254,0); }
    50%      { box-shadow: inset 0 -2px 14px 0 rgba(216,180,254,0.35); }
}

/* ============================================================================ */
/*  TG-MASTER PATCH-22 - Manolin Pro FAB (botón flotante)                       */
/* ============================================================================ */
.mp-fab {
    position: fixed; bottom: 90px; right: 24px;
    width: 64px; height: 64px;
    background: radial-gradient(circle at 35% 30%, #fbbf24 0%, #d97706 60%, #1a1a2e 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; cursor: pointer;
    z-index: 9000;
    box-shadow: 0 4px 18px rgba(168,85,247,0.50), 0 0 0 3px rgba(251,191,36,0.20);
    transition: all 0.25s ease;
    overflow: visible;
}
.mp-fab:hover {
    transform: scale(1.10) translateY(-2px);
    box-shadow: 0 8px 28px rgba(168,85,247,0.70), 0 0 0 4px rgba(251,191,36,0.35);
}
.mp-fab-emoji {
    font-size: 30px; z-index: 2; position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.40));
}
.mp-fab-aura {
    position: absolute; inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(168,85,247,0.50), transparent, rgba(251,191,36,0.40), transparent);
    animation: mp-fab-spin 4s linear infinite;
    z-index: 1; opacity: 0.7;
}
@keyframes mp-fab-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    .mp-fab { bottom: 75px; right: 18px; width: 54px; height: 54px; }
    .mp-fab-emoji { font-size: 24px; }
}

/* TG-MASTER PATCH-22 - Manolin Pro entry en sidebar (efecto premium) */
.nav-mp {
    position: relative;
    background: linear-gradient(90deg, rgba(168,85,247,0.10), rgba(251,191,36,0.06)) !important;
}
.nav-mp::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1px solid rgba(168,85,247,0.25);
    pointer-events: none;
}
.nav-mp .nl-ico {
    filter: drop-shadow(0 0 6px rgba(168,85,247,0.50));
}
.nav-mp .nl-txt {
    background: linear-gradient(90deg, #fbbf24, #d8b4fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
}
.nav-mp:hover {
    background: linear-gradient(90deg, rgba(168,85,247,0.18), rgba(251,191,36,0.10)) !important;
}

/* TG-MASTER PATCH-24 - Badge alertas pendientes en sidebar Manolin Pro */
.nav-mp-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 8px rgba(239,68,68,0.50);
    animation: nav-mp-badge-pulse 2s ease-in-out infinite;
}
@keyframes nav-mp-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.10); }
}
