/* ABDESM — design system. Paleta do Portfólio Institucional: azul-marinho, verde-petróleo, dourado e creme.
   Regra: toda cor, espaço, raio e tipo vem de um token. Contraste AA conferido em tests/contraste.test.ts. */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-700.woff2') format('woff2'); }

:root {
  /* Cor */
  --navy-900: #082b4b;
  --navy-700: #083b62;
  --teal-700: #016e77;
  --teal-050: #e3f0f1;
  --gold-500: #e1a139;
  --gold-600: #c98a22;
  --cream: #fafaf6;
  --white: #ffffff;
  --ink: #0b2238;
  --muted: #4a5766;
  --on-dark-muted: #c9d4e0;
  --border: #e2ded1;
  /* Contorno de campo e opção: 3:1 contra o fundo (WCAG 1.4.11). --border é só para divisória e card. */
  --field-border: #6e7887;
  --whatsapp: #107a3b;
  --whatsapp-hover: #0b6430;
  --danger: #a8231a;
  --focus: #e1a139;

  /* Tipo: escala 1.25, corpo 17px */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5625rem;
  --text-2xl: 1.953rem;
  --text-3xl: clamp(1.75rem, 1.2rem + 2.8vw, 3.05rem);
  --leading: 1.65;
  --leading-tight: 1.15;

  /* Espaço: base 4px */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgb(8 43 75 / 0.06), 0 4px 16px rgb(8 43 75 / 0.06);
  --container: 72rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
/* Foco nunca fica atrás do botão fixo do WhatsApp (WCAG 2.4.11). */
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 88px; }
body { margin: 0; font-family: var(--font); font-size: var(--text-base); line-height: var(--leading); color: var(--ink); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-700); }
h1, h2, h3 { color: var(--navy-700); line-height: var(--leading-tight); margin: 0 0 var(--s-4); font-weight: 700; }
h1 { font-size: var(--text-3xl); letter-spacing: -0.01em; overflow-wrap: break-word; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); font-weight: 600; }
p { margin: 0 0 var(--s-4); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 48rem) { .container { padding: 0 var(--s-5); } }
.list-reset { list-style: none; margin: 0; padding: 0; }
.nowrap { white-space: nowrap; }
.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; }

.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--navy-900); color: var(--white); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: var(--s-4); color: var(--white); }

