/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
h1, h2, h3, h4 { font-family: 'Lexend Deca', 'Inter', sans-serif; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, video { max-width: 100%; display: block; }
input, textarea, select, button { font: inherit; color: inherit; }

/* ===== Tokens ===== */
:root {
  --color-primary: #004080;
  --color-primary-dark: #002b5c;
  --color-accent: #FF7A30;
  --color-accent-dark: #E0631E;
  --color-success: #1FA971;
  --color-danger: #D64545;
  --color-warning: #E0A100;

  --color-bg: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-surface-2: #ECEFF3;
  --color-text: #0B1220;
  --color-text-muted: #5B6472;
  --color-border: rgba(11, 18, 32, 0.1);
  --color-overlay: rgba(11, 18, 32, 0.55);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;

  --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-full: 0;

  --shadow-sm: 0 1px 3px rgba(11,18,32,.08), 0 1px 2px rgba(11,18,32,.06);
  --shadow-md: 0 6px 16px rgba(11,18,32,.12);
  --shadow-lg: 0 16px 40px rgba(11,18,32,.18);

  --topbar-h: 64px;
  --bottomnav-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease-out: cubic-bezier(.16,1,.3,1);
  color-scheme: light;
}

:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --color-bg: #0B1220;
    --color-surface: #151C2C;
    --color-surface-2: #1E2740;
    --color-text: #EDF1F7;
    --color-text-muted: #93A0B4;
    --color-border: rgba(255,255,255,.1);
    --color-overlay: rgba(0,0,0,.65);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --color-bg: #0B1220;
  --color-surface: #151C2C;
  --color-surface-2: #1E2740;
  --color-text: #EDF1F7;
  --color-text-muted: #93A0B4;
  --color-border: rgba(255,255,255,.1);
  --color-overlay: rgba(0,0,0,.65);
  color-scheme: dark;
}

/* Logo adaptável: colorida (fundo claro) / branca (fundo escuro) — mesmo padrão
   de :root/@media/[data-theme] usado acima pras cores, pra respeitar tanto o
   tema do SO quanto a troca manual pelo botão de tema. */
.logo-dark { display: none; }
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    .logo-light { display: none; }
    .logo-dark { display: block; }
  }
}
:root[data-theme="dark"] {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

@view-transition { navigation: auto; }

/* ===== App shell: top bar ===== */
.app-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex; align-items: center; gap: var(--space-2);
  padding-left: var(--space-3); padding-right: var(--space-3);
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  transition: transform .25s var(--ease-out);
}
.app-topbar__brand { display: flex; align-items: center; gap: var(--space-2); font-family: 'Lexend Deca', sans-serif; font-weight: 600; font-size: 1.05rem; }
.app-topbar__brand img { height: 30px; width: auto; }
.app-topbar__spacer { flex: 1; }
.app-topbar__title { font-family: 'Lexend Deca', sans-serif; font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--color-surface-2); color: var(--color-text);
  border: none; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s var(--ease-out), background .2s;
  flex-shrink: 0;
}
.icon-btn .material-icons { font-size: 1.4rem; }
.icon-btn:active { transform: scale(.90); }
.icon-btn--dark { background: rgba(11,18,32,.75); color: #fff; }
.icon-btn--accent { background: var(--color-accent); color: #fff; }
/* Feedback visual pros botões que disparam captura de GPS (ícone "Localizar"):
   sem isso, o toque não dava nenhum indício de que algo estava rodando enquanto
   o PangeiaGeo.resolve() aguardava o GPS/permissão (podendo levar alguns segundos).
   Anel pulsando pra fora, igual ao ponto do usuário no mapa — sem ícone girando. */
.icon-btn.is-loading { cursor: default; animation: pulse-accent 1.1s ease-in-out infinite; }

/* ===== App shell: bottom nav ===== */
.app-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  display: flex; justify-content: space-around; align-items: center;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
}
.app-bottomnav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; height: 100%; color: var(--color-text-muted);
  transition: transform .15s var(--ease-out), color .2s;
  position: relative;
  /* reset de <button> — este item também é usado pelo botão "Localizar" */
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
}
.app-bottomnav__item .material-icons { font-size: 1.5rem; }
.app-bottomnav__item span:last-child { font-size: .68rem; font-weight: 600; }
.app-bottomnav__item:active { transform: scale(.90); }
.app-bottomnav__item.is-active { color: var(--color-primary); }
.app-bottomnav__item.is-active::before {
  content: ''; position: absolute; top: 2px; width: 28px; height: 3px;
  border-radius: var(--radius-full); background: var(--color-accent);
}

@media (min-width: 992px) {
  .app-bottomnav { display: none; }
  .app-topbar { padding-left: var(--space-6); padding-right: var(--space-6); }
  .app-topbar__nav { display: flex; gap: var(--space-5); margin-left: var(--space-6); }
  .app-topbar__nav a, .app-topbar__nav button {
    background: none; border: none; padding: 0; font: inherit; cursor: pointer;
    font-weight: 600; color: var(--color-text-muted); transition: color .2s;
  }
  .app-topbar__nav a.is-active, .app-topbar__nav a:hover,
  .app-topbar__nav button:hover { color: var(--color-primary); }
}
@media (max-width: 991px) {
  .app-topbar__nav { display: none; }
}

.app-main { min-height: 100%; }
.app-main.has-chrome {
  padding-top: calc(var(--topbar-h) + var(--safe-top));
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom));
}

/* ===== Theme toggle ===== */
.theme-toggle .material-icons { transition: transform .4s var(--ease-out); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 12px 22px; border-radius: var(--radius-full); border: none;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  transition: transform .15s var(--ease-out), background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-accent { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--color-accent-dark); }
.btn-ghost { background: var(--color-surface-2); color: var(--color-text); }
.btn-danger { background: var(--color-danger); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.tap-scale { transition: transform .12s var(--ease-out); }
.tap-scale:active { transform: scale(.96); }

/* ===== Ripple ===== */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .25; transform: scale(0);
  animation: ripple-anim .5s var(--ease-out);
}
@keyframes ripple-anim { to { transform: scale(2.6); opacity: 0; } }

/* ===== Skeleton ===== */
.skeleton {
  position: relative; overflow: hidden; background: var(--color-surface-2);
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-text) 8%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ===== Cards grid (anuncios.html) =====
   Diagramação original preservada: 1º card em destaque + fluxo natural no retrato
   (altura dada pela imagem, sem media query de largura); grade "bento" 4 colunas
   densa na paisagem. Só a pele (cor/animação/badge) foi modernizada. */
#cards-container { display: grid; }

.mycard {
  --i: 0;
  position: relative; border-radius: 0; overflow: hidden; cursor: pointer;
  background: var(--color-surface-2); 
  /* border: 3px solid #000; */
  animation: card-in .45s var(--ease-out) both;
  animation-delay: calc(var(--i) * 40ms);
  transition: transform .2s var(--ease-out);
}
.mycard:active { transform: scale(.98); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
/* aspect-ratio como PALPITE inicial (foto de celular em pé) pro navegador
   reservar um espaço plausível antes de saber o tamanho real da mídia — sem
   isso ele assume o padrão de 300x150 (2:1) pra qualquer <img>/<video> sem
   dimensão conhecida, resultando numa mídia achatada/esticada por um
   instante até o tamanho real chegar e o card pular pra altura certa. Some
   sozinho assim que a mídia carrega (o navegador troca pelo aspect-ratio
   real automaticamente) — aqui só evita o flash feio nesse meio-tempo. */
.mycard img, .mycard video { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 5; }

/* Badges no topo do card (título+distância, depois status), igual ao original */
.mycard .info-badge {
  position: absolute; top: 18px; left: var(--space-4); right: var(--space-4); z-index: 10;
  display: flex; align-items: center; gap: 6px; overflow: hidden;
}
.mycard .info-badge .title {
  background: #fff; color: #111; font-family: 'Lexend Deca', sans-serif; font-weight: 600;
  font-size: .95rem; padding: 3px 10px; border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0,0,0,.3); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1;
}
.mycard .info-badge .distance {
  background: #f5f5dc; color: #222; font-weight: 600; font-size: .85rem;
  padding: 3px 10px; border-radius: var(--radius-full); box-shadow: 0 2px 6px rgba(0,0,0,.3); white-space: nowrap;
  flex-shrink: 0;
}
.mycard .status-badge {
  position: absolute; top: 52px; left: var(--space-4); z-index: 10;
  padding: 3px 10px; border-radius: var(--radius-full); font-size: .8rem; font-weight: 700; color: #fff;
}

