/* Pantallas de acceso (login, recuperar y restablecer contraseña).
   Dos columnas en escritorio: panel de marca + formulario. En móvil, banda de marca arriba.
   Foto del panel: ../img/login_foto_feria.jpg (se puede cambiar con --auth-foto en :root).
   OJO: nginx guarda las imágenes de /static 1 día y los navegadores 7; si se cambia la foto, subir también el «?v=» de las dos url() de este fichero. */

body .topbar,
body > footer { display: none !important; }
.main-content { margin-top: 0 !important; padding: 0 !important; }

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  background: var(--dsg-bg);
}

/* ── Panel de marca ── */
.auth-marca {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem 4rem;
  color: #fff;
  background:
    radial-gradient(60% 55% at 88% 100%, rgba(249, 115, 22, .30), transparent 70%),
    linear-gradient(155deg, #1c2a47 0%, #131c30 55%, #0b1220 100%);
}
.auth-marca__foto {
  position: absolute;
  inset: 0;
  background-image: var(--auth-velo, linear-gradient(180deg, rgba(11, 18, 32, .50) 0%, rgba(11, 18, 32, .86) 100%)), var(--auth-foto, url('../img/login_foto_feria.jpg?v=20261102'));
  background-size: cover;
  background-position: var(--auth-foto-pos, center);
}
.auth-marca::before,
.auth-marca::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(249, 115, 22, .28);
  pointer-events: none;
}
.auth-marca::before { width: 640px; height: 640px; right: -240px; bottom: -260px; }
.auth-marca::after  { width: 420px; height: 420px; right: -130px; bottom: -150px; border-color: rgba(255, 255, 255, .10); }
.auth-marca > * { position: relative; z-index: 1; }
.auth-marca > .auth-marca__foto { position: absolute; z-index: 0; }

/* Logo real de DSG (el del pie de página, con su placa naranja). --w = ancho de la imagen; los márgenes negativos quitan el aire transparente. */
.auth-marca__logo { --w: 240px; }
.auth-marca__logo img { width: var(--w); max-width: none; height: auto; display: block; margin: calc(var(--w) * -.147) calc(var(--w) * -.043) calc(var(--w) * -.13); }

.auth-marca__texto { margin-top: auto; }
.auth-marca__texto h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .6rem;
}
.auth-marca__texto h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--dsg-orange);
  margin-top: 1rem;
}
.auth-marca__texto p { color: rgba(255, 255, 255, .72); font-size: 1rem; margin: 1rem 0 0; max-width: 34ch; }


.auth-marca__tarjeta {
  display: flex; align-items: center; gap: .9rem; margin-top: 2rem; max-width: 420px;
  padding: .95rem 1.1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.auth-marca__tarjeta > i {
  width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(249, 115, 22, .22); color: var(--dsg-orange); font-size: 1.15rem;
}
.auth-marca__tarjeta strong { display: block; font-size: .95rem; font-weight: 600; }
.auth-marca__tarjeta span { display: block; font-size: .85rem; color: rgba(255, 255, 255, .75); line-height: 1.35; }

/* ── Columna del formulario ── */
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-box { width: 100%; max-width: 380px; }

.auth-head { text-align: center; margin-bottom: 1.75rem; }
.auth-head .auth-logo { display: flex; justify-content: center; }
.auth-head .auth-logo img { width: 210px; max-width: 100%; height: auto; display: block; margin: -.5rem 0 -.75rem; }
.auth-head h1 { font-size: 1.55rem; font-weight: 700; margin: 1rem 0 .35rem; color: var(--dsg-text); }
.auth-head p { color: var(--dsg-muted); font-size: .92rem; margin: 0; }

.auth-box .form-control { height: 46px; font-size: .95rem; }
.auth-box .form-label {
  font-size: .78rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
}
.auth-box .input-icon-wrap { position: relative; }
.auth-box .input-icon-wrap > i:first-child {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  color: var(--dsg-muted); font-size: .95rem; pointer-events: none;
}
.auth-box .input-icon-wrap .form-control { padding-left: 2.35rem; }
.auth-box .input-icon-wrap .form-control:focus ~ i:first-child { color: var(--dsg-orange); }
.auth-box .input-icon-wrap .con-ojo { padding-right: 2.75rem; }

.auth-ojo {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: transparent; border-radius: 6px;
  color: var(--dsg-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.auth-ojo:hover { color: var(--dsg-text); }
.auth-ojo:focus-visible { outline: 2px solid var(--dsg-orange); outline-offset: -2px; }

.auth-olvido { display: flex; align-items: center; justify-content: flex-end; min-height: 44px; margin-top: .15rem; font-size: .9rem; color: var(--dsg-orange); text-decoration: none; }
.auth-olvido:hover { text-decoration: underline; }

.btn-auth {
  width: 100%; height: 46px; border: none; border-radius: 8px;
  background: var(--dsg-orange); color: #111827; font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-auth:hover { background: var(--dsg-orange-dark); color: #111827; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(249, 115, 22, .25); }
.btn-auth:active { transform: translateY(0); box-shadow: none; }

.auth-pie { text-align: center; margin-top: 1.5rem; font-size: .8rem; color: var(--dsg-muted); }
.auth-pie a { color: var(--dsg-orange); text-decoration: none; }
.auth-pie a:hover { text-decoration: underline; }
.auth-pie a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.25rem; margin-top: .25rem; }
.auth-legal a { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; color: var(--dsg-muted); text-decoration: none; }
.auth-legal a:hover { color: var(--dsg-orange); text-decoration: underline; }

/* Pantallas de registro: el formulario va sin tarjeta, como el login; el panel de marca queda fijo mientras se desplaza */
.auth-form-col .register-card { background: transparent; border: 0; padding: 0; border-radius: 0; }
.auth-form-col .register-box { width: 100%; max-width: 520px; }
@media (min-width: 900px) {
  .auth-marca { position: sticky; top: 0; height: 100vh; align-self: start; }
  .auth-form-col { padding-top: 3rem; padding-bottom: 3rem; }
}

/* ── Tablet y móvil: una columna, panel de marca como banda ── */
@media (max-width: 899px) {
  .auth-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* La foto es vertical y aquí solo se ve una franja: se encuadra sobre el escenario (zona naranja), con menos velo y una banda algo más alta, y se carga
     la versión pequeña (login_foto_feria_movil.jpg) para no bajar casi 1 MB por una franja. */
  .auth-marca { padding: 1.25rem 1.5rem; flex-direction: row; align-items: center; min-height: 96px;
    --auth-velo: linear-gradient(180deg, rgba(11, 18, 32, .22) 0%, rgba(11, 18, 32, .55) 100%);
    --auth-foto: url('../img/login_foto_feria_movil.jpg?v=20261102'); --auth-foto-pos: center 41%; }
  .auth-marca__texto, .auth-marca__tarjeta { display: none; }
  .auth-marca__logo { --w: 130px; }
  .auth-marca::before { width: 300px; height: 300px; right: -120px; bottom: -190px; }
  .auth-marca::after { display: none; }
  .auth-form-col { align-items: center; padding: 1.5rem 1.25rem 2rem; }
  .auth-head .auth-logo img { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .btn-auth { transition: none; } }
