/* ========================================
   DEZENA CERTA - ESTILOS DE AUTENTICAÇÃO
   ======================================== */

/* ========== MODAL BASE ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid var(--border-color);
}

.modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

/* ========== AUTH MODAL ========== */
.modal-auth .auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  flex: 1;
  padding: 14px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
}

.auth-form .form-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-form .form-header h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-form .form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form .form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.auth-form .form-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-form .form-group input::placeholder {
  color: var(--text-muted);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.forgot-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.form-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.form-divider span {
  background: var(--bg-card);
  padding: 0 15px;
  color: var(--text-muted);
  position: relative;
  font-size: 0.9rem;
}

.btn-google {
  background: white;
  color: #333;
  border: 2px solid #ddd;
}

.btn-google:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

/* ========== UPGRADE MODAL ========== */
.modal-upgrade .upgrade-header {
  text-align: center;
  margin-bottom: 30px;
}

.modal-upgrade .upgrade-header i {
  font-size: 4rem;
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  display: inline-block;
}

.modal-upgrade .upgrade-header h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.modal-upgrade .upgrade-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.upgrade-beneficios {
  margin-bottom: 30px;
}

.beneficio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.beneficio-item:last-child {
  border-bottom: none;
}

.beneficio-item i {
  color: var(--success);
  font-size: 1.2rem;
}

.upgrade-oferta {
  text-align: center;
  padding: 25px;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  margin-bottom: 25px;
  border: 2px solid var(--border-color);
}

.oferta-preco {
  margin-bottom: 12px;
}

.preco-antigo {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
  margin-right: 10px;
}

.preco-atual {
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.preco-atual span {
  font-size: 1rem;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
}

.oferta-garantia {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.upgrade-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== LIMITE MODAL ========== */
.modal-limite .limite-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-limite .limite-header i {
  font-size: 4rem;
  color: var(--warning);
  margin-bottom: 15px;
}

.modal-limite .limite-header h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.modal-limite p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
}

.limite-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

/* ========== BADGES ========== */
.badge-free-small,
.badge-premium-small {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.badge-free-small {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.badge-premium-small {
  background: var(--gradient-premium);
  color: white;
}

.user-info {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.user-name {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--success);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transform: translateX(150%);
  transition: var(--transition-normal);
  z-index: 3000;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.active {
  transform: translateX(0);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(150%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.error {
  background: var(--danger);
}

/* ========== RESPONSIVO ========== */
@media (max-width: 480px) {
  .modal-content {
    padding: 30px 20px;
    width: 95%;
  }
  
  .auth-tabs {
    flex-direction: column;
  }
  
  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .upgrade-oferta {
    padding: 20px;
  }
  
  .preco-atual {
    font-size: 1.8rem;
  }
  
  .toast {
    left: 20px;
    right: 20px;
    bottom: 20px;
    text-align: center;
    justify-content: center;
  }
}

/* ========== SCROLLBAR PERSONALIZADA ========== */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}