/* Botões: alvo mínimo de 44px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: var(--s-3) var(--s-5); border-radius: var(--radius-sm); border: 2px solid transparent; font: 600 var(--text-base)/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-600); color: var(--navy-900); }
.btn-navy { background: var(--navy-700); color: var(--white); }
.btn-navy:hover { background: var(--navy-900); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy-700); border-color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgb(255 255 255 / 0.7); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.12); color: var(--white); border-color: var(--white); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: var(--whatsapp-hover); color: var(--white); }

/* Cabeçalho */
.site-header { background: var(--white); border-bottom: 3px solid var(--gold-500); position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s-4); }
.brand img { height: 48px; width: auto; }
.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: var(--s-1); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-desktop a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); color: var(--navy-700); font-weight: 600; font-size: var(--text-sm); text-decoration: none; border-radius: var(--radius-sm); }
.nav-desktop a:hover, .nav-desktop a[aria-current='page'] { background: var(--teal-050); color: var(--teal-700); }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border: 2px solid var(--navy-700); border-radius: var(--radius-sm); color: var(--navy-700); font-weight: 600; cursor: pointer; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile ul { position: absolute; right: 0; top: calc(100% + var(--s-2)); min-width: 14rem; list-style: none; margin: 0; padding: var(--s-2); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.nav-mobile a { display: block; padding: var(--s-3); color: var(--navy-700); font-weight: 600; text-decoration: none; border-radius: var(--radius-sm); }
.nav-mobile a:hover { background: var(--teal-050); }
@media (min-width: 56rem) { .nav-desktop { display: block; } .nav-mobile { display: none; } }

/* Seções */
.section { padding: var(--s-7) 0; }
@media (min-width: 48rem) { .section { padding: var(--s-8) 0; } }
.section-white { background: var(--white); }
.section-navy { background: var(--navy-700); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-teal { background: var(--teal-700); color: var(--white); }
.section-teal h2 { color: var(--white); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.section-head h2 { margin: 0; }
.eyebrow { display: inline-block; margin-bottom: var(--s-3); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-700); }
.lead { font-size: var(--text-lg); color: var(--muted); max-width: 42rem; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: var(--white); padding: var(--s-7) 0; }
.hero-grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 60rem) { .hero { padding: var(--s-8) 0; } .hero-grid { grid-template-columns: 1fr 1.05fr; gap: var(--s-7); } }
.hero .eyebrow { color: var(--gold-500); }
.hero h1 { color: var(--white); margin-bottom: var(--s-4); }
.hero h1 em { font-style: normal; color: var(--gold-500); }
.hero p { color: var(--on-dark-muted); font-size: var(--text-lg); max-width: 34rem; }
.hero-copy { border-left: 4px solid var(--gold-500); padding-left: var(--s-4); min-width: 0; }
@media (min-width: 48rem) { .hero-copy { padding-left: var(--s-5); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero .hero-legal { margin: var(--s-5) 0 0; font-size: var(--text-sm); color: var(--on-dark-muted); }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.mosaic .main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* Faixa de confiança */
.trust { background: var(--white); border-bottom: 1px solid var(--border); }
.trust ul { list-style: none; margin: 0; padding: var(--s-5) 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
@media (min-width: 56rem) { .trust ul { grid-template-columns: repeat(4, 1fr); } }
.trust li { border-left: 3px solid var(--teal-700); padding-left: var(--s-3); }
.trust strong { display: block; color: var(--navy-700); }
.trust span { font-size: var(--text-sm); color: var(--muted); }

/* Grades e cards */
.grid { display: grid; gap: var(--s-5); }
@media (min-width: 40rem) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--s-2); }
.card p:last-child { margin-bottom: 0; }
.card-accent { border-top: 4px solid var(--teal-700); }
.muted { color: var(--muted); }

.stat { background: rgb(255 255 255 / 0.07); border-top: 3px solid var(--gold-500); border-radius: var(--radius); padding: var(--s-5); }
.stat strong { display: block; font-size: var(--text-2xl); color: var(--gold-500); line-height: 1.1; }
.stat span { display: block; margin-top: var(--s-2); color: var(--on-dark-muted); font-size: var(--text-sm); }

.step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-bottom: var(--s-3); border-radius: 50%; background: var(--gold-500); color: var(--navy-900); font-weight: 700; }

.cta-band { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.cta-band p { margin: 0; color: var(--white); }

/* Rodapé */
.site-footer { background: var(--navy-900); color: var(--on-dark-muted); padding: var(--s-7) 0 var(--s-6); font-size: var(--text-sm); }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.5fr; } }
.footer-logo { display: inline-block; background: var(--white); border-radius: var(--radius); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }
.footer-logo img { height: 48px; width: auto; }
.site-footer h2 { font-size: var(--text-sm); color: var(--gold-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-1); }
/* Alvo de toque de 44px também no rodapé (rubrica D7). */
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid rgb(255 255 255 / 0.15); text-align: center; }
.footer-legal p { margin: 0 0 var(--s-1); }
.footer-legal strong { color: var(--white); }

