/* GAMAN Login — full-bleed photo, centered translucent card */

.gate-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  color: #fff;
  background: #0a0c10;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Photograph */
.gate-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/assets/logo-pjud.png") center 45% / min(420px, 55vw) no-repeat,
    linear-gradient(135deg, #0b1220 0%, #0f172a 45%, #132b45 100%);
}

/* Veil ligero */
.gate-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 48%, rgba(0, 0, 0, 0.28) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 42%, rgba(0, 0, 0, 0.32) 100%);
}

/* Luces industriales */
.gate-lights {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.gate-light {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(180, 220, 255, 0.75);
  box-shadow:
    0 0 4px 1px rgba(0, 173, 239, 0.55),
    0 0 12px 4px rgba(0, 173, 239, 0.28);
  animation: gate-flicker var(--dur, 2.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.7;
}

.gate-light--a { left: 18%; top: 22%; --dur: 2.1s; --delay: 0s; width: 5px; height: 5px; }
.gate-light--b { left: 32%; top: 38%; --dur: 2.8s; --delay: 0.4s; }
.gate-light--c { left: 48%; top: 28%; --dur: 1.9s; --delay: 0.9s; width: 4px; height: 4px; }
.gate-light--d { left: 61%; top: 44%; --dur: 3.1s; --delay: 0.2s; }
.gate-light--e { left: 72%; top: 31%; --dur: 2.3s; --delay: 1.1s; width: 5px; height: 5px; }
.gate-light--f { left: 27%; top: 58%; --dur: 2.6s; --delay: 0.7s; width: 4px; height: 4px; }
.gate-light--g { left: 55%; top: 62%; --dur: 2.2s; --delay: 1.4s; }
.gate-light--h { left: 78%; top: 52%; --dur: 2.9s; --delay: 0.5s; width: 5px; height: 5px; }

@keyframes gate-flicker {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  8% { opacity: 1; transform: scale(1.08); }
  12% { opacity: 0.35; transform: scale(0.88); }
  18% { opacity: 0.95; transform: scale(1.05); }
  40% { opacity: 0.7; transform: scale(1); }
  55% { opacity: 1; transform: scale(1.1); }
  62% { opacity: 0.4; transform: scale(0.9); }
  78% { opacity: 0.9; transform: scale(1.02); }
}

/* —— Entrada suave —— */
@keyframes gate-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gate-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 12px 20px 0;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  animation: gate-enter 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.gate-top-logo {
  height: 63px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.gate-main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 14px 48px;
  box-sizing: border-box;
}

.gate-card {
  width: min(260px, 100%);
  padding: 28px 18px 22px;
  border-radius: 5px;
  background: rgba(8, 12, 18, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  animation: gate-enter 280ms cubic-bezier(0.4, 0, 0.2, 1) 60ms both;
}

/* —— Tipografía: título marcado, labels quietos —— */
.gate-card h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.gate-brand {
  margin: 8px 0 18px;
}

.gate-brand-line {
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 8px;
  background: #00adef;
  border-radius: 1px;
}

.gate-brand-text {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}

.gate-form {
  display: grid;
  gap: 12px;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gate-field > span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.gate-field input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  box-sizing: border-box;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.gate-field input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(0, 173, 239, 0.4);
}

.gate-field.is-invalid input {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.5);
}

.gate-pass {
  position: relative;
  display: flex;
}

.gate-pass input {
  padding-right: 58px;
}

.gate-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.12s ease;
}

.gate-eye:hover {
  color: #00adef;
}

.gate-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  margin-top: 1px;
}

/* —— Checkbox custom —— */
.gate-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  user-select: none;
}

.gate-remember input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.gate-check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.gate-check::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 4px;
  height: 8px;
  border: solid #041018;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.gate-remember:hover .gate-check {
  border-color: rgba(0, 173, 239, 0.65);
}

.gate-remember input:focus-visible + .gate-check {
  box-shadow: 0 0 0 2px rgba(0, 173, 239, 0.35);
}

.gate-remember input:checked + .gate-check {
  background: #00adef;
  border-color: #00adef;
}

.gate-remember input:checked + .gate-check::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.gate-recover {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 11px;
  transition: color 0.12s ease;
}

.gate-recover:hover {
  color: #00adef;
  text-decoration: underline;
}

/* —— Botón: hover / active / focus —— */
.gate-btn {
  width: 100%;
  height: 36px;
  margin-top: 6px;
  border: 0;
  border-radius: 3px;
  background: #00adef;
  color: #041018;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.14s ease,
    transform 0.12s ease,
    box-shadow 0.14s ease,
    opacity 0.15s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.gate-btn:hover:not(:disabled) {
  background: #1bb8f2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 4px 12px rgba(0, 173, 239, 0.28);
}

.gate-btn:active:not(:disabled) {
  background: #0099d4;
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12) inset;
}

.gate-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gate-btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.gate-alert {
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 11px;
  margin-bottom: 10px;
}

.gate-alert-error {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.gate-alert-info {
  background: rgba(0, 173, 239, 0.12);
  border: 1px solid rgba(0, 173, 239, 0.3);
  color: #bae6fd;
}

.gate-foot {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  animation: gate-enter 300ms cubic-bezier(0.4, 0, 0.2, 1) 120ms both;
}

.gate-foot-sep {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .gate-top {
    padding: 10px 12px 0;
  }
  .gate-top-logo {
    height: 54px;
  }
  .gate-main {
    padding: 48px 12px 44px;
  }
  .gate-card {
    width: min(100%, 250px);
    padding: 24px 16px 20px;
  }
  .gate-card h1 {
    font-size: 16px;
  }
  .gate-foot {
    flex-direction: column;
    gap: 2px;
  }
  .gate-foot-sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-top,
  .gate-card,
  .gate-foot {
    animation: none;
  }
  .gate-field input,
  .gate-btn,
  .gate-check,
  .gate-check::after,
  .gate-eye,
  .gate-recover {
    transition: none;
  }
  .gate-light {
    animation: none;
    opacity: 0.75;
  }
  .gate-btn:active:not(:disabled) {
    transform: none;
  }
}
