/* ============================================================================
   TRRANU · app.css · hoja principal (login, app, registro, ventas, crónico, responsive)
   ----------------------------------------------------------------------------
   Extraído de default.php SIN modificar una sola regla. Se carga desde el
   <head> con <link>. EL ORDEN IMPORTA y es:
        app.css  ->  admin.css  ->  modales.css
   Motivo: existen dos @keyframes llamados 'pulse' con cuerpos distintos (uno
   en app.css y otro en modales.css). El del final es el que debe ganar, tal
   como ocurría cuando todo estaba dentro de default.php. Si inviertes el
   orden de los <link>, las animaciones cambian de aspecto.
   ============================================================================ */

        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800;900&display=swap');
        @import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');
        * { box-sizing: border-box; margin: 0; padding: 0; }

        /* ===== LOGIN ===== */
        /* ============================================================
           LOGIN — ahora también en V3.
           Antes era el único fondo OSCURO de toda la web (el degradado azul marino con la
           rejilla al 4%). Se pasa al fondo único porque el criterio es "un solo fondo para todo".
           Si algún día quieres recuperar el oscuro, es SOLO esta regla: se restaura el
           radial-gradient de abajo y listo. El resto de la web no se entera.
              background:radial-gradient(ellipse at top,#1e293b 0%,#0f172a 60%,#020617 100%);
           ============================================================ */
        #loginPage {
            width:100%; min-height:100vh; display:flex; justify-content:center; align-items:center;
            /* El fondo malva se pinta AQUÍ, en la capa de contenido (no en el lienzo html/body). El
               fondo del lienzo se propaga al canvas del navegador y ESE canvas es el que el
               compositor soltaba (parpadeo a gris) con tantos backdrop-filter. En una capa de
               contenido normal es inmune a ese parpadeo. Opaco y sin 'fixed'. */
            background-color:#EDE8FC;
            background-image: var(--fondo-puntos), var(--fondo-malva);
            background-size: 16px 16px, cover;
            background-position: center center, center center;
            background-repeat: repeat, no-repeat;
            color:#0F172A; font-family:'Poppins','Segoe UI',Arial,sans-serif;
            position:relative; overflow:hidden;
        }
        /* Los halos de color latían sobre el fondo oscuro. Sobre claro ensucian: se apagan. */
        #loginPage::before { display:none; }
        /* La rejilla blanca al 4% se veía PORQUE el fondo era oscuro. Sobre claro es invisible,
           y su sitio lo ocupan ahora los puntos del fondo único. */
        #loginPage::after { display:none; }
        @keyframes bgPulse { 0% { opacity:.8; } 100% { opacity:1; } }
        .glass-card {
            position:relative; z-index:2;
            background:linear-gradient(145deg,rgba(30,41,59,0.85) 0%,rgba(15,23,42,0.92) 100%);
            backdrop-filter:blur(28px) saturate(180%); -webkit-backdrop-filter:blur(28px) saturate(180%);
            border:1px solid rgba(148,163,184,0.18); border-radius:22px;
            padding:42px 38px 32px; width:100%; max-width:400px; text-align:center;
            box-shadow:
                0 30px 70px -10px rgba(0,0,0,0.75),
                0 0 0 1px rgba(255,255,255,0.04) inset,
                0 1px 0 rgba(255,255,255,0.08) inset;
            animation:slideUp 0.6s cubic-bezier(.16,1,.3,1);
        }
        .glass-card::before {
            content:""; position:absolute; top:-1px; left:-1px; right:-1px; bottom:-1px;
            border-radius:22px; pointer-events:none;
            background:linear-gradient(135deg,rgba(99,102,241,0.5),transparent 30%,transparent 70%,rgba(139,92,246,0.5));
            -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
            mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
            -webkit-mask-composite:xor; mask-composite:exclude; padding:1px;
            opacity:.6;
        }
        @keyframes slideUp { from { opacity:0; transform:translateY(20px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
        .login-shield {
            width:64px; height:64px; margin:0 auto 18px; display:flex; align-items:center; justify-content:center;
            border-radius:18px; background:linear-gradient(135deg,#6366f1,#8b5cf6);
            box-shadow:0 14px 40px -8px rgba(99,102,241,.6),0 0 0 1px rgba(255,255,255,.1) inset;
            position:relative;
        }
        .login-shield svg { width:32px; height:32px; fill:white; filter:drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
        .login-shield::after {
            content:""; position:absolute; inset:-3px; border-radius:21px; pointer-events:none;
            background:linear-gradient(135deg,#6366f1,#8b5cf6); opacity:.4; filter:blur(12px); z-index:-1;
        }
        h2 { font-weight:600; margin:0 0 6px; letter-spacing:.4px; font-size:22px; color:#f1f5f9; }
        .glass-card p.subtitle { color:#94a3b8; font-size:13px; margin:0 0 26px; letter-spacing:.2px; }
        .input-group { text-align:left; margin-bottom:14px; }
        .input-group label { display:block; font-size:10px; text-transform:uppercase; color:#a5b4fc; font-weight:700; margin-bottom:6px; letter-spacing:1.2px; }
        .input-wrap { position:relative; }
        .input-wrap .input-icon {
            position:absolute; left:14px; top:50%; transform:translateY(-50%);
            width:18px; height:18px; pointer-events:none; opacity:.55;
        }
        .input-wrap .input-icon svg { width:100%; height:100%; stroke:#cbd5e1; fill:none; stroke-width:2; }
        select, input[type="password"], input[type="text"].login-input, .input-wrap input {
            width:100%; padding:13px 14px 13px 42px; background:rgba(15,23,42,0.55);
            border:1px solid rgba(148,163,184,0.18); border-radius:12px;
            color:#f1f5f9; caret-color:#f1f5f9; font-size:14px; margin-bottom:0;
            font-family:'Poppins',sans-serif; outline:none;
            transition:border-color .25s,box-shadow .25s,background .25s;
            box-sizing:border-box;
        }
        .input-wrap input:focus { border-color:#818cf8; background:rgba(15,23,42,0.85); box-shadow:0 0 0 3px rgba(129,140,248,.18); }
        /* Campos del login: FONDO BLANCO y texto oscuro para que SIEMPRE se lea lo que se escribe
           (usuario y contraseña), escribas normal o autocomplete el navegador. */
        .input-wrap input, .input-wrap input:focus {
            background:#ffffff !important; color:#0f172a !important;
            caret-color:#0f172a !important; -webkit-text-fill-color:#0f172a !important;
            border-color:rgba(148,163,184,0.5) !important;
        }
        .input-wrap input::placeholder { color:#94a3b8 !important; -webkit-text-fill-color:#94a3b8 !important; }
        .input-wrap .input-icon svg { stroke:#94a3b8 !important; }
        .input-wrap input:-webkit-autofill,
        .input-wrap input:-webkit-autofill:hover,
        .input-wrap input:-webkit-autofill:focus,
        .input-wrap input:-webkit-autofill:active {
            -webkit-text-fill-color:#0f172a !important;
            caret-color:#0f172a !important;
            -webkit-box-shadow:0 0 0 1000px #ffffff inset !important;
            box-shadow:0 0 0 1000px #ffffff inset !important;
            transition:background-color 9999s ease-in-out 0s;
        }
        select:focus, input[type="password"]:focus { border-color:#818cf8; }
        select option { background:#1e293b; color:white; }
        .pass-wrapper { position:relative; }
        .pass-wrapper .eye-toggle { right:14px !important; }
        .btn-main {
            width:100%; padding:14px; background:linear-gradient(135deg,#6366f1 0%,#8b5cf6 100%);
            color:white; border:none; border-radius:12px; font-size:14px; font-weight:700;
            cursor:pointer; transition:all .25s; box-shadow:0 10px 30px -6px rgba(99,102,241,.5);
            font-family:'Poppins',sans-serif; letter-spacing:1.2px; text-transform:uppercase;
            position:relative; overflow:hidden; margin-top:6px;
        }
        .btn-main::before {
            content:""; position:absolute; top:0; left:-100%; width:100%; height:100%;
            background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);
            transition:left .6s;
        }
        .btn-main:hover { transform:translateY(-1px); box-shadow:0 14px 36px -6px rgba(99,102,241,.65); }
        .btn-main:hover::before { left:100%; }
        .btn-main:active { transform:translateY(0); }
        .btn-main:disabled { background:#334155; cursor:not-allowed; box-shadow:none; transform:none; }
        .otpcell {
            width:44px; height:54px; text-align:center; font-size:23px; font-weight:800;
            font-family:'Poppins',monospace; color:#0f172a; background:#fff;
            border:2px solid #cbd5e1; border-radius:12px; outline:none; padding:0;
            transition:border-color .15s, box-shadow .15s; -moz-appearance:textfield; caret-color:#6366f1;
        }
        .otpcell::-webkit-outer-spin-button,.otpcell::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
        .otpcell:focus { border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.20); }
        .otpcell.filled { border-color:#8b5cf6; }
        @media (max-width:420px){ .otpcell{ width:40px; height:50px; font-size:21px; } #twoFaCodeBoxes{ gap:6px; } }
        #msg { margin-top:14px; font-size:13px; min-height:18px; }
        .error-msg { color:#f87171; font-weight:600; }
        .success-msg { color:#34d399; font-weight:bold; font-size:18px; }
        .secure-tag {
            display:flex; align-items:center; justify-content:center; gap:6px;
            margin-top:22px; padding-top:18px; border-top:1px solid rgba(148,163,184,.12);
            font-size:11px; color:#64748b; letter-spacing:.4px;
        }
        .secure-tag svg { width:12px; height:12px; stroke:#22c55e; fill:none; stroke-width:2.5; }
        .hidden { display:none !important; }

        /* ===== APP ===== */
        #appPage { display:none; font-family:'Poppins','Segoe UI',Arial,sans-serif; }

        /* BARRA NAV FIJA (ABAJO) */
        /* ============================================================
           BARRA FIJA — gradiente azul → verde, tono Oscuro 3.
           El blanco llega a 14.2:1 sobre este fondo (AAA de sobra): los iconos y las etiquetas
           resaltan sin necesidad de ponerle color a cada botón. Antes cada uno traía su tono y
           seis colores juntos solo hacían ruido; ahora el color lo pone el fondo, una vez.
           ============================================================ */
        #navBar {
            position:fixed; bottom:0; left:0; width:100%;
            background:linear-gradient(100deg,#082a52 0%,#06423a 100%);
            border-top:1px solid rgba(255,255,255,0.10);
            z-index:9999; display:flex; align-items:center; justify-content:center;
            padding:0 12px; height:60px; gap:2px;
            box-shadow:0 -4px 20px rgba(0,0,0,0.28);
            overflow-x:auto; overflow-y:hidden;
        }
        #navBar::-webkit-scrollbar { height:3px; }
        #navBar::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.2); border-radius:3px; }
        /* Botón de la barra: icono arriba, nombre debajo. El icono se reconoce antes que la
           palabra — con el cliente al teléfono eso se nota. */
        .nav-btn {
            padding:6px 10px; border:none !important; border-radius:10px; cursor:pointer;
            font-weight:600; color:rgba(255,255,255,0.92) !important; font-size:11px;
            letter-spacing:0.1px; transition:background .15s, transform .12s; white-space:nowrap;
            font-family:'Poppins',sans-serif; position:relative; overflow:hidden;
            flex-shrink:0; width:auto; min-width:52px; text-align:center;
            background:transparent !important; text-transform:none;
            display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
            line-height:1.15;
        }
        .nav-btn .nb-ic { display:block; width:18px; height:18px; }
        .nav-btn .nb-ic svg { width:18px; height:18px; display:block; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
        .nav-btn::before { display:none; }
        .nav-btn:hover { background:rgba(255,255,255,0.10) !important; transform:none; }
        .nav-btn:active { transform:scale(.95); }
        .nav-btn.nav-on { background:rgba(255,255,255,0.20) !important; color:#fff !important; font-weight:700; }

        /* ============================================================
           LA MANCHA GRIS DE LOS CAMPOS — corregida.
           ------------------------------------------------------------
           CAUSA: ningún campo del sistema declaraba color de fondo, y la web nunca declaró
           'color-scheme'. Cuando el navegador o el sistema están en MODO OSCURO, Chrome pinta
           los controles de formulario con SU color por defecto: gris oscuro. Por eso la casilla
           de contraseña del panel salía como una mancha gris con el texto casi invisible,
           mientras el resto de la tarjeta seguía en blanco. No era el color de ningún botón:
           era el navegador rellenando el hueco que el CSS había dejado.
           SOLUCIÓN: la web se declara en modo CLARO y todos los campos llevan su fondo blanco
           escrito. Así se ven igual en cualquier equipo, tenga el modo que tenga.
           ============================================================ */
        /* ============================================================
           FONDO ÚNICO DE TODA LA WEB  (V3)
           ------------------------------------------------------------
           EL PROBLEMA: cada sección traía su propio fondo. Nueve en total — el registro en
           índigo, Ventas en celeste, la IA en verde, el panel y la Papelera en morado, Crónico
           en azul, el Historial en gris... Cambiabas de pantalla y cambiaba el suelo. Nada
           parecía del mismo sitio.
           LA SOLUCIÓN: el fondo se define UNA vez, aquí, sobre el lienzo de la página. Todas las
           secciones pasan a ser transparentes y lo dejan pasar. Una sola verdad; si mañana hay
           que cambiar el fondo, se cambia en estas cuatro líneas y afecta a todo.
              · Degradado malva de TRES paradas: arranca casi blanco (donde está el formulario),
                se toma su tiempo en el 45% y aterriza profundo abajo. Esa parada intermedia es
                lo que evita que se vea como una transición plana.
              · Puntos de 16px en negro al 7%: se leen como grafito suave, no como trama.
              · 'fixed': el degradado cubre la pantalla, no se repite ni se estira con el scroll.
           ============================================================ */
        :root {
            color-scheme: light;
            --fondo-puntos: radial-gradient(rgba(15,23,42,.07) 1.15px, transparent 1.15px);
            --fondo-malva:  linear-gradient(160deg, #FBFAFF 0%, #EDE8FC 45%, #CFC3F2 100%);
        }
        /* ============================================================
           EL FONDO QUE SE BORRABA — corregido de raíz (v3).
           ------------------------------------------------------------
           CAUSA: el fondo se pintaba en una CAPA que el navegador promueve a una capa de
           composición propia — primero como body::before (position:fixed, z-index:-1) y luego como
           background-attachment:fixed en <html>. En ambos casos, al repintar la página (los
           backdrop-filter del menú y las tarjetas, más el refresco de cada segundo del chat y la
           presencia) el navegador SOLTABA esa capa de forma intermitente y dejaba ver el gris
           #ececec del lienzo. En el vídeo el fondo malva brincaba a gris cada uno o dos segundos.
           SOLUCIÓN (v3): el fondo lo pinta el propio <html> SIN 'fixed' ni pseudo-elementos, es
           decir en el flujo normal del lienzo. Así el fondo forma parte del propio lienzo (no es una
           capa aparte que se pueda soltar) y se queda SIEMPRE. Como no es 'fixed', se desliza junto
           con la página al hacer scroll, que es un cambio menor a cambio de eliminar el parpadeo por
           completo.
           ============================================================ */
        html {
            min-height:100vh;
            /* Base malva OPACA pintada directamente en el lienzo: aunque el degradado tardara un
               instante en un repintado, se ve malva y NUNCA el gris del lienzo. */
            background-color:#EDE8FC;
            background-image: var(--fondo-puntos), var(--fondo-malva);
            background-size: 16px 16px, cover;
            background-position: center center, center center;
            background-repeat: repeat, no-repeat;
            /* IMPORTANTE: a propósito SIN 'background-attachment:fixed'. Ese 'fixed' promovía el
               fondo a una capa de composición propia que el navegador soltaba al repintar (por los
               backdrop-filter del menú/tarjetas y el refresco de cada segundo del chat/presencia),
               y ESO era lo que lo hacía brincar a gris. Pintado en el flujo normal del lienzo, el
               fondo forma parte del propio lienzo: no se puede soltar y se queda SIEMPRE. */
        }
        /* El MISMO fondo también en <body>, opaco y sin 'fixed': así hay DOS capas pintadas en el
           flujo normal (html y body) que el compositor no puede soltar. Si una fallara, la otra
           sigue mostrando el malva; el gris del lienzo no puede aparecer por ningún lado. */
        body {
            min-height:100vh;
            background-color:#EDE8FC;
            background-image: var(--fondo-puntos), var(--fondo-malva);
            background-size: 16px 16px, cover;
            background-position: center center, center center;
            background-repeat: repeat, no-repeat;
        }
        /* Todas las secciones dejan pasar el fondo del lienzo. Incluye las páginas dinámicas que
           se creen más adelante: si llevan .section-page, heredan el fondo sin tocar nada. */
        #appPage, .section-page,
        #secMain, #secVentas, #secAdmin, #secCreator, #secScript,
        #secAIResult, #secDocForm, #secDocResult, #secAIHist,
        #secHistorial, #secBiblioteca, #secCronic, #secTrashPage,
        #secAdminScript, #secAdminCierre, #secAdminDesastre, #secBtnManager, #secBtnEdit {
            background:transparent !important;
        }
        html { color-scheme: light; }
        input, select, textarea { color-scheme: light; }
        .admin-login-card input,
        .pass-wrapper input,
        input[type="text"], input[type="password"], input[type="email"],
        input[type="number"], input[type="search"], input[type="tel"],
        input[type="date"], input[type="time"], select, textarea {
            background-color:#FFFFFF;
            color:#0F172A;
        }
        input::placeholder, textarea::placeholder { color:#94A3B8; opacity:1; }
        /* ============================================================
           SELECTORES — el desplegable feo del navegador, fuera.
           El <select> nativo trae su propio degradado, su flecha y, en modo oscuro, una lista
           negra con la fila azul del sistema. Eso era lo que se veía en los filtros del
           historial. Con appearance:none se apaga todo y se dibuja una flecha propia.
           ============================================================ */
        select {
            appearance:none; -webkit-appearance:none; -moz-appearance:none;
            background-color:#FFFFFF;
            background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
            background-repeat:no-repeat; background-position:right 11px center; background-size:14px;
            padding-right:34px !important;
            border:1px solid #DCE4F0 !important; border-radius:10px;
            color:#0F172A; font-weight:600; cursor:pointer; box-shadow:none !important;
        }
        select:focus { border-color:#14508F !important; outline:none; }
        select::-ms-expand { display:none; }
        select option { background:#FFFFFF; color:#0F172A; font-weight:500; }
        /* El autorrelleno de Chrome también pinta el campo (azul o gris según el modo).
           Este truco lo tapa con blanco sin romper el guardado de contraseñas del navegador. */
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus {
            -webkit-box-shadow:0 0 0 1000px #FFFFFF inset !important;
            -webkit-text-fill-color:#0F172A !important;
            caret-color:#0F172A;
            transition:background-color 9999s ease-in-out 0s;
        }

        /* ============================================================
           PIEL ÚNICA DE BOTONES
           ------------------------------------------------------------
           Toda la web usa el mismo criterio, el de las etiquetas del formulario:
              · relleno CLARO del color propio del botón
              · borde del MISMO color, pero INTENSO
              · letra NEGRA
           El color exacto de cada botón lo calcula _btnSkin() a partir del tono que ya tenía,
           así cada uno conserva su identidad (el rojo sigue rojo, el verde sigue verde).
           Aquí solo se apagan los efectos viejos: degradados, brillos, sombras y texto blanco.
           ============================================================ */
        .btn, .nav-btn, .btn-main, .btn-action {
            text-shadow:none !important;
            letter-spacing:.2px;
        }
        .btn:hover, .nav-btn:hover, .btn-main:hover, .btn-action:hover { filter:none !important; }
        /* ============================================================
           EL FALLO QUE DEJÓ LA BARRA EN NEGRO Y MATÓ EL GRADIENTE DE LA IA.
           ------------------------------------------------------------
           Antes esta regla decía  button[data-skin]  a secas. Parece inofensivo, pero el motor
           marcaba a los botones EXCLUIDOS con data-skin="no"... y "no" también es un valor de
           data-skin. Así que el selector los atrapaba igual y les imponía color:#111 y
           background-image:none. Consecuencias, las tres que se veían:
             · la barra fija: iconos y letras en NEGRO sobre azul marino = invisibles;
             · el botón de la IA: su gradiente de Gemini borrado por background-image:none;
             · cualquier botón excluido en el futuro habría caído en la misma trampa.
           Ahora los excluidos llevan data-skinoff, un atributo DISTINTO, y estas reglas solo
           alcanzan a los que el motor sí pintó. Un botón excluido queda de verdad excluido.
           ============================================================ */
        .btn[data-skin], button[data-skin] {
            background-image:none;
            font-weight:700;
            transition:background-color .15s, border-color .15s, transform .12s;
        }
        button[data-skin]:hover { filter:none !important; }
        button[data-skin]:active { transform:scale(.97); }
        button[data-skin]:disabled, button[data-skinoff]:disabled { opacity:.5; cursor:not-allowed; transform:none; }

        /* Los tonos propios de cada botón salen: en la barra el color lo pone el fondo, una vez. */
        .nav-btn-home, .nav-btn-script, .nav-btn-medical, .nav-btn-sep,
        .nav-btn-ventas, .nav-btn-trash, .nav-btn-admin { background:transparent !important; }

        /* El fondo malva se pinta en #appContent (capa de contenido que envuelve TODAS las secciones),
           no en el lienzo html/body: el fondo del lienzo se propaga al canvas del navegador y ese
           canvas es el que se soltaba (parpadeo a gris) con tantos backdrop-filter y el refresco de
           cada segundo. Pintado en una capa de contenido normal es inmune a ese parpadeo y además
           TAPA cualquier gris. Opaco y sin 'fixed'. Las secciones (secMain, secVentas, etc.) siguen
           transparentes y muestran ESTE fondo, así el panel de venta también queda con el malva. */
        #appContent {
            padding-top:0; padding-bottom:56px;
            min-height:100vh;
            background-color:#EDE8FC;
            background-image: var(--fondo-puntos), var(--fondo-malva);
            background-size: 16px 16px, cover;
            background-position: center center, center center;
            background-repeat: repeat, no-repeat;
        }
        .section-page { display:none !important; }
        .section-page.active { display:block !important; }
        #secScript.active { display:flex !important; }

        /* ===== SECCIÓN PRINCIPAL ===== */
        :root {
            --azul-claro:#eef2ff; --negro:#000000; --blanco:#ffffff;
            --purpura:#7c3aed; --verde:#059669; --azul-fuerte:#0284c7;
            --rojo:#dc2626; --gris-edit:#64748b; --ambar:#d97706;
        }
        #secMain {
            font-family:'Poppins','Segoe UI',Arial,sans-serif;
            background:linear-gradient(180deg,#eef2ff 0%,#e0e7ff 100%);
            color:var(--negro); min-height:calc(100vh - 56px);
        }
        .secMain-inner { display:flex; flex-direction:column; align-items:center; padding:10px; }
        .container { width:100%; max-width:650px; }
        .relative-box { position:relative; width:100%; }
        .btn-clear-x { position:absolute; top:10px; right:15px; cursor:pointer; font-weight:bold; color:#94a3b8; font-size:20px; user-select:none; z-index:10; transition:color 0.2s; }
        .btn-clear-x:hover { color:var(--rojo); }
        .notes-area {
            background:var(--blanco); border:1px solid #cbd5e1; border-radius:12px;
            width:100%; height:180px; padding:12px 35px 12px 12px;
            font-weight:600; font-size:14px; resize:none; outline:none; margin-bottom:10px;
            font-family:'Poppins',sans-serif; transition:border 0.3s;
        }
        .notes-area:focus { border-color:var(--purpura); }
        .btn-group { display:flex; gap:8px; margin-bottom:15px; flex-wrap:wrap; }
        .btn {
            flex:1; padding:12px; border:none; border-radius:10px; cursor:pointer;
            font-weight:700; color:white; transition:all 0.25s; min-width:100px;
            text-transform:uppercase; font-size:11px; font-family:'Poppins',sans-serif;
        }
        .btn:hover { transform:translateY(-1px); filter:brightness(1.1); }
        .btn:active { transform:scale(0.97); }
        .btn-copy { background:linear-gradient(135deg,#7c3aed,#a78bfa); }
        .btn-save { background:linear-gradient(135deg,#059669,#34d399); }
        .btn-view { background:linear-gradient(135deg,#475569,#64748b); }
        .btn-opt1 { background:linear-gradient(135deg,#0d9488,#2dd4bf); }
        .btn-opt2 { background:linear-gradient(135deg,#ea580c,#fb923c); }
        .btn-meds { background:linear-gradient(135deg,#7c3aed,#a78bfa); }
        .btn-pcp { background:linear-gradient(135deg,#0891b2,#22d3ee); }
        .btn-spc { background:linear-gradient(135deg,#c026d3,#e879f9); }
        .btn-clinic { background:linear-gradient(135deg,#ea580c,#fb923c); }
        .btn-hist { background:linear-gradient(135deg,#475569,#94a3b8); }
        #secAIResult,#secDocForm,#secDocResult,#secAIHist { min-height:calc(100vh - 56px); background:linear-gradient(180deg,#f0fdf4,#dcfce7); font-family:'Poppins',sans-serif; }
        .ai-wrap { max-width:850px; margin:0 auto; padding:20px 15px; }
        .ai-card { background:white; border-radius:16px; padding:25px; box-shadow:0 8px 30px rgba(0,0,0,0.08); border:1px solid #e2e8f0; }
        .ai-card h2 { color:#0f172a; margin-bottom:4px; font-size:18px; }
        .ai-subtitle { color:#64748b; font-size:12px; margin-bottom:15px; }
        .ai-body { font-size:13px; line-height:1.7; color:#000000; font-weight:500; }
        .ai-body table { width:100%; border-collapse:collapse; margin:12px 0; font-size:12px; background:#ffffff; }
        .ai-body th { background:#1e293b; color:white; padding:8px 10px; text-align:left; font-size:11px; }
        .ai-body td { padding:8px 10px; border-bottom:1px solid #e2e8f0; color:#000000; background:#ffffff; }
        .ai-body tr:hover { background:#f8fafc; }
        .ai-body strong { color:#000000; font-weight:700; }
        .ai-body h3,.ai-body h4 { color:#000000; margin:14px 0 6px; font-size:14px; }
        /* Tabla de MEDICAMENTO (solo): etiquetas en UNA sola línea, columna de valor toma el resto.
           Esto evita que "Tier Medicare" o "Restricciones" se partan en varias líneas (se veía desordenado). */
        .med-result table { border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
        .med-result table td:first-child { white-space:nowrap; width:1%; font-weight:600; color:#475569; }
        .med-result table td { vertical-align:top; line-height:1.55; }
        .med-result table tr:last-child td { border-bottom:none; }
        /* Carga elegante: barra con efecto "shimmer" mientras llega "para qué sirve" y el tier. */
        .med-skel { display:inline-block; width:60%; min-width:90px; max-width:260px; height:13px; border-radius:7px; background:linear-gradient(90deg,#e9eef5 25%,#f6f9fc 50%,#e9eef5 75%); background-size:200% 100%; animation:medShimmer 1.1s ease-in-out infinite; vertical-align:middle; }
        @keyframes medShimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
        /* Encabezado de la tabla de COMPARACIÓN: claro y legible. Antes era azul muy oscuro y, al forzar
           el texto a negro, los nombres de los planes quedaban invisibles. Ahora gris claro + texto oscuro. */
        .cmp-body table th { background:#e2e8f0 !important; color:#0f172a !important; font-weight:700; border-bottom:2px solid #cbd5e1; }
        .ai-spinner { width:40px; height:40px; border:3px solid #e2e8f0; border-top:3px solid #059669; border-radius:50%; animation:spin 0.7s linear infinite; margin:0 auto 15px; }
        @keyframes spin { to{transform:rotate(360deg);} }
        .doc-form-card { background:white; border-radius:16px; padding:25px; box-shadow:0 8px 30px rgba(0,0,0,0.08); border:1px solid #e2e8f0; }
        .doc-form-card label { display:block; font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; margin-bottom:4px; margin-top:12px; }
        .doc-form-card input,.doc-form-card select { width:100%; padding:12px; border:1px solid #e2e8f0; border-radius:10px; font-family:'Poppins',sans-serif; font-weight:600; font-size:14px; color:#1e293b; outline:none; transition:border 0.3s; }
        .doc-form-card input:focus { border-color:#7c3aed; }
        .hist-item { background:white; border-radius:12px; padding:15px; margin-bottom:10px; border:1px solid #e2e8f0; box-shadow:0 2px 8px rgba(0,0,0,0.04); }
        .hist-item h4 { color:#0f172a; font-size:13px; margin:0 0 4px; }
        .hist-item p { color:#94a3b8; font-size:11px; margin:0; }
        .btn-history { background:linear-gradient(135deg,#0284c7,#38bdf8); width:100%; margin-top:20px; }
        .btn-edit { background:linear-gradient(135deg,#64748b,#94a3b8); }
        .option-note-input {
            width:100%; padding:10px; border:1px solid #cbd5e1; border-radius:10px;
            margin-bottom:10px; font-weight:600; font-family:'Poppins',sans-serif; outline:none;
            transition:border 0.3s;
        }
        .option-note-input:focus { border-color:var(--purpura); }
        .hidden-content { display:none; width:100%; margin-top:15px; }
        .reg-row2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:3px; }
        .reg-row2 .form-group { margin:0; display:flex; flex-direction:column; align-items:stretch; }
        .reg-row2 .form-group label { flex:none; margin:0 0 1px 2px; font-weight:800; font-size:11px; color:#1e293b; text-transform:uppercase; letter-spacing:0.3px; }
        .reg-row2 .form-group input { flex:none; width:100%; }
        .dob-age { position:absolute; right:11px; top:50%; transform:translateY(-50%); color:#dc2626; font-weight:800; font-size:12px; pointer-events:none; white-space:nowrap; }
        #regForm > .form-group { display:flex; flex-direction:column; align-items:stretch; }
        #regForm > .form-group label { flex:none; margin:0 0 1px 2px; font-weight:800; font-size:11px; color:#1e293b; text-transform:uppercase; letter-spacing:0.3px; }
        /* Formularios de personas adicionales: misma maquetación en columna que el principal */
        .persona-form .form-group { display:flex; flex-direction:column; align-items:stretch; margin:0; }
        .persona-form .form-group > label { flex:none; margin:0 0 3px 2px; font-weight:800; font-size:11px; color:#1e293b; text-transform:uppercase; letter-spacing:0.3px; }
        .persona-form .reg-row2 .form-group { margin:0; }
        .persona-form textarea.reg-input { width:100%; }
        .card {
            background:white; border:1px solid #e2e8f0; border-radius:14px;
            padding:15px; margin-bottom:12px; display:flex; flex-direction:column;
            box-shadow:0 2px 8px rgba(0,0,0,0.04); transition:box-shadow 0.3s;
        }
        .card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.08); }
        .card-content { white-space:pre-wrap; font-weight:600; margin-bottom:15px; outline:none; font-size:13px; line-height:1.6; }
        .form-group { display:flex; align-items:center; margin-bottom:5px; }
        .form-group label { flex:0 0 180px; font-weight:700; font-size:13px; color:#334155; }
        .form-group input, .form-group textarea {
            flex:1; padding:6px 12px; border:2px solid #94a3b8; border-radius:10px;
            font-weight:700; color:#0f172a; outline:none; font-family:'Poppins',sans-serif; transition:border 0.3s;
        }
        .form-group input:focus, .form-group textarea:focus { border-color:var(--purpura); }
        /* HOME compacto: campos del Registro de Datos un poco más bajos (solo padding vertical) → menos scroll. No afecta otras páginas. */
        .reg-row2 .form-group input, .reg-row2 .form-group textarea, .reg-row2 .form-group select.reg-input, #regForm > .form-group > textarea, #regForm > .form-group textarea.reg-input { padding-top:4px; padding-bottom:4px; }
        /* Desplegable de Lead: MISMO look que los demás campos (fondo blanco, mismo borde y tamaño),
           SIN la mancha gris del navegador. Se quita la apariencia nativa y se pone una flechita propia
           a la derecha; al desplegar, las opciones salen en azul clarito. */
        .form-group select.reg-input{
            flex:1; width:100%; padding:6px 34px 6px 12px; border:2px solid #94a3b8; border-radius:10px;
            font-weight:700; color:#0f172a; outline:none; font-family:'Poppins',sans-serif;
            background-color:#fff; background-repeat:no-repeat; background-position:right 12px center; background-size:12px 12px;
            background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
            -webkit-appearance:none; -moz-appearance:none; appearance:none; cursor:pointer; transition:border 0.3s;
        }
        .reg-row2 .form-group select.reg-input{ flex:none; width:100%; }
        .form-group select.reg-input:focus{ border-color:var(--purpura); }
        .form-group select.reg-input option{ background:#eff6ff; color:#0f172a; font-weight:600; }
        .form-group select.reg-input option:checked{ background:#dbeafe; }
        .btn-listo {
            display:none; background:linear-gradient(135deg,#2563eb,#60a5fa); color:white;
            border:none; padding:16px; font-size:18px; font-weight:800; border-radius:14px;
            cursor:pointer; width:100%; margin-top:15px; animation:jump 2s infinite;
            font-family:'Poppins',sans-serif;
        }
        @keyframes jump { 0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);} }

        /* TOAST */
        #toast {
            position:fixed; top:50%; left:50%;
            transform:translate(-50%,-50%) scale(0.7);
            background:rgba(15,23,42,0.95); color:#34d399;
            padding:20px 40px; border-radius:16px; z-index:99999;
            font-weight:800; transition:all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
            border:2px solid #34d399; text-align:center; opacity:0;
            visibility:hidden; pointer-events:none;
            box-shadow:0 20px 50px rgba(0,0,0,0.4);
            font-size:18px; text-transform:uppercase; white-space:nowrap;
            font-family:'Poppins',sans-serif; backdrop-filter:blur(10px);
        }
        #toast.show { transform:translate(-50%,-50%) scale(1); opacity:1; visibility:visible; }

        .section-title { text-align:center; margin:30px 0 15px 0; color:var(--azul-fuerte); text-transform:uppercase; font-weight:800; letter-spacing:1px; }

        /* ===== SCRIPT ===== */
        .script-wrap { font-family:'Poppins',sans-serif; background:linear-gradient(180deg,#f1f5f9,#e2e8f0); display:flex; justify-content:center; padding:40px 20px; min-height:calc(100vh - 56px); }
        .document-container { background:white; max-width:850px; width:100%; padding:40px; border-radius:16px; box-shadow:0 10px 40px rgba(0,0,0,0.1); border:1px solid #e2e8f0; line-height:1.6; }
        .txt-bold { font-weight:800; color:#000; font-size:1.1em; }
        .mark-yellow { background-color:#fef08a; color:#000; padding:2px 6px; border-radius:4px; }
        .mark-green { background-color:#bbf7d0; color:#000; padding:2px 6px; border-radius:4px; }
        .mark-blue { background-color:#bfdbfe; color:#000; padding:2px 6px; border-radius:4px; }
        .mark-red-light { background-color:#fecaca; color:#000; padding:5px 8px; border-radius:6px; }
        .txt-blue-light { color:#0ea5e9; font-weight:800; font-size:1.05em; }
        .txt-red-compliance { color:#dc2626; font-weight:800; border:2px solid #dc2626; padding:15px; margin:15px 0; display:block; border-radius:8px; background:#fef2f2; }
        .instruction { color:#64748b; font-family:'Poppins',sans-serif; font-style:italic; font-weight:normal; font-size:0.9em; display:block; margin-bottom:5px; }
        .doc-header { text-align:center; border-bottom:3px solid #1e293b; margin-bottom:30px; padding-bottom:10px; }
        .script-wrap hr { border:0; border-top:1px solid #e2e8f0; margin:20px 0; }

        /* ===== MEDICAL / SEP ===== */
        @keyframes float3d { 0%{transform:perspective(500px) rotateY(0deg);}50%{transform:perspective(500px) rotateY(15deg);}100%{transform:perspective(500px) rotateY(0deg);} }
        .med-wrap,.sep-wrap { font-family:'Poppins',sans-serif; background:linear-gradient(180deg,#f0f9ff,#e0f2fe); display:flex; justify-content:center; padding:40px 20px; min-height:calc(100vh - 56px); }
        .doc-med { background:white; max-width:950px; width:100%; padding:40px; border-radius:16px; box-shadow:0 15px 40px rgba(0,0,0,0.1); border:1px solid #e2e8f0; }
        .doc-sep { background:white; max-width:1000px; width:100%; padding:40px; border-radius:16px; box-shadow:0 15px 40px rgba(0,0,0,0.1); border:1px solid #e2e8f0; }
        .hdr-blue { text-align:center; border-bottom:4px solid #0284c7; margin-bottom:30px; padding-bottom:15px; }
        .tbl-std { width:100%; border-collapse:collapse; }
        .tbl-std th { background:#0f172a; color:#fff; padding:15px 18px; text-align:left; font-size:1em; text-transform:uppercase; }
        .tbl-std td { padding:12px 15px; border-bottom:1px solid #e2e8f0; vertical-align:middle; }
        .tbl-std tr:hover { background-color:#f0f9ff; }
        .sigla { display:inline-block; color:#0284c7; font-size:1.3em; font-weight:900; text-shadow:2px 2px 0px #bae6fd,3px 3px 5px rgba(0,0,0,0.1); animation:float3d 3.8s infinite ease-in-out; transform-style:preserve-3d; padding:2px 5px; border-radius:4px; }
        .hl-yellow { background-color:#fef08a !important; box-shadow:0 0 10px #fef08a; }
        .txt-s { color:#1e293b; font-weight:700; font-size:0.95em; line-height:1.5; }
        .sep-div { background-color:#f1f5f9; font-weight:900; text-align:center; padding:10px !important; text-transform:uppercase; letter-spacing:2px; }
        .status-b { font-size:1em; font-weight:900; text-transform:uppercase; color:#1e293b; }

        /* ===== VENTAS ===== */
        /* El panel cabe en su sección: altura natural del contenido, sin forzar viewport completo
           (eso dejaba un hueco en blanco al hacer scroll). El fondo cubre toda el área igualmente. */
        #secVentas { background:linear-gradient(180deg,#f0f9ff,#e0f2fe); padding-bottom:20px; }
        #secVentas.active { display:block !important; }
        #salesApp {
            font-family:'Poppins',sans-serif;
            background:linear-gradient(135deg,#e0f2fe 0%,#bae6fd 100%);
            padding:30px; border-radius:20px; max-width:900px;
            margin:20px auto 0; border:2px solid #0284c7;
            box-shadow:0 15px 40px rgba(0,0,0,0.15); position:relative; color:#0c4a6e;
        }
        .header-sales { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
        .title-sales { margin:0; font-size:24px; font-weight:900; letter-spacing:0.5px; }
        .date-box { display:flex; align-items:center; gap:10px; background:white; padding:10px 18px; border-radius:12px; border:1px solid #bae6fd; box-shadow:0 2px 8px rgba(0,0,0,0.05); }
        #labelDate { font-weight:800; font-size:14px; color:#1e293b; }
        #inputDate { border:2px solid var(--rojo); padding:5px; font-weight:bold; width:130px; display:none; border-radius:8px; text-align:center; font-family:'Poppins',sans-serif; }
        .table-sales { width:100%; border-collapse:separate; border-spacing:4px; background:rgba(255,255,255,0.3); border-radius:15px; overflow:hidden; }
        .table-sales th { background:#0c4a6e; color:white; padding:16px; font-size:14px; border-radius:8px; }
        .table-sales td { width:14.2%; height:120px; vertical-align:top; padding:12px; background:white; border-radius:10px; border:1px solid #e0f2fe; cursor:pointer; transition:all 0.3s; position:relative; box-shadow:0 2px 6px rgba(0,0,0,0.04); }
        .table-sales td:hover { transform:translateY(-3px); box-shadow:0 8px 20px rgba(2,132,199,0.15); }
        .dots-wrapper { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; pointer-events:none; }
        .sale-dot { width:18px; height:18px; background:radial-gradient(circle,#34d399,#059669); border-radius:50%; border:1px solid #047857; animation:popIn 0.3s cubic-bezier(0.175,0.885,0.32,1.275); pointer-events:auto; cursor:pointer; }
        @keyframes popIn { from{transform:scale(0);}to{transform:scale(1);} }
        .controls-sales { display:flex; gap:12px; margin-top:25px; align-items:center; flex-wrap:wrap; }
        .btn-action { padding:12px 20px; border:none; border-radius:10px; cursor:pointer; font-weight:800; color:white; text-transform:uppercase; font-size:12px; transition:all 0.25s; box-shadow:0 3px 0 rgba(0,0,0,0.15); font-family:'Poppins',sans-serif; }
        .btn-action:hover { transform:translateY(-1px); filter:brightness(1.1); }
        .btn-action:active { transform:translateY(2px); box-shadow:none; }
        .btn-delete-mode { background:linear-gradient(135deg,#f59e0b,#fbbf24); }
        .btn-delete-mode.active { background:linear-gradient(135deg,#dc2626,#f87171); animation:pulse 1.5s infinite; }
        @keyframes pulse { 0%,100%{opacity:1;}50%{opacity:0.7;} }
        /* ============================================================
           Indicador "EN LLAMADA" — FIJO arriba a la derecha.
           Antes vivía dentro del formulario y se iba hacia arriba al hacer scroll. Ahora es
           position:fixed en la esquina superior derecha: se queda SIEMPRE a la vista mientras
           el agente registra al cliente, sin importar cuánto baje la página.
           ============================================================ */
        #enLlamadaRow { position:fixed; top:0; right:0; z-index:9996; display:flex; justify-content:flex-end; align-items:center; padding:10px 14px 0 0; pointer-events:none; }
        /* Limpia: SIN fondo, sin borde y sin sombra. Solo la bolita verde parpadeando y el texto
           verde, más pequeño. Se apoya directo sobre el fondo de la página. */
        #enLlamadaInd { display:none; align-items:center; gap:5px; background:none; border:none; box-shadow:none; color:#15803d; font-weight:800; font-size:8.5px; letter-spacing:.7px; padding:0; border-radius:0; pointer-events:auto; animation:ellIn .28s cubic-bezier(.2,.9,.3,1.2); }
        #enLlamadaInd .ell-dot { width:7px; height:7px; border-radius:50%; background:#16a34a; box-shadow:0 0 0 0 rgba(22,163,74,0.7); animation:ellPulse 1.4s infinite; flex:0 0 auto; }
        @keyframes ellPulse { 0%{box-shadow:0 0 0 0 rgba(22,163,74,0.6);}70%{box-shadow:0 0 0 7px rgba(22,163,74,0);}100%{box-shadow:0 0 0 0 rgba(22,163,74,0);} }
        @keyframes ellIn { from{opacity:0;transform:translateY(-8px) scale(.9);} to{opacity:1;transform:none;} }
        /* En móvil se aparta del logo "trranu" (arriba a la izquierda) sin perder la esquina. */
        @media (max-width:520px){ #enLlamadaRow{ padding:8px 10px 0 0; } #enLlamadaInd{ font-size:8px; } }
        /* ===== GAMIFICACIÓN PANEL DE VENTAS ===== */
        #payTierWidget { margin:0; max-width:330px; flex:1; min-width:240px; }
        .pt-card { background:linear-gradient(135deg,#dbeafe,#bfdbfe); border-radius:14px; padding:11px 13px; text-align:left; box-shadow:0 6px 18px rgba(37,99,235,0.30); position:relative; overflow:hidden; border:1px solid #93c5fd; }
        .pt-rate { font-size:11px; color:#1e293b; font-weight:700; }
        .pt-rate b { font-size:23px; color:#0f172a; font-weight:900; display:block; line-height:1.1; }
        .pt-rate .pt-amt { display:inline-block; }
        .pt-msg { margin-top:5px; font-size:11.5px; font-weight:800; color:#1d4ed8; min-height:14px; line-height:1.25; }
        .pt-progress { margin-top:8px; height:9px; background:rgba(30,58,138,0.12); border-radius:6px; overflow:hidden; position:relative; }
        .pt-progress > span { display:block; height:100%; border-radius:6px; transition:width .8s cubic-bezier(.2,.8,.2,1); background:linear-gradient(90deg,#2563eb,#3b82f6,#22d3ee,#3b82f6); background-size:300% 100%; animation:ptFlow 3s linear infinite; }
        @keyframes ptFlow { 0%{background-position:0% 50%;} 100%{background-position:300% 50%;} }
        .chat-rec-wave { display:inline-flex; align-items:center; gap:3px; height:24px; }
        .chat-rec-wave span { display:block; width:3px; height:8px; background:#dc2626; border-radius:2px; animation:chatWave 0.9s ease-in-out infinite; }
        .chat-rec-wave span:nth-child(2){animation-delay:0.15s;} .chat-rec-wave span:nth-child(3){animation-delay:0.3s;} .chat-rec-wave span:nth-child(4){animation-delay:0.45s;} .chat-rec-wave span:nth-child(5){animation-delay:0.6s;}
        @keyframes chatRecBlink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }
        /* Notificación del chat de equipo: halo azul (sombra) detrás del botón mientras hay mensajes sin leer. */
        @keyframes chatGlowPulse { 0%,100%{box-shadow:0 0 0 2px rgba(37,99,235,0.22),0 0 10px 3px rgba(37,99,235,0.45);} 50%{box-shadow:0 0 0 4px rgba(37,99,235,0.32),0 0 20px 7px rgba(37,99,235,0.82);} }
        #chatIconBtn.chat-has-unread { animation:chatGlowPulse 1.3s ease-in-out infinite; }
        @keyframes apiBlink { 0%,100%{opacity:1;} 50%{opacity:.35;} }
        @keyframes chatWave { 0%,100%{height:6px;} 50%{height:20px;} }
        .pt-next { margin-top:5px; font-size:10px; color:#334155; font-weight:700; }
        /* Cabecera con monto que "brinca" */
        .pt-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
        .pt-head-lbl { font-size:11px; color:#1e293b; font-weight:700; }
        .pt-amt-big { font-size:25px; color:#0f172a; font-weight:900; line-height:1; animation:ptJump 2.2s ease-in-out infinite; transform-origin:center; }
        .pt-amt-big .pt-hr { font-size:12px; color:#1e293b; font-weight:700; }
        @keyframes ptJump { 0%,100%{transform:translateY(0) scale(1);} 45%{transform:translateY(-4px) scale(1.06);} 60%{transform:translateY(0) scale(1);} }
        /* Bloque de proyección de comisión */
        .pt-earn { margin-top:9px; background:rgba(255,255,255,0.55); border:1px solid rgba(29,78,216,0.18); border-radius:10px; padding:8px 10px; }
        .pt-earn-row { display:flex; align-items:center; justify-content:space-between; font-size:11px; color:#1e293b; font-weight:700; padding:2px 0; }
        .pt-earn-lbl { color:#334155; }
        .pt-earn-val { color:#0f172a; font-weight:900; }
        .pt-earn-total { border-top:1.5px solid rgba(29,78,216,0.25); margin-top:4px; padding-top:5px; font-size:12.5px; }
        .pt-earn-total .pt-earn-lbl { color:#1d4ed8; font-weight:900; }
        .pt-earn-total .pt-earn-val { color:#1d4ed8; font-size:15px; }
        .pt-disc { margin-top:6px; font-size:8.5px; color:#64748b; font-weight:600; line-height:1.3; font-style:italic; }
        @keyframes ptBump { 0%{transform:scale(1);}40%{transform:scale(1.12);}100%{transform:scale(1);} }
        .pt-amt.bump { animation:ptBump .5s ease; }
        /* Fuegos artificiales (solo panel de ventas) */
        #fxLayer { position:fixed; inset:0; pointer-events:none; z-index:100060; overflow:hidden; display:none; }
        .fx-spark { position:absolute; width:7px; height:7px; border-radius:50%; opacity:1; }
        @keyframes fxFly { to { transform:translate(var(--dx),var(--dy)) scale(0.3); opacity:0; } }
        /* Enlaces de "informe" / "añadir persona": azul subrayado, negro al pasar el cursor */
        .lnk-informe { color:#2563eb; text-decoration:underline; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
        .lnk-informe:hover { color:#000; }
        /* CRÓNICO: mismo azul de la fila, con el corazón pegado al texto. */
        .lnk-cronico { display:inline-flex; align-items:center; gap:4px; }
        .lnk-cronico svg { flex:0 0 auto; }
        /* ===== Gaveta de CRÓNICO ===== */
        /* Barra de acciones anclada al pie: se hace scroll y GUARDAR/LIMPIAR no se van. */
        #drawerBody.cronic-open { padding-bottom:78px; }
        .cronic-actions-fixed {
            position:sticky; bottom:0; left:0; right:0; z-index:20;
            display:flex; gap:10px; justify-content:stretch;
            margin:14px -14px -14px; padding:12px 14px;
            background:rgba(255,255,255,.94); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
            border-top:1px solid #E8EEF6;
        }
        .cronic-actions-fixed .btn { flex:1; margin:0; }
        /* Encabezado de bloque, sin barras de color chillón. */
        .cronic-h {
            font-family:'Poppins',sans-serif; font-size:13px; font-weight:700; color:#0F172A;
            letter-spacing:.2px; margin:4px 0 12px; padding-bottom:9px;
            border-bottom:1px solid #E8EEF6;
        }
        .cronic-h .cronic-h-sub { display:block; font-size:11px; font-weight:500; color:#94A3B8; margin-top:3px; letter-spacing:0; }
        .cronic-grp { font-size:10.5px; font-weight:700; letter-spacing:.7px; text-transform:uppercase; color:#94A3B8; margin:16px 0 7px; }
        /* Gaveta de INFORME: aparece hacia ARRIBA, pequeña y desplazable, con textos rápidos.
           Fondo AZUL MUY CLARO para diferenciar la sección de los campos (letras se mantienen negras). */
        .informe-drawer { display:none; position:absolute; left:0; right:0; bottom:100%; margin-bottom:6px; overflow:visible; background:#dbeafe; border:1px solid #93c5fd; border-radius:12px; box-shadow:0 -2px 10px rgba(30,64,175,0.12); padding:8px; z-index:60; }
        .informe-scroll { max-height:230px; overflow-y:auto; padding-top:2px; }
        .informe-drawer.open { display:block; }
        .informe-sec { padding:4px 0 2px; }
        .informe-sec + .informe-sec { border-top:1px solid #d6e6ff; margin-top:4px; }
        .informe-item { display:block; width:100%; text-align:left; background:#ffffff; border:1.5px solid #94a3b8; border-radius:10px; padding:9px 11px; margin:7px 0; font-size:12px; line-height:1.35; color:#1e293b; cursor:pointer; box-shadow:none; }
        .informe-item:hover { background:#eef2ff; border-color:#6366f1; }
        .informe-item.sel { background:#dcfce7; border-color:#16a34a; }
        .informe-drawer .inf-actions { display:flex; gap:6px; position:sticky; bottom:0; background:#e8f1ff; padding-top:6px; }
        .informe-drawer .inf-actions button { flex:1; border:none; border-radius:8px; padding:7px; font-size:12px; font-weight:800; cursor:pointer; }
        .informe-x { position:absolute; top:6px; right:6px; z-index:6; background:#fee2e2; color:#dc2626; border:none; border-radius:50%; width:28px; height:28px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 1px 5px rgba(220,38,38,0.30); }
        .informe-x:hover { background:#bfdbfe; }
        .informe-item.added { background:#dcfce7; border-color:#16a34a; }
        @keyframes apointPulse { 0%{box-shadow:0 0 0 0 rgba(255,255,255,0.9),0 0 6px 2px rgba(220,38,38,0.6);}70%{box-shadow:0 0 0 8px rgba(255,255,255,0),0 0 10px 4px rgba(220,38,38,0.4);}100%{box-shadow:0 0 0 0 rgba(255,255,255,0),0 0 6px 2px rgba(220,38,38,0.6);} }
        .btn-history-main { background:linear-gradient(135deg,#7c3aed,#a78bfa); }
        .btn-mis-ventas { background:linear-gradient(135deg,#6366f1,#818cf8); }
        .btn-close-week { background:#0f172a; margin-left:auto; border:2px solid #34d399; color:#34d399; }
        .total-display { background:#0f172a; color:#34d399; padding:12px 28px; border-radius:12px; font-size:24px; font-weight:bold; font-family:'Courier New',monospace; border:2px solid #1e293b; text-shadow:0 0 10px #34d399; }
        .pop-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:10000; backdrop-filter:blur(5px); }
        .custom-pop { display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:white; border:2px solid #e2e8f0; padding:35px; border-radius:20px; z-index:10001; text-align:center; min-width:320px; animation:slideDown 0.4s ease-out; box-shadow:0 25px 60px rgba(0,0,0,0.3); }
        @keyframes slideDown { from{top:40%;opacity:0;}to{top:50%;opacity:1;} }

        #historyPage { display:none; position:fixed; top:0; left:0; width:100%; height:calc(100vh - 56px); background:linear-gradient(180deg,#f0f9ff,#e0f2fe); z-index:5000; padding:15px 20px 40px; overflow-y:auto; }
        .hist-card { background:white; border-left:6px solid #0284c7; padding:25px; margin-bottom:20px; border-radius:14px; display:flex; justify-content:space-between; align-items:center; box-shadow:0 4px 16px rgba(0,0,0,0.05); }

        /* ===== ADMIN ===== */
        #secAdmin { min-height:calc(100vh - 56px); background:linear-gradient(180deg,#faf5ff,#f3e8ff); }
        .admin-wrap { max-width:900px; margin:0 auto; padding:30px 20px; }
        .admin-login-card {
            background:white; border-radius:20px; padding:40px; max-width:400px;
            margin:60px auto; box-shadow:0 15px 40px rgba(0,0,0,0.1);
            text-align:center; border:1px solid #e2e8f0;
        }
        .admin-login-card h2 { color:#1e293b; margin-bottom:20px; font-size:22px; }
        .admin-login-card input {
            width:100%; padding:14px; border:1px solid #e2e8f0; border-radius:12px;
            font-size:15px; margin-bottom:12px; outline:none; font-family:'Poppins',sans-serif;
            font-weight:600; transition:border 0.3s; color:#1e293b;
        }
        .admin-login-card input:focus { border-color:#7c3aed; }
        .btn-admin-login {
            width:100%; padding:14px; background:linear-gradient(135deg,#7c3aed,#a78bfa);
            color:white; border:none; border-radius:12px; font-weight:700; font-size:16px;
            cursor:pointer; font-family:'Poppins',sans-serif; transition:all 0.3s;
        }
        .btn-admin-login:hover { transform:translateY(-2px); }
        .btn-admin-login:disabled { background:#94a3b8; cursor:not-allowed; transform:none; }
        #adminMsg { margin-top:12px; font-size:13px; font-weight:600; min-height:20px; }
        .admin-panel { display:none; }
        .admin-header { text-align:center; margin-bottom:30px; }
        .admin-header h2 { color:#1e293b; font-size:24px; margin-bottom:5px; }
        .admin-header p { color:#64748b; font-size:14px; }
        .admin-stats { display:flex; gap:15px; margin-bottom:30px; flex-wrap:wrap; }
        .stat-card {
            flex:1; min-width:150px; background:white; border-radius:14px; padding:20px;
            text-align:center; box-shadow:0 2px 8px rgba(0,0,0,0.05); border:1px solid #e2e8f0;
        }
        .stat-card .stat-num { font-size:32px; font-weight:900; color:#7c3aed; }
        .stat-card .stat-label { font-size:12px; color:#64748b; text-transform:uppercase; font-weight:700; }
        .admin-section { background:white; border-radius:14px; padding:25px; margin-bottom:20px; box-shadow:0 2px 8px rgba(0,0,0,0.05); border:1px solid #e2e8f0; }
        .adm-side-btn { display:flex; align-items:center; gap:11px; width:100%; text-align:left; background:transparent; color:#334155; border:none; border-radius:11px; padding:12px 13px; margin-bottom:3px; font-size:14px; font-weight:600; letter-spacing:-.1px; cursor:pointer; font-family:'Inter','Poppins',sans-serif; transition:background .15s,color .15s; }
        .adm-side-btn:hover { background:#F1F5F9; color:#0F172A; }
        .adm-side-btn.active { background:rgba(13,148,136,.10); color:#0F766E; box-shadow:inset 3px 0 0 #0D9488; font-weight:700; }
        .adm-side-btn.logout { color:#BE123C; }
        .adm-side-btn.logout:hover { background:#FEF2F2; color:#BE123C; }
        .admin-section h3 { color:#1e293b; margin-bottom:15px; font-size:16px; }
        .user-row {
            display:flex; align-items:center; justify-content:space-between; padding:12px 16px;
            border-radius:10px; margin-bottom:8px; background:#f8fafc; transition:background 0.2s;
        }
        .user-row:hover { background:#f1f5f9; }
        .user-info { display:flex; align-items:center; gap:12px; }
        .user-avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; color:white; font-size:14px; }
        .user-status { width:10px; height:10px; border-radius:50%; }
        .user-status.online { background:#34d399; box-shadow:0 0 8px #34d399; animation:statusPulse 2s infinite; }
        .user-status.offline { background:#94a3b8; }
        @keyframes statusPulse { 0%,100%{opacity:1;}50%{opacity:0.5;} }
        .user-actions { display:flex; gap:6px; }
        .user-actions button {
            padding:6px 12px; border:none; border-radius:8px; cursor:pointer;
            font-weight:700; font-size:11px; color:white; font-family:'Poppins',sans-serif; transition:all 0.2s;
        }
        .user-actions button:hover { transform:translateY(-1px); }
        .add-user-form { display:none; margin-top:15px; padding:20px; background:#f8fafc; border-radius:12px; }
        .add-user-form input {
            width:100%; padding:12px; border:1px solid #e2e8f0; border-radius:10px;
            margin-bottom:10px; font-family:'Poppins',sans-serif; font-weight:600; outline:none; transition:border 0.3s; color:#1e293b;
        }
        .add-user-form input:focus { border-color:#7c3aed; }

        /* ===== MODAL ===== */
        .modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.7); z-index:50000; backdrop-filter:blur(5px); }
        .modal-box { display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:white; border-radius:20px; padding:30px; z-index:50001; width:90%; max-width:400px; box-shadow:0 25px 60px rgba(0,0,0,0.3); }
        .modal-box h3 { text-align:center; margin-bottom:20px; color:#1e293b; font-family:'Poppins',sans-serif; }
        .modal-box input {
            width:100%; padding:12px; border:1px solid #e2e8f0; border-radius:10px;
            margin-bottom:10px; font-family:'Poppins',sans-serif; font-weight:600; outline:none; color:#1e293b;
        }

        /* ===== USER BADGE ===== */
        .user-badge {
            width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#6366f1,#a78bfa);
            display:flex; align-items:center; justify-content:center; font-weight:800; color:white;
            font-size:13px; cursor:pointer; position:relative; transition:all 0.2s;
            border:2px solid rgba(255,255,255,0.3); font-family:'Poppins',sans-serif;
            flex-shrink:0;
        }
        .user-badge:hover { transform:scale(1.1); border-color:rgba(255,255,255,0.6); }
        .badge-dropdown {
            display:none; position:fixed; bottom:60px; right:8px; background:white;
            border-radius:12px; padding:8px; box-shadow:0 -10px 30px rgba(0,0,0,0.2);
            min-width:180px; z-index:99998;
        }
        .badge-dropdown.show { display:block; }
        .badge-dropdown .dd-name { padding:10px 12px; font-weight:700; color:#1e293b; font-size:13px; border-bottom:1px solid #e2e8f0; }
        .badge-dropdown .dd-logout {
            padding:10px 12px; font-weight:700; color:#dc2626; font-size:13px; cursor:pointer;
            border-radius:8px; transition:background 0.2s; display:flex; align-items:center; gap:8px;
        }
        .badge-dropdown .dd-logout:hover { background:#fef2f2; }

        /* ===== PASSWORD EYE TOGGLE - MINIMALISTA ===== */
        .pass-wrapper { position:relative; width:100%; }
        .pass-wrapper input { padding-right:48px !important; }
        .eye-toggle {
            position:absolute; right:14px; top:50%; transform:translateY(-50%);
            cursor:pointer; user-select:none; line-height:1;
            display:flex; align-items:center; justify-content:center;
            width:28px; height:28px; border-radius:6px;
            transition:background 0.2s;
        }
        .eye-toggle:hover { background:rgba(129,140,248,0.15); }
        .eye-toggle svg { width:18px; height:18px; stroke:#94a3b8; stroke-width:1.8; fill:none; transition:stroke 0.2s; }
        .eye-toggle:hover svg { stroke:#818cf8; }

        /* ===== CREATOR PAGE ===== */
        #secCreator { min-height:calc(100vh - 56px); background:linear-gradient(180deg,#faf5ff,#f3e8ff); }
        .creator-wrap { max-width:800px; margin:0 auto; padding:30px 20px; }
        .creator-header { text-align:center; margin-bottom:30px; }
        .creator-header h2 { color:#1e293b; font-size:24px; margin-bottom:5px; font-family:'Poppins',sans-serif; }
        .creator-header p { color:#64748b; font-size:14px; font-family:'Poppins',sans-serif; }
        .creator-card {
            background:white; border-radius:16px; padding:30px; margin-bottom:20px;
            box-shadow:0 4px 16px rgba(0,0,0,0.06); border:1px solid #e2e8f0;
        }
        .creator-card h3 { color:#1e293b; margin-bottom:18px; font-size:16px; font-family:'Poppins',sans-serif; display:flex; align-items:center; gap:8px; }
        .creator-label { display:block; font-size:12px; text-transform:uppercase; color:#64748b; font-weight:700; margin-bottom:6px; font-family:'Poppins',sans-serif; letter-spacing:0.5px; }
        .creator-input {
            width:100%; padding:12px 16px; border:1px solid #e2e8f0; border-radius:10px;
            font-family:'Poppins',sans-serif; font-weight:600; font-size:14px; outline:none;
            transition:border 0.3s; color:#1e293b; margin-bottom:16px;
        }
        .creator-input:focus { border-color:#7c3aed; }
        .creator-textarea {
            width:100%; padding:14px 16px; border:1px solid #e2e8f0; border-radius:10px;
            font-family:'Poppins',sans-serif; font-weight:500; font-size:14px; outline:none;
            transition:border 0.3s; color:#1e293b; min-height:120px; resize:vertical; margin-bottom:16px;
        }
        .creator-textarea:focus { border-color:#7c3aed; }
        .color-picker-row { display:flex; gap:12px; align-items:center; margin-bottom:16px; flex-wrap:wrap; }
        .color-picker-row input[type="color"] {
            width:44px; height:44px; border:2px solid #e2e8f0; border-radius:10px; cursor:pointer;
            padding:2px; background:white; transition:border 0.3s;
        }
        .color-picker-row input[type="color"]:hover { border-color:#7c3aed; }
        .color-preview {
            padding:8px 20px; border-radius:10px; color:white; font-weight:700; font-size:13px;
            font-family:'Poppins',sans-serif; text-transform:uppercase; letter-spacing:0.5px;
            min-width:120px; text-align:center;
        }
        .font-select {
            width:100%; padding:12px 16px; border:1px solid #e2e8f0; border-radius:10px;
            font-family:'Poppins',sans-serif; font-weight:600; font-size:14px; outline:none;
            transition:border 0.3s; color:#1e293b; margin-bottom:16px; cursor:pointer;
            background:white;
        }
        .font-select:focus { border-color:#7c3aed; }
        .text-style-row { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
        .style-chip {
            padding:8px 16px; border:2px solid #e2e8f0; border-radius:8px; cursor:pointer;
            font-family:'Poppins',sans-serif; font-weight:700; font-size:12px; color:#64748b;
            transition:all 0.2s; background:white; text-transform:uppercase;
        }
        .style-chip:hover { border-color:#7c3aed; color:#7c3aed; }
        .style-chip.active { border-color:#7c3aed; background:#7c3aed; color:white; }
        .img-upload-zone {
            border:2px dashed #cbd5e1; border-radius:12px; padding:30px; text-align:center;
            cursor:pointer; transition:all 0.3s; margin-bottom:16px; background:#fafbfc;
        }
        .img-upload-zone:hover { border-color:#7c3aed; background:#f5f3ff; }
        .img-upload-zone p { color:#94a3b8; font-weight:600; font-size:13px; font-family:'Poppins',sans-serif; }
        .img-upload-zone .icon-upload { font-size:32px; margin-bottom:8px; color:#cbd5e1; }
        .img-preview { max-width:100%; max-height:200px; border-radius:10px; margin-top:10px; object-fit:contain; }
        .created-items-list { margin-top:20px; }
        .created-item-card {
            background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:16px;
            margin-bottom:12px; display:flex; align-items:center; justify-content:space-between;
            transition:all 0.2s;
        }
        .created-item-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.06); }
        .created-item-info { display:flex; align-items:center; gap:12px; }
        .created-item-dot { width:14px; height:14px; border-radius:4px; flex-shrink:0; }
        .created-item-name { font-weight:700; font-size:14px; color:#1e293b; font-family:'Poppins',sans-serif; }
        .created-item-actions { display:flex; gap:6px; }
        .created-item-actions button {
            padding:6px 14px; border:none; border-radius:8px; cursor:pointer; font-weight:700;
            font-size:11px; color:white; font-family:'Poppins',sans-serif; transition:all 0.2s;
        }
        .created-item-actions button:hover { transform:translateY(-1px); }

        /* ===== CUSTOM BUTTON PAGES ===== */
        .custom-page-wrap {
            font-family:'Poppins',sans-serif; min-height:calc(100vh - 56px);
            background:linear-gradient(180deg,#f8fafc,#eef2ff); display:flex;
            justify-content:center; padding:40px 20px;
        }
        .custom-page-content {
            background:white; max-width:900px; width:100%; padding:40px; border-radius:16px;
            box-shadow:0 10px 40px rgba(0,0,0,0.08); border:1px solid #e2e8f0;
        }
        .custom-page-title {
            text-align:center; margin-bottom:30px; padding-bottom:15px;
            border-bottom:3px solid #e2e8f0;
        }
        .custom-page-img { max-width:100%; border-radius:12px; margin:20px auto; display:block; box-shadow:0 4px 20px rgba(0,0,0,0.1); }
        .custom-page-text { line-height:1.8; font-size:16px; margin-top:20px; word-wrap:break-word; }

        /* 3D Text */
        .text-3d {
            text-shadow: 1px 1px 0px rgba(0,0,0,0.15), 2px 2px 0px rgba(0,0,0,0.1), 3px 3px 0px rgba(0,0,0,0.07), 4px 4px 8px rgba(0,0,0,0.1);
        }

        /* ===== NOTE STATUS BADGE ===== */
        .note-status-badge {
            display:inline-block; padding:3px 10px; border-radius:20px; font-size:10px;
            font-weight:800; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:8px;
            font-family:'Poppins',sans-serif;
        }
        .note-status-badge.st-venta { background:#dcfce7; color:#166534; }
        .note-status-badge.st-llamar { background:#fef9c3; color:#854d0e; }
        .note-status-badge.st-importante { background:#fee2e2; color:#991b1b; }
        .note-status-badge.st-otro-dia { background:#e0e7ff; color:#3730a3; }
        .note-status-badge.st-callo { background:#fce7f3; color:#9d174d; }
        .note-status-badge.st-no-responde { background:#f1f5f9; color:#475569; }
        .note-status-badge.st-seguimiento { background:#ccfbf1; color:#115e59; }
        .note-status-badge.st-completado { background:#d1fae5; color:#065f46; }
        .note-status-badge.st-cancelado { background:#fef2f2; color:#dc2626; }
        .note-status-mini {
            padding:10px 10px; border:none; border-radius:10px;
            font-family:'Poppins',sans-serif; font-weight:700; font-size:11px;
            outline:none; cursor:pointer; color:white;
            background:linear-gradient(135deg,#0ea5e9,#7dd3fc);
            box-shadow:0 3px 10px rgba(14,165,233,0.35);
            transition:all 0.25s; min-width:80px; flex:0 0 auto;
        }
        .note-status-mini:hover { transform:translateY(-1px); filter:brightness(1.1); box-shadow:0 5px 15px rgba(14,165,233,0.45); }
        .note-status-mini:focus { box-shadow:0 0 0 3px rgba(14,165,233,0.3); }
        .note-status-mini option { color:#1e293b; background:white; font-size:14px; padding:8px; }
        .note-status-card {
            padding:8px 10px; border:1px solid #e2e8f0; border-radius:8px;
            font-family:'Poppins',sans-serif; font-weight:700; font-size:13px;
            outline:none; cursor:pointer; color:#334155; background:#f8fafc;
            transition:border 0.3s; min-width:90px; flex:0 0 auto;
        }
        .note-status-card:focus { border-color:var(--purpura); }
        .note-status-card:disabled { opacity:0.6; cursor:default; }
        .note-status-card option { color:#1e293b; background:white; font-size:14px; padding:8px; }

        /* ===== CRONIC ITEMS ===== */
        .cronic-item {
            display:flex; align-items:center; gap:12px; padding:14px 12px;
            border-bottom:1px solid #e2e8f0; cursor:pointer; transition:background 0.2s;
            font-family:'Poppins',sans-serif; font-size:14px; color:#2d3748; line-height:1.5;
        }
        .cronic-item:hover { background:#f7fafc; border-radius:8px; }
        .cronic-item input[type="checkbox"] { width:24px; height:24px; accent-color:#0056b3; cursor:pointer; flex-shrink:0; }
        .cronic-item small { color:#718096; font-style:italic; }

        /* ===== RESPONSIVE ===== */
        @media (max-width:600px) {
            .form-group { flex-direction:column; align-items:flex-start; }
            .form-group label { flex:none; margin-bottom:2px; }
            #toast { font-size:14px; padding:15px 25px; }
            .nav-btn { padding:6px 4px; font-size:10px; width:54px; min-width:54px; }
            .controls-sales { flex-direction:column; }
            .total-display { width:100%; text-align:center; }
            .header-sales { flex-direction:column; text-align:center; }
            .hist-card { flex-direction:column; gap:15px; text-align:center; }
            .admin-stats { flex-direction:column; }
            .color-picker-row { flex-direction:column; align-items:flex-start; }
        }

/* ── Icono de copiar dentro de los campos del Registro de Datos ───────────── */
.reg-copy-btn{
    position:absolute; top:50%; transform:translateY(-50%);
    width:28px; height:28px; border:none; border-radius:8px;
    background:transparent; color:#94A3B8; cursor:pointer; padding:0;
    display:flex; align-items:center; justify-content:center;
    transition:background .13s, color .13s;
}
.reg-copy-btn:hover{ background:#EEF2FF; color:#4F46E5; }
.reg-copy-btn:active{ transform:translateY(-50%) scale(.92); }
.reg-copy-btn.copiado{ color:#059669; }

/* ── Chips de guía visual del chatbot (botones dibujados + flecha roja) ────── */
.mcg-btn{
    display:inline-flex; align-items:center; gap:5px; vertical-align:middle;
    background:#dbeafe; color:#1e3a8a; border:1.5px solid #bfdbfe;
    border-radius:10px; padding:4px 11px; margin:2px 2px;
    font-weight:800; font-size:12px; font-family:'Poppins',sans-serif;
    box-shadow:0 1px 3px rgba(30,58,138,.12); white-space:nowrap;
}
.mcg-flecha{
    display:inline-block; vertical-align:middle; margin:0 4px;
    color:#dc2626; font-weight:900; font-size:16px;
    animation:mcgLatir 1.1s ease-in-out infinite;
}
@keyframes mcgLatir{ 0%,100%{transform:translateX(0);} 50%{transform:translateX(3px);} }
.mcg-paso{
    display:inline-flex; align-items:center; justify-content:center; vertical-align:middle;
    width:20px; height:20px; border-radius:50%; margin-right:5px;
    background:linear-gradient(135deg,#4285F4,#9b72cb); color:#fff;
    font-weight:800; font-size:11px; font-family:'Poppins',sans-serif; flex-shrink:0;
}
