/* CSS Profissional para Páginas de Autenticação - Mobile First */
/* Login e Registro com Design Moderno e Responsivo */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
    /* Backgrounds */
    --bg-primary: #050505;
    --bg-secondary: #0d0d0d;
    --bg-tertiary: #161616;
    --bg-card: #1d1d1d;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #c2c2c2;
    --text-muted: #7d7d7d;

    --accent-green: #07d881; /* Cor de destaque positiva */
    --accent-red: #ff4757; /* Cor de destaque negativa */
    --accent-blue: #10b981; /* Cor de destaque principal */
    --accent-purple: #07d881; /* Cor de destaque secundária */
	
    --border-color: #0e0c0c00; /* Cor de borda padrão */
    --border-light: #000000; /* Cor de borda mais clara */
  

    /* Shadows */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 24px 40px rgba(0, 0, 0, 0.65);

    /* Layout */
    --auth-max-width: 400px;
    --input-height: 56px;
    --button-height: 56px;

    /* Radius */
    --border-radius: 12px;
    --border-radius-lg: 16px;
}

:root[data-theme="light"]  {
  /* Cores principais — Tema Claro */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(0, 0, 0, 0.04);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-green: #10b981; /* Cor de destaque positiva */
    --accent-red: #ff4757; /* Cor de destaque negativa */
    --accent-blue: #10b981; /* Cor de destaque principal */
    --accent-purple: #07d881; /* Cor de destaque secundária */
	

  --border-color: #e5e7eb;
  --border-light: #cbd5f5;

  /* Sombras — mais suaves no tema claro */
  --shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px -5px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.16);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  --gradient-success: linear-gradient(135deg, #00a86b 0%, #009f64 100%);
  --gradient-background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  
  /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
	
	--sidebar-width: 370px;  
}


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-size: 16px;
  overflow-x: hidden;
  background: var(--bg-primary);
}

/* Container principal da autenticação */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

/* Efeito de fundo animado */
.auth-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
   z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Card principal de autenticação */
.auth-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: var(--auth-max-width);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho no card */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transition: left 0.8s;
}

.auth-card:hover::before {
  left: 100%;
}

/* Header da autenticação */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: white;
  
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: logoShine 3s ease-in-out infinite;
}

@keyframes logoShine {
  0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-text {
  font-weight: 800;
  font-size: 28px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.2px;
}

/* Formulário */
form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  height: var(--input-height);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0 16px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-weight: 500;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: var(--bg-tertiary);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  color: var(--accent-blue);
}

/* Estados de validação */
.form-input:valid {
  border-color: var(--accent-green);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--accent-red);
}

.form-input:valid:focus {
  box-shadow: 0 0 0 4px rgba(0, 208, 132, 0.1);
}

.form-input:invalid:not(:placeholder-shown):focus {
  box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

/* Botão primário */
.btn-primary {
  width: 100%;
  height: var(--button-height);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  border-radius: var(--border-radius);
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus {
  outline: none;
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Loading state para o botão */
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer da autenticação */
.auth-footer {
  text-align: center;
  margin-top: 24px;
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.auth-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  transition: width 0.3s ease;
}

.auth-link:hover {
  color: var(--accent-purple);
  transform: translateY(-1px);
}

.auth-link:hover::after {
  width: 100%;
}

/* Mensagens de erro/sucesso */
.message {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.error {
  background: rgba(255, 71, 87, 0.1);
  border-color: var(--accent-red);
  color: #ff6b7a;
}

.message.success {
  background: rgba(0, 208, 132, 0.1);
  border-color: var(--accent-green);
  color: #00e396;
}

.message.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  color: #60a5fa;
}

/* Checkbox personalizado (para termos de uso, etc.) */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0;
}

.checkbox-input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-input:checked {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: var(--accent-blue);
}

.checkbox-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.checkbox-label a:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

/* Divisor "ou" */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider::before {
  margin-right: 16px;
}

.divider::after {
  margin-left: 16px;
}

/* Botões sociais */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-social {
  width: 100%;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
}

.btn-social:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-social.google {
  border-color: #db4437;
  color: #db4437;
}

.btn-social.google:hover {
  background: rgba(219, 68, 55, 0.1);
}

.btn-social.facebook {
  border-color: #4267b2;
  color: #4267b2;
}

.btn-social.facebook:hover {
  background: rgba(66, 103, 178, 0.1);
}

/* Responsividade */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px;
    margin: 16px;
    border-radius: var(--border-radius);
  }
  
  .logo-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .logo-text {
    font-size: 24px;
  }
  
  .auth-subtitle {
    font-size: 14px;
  }
  
  .form-input,
  .btn-primary {
    height: 52px;
  }
  
  .form-input {
    font-size: 16px; /* Previne zoom no iOS */
  }
}

@media (max-height: 700px) {
  .auth-container {
    padding: 16px;
    justify-content: flex-start;
    padding-top: 40px;
  }
  
  .auth-card {
    margin-bottom: 40px;
  }
}

/* Orientação paisagem */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .auth-container {
    padding: 12px;
    justify-content: center;
  }
  
  .auth-card {
    padding: 20px;
    max-width: 360px;
  }
  
  .auth-header {
    margin-bottom: 20px;
  }
  
  .logo {
    margin-bottom: 12px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
}

/* Estados de foco melhorados para acessibilidade */
.form-input:focus,
.btn-primary:focus,
.auth-link:focus,
.checkbox-input:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Animações de entrada */
.auth-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevenção de zoom no iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .form-input {
    font-size: 16px;
  }
}

/* Dark mode support (caso necessário) */
@media (prefers-color-scheme: dark) {
  /* Já está em dark mode por padrão */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .auth-container {
    background: white;
    color: black;
  }
  
  .auth-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

