/* =========================
   VARIABLES
========================= */
:root {
  --yellow: #FFC400;
  --black: #0B0B0B;
  --black-soft: #151515;
  --white: #FFFFFF;
  --gray: #B0B0B0;
  --radius: 8px;
}

/* =========================
   RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--black);
  color: var(--white);
}

/* =========================
   LAYOUT GENERAL
========================= */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  background: var(--black);
}

/* Evita bugs de grid/flex en Safari */
.auth-visual,
.auth-panel {
  min-width: 0;
}

/* =========================
   BLOQUE VISUAL (IMAGEN)
========================= */
.auth-visual {
  min-height: 100vh;
  background-color: var(--black);
  background-image: url("../img/login-bg-desktop.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* =========================
   PANEL DERECHO (FLUJO VERTICAL)
========================= */
.auth-panel {
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.1rem;
  padding: 0 1.25rem;
}

/* =========================
   CONTENEDORES DEL AUTH
========================= */
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}

.auth-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* =========================
   KICKER (amarillo)
   "Accede a tu cuenta"
========================= */
.auth-kicker {
  margin: 0 0 1.3rem;
  color: var(--yellow);
  font-weight: 800;
  font-size: 1.55rem;     /* MÁS grande en desktop */
  white-space: nowrap;    /* 1 sola línea */
  letter-spacing: 0.01em; /* más limpio */
  text-align: left;       /* panel pro */
}

/* (Opcional) si quieres controlar el aire del link "recuperar" */
.auth-forgot {
  margin: 0.6rem 0 0;
}

/* =========================
   TÍTULO (para register u otras pantallas)
========================= */
.auth-content h1 {
  width: 100%;
  font-size: 2.4rem;
  margin-bottom: 2.4rem;
  text-align: left;
  font-weight: 800;
}

/* =========================
   MENSAJES
========================= */
.auth-alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1rem;
}

.auth-error {
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.45);
  color: #ffd1d1;
}

.auth-success {
  background: rgba(0, 200, 120, 0.15);
  border: 1px solid rgba(0, 200, 120, 0.5);
  color: #bfffe6;
}

/* =========================
   FORMULARIO
========================= */
.auth-content form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1.8rem;
}

.auth-content label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--gray);
}

/* Inputs de texto (solo auth) */
.auth-content input {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid #333;
  outline: none;
}

.auth-content input:focus {
  border-color: var(--yellow);
}

/* ✅ FIX: no aplicar estilo de input de texto a checkbox/radio (solo auth) */
.auth-content input[type="checkbox"],
.auth-content input[type="radio"] {
  width: auto;
  padding: 0;
  border-radius: 0;
  border: none;
  outline: none;
  /* Alineación consistente en Safari */
  margin: 0;
  margin-top: 3px;
  flex: 0 0 auto;
}

/* =========================
   BOTÓN
========================= */
.btn-primary {
  width: 100%;
  padding: 1.25rem;
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.25rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================
   FOOTER
========================= */
.auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.auth-footer p {
  margin: 0.6rem 0;
  font-size: 1.05rem;
}

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

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

/* Legales: más abajo y más discretos (2-3 líneas aprox debajo de recuperar) */
.auth-legal {
  margin-top: 2.9rem;     /* MÁS abajo que antes */
  font-size: 0.95rem;
  opacity: 0.9;
  text-align: center;
}

/* =========================
   CONSENTIMIENTO (registro)
   (Si usas clases en vez de inline)
========================= */
.auth-content .consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  text-align: left;
}

.auth-content .consent-label {
  margin: 0;
  padding: 0;
  line-height: 1.25;
  color: var(--gray);
  cursor: pointer;
}

.auth-content a.consent-link,
.auth-content a.consent-link:link,
.auth-content a.consent-link:visited,
.auth-content a.consent-link:hover,
.auth-content a.consent-link:active {
  color: var(--yellow) !important;
  font-weight: 700;
  text-decoration: none;
}

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

.auth-content .consent-note {
  display: block;
  margin-top: 8px;
  opacity: 0.85;
  font-size: 0.9rem;
  line-height: 1.25;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
  .auth-wrapper {
    grid-template-columns: minmax(0, 1fr) 440px;
  }

  .auth-content h1 {
    font-size: 2.1rem;
  }

  .auth-container {
    max-width: 380px;
  }

  .auth-kicker {
    font-size: 1.35rem;
  }

  .auth-legal {
    margin-top: 2.4rem;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: 220px auto;
  }

  .auth-visual {
    display: block;
    min-height: 220px;
    background-position: center;
    background-size: contain;
  }

  .auth-panel {
    min-height: auto;
    font-size: 1rem;
    padding: 0;
    justify-content: flex-start;
    padding-top: 1.5rem;
  }

  .auth-container {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }

  .auth-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
  }

  /* Inputs y botón más compactos SOLO móvil */
  .auth-content input {
    font-size: 1.05rem;
    padding: 0.95rem;
  }

  .btn-primary {
    font-size: 1.05rem;
    padding: 1rem;
  }

  .auth-kicker {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    text-align: left;
  }

  .auth-legal {
    margin-top: 1.9rem;
    font-size: 0.9rem;
  }

  .auth-footer p {
    font-size: 0.95rem;
  }

  /* Mantener el checkbox correcto también en móvil */
  .auth-content input[type="checkbox"],
  .auth-content input[type="radio"] {
    padding: 0;
    width: auto;
    margin-top: 3px;
  }
}
