/* =====================================================================
   ADOTA PERTO: estilos
   Cores da marca ficam aqui em cima. Troque à vontade.
   ===================================================================== */
:root {
  --bg: #F5F3ED;
  --surface: #FFFFFF;
  --surface-2: #EBEFE8;
  --ink: #28332E;
  --muted: #58665F;
  --line: #D8DED7;
  --brand: #214C43;
  --brand-dark: #173B33;
  --brand-soft: #E4EBE0;
  --sage: #CCD8C8;
  --accent: #E6A18C;
  --accent-ink: #A24C37;
  --accent-soft: #F9EAE3;   /* fundo coral clarinho: "esperando há mais tempo" */
  --accent-deep: #7A3423;   /* texto sobre o coral clarinho */
  --green: #2F6B57;
  --green-soft: #E5F0EA;
  --sun: #F2B33D;
  --sun-soft: #FCEBC4;
  --sun-ink: #7A4B00;
  --danger: #A12C2C;
  --danger-soft: #F9E1E1;

  --font-title: "Manrope", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .06), 0 8px 24px rgba(43, 36, 32, .06);
  --wrap: 1180px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.035em; color: var(--brand); }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.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: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }
.section { padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 900px) { .section { padding-top: 72px; padding-bottom: 72px; } }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.logo { letter-spacing: -.055em; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brand); font-family: var(--font-title); font-weight: 600; font-size: 1.45rem; white-space: nowrap; }
.logo:hover { color: var(--brand-dark); }
.logo svg { width: 38px; height: 38px; flex-shrink: 0; }
.logo span b { color: var(--brand); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 4px; min-height: 40px; }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav a.nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; white-space: nowrap; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a.nav-link:hover { background: var(--surface-2); }
.nav a.nav-link[aria-current="page"] { color: var(--brand-dark); }
.badge-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; position: relative; }
.menu-toggle .badge-count { position: absolute; top: -6px; right: -6px; }
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
@media (min-width: 1200px) {
  .nav-links { display: flex; }
  .menu-toggle, .mobile-menu, .mobile-menu.open { display: none; }
}

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: var(--r-sm); border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--brand-dark); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #24564a; color: #fff; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #E7B9B9; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-dark); text-decoration: underline; cursor: pointer; font-weight: 600; }

