/* ============================================================
   STYLE_LOGIN.CSS — design moderno AstionLiterário
   ============================================================ */

/* === VARIÁVEIS DE TEMA === */
[data-theme="light"] {
  --primary: #6366f1; --primary-hover: #4f46e5; --primary-light: #818cf8;
  --secondary: #8b5cf6; --accent: #f59e0b;
  --bg-body: #f8f9fc; --bg-card: #ffffff; --bg-hover: #f0f1f5;
  --text: #1f2937; --text-muted: #6b7280; --text-dim: #9ca3af;
  --border: #e5e7eb;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg-body);
  color: var(--text);
  font-family: var(--fonte-corpo-padrao, 'Lato', 'Segoe UI', sans-serif);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LAYOUT SPLIT
   ============================================================ */
.login-split {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   PAINEL ESQUERDO — MARCA
   ============================================================ */
.login-brand-panel {
  flex: 1;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

/* Círculos decorativos (CSS puro, sem imagem) */
.login-brand-panel::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.login-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -80px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 380px;
}

.login-brand-logo {
  height: 80px;
  width: auto;
  margin-bottom: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.login-brand-title {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.login-brand-sub {
  font-size: 0.92rem;
  opacity: 0.82;
  line-height: 1.75;
  margin-bottom: 36px;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-feature-item i {
  font-size: 1.1rem;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ============================================================
   PAINEL DIREITO — FORMULÁRIO
   ============================================================ */
.login-form-panel {
  flex: 0 0 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--bg-card);
  overflow-y: auto;
}

.login-box {
  width: 100%;
  max-width: 380px;
}

/* === LOGO NO FORMULÁRIO === */
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo-img {
  height: 40px;
  width: auto;
}

/* === CABEÇALHO DO FORM === */
.login-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  text-align: center;
}

.login-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* ============================================================
   FORMULÁRIO
   ============================================================ */
.input-grupo {
  margin-bottom: 14px;
}

.login-formulario label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.login-formulario .input-padrao {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-body);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  margin-bottom: 0;
}

.login-formulario .input-padrao:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: var(--bg-card);
}

.login-formulario .input-padrao::placeholder {
  color: var(--text-dim);
}

/* === SENHA === */
.senha-container {
  position: relative;
  display: flex;
  align-items: center;
}

.senha-container .input-padrao {
  padding-right: 44px;
}

.btn-mostrar-senha {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}

.btn-mostrar-senha:hover { color: var(--primary); }

.btn-mostrar-senha:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.icone-olho { display: inline-block; user-select: none; }

/* === OPÇÕES === */
.login-opcoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.82rem;
}

.login-opcoes label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

/* === BOTÕES === */
.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  line-height: 1.4;
}

.botao-primario {
  background: linear-gradient(135deg, #3730a3, #6d28d9);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(55, 48, 163, 0.4);
  margin-bottom: 10px;
}

.botao-primario:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(55, 48, 163, 0.55);
}

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

.botao-google {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.botao-google:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
}

.botao-google .ri-google-fill { color: #ea4335; font-size: 1.05rem; }

/* === DIVISOR === */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === BOTÃO VISITANTE === */
.btn-visitante-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  animation: pulse-visitante 2.5s ease-in-out infinite;
}

.btn-visitante-login:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-visitante-login i { font-size: 1.05rem; }

@keyframes pulse-visitante {
  0%, 100% { box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25); }
  50%       { box-shadow: 0 4px 22px rgba(14, 165, 233, 0.5);  }
}

/* === LINKS === */
.login-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
}
.login-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* === RODAPÉ === */
.login-footer {
  text-align: center;
  font-size: 0.82rem;
  margin-top: 16px;
  color: var(--text-muted);
}

/* === MENSAGENS DE ERRO === */
.input-erro {
  display: none;
  color: #ef4444;
  font-size: 0.78rem;
  margin-top: 4px;
}

/* ============================================================
   CÓDIGO DE VERIFICAÇÃO (2FA)
   ============================================================ */
#codigo_email_container {
  animation: slideDown 0.4s ease-out;
}

#codigo_email {
  transition: all 0.3s ease;
}

#codigo_email:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 860px) {
  .login-split { flex-direction: column; }

  .login-brand-panel { display: none; }

  .login-form-panel {
    flex: 1;
    flex-basis: auto;
    padding: 32px 20px 52px;
  }

  .login-box { max-width: 100%; }
}

@media (max-width: 480px) {
  .login-form-panel { padding: 28px 16px 48px; }
}