/* Placeholders de carregamento precisam de altura própria (não há imagem para defini-la) */
.mycard.skeleton { min-height: 220px; }
@media (orientation: portrait) {
  #cards-container > .mycard.skeleton:first-child { min-height: 55vh; }
}

@media (orientation: portrait) {
  #cards-container { grid-template-columns: 1fr; grid-auto-rows: auto; gap: var(--space-2); padding: var(--space-2); }
  #cards-container > .mycard:first-child { width: 100%; height: 98vh; }
}

@media (orientation: landscape) {
  #cards-container {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2); padding: var(--space-2);
    grid-auto-flow: dense; align-content: start;
    grid-auto-rows: calc((100vh - (var(--space-2) * 2) - (var(--space-2) * 2)) / 3);
  }
  #cards-container .mycard:first-child { grid-column: span 2; grid-row: span 2; min-height: 0; }
  #cards-container .mycard:not(:first-child) { grid-row: span 1; min-height: 0; }
}

#load-more { text-align: center; padding: var(--space-4); color: var(--color-text-muted); }

/* ===== Alternância cards / mapa (anuncios.html) ===== */
#map-view { display: none; }
body.map-mode #cards-view { display: none; }
body.map-mode #map-view { display: block; }
#map-view, #leaflet-map { width: 100%; height: 100vh; }

.map-logo {
  position: fixed; top: calc(var(--space-3) + var(--safe-top)); left: var(--space-3); z-index: 10000;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: var(--color-surface); box-shadow: var(--shadow-md); padding: var(--space-2);
}
.map-logo picture { display: contents; }
.map-logo img {
  height: 80px; width: auto;
}

/* Camada fixa (nunca muda de tamanho/posição) só pra detectar o hover — ela
   que carrega --pin-color, herdado pelos dois filhos abaixo. position:relative
   pra ancorar a polaroid (ver .map-pin-polaroid). */
.map-pin-hover-zone { width: 44px; height: 44px; position: relative; }

.map-pin {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pin-color, var(--color-accent));
  border: 3px solid #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
/* Feedback de toque ao abrir o anúncio (ver playPinTapFeedback em map.js):
   anel da cor do status estoura por trás do pino enquanto ele dá um "pulo" —
   as duas animações rodam só 1x (disparadas via classe, não :active/:hover,
   então funcionam igual em touch e mouse) no instante do toque, antes da
   navegação de verdade pra página do anúncio. Anel mora como irmão do pino
   (não filho) porque .map-pin tem overflow:hidden — o estouro precisa
   ultrapassar o círculo do pino, não ficar preso dentro dele. */
.map-pin-tap-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--pin-color, var(--color-accent));
  opacity: 0; pointer-events: none;
}
.map-pin-tap-ring.is-active { animation: map-pin-tap-ring .6s cubic-bezier(.22,1,.36,1); }
@keyframes map-pin-tap-ring {
  0% { opacity: .65; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}
.map-pin.is-tapped { animation: map-pin-tap-bounce .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes map-pin-tap-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  70% { transform: scale(.94); }
  100% { transform: scale(1); }
}
/* position:absolute (em vez de width/height % num filho de flex) porque
   dentro do flex o % de largura não resolvia igual ao de altura — o
   navegador caía pro aspect-ratio da foto original e ovalizava o círculo.
   O !important na largura é porque o leaflet.css tem uma regra própria
   (".leaflet-marker-pane img { width: auto }") com mais especificidade que
   a nossa e sobrescrevia só a largura — a causa real do oval.
   Também menor que o pino (74%, não 100%) de propósito: sempre sobra um
   anel da cor de status (aberto/fechado) ao redor da foto. */
.map-pin img {
  position: absolute; top: 13%; left: 13%; width: 74% !important; height: 74%;
  object-fit: cover; border-radius: 50%;
}
.map-pin .material-icons { color: #fff; font-size: 20px; }

/* Foto polaroid: elemento IRMÃO do pino, não o próprio pino crescendo — o
   pino fica sempre do mesmo jeito, só essa foto aparece do lado no hover
   (moldura branca, tarja embaixo com o nome "escrito à mão"). Sempre no
   tamanho final no DOM; o que anima é só opacidade/escala, então não precisa
   de nenhum ajuste de posição pra compensar redimensionamento (o Leaflet
   ancora o marcador pelo tamanho DECLARADO no iconSize/iconAnchor, que nunca
   muda — só o pino trocar de tamanho é que exigia aquele malabarismo). */
.map-pin-polaroid {
  position: absolute; left: 50%; bottom: 100%;
  width: 280px; padding: 14px 14px 0; box-sizing: border-box;
  background: #fdfdfb; border: 2px solid #fff; border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: stretch;
  opacity: 0; visibility: hidden;
  transform: translate(-50%, 8px) scale(.9);
  transform-origin: bottom center;
  transition: opacity .15s ease, transform .2s cubic-bezier(.22,1,.36,1), visibility 0s linear .2s;
  z-index: 10000;
}
.map-pin-polaroid img {
  width: 100% !important; height: 250px; flex: 0 0 250px;
  border-radius: 2px; object-fit: cover;
}
.map-pin-polaroid .material-icons {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 250px; flex: 0 0 250px;
  border-radius: 2px; font-size: 68px; color: #fff;
  background: var(--pin-color, var(--color-accent));
}
.map-pin-caption {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  -webkit-box-pack: center; text-align: center; overflow: hidden;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.7rem; line-height: 1.15;
  color: #2b2b2b; padding: 2px 6px 8px; transform: rotate(-1.2deg);
}

/* Hover só em telas com mouse: a polaroid some/aparece do lado do pino, sem o
   pino em si mudar de forma. IMPORTANTE: o gatilho é o .map-pin-hover-zone
   (que NUNCA muda de tamanho/posição), não a polaroid — se o :hover fosse no
   próprio elemento que aparece/desloca, assim que ele saísse de baixo do
   cursor o hover caía, ele sumia de volta (= cursor de novo sobre a zona), o
   hover disparava de novo, e ficava abrindo/fechando pra sempre. */
@media (hover: hover) and (pointer: fine) {
  .map-pin-hover-zone { cursor: pointer; }
  .map-pin-hover-zone:hover .map-pin-polaroid {
    opacity: 1; visibility: visible;
    transform: translate(-50%, -14px) scale(1);
    transition: opacity .15s ease, transform .2s cubic-bezier(.22,1,.36,1), visibility 0s linear 0s;
  }
  /* Legenda "escrita à mão" surgindo aos poucos da esquerda pra direita, como
     se alguém estivesse escrevendo — clip-path revela o texto progressivamente
     em vez de mudar largura (mudar largura brigaria com o text-align:center,
     o texto ficaria recentralizando enquanto "escreve" em vez de parecer
     desenhado no lugar certo). Só dispara no hover (senão a legenda já
     apareceria pronta, escondida atrás da polaroid fechada). */
  .map-pin-hover-zone:hover .map-pin-caption {
    animation: map-pin-caption-write .5s ease-out .12s both;
  }
}
@keyframes map-pin-caption-write {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.map-user-dot { width: 18px; height: 18px; border-radius: 50%; background: #4285F4; border: 3px solid #fff; box-shadow: var(--shadow-sm); position: relative; pointer-events: none; }
.map-user-dot__pulse {
  position: absolute; inset: -14px; border-radius: 50%; background: rgba(66,133,244,.35);
  animation: map-user-pulse 2s ease-out infinite;
}
@keyframes map-user-pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ===== Pull to refresh ===== */
#ptr-indicator {
  position: fixed; left: 0; right: 0; top: var(--safe-top);
  display: flex; justify-content: center; align-items: center; height: 0;
  overflow: hidden; z-index: 400; color: var(--color-primary);
  transition: height .2s var(--ease-out);
}
#ptr-indicator .material-icons { transition: transform .1s linear; }
#ptr-indicator.is-loading .material-icons { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Bottom sheet ===== */
.sheet-backdrop {
  position: fixed; inset: 0; background: var(--color-overlay); z-index: 900;
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  background: var(--color-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg); padding: var(--space-2) var(--space-5) calc(var(--space-6) + var(--safe-bottom));
  transform: translateY(100%); transition: transform .3s var(--ease-out);
  max-height: 85vh; overflow-y: auto; touch-action: none;
}
.sheet.is-open { transform: translateY(0); }
.sheet__handle { width: 40px; height: 4px; border-radius: var(--radius-full); background: var(--color-border); margin: var(--space-2) auto var(--space-4); }

#search-box { position: relative; display: flex; align-items: center; border-bottom: 2px solid var(--color-border); padding-bottom: var(--space-2); }
#search-input { flex: 1; border: none; background: transparent; font-size: 1.25rem; outline: none; }
#search-action { border: none; background: transparent; color: var(--color-text-muted); cursor: pointer; padding: var(--space-1); }

/* ===== Toggle / switch ===== */
.switch-badge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  background: var(--color-surface); box-shadow: var(--shadow-md);
  padding: 12px 20px; border-radius: var(--radius-full); font-weight: 600; cursor: pointer;
  user-select: none; transition: transform .15s var(--ease-out);
}
.switch-badge:active { transform: scale(.96); }
.fixed-bottom-center.switch-badge:active { transform: translateX(-50%) scale(.96); }
.switch-toggle { width: 42px; height: 24px; background: var(--color-surface-2); border-radius: var(--radius-full); position: relative; transition: background .25s; flex-shrink: 0; }
.switch-badge.on .switch-toggle { background: var(--color-success); }
.switch-knob { width: 20px; height: 20px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; box-shadow: var(--shadow-sm); transition: left .25s var(--ease-out); }
.switch-badge.on .switch-knob { left: 20px; }

.fab-cluster { position: fixed; right: var(--space-4); bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--space-4)); z-index: 600; display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 992px) { .fab-cluster { bottom: var(--space-6); } }

