/* ══════════════════════════════════════════════════════════════
   GIANPRE · LIQUID GLASS (estilo iOS 26)
   Material de cristal, barra flotante, menú "más", dock móvil
   y capa de cristal sobre tarjetas, campos y modales del sistema.
   ══════════════════════════════════════════════════════════════ */

:root {
    --lg-tint:        rgba(255, 255, 255, 0.22);
    --lg-tint-strong: rgba(255, 255, 255, 0.58);
    --lg-edge:        rgba(255, 255, 255, 0.55);
    --lg-edge-soft:   rgba(255, 255, 255, 0.18);
    --lg-shadow:      0 10px 40px -8px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.06);
    --lg-blur:        blur(22px) saturate(190%) brightness(1.06);
    --lg-ink:         #0F172A;
    --lg-ink-soft:    rgba(15, 23, 42, 0.62);
    --lg-red:         #E11D48;
    --lg-red-glass:   rgba(225, 29, 72, 0.78);
    --lg-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
    --lg-ease:        cubic-bezier(0.22, 1, 0.36, 1);
    --lg-radius-pill: 999px;
}

/* ───────────── Material base ───────────── */
.lg {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(120% 140% at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,0.35), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.12));
    -webkit-backdrop-filter: var(--lg-blur);
            backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-edge-soft);
    box-shadow:
        inset 0 1px 0.5px rgba(255,255,255,0.9),      /* brillo superior */
        inset 0 -1px 0.5px rgba(255,255,255,0.25),    /* rebote inferior */
        inset 0 0 22px rgba(255,255,255,0.20),        /* volumen interno */
        var(--lg-shadow);
}
/* Borde especular (lente) */
.lg::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.95) 0%,
        rgba(255,255,255,0.15) 30%,
        rgba(255,255,255,0.05) 55%,
        rgba(255,255,255,0.65) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.lg--tint {
    background:
        radial-gradient(120% 140% at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,0.35), transparent 55%),
        linear-gradient(180deg, rgba(244,63,94,0.88), rgba(225,29,72,0.80));
    color: #fff;
    box-shadow:
        inset 0 1px 0.5px rgba(255,255,255,0.7),
        inset 0 -1px 0.5px rgba(255,255,255,0.2),
        inset 0 0 18px rgba(255,255,255,0.18),
        0 10px 30px -6px rgba(225,29,72,0.55);
}

/* ───────────── Fondo vivo del panel ───────────── */
body.gp-app { background: #EEF1F6; }
#mainContent { position: relative; background: transparent !important; }
#mainContent::before {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: -1;
    background:
        radial-gradient(38% 42% at 12% 18%, rgba(251,113,133,0.55), transparent 70%),
        radial-gradient(34% 40% at 88% 12%, rgba(129,140,248,0.50), transparent 70%),
        radial-gradient(40% 45% at 80% 85%, rgba(45,212,191,0.38), transparent 70%),
        radial-gradient(36% 40% at 18% 90%, rgba(251,191,36,0.32), transparent 70%),
        linear-gradient(160deg, #F8FAFC, #EEF2F7 50%, #F5F3FF);
    filter: blur(10px);
    animation: lg-drift 28s ease-in-out infinite alternate;
}
@keyframes lg-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-2%, 1.5%, 0) scale(1.04); }
    100% { transform: translate3d(1.5%, -1%, 0) scale(1.02); }
}

/* ══════════════ BARRA SUPERIOR FLOTANTE ══════════════ */
.lg-topbar {
    position: sticky;
    top: 12px;
    z-index: 100;
    padding: 0 16px;
    margin-top: 12px;
}
.lg-bar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 14px;
    border-radius: 26px;
    transition: padding .4s var(--lg-ease), border-radius .4s var(--lg-ease);
}
.lg-topbar.is-scrolled .lg-bar { padding-top: 6px; padding-bottom: 6px; }

