/* =====================================================================
   Acceso (referencia 00-login).
   Escritorio: héroe oscuro (izquierda) + panel blanco con el formulario (derecha).
   Móvil: héroe breve arriba y hoja blanca superpuesta con el formulario.
   ===================================================================== */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
  outline: none;
}

.auth-flow {
  display: contents;
}

/* ---------- Héroe ---------- */
.auth__hero {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--c-navy);
  color: #fff;
  isolation: isolate;
}

.auth__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.auth__art .scene__subject {
  left: 52%;
  right: 4%;
  top: 6%;
  bottom: 36%;
}

.auth__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 35 75 / 0.97) 0%, rgb(8 35 75 / 0.9) 42%, rgb(8 35 75 / 0.6) 72%, rgb(8 35 75 / 0.5) 100%);
}

.auth__hero-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(28px, 4.2vw, 64px) clamp(24px, 4.2vw, 64px) clamp(28px, 4vw, 56px);
  padding-left: max(clamp(24px, 4.2vw, 64px), env(safe-area-inset-left));
}

.auth__hero-logo {
  width: auto;
  height: clamp(40px, 4vw, 58px);
  align-self: flex-start;
}

.auth__tagline-mobile {
  display: none;
}

.auth__claim {
  margin-top: auto;
}

.auth__claim-title {
  font-size: clamp(2.1rem, 0.9rem + 3vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.auth__claim-sub {
  margin-top: 18px;
  color: rgb(255 255 255 / 0.86);
  font-size: clamp(1.05rem, 0.85rem + 0.7vw, 1.55rem);
  line-height: 1.3;
}

.auth__features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 30px;
  margin-top: clamp(24px, 4vw, 44px);
}

.auth__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.auth__feature-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1.5px solid rgb(255 255 255 / 0.5);
  border-radius: 50%;
  background: rgb(8 35 75 / 0.55);
}

/* ---------- Panel ---------- */
.auth__panel {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 40px max(24px, env(safe-area-inset-right)) 40px 24px;
  background: #fff;
}

.auth__card {
  display: flex;
  flex-direction: column;
  width: min(100%, 400px);
}

.auth__logo {
  align-self: center;
  width: auto;
  height: 46px;
  margin-bottom: 38px;
}

.auth__title {
  font-size: clamp(1.6rem, 1.2rem + 0.9vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
}

.auth__title-mobile {
  display: none;
}

.auth__subtitle {
  margin-top: 10px;
  color: var(--c-ink-soft);
  font-size: 1.0625rem;
  text-align: center;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

.auth__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}

.auth__forgot,
.auth__back {
  padding-inline: 4px;
}

.auth__help-link {
  padding-inline: 2px 0;
}

.auth__notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--c-tint);
  color: var(--c-ink-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.auth__notice .icon {
  margin-top: 2px;
  color: var(--c-primary-ink);
}

.auth__notice p {
  margin: 0;
}

.auth__notice strong {
  color: var(--c-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.auth__rule {
  margin: 28px 0 14px;
  border: 0;
  border-top: 1px solid var(--c-line);
}

.auth__help {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.9375rem;
  text-align: center;
}

.auth__help .btn {
  display: inline-flex;
  vertical-align: baseline;
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .auth__hero {
    min-height: clamp(210px, 34dvh, 290px);
  }

  .auth__art .scene__subject {
    left: 56%;
    right: 2%;
    top: 22%;
    bottom: 4%;
  }

  .auth__shade {
    background: linear-gradient(180deg, rgb(8 35 75 / 0.78) 0%, rgb(8 35 75 / 0.72) 55%, rgb(8 35 75 / 0.9) 100%);
  }

  .auth__hero-content {
    gap: 8px;
    padding: calc(22px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 52px max(20px, env(safe-area-inset-left));
  }

  .auth__hero-logo {
    height: 38px;
  }

  .auth__tagline-mobile {
    display: block;
    color: rgb(255 255 255 / 0.9);
    font-size: 0.9375rem;
  }

  .auth__claim,
  .auth__features {
    display: none;
  }

  .auth__panel {
    position: relative;
    z-index: 1;
    place-items: start center;
    margin-top: -30px;
    padding: 30px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 30px rgb(8 35 75 / 0.18);
  }

  .auth__logo,
  .auth__title-desktop {
    display: none;
  }

  .auth__title-mobile {
    display: inline;
  }

  .auth__title {
    font-size: 1.5rem;
  }

  .auth__subtitle {
    margin-top: 6px;
    font-size: 0.9375rem;
  }

  .auth__form {
    gap: 14px;
    margin-top: 20px;
  }

  .auth__notice {
    margin-top: 18px;
  }

  .auth__rule {
    margin: 20px 0 12px;
  }
}

/* Móvil horizontal o ventanas bajas: el héroe pasa a una columna estrecha y el formulario no se corta. */
@media (max-height: 520px) and (min-width: 600px) {
  .auth {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .auth__claim,
  .auth__features,
  .auth__logo {
    display: none;
  }

  .auth__tagline-mobile {
    display: block;
    color: rgb(255 255 255 / 0.9);
  }

  .auth__hero-content {
    padding-top: 20px;
  }

  .auth__panel {
    place-items: start center;
    padding-top: 20px;
  }

  .auth__form {
    margin-top: 16px;
    gap: 12px;
  }
}
