.auth-body {
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg);
}

.auth-topbar { border-bottom: 1px solid var(--border); flex-shrink: 0; }
.auth-topbar-row { display: flex; align-items: center; gap: 16px; height: 64px; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.auth-topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.auth-topbar-brand .brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0;
}
.auth-topbar-brand .brand-mark svg { width: 15px; height: 15px; }
.auth-topbar-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.auth-topbar-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 600; transition: color .12s;
}
.auth-topbar-link:hover { color: var(--text); }

.auth-wrap { display: flex; align-items: center; justify-content: center; width: 100%; flex: 1; padding: 24px; }

.auth-shell {
  display: flex; width: 100%; max-width: 920px; min-height: 560px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* coluna de marca -- so existe pra dar identidade de produto na tela de
   login/cadastro (antes era so um cartao vazio num fundo liso, muito
   diferente do resto do app). Sem nenhum dado sensivel nem estado --
   nunca precisa ser recarregada, e so decorativa/informativa. */
.auth-brand-panel {
  position: relative; flex: 1 1 42%; min-width: 0; overflow: hidden;
  background: linear-gradient(160deg, var(--accent), oklch(50% 0.14 255) 65%, oklch(34% 0.10 258));
  padding: 44px 38px; display: flex; align-items: flex-start;
}
.auth-brand-glow {
  position: absolute; inset: -20% -20% auto auto; width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, oklch(100% 0 0 / .18), transparent 70%); pointer-events: none;
}
.auth-brand-content { position: relative; color: white; z-index: 1; width: 100%; }
.auth-brand-content .auth-mark .brand-mark { background: oklch(100% 0 0 / .18); backdrop-filter: blur(4px); }
.auth-brand-content .auth-mark-title { color: white; font-size: 14px; }
.auth-brand-content .auth-mark-sub { color: oklch(100% 0 0 / .7); }
.auth-brand-headline {
  font-size: 25px; line-height: 1.28; margin: 0 0 28px; max-width: 360px; font-weight: 600;
}
.auth-feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-feature-list li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: oklch(100% 0 0 / .92); }
.auth-feature-icon {
  width: 30px; height: 30px; border-radius: var(--radius); background: oklch(100% 0 0 / .14); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.auth-feature-icon svg { width: 15px; height: 15px; }

/* no desktop o card da direita nao mostra essa marca (a marca de verdade
   fica so no painel esquerdo + no header) -- mas visibility:hidden (nao
   display:none) preserva o espaco que ela ocuparia, pra "Bem-vindo de
   volta" cair exatamente na mesma altura do titulo do painel esquerdo,
   que tem a marca de verdade acima dele com a mesma margem. */
.auth-mark-mobile { visibility: hidden; }

.auth-card {
  background: var(--panel); width: 100%; max-width: 440px; flex: 1 1 58%; min-width: 0;
  padding: 44px 40px; display: flex; flex-direction: column; justify-content: center;
}

@media (max-width: 820px) {
  .auth-shell { max-width: 440px; box-shadow: none; border: none; background: none; }
  .auth-brand-panel { display: none; }
  .auth-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
    max-width: none; padding: 40px;
  }
  .auth-mark-mobile { visibility: visible; }
}

.auth-view.hidden { display: none; }

.auth-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 44px; }
.auth-mark .brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: white;
}
.auth-mark .brand-mark svg { width: 17px; height: 17px; }
.auth-mark-title { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-dim); }
.auth-mark-sub { color: var(--faint); font-size: 11px; margin-top: 1px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 24px; font-family: var(--font-body);
  transition: color .12s;
}
.back-link:hover { color: var(--text); }

.auth-heading { margin-bottom: 30px; }
.auth-heading h1 { font-size: 24px; margin-bottom: 7px; }
.auth-heading p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.auth-form input {
  width: 100%; height: 48px; background: var(--panel2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 14px; font-size: 14px; font-family: var(--font-body); transition: border-color .12s;
}
.auth-form input:focus { border-color: var(--accent); }

/* botao "ver senha" -- embutido dentro do proprio campo, so troca
   type="password"/"text" e alterna qual dos dois olhinhos (aberto/riscado)
   fica visivel. tabindex="-1" no botao: nunca rouba o Tab do fluxo normal
   entre campos do formulario. */
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: var(--panel3, rgba(255,255,255,.06)); }
.password-toggle .icon-eye, .password-toggle .icon-eye-off { width: 18px; height: 18px; }
.password-toggle .hidden { display: none; }

/* validacao estilo Bootstrap (borda verde/vermelha + texto de feedback) --
   so aplica DEPOIS que o campo foi tocado (classe adicionada via JS em
   blur/input), nunca marca erro num campo que o usuario ainda nem visitou */
.field.is-valid input { border-color: var(--ok); }
.field.is-invalid input { border-color: var(--danger); }
.field-feedback { font-size: 11.5px; margin: 5px 0 0; min-height: 0; }
.field-feedback:empty { display: none; }
.field.is-valid .field-feedback { color: var(--ok); }
.field.is-invalid .field-feedback { color: var(--danger); }

.password-requirements {
  list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
}
.password-requirements li {
  font-size: 11.5px; color: var(--muted); padding-left: 20px; position: relative; transition: color .12s;
}
.password-requirements li::before {
  content: "•"; position: absolute; left: 4px; top: 0; color: var(--muted);
}
.password-requirements li.met { color: var(--ok); }
.password-requirements li.met::before { content: "✓"; color: var(--ok); left: 2px; font-weight: 700; }

.link-btn {
  background: none; border: none; padding: 0; color: var(--accent); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: color .12s; white-space: nowrap;
}
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; }
.link-btn.strong { font-size: 13px; }

.auth-submit { width: 100%; height: 48px; justify-content: center; font-size: 14.5px; margin-top: 2px; }

.auth-footer { text-align: center; margin-top: 28px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.auth-footer .link-btn.strong { font-size: 13.5px; }

.auth-mark-link { text-decoration: none; transition: opacity .12s; }
.auth-mark-link:hover { opacity: .85; }

.auth-hint { display: flex; align-items: flex-start; gap: 7px; margin: -4px 0 0; }
.auth-hint svg { flex-shrink: 0; margin-top: 1px; color: var(--muted); }
.auth-msg { font-size: 13px; text-align: center; min-height: 18px; margin-top: -6px; }
.auth-msg.error { color: var(--danger); }
.auth-msg.success { color: var(--ok); }

@media (max-width: 480px) {
  .auth-card { padding: 30px 22px; }
  .auth-heading h1 { font-size: 21px; }
}