.lg-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
.lg-brand img { height: 26px; width: auto; object-fit: contain; }
.lg-brand-mark {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 11px;
    font-weight: 900; font-size: 14px; color: #fff;
    background: linear-gradient(160deg, #FB7185, #E11D48 55%, #9F1239);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 14px -4px rgba(225,29,72,0.6);
}
.lg-brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.lg-brand-text strong {
    font-size: 13px; font-weight: 800; letter-spacing: -0.02em; color: var(--lg-ink);
    white-space: nowrap;
}
.lg-brand-text strong em { font-style: normal; color: var(--lg-red); }
.lg-brand-text small {
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--lg-ink-soft);
}

/* Grupo de acciones (cápsula interior) */
.lg-actions {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: var(--lg-radius-pill);
    background: rgba(255,255,255,0.28);
    box-shadow: inset 0 1px 1px rgba(15,23,42,0.06), inset 0 -1px 0 rgba(255,255,255,0.6);
}
.lg-trailing { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Botón de cristal */
.lg-btn {
    isolation: isolate;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--lg-radius-pill);
    background: transparent;
    color: var(--lg-ink);
    font: 700 12.5px/1 'Plus Jakarta Sans', system-ui, sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .35s var(--lg-spring), background .25s, color .25s;
    -webkit-tap-highlight-color: transparent;
}
.lg-btn i { font-size: 13px; color: var(--lg-ink-soft); transition: color .25s; }
/* Gota de cristal que aparece bajo el botón */
.lg-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
    box-shadow: inset 0 1px 0 #fff, 0 4px 14px -4px rgba(15,23,42,0.25);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity .25s, transform .45s var(--lg-spring);
    z-index: -1;
}
.lg-btn:hover::after, .lg-btn:focus-visible::after { opacity: 1; transform: scale(1); }
.lg-btn:hover i { color: var(--lg-red); }
.lg-btn:active { transform: scale(0.93); }
.lg-btn:focus-visible { outline: 2px solid rgba(225,29,72,0.45); outline-offset: 2px; }

