/* === Reset e Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 50%, #991B1B 100%);
  overflow-x: hidden;
}

/* === Container Principal === */
.main-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  padding-bottom: 80px; /* Space for footer */
  position: relative;
  overflow-x: hidden;
}

/* === Seção Esquerda (Branding) === */
.branding-section {
  flex: 1;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 50%, #991B1B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
  min-width: 45%;
}

/* === Elementos Decorativos de Fundo === */
.bg-decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.bg-circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  animation: float 8s ease-in-out infinite;
}

.bg-circle-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -50px;
  animation: float 6s ease-in-out infinite reverse;
}

.bg-circle-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  right: 10%;
  animation: float 10s ease-in-out infinite;
}

/* === Conteúdo Branding === */
.branding-content {
  text-align: center;
  color: white;
  position: relative;
  z-index: 5;
  max-width: 400px;
}

.branding-text h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.branding-text p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  line-height: 1.6;
}

.branding-features {
  margin-top: 40px;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.feature-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #FEF3C7;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* === Card de Login === */
.login-card {
  background: #FFFFFF;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  flex: 1;
  padding: 60px 60px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slideFromRight 0.6s ease-out;
  overflow-y: auto;
}

@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === Logo === */
.logo-container {
  text-align: center;
  margin-bottom: 24px;
}

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.4);
}

.logo-icon svg {
  width: 48px;
  height: 48px;
  color: white;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: #DC2626;
}

.logo-tagline {
  font-size: 13px;
  color: #6B7280;
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* === Tab Selector === */
.tab-selector {
  display: flex;
  background: #F3F4F6;
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 28px;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6B7280;
  background: transparent;
}

.tab-btn:hover {
  color: #374151;
}

.tab-btn.active {
  background: #FFFFFF;
  color: #DC2626;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn.active svg {
  color: #DC2626;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
  color: #9CA3AF;
  transition: color 0.3s ease;
}

.tab-btn:hover svg {
  color: #DC2626;
}

/* === Títulos === */
.welcome-title {
  font-size: 24px;
  font-weight: 600;
  color: #1F2937;
  text-align: center;
  margin-bottom: 8px;
}

.welcome-subtitle {
  font-size: 15px;
  color: #6B7280;
  text-align: center;
  margin-bottom: 32px;
}

/* === Demo Badge === */
.demo-badge {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Formulário === */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  color: #1F2937;
  background: #F9FAFB;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #DC2626;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:hover .input-icon {
  color: #DC2626;
}

.form-input::placeholder {
  color: #9CA3AF;
}

/* === Toggle de Senha === */
.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #DC2626;
}

/* === Opções do Formulário === */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #D1D5DB;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: white;
}

.checkbox-wrapper input {
  display: none;
}

.checkbox-wrapper input:checked + .custom-checkbox {
  background: #DC2626;
  border-color: #DC2626;
}

.checkbox-wrapper input:checked + .custom-checkbox svg {
  opacity: 1;
}

.custom-checkbox svg {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.checkbox-label {
  font-size: 14px;
  color: #4B5563;
}

.forgot-link {
  font-size: 14px;
  color: #DC2626;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: #B91C1C;
  text-decoration: underline;
}

/* === Botão de Login === */
.login-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Divisor === */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

.divider-text {
  font-size: 13px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === Link de Registro === */
.register-link {
  text-align: center;
  font-size: 15px;
  color: #6B7280;
}

.register-link a {
  color: #DC2626;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.register-link a:hover {
  color: #B91C1C;
  text-decoration: underline;
}

/* === Rodapé === */
.footer-text {
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
}

/* === Toast de Notificação === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1F2937;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 100;
  opacity: 0;
  transition: all 0.4s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.toast.error {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

/* === Responsividade === */
@media (max-width: 768px) {
  .branding-section {
    display: none;
  }

  .login-card {
    padding: 40px 32px;
  }

  .logo-icon {
    width: 64px;
    height: 64px;
  }

  .logo-icon svg {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 24px;
  }

  .welcome-title {
    font-size: 20px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tab-selector {
    flex-direction: column;
  }
  
  .tab-btn {
    padding: 12px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .logo-icon {
    width: 56px;
    height: 56px;
  }

  .logo-icon svg {
    width: 32px;
    height: 32px;
  }

  .logo-text {
    font-size: 20px;
  }

  .welcome-title {
    font-size: 18px;
  }

  .demo-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
}

/* === Footer Padronizado === */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 50px 0;
  text-align: center;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Botão Home (Ícone de Casa) === */
.home-button {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.home-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.home-icon-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
}

.home-icon-link i {
  font-size: 20px;
}

/* Responsividade para o botão home */
@media (max-width: 768px) {
  .home-button {
    top: 12px;
    left: 12px;
  }
  
  .home-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .home-icon-link i {
    font-size: 16px;
  }
}

