/* ============================================
   MODAL LOGIN/REGISTRO - Estilos Tema Docente
   ============================================ */

.nem-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nem-modal-overlay.activo {
  display: flex;
  animation: nemFadeIn 0.3s ease;
}

@keyframes nemFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nem-modal {
  background: linear-gradient(135deg, #fffdf5 0%, #fff9e6 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: nemSlideUp 0.4s ease;
}

@keyframes nemSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.nem-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  color: #8b7355;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nem-modal-close:hover {
  background: #f5e6cc;
  color: #4a3b2a;
  transform: rotate(90deg);
}

.nem-modal-header {
  text-align: center;
  padding: 32px 32px 24px;
  border-bottom: 2px solid #f0e6d2;
}

.nem-modal-icono {
  font-size: 64px;
  margin-bottom: 12px;
}

.nem-modal-header h2 {
  margin: 0 0 8px;
  color: #4a3b2a;
  font-size: 1.8rem;
  font-weight: 700;
}

.nem-modal-subtitulo {
  color: #8b7355;
  font-size: 0.95rem;
  margin: 0;
}

.nem-modal-tabs {
  display: flex;
  border-bottom: 2px solid #f0e6d2;
}

.nem-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.nem-tab:hover {
  color: #4a3b2a;
  background: #fff9e6;
}

.nem-tab.activo {
  color: #d97706;
  border-bottom-color: #d97706;
  background: #fffdf5;
}

.nem-costo-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  padding: 14px 18px;
  margin: 20px 24px 0;
  border-radius: 8px;
  font-size: 0.95rem;
}

.nem-costo-icono {
  font-size: 24px;
}

.nem-costo-texto {
  flex: 1;
  color: #92400e;
}

.nem-costo-tokens {
  font-weight: 700;
  color: #78350f;
  font-size: 1.1rem;
  white-space: nowrap;
}

.nem-formulario {
  padding: 24px;
}

.nem-regalo-banner {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #065f46;
  font-size: 0.95rem;
}

.nem-campo {
  margin-bottom: 18px;
}

.nem-campo label {
  display: block;
  margin-bottom: 6px;
  color: #4a3b2a;
  font-weight: 600;
  font-size: 0.95rem;
}

.nem-campo input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8dcc8;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #fff;
}

.nem-campo input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.nem-campo input::placeholder {
  color: #b8a990;
}

.nem-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #6b5d4d;
}

.nem-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #f59e0b;
}

.nem-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.nem-btn-primario {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.nem-btn-primario:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.nem-btn-primario:active {
  transform: translateY(0);
}

.nem-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.nem-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  margin: 0 24px;
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.9rem;
  font-weight: 500;
}

.nem-modal-footer {
  padding: 16px 24px 24px;
  text-align: center;
}

.nem-aviso-privacidad {
  margin: 0;
  font-size: 0.85rem;
  color: #8b7355;
}

.nem-aviso-privacidad a {
  color: #d97706;
  text-decoration: none;
}

.nem-aviso-privacidad a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .nem-modal {
    margin: 10px;
    border-radius: 16px;
  }
  
  .nem-modal-header {
    padding: 24px 20px 16px;
  }
  
  .nem-modal-icono {
    font-size: 48px;
  }
  
  .nem-modal-header h2 {
    font-size: 1.4rem;
  }
  
  .nem-formulario {
    padding: 20px;
  }
  
  .nem-tab {
    padding: 14px 10px;
    font-size: 0.9rem;
  }
}
