/* ==========================================================================
   Entrada (AuthShell em pages/sign-in.js): entrar, criar conta, recuperar a
   senha, os links dos e-mails e a confirmação de um pedido do titular.
   A partir de 861 px, painel navy à esquerda e o conteúdo em surface; no
   celular, o painel vira uma faixa de 120 px no topo.
   ========================================================================== */

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--surface); }

/* Painel da marca */
.auth-panel {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--space-8);
  padding: var(--space-5) var(--space-12) var(--space-12); background: var(--navy); color: var(--on-navy);
}
.auth-panel-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.auth-brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: calc(17px * var(--type-scale)); letter-spacing: -0.02em; color: var(--on-navy); border-radius: var(--radius-md); }
.auth-brand img { width: 28px; height: 28px; }
.auth-panel .btn-ghost { color: var(--on-navy-muted); }
.auth-panel .btn-ghost:hover { color: var(--on-navy); background: var(--on-navy-hover); }
.auth-panel :focus-visible { outline-color: var(--on-navy); }
.auth-panel-body { margin: auto 0; max-width: 460px; display: flex; flex-direction: column; gap: var(--space-8); }
.auth-panel .auth-motto { color: var(--on-navy); text-wrap: balance; }
.auth-points { display: flex; flex-direction: column; gap: var(--space-4); }
.auth-points li { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--on-navy-muted); }
.auth-points .icon { margin-top: 2px; }

/* Conteúdo */
.auth-side { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.auth-main { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: var(--space-12) var(--gutter); }
.auth-content { width: 100%; max-width: 400px; }
.auth-title { margin-top: var(--space-8); }
.auth-content > .auth-title:first-child, .auth-content > div > .auth-title:first-child { margin-top: 0; }
.auth-sub { margin-top: var(--space-2); color: var(--ink-2); }
.auth-sub strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.auth-form { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-6); }
.auth-form > .btn-block { margin-top: var(--space-2); }
.auth-google { margin-top: var(--space-3); }
.google-mark { width: 18px; height: 18px; flex: none; }
.auth-error { display: flex; margin-top: var(--space-3); align-items: flex-start; }
.auth-form .auth-error { margin-top: 0; }
.auth-error .icon { margin-top: 2px; }
.auth-forgot { display: flex; margin: var(--space-4) auto 0; }
/* O aceite dos termos no cadastro (5.9): a caixa com os dois documentos e as versões, antes do botão */
.auth-terms { display: flex; flex-direction: column; gap: var(--space-1); }
.auth-terms-check { align-items: flex-start; font-size: calc(13.5px * var(--type-scale)); line-height: 1.45; }
.auth-terms-check input { margin-top: 3px; flex: none; }
.auth-terms-check .link { font-weight: 500; }
@media (max-width: 860px) { .auth-terms-check input { width: 20px; height: 20px; } .auth-terms-check { min-height: var(--touch-min); } }
.auth-legal { margin-top: var(--space-4); display: flex; gap: var(--space-2); align-items: flex-start; color: var(--ink-3); }
.auth-legal .icon { margin-top: 2px; }
.auth-legal .link { font-weight: 500; }
.auth-rule { margin: var(--space-6) 0; }
.auth-guest { display: flex; flex-direction: column; gap: var(--space-2); }
.auth-guest > .small { color: var(--ink-2); }
.auth-note { color: var(--ink-3); margin-top: var(--space-4); }
.auth-guest .auth-note { margin-top: 0; text-align: center; }
.auth-dev { display: flex; gap: var(--space-2); align-items: flex-start; }
.auth-dev .icon { margin-top: 2px; }
.auth-done { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.auth-done .auth-sub { margin-top: 0; }
.auth-done .btn { margin-top: var(--space-2); }
.auth-side > .site-foot.compact { padding-bottom: var(--space-6); }

/* Senha com mostrar e esconder */
.input-reveal { position: relative; display: block; }
.input-reveal .input { padding-right: var(--space-12); }
.input-reveal .reveal { min-width: var(--touch-min); min-height: var(--touch-min);
  position: absolute; right: var(--space-1); top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; color: var(--ink-3); border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input-reveal .reveal:hover { color: var(--ink); background: var(--surface-2); }

/* Campo com erro marcado pela classe (Configurações › Conta, lançamentos e cadastro guiado) */
.input.invalid, .select.invalid { border-color: var(--neg); }

/* Mensagem de erro geral de um formulário (também em Configurações, no Plano e no cadastro guiado) */
.auth-alert {
  display: flex; gap: var(--space-2); align-items: flex-start; padding: 10px var(--space-3); font-size: calc(13px * var(--type-scale));
  color: var(--neg); background: var(--neg-soft); border-radius: var(--radius-md);
}
.auth-alert .icon { flex: none; margin-top: 2px; }

@media (max-width: 1100px) {
  .auth-panel { padding-left: var(--space-8); padding-right: var(--space-8); }
}
/* Celular e tablet: o painel vira uma faixa de 120 px no topo, só com a marca e o lema */
@media (max-width: 860px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-panel { position: static; height: 120px; gap: var(--space-2); padding: var(--space-3) var(--gutter); justify-content: space-between; }
  .auth-panel-body { margin: 0; gap: 0; }
  .auth-panel .auth-motto { font-size: calc(20px * var(--type-scale)); line-height: 1.3; }
  .auth-points { display: none; }
  .auth-side { min-height: 0; }
  .auth-main { align-items: flex-start; padding-top: var(--space-8); padding-bottom: var(--space-10); }
  .auth-forgot { min-height: var(--touch-min); }
}

/* Configurações › Conta */
.list-row.wrap-row { flex-wrap: wrap; }
.inline-form { flex-basis: 100%; margin-top: var(--space-1); max-width: 420px; padding-left: 56px; }
@media (max-width: 600px) { .inline-form { padding-left: 0; } }

/* Aviso da conta de exemplo (convidado ou exemplo aberto ao lado da família) */
@media (max-width: 700px) {
  .space-banner-inner { flex-wrap: wrap; }
  .space-banner-inner > svg { display: none; }
}
