:root {
  --red-900: #4a0f0f;
  --red-800: #6d1414;
  --red-700: #8f1919;
  --red-600: #b91c1c;
  --red-500: #d62828;
  --gold-500: #d4a11e;
  --gold-400: #f1c452;
  --ink-900: #101114;
  --ink-700: #2b2f36;
  --ink-500: #4b5563;
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.18);
  --shadow-md: 0 12px 28px rgba(17, 24, 39, 0.12);
  --shadow-sm: 0 6px 16px rgba(17, 24, 39, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--ink-900);
  background: radial-gradient(circle at 20% 20%, rgba(255, 214, 102, 0.2), transparent 45%),
    linear-gradient(135deg, #3a0c0c, #8b1c1c);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  position: relative;
  overflow: hidden;
}

.auth-shell::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 102, 0.2), transparent 70%);
  right: -180px;
  bottom: -220px;
  pointer-events: none;
}

.auth-card {
  width: min(1020px, 96vw);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

.auth-card__left {
  padding: 48px;
  color: #fff;
  background: linear-gradient(140deg, var(--red-900), var(--red-600));
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-card__left::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 214, 102, 0.25), transparent 45%);
  opacity: 0.7;
}

.auth-card__left > * {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.auth-brand__logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.auth-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  display: block;
}

.auth-brand__sub {
  font-size: 0.85rem;
  opacity: 0.85;
  display: block;
}

.auth-hero__title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(2rem, 3vw + 1rem, 2.9rem);
  margin: 0;
  line-height: 1.1;
}

.auth-hero__lead {
  margin: 0;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 440px;
}

.auth-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #3b2b00;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  width: fit-content;
}

.auth-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-hero__stats > div {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 16px;
  border-radius: 14px;
}

.auth-stat__num {
  font-size: 1.4rem;
  font-weight: 800;
  display: block;
}

.auth-stat__label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.auth-card__right {
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-card__header h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  color: var(--red-700);
}

.auth-card__header p {
  margin: 0;
  color: var(--ink-500);
}

.auth-alert {
  background: #fef3c7;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  font-weight: 600;
  color: var(--ink-700);
}

.auth-form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 161, 30, 0.2);
}

.auth-error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: -8px;
}

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

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-700);
}

.auth-link {
  color: var(--red-700);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-check--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-check--disabled input {
  cursor: not-allowed;
}

.auth-link--disabled {
  color: var(--ink-500);
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

.auth-btn {
  width: 100%;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.auth-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-500);
}

.auth-footer a {
  color: var(--red-700);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Brand dentro del formulario: oculto en desktop, visible en tablet/móvil */
.auth-brand--mobile {
  display: none;
}

/* ── Tablet y móvil: ocultar panel izquierdo, solo formulario ──────── */
@media (max-width: 960px) {
  .auth-shell {
    padding: 32px 20px;
    background: linear-gradient(160deg, #4a0f0f 0%, #8b1c1c 100%);
  }

  .auth-card {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
    border-radius: var(--radius-lg);
    overflow: visible;
  }

  /* Ocultar panel izquierdo en tablet y móvil */
  .auth-card__left {
    display: none;
  }

  /* Panel derecho: tarjeta blanca centrada */
  .auth-card__right {
    padding: 40px 36px 40px;
    border-radius: var(--radius-lg);
    gap: 18px;
  }

  .auth-brand--mobile {
    display: inline-flex;
    color: var(--ink-900);
    margin-bottom: 4px;
  }

  .auth-brand--mobile .auth-brand__title {
    color: var(--red-700);
  }

  .auth-brand--mobile .auth-brand__sub {
    color: var(--ink-500);
    opacity: 1;
  }
}

/* ── Móvil pequeño: pantalla completa ──────────────────────────────── */
@media (max-width: 600px) {
  .auth-shell {
    padding: 0;
    align-items: flex-start;
  }

  .auth-shell::after {
    display: none;
  }

  .auth-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-card__right {
    border-radius: 0;
    padding: 36px 24px 40px;
    flex: 1;
    gap: 16px;
    box-shadow: none;
  }

  .auth-card__header h2 {
    font-size: 1.5rem;
  }

  .auth-form input {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .auth-btn {
    padding: 14px 18px;
    font-size: 1rem;
  }

  .auth-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }
}
