/* ========================================================
   ESTILOS DA ÁREA DE LOGIN (INFOAPP)
   Tema Neuro-Tech / Conexões Sinápticas (Ultra Inteligência)
   Mobile-First & Responsivo
   ======================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg-dark: #070b16;
  --color-card-bg: rgba(14, 22, 42, 0.88);
  --color-card-border: rgba(255, 255, 255, 0.08);
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  --color-accent-blue: #2563eb;
  --color-accent-purple: #7c3aed;
  --color-accent-cyan: #06b6d4;
  --color-accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  
  --color-input-bg: rgba(7, 12, 26, 0.7);
  --color-input-border: rgba(255, 255, 255, 0.12);
  --color-input-focus: #3b82f6;

  --color-success: #10b981;
  --color-error: #ef4444;

  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  min-height: 100vh;
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========================================================
   ILUMINAÇÃO DE FUNDO AMBIENTE (GLOW SINÁPTICO)
   ======================================================== */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #3b82f6 0%, rgba(37, 99, 235, 0) 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #9333ea 0%, rgba(147, 51, 234, 0) 70%);
  bottom: -150px;
  right: -100px;
}

/* ========================================================
   WRAPPER & CONTAINER DO CARD
   ======================================================== */
.login-page-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card-container {
  width: 100%;
  max-width: 430px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 45px rgba(59, 130, 246, 0.08);
}

/* ========================================================
   CABEÇALHO & LOGO
   ======================================================== */
.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrapper {
  display: inline-block;
  margin-bottom: 14px;
  position: relative;
}

.brand-logo {
  width: 105px;
  height: 105px;
  object-fit: cover;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ========================================================
   MENSAGENS DE ALERTA / TOAST
   ======================================================== */
.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease forwards;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

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

/* ========================================================
   ALTERNADOR DE ABAS (SEGMENTED CONTROL NATIVO)
   ======================================================== */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.tab-btn.active {
  background: var(--color-accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ========================================================
   FORMULÁRIOS & CAMPOS
   ======================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: -0.01em;
}

.label-with-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 0.78rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrapper input {
  width: 100%;
  height: 48px;
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: 12px;
  padding: 0 44px 0 44px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #475569;
  font-size: 0.88rem;
}

.input-wrapper input:focus {
  border-color: var(--color-input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(11, 18, 38, 0.85);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: #60a5fa;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  padding: 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.toggle-password-btn:hover {
  color: #e2e8f0;
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* Info Callout no Primeiro Acesso */
.info-callout {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #bfdbfe;
  line-height: 1.4;
}

.info-callout strong {
  color: #ffffff;
}

/* ========================================================
   BOTÃO DE SUBMISSÃO
   ======================================================== */
.submit-btn {
  width: 100%;
  height: 50px;
  background: var(--color-accent-gradient);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: all 0.25s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  filter: brightness(1.08);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.submit-btn:hover .arrow-icon {
  transform: translateX(3px);
}

.form-footer-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.form-footer-note a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.form-footer-note a:hover {
  text-decoration: underline;
}

/* ========================================================
   RODAPÉ DE SEGURANÇA
   ======================================================== */
.login-footer-security {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.shield-icon {
  width: 14px;
  height: 14px;
  color: #10b981;
}

/* ========================================================
   MOBILE ERGONOMICS (Foco total no celular)
   ======================================================== */
@media (max-width: 480px) {
  .login-page-wrapper {
    padding: 16px 12px;
  }

  .login-card-container {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .brand-logo {
    width: 95px;
    height: 95px;
    border-radius: 18px;
  }

  .login-title {
    font-size: 1.15rem;
  }

  .tab-btn {
    font-size: 0.8rem;
    padding: 9px 10px;
  }

  .submit-btn {
    height: 48px;
    font-size: 0.88rem;
  }
}
