/* ============================================================
   calculos.ai — Auth CSS
   Login, Cadastro, Recuperação de senha
   ============================================================ */

/* ── Layout base ─────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  background: var(--bg);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Lado visual (esquerdo) ──────────────────────────────────── */
.auth-visual {
  position: relative;
  background: linear-gradient(135deg, #07090f 0%, #0d1b3e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 64px;
  overflow: hidden;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-visual-content .navbar-logo {
  margin-bottom: 64px;
  font-size: 1.1rem;
}

.auth-visual-text h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.auth-visual-text p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.75;
}

/* Stats */
.auth-visual-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border2);
}

.auth-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.auth-stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Bonus card */
.auth-bonus-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 48px;
  padding: 24px;
  background: var(--gold-dim);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: var(--radius-lg);
}

.bonus-icon { font-size: 1.8rem; flex-shrink: 0; }

.auth-bonus-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.auth-bonus-card span {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Lado formulário (direito) ───────────────────────────────── */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--bg2);
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-form-header p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Alertas ─────────────────────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.auth-alert-error {
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}

.auth-alert-success {
  background: rgba(134,239,172,0.10);
  border: 1px solid rgba(134,239,172,0.25);
  color: #86efac;
}

/* ── Botão Google ────────────────────────────────────────────── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-google:hover {
  background: var(--surface2);
  border-color: var(--blue-light);
}

/* ── Divisor ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

/* ── Campos ──────────────────────────────────────────────────── */
.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.auth-field input::placeholder { color: var(--text-muted); }

.auth-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.auth-field input.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.auth-field input.input-success {
  border-color: #86efac;
}

/* ── Campo senha com toggle ──────────────────────────────────── */
.input-password {
  position: relative;
}

.input-password input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.toggle-password:hover { color: var(--text); }

/* ── Força da senha ──────────────────────────────────────────── */
.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength-bar {
  flex: 1;
  height: 3px;
  background: var(--border2);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-fill.fraca    { width: 33%; background: #ef4444; }
.strength-fill.media    { width: 66%; background: #fbbf24; }
.strength-fill.forte    { width: 100%; background: #86efac; }

.strength-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  min-width: 40px;
}

.strength-label.fraca { color: #ef4444; }
.strength-label.media { color: #fbbf24; }
.strength-label.forte { color: #86efac; }

/* ── Link esqueceu senha ─────────────────────────────────────── */
.forgot-link {
  font-size: 0.78rem;
  color: var(--blue-glow);
  transition: color 0.2s;
  font-weight: 400;
}

.forgot-link:hover { color: var(--text); }

/* ── Checkbox termos ─────────────────────────────────────────── */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.auth-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}

.auth-checkbox label {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox a {
  color: var(--blue-glow);
  transition: color 0.2s;
}

.auth-checkbox a:hover { color: var(--text); }

/* ── Botão full width ────────────────────────────────────────── */
.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Link troca de tela ──────────────────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.auth-switch a {
  color: var(--blue-glow);
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch a:hover { color: var(--text); }

/* ── Recuperação de senha ────────────────────────────────────── */
.recovery-header { margin-bottom: 8px; }

.recovery-header h3 {
  font-size: 1.3rem;
  margin: 16px 0 8px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.btn-back:hover { color: var(--blue-glow); }

/* ── Loading state ───────────────────────────────────────────── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsivo ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { padding: 40px 24px; }
}