/* Lembrete discreto de GPS/instalação do PWA (ver static/js/pwa-nudges.js) —
   barra flutuante acima da bottom nav, nunca bloqueia a tela, some sozinha
   ao tocar em qualquer ação. */
.pwa-nudge {
  position: fixed; left: var(--space-3); right: var(--space-3);
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--space-3));
  max-width: 420px; margin: 0 auto; z-index: 900;
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-3);
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease-out), opacity .3s;
}
.pwa-nudge.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.pwa-nudge__icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--color-accent) 15%, transparent); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
}
.pwa-nudge__body { flex: 1; min-width: 0; }
.pwa-nudge__title { font-size: .85rem; font-weight: 700; color: var(--color-text); }
.pwa-nudge__text { font-size: .78rem; color: var(--color-text-muted); margin-top: 2px; }
.pwa-nudge__actions { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.pwa-nudge__cta { padding: 8px 16px; font-size: .82rem; }
.pwa-nudge__close {
  background: none; border: none; color: var(--color-text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 2px;
}
.pwa-nudge__close .material-icons { font-size: 18px; }
@media (min-width: 992px) { .pwa-nudge { bottom: var(--space-6); } }

.fixed-bottom-center {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + var(--space-4));
  z-index: 450;
}
@media (min-width: 992px) { .fixed-bottom-center { bottom: var(--space-6); } }

/* ===== Query badges ===== */
#query-badges-container { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 76px); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); max-width: 92%; z-index: 400; }
.query-badge { background: var(--color-accent); color: #fff; padding: 6px 12px; border-radius: var(--radius-full); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: var(--space-2); box-shadow: var(--shadow-sm); }
.query-badge span { cursor: pointer; font-weight: 700; opacity: .85; }

/* ===== Overlays generic ===== */
.overlay-center { position: fixed; inset: 0; z-index: 2000; display: none; justify-content: center; align-items: center; padding: var(--space-4); text-align: center; }
.overlay-center.is-visible { display: flex; }
.overlay-center--dim { background: var(--color-overlay); }
.spinner { width: 52px; height: 52px; border-radius: 50%; border: 5px solid var(--color-surface-2); border-top-color: var(--color-accent); animation: spin .9s linear infinite; }
.btn-spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 4px; }

.message-toast { color: #fff; font-size: 1.1rem; max-width: 85vw; }
.connection-error-details { margin-top: var(--space-4); text-align: left; font-size: .85rem; }
.connection-error-details summary { cursor: pointer; }
.connection-error-details pre { max-height: 35vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }

/* Modal de alerta/confirmação (ver static/js/modal.js) — substitui os
   alert()/confirm() nativos do navegador. */
.app-modal-overlay { z-index: 30000; }
.app-modal {
  background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5);
  max-width: 360px; width: 100%; box-shadow: var(--shadow-lg); text-align: left;
}
.app-modal__title { font-size: 1.15rem; margin: 0 0 var(--space-2); }
.app-modal__message { color: var(--color-text-muted); line-height: 1.5; margin: 0 0 var(--space-3); white-space: pre-line; }
.app-modal__input { width: 100%; box-sizing: border-box; padding: 10px 12px; margin-bottom: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); font: inherit; }
.app-modal__actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.app-modal__actions .btn { padding: 9px 18px; }

/* ===== Landing / localizar (overlay cards) ===== */
.hero-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-5); text-align: center; position: relative; overflow: hidden;
  background-color: var(--color-bg);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-screen::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.35));
  z-index: 0;
}
.hero-card {
  position: relative; z-index: 1; background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg); padding: var(--space-7) var(--space-6);
  max-width: 420px; width: 100%; box-shadow: var(--shadow-lg);
  animation: hero-in .55s var(--ease-out) both;
}
@keyframes hero-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hero-card img.logo { width: 62%; max-width: 210px; margin: 0 auto var(--space-5); }
.hero-card h2 { font-size: 1.6rem; margin-bottom: var(--space-3); }
.hero-card p { color: var(--color-text-muted); font-size: 1.02rem; line-height: 1.5; margin-bottom: var(--space-6); }