.lg-btn.lg--tint {
    background:
        radial-gradient(120% 140% at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,0.35), transparent 55%),
        linear-gradient(180deg, rgba(244,63,94,0.92), rgba(225,29,72,0.85));
}
.lg-btn--tint { color: #fff; padding: 0 16px; }
.lg-btn--tint i { color: rgba(255,255,255,0.9); }
.lg-btn--tint::after { opacity: 0; }
.lg-btn--tint:hover i { color: #fff; }
.lg-btn--tint:hover { filter: brightness(1.06); }

.lg-chip {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 13px;
    border: 0; border-radius: var(--lg-radius-pill);
    background: rgba(255,255,255,0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 0 0 1px rgba(15,23,42,0.05);
    color: var(--lg-ink);
    font: 800 11.5px/1 'Plus Jakarta Sans', system-ui, sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform .35s var(--lg-spring), background .2s;
}
.lg-chip i { color: #6366F1; }
.lg-chip:hover { background: rgba(255,255,255,0.7); }
.lg-chip:active { transform: scale(0.93); }

.lg-icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 0 0 1px rgba(15,23,42,0.05);
    color: var(--lg-ink);
    font-size: 15px;
    cursor: pointer;
    transition: transform .35s var(--lg-spring), background .2s;
}
.lg-icon:hover { background: rgba(255,255,255,0.75); }
.lg-icon:active { transform: scale(0.9); }
.lg-icon[aria-expanded="true"] { background: var(--lg-ink); color: #fff; }

/* ══════════════ MENÚ "MÁS" (popover de cristal) ══════════════ */
.lg-menu {
    position: absolute;
    right: max(16px, calc((100vw - 1400px) / 2 + 16px));
    top: calc(100% + 10px);
    width: 280px;
    padding: 8px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.55));
    transform-origin: top right;
    animation: lg-pop .42s var(--lg-spring);
}
.lg-menu[hidden] { display: none; }
@keyframes lg-pop {
    from { opacity: 0; transform: scale(0.6) translateY(-12px); filter: blur(6px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);     filter: blur(0); }
}
.lg-menu-label {
    padding: 10px 12px 6px;
    font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--lg-ink-soft);
}
.lg-menu-item {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border: 0; border-radius: 14px;
    background: transparent;
    color: var(--lg-ink);
    font: 700 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background .2s, transform .3s var(--lg-spring);
}
.lg-menu-item:hover, .lg-menu-item:focus-visible { background: rgba(255,255,255,0.75); outline: none; }
.lg-menu-item:active { transform: scale(0.97); }
.lg-menu-item .lg-mi-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 10px;
    color: #fff; font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.lg-menu-item small { display: block; font-size: 10.5px; font-weight: 600; color: var(--lg-ink-soft); margin-top: 2px; }
.lg-menu-sep { height: 1px; margin: 6px 10px; background: rgba(15,23,42,0.08); }
.lg-menu-item--danger { color: #BE123C; }

/* ══════════════ DOCK INFERIOR (móvil, estilo tab bar iOS 26) ══════════════ */
.lg-dock { display: none; }

@media (max-width: 1023px) {
    .lg-actions, .lg-trailing .lg-btn--tint { display: none; }
    .lg-bar { justify-content: space-between; }

    .lg-dock {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 12px; right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 950;
        transition: transform .45s var(--lg-ease);
    }
    .lg-dock-bar {
        flex: 1;
        display: flex;
        justify-content: space-around;
        padding: 6px;
        border-radius: 30px;
        transition: padding .4s var(--lg-ease);
    }
    .lg-tab {
        isolation: isolate;
        position: relative;
        flex: 1;
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        padding: 8px 2px 7px;
        border: 0; border-radius: 22px;
        background: transparent;
        color: var(--lg-ink);
        font: 700 10px/1 'Plus Jakarta Sans', system-ui, sans-serif;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: transform .35s var(--lg-spring);
    }
    .lg-tab i { font-size: 17px; color: var(--lg-ink); transition: font-size .3s var(--lg-ease); }
    .lg-tab span { transition: opacity .25s, max-height .3s; max-height: 14px; overflow: hidden; }
    .lg-tab::after {
        content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
        background: rgba(255,255,255,0.75);
        box-shadow: inset 0 1px 0 #fff, 0 4px 12px -4px rgba(15,23,42,0.25);
        opacity: 0; transform: scale(0.6);
        transition: opacity .2s, transform .45s var(--lg-spring);
    }
    .lg-tab:active { transform: scale(0.9); }
    .lg-tab:active::after, .lg-tab.is-pressed::after { opacity: 1; transform: scale(1.06); }
    .lg-tab:active i { color: var(--lg-red); }

    .lg-dock-fab {
        width: 62px; height: 62px; flex-shrink: 0;
        display: grid; place-items: center;
        border: 0; border-radius: 50%;
        font-size: 21px;
        cursor: pointer;
        transition: transform .4s var(--lg-spring), width .4s var(--lg-ease), height .4s var(--lg-ease);
    }
    .lg-dock-fab:active { transform: scale(0.88); }

    /* Minimizado al hacer scroll hacia abajo */
    .lg-dock.is-compact .lg-dock-bar { padding: 3px 6px; }
    .lg-dock.is-compact .lg-tab { padding: 9px 2px; }
    .lg-dock.is-compact .lg-tab span { opacity: 0; max-height: 0; }
    .lg-dock.is-compact .lg-tab i { font-size: 16px; }
    .lg-dock.is-compact .lg-dock-fab { width: 50px; height: 50px; font-size: 18px; }

    /* Espacio para que el dock no tape contenido ni botones flotantes */
    body.gp-app #mainContent { padding-bottom: 110px; }
    body.gp-app .whatsapp-float { bottom: 104px !important; right: 16px !important; width: 54px !important; height: 54px !important; font-size: 26px !important; }
    body.gp-app .gia-float      { bottom: 168px !important; right: 16px !important; width: 54px !important; height: 54px !important; font-size: 22px !important; }
    body.gp-app #gia-chat-window { bottom: 232px !important; right: 12px !important; left: 12px; width: auto !important; height: min(460px, 55vh) !important; }
    body.gp-app #saveIndicator  { bottom: 104px !important; left: 16px !important; }

    .lg-menu { right: 16px; width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 420px) {
    .lg-brand-text small { display: none; }
    .lg-brand img { display: none; }
}

/* ══════════════ CAPA DE CRISTAL SOBRE EL PANEL ══════════════ */
#mainContent .card-premium {
    background: rgba(255,255,255,0.58);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
            backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 30px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.95),
        inset 0 0 0 1px rgba(255,255,255,0.25),
        0 12px 40px -12px rgba(15,23,42,0.18);
}
#mainContent .card-premium:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 18px 48px -14px rgba(15,23,42,0.22); }

/* Tarjeta roja del multiplicador → cristal tintado */
#mainContent .card-premium.bg-red-600 {
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,0.28), transparent 50%),
        linear-gradient(160deg, rgba(244,63,94,0.90), rgba(190,18,60,0.88)) !important;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 18px 44px -14px rgba(225,29,72,0.55) !important;
}

