/* Cazador · entrar y cambiar la contraseña · estilo «Rojo neón» (el elegido del 26-oct).
   Hoja propia y pequeña: estas dos páginas no cargan panel.css ni JavaScript. La CSP de Caddy
   prohíbe todo lo embebido (<style>, style="", <script>), así que TODO el estilo vive aquí.
   Como en el panel: una sola cosa grita, el logo encendido sobre la rejilla. El formulario,
   callado y ordenado. Sin animaciones en bucle: sólo el logo se enciende una vez al cargar. */

:root {
  --fondo: #07070A;
  --linea: rgba(255, 255, 255, .07);

  --neon: #FF2D3D;
  --neon-vivo: #FF4D5A;
  --neon-claro: #FFA3AA;
  --neon-palido: #FFD9DC;

  --texto: #F4F0F2;
  --texto-2: #ABA6B0;
  --texto-3: #8C8793;

  --f-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --f-texto: 'Geist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --curva: cubic-bezier(.2, .75, .2, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--fondo);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 400 15px/1.5 var(--f-texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255, 45, 61, .4); color: #fff; }

button, input { font: inherit; color: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--neon-vivo);
  outline-offset: 2px;
}

/* ───────── el fondo: negro, halo rojo y la rejilla que se apaga hacia los bordes ───────── */

.fondo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(70% 62% at 50% 28%, #2B0308 0%, rgba(30, 2, 6, .55) 42%, transparent 74%),
    linear-gradient(180deg, #040406 0%, #09090D 100%);
}

.rejilla {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 45, 61, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 61, .11) 1px, transparent 1px);
  background-size: 46px 46px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(78% 74% at 50% 32%, #000 18%, transparent 78%);
  mask-image: radial-gradient(78% 74% at 50% 32%, #000 18%, transparent 78%);
}

/* ───────── la columna: logo arriba y el formulario debajo, centrados ───────── */

/* margin:auto centra en vertical cuando cabe y, si no cabe, deja hacer scroll sin cortar arriba */
.entrada {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 4vh, 36px);
  padding: clamp(28px, 6vh, 64px) 16px clamp(32px, 7vh, 72px);
}

.marca {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* el halo rojo, siempre detrás del logo (esté donde esté el logo según el alto de la pantalla) */
.marca::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(760px, 100%);
  aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 26, 26, .30), rgba(255, 26, 26, .10) 55%, transparent);
  filter: blur(6px);
  pointer-events: none;
  opacity: 0;
  animation: halo-entra 1.4s ease-out .5s forwards;
}

@keyframes halo-entra { to { opacity: 1; } }

.marca picture { display: block; }

/* el logo EZ: el mismo brillo de neón que en el panel */
.logo {
  display: block;
  width: auto;
  height: clamp(118px, 21vh, 200px);
  filter: drop-shadow(0 0 22px rgba(255, 20, 30, .42)) drop-shadow(0 0 2px rgba(255, 140, 140, .35));
  animation: encender 1.15s linear both;
}

/* el letrero se enciende: dos parpadeos y se queda fijo (una sola vez, al cargar) */
@keyframes encender {
  0%   { opacity: 0; }
  9%   { opacity: .85; }
  13%  { opacity: .12; }
  21%  { opacity: 1; }
  25%  { opacity: .4; }
  33%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ───────── la tarjeta del formulario ───────── */

.tarjeta {
  position: relative;
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 28px 28px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 17, 23, .93) 0%, rgba(11, 11, 15, .95) 100%);
  border: 1px solid rgba(255, 45, 61, .36);
  box-shadow:
    0 0 0 1px rgba(255, 45, 61, .07),
    0 30px 70px -22px rgba(0, 0, 0, .9),
    0 0 48px -16px rgba(255, 45, 61, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* una línea de luz en el borde de arriba, como en las cifras del panel */
.tarjeta::before {
  content: '';
  position: absolute;
  left: 26px;
  right: 26px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 12px var(--neon);
  opacity: .75;
  pointer-events: none;
}

.tarjeta h1 {
  margin: 0;
  font: 600 20px/1.25 var(--f-display);
  letter-spacing: -.01em;
  color: #fff;
  text-align: center;
  text-wrap: balance;
}

.nota {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--texto-3);
  text-align: center;
  text-wrap: balance;      /* dos líneas parejas, sin «12 horas.» colgando sola */
}

/* «Sesión de …» justo debajo del título */
.tarjeta h1 + .nota { margin-top: -8px; color: var(--texto-2); }

/* la nota del pie de la tarjeta, separada por una línea fina */
.pie {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--linea);
}

/* ───────── campos ───────── */

.campo { display: flex; flex-direction: column; gap: 7px; }

.campo label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--texto-2);
}

/* el lenguaje del botón «Buscar productos»: fondo vino casi negro, borde de neón que se enciende */
.campo input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 45, 61, .28);
  background: radial-gradient(120% 160% at 50% 135%, #22050B 0%, #0B090C 62%);
  color: var(--texto);
  font: 400 16px/1.2 var(--f-texto);   /* 16 px: así el móvil no hace zoom al tocar el campo */
  caret-color: var(--neon-vivo);
  transition: border-color .2s, box-shadow .2s;
}

.campo input:hover { border-color: rgba(255, 45, 61, .5); }