/* WhatsApp flutuante */
.whatsapp-float { position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp); color: var(--white); box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); }
.whatsapp-float:hover { background: var(--whatsapp-hover); color: var(--white); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* Páginas de texto */
.page { padding: var(--s-7) 0; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: var(--s-6); }
.dl { display: grid; gap: var(--s-1) var(--s-5); margin: 0; }
@media (min-width: 40rem) { .dl { grid-template-columns: 12rem 1fr; } }
.dl dt { font-weight: 600; color: var(--navy-700); }
.dl dd { margin: 0 0 var(--s-3); }

/* Campanhas */
.h3 { font-size: var(--text-lg); font-weight: 600; }
.tag { display: inline-block; margin-bottom: var(--s-2); padding: var(--s-1) var(--s-3); border-radius: 999px; background: var(--teal-050); color: var(--teal-700); font-size: var(--text-sm); font-weight: 600; }
.campaign-grid { align-items: stretch; }
.campaign-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; padding-bottom: var(--s-5); }
.campaign-card > *:not(.campaign-card-link) { margin-left: var(--s-5); margin-right: var(--s-5); }
.campaign-card-link { display: block; color: inherit; text-decoration: none; }
.campaign-card-link img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: var(--s-4); }
.campaign-card-link .tag, .campaign-card-link .card-title { margin-left: var(--s-5); margin-right: var(--s-5); }
.card-title { font-size: var(--text-lg); font-weight: 600; color: var(--navy-700); margin-bottom: var(--s-2); }
.campaign-card-link:hover .card-title { color: var(--teal-700); text-decoration: underline; }
.campaign-card .muted { flex: 1; font-size: var(--text-sm); }
.progress { height: 10px; border-radius: 999px; background: var(--teal-050); overflow: hidden; margin: var(--s-2) 0; }
.progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--teal-700); }
.raised { margin: 0; font-size: var(--text-sm); }
.raised strong { color: var(--navy-700); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-6); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border: 2px solid var(--field-border); border-radius: 999px; color: var(--navy-700); font-weight: 600; font-size: var(--text-sm); text-decoration: none; background: var(--white); }
.chip:hover { border-color: var(--teal-700); color: var(--teal-700); }
.chip[aria-current='page'] { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }
.empty { background: var(--white); border: 1px dashed var(--border); border-radius: var(--radius); padding: var(--s-6); text-align: center; }
.empty h2 { font-size: var(--text-lg); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4); margin-top: var(--s-6); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); font-size: var(--text-sm); color: var(--muted); }
.breadcrumb li + li::before { content: '›'; margin-right: var(--s-2); color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb li { display: inline-flex; align-items: center; }
/* No celular o título da página já está logo abaixo: o último item sai para não quebrar a trilha. */
@media (max-width: 40rem) { .breadcrumb li[aria-current] { display: none; } }
/* Celular: cabeçalho, doação, depois fotos e história (doar não fica no fim da página). Desktop: doação fixa à direita. */
.campaign-layout { display: grid; gap: var(--s-5); align-items: start; grid-template-areas: 'head' 'donate' 'main'; }
.campaign-head { grid-area: head; min-width: 0; }
.donate-box { grid-area: donate; }
.campaign-main { grid-area: main; min-width: 0; }
@media (min-width: 60rem) {
  .campaign-layout { grid-template-columns: minmax(0, 1fr) 22rem; grid-template-areas: 'head donate' 'main donate'; column-gap: var(--s-6); }
  .donate-box { position: sticky; top: calc(72px + var(--s-4)); }
}
.campaign-head p:last-child { margin-bottom: 0; }
.campaign-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); margin: 0 0 var(--s-4); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-bottom: var(--s-5); }
.thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); }
.story { max-width: 46rem; }
.story img { border-radius: var(--radius-sm); }
.timeline li { border-left: 3px solid var(--gold-500); padding: 0 0 var(--s-4) var(--s-4); }
.timeline time { font-size: var(--text-sm); font-weight: 600; color: var(--teal-700); }
.timeline p { margin: var(--s-1) 0 0; }
.btn-block { width: 100%; text-align: center; }
.donate-box h2 { margin-bottom: var(--s-4); }
.total-big { margin: 0; font-size: var(--text-2xl); font-weight: 700; line-height: 1.1; color: var(--navy-700); }
.total-meta { margin: var(--s-1) 0 var(--s-2); font-size: var(--text-sm); color: var(--muted); }
.donate-note { margin: var(--s-4) 0; }
.campaign-main section { margin-top: var(--s-6); }
.donate-legal { margin: var(--s-4) 0 0; font-size: var(--text-sm); color: var(--muted); }
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }

/* Formulário de doação */
.donate-form { margin-top: var(--s-4); }
.field { margin-bottom: var(--s-4); }
.field label, .amounts legend { display: block; font-weight: 600; color: var(--navy-700); margin-bottom: var(--s-1); }
.field input[type='text'], .field input:not([type]), .field input[type='email'], .field input[type='tel'], .field input[type='password'], .pix-box textarea {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border: 2px solid var(--field-border); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: var(--white);
}
.field input:focus-visible, .pix-box textarea:focus-visible { border-color: var(--teal-700); }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.hint { margin: 0 0 var(--s-1); font-size: var(--text-sm); color: var(--muted); }
.field-error { margin: var(--s-1) 0 0; font-size: var(--text-sm); font-weight: 600; color: var(--danger); }
.form-alert { scroll-margin-top: calc(72px + var(--s-4)); border: 2px solid var(--danger); border-radius: var(--radius-sm); background: var(--white); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); color: var(--danger); }
.form-alert p { margin: 0 0 var(--s-1); font-weight: 600; }
.form-alert ul { margin: 0; padding-left: var(--s-4); }
.form-alert a { color: var(--danger); }
.amounts { border: 0; margin: 0 0 var(--s-2); padding: 0; }
.amount-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); margin-bottom: var(--s-3); }
.amount-option { position: relative; }
.amount-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.amount-option span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 2px solid var(--field-border); border-radius: var(--radius-sm); font-weight: 700; color: var(--navy-700); background: var(--white); }
.amount-option input:checked + span { border-color: var(--teal-700); background: var(--teal-050); color: var(--teal-700); }
.amount-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2); align-items: start; }
.field-check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--teal-700); }
.field-check label { font-weight: 400; color: var(--ink); margin: 0; }
.field-check .field-error { grid-column: 1 / -1; }
/* Dica embaixo do rótulo, alinhada com o texto (coluna 2), não como terceiro item da linha. */
.field-check .hint { grid-column: 2; margin: 0; }

