/* ============================================================
   pages.css — layout de páginas (auth, conta)
   O cabeçalho/rodapé compartilhados ficam em shell.css.
   Complementa tokens/base/components do design system.
   ============================================================ */

/* ---------- Cartão de autenticação (login/cadastro) ---------- */
.auth-wrap {
  max-width: 440px;
  margin: 48px auto;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 4px;
}
.auth-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.auth-card .switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 18px;
}
.auth-card .switch a { color: var(--sage-deep); font-weight: 500; }

/* ---------- Feedback (alertas) ---------- */
.alert {
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert.error { background: #FBEDE9; color: #8A4B3B; border: 1px solid #EED7CF; }
.alert.success { background: #EDF1E7; color: #566246; border: 1px solid #DAE2CE; }
.alert[hidden] { display: none; }

/* ---------- Página "minha conta" ---------- */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: start;
  margin: 32px 0;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
}
.panel h2 {
  font-size: 22px;
  margin-bottom: 4px;
}
.panel .panel-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 18px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--muted); }
.info-row .v { color: var(--ink); font-weight: 500; text-align: right; }

/* Lista de endereços */
.address-item {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.address-item .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.address-item .badge-default {
  font-size: 10.5px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-tint);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  font-weight: 600;
}
.address-item .lines { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.address-item .actions { margin-top: 10px; display: flex; gap: 8px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: var(--card); border-color: var(--line); color: #9B5442; }
.btn-danger:hover { border-color: #C88; }

/* ---------- Responsivo ---------- */
@media (max-width: 820px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* ---------- Ações da conta ---------- */
.account-actions { margin-top: 18px; display: grid; gap: 8px; }
.address-form { margin-top: 16px; }
.address-form summary { list-style: none; }
.address-form form { margin-top: 16px; }
.address-default {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
/* `.btn` define display e venceria o atributo hidden. */
.account-actions [hidden] { display: none; }

/* ---------- Utilitário de acessibilidade ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