.find-location-screen { color: #fff; }
.find-location-screen img { width: 180px; margin: 0 auto var(--space-4); }
.find-location-screen div.label { font-size: 1.4rem; font-weight: 600; }

/* ===== Card detail page =====
   Mídia ocupa 100% do viewport, fixa atrás de tudo (como um pôster de fundo);
   título/badges flutuam fixos no topo, e o texto descritivo/horário/links
   ficam numa "folha" (bottom sheet) fixa colada embaixo, com fundo
   semitransparente + blur pra continuar legível em cima de qualquer foto —
   a folha rola por dentro se o conteúdo não couber, a mídia nunca se move. */
.card-detail-full { position: relative; }

.gallery {
  position: fixed; inset: 0; width: 100%; height: 100vh; z-index: 0;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
/* No mouse (sem touch), dá pra arrastar a galeria — o cursor de "mãozinha"
   é a única dica disso, já que não tem scrollbar nem swipe. */
@media (hover: hover) and (pointer: fine) {
  .gallery { cursor: grab; }
  .gallery.is-dragging { cursor: grabbing; }
}
.gallery > div {
  flex-shrink: 0; width: 100%; height: 100%; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gallery > div img, .gallery > div video {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-user-drag: none; user-select: none;
}

/* Setas de navegação da galeria — só em telas com mouse (hover: hover),
   já que no touch o swipe já é óbvio. Servem também de indicativo de que
   tem mais de uma mídia pra ver. */
.gallery-nav {
  display: none; position: fixed; top: 42%; transform: translateY(-50%); z-index: 5;
  opacity: .9;
}
.gallery-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-nav--prev { left: var(--space-4); }
.gallery-nav--next { right: var(--space-4); }
@media (hover: hover) and (pointer: fine) {
  .gallery-nav.has-multiple { display: inline-flex; }
}

/* Slot de vídeo antes do play: poster estático + botão de play por cima.
   Some assim que o <video> real entra e começa a tocar (ver clearLoading em
   card.js). */
.media-video-slot { position: relative; }
.media-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, transform .15s;
}
.media-play-btn:active { transform: translate(-50%, -50%) scale(.92); }
.media-play-btn .material-icons { font-size: 34px; }
.media-play-btn.is-loading { background: rgba(0,0,0,.55); cursor: default; }
.media-play-btn .btn-spinner { margin: 0; width: 26px; height: 26px; border-width: 3px; }

/* Gradiente permanente sobre a mídia — garante contraste pro título (topo) e
   pra folha de baixo mesmo quando a foto por trás é clara. */
.gallery-scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 42%, rgba(0,0,0,.8) 100%);
  transition: opacity .35s var(--ease-out);
}

/* Modo imersivo: toca na mídia de fundo (ver wireImmersiveToggle em card.js)
   pra esconder tudo por cima e ver só a galeria em tela cheia — cada grupo
   de UI sai pela borda mais próxima dele (topo, baixo, direita), não todos
   pro mesmo lugar. Toca de novo em qualquer ponto da mídia pra tudo voltar. */
.card-overlay-top, .card-detail-body, .card-icon-slide {
  transition: transform .35s var(--ease-out), opacity .35s var(--ease-out);
}
body.card-immersive .gallery-scrim { opacity: 0; }
body.card-immersive .card-overlay-top { transform: translateY(-130%); opacity: 0; pointer-events: none; }
body.card-immersive .card-detail-body { transform: translateY(130%); opacity: 0; pointer-events: none; }
body.card-immersive .card-icon-slide { transform: translateX(120px); opacity: 0; pointer-events: none; }

.card-overlay-top {
  position: fixed; top: calc(var(--space-4) + var(--safe-top)); left: var(--space-4); z-index: 20;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  max-width: calc(100vw - 150px);
}
.card-overlay-top .info-badge .title {
  background: #fff; color: #111; font-family: 'Lexend Deca', sans-serif; font-weight: 700;
  font-size: 1.5rem; padding: 8px 18px; box-shadow: 0 3px 10px rgba(0,0,0,.35); display: inline-block;
}
.info-badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.card-overlay-top .distance {
  background: #f5f5dc; color: #222; font-weight: 700; font-size: 1.05rem;
  padding: 7px 16px; box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.status-badge-wrap { position: relative; }
.card-overlay-top .status-badge {
  font-size: 1.05rem; font-weight: 700; padding: 7px 12px 7px 16px; color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.35); border: none; cursor: pointer;
  display: flex; align-items: center; gap: 2px; font-family: inherit;
}
.status-badge__chevron { font-size: 1.2rem; transition: transform .2s ease; }
.status-badge-wrap.is-open .status-badge__chevron { transform: rotate(180deg); }
.hours-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 220px;
  background: var(--color-bg); border-radius: var(--radius-md); box-shadow: 0 6px 20px rgba(0,0,0,.35);
  padding: var(--space-3); display: none; flex-wrap: wrap; gap: var(--space-2);
}
.status-badge-wrap.is-open .hours-dropdown { display: flex; }

.gallery-dots { position: static; display: flex; gap: 6px; z-index: 2; margin-top: 2px; }
.gallery-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .2s, transform .2s; }
.gallery-dots span.is-active { background: #fff; transform: scale(1.3); }

.card-detail-body {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; margin: auto;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.4);
  padding: var(--space-3) var(--space-5) calc(var(--space-6) + var(--safe-bottom));
}

@media (min-width: 992px) {
  .card-detail-body {
    max-width: 80%;
  }
}

.card-detail-body::before {
  content: ''; display: block; width: 40px; height: 4px; border-radius: var(--radius-full);
  background: var(--color-text-muted); opacity: .4; margin: 0 auto var(--space-3);
}

.card-address { color: var(--color-text-muted); margin: 0 0 var(--space-2); }
.card-description { margin: 0 0 var(--space-2); line-height: 1.5; }

.hours-badge { background: var(--color-surface-2); padding: 4px 10px; border-radius: var(--radius-full); font-size: .8rem; display: flex; gap: 4px; }
.hours-day { font-weight: 700; }
.hours-badge--today.is-open { background: var(--color-success); color: #fff; }
.hours-badge--today.is-closed { background: var(--color-danger); color: #fff; }

/* Painel de links: 1 a 6 botões definidos pelo estabelecimento, sempre centralizados e quebrando linha */
.link-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-2); }
.link-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: var(--color-primary); color: #fff; border-radius: var(--radius-full); font-weight: 600;
  transition: background .2s, transform .15s var(--ease-out);
}
.link-button:hover { background: var(--color-primary-dark); }
.link-button:active { transform: scale(.95); }