/* Página do PIX */
.donation-page { text-align: left; }
.pix-box { margin: var(--s-5) 0; scroll-margin-top: calc(72px + var(--s-4)); }
.pix-qr { width: 264px; max-width: 100%; height: auto; margin: 0 auto var(--s-4); image-rendering: pixelated; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pix-box label { display: block; font-weight: 600; color: var(--navy-700); margin-bottom: var(--s-1); }
.pix-box textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-sm); word-break: break-all; resize: none; margin-bottom: var(--s-3); }
.pix-steps { margin: var(--s-4) 0; padding-left: var(--s-5); }

/* Painel da equipe */
.admin-auth { max-width: 30rem; }
.admin-auth h1 { font-size: var(--text-2xl); }
.admin-auth form { margin-bottom: var(--s-5); }
.admin-auth form .btn { width: 100%; }
.admin-user { display: flex; align-items: center; gap: var(--s-4); font-size: var(--text-sm); line-height: 1.3; text-align: right; }
.totp-qr { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-4); margin-bottom: var(--s-6); }
.admin-stat { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--teal-700); border-radius: var(--radius); padding: var(--s-4); }
.admin-stat strong { display: block; font-size: var(--text-xl); color: var(--navy-700); line-height: 1.2; overflow-wrap: anywhere; }
.admin-stat span { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--text-sm); }
/* position: relative prende os textos .sr-only (absolute) das células dentro da rolagem; sem isso alargam a página. */
.table-wrap { position: relative; overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.admin-table th, .admin-table td { padding: var(--s-3); text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { color: var(--navy-700); }
.admin-table td.quebra { white-space: normal; min-width: 11rem; }
.table-wrap:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }

/* Comprovante de doação */
.receipt h1 { margin-bottom: var(--s-4); }
.print-only { display: none; }
.receipt-data { display: grid; gap: 0; margin: var(--s-5) 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.receipt-data div { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.receipt-data div:last-child { border-bottom: 0; }
.receipt-data dt { font-weight: 600; color: var(--navy-700); }
.receipt-data dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .receipt-data div { grid-template-columns: 1fr; gap: var(--s-1); } }
@media print {
  .skip-link, .site-header, .site-footer, .whatsapp-float, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .page { padding: 0; }
  .receipt a { color: #000; text-decoration: none; }
  .print-only { display: block; }
  .receipt-logo { margin-bottom: 16px; }
}

/* Painel: período, indicadores e gráficos (série única em --teal-700; texto sempre nas cores de texto). */
.periodos { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-5); }
.periodos a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border: 2px solid var(--field-border); border-radius: 999px; color: var(--navy-700); font-weight: 600; text-decoration: none; background: var(--white); }
.periodos a:hover { border-color: var(--navy-700); }
.periodos a[aria-current] { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }
.admin-stat small { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--text-sm); }
.admin-stats-geral .admin-stat { border-top-color: var(--navy-700); }
.charts { display: grid; gap: var(--s-5); margin-bottom: var(--s-6); }
@media (min-width: 64rem) { .charts { grid-template-columns: 3fr 2fr; align-items: start; } }
.chart { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); min-width: 0; }
.chart figcaption h2 { margin: 0; font-size: var(--text-lg); }
.chart figcaption p { margin: var(--s-1) 0 var(--s-4); font-size: var(--text-sm); }
.chart-vazio { margin: 0; padding: var(--s-5) 0; color: var(--muted); text-align: center; }
.chart-body { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2); }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.75rem; color: var(--muted); text-align: right; white-space: nowrap; }
/* Rótulo centrado na linha da grade: com space-between, o 1º sobe meia altura, o último desce meia e os do meio 1/6. */
.chart-y span:nth-child(1) { transform: translateY(-50%); }
.chart-y span:nth-child(2) { transform: translateY(-16.7%); }
.chart-y span:nth-child(3) { transform: translateY(16.7%); }
.chart-y span:nth-child(4) { transform: translateY(50%); }
.chart-plot { position: relative; min-width: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; border-radius: 2px; }
.chart-svg:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 4px; }
.chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.chart-svg .grid:first-of-type { stroke: var(--field-border); }
.chart-svg .hit { fill: transparent; }
.chart-svg .bar, .hbar .bar { fill: var(--teal-700); }
.chart-svg .mark.ativo .hit { fill: rgb(1 110 119 / 0.08); }
.chart-svg .mark.ativo .bar { fill: var(--navy-700); }
.chart-x { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.chart-tip { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: var(--s-2) var(--s-3); font-size: var(--text-sm); line-height: 1.3; white-space: nowrap; }
.chart-tip strong { display: block; color: var(--navy-900); font-size: var(--text-base); }
.chart-tip span { color: var(--muted); }
.chart-tabela { margin-top: var(--s-3); }
.chart-tabela summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--teal-700); font-weight: 600; }
.chart-tabela .table-wrap { max-height: 18rem; overflow-y: auto; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.hbars li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); align-items: baseline; }
.hbar-nome { font-size: var(--text-sm); color: var(--ink, inherit); overflow-wrap: anywhere; }
.hbar-valor { font-size: var(--text-sm); color: var(--muted); white-space: nowrap; }
.hbar-valor strong { color: var(--navy-900); }
.hbar { grid-column: 1 / -1; display: block; width: 100%; height: auto; }

