/* ==========================================================================
   INVICTUS · Acceso (/entrar)
   ========================================================================== */
.auth { min-height: 100svh; }

.auth__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  min-height: 100svh;
}

/* ------------------------------------------------------------------ */
/* Panel de marca                                                      */
/* ------------------------------------------------------------------ */
.auth__brand {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  isolation: isolate;
  background: var(--bg);
}
.auth__brand-bg { position: absolute; inset: 0; z-index: -2; }
.auth__brand-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 55% 35%;
  opacity: 0.5;
  filter: grayscale(0.45) contrast(1.05) brightness(0.8);
}
.auth__brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(231, 28, 34, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.4) 0%, rgba(8, 8, 10, 0.72) 55%, var(--bg) 100%);
}
.auth__brand-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  min-height: 100%;
}
.auth__claim { max-width: 520px; margin-top: auto; }
.auth__brand .logo__img { height: 60px; }
.auth__claim h1 {
  margin-top: 1.1rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.auth__claim h1 em {
  font-style: normal;
  color: var(--accent-soft);
}
.auth__claim p:last-child {
  margin-top: 1rem;
  color: var(--text-2);
  max-width: 42ch;
  font-size: 0.92rem;
}
/* ------------------------------------------------------------------ */
/* Panel de formulario                                                 */
/* ------------------------------------------------------------------ */
.auth__panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(231, 28, 34, 0.05), transparent 60%),
    var(--bg-soft);
}
.auth__panel-top { display: flex; }
.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-3);
  transition: color var(--dur);
}
.auth__back:hover { color: var(--accent-soft); }

.auth__card {
  width: min(100%, 430px);
  margin: auto;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.auth__head h2 { font-size: 1.55rem; letter-spacing: -0.02em; }
.auth__head p { margin-top: 0.4rem; font-size: 0.84rem; color: var(--text-3); }

#login-form { display: grid; gap: 1rem; margin-top: 1.6rem; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 2.8rem; }
.input-eye {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-3);
  border-radius: var(--r-xs);
  cursor: pointer;
}
.input-eye:hover { color: var(--text); }

.auth__submit { margin-top: 0.4rem; min-height: 46px; }
.auth__submit .spinner { display: block; }
.auth__submit .spinner[hidden] { display: none; }

.auth__register { margin-top: 0.7rem; }

.auth__foot {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
}
.auth__foot a { color: var(--accent-soft); font-weight: 600; }
.auth__foot a:hover { text-decoration: underline; }
.auth__panel-top.auth__panel-top--end { justify-content: flex-end; }

@media (max-width: 980px) {
  .auth__shell { grid-template-columns: 1fr; }
  .auth__brand {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .auth__brand-inner { padding: 1.1rem clamp(1.1rem, 4vw, 2rem); min-height: 0; }
  .auth__claim { display: none; }
  .auth__panel { min-height: calc(100svh - 62px); }
  .auth__card { margin-block: 1.5rem; }
}

/* ------------------------------------------------------------------ */
/* Alta de socio (/registro)                                           */
/* ------------------------------------------------------------------ */
.auth__panel-top { justify-content: space-between; gap: 1rem; }
.auth__panel-top .auth__back:last-child { color: var(--accent-soft); }
.auth__card--wide { width: min(100%, 540px); }
.auth__claim h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.012em; line-height: 0.94; }

#register-form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field__hint { font-size: 0.7rem; color: var(--text-3); line-height: 1.4; }

.check { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.76rem; line-height: 1.45; color: var(--text-2); }
.check input { width: 16px; height: 16px; margin-top: 0.15rem; flex: none; accent-color: var(--accent); }
.check a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 2px; }
.check a:hover { color: var(--text); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth__mini { font-size: 0.68rem; line-height: 1.5; color: var(--text-3); text-align: center; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .auth--register .auth__card { margin-block: 1rem 1.4rem; }
}
/* El claim del alta es más largo: una línea menos en escritorio. */
.auth--register .auth__claim h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }

/* Acceso a la guía de instalación PWA */
.auth__install-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: color var(--dur) var(--ease);
}
.auth__install-link:hover { color: var(--text); }
.auth__install-link svg { flex: none; color: var(--accent-soft); }
