/* ═══════════════════════════════════════════════════════════════════════════
   GENESIS MOTHER IA SYSTEM — sistema visual

   Lenguaje: plataforma de tecnología, no anuncio de negocio.
   3D real con perspectiva · glassmorphism · glow neón · bordes iluminados ·
   profundidad por capas · tipografía de alta gama.

   Oscuro por defecto. El claro (data-tema="claro" en <html>) conserva el mismo
   lenguaje: el cristal se vuelve translúcido claro y los glows bajan de
   intensidad en vez de desaparecer, para que no parezca otra aplicación.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Neón: solo azul y verde. Todo lo demás es negro, blanco y gris. ── */
  --azul:        #00c8ff;
  --azul-hi:     #5ee0ff;
  --azul-hondo:  #0077b6;
  --verde:       #00ff9c;
  /* Verde de WhatsApp: esto atiende WhatsApp, y el color lo dice sin explicarlo. */
  --wa:          #25d366;
  --wa-hi:       #4ce88a;
  --wa-hondo:    #0f9d58;
  --verde-hi:    #7dffc9;
  --verde-hondo: #00a86b;
  --verde-claro: #7dffc9;
  --gris:        #94a3b8;
  --ambar:       #fbbf24;
  --rojo:        #fb5a6a;

  --marca:      var(--azul);
  --acento:     var(--verde);

  /* ── Profundidad ── */
  --void:       #000000;
  --fondo:      #05070a;
  --fondo-2:    #0a0d12;
  --losa:       #08192b;
  --losa-alta:  #0b2439;
  --losa-solida:#0b2439;

  /* Superficies. Todo lo que sea una "losa" usa estas variables y NUNCA un
     color escrito a mano: si no, en modo día queda texto oscuro sobre fondo
     oscuro. Esa fue la causa de todos los fallos del modo claro. */
  --sup-alta:   #0d2a41;
  --sup-media:  #0b2438;
  --sup-honda:  #04121e;
  --sup-barra:  #061626;
  --g-tarjeta:  linear-gradient(158deg, #0b2438 0%, #071a2b 46%, #05131f 100%);
  --g-alta:     linear-gradient(158deg, #0d2a41 0%, #081d30 100%);
  --g-cristal:  linear-gradient(158deg, #0e2c45, #08192b);
  --g-honda:    linear-gradient(180deg, #071a2b 0%, #04101c 100%);

  --borde:      rgba(0, 200, 255, .55);
  --borde-vivo: rgba(0, 200, 255, .95);
  --brillo-sup: rgba(120, 230, 255, .55);

  --texto:      #f2f5f8;
  --texto-2:    #9aa4b2;
  --texto-3:    #7b8697;

  /* ── Sombras: tres capas, de contacto a ambiente ── */
  --s-1: 0 1px 2px rgba(0,0,0,.5);
  --s-2: 0 2px 6px rgba(0,0,0,.42), 0 8px 20px rgba(0,0,0,.34);
  --s-3: 0 4px 12px rgba(0,0,0,.46), 0 18px 44px rgba(0,0,0,.42);
  --s-4: 0 8px 24px rgba(0,0,0,.5), 0 34px 80px rgba(0,0,0,.55);

  /* ── Glow ── */
  --glow-marca: 0 0 0 1px rgba(0,200,255,.34), 0 0 22px rgba(0,200,255,.3), 0 0 60px rgba(0,200,255,.16);
  --glow-verde-neon:  0 0 0 1px rgba(0,255,156,.34), 0 0 22px rgba(0,255,156,.28), 0 0 60px rgba(0,255,156,.14);
  --glow-verde: 0 0 0 1px rgba(0,255,156,.36), 0 0 20px rgba(0,255,156,.3);
  --glow-rojo:  0 0 0 1px rgba(251,90,106,.34), 0 0 20px rgba(251,90,106,.26);

  /* ── Cristal ── */
  --vidrio:     blur(22px);
  --vidrio-sut: blur(12px);

  --r-s: 10px; --r: 14px; --r-l: 20px; --r-xl: 28px; --r-xxl: 36px;
  --nav: 264px;

  --fuente: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable',
            'Segoe UI', Inter, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, 'JetBrains Mono', Menlo, monospace;

  --t: 180ms cubic-bezier(.4, 0, .2, 1);
  --t-lento: 420ms cubic-bezier(.16, 1, .3, 1);
}

html[data-tema="claro"] {
  --void:       #eef1f8;
  --fondo:      #f4f6fc;
  --fondo-2:    #ffffff;
  --losa:       #f4fbff;
  --losa-alta:  #ffffff;
  --losa-solida:#ffffff;

  --sup-alta:   #ffffff;
  --sup-media:  #f4fbff;
  --sup-honda:  #eaf2fb;
  --sup-barra:  #ffffff;
  --g-tarjeta:  linear-gradient(158deg, #ffffff 0%, #f8fcff 46%, #f2f8ff 100%);
  --g-alta:     linear-gradient(158deg, #ffffff 0%, #f4fbff 100%);
  --g-cristal:  linear-gradient(158deg, #ffffff, #eef8ff);
  --g-honda:    linear-gradient(180deg, #f0f6fd 0%, #e7eff9 100%);

  --borde:      rgba(0, 144, 212, .3);
  --borde-vivo: rgba(0, 144, 212, .58);
  --brillo-sup: rgba(255, 255, 255, .96);

  --texto:      #0d1020;
  --texto-2:    #545c78;
  --texto-3:    #646b87;

  --azul:        #0090d4;
  --azul-hi:     #0077b6;
  --azul-hondo:  #005f8f;
  --verde:       #00a86b;
  --verde-hi:    #008f5a;
  --verde-hondo: #00734a;
  --verde-claro: #00a86b;
  --gris:        #64748b;
  --rojo:        #e11d48;

  --s-1: 0 1px 2px rgba(15,23,42,.07);
  --s-2: 0 2px 6px rgba(15,23,42,.07), 0 8px 20px rgba(15,23,42,.07);
  --s-3: 0 4px 12px rgba(15,23,42,.09), 0 18px 40px rgba(15,23,42,.1);
  --s-4: 0 8px 24px rgba(15,23,42,.12), 0 34px 70px rgba(15,23,42,.14);

  --glow-marca: 0 0 0 1px rgba(0,144,212,.26), 0 6px 22px rgba(0,144,212,.22);
  --glow-verde-neon:  0 0 0 1px rgba(0,168,107,.26), 0 6px 22px rgba(0,168,107,.2);
  --glow-verde: 0 0 0 1px rgba(0,168,107,.28), 0 6px 18px rgba(0,168,107,.2);
  --glow-rojo:  0 0 0 1px rgba(225,29,72,.26), 0 6px 18px rgba(225,29,72,.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Regla innegociable: nada se mueve nunca hacia los lados. */
html, body { max-width: 100%; overflow-x: clip; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  background: var(--fondo);
  color: var(--texto);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  transition: background var(--t), color var(--t);
}

/* ── Atmósfera: focos de luz de colores detrás de todo ──
   Es lo que hace que el cristal tenga algo que refractar. Sin esto el
   glassmorphism se ve gris y muerto. */
body::before {
  content: '';
  position: fixed; inset: -20%;
  z-index: -2; pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 10% -8%,  rgba(0, 200, 255, .2), transparent 58%),
    radial-gradient(38vw 38vw at 94% 6%,   rgba(0, 255, 156, .12), transparent 56%),
    radial-gradient(52vw 52vw at 70% 104%, rgba(0, 200, 255, .1),  transparent 60%),
    var(--void);
}
html[data-tema="claro"] body::before {
  background:
    radial-gradient(48vw 48vw at 12% -6%,  rgba(0, 200, 255, .16), transparent 62%),
    radial-gradient(42vw 42vw at 92% 8%,   rgba(0, 255, 156, .14), transparent 60%),
    radial-gradient(56vw 56vw at 68% 102%, rgba(0, 255, 156, .1), transparent 64%),
    var(--void);
}

/* Rejilla técnica finísima: da escala y sensación de plataforma. */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 25%, transparent 78%);
}
html[data-tema="claro"] body::after {
  background-image:
    linear-gradient(rgba(15,20,45,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,20,45,.03) 1px, transparent 1px);
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

::selection { background: rgba(0, 200, 255, .34); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--azul), var(--verde));
  border-radius: 99px; border: 3px solid transparent; background-clip: content-box;
  opacity: .5;
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--azul), 0 0 18px rgba(0,200,255,.5);
  border-radius: 6px;
}

/* ═══════════════════ TIPOGRAFÍA ═══════════════════ */

h1, h2, h3, h4 { line-height: 1.14; font-weight: 680; letter-spacing: -.032em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 4.2rem); letter-spacing: -.045em; font-weight: 720; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: -.038em; }
h3 { font-size: 1.14rem; letter-spacing: -.024em; }

.apagado { color: var(--texto-2); }
.mini { font-size: .83rem; color: var(--texto-2); letter-spacing: -.005em; }
.micro {
  font-size: .7rem; color: var(--texto-3); font-weight: 680;
  text-transform: uppercase; letter-spacing: .13em;
}

/* Texto con degradado neón. */
.neon {
  background: linear-gradient(110deg, var(--azul-hi) 0%, var(--verde-hi) 46%, var(--verde-claro) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-tema="claro"] .neon {
  background: linear-gradient(110deg, var(--azul) 0%, var(--verde) 52%, #00a86b 100%);
  -webkit-background-clip: text; background-clip: text;
}

/* Texto que además irradia luz. Solo para titulares. */
.neon-vivo { color: var(--azul-hi); text-shadow: 0 0 24px rgba(0,200,255,.6), 0 0 60px rgba(0,200,255,.3); }

/* ═══════════════════ CRISTAL Y PROFUNDIDAD ═══════════════════ */

/* La superficie base de toda la interfaz: cristal con borde iluminado arriba
   (como si la luz cayera desde arriba) y sombra de contacto abajo. */
.vidrio {
  position: relative;
  background: var(--losa);
  border: 1px solid var(--borde);
  border-radius: var(--r-l);
  box-shadow: var(--s-3), inset 0 1px 0 var(--brillo-sup);
}

/* Filo iluminado: una línea de luz que recorre el borde superior. Es el
   detalle que convierte una caja plana en un objeto con canto. */
.vidrio::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(150deg,
    rgba(120,230,255,.9) 0%, rgba(0,200,255,.3) 22%, transparent 46%,
    transparent 62%, rgba(0,255,156,.34) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .85;
}
html[data-tema="claro"] .vidrio::before {
  background: linear-gradient(150deg, rgba(0,144,212,.6) 0%, transparent 42%, rgba(0,168,107,.28) 100%);
}

/* Objetos que salen de la pantalla. La perspectiva la pone el contenedor. */
.escena { perspective: 1400px; perspective-origin: 50% 30%; }

.flota {
  transform-style: preserve-3d;
  transition: transform var(--t-lento), box-shadow var(--t-lento), border-color var(--t);
  will-change: transform;
}
.flota:hover {
  transform: translateY(-6px) translateZ(30px) rotateX(2.5deg);
  box-shadow: var(--s-4), var(--halo-fuerte), inset 0 1px 0 var(--brillo-sup);
  border-color: var(--borde-vivo);
}

/* Elevaciones sueltas, para componer capas. */
.z1 { box-shadow: var(--s-1); }
.z2 { box-shadow: var(--s-2); }
.z3 { box-shadow: var(--s-3); }
.z4 { box-shadow: var(--s-4); }

.brilla-marca { box-shadow: var(--s-3), var(--glow-marca); }
.brilla-verde-neon  { box-shadow: var(--s-3), var(--glow-verde-neon); }
.brilla-verde { box-shadow: var(--s-2), var(--glow-verde); }

/* ═══════════════════ HALO ═══════════════════
   Luz que sale por detrás de la pieza y baña el borde desde fuera.

   Se hace con box-shadow, NO con un pseudo-elemento: la sombra se pinta siempre
   por fuera del borde del elemento, así que es imposible que quede por delante
   del contenido. Dos sombras cruzadas (azul desde abajo-izquierda, verde desde
   arriba-derecha) dan el degradado sin necesidad de capas.

   .halo        → intensidad normal
   .halo-fuerte → para la pieza protagonista
   .halo-fijo   → respira despacio, para lo que está siempre encendido */

:root {
  --halo:        0 0 0 1px rgba(0, 200, 255, .28), 0 8px 34px -10px rgba(0, 200, 255, .52), 0 0 48px -12px rgba(37, 211, 102, .42);
  --halo-medio:  0 0 0 1px rgba(0, 200, 255, .42), 0 10px 48px -10px rgba(0, 200, 255, .7),  0 0 66px -12px rgba(37, 211, 102, .5);
  --halo-fuerte: 0 0 0 1px rgba(0, 200, 255, .6),  0 14px 64px -10px rgba(0, 200, 255, .9),  0 0 86px -10px rgba(37, 211, 102, .58);
  --halo-verde:  0 0 0 1px rgba(37, 211, 102, .4), 0 8px 36px -10px rgba(37, 211, 102, .7), 0 0 50px -12px rgba(0, 200, 255, .34);
}

html[data-tema="claro"] {
  --halo:        0 0 0 1px rgba(0, 144, 212, .24), 0 8px 28px -12px rgba(0, 144, 212, .42);
  --halo-medio:  0 0 0 1px rgba(0, 144, 212, .34), 0 10px 38px -12px rgba(0, 144, 212, .55);
  --halo-fuerte: 0 0 0 1px rgba(0, 144, 212, .48), 0 14px 50px -12px rgba(0, 144, 212, .7);
  --halo-verde:  0 0 0 1px rgba(15, 157, 88, .34), 0 8px 30px -12px rgba(37, 211, 102, .5);
}

.halo        { box-shadow: var(--s-3), var(--halo), inset 0 1px 0 var(--brillo-sup); }
.halo-verde  { box-shadow: var(--s-3), var(--halo-verde), inset 0 1px 0 var(--brillo-sup); }
.halo:hover, .halo-verde:hover { box-shadow: var(--s-4), var(--halo-fuerte), inset 0 1px 0 var(--brillo-sup); }

.halo-fijo { animation: respira 5s ease-in-out infinite; }
@keyframes respira {
  0%, 100% { box-shadow: var(--s-3), var(--halo-medio),  inset 0 1px 0 var(--brillo-sup) }
  50%      { box-shadow: var(--s-4), var(--halo-fuerte), inset 0 1px 0 var(--brillo-sup) }
}

/* ═══════════════════ BOTONES 3D ═══════════════════ */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px;
  border-radius: var(--r);
  font-weight: 620; font-size: .92rem; letter-spacing: -.012em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), opacity var(--t);
  transform-style: preserve-3d;
}
.btn:disabled { opacity: .4; pointer-events: none; }

/* El principal es una pieza sólida iluminada: degradado + filo superior claro
   + sombra proyectada de color. Al pulsarlo se hunde. */
.btn-principal {
  background: linear-gradient(140deg, #5ee0ff 0%, #00c8ff 44%, #0077b6 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,.34) inset,
    0 -2px 0 rgba(0,0,0,.26) inset,
    0 4px 10px rgba(0, 58, 92, .44),
    0 14px 34px rgba(0, 200, 255, .34),
    0 0 34px rgba(0, 200, 255, .22);
  text-shadow: 0 1px 2px rgba(0, 30, 46, .4);
}
.btn-principal:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.4) inset,
    0 -2px 0 rgba(0,0,0,.26) inset,
    0 6px 14px rgba(0, 58, 92, .5),
    0 20px 48px rgba(0, 200, 255, .46),
    0 0 54px rgba(0, 200, 255, .34);
}
.btn-principal:active { transform: translateY(1px) scale(.985); }

.btn-verde {
  background: linear-gradient(140deg, #7dffc9 0%, #00ff9c 46%, #00a86b 100%);
  color: #00160e;
  box-shadow:
    0 1px 0 rgba(255,255,255,.5) inset, 0 -2px 0 rgba(0,0,0,.18) inset,
    0 4px 10px rgba(0, 168, 107, .42), 0 14px 34px rgba(0, 255, 156, .32), 0 0 30px rgba(0, 255, 156, .22);
}
.btn-verde:hover { transform: translateY(-2px); }
.btn-verde:active { transform: translateY(1px) scale(.985); }

/* Cristal: se usa para todo lo secundario. Su borde se enciende al pasar. */
.btn-vidrio {
  background: var(--g-cristal);
  border-color: var(--borde);
  color: var(--texto);
  box-shadow: var(--s-2), inset 0 1px 0 var(--brillo-sup);
}
.btn-vidrio:hover {
  border-color: rgba(0,200,255,.5);
  box-shadow: var(--s-3), 0 0 20px rgba(0,200,255,.24), inset 0 1px 0 var(--brillo-sup);
  transform: translateY(-1px);
}
.btn-vidrio:active { transform: translateY(1px); }

/* En modo día el cristal se aclara: si no, queda texto oscuro sobre fondo
   oscuro y el botón no se lee. Pasaba en "Entrar" y en los botones de plan. */
html[data-tema="claro"] .btn-vidrio {
  background: linear-gradient(158deg, #ffffff, #eef8ff);
  border-color: rgba(0, 144, 212, .38);
  color: var(--sup-media);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 4px 12px rgba(0, 144, 212, .12);
}
html[data-tema="claro"] .btn-vidrio:hover {
  border-color: rgba(0, 144, 212, .6);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .1), 0 8px 20px rgba(0, 144, 212, .2);
}

.btn-fantasma { color: var(--texto-2); }
.btn-fantasma:hover { color: var(--texto); background: var(--sup-media); }
html[data-tema="claro"] .btn-fantasma:hover { background: #eaf6fd; }

.btn-mal {
  background: linear-gradient(140deg, rgba(251,90,106,.2), rgba(251,90,106,.1));
  color: var(--rojo); border-color: rgba(251,90,106,.34);
}
.btn-mal:hover { box-shadow: var(--glow-rojo); transform: translateY(-1px); }

.btn-s { padding: 7px 13px; font-size: .82rem; border-radius: var(--r-s); gap: 6px; }
.btn-l { padding: 15px 30px; font-size: 1.03rem; border-radius: var(--r-l); }
.btn-bloque { width: 100%; }
.btn-icono { padding: 9px; border-radius: var(--r-s); }

/* ═══════════════════ CAMPOS ═══════════════════ */

.campo { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.campo > label { font-size: .855rem; font-weight: 620; letter-spacing: -.012em; }
.campo .pista { font-size: .785rem; color: var(--texto-3); line-height: 1.5; }
.campo .req { color: var(--azul-hi); margin-left: 3px; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=search], textarea, select {
  width: 100%; padding: 12px 15px;
  background: var(--sup-honda);
  border: 1px solid rgba(0, 200, 255, .3);
  border-radius: var(--r);
  font-size: 15px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.28);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
html[data-tema="claro"] input[type=text], html[data-tema="claro"] input[type=email],
html[data-tema="claro"] input[type=password], html[data-tema="claro"] input[type=tel],
html[data-tema="claro"] input[type=number], html[data-tema="claro"] input[type=date],
html[data-tema="claro"] input[type=search], html[data-tema="claro"] textarea,
html[data-tema="claro"] select {
  background: rgba(255,255,255,.86); box-shadow: inset 0 2px 5px rgba(15,23,42,.05);
}

/* 16px en móvil: por debajo iOS hace zoom al enfocar y descoloca el layout. */
@media (max-width: 640px) {
  input, textarea, select { font-size: 16px !important; }
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(0,200,255,.65);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.24), 0 0 0 3px rgba(0,200,255,.18), 0 0 22px rgba(0,200,255,.22);
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
textarea { resize: vertical; min-height: 100px; line-height: 1.62; font-family: var(--fuente); }
select { appearance: none; cursor: pointer; padding-right: 38px; }
.campo-select { position: relative; }
.campo-select::after {
  content: ''; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--texto-2); border-bottom: 2px solid var(--texto-2);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* Interruptor con carril iluminado al encenderse. */
.interruptor { display: flex; align-items: center; gap: 13px; cursor: pointer; padding: 9px 0; }
.interruptor input { display: none; }
.interruptor .carril {
  width: 46px; height: 26px; border-radius: 99px; flex: none; position: relative;
  background: rgba(0,0,0,.42); border: 1px solid var(--borde);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.4);
  transition: background var(--t), box-shadow var(--t), border-color var(--t);
}
.interruptor .carril::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: linear-gradient(160deg, #fff, #cbd0e4);
  box-shadow: 0 2px 5px rgba(0,0,0,.44);
  transition: transform var(--t-lento);
}
.interruptor input:checked + .carril {
  background: linear-gradient(120deg, var(--azul), var(--verde));
  border-color: transparent;
  box-shadow: 0 0 18px rgba(0,200,255,.5), inset 0 1px 0 rgba(255,255,255,.34);
}
.interruptor input:checked + .carril::after { transform: translateX(20px); }
.interruptor .txt { font-size: .89rem; font-weight: 560; }

/* ═══════════════════ TARJETAS ═══════════════════ */

.tarjeta {
  position: relative;
  /* Sólida a propósito: nada de lo que hay detrás la atraviesa. */
  background: var(--g-tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--s-3), var(--halo), inset 0 1px 0 var(--brillo-sup);
  transition: transform var(--t-lento), box-shadow var(--t-lento), border-color var(--t);
}
.tarjeta::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(120,230,255,.95), rgba(0,200,255,.34) 24%, transparent 48%,
    transparent 64%, rgba(0,255,156,.36));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
html[data-tema="claro"] .tarjeta { background: linear-gradient(158deg, #ffffff 0%, #f2fbff 100%); }
html[data-tema="claro"] .tarjeta::before {
  background: linear-gradient(150deg, rgba(0,144,212,.62), transparent 44%, rgba(0,168,107,.3));
}

.tarjeta-viva:hover {
  transform: translateY(-4px);
  border-color: var(--borde-vivo);
  box-shadow: var(--s-4), var(--halo-fuerte), inset 0 1px 0 var(--brillo-sup);
}

.tarjeta-plana {
  background: rgba(9, 30, 48, .96); border: 1px solid rgba(0, 200, 255, .3);
  border-radius: var(--r); padding: 16px;
  box-shadow: var(--s-1), inset 0 1px 0 rgba(120, 230, 255, .28);
}
html[data-tema="claro"] .tarjeta-plana { background: #fff; }

/* ═══════════════════ INSIGNIAS Y ESTADOS ═══════════════════ */

.insignia {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 99px;
  font-size: .74rem; font-weight: 640; letter-spacing: -.005em;
  background: var(--sup-media); border: 1px solid var(--borde); color: var(--texto-2);
}
html[data-tema="claro"] .insignia { background: #eef8ff; }
.insignia.ok    { color: var(--verde);   border-color: rgba(0,255,156,.34);  background: rgba(0,255,156,.1);  box-shadow: 0 0 16px rgba(0,255,156,.2); }
.insignia.mal   { color: var(--rojo);    border-color: rgba(251,90,106,.34); background: rgba(251,90,106,.1); box-shadow: 0 0 16px rgba(251,90,106,.18); }
.insignia.avi   { color: var(--ambar);   border-color: rgba(251,191,36,.34); background: rgba(251,191,36,.1); }
.insignia.marca { color: var(--azul-hi); border-color: rgba(0,200,255,.38); background: rgba(0,200,255,.12); box-shadow: 0 0 16px rgba(0,200,255,.22); }
.insignia.verde-neon  { color: var(--verde-hi); border-color: rgba(0,255,156,.38); background: rgba(0,255,156,.1); }

.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--texto-3); }
.punto.vivo {
  background: var(--verde);
  box-shadow: 0 0 0 3px rgba(0,255,156,.16), 0 0 12px var(--verde);
  animation: pulso 2.6s ease-in-out infinite;
}
.punto.mal { background: var(--rojo); box-shadow: 0 0 10px var(--rojo); }
.punto.avi { background: var(--ambar); box-shadow: 0 0 10px var(--ambar); animation: pulso 2.6s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { opacity: 1 } 50% { opacity: .4 } }

/* ═══════════════════ ESTRUCTURA DEL PANEL ═══════════════════ */

.disposicion { display: flex; min-height: 100vh; min-height: 100dvh; }

.lateral {
  width: var(--nav); flex: none;
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--g-honda);
  border-right: 1px solid var(--borde);
}
html[data-tema="claro"] .metrica { background: linear-gradient(158deg, #ffffff 0%, #f2fbff 100%); }
html[data-tema="claro"] .lateral {
  background: linear-gradient(180deg, #ffffff, #f2fbff);
}

.marca-caja { display: flex; align-items: center; gap: 11px; padding: 6px 10px 20px; }
.marca-logo {
  width: 36px; height: 36px; flex: none;
  object-fit: contain; padding: 3px;
  /* El logo es azul y plata sobre transparente: sobre blanco la plata
     desaparece y solo queda un garabato. Se le da su propia losa oscura, la
     misma en los dos temas, y así la marca se ve siempre igual. */
  border-radius: 11px;
  background: linear-gradient(150deg, #0e2c45, #061626);
  border: 1px solid var(--borde);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 0 18px -6px rgba(0, 200, 255, .7);
  transition: transform var(--t-lento), box-shadow var(--t-lento);
}
.marca-caja:hover .marca-logo {
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 0 22px -5px rgba(37, 211, 102, .85);
}

.marca-texto { font-weight: 700; font-size: .95rem; line-height: 1.16; letter-spacing: -.026em; }

.nav-enlace {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: var(--r);
  color: var(--texto-2); font-weight: 570; font-size: .895rem;
  border: 1px solid transparent;
  transition: color var(--t), background var(--t), border-color var(--t), box-shadow var(--t), transform var(--t);
}
.nav-enlace:hover { color: var(--texto); background: var(--sup-media); transform: translateX(2px); }
html[data-tema="claro"] .nav-enlace:hover { background: #eaf6fd; }
.nav-enlace.activo {
  color: #fff;
  background: linear-gradient(100deg, rgba(0,200,255,.28), rgba(0,255,156,.12));
  border-color: rgba(0,200,255,.34);
  box-shadow: 0 2px 10px rgba(0,200,255,.24), inset 0 1px 0 rgba(255,255,255,.14);
}
html[data-tema="claro"] .nav-enlace.activo { color: var(--azul); }
/* Barra de luz a la izquierda del activo. */
.nav-enlace.activo::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: linear-gradient(var(--azul), var(--verde));
  box-shadow: 0 0 12px var(--azul);
}
.nav-enlace .ico { width: 18px; height: 18px; flex: none; }
.nav-enlace .globo {
  margin-left: auto; font-size: .68rem; font-weight: 720; padding: 1px 7px; border-radius: 99px;
  background: linear-gradient(120deg, var(--azul), var(--verde)); color: #fff;
  box-shadow: 0 0 12px rgba(0,200,255,.5);
}
.nav-grupo { margin-top: 20px; padding: 0 13px 7px; }
.nav-pie { margin-top: auto; padding-top: 14px; }

.contenido { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.barra {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  position: sticky; top: 0; z-index: 30;
  background: var(--sup-barra);
  border-bottom: 1px solid var(--borde);
}
html[data-tema="claro"] .barra { background: #ffffff; }
.barra h1 { font-size: 1.2rem; letter-spacing: -.028em; }
.barra .derecha { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.vista { padding: 28px; flex: 1; min-width: 0; }
.vista-ancha { max-width: 1240px; }

.abre-menu { display: none; }

@media (max-width: 900px) {
  .lateral {
    position: fixed; inset: 0 auto 0 0; z-index: 100;
    transform: translateX(-100%); transition: transform var(--t-lento);
    box-shadow: var(--s-4);
  }
  .lateral.abierto { transform: none; }
  .abre-menu { display: inline-flex; }
  .vista { padding: 18px 15px; }
  .barra { padding: 12px 15px; }
  .velo-nav {
    position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,.74); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity var(--t);
  }
  .velo-nav.visible { opacity: 1; pointer-events: auto; }
}

/* ═══════════════════ REJILLAS Y MÉTRICAS ═══════════════════ */

.rejilla { display: grid; gap: 18px; }
.rejilla.c2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.rejilla.c3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.rejilla.c4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }

/* La métrica es la pieza 3D estrella del panel: cristal, filo iluminado de
   color arriba y halo del color de su categoría al pasar por encima. */
.metrica {
  position: relative; overflow: hidden;
  background: var(--g-tarjeta);
  border: 1px solid var(--borde); border-radius: var(--r-xl);
  padding: 20px 22px;
  box-shadow: var(--s-3), var(--halo), inset 0 1px 0 var(--brillo-sup);
  transform-style: preserve-3d;
  transition: transform var(--t-lento), box-shadow var(--t-lento), border-color var(--t);
}
.metrica::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--azul), var(--verde), transparent);
  box-shadow: 0 0 14px var(--azul);
}
/* Brillo interior que asoma por la esquina superior derecha. */
.metrica > .destello {
  position: absolute; top: -60%; right: -30%;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,255,.34), transparent 66%);
  pointer-events: none; opacity: .6; transition: opacity var(--t-lento);
}
.metrica:hover {
  transform: translateY(-5px) rotateX(3deg);
  border-color: var(--borde-vivo);
  box-shadow: var(--s-4), var(--halo-fuerte), inset 0 1px 0 var(--brillo-sup);
}
.metrica:hover > .destello { opacity: 1; }

.metrica.verde-neon::before { background: linear-gradient(90deg, transparent, var(--verde), var(--verde), transparent); box-shadow: 0 0 14px var(--verde); }
.metrica.verde-neon > .destello { background: radial-gradient(circle, rgba(0,255,156,.32), transparent 68%); }
.metrica.verde::before{ background: linear-gradient(90deg, transparent, var(--verde), var(--verde), transparent); box-shadow: 0 0 14px var(--verde); }
.metrica.verde > .destello { background: radial-gradient(circle, rgba(0,255,156,.3), transparent 68%); }
.metrica.gris::before { background: linear-gradient(90deg, transparent, var(--gris), #cbd5e1, transparent); box-shadow: 0 0 14px rgba(148,163,184,.6); }
.metrica.gris > .destello { background: radial-gradient(circle, rgba(148,163,184,.28), transparent 68%); }

.metrica .etq { font-size: .79rem; color: var(--texto-2); font-weight: 580; position: relative; }
.metrica .valor {
  font-size: 2.3rem; font-weight: 720; letter-spacing: -.05em; line-height: 1.05;
  margin: 7px 0 3px; position: relative;
  font-variant-numeric: tabular-nums;
}
.metrica .pie { font-size: .76rem; color: var(--texto-3); position: relative; }

/* ═══════════════════ PROGRESO ═══════════════════ */

.progreso {
  height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(0,0,0,.36); box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
}
html[data-tema="claro"] .progreso { background: rgba(15,23,42,.08); box-shadow: inset 0 1px 3px rgba(15,23,42,.08); }
.progreso > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--azul), var(--verde));
  box-shadow: 0 0 14px rgba(0,200,255,.6), inset 0 1px 0 rgba(255,255,255,.3);
  transition: width 640ms cubic-bezier(.16,1,.3,1);
}
.progreso.avi > i { background: linear-gradient(90deg, var(--ambar), #f59e0b); box-shadow: 0 0 14px rgba(251,191,36,.55); }
.progreso.mal > i { background: linear-gradient(90deg, var(--rojo), #dc2626); box-shadow: 0 0 14px rgba(251,90,106,.55); }

/* ═══════════════════ CONVERSACIONES ═══════════════════ */

.chats { display: grid; grid-template-columns: 348px 1fr; height: calc(100vh - 61px); }
@media (max-width: 900px) {
  .chats { grid-template-columns: 1fr; height: calc(100dvh - 57px); }
  .chats.viendo .lista-chats { display: none; }
  .chats:not(.viendo) .hilo { display: none; }
}

.lista-chats { border-right: 1px solid var(--borde); display: flex; flex-direction: column; min-width: 0; }
.buscador-chats { padding: 13px; border-bottom: 1px solid var(--borde); display: flex; gap: 8px; }
.chats-scroll { flex: 1; overflow-y: auto; }

.chat-fila {
  position: relative;
  display: flex; gap: 12px; padding: 13px 15px; cursor: pointer;
  border-bottom: 1px solid var(--borde);
  transition: background var(--t), transform var(--t);
}
.chat-fila:hover { background: var(--sup-media); }
html[data-tema="claro"] .chat-fila:hover { background: #eef8ff; }
.chat-fila.activo {
  background: linear-gradient(100deg, rgba(0,200,255,.2), transparent 80%);
}
.chat-fila.activo::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--azul), var(--verde)); box-shadow: 0 0 12px var(--azul);
}
.avatar {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(0,200,255,.34), rgba(0,255,156,.22));
  border: 1px solid var(--borde-vivo);
  font-weight: 700; font-size: .84rem; color: var(--texto);
  box-shadow: var(--s-1), inset 0 1px 0 rgba(255,255,255,.16);
}
.chat-fila .cuerpo { min-width: 0; flex: 1; }
.chat-fila .nom { font-weight: 620; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-fila .prev { font-size: .805rem; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-fila .lado { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.globo-n {
  min-width: 20px; padding: 1px 6px; border-radius: 99px; font-size: .68rem; font-weight: 720;
  background: linear-gradient(120deg, var(--azul), var(--verde)); color: #fff;
  box-shadow: 0 0 12px rgba(0,200,255,.5);
}

.hilo { display: flex; flex-direction: column; min-width: 0; }
.hilo-cabeza {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--borde);
  background: var(--sup-honda);
}
html[data-tema="claro"] .hilo-cabeza { background: #ffffff; }
.hilo-mensajes { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 11px; }

/* Las burbujas también flotan: sombra de contacto y filo de luz. */
.burbuja {
  max-width: min(72%, 580px); padding: 10px 15px; border-radius: 18px;
  font-size: .91rem; line-height: 1.52; white-space: pre-wrap; word-break: break-word;
  box-shadow: var(--s-2); position: relative;
}
.burbuja.de-cliente {
  align-self: flex-start; border-bottom-left-radius: 6px;
  background: var(--sup-alta); border: 1px solid var(--borde);
  box-shadow: var(--s-2), inset 0 1px 0 var(--brillo-sup);
}
.burbuja.de-agente {
  align-self: flex-end; border-bottom-right-radius: 6px; color: #fff;
  background: linear-gradient(140deg, #00c8ff, #0077b6);
  box-shadow: 0 2px 8px rgba(0,58,92,.44), 0 10px 26px rgba(0,200,255,.28),
              0 0 26px rgba(0,200,255,.18), inset 0 1px 0 rgba(255,255,255,.24);
}
.burbuja.de-humano {
  align-self: flex-end; border-bottom-right-radius: 6px;
  background: linear-gradient(140deg, rgba(0,255,156,.28), rgba(0,168,107,.22));
  border: 1px solid rgba(0,255,156,.34);
  box-shadow: var(--s-2), 0 0 20px rgba(0,255,156,.16), inset 0 1px 0 rgba(255,255,255,.16);
}
.burbuja .hora { font-size: .67rem; opacity: .58; margin-top: 4px; display: block; }
.separador-dia {
  align-self: center; font-size: .71rem; color: var(--texto-3);
  padding: 4px 14px; border-radius: 99px; margin: 8px 0;
  background: var(--sup-media); border: 1px solid var(--borde);
}
html[data-tema="claro"] .separador-dia { background: #eef8ff; }

.redactor {
  border-top: 1px solid var(--borde); padding: 13px 18px;
  display: flex; gap: 11px; align-items: flex-end;
  background: var(--sup-honda);
}
html[data-tema="claro"] .redactor { background: #ffffff; }
.redactor textarea { min-height: 46px; max-height: 150px; border-radius: var(--r-l); }

/* ═══════════════════ EMBUDO (kanban 3D) ═══════════════════ */

.embudo { display: flex; gap: 15px; overflow-x: auto; padding: 4px 4px 14px; }
.columna { min-width: 268px; width: 268px; flex: none; display: flex; flex-direction: column; gap: 11px; }
.columna-cabeza { display: flex; align-items: center; gap: 9px; padding: 0 4px; }
.columna-cabeza .n { margin-left: auto; font-size: .75rem; color: var(--texto-3); font-weight: 660; }
.columna-cuerpo {
  display: flex; flex-direction: column; gap: 10px; min-height: 110px;
  padding: 11px; border-radius: var(--r-l);
  background: var(--sup-honda); border: 1px dashed var(--borde);
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
html[data-tema="claro"] .columna-cuerpo { background: #eaf6fd; }
.columna-cuerpo.encima {
  border-color: var(--azul); border-style: solid;
  background: rgba(0,200,255,.09);
  box-shadow: inset 0 0 30px rgba(0,200,255,.16), 0 0 22px rgba(0,200,255,.24);
}

.ficha-lead {
  background: var(--g-alta);
  border: 1px solid var(--borde); border-radius: var(--r);
  padding: 13px; cursor: grab;
  box-shadow: var(--s-2), inset 0 1px 0 var(--brillo-sup);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.ficha-lead:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(0,200,255,.5);
  box-shadow: var(--s-3), 0 0 26px rgba(0,200,255,.24), inset 0 1px 0 var(--brillo-sup);
}
.ficha-lead:active { cursor: grabbing; }
.ficha-lead.arrastrando { opacity: .3; transform: scale(.96) rotate(2deg); }
.ficha-lead .titulo { font-weight: 630; font-size: .9rem; }
.ficha-lead .sub { font-size: .8rem; color: var(--texto-2); margin-top: 3px; }
.ficha-lead .pie { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .73rem; color: var(--texto-3); }

/* ═══════════════════ TABLAS ═══════════════════ */

.tabla-caja {
  overflow-x: auto; border-radius: var(--r-xl);
  background: var(--g-tarjeta);
  border: 1px solid var(--borde);
  box-shadow: var(--s-3), var(--halo), inset 0 1px 0 var(--brillo-sup);
}
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  text-align: left; padding: 12px 15px; white-space: nowrap;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .11em; font-weight: 720;
  color: var(--texto-3); border-bottom: 1px solid var(--borde);
}
td { padding: 13px 15px; border-bottom: 1px solid var(--borde); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover { background: rgba(0,200,255,.07); }

/* ═══════════════════ MODAL ═══════════════════ */

.velo {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  display: grid; place-items: center;
  background: rgba(0, 8, 16, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: velo-entra 200ms ease;
  overflow-y: auto;
  /* El rebote del scroll se queda dentro del velo y no arrastra la página. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@keyframes velo-entra { from { opacity: 0 } }
.modal {
  width: min(580px, 100%); max-height: 88vh; overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px; border-radius: var(--r-xxl);
  background: var(--g-alta);
  border: 1px solid var(--borde-vivo);
  box-shadow: var(--s-4), var(--halo-medio), inset 0 1px 0 var(--brillo-sup);
  animation: modal-entra 320ms cubic-bezier(.16,1,.3,1);
}
@keyframes modal-entra {
  from { transform: translateY(20px) scale(.96); opacity: 0 }
}
.modal-cabeza { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.modal-cabeza h3 { flex: 1; }
/* Cabecera que solo lleva la X: se pega arriba a la derecha y no roba altura. */
.modal-cabeza.sola { justify-content: flex-end; margin: -4px -4px 2px 0; }

/* La X de cerrar: redonda, con borde y fondo propios, y con superficie de
   sobra para un dedo. Un icono gris de 16px sin caja se ve, pero nadie lo ve. */
.modal-x {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center; cursor: pointer;
  border-radius: 999px;
  color: var(--texto);
  background: rgba(0, 200, 255, .1);
  border: 1px solid var(--borde);
  box-shadow: 0 0 18px -8px rgba(0, 200, 255, .8);
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.modal-x:hover {
  background: rgba(251, 90, 106, .16);
  border-color: rgba(251, 90, 106, .7);
  color: #ffd7db;
  box-shadow: 0 0 20px -6px rgba(251, 90, 106, .8);
}
.modal-x:active { transform: scale(.93); }
html[data-tema="claro"] .modal-x { background: #eaf6fd; color: var(--sup-media); }
@media (max-width: 640px) { .modal-x { width: 44px; height: 44px; } }

/* ── El modal en el móvil ──────────────────────────────────────────────────
   En un teléfono el formulario de registro tiene cinco campos y no cabe en
   88vh; además Safari cuenta la barra de direcciones dentro de vh, así que el
   final del formulario queda debajo del borde. Se usa dvh (altura real
   visible) y se aprieta el espaciado para que quepa entero.             */
@media (max-width: 640px) {
  .velo { padding: 12px; align-items: start; }
  .modal {
    max-height: calc(100dvh - 24px);
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: var(--r-xl);
  }
  .modal .campo { margin-bottom: 12px; }
  .modal h2 { font-size: 1.32rem; }
}

/* ═══════════════════ AVISOS ═══════════════════ */

#avisos {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(390px, calc(100vw - 44px));
}
.aviso {
  padding: 13px 17px; border-radius: var(--r-l);
  background: var(--g-alta);
  border: 1px solid var(--borde-vivo); border-left: 3px solid var(--azul);
  box-shadow: var(--s-4), 0 0 30px rgba(0,200,255,.24);
  font-size: .88rem;
  animation: aviso-entra 300ms cubic-bezier(.16,1,.3,1);
}
.aviso.ok  { border-left-color: var(--verde); box-shadow: var(--s-4), 0 0 30px rgba(0,255,156,.24); }
.aviso.mal { border-left-color: var(--rojo);  box-shadow: var(--s-4), 0 0 30px rgba(251,90,106,.24); }
@keyframes aviso-entra { from { transform: translateX(34px) scale(.95); opacity: 0 } }
@media (max-width: 640px) { #avisos { left: 16px; right: 16px; bottom: 16px; max-width: none; } }

/* ═══════════════════ VACÍOS Y CARGA ═══════════════════ */

.vacio { text-align: center; padding: 60px 22px; color: var(--texto-2); }
.vacio .icono {
  font-size: 2.8rem; margin-bottom: 14px;
  filter: drop-shadow(0 0 22px rgba(0,200,255,.5));
}
.vacio h3 { margin-bottom: 7px; color: var(--texto); }

.esqueleto {
  border-radius: var(--r-s);
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: barrido 1.5s linear infinite;
}
html[data-tema="claro"] .esqueleto {
  background: linear-gradient(90deg, rgba(15,23,42,.05) 25%, rgba(15,23,42,.11) 50%, rgba(15,23,42,.05) 75%);
  background-size: 200% 100%;
}
@keyframes barrido { to { background-position: -200% 0 } }

.girando { animation: girar .9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg) } }

/* Anillo de carga con estela neón. */
.cargador {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid rgba(0,200,255,.16);
  border-top-color: var(--azul); border-right-color: var(--verde);
  animation: girar .85s linear infinite;
  filter: drop-shadow(0 0 8px rgba(0,200,255,.6));
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .flota:hover, .metrica:hover, .tarjeta-viva:hover, .ficha-lead:hover { transform: none; }
}