/* Área do doador */
.doador-auth { max-width: 32rem; }
.doador-auth h1 { font-size: var(--text-2xl); }
.doador-sair { margin-top: var(--s-5); }

/* Menu do painel e formulários de campanha */
.admin-nav { background: var(--white); border-bottom: 1px solid var(--border); }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-1); overflow-x: auto; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); color: var(--navy-700); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.admin-nav a:hover { color: var(--teal-700); }
.admin-nav a[aria-current='page'] { border-bottom-color: var(--gold-500); }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.admin-head h1 { margin: 0; }
.admin-form { display: grid; gap: var(--s-5); max-width: 48rem; }
.admin-form fieldset { margin: 0; padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); min-width: 0; }
.admin-form legend { padding: 0 var(--s-2); font-weight: 700; color: var(--navy-700); font-size: var(--text-lg); }
.admin-form textarea { width: 100%; min-height: 12rem; padding: var(--s-2) var(--s-3); border: 2px solid var(--field-border); border-radius: var(--radius-sm); font: inherit; resize: vertical; }
.admin-form textarea:focus-visible, .admin-form select:focus-visible { border-color: var(--teal-700); }
.admin-form select { width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border: 2px solid var(--field-border); border-radius: var(--radius-sm); font: inherit; background: var(--white); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.status-tag { display: inline-flex; align-items: center; gap: var(--s-1); padding: 2px var(--s-3); border-radius: 999px; font-size: var(--text-sm); font-weight: 600; border: 1px solid var(--field-border); color: var(--navy-900); background: var(--white); white-space: nowrap; }
.status-tag[data-status='ativa'] { border-color: var(--teal-700); }
.status-panel { margin-bottom: var(--s-5); }
.status-panel h2 { font-size: var(--text-lg); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); }
.status-panel h3 { font-size: var(--text-base); margin: var(--s-4) 0 0; }
.checklist { list-style: none; margin: var(--s-3) 0; padding: 0; display: grid; gap: var(--s-2); }
.checklist li { display: flex; gap: var(--s-2); align-items: baseline; }
.checklist .marca { font-weight: 700; width: 1.25rem; flex: none; }
.checklist .ok .marca { color: var(--teal-700); }
.checklist .falta .marca { color: var(--danger); }
.acoes { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.acoes form { margin: 0; }
#erros, #situacao { scroll-margin-top: var(--s-4); }
.form-ok { border: 2px solid var(--teal-700); border-radius: var(--radius-sm); background: var(--white); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); color: var(--navy-900); }

/* Fotos e documentos da campanha no painel */
.midia { margin-top: var(--s-5); max-width: 48rem; scroll-margin-top: var(--s-4); }
.midia h2 { font-size: var(--text-lg); margin: 0 0 var(--s-2); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--s-4); margin: var(--s-4) 0; }
.foto { display: grid; gap: var(--s-2); align-content: start; }
.foto img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.foto-alt { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.foto .status-tag { justify-self: start; margin: 0; }
.foto .acoes { margin-top: 0; }
.upload { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.upload input[type='file'] { display: block; width: 100%; min-height: 44px; padding: var(--s-2) 0; }
.upload select { width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border: 2px solid var(--field-border); border-radius: var(--radius-sm); font: inherit; background: var(--white); }
.upload input[type='file']::file-selector-button { min-height: 44px; padding: 0 var(--s-4); margin-right: var(--s-3); border: 2px solid var(--navy-700); border-radius: var(--radius-sm); background: var(--white); color: var(--navy-700); font: 600 var(--text-sm) var(--font); cursor: pointer; }
.upload input[type='file']::file-selector-button:hover { background: var(--navy-700); color: var(--white); }
