/* ==========================================================================
   Fonte Store — base.css
   Mobile-first. Identidade provisória: para trocar, edite só as variáveis de
   :root (aqui), o wordmark em js/layout.js e os favicons.
   Cor de ministério só aparece em chips/selos (--min-<slug> em loja.css).
   ========================================================================== */

:root {
  --marinho: #01013B;
  --marinho-2: #1B1C52;
  --fundo: #F6F7FA;
  --superficie: #FFFFFF;
  --texto: #14152B;
  --texto-2: #565A70;
  --borda: #E1E3EB;
  --ok: #1F7A4D;
  --alerta: #A15C00;
  --erro: #B42318;

  --radius: 8px;
  --container: 1120px;
  --gutter: 16px;
  --header-h: 56px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--fundo); color: var(--texto);
  font-family: var(--font); font-size: 1rem; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; display: block; }
a { color: var(--marinho); text-underline-offset: 3px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marinho); outline-offset: 2px; border-radius: 3px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 400; background: var(--marinho); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-weight: 800; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-weight: 800; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 4.5vw, 1.6rem); }
h3 { font-size: 1.05rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); margin: 0 0 .4rem; }
.lead { font-size: 1.05rem; color: var(--texto-2); max-width: 52ch; }
.muted { color: var(--texto-2); }
.small { font-size: .875rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-estreito { max-width: 720px; }
.section { padding: 28px 0 40px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { :root { --gutter: 28px; } .section { padding: 40px 0 56px; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius); border: 1.5px solid transparent;
  font-size: .95rem; font-weight: 800; text-decoration: none; text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-primary { background: var(--marinho); color: #fff; }
.btn-primary:hover { background: var(--marinho-2); }
.btn-secondary { background: var(--superficie); color: var(--marinho); border-color: var(--marinho); }
.btn-secondary:hover { background: var(--fundo); }
.btn-ghost { background: transparent; color: var(--texto); border-color: var(--borda); }
.btn-ghost:hover { border-color: var(--marinho); }
.btn-danger { background: var(--erro); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 180px; }
@media (min-width: 720px) { .btn-row.auto > .btn { flex: 0 0 auto; } }
.link-btn { background: none; border: 0; padding: 0; color: var(--marinho); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

/* ---------- Formulários ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: .875rem; font-weight: 700; margin-bottom: 6px; }
.label .opt { color: var(--texto-2); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; background: var(--superficie); color: var(--texto);
  border: 1.5px solid var(--borda); border-radius: var(--radius); font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 100px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #7A7E92; }
.input:hover, .select:hover, .textarea:hover { border-color: #B9BDCC; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--marinho); box-shadow: 0 0 0 3px rgba(1,1,59,.15); }
.input[readonly], .input:disabled { color: var(--texto-2); background: var(--fundo); cursor: not-allowed; }
.select { appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--texto-2) 50%), linear-gradient(135deg, var(--texto-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--erro); border-width: 2px; }
.hint { font-size: .8125rem; color: var(--texto-2); margin-top: 6px; }
.error-msg { display: none; font-size: .8125rem; font-weight: 700; margin-top: 6px; color: var(--erro); }
.field.has-error .error-msg { display: block; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 88px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; height: 38px; padding: 0 12px; background: transparent; border: 0; border-radius: 6px; color: var(--marinho); font-size: .8rem; font-weight: 800; cursor: pointer; }
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.pw-meter span { flex: 1; height: 4px; border-radius: 2px; background: var(--borda); }
.pw-meter[data-nivel="1"] span:nth-child(-n+1), .pw-meter[data-nivel="2"] span:nth-child(-n+2), .pw-meter[data-nivel="3"] span:nth-child(-n+3) { background: var(--marinho); }

.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .choices.two { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; background: var(--superficie); border: 1.5px solid var(--borda); border-radius: var(--radius); cursor: pointer; }
.choice label::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9095A8; }
.choice input[type="checkbox"] + label::before { border-radius: 4px; }
.choice input:checked + label { border-color: var(--marinho); background: #EEF0F8; }
.choice input:checked + label::before { border-color: var(--marinho); background: var(--marinho); box-shadow: inset 0 0 0 3px #fff; }
.choice input:focus-visible + label { outline: 3px solid var(--marinho); outline-offset: 2px; }
.choice .choice-title { font-weight: 700; display: block; line-height: 1.25; }
.choice .choice-sub { font-size: .8125rem; color: var(--texto-2); display: block; }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--marinho); cursor: pointer; }
.check label { font-size: .9375rem; cursor: pointer; }
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- Cards e avisos ---------- */
.card { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--radius); padding: 18px; }
.alert { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--borda); border-left-width: 4px; border-radius: var(--radius); background: var(--superficie); font-size: .9375rem; }
.alert-icon { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--marinho); color: #fff; font-weight: 800; font-size: .75rem; }
.alert-erro { border-left-color: var(--erro); } .alert-erro .alert-icon { background: var(--erro); }
.alert-ok { border-left-color: var(--ok); } .alert-ok .alert-icon { background: var(--ok); }
.alert-info { border-left-color: var(--marinho); }
.alert p { margin: 0; }
.alert > div { min-width: 0; }
.badge { white-space: nowrap; display: inline-block; padding: 2px 9px; border: 1px solid var(--borda); border-radius: 999px; font-size: .72rem; font-weight: 800; color: var(--texto-2); background: var(--superficie); }
.badge-solid { background: var(--marinho); color: #fff; border-color: var(--marinho); }
.badge-ok { color: var(--ok); border-color: var(--ok); }
.badge-alerta { color: var(--alerta); border-color: var(--alerta); }
.badge-erro { color: var(--erro); border-color: var(--erro); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 500; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; background: var(--marinho); color: #fff; padding: 12px 16px; border-radius: var(--radius); font-weight: 700; font-size: .9375rem; }
.toast.erro { background: var(--erro); }

/* ---------- Modal (única sombra do site) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(20,21,43,.55); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--superficie); border-radius: 12px 12px 0 0; padding: 22px 18px 18px; box-shadow: 0 12px 40px rgba(20,21,43,.28); }
.modal h2 { font-size: 1.25rem; }
.modal-actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 18px; }
@media (min-width: 560px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: 12px; padding: 24px; }
  .modal-actions { flex-direction: row; justify-content: flex-end; }
}

/* ---------- Faixa, cabeçalho e rodapé ---------- */
.faixa-fonte { background: var(--fundo); border-bottom: 1px solid var(--borda); font-size: .8125rem; font-weight: 700; }
.faixa-fonte .container { min-height: 32px; display: flex; align-items: center; }
.faixa-fonte a { color: var(--texto-2); text-decoration: none; padding: 4px 0; }
.faixa-fonte a:hover { color: var(--marinho); text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--marinho); color: #fff; }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link { color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem; padding: 8px 10px; border-radius: 6px; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--marinho-2); }
.site-header :focus-visible { outline-color: #fff; }
.config-banner { background: var(--alerta); color: #fff; text-align: center; font-size: .8125rem; font-weight: 700; padding: 8px var(--gutter); }

/* ---------- Páginas de formulário ---------- */
.auth-page { padding-top: 28px; padding-bottom: 48px; }
.auth-box { max-width: 440px; margin: 0 auto; }
.auth-box.wide { max-width: 540px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--texto-2); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--borda); }
.btn-google svg { width: 18px; height: 18px; flex: none; }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; margin: 4px 0 20px; }
.center { text-align: center; }
.mail-icon { width: 64px; height: 64px; border: 2px solid var(--marinho); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.mail-icon svg { width: 28px; height: 28px; }

/* ---------- Abas, listas ---------- */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--borda); margin: 0 calc(var(--gutter) * -1) 22px; padding: 0 var(--gutter); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 12px 14px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--texto-2); font-weight: 800; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--marinho); }
.tab[aria-selected="true"] { color: var(--marinho); border-bottom-color: var(--marinho); }
.panel { max-width: 680px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-item { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; }
.empty { border: 1.5px dashed var(--borda); border-radius: var(--radius); padding: 32px 18px; text-align: center; background: var(--superficie); }
.empty h2, .empty h3 { margin-bottom: .3em; }
.skeleton { height: 18px; border-radius: 4px; background: linear-gradient(90deg, #E9EBF1, #F2F3F7, #E9EBF1); background-size: 200% 100%; animation: brilho 1.2s infinite; margin-bottom: 12px; }
@keyframes brilho { to { background-position: -200% 0; } }
.danger-zone { border: 1px solid var(--borda); border-radius: var(--radius); padding: 18px; margin-top: 8px; background: var(--superficie); }
.account-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.account-head h1 { margin: 0; }

/* ---------- Texto longo ---------- */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.draft-banner { border: 1.5px dashed var(--alerta); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-weight: 700; color: var(--alerta); background: var(--superficie); }

.narrow { max-width: 640px; }
.mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; } .mt-22 { margin-top: 22px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.site-footer { border-top: 1px solid var(--borda); padding: 14px 0; margin-top: 96px; background: transparent; }
.footer-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .78rem; }
.footer-links a, .footer-links span { color: var(--texto-2); }
.footer-bottom { margin: 0; color: var(--texto-2); font-size: .78rem; }
