/* ============================================================================
 *  LOGIN · Layout partido (panel de marca en tinta + formulario).
 *  Depende de tokens.css + components.css + editorial.css.
 * ========================================================================= */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ── Panel de marca (verde) ── */
.auth-brand {
  position: relative;
  background: var(--hero-gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-13) var(--space-12);
  overflow: hidden;
}
/* Blobs de profundidad (plano pero con aire; NO glass) */
.auth-brand::before, .auth-brand::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(70px); pointer-events: none; z-index: 0;
}
.auth-brand::before { width: 440px; height: 440px; background: color-mix(in srgb, var(--brand) 55%, #fff); opacity: .30; top: -160px; right: -120px; }
.auth-brand::after  { width: 320px; height: 320px; background: var(--brand-ink); opacity: .35; bottom: -140px; left: -80px; }
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-top { display: flex; align-items: center; gap: 12px; }
.auth-mark {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  color: #fff;
}
.auth-mark .ms { font-size: 23px; }
.auth-wordmark {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #fff;
}

.auth-brand-mid { max-width: 440px; }
.auth-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.62);
  margin-bottom: 16px;
}
.auth-brand-mid h1 {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em;
  color: #fff; margin-bottom: 14px;
}
.auth-brand-mid p {
  font-size: 15.5px; line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}
.auth-points {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 11px;
}
.auth-points li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: rgba(255, 255, 255, 0.9);
}
.auth-points .ms {
  font-size: 15px; color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.auth-brand-foot {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}
/* Reglilla (firma "instrumento de precisión") */
.auth-ticks {
  height: 12px; width: 180px; margin-bottom: 16px;
  background-image: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, 0.42) 0 1px, transparent 1px 11px);
  -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent);
          mask-image: linear-gradient(90deg, #000 60%, transparent);
}

/* ── Panel del formulario ── */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-11) var(--space-10);
  background: var(--surface);
}
.auth-form-inner { width: 100%; max-width: 360px; }

.auth-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand-ink);
}
.auth-title {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--on-surface);
  margin: 8px 0 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-9); }

.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; }

/* ── Splash mientras Firebase rehidrata ── */
.auth-splash {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-dim); z-index: 50;
}

/* ── Botón submit en estado loading (spinner en vez 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: #fff;
  animation: app-spin 700ms linear infinite;
}
.btn-outlined[data-loading="true"]::after {
  border-color: color-mix(in srgb, var(--brand) 22%, transparent); border-top-color: var(--seed);
}

/* ── Responsive: el panel de marca se vuelve cabecera fina ── */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand {
    flex-direction: row; align-items: center; justify-content: flex-start;
    padding: 18px 24px;
  }
  .auth-brand-mid, .auth-brand-foot { display: none; }
  .auth-form-panel { padding: var(--space-11) var(--space-7); align-items: flex-start; }
  .auth-form-inner { margin: 0 auto; }
}