/* Panel de totales oscuro → cristal ahumado */
#mainContent .bg-slate-900.rounded-\[32px\] {
    background:
        radial-gradient(100% 120% at 100% 0%, rgba(225,29,72,0.25), transparent 55%),
        linear-gradient(160deg, rgba(15,23,42,0.92), rgba(30,41,59,0.88)) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%);
            backdrop-filter: blur(20px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 20px 50px -18px rgba(15,23,42,0.6);
}

/* Campos de texto */
#mainContent .input-premium,
.lg-modal .input-premium {
    background: rgba(255,255,255,0.55) !important;
    border: 1px solid rgba(15,23,42,0.07) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.05);
}
#mainContent .input-premium:focus,
.lg-modal .input-premium:focus {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(225,29,72,0.55) !important;
    box-shadow: 0 0 0 4px rgba(225,29,72,0.12);
}

/* Evita que los inputs ensanchen las columnas del grid en móvil */
#mainContent .grid > * { min-width: 0; }
@media (max-width: 639px) {
    #mainContent > .container { padding-left: 12px; padding-right: 12px; }
    #mainContent .card-premium.p-8, #mainContent .card-premium.p-10 { padding: 20px; border-radius: 26px; }
}

/* Tabla de conceptos */
#mainContent table thead tr { border-color: rgba(15,23,42,0.06) !important; }

/* Interruptor estilo iOS */
.switch { width: 52px; height: 30px; }
.slider { border-radius: 30px; background-color: rgba(255,255,255,0.25); box-shadow: inset 0 1px 2px rgba(0,0,0,0.15); }
.slider:before {
    height: 26px; width: 26px; left: 2px; bottom: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform .45s var(--lg-spring), width .2s;
}
input:checked + .slider { background-color: #34C759; }
input:checked + .slider:before { transform: translateX(22px); }

/* Autocompletados */
.autocomplete-items, .vin-autocomplete-items {
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
            backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    margin-top: 6px;
    box-shadow: 0 16px 40px -12px rgba(15,23,42,0.3);
}

/* ══════════════ MÓDULOS EXTRAS (tiles de cristal) ══════════════ */
.lg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 28px; }
.lg-tile {
    isolation: isolate;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.5);
    box-shadow: inset 0 1px 0 #fff, 0 10px 30px -14px rgba(15,23,42,0.25);
    text-align: left;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    cursor: pointer;
    transition: transform .45s var(--lg-spring), box-shadow .3s;
}
.lg-tile::before {
    content: ""; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, var(--tile-glow, rgba(225,29,72,0.35)), transparent 70%);
    z-index: -1;
    pointer-events: none;
}
.lg-tile:hover { transform: translateY(-4px) scale(1.01); box-shadow: inset 0 1px 0 #fff, 0 22px 44px -16px rgba(15,23,42,0.32); }
.lg-tile:active { transform: scale(0.97); }
.lg-tile-icon {
    width: 46px; height: 46px; margin-bottom: 16px;
    display: grid; place-items: center;
    border-radius: 15px; color: #fff; font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 8px 18px -6px var(--tile-shadow, rgba(225,29,72,0.55));
}
.lg-tile-title { font-size: 15px; font-weight: 800; color: var(--lg-ink); letter-spacing: -0.01em; margin-bottom: 6px; }
.lg-tile-text  { font-size: 12px; font-weight: 600; color: var(--lg-ink-soft); line-height: 1.5; }
.lg-tile-cta {
    margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.7); box-shadow: inset 0 1px 0 #fff;
    font-size: 10.5px; font-weight: 800; color: var(--lg-ink); letter-spacing: 0.02em;
}
.lg-tile--soon { cursor: default; border-style: dashed; border-color: rgba(15,23,42,0.12); background: rgba(255,255,255,0.28); }
.lg-tile--soon:hover { transform: none; }
.lg-tile--soon .lg-tile-title, .lg-tile--soon .lg-tile-text { opacity: 0.55; }

