/**
 * Pantalla de acceso de ARJ: panel de marca (mapa de Centroamérica con el buque y el avión, las
 * dos marcas, las esquinas del trámite, la selectividad aduanera, el radar de servicios y el
 * muelle) y la columna del formulario, que es una escena que cambia con la hora de Managua
 * (mañana, mediodía, tarde y noche).
 *
 * El HTML vive en resources/views/components/auth-shell.blade.php; el movimiento, en
 * public/js/acceso.js; el mapa (Natural Earth, dominio público), en public/js/acceso-mapa.js.
 * Todo es SVG y CSS: no se carga ninguna imagen de fondo.
 *
 * Probar otra hora sin esperar: agregar ?momento=manana|mediodia|tarde|noche a la dirección.
 */
/*
   * MAQUETA — no es el login real. Es una propuesta aparte, para compararla con
   * arj.test/login sin tocarlo. El botón solo muestra su animación; no envía nada.
   *
   * Qué cambia frente al acceso actual (y al de InTactics):
   *   1. De noche con estrellas a puerto al amanecer: cielo azul marino que baja a naranja.
   *   2. Un buque portacontenedores va de Miami a Corinto (por el Canal de Panamá) y un avión de Miami a Managua, ambos con estela.
   *   3. Cada marca con su propio tratamiento: ARJ con la ruta naranja, SmartTrace con un latido azul.
   *   4. Cuatro esquinas distintas: trámite, semáforo aduanal, hora de las plazas y muelle con grúa.
   *   5. El titular del formulario cambia solo.
   */
  :root {
    --marino: #0a1a44;
    --marino-2: #14296b;
    --naranja: #f66801;
    --naranja-claro: #ffa56b;
    --azul: #7db4f5;
    --tinta: #0f1b3d;
    --gris: #64708a;
    --linea: #dfe3ec;
  }
  .auth-pagina {
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif; color: var(--tinta);
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 28vw, 460px);
    background: #fff;
  }

  /* ================== Panel ================== */
  .panel {
    position: relative; overflow: hidden; min-height: 100vh; color: #eaf1fb;
    /* amanecer: arriba el azul de la marca, abajo el naranja que sale del mar */
    background:
      radial-gradient(70% 38% at 52% 108%, rgba(255,150,70,.95) 0%, rgba(246,104,1,.55) 38%, transparent 72%),
      radial-gradient(40% 25% at 52% 102%, rgba(255,220,170,.9) 0%, transparent 70%),
      linear-gradient(180deg, #081538 0%, #10246a 38%, #3a3f86 62%, #8a4a78 82%, #d9703f 100%);
    animation: amanecer 14s ease-in-out infinite alternate;
  }
  /* El cielo del panel sigue la hora de Managua (acceso.js pone data-momento en .auth-pagina).
     Mañana es el amanecer de arriba; las otras tres lo reemplazan. */
  .auth-pagina[data-momento="mediodia"] .panel {
    background:
      radial-gradient(60% 30% at 52% 108%, rgba(255,255,255,.55) 0%, transparent 70%),
      linear-gradient(180deg, #0f4f9e 0%, #2a7acb 40%, #5aa6e8 70%, #a8d8ff 100%);
  }
  .auth-pagina[data-momento="tarde"] .panel {
    background:
      radial-gradient(70% 38% at 52% 108%, rgba(255,160,70,.95) 0%, rgba(255,90,44,.5) 40%, transparent 72%),
      linear-gradient(180deg, #1d1646 0%, #4a2a74 34%, #b24f7c 64%, #ff8f4a 90%, #ffd08a 100%);
  }
  .auth-pagina[data-momento="noche"] .panel {
    background:
      radial-gradient(70% 30% at 52% 108%, rgba(60,100,200,.55) 0%, transparent 72%),
      linear-gradient(180deg, #020717 0%, #08143f 40%, #0f1f60 72%, #1d3277 100%);
  }
  @keyframes amanecer { from { filter: saturate(.92) brightness(.96); } to { filter: saturate(1.08) brightness(1.04); } }

  /* oleaje: rayitas de luz sobre el mar */
  .oleaje { position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; z-index: 1; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%); mask-image: linear-gradient(180deg, transparent, #000 70%); }
  .oleaje i { position: absolute; left: -20%; width: 140%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,214,170,.55), transparent);
    animation: ola 9s linear infinite; }
  @keyframes ola { from { transform: translateX(-12%); opacity: .2; } 50% { opacity: .9; } to { transform: translateX(12%); opacity: .2; } }

  /* ---- el mapa (lo inyecta /js/acceso-mapa.js) ---- */
  #mapaHueco { position: absolute; inset: 0; z-index: 2; }
  .mapa-fondo { position: absolute; inset: 0; width: 100%; height: 100%; }
  .pais { fill: rgba(8,20,56,.82); stroke: rgba(255,170,110,.45); stroke-width: .8; stroke-linejoin: round; }
  .pais-nic { fill: rgba(246,104,1,.30); stroke: rgba(255,190,140,.95); stroke-width: 1.3; filter: drop-shadow(0 0 8px rgba(246,104,1,.55)); }
  .mapa-polvo circle { fill: #ffd9b0; }
  .mapa-ciudades circle { fill: #ffe9d6; filter: drop-shadow(0 0 3px rgba(255,150,70,.95)); animation: latir 5.5s ease-in-out infinite; }
  @keyframes latir { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
  .ruta-mapa { fill: none; stroke: rgba(255,200,150,.8); stroke-width: 1.4; stroke-dasharray: 5 7; animation: correr 3.4s linear infinite; }
  @keyframes correr { to { stroke-dashoffset: -48; } }
  .traza-mapa, .caja-mapa { display: none; }
  .halo-mapa { fill: rgba(255,200,150,.3); transform-origin: center; transform-box: fill-box; animation: halo 3s ease-out infinite; }
  @keyframes halo { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
  .punto-mapa { fill: #fff; filter: drop-shadow(0 0 4px rgba(255,170,90,.95)); }
  .plaza-mapa text { fill: rgba(255,248,240,.95); font-size: 7.4px; font-weight: 500; letter-spacing: .09em; paint-order: stroke; stroke: rgba(8,20,56,.55); stroke-width: 2px; }
  .plaza-mapa.plaza-base text { font-weight: 700; }

  /* el buque y su estela (se agregan desde el script) */
  .guia { fill: none; stroke-width: 1.1; stroke-dasharray: 3 7; opacity: .75; animation: correr 4s linear infinite; }
  .guia.mar { stroke: rgba(255,190,140,.8); }
  .guia.aire { stroke: rgba(160,205,255,.85); }
  .estela { fill: none; stroke-width: 1.8; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 4px rgba(255,255,255,.7)); }
  .estela.mar { stroke: rgba(255,255,255,.65); }
  .estela.aire { stroke: rgba(190,225,255,.9); stroke-width: 2.2; }
  .viajero .avion { fill: #fff; stroke: rgba(10,26,68,.55); stroke-width: .5; filter: drop-shadow(0 0 5px rgba(160,205,255,.95)); }
  .buque .casco { fill: #0b1a44; stroke: #fff; stroke-width: .8; }
  .buque .carga rect { stroke: rgba(0,0,0,.25); stroke-width: .3; }

  /* ---- las dos marcas, cada una con su tratamiento ---- */
  .marcas { position: absolute; z-index: 6; top: clamp(20px, 3.4vh, 38px); left: clamp(22px, 3vw, 44px); right: clamp(22px, 3vw, 44px);
    display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
  .marca { display: grid; gap: 8px; animation: entrar .9s cubic-bezier(.16,1,.3,1) both; }
  .marca:nth-child(2) { animation-delay: .15s; justify-items: end; text-align: right; }
  .marcas { z-index: 6; }
  .marca .placa { background: #fff; border-radius: 14px; padding: 10px 16px; display: inline-flex; box-shadow: 0 10px 30px -10px rgba(0,0,0,.55); position: relative; }
  .marca img { height: clamp(40px, 4.6vh, 54px); width: auto; display: block; }
  .marca small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(234,241,251,.78); }
  /* ARJ: un filo naranja que se dibuja bajo la placa */
  .marca.arj .placa::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -5px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--naranja), var(--naranja-claro)); transform-origin: left; animation: filo 3.6s ease-in-out infinite; }
  @keyframes filo { 0% { transform: scaleX(0); } 45%, 80% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
  /* SmartTrace: late como un sistema encendido */
  .marca.st .placa::before, .marca.st .placa::after { content: ''; position: absolute; inset: -2px; border-radius: 16px; border: 1.5px solid rgba(125,180,245,.8); animation: pulso 2.8s ease-out infinite; }
  .marca.st .placa::after { animation-delay: 1.4s; }
  @keyframes pulso { from { transform: scale(1); opacity: .9; } to { transform: scale(1.18, 1.5); opacity: 0; } }
  @keyframes entrar { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

  /* ---- esquinas ---- */
  .esquina { position: absolute; z-index: 5; animation: entrar 1s cubic-bezier(.16,1,.3,1) both; }
  .esquina { text-shadow: 0 1px 6px rgba(6,14,40,.85); }
  .esquina h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: rgba(255,230,205,.8); }
  .e-tramite { left: clamp(22px, 3vw, 44px); top: 25%; width: min(300px, 30%); animation-delay: .3s; }
  .e-semaforo { right: clamp(22px, 3vw, 44px); top: 25%; width: 190px; animation-delay: .45s; }
  .e-muelle { right: clamp(22px, 3vw, 44px); bottom: clamp(20px, 3.4vh, 36px); width: 250px; animation-delay: .75s; }

  /* trámite */
  .hito { position: relative; display: flex; gap: 14px; padding-bottom: 20px; }
  .hito:last-child { padding-bottom: 0; }
  .hito .m { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 1.5px solid rgba(255,200,150,.7); background: rgba(8,20,56,.8); position: relative; }
  .hito:not(:last-child) .m::after { content: ''; position: absolute; left: 50%; top: 15px; width: 1.5px; height: 26px; margin-left: -.75px; background: rgba(255,255,255,.22); }
  .hito .m i { position: absolute; inset: 2.5px; border-radius: 50%; background: var(--naranja-claro); transform: scale(0); animation: prender 9s linear infinite; }
  .hito .t { opacity: .45; animation: aclarar 9s linear infinite; }
  .hito b { display: block; font-size: 14px; font-weight: 600; color: #fff; }
  .hito span { font-size: 12.5px; color: rgba(255,240,225,.7); }
  @keyframes prender { 0%,4% { transform: scale(0); } 8%,96% { transform: scale(1); } 100% { transform: scale(0); } }
  @keyframes aclarar { 0%,4% { opacity: .4; } 9%,96% { opacity: 1; } 100% { opacity: .4; } }

  /* semáforo aduanal */
  .semaforo { display: flex; align-items: center; gap: 14px; }
  .caja-luces { display: grid; gap: 7px; padding: 9px; border-radius: 14px; background: rgba(6,14,40,.78); border: 1px solid rgba(255,255,255,.18); }
  .luz { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.1); }
  .luz.v { animation: lv 9s infinite; } .luz.a { animation: la 9s infinite; } .luz.r { animation: lr 9s infinite; }
  @keyframes lv { 0%,30% { background: #3ddc84; box-shadow: 0 0 16px #3ddc84; } 33%,100% { background: rgba(255,255,255,.1); box-shadow: none; } }
  @keyframes la { 0%,33% { background: rgba(255,255,255,.1); box-shadow: none; } 36%,63% { background: #ffc23d; box-shadow: 0 0 16px #ffc23d; } 66%,100% { background: rgba(255,255,255,.1); box-shadow: none; } }
  @keyframes lr { 0%,66% { background: rgba(255,255,255,.1); box-shadow: none; } 69%,97% { background: #ff5a4d; box-shadow: 0 0 16px #ff5a4d; } 100% { background: rgba(255,255,255,.1); box-shadow: none; } }
  .estado { position: relative; height: 54px; width: 130px; }
  .estado p { position: absolute; inset: 0; margin: 0; display: grid; align-content: center; opacity: 0; font-size: 12.5px; color: rgba(255,240,225,.75); }
  .estado b { font-size: 14px; color: #fff; display: block; }
  .estado p:nth-child(1) { animation: s1 9s infinite; } .estado p:nth-child(2) { animation: s2 9s infinite; } .estado p:nth-child(3) { animation: s3 9s infinite; }
  @keyframes s1 { 0%,30% { opacity: 1; } 33%,100% { opacity: 0; } }
  @keyframes s2 { 0%,33% { opacity: 0; } 36%,63% { opacity: 1; } 66%,100% { opacity: 0; } }
  @keyframes s3 { 0%,66% { opacity: 0; } 69%,97% { opacity: 1; } 100% { opacity: 0; } }

  /* horas de las plazas */
  .horas { display: flex; gap: 22px; }
  .reloj { display: grid; gap: 4px; justify-items: start; }
  .reloj .hora { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: #fff; }
  .reloj .hora em { font-style: normal; animation: parpadeo 1s steps(2) infinite; }
  .reloj .lugar { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,230,205,.8); display: flex; align-items: center; gap: 7px; }
  .reloj .lugar i { width: 6px; height: 6px; border-radius: 50%; background: var(--naranja-claro); box-shadow: 0 0 8px var(--naranja); }
  .reloj.fuera .lugar i { background: var(--azul); box-shadow: 0 0 8px var(--azul); }
  @keyframes parpadeo { 50% { opacity: .2; } }
  .brujula { width: 74px; height: 74px; border-radius: 50%; border: 1px solid rgba(255,220,190,.5); position: relative; margin-right: 6px; flex: none; align-self: center; }
  .brujula::before { content: 'N'; position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: var(--naranja-claro); }
  .brujula .aguja { position: absolute; left: 50%; top: 10px; width: 0; height: 0; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 27px solid var(--naranja-claro);
    transform-origin: 50% 27px; animation: oscilar 7s ease-in-out infinite; filter: drop-shadow(0 0 5px rgba(246,104,1,.8)); }
  .brujula .aguja::after { content: ''; position: absolute; left: -5px; top: 27px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 27px solid rgba(255,255,255,.55); }
  @keyframes oscilar { 0%,100% { transform: rotate(-14deg); } 50% { transform: rotate(18deg); } }

  /* muelle con grúa pórtico */
  .muelle { position: relative; height: 150px; }
  .portico { position: absolute; left: 6%; right: 6%; top: 0; height: 100%; }
  .portico .viga { position: absolute; top: 4px; left: 0; right: 0; height: 6px; border-radius: 3px; background: rgba(255,235,215,.75); }
  .portico .pata { position: absolute; top: 4px; bottom: 16px; width: 5px; background: rgba(255,235,215,.55); }
  .portico .pata.i { left: 6%; } .portico .pata.d { right: 6%; }
  .carro { position: absolute; top: 10px; left: 0; width: 1px; height: 1px; animation: carro 8s ease-in-out infinite; }
  .carro .cable { position: absolute; left: 0; top: 0; width: 1.5px; background: rgba(255,235,215,.8); height: 18px; animation: cable 8s ease-in-out infinite; }
  .carro .cajon { position: absolute; left: -17px; width: 36px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, #ffb27a, #e8590a); border: 1px solid rgba(255,255,255,.55); top: 18px; animation: cajon 8s ease-in-out infinite; }
  @keyframes carro { 0%,6% { left: 18%; } 38%,50% { left: 76%; } 82%,100% { left: 18%; } }
  @keyframes cable { 0%,6% { height: 22px; } 14% { height: 44px; } 22% { height: 22px; } 38% { height: 22px; } 46%,50% { height: 56px; } 60% { height: 22px; } 100% { height: 22px; } }
  @keyframes cajon { 0%,6% { top: 22px; } 14% { top: 44px; } 22% { top: 22px; } 38% { top: 22px; } 46%,50% { top: 56px; } 60%,100% { top: 22px; } }
  .pila { position: absolute; bottom: 16px; display: grid; gap: 2px; }
  .pila b { display: block; width: 36px; height: 15px; border-radius: 2px; border: 1px solid rgba(255,255,255,.45); background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08)); }
  .pila b.n { background: linear-gradient(180deg, #ffb27a, #e8590a); }
  .pila.p1 { left: 10%; } .pila.p2 { right: 10%; }
  .pila.p2 b:last-child { animation: aparecer 8s infinite; }
  @keyframes aparecer { 0%,50% { opacity: 0; transform: translateY(-14px); } 56%,92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
  .suelo { position: absolute; left: 0; right: 0; bottom: 13px; height: 2px; background: rgba(255,235,215,.45); }


  /* ---- cielo: estrellas y fugaces (solo arriba, se desvanecen hacia el amanecer) ---- */
  .cielo { position: absolute; inset: 0 0 auto 0; width: 100%; height: 52%; z-index: 1; pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
  .estrella { fill: #fff; animation: titilar 3s ease-in-out infinite alternate; }
  /* Qué se ve en el cielo según el momento: estrellas y luna de noche, sol y nubes de día */
  .cielo .estrella, .cielo .fugaz, .cielo .astro-sol, .cielo .astro-luna, .cielo .nube-c { display: none; }
  .auth-pagina:not([data-momento]) .cielo .estrella, .auth-pagina:not([data-momento]) .cielo .fugaz,
  .auth-pagina[data-momento="noche"] .cielo .estrella, .auth-pagina[data-momento="noche"] .cielo .fugaz,
  .auth-pagina[data-momento="noche"] .cielo .astro-luna,
  .auth-pagina[data-momento="manana"] .cielo .astro-sol, .auth-pagina[data-momento="mediodia"] .cielo .astro-sol,
  .auth-pagina[data-momento="tarde"] .cielo .astro-sol { display: inline; }
  .auth-pagina[data-momento="manana"] .cielo .nube-c, .auth-pagina[data-momento="mediodia"] .cielo .nube-c,
  .auth-pagina[data-momento="tarde"] .cielo .nube-c { display: inline; }
  .cielo .astro-sol .disco { fill: #ffd9a0; filter: drop-shadow(0 0 16px rgba(255,150,60,.9)); }
  .auth-pagina[data-momento="mediodia"] .cielo .astro-sol .disco { fill: #fff3b0; filter: drop-shadow(0 0 20px rgba(255,200,40,.95)); }
  .auth-pagina[data-momento="tarde"] .cielo .astro-sol .disco { fill: #ff9a52; filter: drop-shadow(0 0 22px rgba(255,90,44,.85)); }
  .cielo .astro-luna .disco { fill: #eef2ff; filter: drop-shadow(0 0 14px rgba(170,200,255,.8)); }
  .cielo .astro-luna .crater { fill: rgba(120,140,190,.45); }
  .cielo .nube-c ellipse { fill: rgba(255,255,255,.5); }
  .auth-pagina[data-momento="tarde"] .cielo .nube-c ellipse { fill: rgba(255,190,150,.4); }
  .cielo .nube-c { animation: deriva 80s linear infinite alternate; }
  @keyframes deriva { from { translate: -30px 0; } to { translate: 60px 0; } }
  @keyframes titilar { from { opacity: .1; } to { opacity: .95; } }
  .fugaz { opacity: 0; stroke-width: 1.6; stroke-linecap: round; animation: cruzar 11s linear infinite; }
  @keyframes cruzar { 0%,78% { opacity: 0; transform: translate(0,0); } 80% { opacity: .95; } 88% { opacity: 0; transform: translate(190px,105px); } 100% { opacity: 0; transform: translate(190px,105px); } }

  /* ---- SmartTrace: red de datos que "piensa" ---- */
  .cerebro { position: absolute; z-index: 4; top: 0; right: 0; width: 62%; height: 26%; pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
  .cerebro .arista { stroke: rgba(125,180,245,.28); stroke-width: 1; fill: none; }
  .cerebro .nodo { fill: #bcd9ff; filter: drop-shadow(0 0 4px rgba(125,180,245,.95)); animation: nodo 4.5s ease-in-out infinite; }
  .cerebro .dato { fill: #fff; filter: drop-shadow(0 0 5px #7db4f5); }
  @keyframes nodo { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.35); } }
  .cerebro .nodo { transform-box: fill-box; transform-origin: center; }
  .vivo { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: #dcebff;
    background: rgba(8,20,56,.62); border: 1px solid rgba(125,180,245,.4); text-shadow: none; }
  .vivo i { width: 7px; height: 7px; border-radius: 50%; background: #7db4f5; box-shadow: 0 0 8px #7db4f5; animation: latir2 1.6s ease-in-out infinite; }
  .vivo span { display: inline-block; animation: aparecerTexto .5s ease-out both; }
  @keyframes latir2 { 50% { transform: scale(.6); opacity: .5; } }
  @keyframes aparecerTexto { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

  /* ---- radar de servicios ---- */
  .e-radar { left: clamp(22px, 3vw, 44px); bottom: clamp(20px, 3.4vh, 36px); display: flex; align-items: flex-end; gap: clamp(70px, 8vw, 120px); animation-delay: .6s; }
  .col-radar { display: grid; justify-items: center; }
  .col-radar h3 { margin-bottom: 10px; }
  .radar { position: relative; width: clamp(150px, 15vw, 200px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,190,140,.55);
    background: radial-gradient(circle, rgba(255,150,70,.14), rgba(8,20,56,.35) 72%); }
  .radar .anillo { position: absolute; inset: 0; margin: auto; border: 1px solid rgba(255,190,140,.3); border-radius: 50%; }
  .radar .anillo.a { width: 72%; height: 72%; } .radar .anillo.b { width: 46%; height: 46%; } .radar .anillo.c { width: 22%; height: 22%; }
  .radar .barrido { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg 300deg, rgba(255,150,70,.25) 350deg, rgba(255,243,232,.6) 360deg); animation: girar 4.6s linear infinite; }
  @keyframes girar { to { transform: rotate(360deg); } }
  .radar .eco { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff3e8; box-shadow: 0 0 10px #ff9a4a; }
  .radar .eco::after { content: ''; position: absolute; inset: -4px; border: 1px solid rgba(255,243,232,.8); border-radius: 50%; animation: eco 4.6s ease-out infinite; animation-delay: inherit; }
  @keyframes eco { from { transform: scale(.5); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
  .radar .eco b { position: absolute; left: 12px; top: -7px; font-size: 12px; font-weight: 500; white-space: nowrap; color: #ffe9d6; opacity: 0; animation: barrido 4.6s linear infinite; animation-delay: inherit; text-shadow: 0 1px 5px rgba(6,14,40,.9); }
  @keyframes barrido { 0% { opacity: 1; } 18% { opacity: .85; } 38% { opacity: 0; } 100% { opacity: 0; } }
  .radar .eco.ext { background: #cfe6ff; box-shadow: 0 0 10px rgba(130,180,245,.95); }
  .radar .eco.ext b { color: #d8eaff; }
  .leyenda { margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; color: rgba(255,240,225,.78); }
  .leyenda span { display: inline-flex; align-items: center; gap: 6px; }
  .leyenda i { width: 8px; height: 8px; border-radius: 50%; }
  .leyenda i.ni { background: #fff3e8; box-shadow: 0 0 8px #ff9a4a; } .leyenda i.ext { background: #cfe6ff; box-shadow: 0 0 8px rgba(130,180,245,.9); }
  .e-radar .reloj { margin-bottom: 38px; }

  @media (max-height: 800px) { .e-tramite .hito { padding-bottom: 14px; } .e-semaforo, .e-tramite { top: 23%; } .muelle { height: 128px; } }
  @media (max-width: 1100px) { .esquina { display: none; } }
  @media (max-width: 1023px) { .auth-pagina { grid-template-columns: 1fr; } .panel { display: none; } }

  /* ================== Formulario (maqueta) ================== */
  .form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(26px, 3vw, 48px); }
  .form .interior { width: 100%; max-width: 360px; margin: 0 auto; }
  .form h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--marino); }

  /* ---- columna del formulario = escena que cambia con la hora de Managua ----
     manana (5-10), mediodia (11-15), tarde (16-18) y noche (19-4) */
  .form { position: relative; overflow: hidden; --titulo: #0a1a44; --saludo: #f66801; --acento: #f66801; }
  .form[data-momento="mediodia"] { --saludo: #1665b8; }
  .form[data-momento="tarde"] { --titulo: #fff; --saludo: #ffd9a0; --acento: #ffb066; }
  .form[data-momento="noche"] { --titulo: #fff; --saludo: #9cc4ff; --acento: #ff9a4a; }
  .escena { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  .form .interior { position: relative; z-index: 1; }
  .form .escena .fondo, .form .escena .astro, .form .escena .estrellas, .form .escena .nubes { display: none; }
  .form[data-momento="manana"] .f-m, .form[data-momento="manana"] .a-m, .form[data-momento="manana"] .nubes { display: block; }
  .form[data-momento="mediodia"] .f-md, .form[data-momento="mediodia"] .a-md, .form[data-momento="mediodia"] .nubes { display: block; }
  .form[data-momento="tarde"] .f-t, .form[data-momento="tarde"] .a-t, .form[data-momento="tarde"] .nubes { display: block; }
  .form[data-momento="noche"] .f-n, .form[data-momento="noche"] .a-n, .form[data-momento="noche"] .estrellas { display: block; }

  .escena .sol { transform-box: fill-box; transform-origin: center; animation: salir 2.8s cubic-bezier(.16,1,.3,1) both, brillo 4.5s 2.8s ease-in-out infinite; }
  .form[data-momento="manana"] .sol { filter: drop-shadow(0 0 18px rgba(246,104,1,.7)); }
  .form[data-momento="mediodia"] .sol { filter: drop-shadow(0 0 20px rgba(255,190,40,.9)); }
  .form[data-momento="tarde"] .sol { filter: drop-shadow(0 0 26px rgba(255,90,44,.8)); }
  .escena .halo-sol { fill: rgba(255,150,70,.22); animation: halo-l 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes salir { from { transform: translateY(60px); opacity: .2; } to { transform: none; opacity: 1; } }
  @keyframes brillo { 50% { transform: scale(1.05); } }
  .escena .rayos { animation: giro 50s linear infinite; }
  .escena .rayos line { stroke-width: 2.4; stroke-linecap: round; opacity: 0; animation: rayo 4s 2s ease-in-out infinite; }
  .form[data-momento="manana"] .rayos line { stroke: #f66801; }
  .form[data-momento="mediodia"] .rayos line { stroke: #ffb21e; }
  @keyframes rayo { 0%,100% { opacity: .15; } 50% { opacity: .8; } }
  @keyframes giro { to { transform: translate(var(--cx), var(--cy)) rotate(360deg); } }
  .escena .a-m .rayos { --cx: 322px; --cy: 62px; transform-origin: 322px 62px; }
  .escena .a-md .rayos { --cx: 322px; --cy: 62px; transform-origin: 322px 62px; }

  .escena .nube ellipse { fill: rgba(255,255,255,.88); }
  .form[data-momento="tarde"] .nube ellipse { fill: rgba(255,200,160,.55); }
  .escena .nube { animation: deriva 26s ease-in-out infinite alternate; }
  .escena .n2 { animation-duration: 34s; animation-direction: alternate-reverse; opacity: .85; }
  .escena .n3 { animation-duration: 40s; opacity: .7; }
  @keyframes deriva { from { transform: translateX(-30px); } to { transform: translateX(44px); } }

  .escena .luna { fill: #f5f1e2; filter: drop-shadow(0 0 14px rgba(255,248,220,.85)); animation: subir-luna 2.6s cubic-bezier(.16,1,.3,1) both; }
  .escena .halo-luna { fill: rgba(255,248,220,.10); animation: halo-l 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .escena .crater { fill: rgba(120,110,90,.22); animation: subir-luna 2.6s cubic-bezier(.16,1,.3,1) both; }
  @keyframes subir-luna { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes halo-l { 50% { transform: scale(1.16); opacity: .6; } }
  .escena .est { fill: #fff; animation: titilar 2.8s ease-in-out infinite alternate; }
  .escena .fugaz { stroke: #fff; stroke-width: 1.6; stroke-linecap: round; opacity: 0; animation: cruzar-b 9s linear infinite; }
  .escena .fugaz.f2 { animation-delay: 4.5s; }
  @keyframes cruzar-b { 0%,70% { opacity: 0; transform: translate(0,0); } 74% { opacity: .95; } 84% { opacity: 0; transform: translate(90px,50px); } 100% { opacity: 0; transform: translate(90px,50px); } }
  @keyframes oleada { from { transform: translateX(-22px); } to { transform: translateX(22px); } }

  /* texto de bienvenida sobre la escena */
  .bienvenida { margin-bottom: 22px; text-align: left; }
  .bienvenida .saludo { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--saludo); animation: subir .8s .5s both; }
  .bienvenida h1 { margin: 0; font-size: clamp(30px, 2.6vw, 38px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; color: var(--titulo); }
  .bienvenida h1 b { color: var(--acento); }
  .bienvenida h1 .l { display: inline-block; opacity: 0; transform: translateY(14px); animation: subir .6s cubic-bezier(.16,1,.3,1) both; }
  @keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  /* el formulario va sobre una tarjeta clara para que se lea con cualquier fondo */
  .tarjeta { padding: 24px 24px 22px; border-radius: 20px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 24px 50px -24px rgba(5,12,40,.55); animation: subir .8s .3s both; }
  .form h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--marino); }
  .tarjeta .nota { margin-top: 22px; }
  .form .frases { position: relative; height: 22px; margin-top: 6px; }
  .form .frases p { position: absolute; inset: 0; margin: 0; font-size: 14.5px; color: var(--gris); opacity: 0; animation: frase 12s infinite; }
  .form .frases p:nth-child(2) { animation-delay: 4s; } .form .frases p:nth-child(3) { animation-delay: 8s; }
  @keyframes frase { 0% { opacity: 0; transform: translateY(8px); } 6%,28% { opacity: 1; transform: none; } 34%,100% { opacity: 0; transform: translateY(-8px); } }
  @keyframes girar { to { transform: rotate(360deg); } }

  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .esquina, .marca { opacity: 1 !important; } }

  /* El botón y el formulario muestran que están enviando (y no se puede enviar dos veces) */
  .tarjeta [type="submit"] { position: relative; }
  .tarjeta [type="submit"][data-cargando="1"] { color: transparent !important; pointer-events: none; }
  .tarjeta [type="submit"][data-cargando="1"]::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(10,26,68,.3); border-top-color: var(--marino); border-radius: 50%; animation: girar-btn .7s linear infinite; }
  @keyframes girar-btn { to { transform: rotate(360deg); } }

  /* Piezas del shell real (la maqueta no las tenía) */
  .tarjeta .sub { margin: 4px 0 0; font-size: 14.5px; color: var(--gris); }
  .pie-pagina { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--titulo); opacity: .65; }
  .form h1 { text-shadow: none; }

  /* ---- camiones del flete (por carretera) ---- */
  .guia.tierra { stroke: rgba(255,235,210,.55); }
  .estela.tierra { stroke: rgba(255,160,90,.95); stroke-width: 2; }
  .viajero.tierra { filter: drop-shadow(0 0 4px rgba(255,150,70,.9)); }
  .viajero .rastra, .viajero .caja { fill: #ff9a4a; stroke: rgba(10,26,68,.7); stroke-width: .5; }
  .viajero .caja { fill: #f4f6fb; }
  .viajero .franja { fill: #f66801; }
  .viajero .rastra-lineas { stroke: rgba(10,26,68,.35); stroke-width: .5; fill: none; }
  .viajero .quinta { fill: #0b1a44; }
  .viajero .cabina { fill: #0b1a44; stroke: #fff; stroke-width: .6; }
  .viajero .parabrisas { fill: #9cc4ff; }