/* ===== Utility ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fade-in { animation: card-in .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }

/* ===== Painel ===== */
.painel { min-height: 100vh; display: flex; flex-direction: column; padding: var(--space-5) var(--space-4) calc(var(--space-8) + var(--safe-bottom)); max-width: 640px; margin: 0 auto; }
.painel-state { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.painel-dashboard { display: block; flex: none; align-items: unset; justify-content: unset; min-height: 0; }

@keyframes bounce-in {
  0% { transform: scale(.3) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  80% { transform: scale(.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}
.bounce-in { animation: bounce-in .6s var(--ease-out) both; }

.painel-login-card { text-align: center; max-width: 380px; }
.painel-login-icon { font-size: 4rem; color: var(--color-accent); display: block; margin: 0 auto var(--space-4); }
.painel-login-note {
  display: flex; align-items: flex-start; gap: 6px; text-align: left;
  margin-top: var(--space-3); font-size: .82rem; color: var(--color-text-muted); line-height: 1.4;
}
.painel-login-note .material-icons { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; color: var(--color-accent); }

.painel-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.painel-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--color-surface-2); box-shadow: var(--shadow-sm); }
.painel-header__info { flex: 1; min-width: 0; }
.painel-header__name { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.painel-header__email { color: var(--color-text-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-badge {
  background: linear-gradient(135deg, #ffb703, #fb8500); color: #fff; font-weight: 700; font-size: .7rem;
  padding: 4px 10px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: .04em;
  animation: bounce-in .5s var(--ease-out) both;
}

.verified-badge { color: var(--color-success); display: flex; animation: bounce-in .5s var(--ease-out) both; }
.verified-badge .material-icons { font-size: 1.4rem; }

.verify-modal { max-width: 380px; text-align: center; position: relative; }
.verify-icon { font-size: 3.5rem; color: var(--color-accent); display: block; margin: 0 auto var(--space-3); }
.verify-price-hint--free {
  color: var(--color-success); background: color-mix(in srgb, var(--color-success) 12%, transparent);
  padding: 10px 14px; border-radius: var(--radius-lg); animation: bounce-in .5s var(--ease-out) both;
}
.verify-price-hint--free strong { font-weight: 800; }
.verify-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--space-3); font-size: .88rem; color: var(--color-text-muted); }
.verify-waiting .btn-spinner { border-top-color: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.new-card-btn { margin-bottom: var(--space-6); animation: pulse-accent 2.4s ease-in-out infinite; }
@keyframes pulse-accent { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }

.painel-section-title { font-family: 'Lexend Deca', sans-serif; font-weight: 600; margin: var(--space-6) 0 var(--space-3); }

.painel-empty { text-align: center; color: var(--color-text-muted); padding: var(--space-6) var(--space-3); }
.painel-empty .material-icons { font-size: 2.5rem; opacity: .5; display: block; margin-bottom: var(--space-2); }
.painel-empty--small { padding: var(--space-4); }

.my-cards-list, .mod-queue { display: flex; flex-direction: column; gap: var(--space-3); }
.my-card-row, .mod-row {
  display: flex; align-items: center; gap: var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-lg); padding: var(--space-3); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), opacity .25s var(--ease-out);
}
.mod-row--gone { transform: scale(.9) translateX(30px); opacity: 0; }
/* .my-card-row empilha em 2 linhas (thumb+info, depois os botões numa linha
   própria) — com tudo numa linha só (o padrão que .mod-row ainda usa), até
   2 botões de texto espremiam o título até sobrar só "abc...". */
.my-card-row { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.my-card-row__top { display: flex; align-items: center; gap: var(--space-3); }
.my-card-row__thumb { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; background: var(--color-surface-2); }
.my-card-row__info { flex: 1; min-width: 0; }
.my-card-row__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-card-row__plan { display: flex; align-items: center; gap: var(--space-2); margin-top: 4px; flex-wrap: wrap; }
.my-card-row__expiry { font-size: .78rem; color: var(--color-text-muted); }
.my-card-row__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.my-card-row__actions .btn { flex: 1; min-width: 108px; padding: 9px 12px; font-size: .85rem; white-space: nowrap; }

.status-pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-full); margin: 3px 0; }
.status-pending { background: color-mix(in srgb, #f4a300 20%, transparent); color: #b06d00; animation: pulse-soft 1.8s ease-in-out infinite; }
.status-published { background: color-mix(in srgb, var(--color-success) 20%, transparent); color: var(--color-success); }
.status-rejected { background: color-mix(in srgb, var(--color-danger) 20%, transparent); color: var(--color-danger); }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.transfer-pending-note {
  display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #b06d00;
  background: color-mix(in srgb, #f4a300 14%, transparent); border-radius: var(--radius-md);
  padding: 8px 10px; margin-top: 4px;
}
.transfer-pending-note .material-icons { font-size: 18px; }

.mod-row__desc { font-size: .82rem; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-row__meta { font-size: .75rem; color: var(--color-text-muted); }
.mod-row__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.mod-row__actions .approve-btn { background: var(--color-success); }

.admin-section { margin-top: var(--space-7); border-top: 1px dashed var(--color-border); padding-top: var(--space-5); }
.admin-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); margin-bottom: var(--space-4); }
.admin-card h4 { margin: 0 0 var(--space-3); }
/* flex-shrink:0 no botão e nos rótulos ("R$"/"dias") é o que faltava — sem
   isso, o flex:1 do input faz TUDO na linha (rótulo e botão inclusive)
   encolher junto quando não cabe, espremendo o texto do botão "Salvar". */
.admin-fee-row { display: flex; align-items: center; gap: var(--space-2); }
.admin-fee-row input { flex: 1; min-width: 0; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); }
.admin-fee-row span { flex-shrink: 0; color: var(--color-text-muted); font-weight: 600; }
.admin-fee-row .btn { flex-shrink: 0; white-space: nowrap; padding: 10px 20px; }

/* ===== Admin: árvore de categorias (arrastar-e-soltar) =====
   Dois níveis: .cat-group (parent/grupo) contendo .cat-children > .cat-item
   (folha). Reordenar acontece dentro do próprio nível; uma .cat-item também
   pode ser solta em outro .cat-children pra trocar de grupo — ver
   wireCategoryDrag() em painel.js. */
.cat-hint-icon { font-size: 1.05em; vertical-align: -3px; }
.cat-tree { display: flex; flex-direction: column; gap: var(--space-2); }
.cat-group { background: var(--color-surface-2); border-radius: var(--radius-md); }
.cat-group__header {
  display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 4px; font-weight: 600;
}
.cat-group.is-hidden > .cat-group__header .cat-group__name,
.cat-item.is-hidden .cat-item__name { opacity: .5; text-decoration: line-through; }
.cat-group__name, .cat-item__name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-children {
  display: flex; flex-direction: column; gap: 3px; padding: 2px var(--space-2) var(--space-2) 28px;
  min-height: 10px;
}
.cat-children:empty { min-height: 26px; }
.cat-children:empty::before {
  content: 'Arraste categorias pra cá'; font-size: .78rem; color: var(--color-text-muted);
  display: flex; align-items: center; height: 26px;
}
.cat-item {
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px;
  border-radius: var(--radius-sm); background: var(--color-bg); font-size: .88rem;
}
.cat-drag-handle {
  cursor: grab; color: var(--color-text-muted); display: flex; touch-action: none; flex-shrink: 0;
}
.cat-drag-handle:active { cursor: grabbing; }
.cat-actions { display: flex; gap: 0; flex-shrink: 0; }
.cat-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: none; flex-shrink: 0;
  background: transparent; color: var(--color-text-muted); cursor: pointer;
}
.cat-action-btn:hover { background: var(--color-surface); color: var(--color-text); }
.cat-action-btn .material-icons { font-size: 1.05rem; }
.cat-action-btn--danger:hover { color: var(--color-danger); }

/* Estado de arrasto — o item "levanta" (fica por cima, some do fluxo normal)
   enquanto um placeholder marca onde ele vai cair. */
.cat-drag-ghost {
  position: fixed; z-index: 2000; pointer-events: none; opacity: .92;
  box-shadow: var(--shadow-md); border-radius: var(--radius-sm);
}
.cat-drop-placeholder {
  border: 2px dashed var(--color-accent); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  box-sizing: border-box; pointer-events: none;
}
.cat-drop-placeholder--item { height: 34px; }
.cat-drop-placeholder--group { height: 40px; margin-bottom: var(--space-2); }

.coupons-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.coupon-chip {
  display: flex; align-items: center; gap: var(--space-2); background: var(--color-surface-2);
  padding: 6px 6px 6px 12px; border-radius: var(--radius-full); font-size: .82rem;
}
.coupon-chip span { color: var(--color-text-muted); }
.coupon-chip__del { background: none; border: none; cursor: pointer; color: var(--color-danger); display: flex; padding: 4px; }
.coupon-chip__del .material-icons { font-size: 1.1rem; }
.coupon-form { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.coupon-form input, .coupon-form select { padding: 9px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); }
.coupon-form button[type="submit"] { flex-shrink: 0; white-space: nowrap; }
.coupon-form input[type="color"] {
  padding: 3px; width: 44px; height: 38px; flex-shrink: 0; cursor: pointer;
}
.coupon-form input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.coupon-form input[type="color"]::-webkit-color-swatch { border: none; border-radius: var(--radius-sm); }
.coupon-form input[type="color"]::-moz-color-swatch { border: none; border-radius: var(--radius-sm); }
.coupon-form input[type="text"] { flex: 1; min-width: 100px; }

.kml-current-row {
  display: flex; align-items: center; gap: var(--space-2); background: var(--color-surface-2);
  padding: 8px 8px 8px 12px; border-radius: var(--radius-md); font-size: .85rem; margin-bottom: var(--space-2);
}
.kml-current-row span:not(.material-icons) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kml-current-row .icon-btn { width: 32px; height: 32px; flex-shrink: 0; }
.kml-current-row .icon-btn .material-icons { font-size: 1.1rem; }

.kml-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.kml-row { display: flex; flex-direction: column; gap: 6px; background: var(--color-surface-2); padding: 8px 8px 8px 4px; border-radius: var(--radius-md); font-size: .85rem; }
.kml-row__main { display: flex; align-items: center; gap: var(--space-2); }
.kml-drag-handle {
  cursor: grab; color: var(--color-text-muted); display: flex; touch-action: none; flex-shrink: 0;
}
.kml-drag-handle:active { cursor: grabbing; }
.kml-drag-ghost {
  position: fixed; z-index: 2000; pointer-events: none; opacity: .92;
  box-shadow: var(--shadow-md); border-radius: var(--radius-md);
}
.kml-drop-placeholder {
  border: 2px dashed var(--color-accent); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  box-sizing: border-box; pointer-events: none; height: 76px;
}
.kml-row__main span { flex: 1; }
.kml-row__source { width: 100%; padding: 5px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); font-size: .78rem; box-sizing: border-box; }
.kml-row__swatch {
  width: 26px; height: 26px; flex-shrink: 0; padding: 2px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg); cursor: pointer;
}
.kml-row__swatch::-webkit-color-swatch-wrapper { padding: 0; }
.kml-row__swatch::-webkit-color-swatch { border: none; border-radius: 2px; }
.kml-row__swatch::-moz-color-swatch { border: none; border-radius: 2px; }
.kml-row__dash { flex-shrink: 0; padding: 4px 6px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); font-size: .78rem; max-width: 110px; }
.kml-row__fill { flex-shrink: 0; padding: 4px 6px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); font-size: .78rem; max-width: 110px; }
.kml-row__del { background: none; border: none; cursor: pointer; color: var(--color-danger); display: flex; padding: 4px; }
.kml-row__del .material-icons { font-size: 1.1rem; }
.kml-row__visibility { cursor: pointer; }
.kml-row__visibility.on { background: var(--color-success); }
.kml-row__visibility.on .switch-knob { left: 20px; }