/* ══════════════ MODALES ══════════════ */
#productInfoModal, #clientesModal, #confirmPreModal, #monedaModal, #equilibrioModal, #modalPreview {
    background: rgba(15, 23, 42, 0.38) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
            backdrop-filter: blur(18px) saturate(140%) !important;
}
.lg-modal > div {
    background: rgba(255,255,255,0.84) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%);
            backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid rgba(255,255,255,0.85) !important;
    border-top: 1px solid rgba(255,255,255,0.95) !important;
    border-radius: 32px !important;
    box-shadow: inset 0 1px 0 #fff, 0 40px 90px -20px rgba(15,23,42,0.5) !important;
    animation: lg-sheet .5s var(--lg-spring);
}
#monedaModal > div > div:first-child { background: rgba(255,255,255,0.7) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
@keyframes lg-sheet {
    from { opacity: 0; transform: translateY(24px) scale(0.94); }
    to   { opacity: 1; transform: none; }
}
#modalPreview > div { border: 1px solid rgba(255,255,255,0.4) !important; border-radius: 32px !important; }
#modalPreview > div > div:first-child { background: rgba(15,23,42,0.88) !important; }

/* ══════════════ FLOTANTES ══════════════ */
body.gp-app .whatsapp-float,
body.gp-app .gia-float {
    border-radius: 50%;
    -webkit-backdrop-filter: blur(16px) saturate(180%);
            backdrop-filter: blur(16px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 0 14px rgba(255,255,255,0.18), 0 12px 30px -8px rgba(15,23,42,0.4);
}
body.gp-app .whatsapp-float { background: rgba(37,211,102,0.85); }
body.gp-app .gia-float { background: rgba(15,23,42,0.78); border: 1px solid rgba(255,255,255,0.25); }
body.gp-app .gia-float:hover { background: rgba(225,29,72,0.85); }
body.gp-app #gia-chat-window {
    background: rgba(255,255,255,0.8);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
            backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: 28px;
    box-shadow: inset 0 1px 0 #fff, 0 30px 70px -20px rgba(15,23,42,0.45);
}
body.gp-app .gia-header { background: rgba(15,23,42,0.88); }
body.gp-app .msg-gia { background: rgba(241,245,249,0.85); }
#saveIndicator {
    background: rgba(15,23,42,0.75);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
            backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 10px 18px;
}

/* ══════════════ LANDING: barra superior en cápsula ══════════════ */
#landingPage .glass-nav {
    top: 12px !important;
    left: 50%;
    width: calc(100% - 24px) !important;
    max-width: 1320px;
    transform: translateX(-50%);
    padding-top: 10px !important; padding-bottom: 10px !important;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.4));
    -webkit-backdrop-filter: blur(22px) saturate(190%);
            backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: inset 0 1px 0 #fff, 0 12px 40px -14px rgba(15,23,42,0.25);
}
#landingPage .glass-nav > .container { padding-left: 14px; padding-right: 10px; }