/* ---------- Selos e etiquetas ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-sun { background: var(--sun-soft); color: var(--sun-ink); }
.tag-wait { background: var(--accent-soft); color: var(--accent-deep); }
.tag-lost { background: var(--danger-soft); color: var(--danger); }
.tag-found { background: var(--green-soft); color: var(--green); }
.tag-brand { background: var(--brand-soft); color: var(--brand-dark); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; font-size: .88rem; }

/* ---------- Página inicial: identidade e busca, sem alterar as demais telas ---------- */
.home-hero { background: var(--bg); }
.home-hero .wrap { padding: 0; max-width: 1440px; display: grid; }
.hero-copy { padding: 32px 20px; min-width: 0; }
.home-hero h1 { font-size: clamp(1.9rem, 3.1vw, 2.8rem); line-height: 1.18; letter-spacing: -.04em; margin: 0 0 14px; }
.home-hero h1 span { display: block; }
.home-hero .lead { max-width: 29em; color: var(--muted); font-size: 1.18rem; line-height: 1.45; margin-bottom: 22px; }
.hero-search { display: grid; gap: 12px; max-width: 400px; }
.hero-species { padding: 0; margin: 0; border: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hero-species label { position: relative; cursor: pointer; }
.hero-species input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hero-species span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; }
.hero-species input:checked + span { background: var(--sage); border-color: var(--sage); color: var(--brand-dark); }
.hero-species input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 3px; }
.hero-city { position: relative; padding: 7px 12px 0; border: 1px solid #BDC8BF; border-radius: var(--r-sm); background: var(--surface); }
.hero-city label { display: block; font-size: .8rem; line-height: 1.15; color: var(--muted); margin: 0; }
.hero-city select { border: 0; background: transparent; min-height: 36px; padding: 2px 24px 6px 0; font-weight: 600; color: var(--brand); }
.hero-search .btn { width: 100%; }
.hero-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--brand); font-size: .95rem; }
.hero-note .icon { color: var(--accent-ink); width: 22px; height: 22px; }
.hero-photo { margin: 0; background: var(--sage); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; aspect-ratio: 3 / 2; }
.home-journey { background: var(--surface); border-bottom: 1px solid var(--line); }
.home-journey ul { list-style: none; padding: 16px 0; margin: 0; display: grid; gap: 14px; }
.home-journey li { display: flex; gap: 12px; align-items: center; color: var(--brand); }
.home-journey .icon { width: 26px; height: 26px; }
.home-featured { padding-top: 36px; padding-bottom: 40px; }
.home-featured .section-head { align-items: baseline; gap: 16px; }
.home-featured h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.home-featured .view-all { white-space: nowrap; color: var(--accent-ink); font-weight: 600; }
.home-featured .grid-animals { grid-template-columns: minmax(0, 1fr); gap: 20px; }
/* min-height e overflow: sem isso a foto empurra o cartão de volta para o formato alto */
.home-featured .card-photo { aspect-ratio: 3 / 2; min-height: 0; overflow: hidden; }
.home-featured .card-body { padding: 14px 16px; }
.home-featured .card-body h3 { font-size: 1.25rem; }
.card-city { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; font-size: .95rem; }
.home-featured .empty, .home-featured .form-error { grid-column: 1 / -1; }
.home-featured .empty p:last-child { margin-bottom: 0; }
.home-page #cidades { padding-top: 40px; }
.site-header .btn-primary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.site-header .btn-primary:hover { background: var(--brand-soft); }
section[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
@media (min-width: 620px) {
  .home-featured .grid-animals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .home-hero .wrap { grid-template-columns: 1fr 1.12fr; align-items: stretch; }
  .hero-copy { padding: 48px 40px 44px max(28px, calc((100vw - var(--wrap)) / 2 + 28px)); }
  .hero-photo { min-height: 500px; }
  .hero-photo img { aspect-ratio: auto; }
  .home-journey ul { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px 0; gap: 24px; }
  .home-journey li { justify-content: center; }
  .home-journey li + li { border-left: 1px solid var(--line); }
}
@media (min-width: 1440px) { .hero-copy { padding-left: 130px; } }
@media (max-width: 619px) {
  .home-journey { display: none; }
  .home-featured .section-head { flex-wrap: wrap; }
  .hero-search { max-width: none; }
  .hero-copy { padding: 28px 20px; }
  .home-featured { padding-top: 28px; }
  /* No celular, os destaques deslizam para o lado em vez de ocupar 3 telas */
  .home-featured .grid-animals { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 2px 16px 10px; scroll-padding: 0 16px; scrollbar-width: none; }
  .home-featured .grid-animals::-webkit-scrollbar { display: none; }
  .home-featured .grid-animals > .card, .home-featured .grid-animals > .skeleton { flex: 0 0 78%; scroll-snap-align: start; }
  .home-featured .grid-animals > .empty, .home-featured .grid-animals > .form-error, .home-featured .grid-animals > p { flex: 1 0 100%; }
}

/* ---------- Cidades ---------- */
.city-search { position: relative; max-width: 420px; margin-bottom: 20px; }
.city-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.city-search input[type="search"] { padding-left: 42px; }
.city-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.city-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.city-card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-1px); }
.city-card .pin { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.city-card strong { display: block; font-family: var(--font-title); font-weight: 600; font-size: 1.1rem; line-height: 1.2; }
.city-card small { color: var(--muted); font-size: .88rem; }

/* ---------- Como funciona ---------- */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; counter-reset: step; }
.steps li { position: relative; padding-left: 64px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; font-family: var(--font-title); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--brand); }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }

.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
@media (min-width: 768px) { .panel { padding: 32px; } }
.panel-brand { background: var(--brand); color: #F5F3ED; border-color: var(--brand); }
.panel-brand h2, .panel-brand h3 { color: #fff; }
.panel-brand .muted { color: #D7E2D6; }
.panel-brand a:not(.btn) { color: var(--sun); }
.check-list { list-style: none; padding: 0; margin: 0 0 20px; }
.check-list li { display: flex; gap: 10px; padding: 7px 0; }
.check-list li .icon { color: var(--green); margin-top: 3px; }
.panel-brand .check-list li .icon { color: var(--sun); }

/* ---------- Página da cidade ---------- */
.page-head { padding: 28px 0 8px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.filters { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 16px 0 24px; }
.filters-toggle { display: inline-flex; }
.filter-living { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.filter-living .label { width: 100%; font-weight: 700; font-size: .95rem; }
.filters-body { display: none; gap: 10px; }
.filters.open .filters-body { display: grid; }
@media (min-width: 900px) {
  .filters-toggle { display: none; }
  .filters-body, .filters.open .filters-body { display: grid; grid-template-columns: auto repeat(4, minmax(140px, 1fr)) auto; align-items: end; }
  .filter-living { grid-column: 1 / -1; }
  .filter-living .label { width: auto; margin-right: 4px; }
}
.segmented { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 8px 14px; border-radius: 7px; font-weight: 700; cursor: pointer; color: var(--muted); min-height: 38px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; cursor: pointer; }
.check-inline input { width: 20px; height: 20px; accent-color: var(--brand); }

.waiting-strip { background: var(--accent-soft); border-radius: var(--r-lg); padding: 22px 18px; margin-bottom: 32px; }
.waiting-strip h2 { font-size: 1.35rem; color: var(--accent-ink); display: flex; align-items: center; gap: 8px; }
.waiting-strip p { color: var(--accent-deep); }

.grid-animals { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid-animals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1050px) { .grid-animals { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
a.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card-photo { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo .tag { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.card-photo .tag + .tag { top: 40px; }
.card-body { padding: 12px 14px 14px; }
.card-body h3 { font-size: 1.12rem; margin: 0 0 2px; }
.card-body .meta { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.card-body .owner { margin-top: 8px; font-size: .84rem; color: var(--muted); display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-body .owner .icon { color: var(--green); }
.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); }
.empty .icon { width: 40px; height: 40px; color: var(--brand); margin: 0 auto 10px; display: block; }

.sponsors { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.sponsors h2 { font-size: 1.25rem; }
.sponsor-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 14px; }
.sponsor { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.sponsor:hover { border-color: var(--brand); color: var(--ink); }
.sponsor img, .sponsor .sponsor-initial { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: var(--surface-2); flex-shrink: 0; }
.sponsor .sponsor-initial { display: grid; place-items: center; font-family: var(--font-title); font-weight: 600; color: var(--brand); font-size: 1.3rem; }
.sponsor strong { display: block; line-height: 1.25; }
.sponsor small { color: var(--muted); line-height: 1.3; display: block; }
.sponsor-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

/* ---------- Página do animal ---------- */
.animal-layout { display: grid; gap: 28px; padding: 20px 0 40px; }
@media (min-width: 900px) { .animal-layout { grid-template-columns: 1.05fr .95fr; gap: 48px; padding-top: 28px; } }
.gallery-main { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); border-radius: var(--r-lg); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 68px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.thumbs button[aria-current="true"] { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.animal-info h1 { margin-bottom: 8px; }
.animal-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 18px 0; }
.animal-facts div { background: var(--surface); padding: 10px 14px; }
.animal-facts dt { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.animal-facts dd { margin: 0; font-weight: 700; }
.health { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.health li { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.health li.yes .icon { color: var(--green); }
.health li.no { color: var(--muted); }
.health li.unknown { color: var(--muted); font-weight: 600; }
.living li.no .icon { color: var(--danger); }
.living-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.living-label { min-width: 90px; font-weight: 700; }
.report-line { margin: -4px 0 16px; font-size: .9rem; }
.report-line .link-btn { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.report-line .link-btn:hover { color: var(--danger); }
.report-reasons { display: grid; gap: 0; }
.report-details { margin: 8px 0; padding: 10px 12px; background: var(--surface-2); border-left: 3px solid var(--danger); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.report-reasons .check-inline { min-height: 40px; }
.owner-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 18px 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-family: var(--font-title); font-weight: 600; font-size: 1.2rem; flex-shrink: 0; }
img.avatar, .chat-item img.avatar, .chat-head img.avatar { display: block; max-width: none; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.chat-item .chat-who, .card-body .owner { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-who span, .owner-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.nav-link .avatar { margin-right: 2px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit > :first-child { flex-shrink: 0; line-height: 0; }
.avatar-edit .hint { margin: 6px 0 0; }
.avatar-edit .sr-only:focus-visible + label { outline: 3px solid var(--sun); outline-offset: 2px; }
.notice { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); margin: 16px 0; }
.notice .icon { margin-top: 3px; }
.notice-sun { background: var(--sun-soft); color: var(--sun-ink); }
.notice-green { background: var(--green-soft); color: var(--green); }
.notice-danger { background: var(--danger-soft); color: var(--danger); }
.notice-brand { background: var(--brand-soft); color: var(--brand-dark); }
.notice p:last-child { margin-bottom: 0; }
.description { white-space: pre-line; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="date"], input[type="month"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid #BDC8BF; border-radius: var(--r-sm); background: var(--surface); font-size: 16px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid #BDC8BF; border-radius: var(--r-sm); background: var(--surface); font-weight: 700; cursor: pointer; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.choice input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.form-card { max-width: 720px; margin: 0 auto; }
.form-error { color: var(--danger); font-weight: 600; font-size: .92rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(6, 1fr); } }
.photo-slot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .cover-label { position: absolute; left: 6px; bottom: 6px; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.photo-slot .photo-actions { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.photo-slot .photo-actions button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); display: grid; place-items: center; cursor: pointer; }
.photo-slot .photo-adjust { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 0 8px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .94); color: var(--brand-dark); font-size: .74rem; font-weight: 700; min-height: 28px; cursor: pointer; }
.photo-slot:has(.cover-label) .photo-adjust { left: auto; }
.photo-tips { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: .9rem; color: var(--muted); }
.photo-tips p { margin: 0; }
.photo-tips p + p { margin-top: 4px; }
.framing-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; cursor: crosshair; touch-action: none; border-radius: var(--r-sm); overflow: hidden; user-select: none; }
.framing-stage img { display: block; max-height: 46vh; width: auto; max-width: 100%; }
.framing-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: rgba(33, 76, 67, .55); box-shadow: 0 0 0 2px var(--brand), 0 2px 8px rgba(0, 0, 0, .35); pointer-events: none; }
.framing-previews { display: flex; gap: 14px; justify-content: center; align-items: flex-end; margin-top: 12px; }
.framing-previews figure { margin: 0; text-align: center; font-size: .78rem; color: var(--muted); }
.fp { overflow: hidden; border-radius: 8px; background: var(--surface-2); margin-bottom: 4px; }
.fp img { width: 100%; height: 100%; object-fit: cover; }
.fp-card { width: 96px; aspect-ratio: 4 / 5; }
.fp-home { width: 150px; aspect-ratio: 3 / 2; }
.photo-add { display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed #BDC8BF; border-radius: 10px; color: var(--muted); cursor: pointer; text-align: center; font-size: .82rem; font-weight: 700; padding: 6px; background: var(--surface); }
.photo-add:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Abas ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* ---------- Listas do painel ---------- */
.list { display: grid; gap: 12px; }
.row-card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); align-items: start; }
.row-card > img, .row-card > .ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.row-card h3 { font-size: 1.05rem; margin: 0 0 4px; }
.row-card .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.row-card .row-actions select { width: auto; min-height: 38px; padding: 6px 10px; }
@media (min-width: 700px) { .row-card { grid-template-columns: 96px 1fr; } .row-card > img, .row-card > .ph { width: 96px; height: 96px; } }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.stat strong { display: block; font-family: var(--font-title); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Mensagens ---------- */
.chat { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; height: calc(100svh - var(--header-h) - 120px); min-height: 460px; }
@media (min-width: 900px) { .chat { grid-template-columns: 330px 1fr; } }
.chat-list { overflow-y: auto; border-right: 1px solid var(--line); }
.chat-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; align-items: center; }
.chat-item:hover, .chat-item[aria-current="true"] { background: var(--surface-2); }
.chat-item img, .chat-item .ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.chat-item strong { display: block; line-height: 1.25; }
.chat-item small { display: block; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.chat-item .txt { min-width: 0; }
.chat-thread { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.chat-head .back { display: inline-flex; }
.chat-report { margin-left: auto; color: var(--muted); flex-shrink: 0; }
.chat-report:hover { color: var(--danger); }
@media (max-width: 599px) { .chat-report span { display: none; } .chat-report { padding-inline: 10px; } }
@media (min-width: 900px) { .chat-head .back { display: none; } }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 4px; }
.bubble:not(.me) { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble time { display: block; font-size: .72rem; opacity: .75; margin-top: 2px; }
.day-sep { align-self: center; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 6px 0; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form textarea { min-height: 46px; height: 46px; max-height: 140px; }
.chat-form .btn { flex-shrink: 0; }
.chat-empty { display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); height: 100%; }
@media (max-width: 899px) {
  .chat[data-view="list"] .chat-thread { display: none; }
  .chat[data-view="thread"] .chat-list { display: none; }
}

/* ---------- Janela (modal) ---------- */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink); }
dialog::backdrop { background: rgba(43, 36, 32, .5); }
.dialog-body { padding: 24px; }
.dialog-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.dialog-close:hover { background: var(--surface-2); }
.pix-box { display: flex; gap: 8px; align-items: stretch; margin: 12px 0; }
.pix-box code { flex: 1; padding: 12px; background: var(--surface-2); border-radius: var(--r-sm); font-size: .95rem; word-break: break-all; }

/* ---------- Aviso rápido (toast) ---------- */
.toast-area { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); font-weight: 600; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--green); }

/* ---------- Carregando ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #E2E8DF 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-card { aspect-ratio: 4 / 6; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; padding: 60px 0; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 48px; background: var(--brand-dark); color: #D7E2D6; padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: #F5F3ED; }
.site-footer .logo { color: #fff; }
.site-footer h2 { color: #fff; }
.footer-tagline { margin: 12px 0 0; font-family: var(--font-title); font-size: 1.1rem; color: #fff; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 18px; font-size: .85rem; color: #CCD8C8; }

/* ---------- Texto longo (privacidade) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.admin-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.owner-card .btn { white-space: nowrap; flex-shrink: 0; }

/* ---------- Banners de anunciantes ---------- */
.ad-slot { grid-column: 1 / -1; }
.ad-banner { display: block; position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; }
.ad-banner img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.ad-label { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .92); color: var(--muted); font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.animal-banner { margin-top: 20px; }
.ad-rotator { position: relative; aspect-ratio: 3 / 1; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ad-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.ad-frame.is-active { opacity: 1; z-index: 1; }
.ad-rotator .ad-banner { height: 100%; border: 0; border-radius: 0; }
.ad-rotator .ad-banner img { height: 100%; }
.ad-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.ad-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.ad-dots button, .ad-pause { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); border-radius: 8px; }
.ad-dots button::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #6C7D71; transition: width .2s ease, background-color .2s ease; }
.ad-dots button[aria-current="true"]::after { width: 20px; border-radius: 4px; background: var(--brand); }
.ad-dots button:hover::after { background: var(--brand-dark); }
.ad-pause .icon { width: 14px; height: 14px; }
.ad-pause:hover { color: var(--ink); }

/* ---------- Painel do admin ---------- */
.alert-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-align: left; cursor: pointer; }
.alert-row span { flex: 1; }
.alert-row:hover { border-color: var(--brand); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #E7B9B9; }
.alert-sun { background: var(--sun-soft); color: var(--sun-ink); border-color: #F0D9A6; }
.alert-brand { background: var(--brand-soft); color: var(--brand-dark); border-color: #CCD8C8; }
.chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 220px; }
.chart-col { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.chart-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { position: relative; flex: 1; max-width: 22px; border-radius: 5px 5px 0 0; }
.bar b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--muted); }
.b-green { background: var(--green); }
.b-brand { background: var(--brand); }
.b-sun { background: var(--sun); }
.chart-label { font-size: .8rem; color: var(--muted); font-weight: 700; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.admin-filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.admin-filters .field:first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .admin-filters { grid-template-columns: 2fr 1fr 1fr 1fr; } .admin-filters .field:first-child { grid-column: auto; } }
.payout-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.payout-row > :nth-child(3), .payout-row > :nth-child(4) { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 700px) { .payout-row { grid-template-columns: 1fr auto auto auto; } .payout-row > :nth-child(3), .payout-row > :nth-child(4) { grid-column: auto; } }
.ad-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.banner-preview { width: 100%; max-width: 420px; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); margin: 8px 0; }

/* ---------- Arte para Instagram ---------- */
#dlg-arte { max-width: min(760px, calc(100vw - 32px)); }
.arte-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.arte-item { margin: 0; text-align: center; }
.arte-item figcaption { margin: 8px 0; font-size: .95rem; }
.arte-preview { display: grid; place-items: center; background: var(--surface-2); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.arte-preview.story { aspect-ratio: 9 / 16; }
.arte-preview.feed { aspect-ratio: 4 / 5; }
.arte-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Ficha de adoção ---------- */
.ficha-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 8px; }
.ficha-card summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.ficha-dl { display: grid; gap: 1px; margin: 10px 0 4px; background: var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ficha-dl div { background: var(--surface); padding: 8px 10px; }
.ficha-dl dt { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ficha-dl dd { margin: 0; white-space: pre-line; }
@media (min-width: 700px) { .ficha-dl { grid-template-columns: 1fr 1fr; } }

/* ---------- Finais felizes ---------- */
.story-excerpt { font-size: .9rem; margin: 6px 0 0; line-height: 1.45; }
.story-card .owner .icon { color: var(--brand); }
.section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-head h2, .section-head p { margin-bottom: 0; }
.final-feliz { background: var(--green-soft); border-radius: var(--r-lg); padding: 18px; margin: 16px 0; }
.final-feliz h2 { color: var(--green); font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.final-fotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.final-fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.mini-foto { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }

/* ---------- Página inicial: bloco das ONGs e convite discreto para anunciantes ---------- */
.ongs-wrap > div { max-width: 720px; }
.advertise-note { max-width: 720px; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
/* Finais felizes: em cartão estreito a cidade e a data quebram linha em vez de cortar */
.story-card .owner { display: block; white-space: normal; overflow: visible; }
.story-card .owner .icon { margin-right: 4px; }

/* ---------- Achados e perdidos ---------- */
.lost-card .card-body .lost-date { margin: 4px 0 0; font-size: .84rem; color: var(--muted); }
.lost-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.lost-toolbar .filters-group { display: flex; flex-wrap: wrap; gap: 10px; }
.lost-intro { display: grid; gap: 4px; }
.lost-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin: 0 0 20px; }
.lost-cta p { margin: 0; flex: 1 1 260px; }
.lost-cta .icon { color: var(--accent-ink); }
.lost-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 14px; color: var(--muted); }
.lost-facts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-lost { margin: 10px 0 0; font-size: .95rem; }
.nav-links .btn { white-space: nowrap; }
.lost-head-cta { display: grid; gap: 6px; justify-items: start; margin-top: 14px; }
.lost-head-cta p { margin: 0; }
@media (max-width: 599px) { .lost-head-cta .btn { width: 100%; } }

