/* ============================================================================
 *  LOGIN · Estilos específicos de la pantalla de acceso.
 *  Depende de tokens.css + components.css.
 * ========================================================================= */

.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  background: var(--surface-dim);
}

.auth-card {
  width: 100%;
  max-width: var(--auth-card-max-w);
  background: var(--surface);
  border-radius: var(--radius-3xl);
  padding: var(--space-11) var(--space-10);
  box-shadow: var(--shadow-card);
}

.auth-logo {
  width: var(--logo-badge);
  height: var(--logo-badge);
  border-radius: var(--radius-lg);
  background: var(--hero-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-9);
  box-shadow: var(--shadow-brand);
}
.auth-logo .ms { font-size: 26px; }

.auth-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--on-surface);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-10);
}

.auth-form .field + .field { margin-top: var(--space-7); }
.auth-form .actions        { margin-top: var(--space-10); }

.auth-extra { margin-top: var(--space-7); text-align: center; }
.auth-forgot {
  background: none;
  border: 0;
  padding: 4px 6px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--seed);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.auth-forgot:hover:not(:disabled) { text-decoration: underline; }
.auth-forgot:disabled { opacity: 0.55; cursor: default; }

.auth-footer {
  margin-top: var(--space-10);
  text-align: center;
  font-size: 11.5px;
  color: var(--on-surface-variant);
  letter-spacing: 0.2px;
}

/* Splash que cubre la pantalla mientras Firebase rehidrata la sesión.
 * Evita el flash del formulario en usuarios ya logueados. */
.auth-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-dim);
  z-index: 50;
}

/* Estado loading del botón submit — spinner en lugar del label */
.btn[data-loading="true"] {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.btn[data-loading="true"]::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  animation: app-spin 700ms linear infinite;
}
.btn-outlined[data-loading="true"]::after {
  border-color: rgba(37, 99, 235, 0.2);
  border-top-color: var(--seed);
}