/* ══════════════ ACCESIBILIDAD / RESPALDO ══════════════ */
@media (prefers-reduced-motion: reduce) {
    #mainContent::before { animation: none; }
    .lg-menu, .lg-modal > div { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .lg, .lg-menu, #mainContent .card-premium, .lg-modal > div, .lg-tile {
        background: #fff !important;
        -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    }
    .lg--tint { background: var(--lg-red) !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .lg, .lg-menu { background: rgba(255,255,255,0.94); }
    .lg--tint { background: var(--lg-red); }
    #mainContent .card-premium { background: rgba(255,255,255,0.95); }
}

/* ══════════════════════════════════════════════════════════════
   ESCALA DE BORDES — todo más redondeado (estilo iOS 26)
   min(px, %) mantiene los íconos pequeños como "squircles"
   y no los convierte en círculos.
   ══════════════════════════════════════════════════════════════ */
.rounded-md   { border-radius: min(12px, 30%) !important; }
.rounded-lg   { border-radius: min(16px, 32%) !important; }
.rounded-xl   { border-radius: min(20px, 32%) !important; }
.rounded-2xl  { border-radius: min(26px, 32%) !important; }
.rounded-3xl  { border-radius: min(34px, 30%) !important; }
.rounded-\[32px\] { border-radius: 44px !important; }
.rounded-\[40px\] { border-radius: 48px !important; }

/* Radios escritos en línea (modales, botones de módulos, JS) */
[style*="border-radius:6px"]  { border-radius: 10px !important; }
[style*="border-radius:8px"]  { border-radius: 12px !important; }
[style*="border-radius:10px"] { border-radius: 14px !important; }
[style*="border-radius:12px"] { border-radius: 18px !important; }
[style*="border-radius:14px"] { border-radius: 20px !important; }
[style*="border-radius:16px"] { border-radius: 22px !important; }
[style*="border-radius:20px"] { border-radius: 28px !important; }

/* Componentes */
.card-premium                { border-radius: 36px; }
#mainContent .card-premium   { border-radius: 38px; }
.input-premium, #mainContent .input-premium, .lg-modal .input-premium { border-radius: 18px !important; }
.btn-brand                   { border-radius: 999px; }
.lg-bar                      { border-radius: 999px; padding-left: 10px; }
.lg-brand-mark               { border-radius: 50%; }
.lg-menu                     { border-radius: 30px; }
.lg-menu-item                { border-radius: 20px; }
.lg-menu-item .lg-mi-icon    { border-radius: 12px; }
.lg-tile                     { border-radius: 34px; }
.lg-tile-icon                { border-radius: 18px; }
.autocomplete-items, .vin-autocomplete-items { border-radius: 22px; }
.pi-option                   { border-radius: 18px; }
.lg-modal > div              { border-radius: 44px !important; }
#monedaModal > div > div:first-child { border-radius: 44px 44px 0 0 !important; }
#modalPreview > div          { border-radius: 44px !important; }
body.gp-app #gia-chat-window { border-radius: 36px; }
.msg                         { border-radius: 20px; }
.msg-gia                     { border-bottom-left-radius: 6px; }
.msg-user                    { border-bottom-right-radius: 6px; }
.whatsapp-float, .gia-float  { border-radius: 50%; }
#terms-toast                 { border-radius: 999px; border-left: 0; }
#btn-accept-terms, #btn-reject-terms { border-radius: 999px; }
@media (max-width: 1023px) {
    .lg-dock-bar { border-radius: 999px; }
    .lg-tab      { border-radius: 999px; }
}
@media (max-width: 639px) {
    #mainContent .card-premium.p-8, #mainContent .card-premium.p-10 { border-radius: 32px; }
}

/* ══════════════ NUBE / CUENTA / AVISO ══════════════ */
.lg-sync i { color: #64748B; }
.lg-sync.is-ok i      { color: #10B981; }
.lg-sync.is-syncing i { color: #0EA5E9; }
.lg-sync.is-off i     { color: #F59E0B; }
.lg-sync.is-err i     { color: #E11D48; }
.lg-sync.is-err       { background: rgba(254,226,226,0.7); }
@media (max-width: 1279px) { .lg-sync [data-sync-text] { display: none; } .lg-sync { padding: 0 12px; } }

.lg-account {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px 12px;
}
.lg-account-avatar {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-size: 14px;
    background: linear-gradient(160deg, #FB7185, #E11D48 60%, #9F1239);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.lg-account-text { display: flex; flex-direction: column; min-width: 0; }
.lg-account-text small { font-size: 10px; font-weight: 700; color: var(--lg-ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.lg-account-text strong { font-size: 13px; font-weight: 800; color: var(--lg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lg-toast {
    position: fixed; left: 50%; top: 86px; z-index: 6500;
    max-width: min(520px, calc(100vw - 32px));
    padding: 12px 20px; border-radius: 999px;
    background: rgba(15,23,42,0.82); color: #fff;
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 40px -12px rgba(15,23,42,0.5);
    font: 700 12.5px/1.4 'Plus Jakarta Sans', system-ui, sans-serif; text-align: center;
    opacity: 0; transform: translate(-50%, -12px) scale(.96); pointer-events: none;
    transition: opacity .3s, transform .45s var(--lg-spring);
}
.lg-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ══════════════════════════════════════════════════════
   PLANES — candado en funciones no incluidas + ventana "Mi plan"
   ══════════════════════════════════════════════════════ */
.gp-locked:not(#gia-toggle) { position: relative; }
.gp-locked::after {
    content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 8px;
    background: #0F172A; color: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.3); pointer-events: none;
}
.lg-menu-item.gp-locked::after { top: 50%; transform: translateY(-50%); right: 12px; }
.lg-tile.gp-locked .lg-tile-icon, .lg-menu-item.gp-locked .lg-mi-icon { filter: grayscale(1); opacity: .55; }
.lg-tile.gp-locked .lg-tile-cta::before { content: attr(data-plan-need); }

.gp-plan-modal {
    position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center;
    padding: 16px; background: rgba(15,23,42,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gp-plan-modal.show { display: flex; }
.gp-plan-card {
    position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
    background: #fff; border-radius: 28px; padding: 28px 24px 22px; color: #0F172A;
    box-shadow: 0 30px 80px -20px rgba(15,23,42,.5); font-family: 'Plus Jakarta Sans', sans-serif;
}
.gp-plan-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: none; background: #F1F5F9; color: #64748b; cursor: pointer; }
.gp-plan-eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #E11D48; }
.gp-plan-card h3 { margin: 8px 40px 8px 0; font-size: 20px; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; }
.gp-plan-card p { margin: 0 0 16px; font-size: 13px; color: #475569; line-height: 1.5; }
.gp-plan-list-title { font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #94A3B8; margin-bottom: 8px; }
.gp-plan-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.gp-plan-list li { display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; }
.gp-plan-list li > i { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; background: #DCFCE7; color: #16A34A; flex-shrink: 0; }
.gp-plan-list li.is-off { color: #94A3B8; }
.gp-plan-list li.is-off > i { background: #F1F5F9; color: #94A3B8; }
.gp-plan-list li span i { width: 16px; color: #94A3B8; margin-right: 2px; }
.gp-plan-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gp-plan-actions .btn-brand { flex: 2; justify-content: center; text-decoration: none; padding: 14px 18px; font-size: 11px; border-radius: 14px; }
.gp-plan-ghost { flex: 1; background: #F1F5F9; color: #64748b; border: none; border-radius: 14px; padding: 14px; font-weight: 900; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }

/* Soporte dentro de "Mi plan" */
.gp-plan-support, .gpm-support {
    display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 16px;
    background: #F8FAFC; border: 1px solid #E2E8F0; color: #0F172A; text-decoration: none;
}
.gp-plan-support > i:first-child { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #DCFCE7; color: #16A34A; flex-shrink: 0; }
.gp-plan-support span, .gpm-support span:not(.gpm-av) { flex: 1; min-width: 0; }
.gp-plan-support b, .gpm-support b { display: block; font-size: 13px; font-weight: 800; }
.gp-plan-support small, .gpm-support small { display: block; font-size: 11px; color: #64748b; font-weight: 600; }
.gp-plan-support > i:last-child, .gpm-support > i:last-child { color: #94A3B8; font-size: 12px; }

/* ══════════ PANEL MASTER ══════════ */
.gp-master { max-width: 560px; }
.gpm-tabs { display: flex; gap: 4px; background: #F1F5F9; border-radius: 14px; padding: 4px; margin: 4px 0 16px; }
.gpm-tabs button { flex: 1; border: none; background: transparent; border-radius: 10px; padding: 9px 6px; font-size: 12px; font-weight: 800; color: #64748b; cursor: pointer; }
.gpm-tabs button.on { background: #fff; color: #0F172A; box-shadow: 0 2px 8px -2px rgba(15,23,42,.18); }
.gpm-input { width: 100%; padding: 11px 13px; border: 1.5px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; font: inherit; font-size: 14px; color: #0F172A; outline: none; }
.gpm-input:focus { border-color: #E11D48; background: #fff; }
.gpm-btn-sm { border: none; background: #0F172A; color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.gpm-btn-sm:disabled, .gpm-cta:disabled { opacity: .6; }
.gpm-team-name form { display: flex; gap: 8px; }
.gpm-team-name b { display: block; font-size: 15px; font-weight: 800; }
.gpm-team-name small { font-size: 12px; color: #64748b; }
.gpm-count { margin: 14px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94A3B8; }
.gpm-count b { color: #0F172A; }
.gpm-members { display: grid; gap: 8px; }
.gpm-member { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #F8FAFC; }
.gpm-av { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: #E2E8F0; color: #475569; flex-shrink: 0; font-size: 14px; }
.gpm-mi { flex: 1; min-width: 0; }
.gpm-mi b { display: block; font-size: 14px; font-weight: 800; }
.gpm-mi small { display: block; font-size: 11px; color: #64748b; font-weight: 600; overflow-wrap: anywhere; margin-top: 2px; }
.gpm-suc { padding: 7px 10px; font-weight: 800; background: #fff; }
.gpm-icon { width: 34px; height: 34px; border-radius: 10px; border: none; background: transparent; color: #94A3B8; cursor: pointer; flex-shrink: 0; }
.gpm-icon:hover { background: #FFF1F2; color: #E11D48; }
.gpm-add { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #F1F5F9; }
.gpm-sub { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94A3B8; }
.gpm-cta { justify-content: center; padding: 13px; font-size: 11px; border-radius: 14px; border: none; cursor: pointer; }
.gpm-hint { font-size: 11px; color: #64748b; line-height: 1.5; margin: 6px 0 0; }
.gpm-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.gpm-btn { padding: 10px 16px; font-size: 11px; border-radius: 12px; border: none; cursor: pointer; white-space: nowrap; }
.gpm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.gpm-kpis div { background: #F8FAFC; border-radius: 14px; padding: 12px; min-width: 0; }
.gpm-kpis b { display: block; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gpm-kpis span { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94A3B8; }
.gpm-rows { display: grid; gap: 12px; }
.gpm-row-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.gpm-row-h span { font-weight: 800; font-variant-numeric: tabular-nums; }
.gpm-track { height: 8px; border-radius: 99px; background: #F1F5F9; margin: 6px 0 4px; overflow: hidden; }
.gpm-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FB7185, #E11D48); }
.gpm-row small { font-size: 11px; color: #64748b; font-weight: 600; }
.gpm-clientes { display: grid; gap: 6px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.gpm-cli { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #F8FAFC; }
.gpm-cli > div { flex: 1; min-width: 0; }
.gpm-cli b { display: block; font-size: 13px; font-weight: 800; }
.gpm-cli small { display: block; font-size: 11px; color: #64748b; overflow-wrap: anywhere; }
.gpm-suc-tag { color: #E11D48 !important; font-weight: 700; }
.gpm-empty { padding: 24px 8px; text-align: center; font-size: 13px; color: #64748b; }