/* --- Modais: novo anúncio / renovar --- */
.new-card-modal, .buy-years-modal { max-width: 480px; max-height: 90vh; overflow-y: auto; text-align: left; position: relative; }
.new-card-close { position: absolute; top: var(--space-3); right: var(--space-3); }
.new-card-hint { color: var(--color-text-muted); font-size: .9rem; margin-top: -8px; }

.field { display: block; margin-bottom: var(--space-4); }
.field__label { display: flex; justify-content: space-between; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field__label small { font-weight: 400; color: var(--color-text-muted); }
.field input[type="text"], .field input[type="url"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 11px; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg); color: var(--color-text); font-family: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent); }
.field textarea { resize: vertical; }
.field-row { display: flex; gap: var(--space-3); }
.field-row .field { flex: 1; }

.char-count { font-weight: 400; color: var(--color-text-muted); font-size: .78rem; transition: color .2s; }
.char-count--near { color: var(--color-danger); font-weight: 700; }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--color-accent); }

/* ===== Admin: marca do guia (logo claro/escuro) ===== */
.brand-logo-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.brand-logo-slot { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 8px; }
.brand-logo-preview {
  height: 84px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; padding: var(--space-3);
}
.brand-logo-preview--light { background: #ffffff; }
.brand-logo-preview--dark { background: #1a1a1a; }
.brand-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo-upload-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }

.email-test-row { display: flex; gap: var(--space-2); }
.email-test-row .email-test-btn { flex: 1; }

.email-tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.email-tpl-var-chip {
  font-family: monospace; font-size: .78rem; padding: 3px 9px; border-radius: var(--radius-full);
  background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text);
  cursor: pointer; transition: background .15s;
}
.email-tpl-var-chip:hover { background: color-mix(in srgb, var(--color-accent) 15%, transparent); }

.coupon-check { display: block; margin-top: 6px; font-size: .82rem; font-weight: 600; min-height: 1.2em; }
.coupon-check--valid { color: var(--color-success); }
.coupon-check--invalid { color: var(--color-danger); }
.coupon-check--checking { color: var(--color-text-muted); font-weight: 400; }

.slug-field { display: flex; align-items: center; gap: 0; }
.slug-field__prefix { flex-shrink: 0; padding: 9px 0 9px 12px; color: var(--color-text-muted); font-size: .95rem; background: var(--color-surface-2); border: 1px solid var(--color-border); border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.slug-field input[type="text"] { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.photo-picker {
  display: flex; align-items: center; justify-content: center; height: 140px; border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border); cursor: pointer; overflow: hidden; background: var(--color-surface-2);
  transition: border-color .2s;
}
.photo-picker:hover { border-color: var(--color-accent); }
.photo-picker input[type="file"] { display: none; }
.photo-picker img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker span#photo-picker-placeholder { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); }

.hours-grid { display: flex; flex-direction: column; gap: var(--space-2); }
.hours-row { display: flex; flex-direction: column; gap: var(--space-2); padding: 8px 12px; background: var(--color-surface-2); border-radius: var(--radius-md); }
.hours-row__toggle { display: flex; align-items: center; gap: var(--space-2); font-size: .9rem; cursor: pointer; }
.hours-row__body { flex-direction: column; gap: var(--space-2); padding-left: calc(18px + var(--space-2)); }
.hours-24h-toggle { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--color-text-muted); cursor: pointer; width: fit-content; }
.hours-ranges { display: flex; flex-direction: column; gap: 6px; }
.hours-range { display: flex; align-items: center; gap: var(--space-2); font-size: .85rem; }
.hours-range input[type="time"] { padding: 5px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); }
.hours-range-remove { background: none; border: none; cursor: pointer; color: var(--color-text-muted); display: flex; padding: 2px; }
.hours-range-remove .material-icons { font-size: 1.1rem; }
.hours-range-add {
  display: flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer;
  color: var(--color-accent); font-weight: 600; font-size: .82rem; padding: 4px 0; width: fit-content;
}
.hours-range-add .material-icons { font-size: 1.1rem; }

.links-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }
.link-row { display: flex; gap: var(--space-2); align-items: center; }
.link-row input { flex: 1; min-width: 0; }
.link-row-remove { background: none; border: none; cursor: pointer; color: var(--color-text-muted); display: flex; padding: 4px; flex-shrink: 0; }
.link-row-remove .material-icons { font-size: 1.2rem; }

.pin-map-wrap { position: relative; height: 220px; border-radius: var(--radius-lg); overflow: hidden; transition: height .25s var(--ease-out); }
.pin-map-wrap.is-expanded { height: 65vh; }
#pin-map, #fallback-map { width: 100%; height: 100%; }
.pin-locate-btn { position: absolute; bottom: var(--space-2); right: var(--space-2); z-index: 500; }
.pin-expand-btn { position: absolute; top: var(--space-2); right: var(--space-2); z-index: 500; }

.new-card-error { color: var(--color-danger); font-size: .85rem; min-height: 1.2em; margin-bottom: var(--space-2); }

.new-card-success { text-align: center; padding: var(--space-6) var(--space-3); }
@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}
.success-check { font-size: 4.5rem; color: var(--color-success); display: block; margin: 0 auto var(--space-3); animation: success-pop .5s var(--ease-out) both; }

