/* ==============================================
   AUTH PhD v3 - VARIÁVEIS E TEMAS
==============================================
*/
:root {
  --cor-primaria: #f52f57;
  --cor-secundaria: #007bff;
  --cor-texto-principal: #333;
  --cor-texto-secundario: #666;
  --cor-fundo: #f8f9fa;
  --cor-superficie: #ffffff;
  --cor-borda-glass: rgba(255, 255, 255, 0.3);
  --cor-glass: rgba(255, 255, 255, 0.7);
  --filtro-blur: blur(10px);
  --sombra-suave: 0 4px 12px rgba(0, 0, 0, 0.05);
  --duracao-transicao: 0.3s;
  --curva-animacao: ease-in-out;
}

[data-theme='dark'] {
  --cor-texto-principal: #f8f9fa;
  --cor-texto-secundario: #adb5bd;
  --cor-fundo: #212529;
  --cor-superficie: #343a40;
  --cor-borda-glass: rgba(255, 255, 255, 0.1);
  --cor-glass: rgba(52, 58, 64, 0.7);
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
}

/* ==============================================
   ESTRUTURA E FUNDO
==============================================
*/
.auth-fullscreen-wrapper {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  background-color: var(--cor-fundo);
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  filter: blur(5px);
  object-fit: cover;
}

.auth-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 20%, var(--cor-fundo) 90%);
  z-index: -1;
}

/* ==============================================
   CARTÃO PRINCIPAL (GLASSMORPHISM)
==============================================
*/
.auth-content-stack {
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: fadeIn 1s var(--curva-animacao) 0.3s backwards;
  background: var(--cor-glass);
  backdrop-filter: var(--filtro-blur);
  border: 1px solid var(--cor-borda-glass);
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: var(--sombra-suave);
}

.auth-header .auth-logo {
  height: 70px;
  margin-bottom: 1rem;
}

.auth-header h1 {
  font-weight: 900;
  color: var(--cor-texto-principal);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  line-height: 1.2;
}

.auth-header .lead {
  color: var(--cor-texto-secundario);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ==============================================
   COMPONENTES REFINADOS
==============================================
*/

/* Tema Toggle */
.theme-toggle-corner {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--cor-borda-glass);
  background: var(--cor-glass);
  backdrop-filter: var(--filtro-blur);
  color: var(--cor-texto-secundario);
  cursor: pointer;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duracao-transicao) var(--curva-animacao);
  font-size: 1.3rem;
}

.theme-toggle-corner:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--cor-primaria);
  color: var(--cor-primaria);
}

.theme-toggle-corner .bi-sun-fill {
  display: none;
}
[data-theme='dark'] .theme-toggle-corner .bi-moon-stars-fill {
  display: none;
}
[data-theme='dark'] .theme-toggle-corner .bi-sun-fill {
  display: block;
}

/* Abas */
.nav-tabs {
  border-bottom: none;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--cor-texto-secundario);
  font-weight: 600;
  transition: all var(--duracao-transicao);
  background-color: transparent;
}

.nav-tabs .nav-link.active {
  background-color: var(--cor-primaria);
  color: #fff !important;
  box-shadow: 0 4px 8px rgba(245, 47, 87, 0.3);
  transform: translateY(-2px);
}

/* Formulários */
.auth-form .form-control {
  background-color: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  color: var(--cor-texto-principal);
  border-radius: 0.75rem;
  height: 55px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  box-shadow: var(--sombra-suave);
  transition:
    border-color var(--duracao-transicao),
    box-shadow var(--duracao-transicao);
}

.auth-form .form-control:focus {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 0.25rem rgba(245, 47, 87, 0.25);
  outline: none;
}

.form-floating > label {
  padding: 0.75rem 1.25rem;
  color: var(--cor-texto-secundario);
  display: flex;
  align-items: center;
}

.form-floating > label i {
  margin-right: 0.5rem;
}

/* Botão Principal */
.btn-principal {
  background-color: var(--cor-primaria);
  border: 1px solid var(--cor-primaria);
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.8rem 1.5rem;
  transition: all var(--duracao-transicao) var(--curva-animacao);
  color: #fff;
  width: 100%;
}

.btn-principal:hover {
  background-color: #e02a4e;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(245, 47, 87, 0.4);
}

/* ==============================================
   MODAIS E EXTRAS
==============================================
*/
.modal-content.glass-card {
  background: var(--cor-glass);
  backdrop-filter: var(--filtro-blur);
  border: 1px solid var(--cor-borda-glass);
  border-radius: 1.5rem;
  box-shadow: var(--sombra-suave);
}

/* Centraliza e coloca os inputs lado a lado */
.code-input-wrapper {
  display: flex;
  justify-content: center; /* Centraliza o bloco de inputs */
  gap: 10px; /* Espaçamento entre os quadradinhos */
  margin: 2rem 0; /* Respiro vertical */
}

/* Garante que o Bootstrap não force largura total */
.code-input {
  width: 55px !important; /* Força a largura para não herdar 100% do Bootstrap */
  height: 65px;
  border-radius: 0.75rem !important;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background-color: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  color: var(--cor-texto-principal);
}

/* Ajuste para telas pequenas (Mobile) */
@media (max-width: 576px) {
  .code-input-wrapper {
    gap: 5px; /* Diminui o espaço no celular para não quebrar linha */
  }
  .code-input {
    width: 42px !important;
    height: 52px;
  }
}
.social-login-buttons .btn {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  font-size: 1.5rem;
  transition: all 0.3s;
}

.social-login-buttons .btn:hover {
  transform: translateY(-2px);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--cor-texto-secundario);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--cor-borda-glass);
}
.divider:not(:empty)::before {
  margin-right: 0.75em;
}
.divider:not(:empty)::after {
  margin-left: 0.75em;
}

/* ==============================================
   RESPONSIVIDADE (MOBILE)
==============================================
*/
@media (max-width: 768px) {
  .auth-content-stack {
    padding: 2rem;
    max-width: 95%;
  }

  .btn-principal {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.95rem !important;
    min-height: 48px;
  }

  .nav-tabs .nav-link {
    padding: 12px 15px !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 576px) {
  .auth-header h1 {
    font-size: 2rem;
  }
  .code-input {
    width: 45px;
    height: 55px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
