/* ============================================================
   AUTH MODAL — css/auth.css
   ============================================================ */

/* OVERLAY */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* MODAL */
.auth-modal {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  position: relative;
  transform: translateY(24px) scale(.97);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34, 1.2, .64, 1), opacity .3s ease;
}
.modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* tira de color superior */
.auth-modal::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #7c3aed, var(--accent));
}

/* BOTÓN CERRAR */
.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .85rem;
  transition: color .2s, border-color .2s;
}
.auth-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* TABS */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  padding-top: .75rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  padding: .75rem .5rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  letter-spacing: .02em;
  margin-bottom: -1px;
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* BODY */
.auth-body {
  padding: 1.75rem 1.75rem 1.5rem;
}

/* PANELES */
.auth-panel {
  display: none;
}
.auth-panel.active {
  display: block;
}

/* CABECERA DEL PANEL */
.auth-panel-head {
  margin-bottom: 1.5rem;
}
.auth-panel-head h2 {
  font-family: var(--font-head, 'Rajdhani', sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.auth-panel-head h2 span {
  color: var(--accent);
}
.auth-panel-head p {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* MENSAJE DE ERROR */
.auth-error {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #f87171;
  font-size: .78rem;
  padding: .6rem .85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: .5rem;
}
.auth-error.show {
  display: flex;
}

/* CAMPOS */
.auth-field {
  margin-bottom: 1rem;
}
.auth-field label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .45rem;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap > i {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .85rem;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: .7rem .9rem .7rem 2.4rem;
  color: var(--text);
  font-size: .875rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
.auth-input:focus {
  border-color: var(--accent);
  background: rgba(0, 212, 255, .04);
}
.auth-input::placeholder {
  color: var(--text-muted);
  opacity: .5;
}

/* TOGGLE CONTRASEÑA */
.toggle-pw {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  transition: color .2s;
}
.toggle-pw:hover {
  color: var(--accent);
}

/* FILA RECORDAR / OLVIDÉ */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: .78rem;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: .45rem;
  cursor: pointer;
  color: var(--text-muted);
}
.auth-check input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.auth-link {
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: opacity .2s;
}
.auth-link:hover {
  opacity: .8;
  text-decoration: underline;
}

/* BOTÓN PRINCIPAL */
.auth-btn {
  width: 100%;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .03em;
  padding: .8rem;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.auth-btn:hover {
  background: #00b8de;
  transform: translateY(-1px);
}
.auth-btn:active {
  transform: scale(.98);
}

/* DIVISOR */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.1rem;
  color: var(--text-muted);
  font-size: .75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* BOTONES SOCIALES */
.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1.25rem;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  padding: .6rem;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.auth-social-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* TEXTO FOOTER DEL MODAL */
.auth-footer-text {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  padding-bottom: .25rem;
}

/* BARRA DE FORTALEZA */
.strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: -.5rem 0 1rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s ease, background .3s ease;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .auth-modal {
    margin: 1rem;
    border-radius: 16px;
  }
  .auth-body {
    padding: 1.25rem;
  }
  .auth-social {
    grid-template-columns: 1fr;
  }
}