.years-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.year-option {
  padding: 10px 16px; border-radius: var(--radius-full); border: 2px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font-weight: 600; cursor: pointer;
  transition: all .2s var(--ease-out);
}
.year-option.is-selected { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 15%, transparent); transform: scale(1.05); }
.buy-total { text-align: center; font-size: 1.1rem; margin-bottom: var(--space-4); }

/* ===== Slots de mídia (foto/vídeo) + câmera embutida ===== */
.media-slots-btn { margin-bottom: var(--space-3); display: none; }
@media (max-width: 767.98px) { .media-slots-btn { display: flex; } }

.media-slots { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-2); }
.media-slot {
  position: relative; height: 100px; border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border); cursor: pointer; overflow: hidden; background: var(--color-surface-2);
  display: flex; align-items: center; justify-content: center; transition: border-color .2s;
}
.media-slot:hover { border-color: var(--color-accent); }
.media-slot input[type="file"] { display: none; }
.media-slot img, .media-slot video { width: 100%; height: 100%; object-fit: cover; display: none; }
.media-slot__placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--color-text-muted); font-size: .72rem; text-align: center; padding: 4px; }
.media-slot__placeholder .material-icons { font-size: 1.4rem; }
.media-slot.has-media { border-style: solid; padding: 0; cursor: grab; touch-action: none; }
.media-slot.is-dragging { opacity: .4; position: relative; z-index: 5; transition: none; }
.media-slot.is-drag-over { outline: 2.5px dashed var(--color-accent); outline-offset: -2.5px; }
.media-slot__remove {
  position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: none; display: none; align-items: center; justify-content: center; padding: 0;
}
.media-slot.has-media .media-slot__remove { display: flex; }
.media-slot__remove .material-icons { font-size: 1rem; }

/* ---------- Câmera embutida (captura de foto/vídeo pro anúncio) ---------- */
/* Layout em flex-flow normal (topbar → espaçador flexível → previewbar →
   hint → bottombar, um embaixo do outro na ordem do documento) — não posições
   absolutas com número mágico de "bottom: 130px" feito no chute. Isso é
   proposital: a versão antiga com posição absoluta podia sobrepor a barra de
   preview em cima da bottombar dependendo da altura de cada uma (variável
   por causa do safe-area-inset de cada aparelho), fazendo o toque no botão
   "Usar" cair por cima do botão de captura por baixo — dava a impressão de
   "preciso clicar várias vezes". Flex-flow elimina essa sobreposição de vez. */