/* el foco lo marcan el borde y el halo; el contorno transparente sólo aparece con los colores forzados de Windows */
.campo input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(255, 45, 61, .18), 0 0 26px -4px rgba(255, 45, 61, .5);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* el autorrelleno del navegador no puede pintar el campo de blanco o de amarillo */
.campo input:-webkit-autofill,
.campo input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--texto);
  box-shadow: inset 0 0 0 40px #14070B;
  transition: background-color 600000s 0s, color 600000s 0s;
}

.campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--texto);
  box-shadow: inset 0 0 0 40px #14070B, 0 0 0 3px rgba(255, 45, 61, .18), 0 0 26px -4px rgba(255, 45, 61, .5);
}

/* ───────── el botón: el de «Buscar productos», con su luz quieta ───────── */

.boton {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin: 6px 0 0;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: radial-gradient(120% 140% at 50% 120%, #3A0610 0%, #12060A 60%);
  color: #fff;
  font: 600 15px/1 var(--f-display);
  letter-spacing: .01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s var(--curva);
}

/* el borde de luz (en el panel da vueltas; aquí se queda quieto, con el destello arriba) */
.boton::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from 0deg,
    rgba(255, 45, 61, .38) 0deg, rgba(255, 45, 61, .38) 236deg,
    #FF2D3D 268deg, #FFE1E4 296deg, #FF2D3D 324deg, rgba(255, 45, 61, .38) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* el resplandor de fuera, que crece al pasar el ratón */
.boton::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  box-shadow: 0 0 24px rgba(255, 45, 61, .38), 0 0 60px -10px rgba(255, 45, 61, .4);
  transition: box-shadow .3s;
}

.boton:hover::after,
.boton:focus-visible::after {
  box-shadow: 0 0 30px rgba(255, 45, 61, .65), 0 0 80px -8px rgba(255, 45, 61, .6), inset 0 0 20px rgba(255, 45, 61, .25);
}

.boton:active { transform: scale(.97); }
.boton:focus-visible { outline-offset: 4px; }

/* alto contraste de Windows: el aro de luz es un fondo y ahí desaparece, así que el botón lleva borde de sistema */
@media (forced-colors: active) {
  .boton { border: 2px solid ButtonText; }
}

/* ───────── avisos: error y hecho ───────── */

.err,
.ok-msg {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.err {
  color: var(--neon-palido);
  background: rgba(255, 45, 61, .1);
  border: 1px solid rgba(255, 45, 61, .55);
  box-shadow: 0 0 20px -8px rgba(255, 45, 61, .6);
}

/* el «!» en un círculo (decorativo: el lector de pantalla sólo lee el texto) */
.err::before {
  content: '!';
  content: '!' / '';
  flex: none;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-vivo);
  color: var(--neon-vivo);
  font: 700 11px/1 var(--f-display);
}

.ok-msg {
  color: var(--texto);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 45, 61, .45);
  box-shadow: 0 0 20px -10px rgba(255, 45, 61, .55);
}

/* la marca de «hecho», dibujada con dos bordes */
.ok-msg::before {
  content: '';
  flex: none;
  width: 7px;
  height: 12px;
  margin: 1px 6px 0 5px;
  border: solid var(--neon-claro);
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}

/* con el «Hecho. Volver al panel» a la vista, el enlace repetido de abajo sobra */
.ok-msg ~ .volver { display: none; }

/* ───────── enlaces ───────── */

.tarjeta a {
  color: var(--neon-palido);
  text-decoration: underline;
  text-decoration-color: rgba(255, 45, 61, .55);
  text-underline-offset: 3px;
  border-radius: 4px;
  transition: color .2s, text-decoration-color .2s;
}

.tarjeta a:hover { color: #fff; text-decoration-color: var(--neon); }

.volver a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 8px;
  font-size: 13.5px;
  text-decoration: none;
}

.volver a::before {
  content: '←';
  content: '←' / '';
  color: var(--neon-claro);
  transition: transform .2s var(--curva);
}

.volver a:hover::before { transform: translateX(-3px); }

/* ───────── cambiar la contraseña: tres campos, así que el logo un poco más pequeño ───────── */

.cambio .logo { height: clamp(104px, 16vh, 156px); }
.cambio .volver { margin-top: -6px; }

/* ───────── móvil ───────── */

@media (max-width: 700px) {
  .entrada { gap: 24px; padding: 32px 16px 36px; }
  .logo { height: clamp(96px, 14vh, 120px); }
  .cambio .logo { height: clamp(84px, 11vh, 104px); }
  .tarjeta { gap: 14px; padding: 24px 18px 18px; border-radius: 20px; }
  .tarjeta::before { left: 20px; right: 20px; }
  .tarjeta h1 { font-size: 18px; }
}

/* ───────── ventanas bajas (portátil con las barras del navegador, móvil con Safari) ─────────
   Menos aire y el logo más pequeño, para que el formulario entero quepa sin hacer scroll. */

@media (max-height: 820px) {
  .entrada { gap: clamp(14px, 3vh, 24px); padding-top: clamp(14px, 3.5vh, 32px); padding-bottom: clamp(18px, 4vh, 36px); }
  .logo { height: clamp(80px, 17vh, 150px); }
  .cambio .logo { height: clamp(60px, 11vh, 96px); }
  .tarjeta { gap: 13px; padding-top: 24px; padding-bottom: 18px; }
  .campo { gap: 6px; }
  .campo input { height: 46px; }
  .boton { height: 50px; margin-top: 4px; }
  .pie { padding-top: 12px; }
}