.pm-camera-overlay { position: fixed; inset: 0; background: #000; z-index: 20000; display: none; flex-direction: column; touch-action: none; }
.pm-camera-overlay.open { display: flex; }
.pm-camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pm-camera-video.mirror { transform: scaleX(-1); }
.pm-camera-canvas { display: none; }
.pm-camera-topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--safe-top)) 16px 14px; gap: 8px; }
.pm-camera-roundbtn { width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-camera-status { flex: 1; text-align: center; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pm-camera-actions { display: flex; gap: 8px; }
.pm-camera-spacer { flex: 1; position: relative; z-index: 1; }
.pm-camera-previewbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 16px; min-height: 84px; }
.pm-camera-previewlist { display: flex; gap: 8px; flex: 1; overflow-x: auto; }
.pm-camera-thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex-shrink: 0; border: 2px solid #fff; cursor: pointer; }
.pm-camera-thumb img, .pm-camera-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pm-camera-thumb__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pm-camera-thumb__play .material-icons { font-size: 26px; color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pm-camera-hint { position: relative; z-index: 2; color: rgba(255,255,255,.75); font-size: 12.5px; text-align: center; padding: 0 16px 6px; }
.pm-camera-bottombar {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 20px calc(24px + var(--safe-bottom));
}
.pm-camera-capturewrap { grid-column: 2; justify-self: center; position: relative; width: 92px; height: 92px; }
.pm-camera-progress { position: absolute; inset: 0; width: 92px; height: 92px; transform: rotate(-90deg); }
.pm-camera-progress-track, .pm-camera-progress-value { fill: none; stroke-width: 7; }
.pm-camera-progress-track { stroke: rgba(255,255,255,.3); }
.pm-camera-progress-value { stroke: var(--color-danger); stroke-linecap: round; transition: stroke-dashoffset .05s linear; }
.pm-camera-capturebtn {
  width: 78px; height: 78px; border-radius: 50%; background: #fff; border: none;
  position: absolute; top: 7px; left: 7px; display: flex; align-items: center; justify-content: center; padding: 0;
  touch-action: none;
}
.pm-camera-capturecore { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px solid #000; transition: all .15s ease; display: block; }
.pm-camera-overlay.recording .pm-camera-capturecore { border-radius: 10px; background: var(--color-danger); width: 32px; height: 32px; border-color: var(--color-danger); }
.pm-camera-confirm { grid-column: 3; justify-self: end; }
.pm-camera-confirm:disabled { opacity: .4; pointer-events: none; }
.pm-camera-zoom-label {
  position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; font-weight: 700;
  padding: 5px 14px; border-radius: var(--radius-full); backdrop-filter: blur(4px);
}
body.pm-camera-open { overflow: hidden; }

/* Preview de uma mídia já capturada (toque na miniatura) — tela cheia dentro
   do overlay da câmera, com um botão de excluir de tamanho normal em vez do
   "x" minúsculo em cima da miniatura que ninguém conseguia tocar. */
.pm-camera-mediapreview { position: absolute; inset: 0; z-index: 10; background: #000; display: none; flex-direction: column; }
.pm-camera-mediapreview.open { display: flex; }
.pm-camera-mp-topbar { display: flex; align-items: center; padding: calc(14px + var(--safe-top)) 16px 14px; gap: 8px; }
.pm-camera-mp-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 12px calc(16px + var(--safe-bottom)); }
.pm-camera-mp-body video, .pm-camera-mp-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-camera-del-btn { background: var(--color-danger); }

/* Recorte de vídeo (galeria -> anúncio, ver video_trim.js): mesmo padrão
   visual em tela cheia escura da câmera embutida, com uma faixa arrastável
   representando a timeline inteira e uma janela de largura fixa (15s) que o
   usuário desliza pra escolher o trecho. */
.pm-trim-overlay { position: fixed; inset: 0; background: #000; z-index: 20000; display: none; flex-direction: column; touch-action: none; }
.pm-trim-overlay.open { display: flex; }
.pm-trim-topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--safe-top)) 16px 14px; gap: 8px; }
.pm-trim-roundbtn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-trim-confirmtop { background: var(--color-accent); }
.pm-trim-status { flex: 1; text-align: center; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pm-trim-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 12px; min-height: 0; }
.pm-trim-video { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-trim-footer { padding: 10px 20px calc(20px + var(--safe-bottom)); }
.pm-trim-time { text-align: center; color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.pm-trim-hint { text-align: center; color: rgba(255,255,255,.65); font-size: 12px; margin: 0 0 12px; }
.pm-trim-track { position: relative; height: 44px; border-radius: var(--radius-md); background: rgba(255,255,255,.12); }
.pm-trim-window {
  position: absolute; top: 0; bottom: 0; min-width: 30px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent) 55%, transparent); border: 2px solid var(--color-accent);
  display: flex; align-items: center; justify-content: center; color: #fff; cursor: grab; touch-action: none;
}
.pm-trim-window.dragging { cursor: grabbing; }
.pm-trim-window .material-icons { font-size: 20px; pointer-events: none; }
body.pm-trim-open { overflow: hidden; }

/* Mesmo padrão de preview em tela cheia acima, só que fora do overlay da
   câmera (usado pelos slots de mídia do formulário de anúncio — ver
   openSlotPreview em painel.js) — por isso position:fixed em vez de
   absolute, já que aqui não tem um ancestral fixed cobrindo a tela. */
.media-fullscreen-preview { position: fixed; inset: 0; z-index: 25000; background: #000; display: none; flex-direction: column; }
.media-fullscreen-preview.open { display: flex; }

/* ===== Preview de anúncio pro admin (moderação + busca) ===== */
.admin-search-row { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.search-input-wrap { position: relative; flex: 1; min-width: 0; }
.search-input-wrap input { width: 100%; padding: 9px 34px 9px 9px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); }
.search-input-clear {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; background: transparent; color: var(--color-text-muted);
  display: none; align-items: center; justify-content: center; padding: 0; border-radius: 50%; cursor: pointer;
}
.search-input-clear:hover { background: var(--color-surface-2); }
.search-input-clear .material-icons { font-size: 1.1rem; }
.search-input-wrap.has-value .search-input-clear { display: flex; }
.mod-row, .my-card-row { cursor: pointer; }

.admin-card-preview {
  position: fixed; inset: 0; z-index: 26000; background: var(--color-bg); display: none; flex-direction: column;
}
.admin-card-preview.open { display: flex; }
.admin-card-preview .pm-camera-mp-topbar { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.admin-card-preview .pm-camera-roundbtn { background: var(--color-surface-2); color: var(--color-text); }
.admin-card-preview__body { flex: 1; overflow-y: auto; padding: var(--space-4) var(--space-5) var(--space-4); }
.admin-card-preview__body h2 { margin-bottom: var(--space-3); }
.admin-preview-media { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.admin-preview-media img, .admin-preview-media video { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-md); display: block; }
.admin-preview-text { line-height: 1.5; margin-bottom: var(--space-3); }
.admin-preview-meta { display: flex; flex-direction: column; gap: var(--space-2); color: var(--color-text-muted); font-size: .9rem; margin-bottom: var(--space-3); }
.admin-preview-meta > div { display: flex; align-items: center; gap: 6px; }
.admin-preview-meta .material-icons { font-size: 1.1rem; flex-shrink: 0; }
.admin-preview-hours { position: static; box-shadow: none; padding: 0; margin-bottom: var(--space-3); background: none; display: flex; }
.admin-preview-rejection { background: color-mix(in srgb, var(--color-danger) 12%, transparent); color: var(--color-danger); padding: var(--space-3); border-radius: var(--radius-md); font-size: .9rem; margin-bottom: var(--space-3); }
.admin-card-preview__actions { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-5) calc(var(--space-4) + var(--safe-bottom)); border-top: 1px solid var(--color-border); background: var(--color-surface); }
.admin-card-preview__actions .btn { flex: 1; }

/* ===== Pix (QR + slide pra confirmar) ===== */
.pix-receiver-name { text-align: center; font-size: .85rem; color: var(--color-text-muted); margin: 0 0 var(--space-2); }
.pix-receiver-name strong { color: var(--color-text); }
.pix-qr-img { display: block; width: 220px; height: 220px; margin: 0 auto var(--space-3); box-shadow: var(--shadow-md); }
.pix-copy-row { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.pix-copy-row input { flex: 1; min-width: 0; font-size: .75rem; font-family: monospace; }
.pix-payer-notice {
  display: flex; align-items: flex-start; gap: 6px; font-size: .82rem; color: #b06d00;
  background: color-mix(in srgb, #f4a300 14%, transparent); border-radius: var(--radius-md);
  padding: 8px 10px; margin-top: var(--space-2);
}
.pix-payer-notice .material-icons { font-size: 18px; flex-shrink: 0; }
.pix-payer-notice strong { color: inherit; }

.slide-confirm__track {
  position: relative; height: 52px; border-radius: var(--radius-full); background: var(--color-surface-2);
  display: flex; align-items: center; overflow: hidden; user-select: none;
}
.slide-confirm__label { flex: 1; text-align: center; font-size: .82rem; font-weight: 600; color: var(--color-text-muted); pointer-events: none; padding: 0 var(--space-6); }
.slide-confirm__handle {
  position: absolute; left: 4px; top: 4px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none; transition: background .2s;
}
.slide-confirm.is-confirmed .slide-confirm__track { background: color-mix(in srgb, var(--color-success) 25%, transparent); }
.slide-confirm.is-confirmed .slide-confirm__handle { background: var(--color-success); cursor: default; }

/* ===== Transações do card (status, thread de mensagens, resposta) ===== */
.tx-status-pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-full); margin-top: 4px; }
.tx-status-pending, .tx-status-awaiting_confirmation { background: color-mix(in srgb, #f4a300 20%, transparent); color: #b06d00; }
.tx-status-rejected { background: color-mix(in srgb, var(--color-danger) 20%, transparent); color: var(--color-danger); }
.tx-thread { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 6px; }
.tx-message { padding: 8px 10px; border-radius: var(--radius-md); font-size: .82rem; max-width: 90%; }
.tx-message--admin { background: var(--color-surface-2); align-self: flex-start; }
.tx-message--user { background: color-mix(in srgb, var(--color-accent) 15%, transparent); align-self: flex-end; }
.tx-message a { color: var(--color-accent); font-weight: 600; }
.tx-reply-form { display: flex; flex-direction: column; gap: 6px; margin-top: var(--space-2); }
.tx-reply-form textarea { width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); font-family: inherit; font-size: .85rem; resize: vertical; }
.tx-reply-form .field-row { display: flex; gap: 6px; align-items: center; }

.pending-payments-list { display: flex; flex-direction: column; gap: var(--space-3); }
.payment-row { background: var(--color-surface-2); border-radius: var(--radius-lg); padding: var(--space-3); }
.payment-row__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-bottom: 4px; }
.payment-row__title { font-weight: 700; }
.payment-row__amount { font-weight: 700; color: var(--color-accent); }
.payment-row__meta { font-size: .78rem; color: var(--color-text-muted); margin-bottom: 6px; }
.payment-row__actions { display: flex; flex-direction: column; gap: 6px; margin-top: var(--space-2); }
.payment-row__actions .field-row { display: flex; gap: 6px; }
.payment-row__actions input { flex: 1; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); font-size: .82rem; }

/* Legenda de nome sobre KML (ponto/polígono — trilha usa leaflet-textpath, sem tooltip) */
.kml-label {
  background: rgba(255,255,255,.92); color: #222; font-weight: 700; font-size: 12px;
  padding: 2px 8px; border: none; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.kml-label::before { display: none; }

/* ===== Termos de Uso / Política de Privacidade (markdown renderizado) ===== */
.legal-page { max-width: 720px; margin: 0 auto; padding: calc(var(--space-8) + var(--safe-top)) var(--space-5) calc(var(--space-8) + var(--safe-bottom)); }
.legal-content h1 { font-family: 'Lexend Deca', sans-serif; font-size: 1.6rem; margin-bottom: var(--space-5); }
.legal-content h2 { font-family: 'Lexend Deca', sans-serif; font-size: 1.15rem; margin: var(--space-7) 0 var(--space-3); border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.legal-content h2:first-of-type { border-top: none; padding-top: 0; }
.legal-content p, .legal-content li { line-height: 1.65; color: var(--color-text); }
.legal-content p { margin: 0 0 var(--space-3); }
.legal-content ul, .legal-content ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--color-accent); font-weight: 600; }
.legal-content strong { font-weight: 700; }
.legal-content hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-4); font-size: .88rem; }
.legal-content th, .legal-content td { border: 1px solid var(--color-border); padding: 8px 10px; text-align: left; }
.legal-content th { background: var(--color-surface-2); font-weight: 700; }
.legal-content > p:first-of-type { color: var(--color-text-muted); font-size: .88rem; font-style: italic; }

.legal-links { font-size: .8rem; color: var(--color-text-muted); text-align: center; margin-top: var(--space-3); }
.legal-links a { color: var(--color-text-muted); text-decoration: underline; }
