/* ══════════════════════════════════════════════════════════════
   MAPA SOLIDÁRIO — Benguela
   style.css  |  Versão optimizada
   ══════════════════════════════════════════════════════════════
   MELHORIAS APLICADAS:
   1. @keyframes sheetUp e .spinner/@keyframes spin duplicados → fundidos
   2. #img-viewer.open e #img-viewer img duplicados → removida a cópia
   3. Bloco orphão "overscroll-behavior: contain; }" removido
   4. html/body declarado UMA vez com todas as propriedades combinadas
   5. * com -webkit-overflow-scrolling movido para um único bloco
   6. font-size: 16px em inputs do form de desaparecido (evita zoom iOS)
   7. safe-area-inset para FABs e bottom-legend (iPhone com home bar)
   8. prefers-reduced-motion: anula animações para utilizadores sensíveis
   9. min-height em inputs/textareas: 44px (Apple HIG touch target)
   10. Comentários de secção adicionados para fácil navegação
   ══════════════════════════════════════════════════════════════ */


/* ══ VARIÁVEIS GLOBAIS ══════════════════════════════════════ */
:root {
  --red:          #e63946;
  --green:        #2a9d5c;
  --amber:        #f4a261;
  --blue:         #4fc3f7;
  --purple:       #a78bfa;
  --cyan:         #22d3ee;
  --orange:       #e67e22;
  --dark:         #0a0e14;
  --card:         #131820;
  --card2:        #1a2030;
  --border:       rgba(255, 255, 255, 0.07);
  --text:         #e8eaf0;
  --muted:        #7a8494;
  --radius:       20px;
  --font-display: "Unbounded", sans-serif;
  --font-body:    "DM Sans", sans-serif;
  /* Safe area — iPhone notch / home bar */
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);
}


/* ══ RESET ══════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Remove highlight azul de tap no Chrome/Safari Android */
  -webkit-tap-highlight-color: transparent;
  /* Scroll suave no iOS — aplicado globalmente UMA vez */
  -webkit-overflow-scrolling: touch;
  /* Scrollbar fina no Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* Previne text-selection acidental em toda a UI (excepto inputs/texto) */
*:not(input):not(textarea):not(select):not([contenteditable]) {
  -webkit-user-select: none;
  user-select: none;
}

/* Garante que inputs são sempre seleccionáveis */
input, textarea, select {
  -webkit-user-select: auto !important;
  user-select: auto !important;
}

/* Scrollbars WebKit (Chrome / Safari) */
*::-webkit-scrollbar       { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover  { background: rgba(255, 255, 255, 0.22); }
*::-webkit-scrollbar-corner       { background: transparent; }


/* ══ HTML / BODY ════════════════════════════════════════════ */
html, body {
  height: 100%;
  /* Permite scroll vertical; bloqueia scroll horizontal que causa flicker */
  overflow-x: hidden;
  overflow-y: auto;
  /* Impede bounce do OS a mascarar o scroll da app */
  overscroll-behavior: none;
  /* Antialiasing — texto mais nítido no macOS/iOS */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--text);
}


/* ══ UTILITÁRIOS ════════════════════════════════════════════ */
.hidden { display: none !important; }

/* Respeitar preferências de movimento reduzido (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ══ ANIMAÇÕES PARTILHADAS ══════════════════════════════════ */

/* Sheet que sobe de baixo — usada em todos os bottom-sheets */
@keyframes sheetUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Pop modal de centro */
@keyframes modalPop {
  from { transform: scale(0.85) translateY(30px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* Rotação do spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Flutuação (bandeira, coração) */
@keyframes floatFlag {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Shimmer para skeleton loaders */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Pulso do FAB de doação */
@keyframes doarePulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(42, 157, 92, 0.55); }
  50%       { box-shadow: 0 4px 32px rgba(42, 157, 92, 0.85); }
}

/* Pulso do ticker */
@keyframes tickerPulse {
  0%, 100% { opacity: 1;  transform: scale(1);   box-shadow: 0 0 0 0   rgba(42, 157, 92, 0.4); }
  50%       { opacity: .8; transform: scale(.85); box-shadow: 0 0 0 4px rgba(42, 157, 92, 0);   }
}

/* Pulso do status de desaparecido */
@keyframes statusPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.02); }
}


/* ══ SCREENS ════════════════════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.4s, transform 0.4s;
}
.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  display: none !important; /* garante que hidden esconde em todos os contextos */
}


/* ══ LOADING OVERLAY ════════════════════════════════════════ */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s;
}
#loading-overlay.fade  { opacity: 0; pointer-events: none; }
#loading-overlay.gone  { display: none; }
.load-msg { font-size: 13px; color: var(--muted); }


/* ══ SPINNER ════════════════════════════════════════════════ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.spinner.sm {
  width: 24px;
  height: 24px;
  border-width: 2px;
  margin: 0;
}


/* ══ WELCOME SCREEN ═════════════════════════════════════════ */
#screen-welcome {
  background:
    radial-gradient(ellipse at 30% 20%, #1a2a1a 0%, var(--dark) 60%),
    radial-gradient(ellipse at 80% 80%, #1a1020 0%, transparent 60%);
  padding: 32px 24px;
  /* safe-area para dispositivos com notch */
  padding-top: calc(32px + var(--safe-top));
  text-align: center;
}
.splash-flag {
  font-size: 52px;
  margin-bottom: 16px;
  animation: floatFlag 3s ease-in-out infinite;
}
.splash-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.6;
  max-width: 280px;
}


/* ══ ROLE SCREEN ════════════════════════════════════════════ */
#screen-role {
  background: var(--dark);
  padding: 24px;
  gap: 0;
  justify-content: flex-end;
}
.role-map-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--dark) 85%);
  z-index: 1;
}
#role-map-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}
.role-sheet {
  position: relative;
  z-index: 2;
  width: calc(100% + 48px);
  margin: 0 -24px;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 28px 24px calc(48px + var(--safe-bottom));
}
.role-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.role-close:hover { background: rgba(255, 255, 255, 0.15); color: var(--text); }
.role-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 24px;
}
.role-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}
.role-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}
.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.role-card {
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  background: var(--card2);
  /* Alvo de toque adequado (≥44px altura) */
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.role-card:active { transform: scale(0.97); }
.role-card.selected-donor    { border-color: var(--green);  background: rgba(42,  157, 92,  0.12); }
.role-card.selected-visitor  { border-color: var(--amber);  background: rgba(244, 162, 97,  0.12); }
.role-card.selected-volunteer{ border-color: var(--purple); background: rgba(167, 139, 250, 0.12); }
.role-card .icon  { font-size: 28px; margin-bottom: 8px; }
.role-card .label { font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.3px; }
.role-card .desc  { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.4; }


/* ══ FORM SCREEN ════════════════════════════════════════════ */
#screen-form {
  background: var(--dark);
  justify-content: flex-end;
  padding: 0;
}
.form-sheet {
  width: 100%;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 22px calc(48px + var(--safe-bottom));
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.form-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 16px auto 22px;
}
.form-header { margin-bottom: 22px; }
.form-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.badge-donor    { background: rgba(42,  157, 92,  0.2); color: var(--green); }
.badge-visitor  { background: rgba(244, 162, 97,  0.2); color: var(--amber); }
.badge-volunteer{ background: rgba(167, 139, 250, 0.2); color: var(--purple); }
.badge-desp     { background: rgba(230, 57,  70,  0.2); color: var(--red); }
.badge-grupo    { background: rgba(244, 162, 97,  0.2); color: var(--amber); }
.form-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.sheet-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px; /* Apple HIG: min 44×44 touch target */
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  line-height: 1;
}
.sheet-close:hover { background: rgba(255, 255, 255, 0.15); color: var(--text); }


/* ══ CAMPOS (FIELDS) ════════════════════════════════════════ */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  /* 16px: previne zoom automático no iOS/Safari ao focar input */
  font-size: 16px;
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  /* Alvo de toque mínimo */
  min-height: 48px;
}
.field input::placeholder,
.field textarea::placeholder { color: #3a4556; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: rgba(255, 255, 255, 0.25); }
.field textarea { height: 70px; resize: none; }
.field select option { background: #1a2030; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}


/* ══ UPLOAD ZONE ════════════════════════════════════════════ */
.upload-zone {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--card2);
  position: relative;
}
.upload-zone:hover {
  border-color: rgba(230, 57, 70, 0.5);
  background: rgba(230, 57, 70, 0.05);
}
.upload-zone.has-file {
  border-color: var(--red);
  background: rgba(230, 57, 70, 0.08);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon  { font-size: 28px; margin-bottom: 6px; }
.upload-label { font-size: 12px; color: var(--muted); }
.upload-label strong { color: var(--red); }
#foto-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  display: none;
}


/* ══ BOTÕES ══════════════════════════════════════════════════ */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 17px;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  letter-spacing: 0.2px;
  /* Alvo de toque */
  min-height: 52px;
}
.btn-primary:active { transform: scale(0.98); filter: brightness(1.1); }

.btn-green  { background: linear-gradient(135deg, #1d7a47, var(--green)); box-shadow: 0 6px 24px rgba(42, 157, 92, 0.35); }
.btn-amber  { background: linear-gradient(135deg, #c97c35, var(--amber)); box-shadow: 0 6px 24px rgba(244, 162, 97, 0.35); }
.btn-purple { background: linear-gradient(135deg, #7c3aed, var(--purple)); box-shadow: 0 6px 24px rgba(167, 139, 250, 0.35); }
.btn-red    { background: linear-gradient(135deg, #c0392b, var(--red)); box-shadow: 0 6px 24px rgba(230, 57, 70, 0.35); }
.btn-cyan   { background: linear-gradient(135deg, #0891b2, var(--cyan)); box-shadow: 0 6px 24px rgba(34, 211, 238, 0.35); }

.btn-outline {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  margin-top: 10px;
  transition: border-color 0.2s, color 0.2s;
  min-height: 48px;
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text); }

/* Botão publicar (galeria) */
.btn-publish {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1d7a47, var(--green));
  box-shadow: 0 6px 24px rgba(42, 157, 92, 0.35);
  transition: transform 0.15s, filter 0.15s;
  min-height: 52px;
}
.btn-publish:active   { transform: scale(0.98); filter: brightness(1.1); }
.btn-publish:disabled { opacity: 0.5; cursor: not-allowed; }

/* Botão cancelar (galeria) */
.btn-cancel {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-cancel:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text); }

/* Botão de interacção (assumir/recolher) */
.btn-interagir {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.3s;
  min-height: 48px;
}
.btn-interagir.purple { background: #a78bfa; color: white; }
.btn-interagir.amber  { background: #f4a261; color: white; }
.meu-registo-label {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 10px;
  font-style: italic;
}


/* ══ MAP SCREEN ══════════════════════════════════════════════ */
#screen-map {
  z-index: 100;
  flex-direction: column;
  justify-content: flex-start;
}
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Oculta info window do Google Maps (não usada) */
.gm-style .gm-style-iw-c { display: none !important; }


/* ══ TOP BAR ═════════════════════════════════════════════════ */
#top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  gap: 12px;

}
.top-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.top-logo img {
  height: 80px !important;
  width: 80px;
  object-fit: contain;
  display: block;
}
.top-logo .logo-text { color: var(--text); }

.top-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #000;
  /* Alvo de toque */
  min-height: 32px;
}
.pill:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.15); }
.pill .dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pill .pill-label { font-size: 10px; font-weight: 500; color: rgba(0,0,0,0.6); margin-left: 2px; }
.pill-red    { border-color: rgba(230, 57,  70,  0.3); }
.pill-red:hover    { background: rgba(230, 57,  70,  0.2); }
.pill-green  { border-color: rgba(42,  157, 92,  0.3); }
.pill-green:hover  { background: rgba(42,  157, 92,  0.2); }
.pill-purple { border-color: rgba(167, 139, 250, 0.3); }
.pill-purple:hover { background: rgba(167, 139, 250, 0.2); }
.pill-amber  { border-color: rgba(244, 162, 97,  0.3); }
.pill-amber:hover  { background: rgba(244, 162, 97,  0.2); }
.pill-orange { border-color: rgba(230, 126, 34,  0.3); }
.pill-orange:hover { background: rgba(230, 126, 34,  0.2); }


/* ══ TOP META (linha 2) ══════════════════════════════════════ */
#top-meta {
  position: absolute;
  top: 66px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  flex-wrap: wrap;

}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 6px 12px;
}
.meta-icon {
  width: 24px; height: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.meta-info { display: flex; align-items: baseline; gap: 4px; }
.meta-pill span:not(.meta-label):not(.meta-icon) {
  font-size: 13px; font-weight: 700; color: #000; font-family: var(--font-body);
}
.meta-pill .meta-label { font-size: 10px; font-weight: 500; color: rgba(0,0,0,0.5); font-family: var(--font-body); }
.meta-pill-green { background: rgba(255, 255, 255, 0.95); }
.meta-pill-green .meta-icon { background: rgba(42, 157, 92, 0.2); }
.meta-pill-green span:not(.meta-label) { color: var(--green) !important; }
.meta-pill-green .meta-label { color: var(--green) !important; }

/* TICKER de doações */
#ticker-bar {
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  margin-left: auto;
}
#ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(42, 157, 92, 0.2);
  border-radius: 20px;
  padding: 5px 12px;
  transition: opacity 0.4s, transform 0.4s;
  white-space: nowrap;
  color: #000 !important;
}

/* Botão galeria */
.galeria-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d0cfc8;
  background: #fff;
  color: #1a1a1a;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 32px;
}
.galeria-btn:hover { background: #f5f4f0; }


/* ══ FAB MENU ════════════════════════════════════════════════ */
#fab-main {
  position: absolute;
  bottom: calc(90px + var(--safe-bottom));
  right: 18px;
  right: calc(18px + var(--safe-right));
  z-index: 200;
  width: 60px; height: 60px;
  border-radius: 20px;
  background: var(--green);
  box-shadow: 0 6px 28px rgba(42, 157, 92, 0.5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 300;
  color: white;
  transition: transform 0.2s, background 0.2s, border-radius 0.2s;
  line-height: 1;
}
#fab-main.open {
  transform: rotate(45deg);
  background: #c0392b;
  border-radius: 50%;
  box-shadow: 0 6px 28px rgba(192, 57, 43, 0.5);
}
#fab-main:active { transform: scale(0.93); }
#fab-main.open:active { transform: rotate(45deg) scale(0.93); }

#fab-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#fab-overlay.open { opacity: 1; pointer-events: all; }

#fab-menu {
  position: absolute;
  bottom: calc(224px + var(--safe-bottom));
  right: calc(14px + var(--safe-right));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  overflow-x: visible;
  padding: 6px 4px;
  -webkit-overflow-scrolling: touch;
}
.fab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  cursor: pointer;
}
.fab-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.fab-item-label {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.fab-item-btn {
  width: 44px; height: 44px; /* Apple HIG min */
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s;
}
.fab-item-btn:active { transform: scale(0.9); }

/* FAB Doação */
#fab-doar {
  position: absolute;
  bottom: calc(162px + var(--safe-bottom));
  right: calc(18px + var(--safe-right));
  z-index: 201;
  width: 50px; height: 50px;
  border-radius: 16px;
  background: orange !important;
  box-shadow: 0 4px 20px rgba(42, 157, 92, 0.55);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: doarePulse 2.5s ease-in-out infinite;
}
#fab-doar:active { transform: scale(0.92); }

/* Ícone de imagem no FAB */
.fab-icon-img {
  width: 20px !important; height: 20px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}


/* ══ BOTTOM LEGEND ═══════════════════════════════════════════ */
#bottom-legend {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  padding: 8px 16px calc(28px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  min-height: 32px;
}
.l-dot { width: 10px; height: 10px; border-radius: 50%; }


/* ══ TOAST ═══════════════════════════════════════════════════ */
#toast {
  position: fixed;
  top: calc(80px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 9999;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Garante legibilidade com texto claro */
  color: var(--text);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ══ INFO POPUP ══════════════════════════════════════════════ */
#info-popup {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#info-popup.open { opacity: 1; pointer-events: all; }
.info-sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 22px calc(48px + var(--safe-bottom));
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.info-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 16px auto 20px; }
.info-type  { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 5px; }
.info-name  { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.info-cat   { display: inline-block; font-size: 12px; background: rgba(255, 255, 255, 0.07); border-radius: 8px; padding: 4px 10px; margin-bottom: 10px; color: var(--muted); }
.info-desc  { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.info-loc   { font-size: 12px; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 5px; }

.call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #1d7a47, var(--green));
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(42, 157, 92, 0.35);
  min-height: 52px;
}
.call-btn.amber  { background: linear-gradient(135deg, #c97c35, var(--amber)); box-shadow: 0 6px 24px rgba(244, 162, 97, 0.35); }
.call-btn.purple { background: linear-gradient(135deg, #7c3aed, var(--purple)); box-shadow: 0 6px 24px rgba(167, 139, 250, 0.35); }
.extra-call-btn { margin-top: 0.5rem; }

.helped-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.helped-btn:hover { border-color: var(--green); color: var(--green); }


/* ══ LIST POPUP ══════════════════════════════════════════════ */
#list-popup {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#list-popup.open { opacity: 1; pointer-events: all; }
.list-sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 20px calc(48px + var(--safe-bottom));
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.list-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 16px auto 12px; flex-shrink: 0; }
.list-header { padding-bottom: 14px; flex-shrink: 0; }
.list-title  { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.list-sub    { font-size: 12px; color: var(--muted); margin-top: 3px; }
.list-body   { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: rgba(255, 255, 255, 0.04); }
.list-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.list-info { flex: 1; min-width: 0; }
.list-nome { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-arrow{ color: var(--muted); font-size: 14px; flex-shrink: 0; }


/* ══ DELETE OVERLAY ══════════════════════════════════════════ */
#delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#delete-overlay.open { opacity: 1; pointer-events: all; }
.delete-sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 22px calc(48px + var(--safe-bottom));
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}


/* ══ DESAPARECIDOS POPUP ══════════════════════════════════════ */
#desp-popup {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#desp-popup.open { opacity: 1; pointer-events: all; }

.desp-sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 3px solid var(--red);
  padding: 0 20px calc(48px + var(--safe-bottom));
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.desp-handle { width: 40px; height: 4px; background: rgba(230, 57, 70, 0.3); border-radius: 2px; margin: 12px auto; flex-shrink: 0; }
.desp-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 16px; flex-shrink: 0; }
.desp-header-left  { display: flex; align-items: center; gap: 12px; }
.desp-header-icon  { width: 44px; height: 44px; background: linear-gradient(135deg, rgba(230,57,70,0.2), rgba(230,57,70,0.1)); border: 1px solid rgba(230,57,70,0.3); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.desp-header-info  { display: flex; flex-direction: column; gap: 2px; }
.desp-header-title { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--text); }
.desp-header-sub   { font-size: 12px; color: var(--muted); }
.desp-report-btn {
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--red), #c0392b);
  color: white; border: none; border-radius: 12px;
  padding: 10px 16px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(230,57,70,0.3);
  min-height: 44px;
}
.desp-report-btn span { font-size: 16px; font-weight: 400; }
.desp-report-btn:active { transform: scale(0.96); }

.desp-tabs { display: flex; gap: 10px; padding: 0 0 12px; flex-shrink: 0; }
.desp-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card2);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  cursor: pointer; transition: all 0.25s;
  min-height: 48px;
}
.desp-tab .tab-icon { font-size: 14px; }
.desp-tab.active-red  { border-color: var(--red);  background: rgba(230,57,70,0.15);  color: var(--red);  box-shadow: 0 0 20px rgba(230,57,70,0.15); }
.desp-tab.active-cyan { border-color: var(--cyan); background: rgba(34,211,238,0.15); color: var(--cyan); box-shadow: 0 0 20px rgba(34,211,238,0.15); }

.desp-search-wrap { position: relative; flex-shrink: 0; margin-bottom: 12px; }
.desp-search-wrap .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; opacity: 0.5; }
#desp-search {
  width: 100%;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 40px 13px 42px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px; /* iOS no-zoom */
  outline: none; transition: all 0.2s; -webkit-appearance: none;
  min-height: 48px;
}
#desp-search::placeholder { color: #5a6577; }
#desp-search:focus { border-color: var(--red); background: rgba(230,57,70,0.05); }
.desp-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none;
  color: var(--muted); font-size: 12px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.desp-search-clear.visible { display: flex; }
.desp-search-clear:hover { background: rgba(230,57,70,0.2); color: var(--red); }

.desp-body { flex: 1; padding-top: 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: calc(92vh - 220px); }
.desp-card {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.desp-card:last-child { border-bottom: none; }
.desp-card:active { transform: scale(0.98); background: rgba(255,255,255,0.02); }
.desp-foto {
  width: 70px; height: 70px; border-radius: 16px; object-fit: cover;
  flex-shrink: 0; border: 2px solid rgba(230,57,70,0.3);
  background: var(--card2); cursor: pointer; transition: all 0.2s;
}
.desp-foto:hover { transform: scale(1.05); border-color: var(--red); box-shadow: 0 8px 20px rgba(230,57,70,0.2); }
.desp-foto-placeholder {
  width: 70px; height: 70px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--card2), #252d3d);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; transition: all 0.2s;
}
.desp-foto-placeholder:hover { border-color: rgba(230,57,70,0.5); transform: scale(1.05); }
.desp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.desp-nome { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.desp-nome mark { background: rgba(230,57,70,0.25); color: var(--red); border-radius: 4px; padding: 0 4px; }
.desp-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.desp-call {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(230,57,70,0.15), rgba(230,57,70,0.1));
  border: 1px solid rgba(230,57,70,0.3); color: var(--red);
  border-radius: 10px; padding: 6px 12px;
  font-size: 11px; font-weight: 700; text-decoration: none; transition: all 0.2s;
}
.desp-call:hover { background: linear-gradient(135deg, rgba(230,57,70,0.25), rgba(230,57,70,0.15)); transform: translateY(-1px); }
.desp-encontrado-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(34,211,238,0.1));
  border: 1px solid rgba(34,211,238,0.3); color: var(--cyan);
  border-radius: 10px; padding: 6px 12px;
  font-size: 11px; font-weight: 700;
}


/* ══ MODAL GRANDE DESAPARECIDO ══════════════════════════════ */
#desp-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
  isolation: isolate;
}
#desp-modal.open { opacity: 1; pointer-events: all; }
.desp-modal-inner {
  width: 100%;
  max-width: 400px;
  max-height: 92vh;
  background: var(--card);
  border-radius: 28px;
  border: 1px solid rgba(230,57,70,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.desp-modal-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  color: white; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 10; line-height: 1;
}
.desp-modal-close-btn:hover { background: rgba(230,57,70,0.8); transform: scale(1.1); }
.desp-modal-foto-wrap {
  position: relative; width: 100%;
  min-height: 250px; max-height: 50vh;
  background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.desp-modal-foto { width: 100%; height: 100%; max-height: 50vh; object-fit: contain; display: block; }
.desp-modal-foto-placeholder {
  width: 100%; min-height: 200px;
  background: linear-gradient(135deg, var(--card2), #1a1f2e);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.desp-modal-status {
  position: absolute; top: 16px; left: 16px;
  padding: 8px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
  animation: statusPulse 2s ease-in-out infinite;
}
.desp-modal-status.ativo {
  background: linear-gradient(135deg, rgba(230,57,70,0.9), rgba(192,57,43,0.9));
  color: white; box-shadow: 0 4px 20px rgba(230,57,70,0.4);
}
.desp-modal-status.encontrado {
  background: linear-gradient(135deg, rgba(34,211,238,0.9), rgba(8,145,178,0.9));
  color: #0a0e14; box-shadow: 0 4px 20px rgba(34,211,238,0.4);
}
.desp-modal-body { padding: 20px 24px 32px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.desp-modal-nome { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--text); line-height: 1.2; }
.desp-modal-meta { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.6; display: flex; align-items: center; gap: 8px; }
.desp-modal-meta::before { content: ''; width: 4px; height: 4px; background: var(--red); border-radius: 50%; }
.desp-modal-desc { font-size: 13px; color: var(--text); line-height: 1.6; padding: 12px 14px; background: var(--card2); border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--border); }
.desp-modal-divider { height: 1px; background: linear-gradient(to right, transparent, var(--border), transparent); margin: 16px 0; }
.desp-modal-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.desp-map-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, rgba(79,195,247,0.15), rgba(79,195,247,0.1));
  border: 1.5px solid rgba(79,195,247,0.3); color: var(--blue);
  border-radius: 12px; padding: 12px 16px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; min-height: 48px;
}
.desp-map-btn:active { transform: scale(0.98); background: linear-gradient(135deg, rgba(79,195,247,0.25), rgba(79,195,247,0.15)); }
.desp-whatsapp-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border: none; color: white; border-radius: 12px; padding: 14px 20px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3); min-height: 48px;
}
.desp-whatsapp-btn:active { transform: scale(0.98); filter: brightness(1.1); }
.desp-modal-call-wrap { display: flex; flex-direction: column; gap: 8px; }
.desp-modal-call-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #c0392b, var(--red));
  color: white; border: none; border-radius: 14px; padding: 15px; width: 100%;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 20px rgba(230,57,70,0.35);
  transition: transform 0.15s, filter 0.15s; min-height: 52px;
}
.desp-modal-call-btn:active { transform: scale(0.98); filter: brightness(1.1); }
.desp-encontrado-msg {
  text-align: center; padding: 16px; color: var(--cyan); font-size: 14px; font-weight: 600;
  background: rgba(34,211,238,0.1); border-radius: 12px; border: 1px solid rgba(34,211,238,0.2);
}
.desp-no-contact { text-align: center; padding: 16px; color: var(--muted); font-size: 13px; }
.desp-modal-share { margin-top: 16px; display: flex; justify-content: center; }
.desp-share-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 20px; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.desp-share-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }


/* ══ SCREEN DESAPARECIDO FORM ════════════════════════════════ */
#screen-desp-form {
  background: var(--dark);
  justify-content: flex-end;
  padding: 0;
  z-index: 4600;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#screen-desp-form .form-sheet {
  flex: 1 !important;
  width: 100% !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
  padding: 16px !important;
  padding-bottom: calc(120px + var(--safe-bottom)) !important;
  box-sizing: border-box !important;
}
/* Botão fechar fixo no topo */
#screen-desp-form .sheet-close {
  position: sticky !important;
  top: 10px !important;
  right: 10px !important;
  margin-left: auto !important;
  z-index: 10 !important;
}
/* Header fixo */
#screen-desp-form .form-header {
  position: sticky !important;
  top: 0 !important;
  background: var(--card) !important;
  z-index: 5 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
/* Inputs a 16px (evita zoom iOS) */
#screen-desp-form input,
#screen-desp-form textarea { width: 100% !important; font-size: 16px !important; }
#screen-desp-form textarea { min-height: 120px !important; resize: none !important; }
/* Botões fixos no fundo */
#screen-desp-form .btn-primary,
#screen-desp-form .btn-outline {
  position: sticky !important; bottom: 0 !important;
  width: 100% !important; margin-top: 10px !important;
}


/* ══ GRUPOS POPUP ════════════════════════════════════════════ */
#grupos-popup {
  position: fixed; inset: 0; z-index: 4500;
  display: flex; align-items: flex-end;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#grupos-popup.open { opacity: 1; pointer-events: all; }
.grupos-sheet {
  width: 100%; max-width: 520px; margin: 0 auto;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  border-top: 2px solid rgba(244, 162, 97, 0.3);
  padding: 0 20px calc(48px + var(--safe-bottom));
  max-height: 85vh; display: flex; flex-direction: column;
  animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); position: relative;
}
.grupos-body { flex: 1; padding-top: 4px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.grupo-card  { padding: 14px 0; border-bottom: 1px solid var(--border); }
.grupo-card:last-child { border-bottom: none; }
.grupo-nome  { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.grupo-oferecem { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.grupo-tag {
  background: rgba(244,162,97,0.15); border: 1px solid rgba(244,162,97,0.25);
  color: var(--amber); border-radius: 6px; padding: 3px 8px;
  font-size: 10px; font-weight: 700;
}
.grupo-meta { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.grupo-call {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(244,162,97,0.15); border: 1px solid rgba(244,162,97,0.3);
  color: var(--amber); border-radius: 8px; padding: 5px 10px;
  font-size: 11px; font-weight: 700; text-decoration: none; transition: background 0.2s;
}
.grupo-call:hover { background: rgba(244,162,97,0.25); }
.grupo-wpp-btn {
  display: block; width: 100%; margin-top: 10px; padding: 12px;
  background: #25D366; color: white; border: none; border-radius: 10px;
  font-weight: bold; font-size: 13px; cursor: pointer; min-height: 44px;
}
.grupo-wpp-btn:hover { background: #1ebe5d; }

#screen-grupo-form { background: var(--dark); justify-content: flex-end; padding: 0; z-index: 4600; }


/* ══ PAINEL DE DOAÇÃO ════════════════════════════════════════ */
#doacao-screen {
  position: fixed; inset: 0; z-index: 7000;
  background: var(--dark); display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
/* ═════════ FIX BRUTO SCROLL MODAL ═════════ */

/* CONTAINER PRINCIPAL */
#doacao-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 7000 !important;
  background: var(--dark) !important;

  display: flex !important;
  flex-direction: column !important;

  height: 100vh !important;
  max-height: 100vh !important;

  overflow: hidden !important;
}

/* HEADER FIXO */
#doacao-header {
  flex-shrink: 0 !important;
}

/* FOOTER FIXO */
#doacao-footer {
  flex-shrink: 0 !important;
}

/* 🔥 ÁREA DE SCROLL (O CORAÇÃO DA SOLUÇÃO) */
#doacao-scroll {
  flex: 1 1 auto !important;
  overflow-y: auto !important;

  min-height: 0 !important;
  max-height: 100% !important;

  padding-bottom: 60px !important;

  -webkit-overflow-scrolling: touch !important;
}

/* 🔥 REMOVE QUALQUER TRAVA DE ALTURA INTERNA */
#doacao-scroll * {
  max-height: none !important;
  height: auto !important;
}

/* 🔥 GARANTE QUE O BLOCO PROBLEMÁTICO NÃO TRAVE */
#doacao-como-funciona {
  overflow: visible !important;
  height: auto !important;
}

/* DEBUG VISUAL (podes remover depois) */
#doacao-como-funciona {
  border: 2px solid red !important;
}
#doacao-screen.open { transform: translateX(0); }
#doacao-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 20px 16px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
#doacao-back {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,0.07); border: none; color: var(--text);
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
#doacao-back:hover { background: rgba(255,255,255,0.13); }
#doacao-header-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
#doacao-hero { text-align: center; padding: 36px 24px 24px; flex-shrink: 0; }
#doacao-heart { font-size: 52px; margin-bottom: 14px; animation: floatFlag 3s ease-in-out infinite; }
#doacao-hero-title { font-family: var(--font-display); font-size: 21px; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
#doacao-hero-sub   { font-size: 14px; color: var(--muted); line-height: 1.7; }
#doacao-options { padding: 0 20px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.doacao-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 18px 16px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent; min-height: 76px;
}
.doacao-card:active { transform: scale(0.98); background: var(--card2); }
.doacao-card-icon  { width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.doacao-card-info  { flex: 1; }
.doacao-card-name  { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.doacao-card-desc  { font-size: 12px; color: var(--muted); }
.doacao-card-arrow { color: var(--muted); font-size: 22px; flex-shrink: 0; line-height: 1; }
#doacao-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--muted);
  padding: 24px 20px calc(48px + var(--safe-bottom));
  flex-shrink: 0;
}

/* Como funciona */
#doacao-como-funciona { background: #1a2030; border-radius: 12px; padding: 16px; margin: 16px 16px 0; border: 1px solid rgba(255,255,255,0.1); }
#doacao-como-titulo   { font-weight: 700; color: #fff; margin: 0 0 12px 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
#doacao-como-body     { font-size: 13px; color: #7a8494; }
#doacao-como-body p   { margin: 0 0 12px 0; line-height: 1.5; }
.destaque-cyan        { color: #22d3ee; }
#doacao-steps         { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.doacao-step          { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.step-num             { color: #4ade80; font-weight: 700; flex-shrink: 0; }
.doacao-transparencia { margin-top: 12px !important; color: #4ade80 !important; font-weight: 500; }


/* ══ SHEET VALOR MULTICAIXA ══════════════════════════════════ */
#valor-overlay {
  position: fixed; inset: 0; z-index: 7500;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#valor-overlay.open { opacity: 1; pointer-events: all; }
#valor-box {
  width: 100%; max-width: 520px; background: var(--card);
  border-radius: 28px 28px 0 0; border-top: 2px solid rgba(42,157,92,0.35);
  padding: 0 22px calc(48px + var(--safe-bottom));
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#valor-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 16px auto 22px; }
#valor-title  { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin-bottom: 4px; }
#valor-sub    { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
#valor-input-wrap { position: relative; margin-bottom: 16px; }
#valor-input-prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 700; color: var(--muted); pointer-events: none; }
#valor-input {
  width: 100%; background: var(--card2); border: 2px solid var(--border);
  border-radius: 14px; padding: 16px 16px 16px 56px;
  color: var(--text); font-family: var(--font-display);
  font-size: 22px; font-weight: 700; outline: none;
  -webkit-appearance: none; transition: border-color 0.2s;
}
#valor-input:focus { border-color: rgba(42,157,92,0.5); }
#valor-input::placeholder { color: #3a4556; font-size: 18px; }
.valor-sugestoes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.valor-chip {
  padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--card2); font-family: var(--font-body); font-size: 13px; font-weight: 700;
  color: var(--muted); cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  min-height: 36px;
}
.valor-chip:hover,
.valor-chip.active { border-color: var(--green); color: var(--green); background: rgba(42,157,92,0.1); }
#btn-pagar-express {
  width: 100%; border: none; border-radius: 14px; padding: 17px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  color: white; cursor: pointer; letter-spacing: 0.2px;
  background: linear-gradient(135deg, #1d7a47, var(--green));
  box-shadow: 0 6px 24px rgba(42,157,92,0.4);
  transition: transform 0.15s, filter 0.15s, opacity 0.2s;
  min-height: 52px;
}
#btn-pagar-express:active   { transform: scale(0.98); filter: brightness(1.1); }
#btn-pagar-express:disabled { opacity: 0.5; pointer-events: none; }


/* ══ MODAL GPO (EMIS) ════════════════════════════════════════ */
#gpoOverlay {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#gpoOverlay.open { opacity: 1; pointer-events: all; }
#gpoBox {
  width: 100%; max-width: 520px; background: var(--card);
  border-radius: 28px 28px 0 0; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; max-height: 94vh; overflow: hidden;
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#gpoBoxHeader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; flex-shrink: 0; border-bottom: 1px solid var(--border);
}
#gpoBoxTitle {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--blue);
}
#gpoCloseBtn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none;
  color: var(--muted); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
#gpoCloseBtn:hover { background: rgba(255,255,255,0.15); color: var(--text); }
#gpoIframeWrap { flex: 1; position: relative; min-height: 70vh; display: flex; flex-direction: column; }
#gpoLoading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--card); }
#gpoIframe  { flex: 1; width: 100%; border: none; min-height: 500px; }


/* ══ IMG VIEWER ══════════════════════════════════════════════ */
#img-viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,0.98);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999999; opacity: 0; pointer-events: none;
  transition: opacity 0.3s; padding: 20px;
}
#img-viewer.open { opacity: 1; pointer-events: all; }
.img-viewer-close {
  position: fixed; top: calc(20px + var(--safe-top)); right: calc(20px + var(--safe-right));
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 999999991;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.img-viewer-close:hover { background: rgba(230,57,70,0.8); transform: scale(1.1); }
#img-viewer img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); z-index: 999999990;
}


/* ══ PESQUISA DESABRIGADOS ════════════════════════════════════ */
.srch-wrap {
  padding: 14px 20px 10px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.srch-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.srch-field:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(244,162,97,0.15); }
.srch-icon svg { width: 17px; height: 17px; stroke: var(--muted); flex-shrink: 0; }
.srch-input {
  flex: 1; border: none; background: transparent;
  font-size: 16px; /* iOS no-zoom */
  color: var(--text); padding: 13px 0; outline: none; min-width: 0;
}
.srch-input::placeholder { color: var(--muted); }
.srch-clear {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: none;
  background: var(--card); border-radius: 50%;
  cursor: pointer; font-size: 12px; color: var(--muted); transition: background 0.12s;
}
.srch-clear:hover   { background: var(--border); }
.srch-clear.visible { display: flex; }

/* Card moderno de desabrigados */
.desp-card-modern { transition: transform 0.2s ease, box-shadow 0.2s ease !important; }
.desp-card-modern:active { transform: scale(0.97); }


/* ══ SKELETON LOADERS ════════════════════════════════════════ */
.skeleton-card {
  height: 80px;
  background: linear-gradient(90deg, var(--card2) 25%, rgba(255,255,255,0.05) 50%, var(--card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
  margin-bottom: 12px;
}
.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, var(--card2) 25%, rgba(255,255,255,0.05) 50%, var(--card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 8px;
}
.skeleton-text.short  { width: 40%; }
.skeleton-text.medium { width: 70%; }


/* ══ LABEL ÁREAS CRÍTICAS (Google Maps) ══════════════════════ */
.area-label {
  background-color: rgba(220, 20, 60, 0.9) !important;
  padding: 5px 10px !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7) !important;
  white-space: nowrap !important;
}


/* ══ GALERIA ══════════════════════════════════════════════════ */
#galeria-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
#galeria-overlay.open { opacity: 1; pointer-events: all; }
.galeria-modal {
  width: 100%; height: 100%; background: var(--card);
  border-radius: 0; display: flex; flex-direction: column; overflow: hidden;
}
#header {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 16px;
}
.header-title     { flex: 1; text-align: center; }
.header-title h1  { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.header-title p   { font-size: 11px; color: var(--muted); }
.header-add {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(42,157,92,0.2); border: 1px solid rgba(42,157,92,0.4);
  color: var(--green); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.header-add:hover  { background: rgba(42,157,92,0.3); }
.header-add.hidden { display: none; }
.header-close {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.07); border: none; color: var(--text);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
}
.header-close:hover { background: rgba(230,57,70,0.2); }
#body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; cursor: default;
}
.galeria-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; padding: 16px;
}
.galeria-card {
  cursor: pointer; transition: transform 0.15s;
  border-radius: 12px; overflow: hidden;
  background: var(--card2); touch-action: pan-y;
}
.galeria-card:active { transform: scale(0.97); }
.galeria-card .card-img-wrap {
  width: 100%; aspect-ratio: 1; background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: pan-x pan-y;
}
.galeria-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.galeria-card .card-body         { padding: 8px 10px; }
.galeria-card .card-body strong  { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.galeria-card .card-body span    { font-size: 10px; color: var(--muted); }
.loading, .empty {
  grid-column: 1/-1; text-align: center; padding: 60px 20px;
  color: var(--muted); display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}

/* Upload sheet (galeria) */
#upload-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#upload-overlay.open { opacity: 1; pointer-events: all; }
#upload-sheet {
  width: 100%; max-width: 520px; margin: 0 auto;
  background: var(--card); border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 22px calc(48px + var(--safe-bottom));
  max-height: 90vh; display: flex; flex-direction: column;
  animation: sheetUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.sheet-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 16px auto; flex-shrink: 0; }
.sheet-title  { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin-bottom: 20px; text-align: center; }

/* Upload zone galeria (aspect-ratio 4:3) */
#upload-overlay .upload-zone {
  width: 100%; aspect-ratio: 4/3;
  border: 2px dashed var(--border); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-bottom: 16px; overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  background: var(--card2); position: relative;
}
#upload-overlay .upload-zone:hover { border-color: rgba(42,157,92,0.5); background: rgba(42,157,92,0.05); }
#upload-overlay .upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; pointer-events: none; }
.upload-placeholder span { font-size: 36px; }
#img-preview { width: 100%; height: 100%; object-fit: cover; display: none; }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 10002; background: #000;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
.lb-header {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); gap: 8px;
}
.lb-header-title { flex: 1; min-width: 0; text-align: center; }
.lb-header-title strong { font-family: var(--font-display); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-header-title small  { font-size: 10px; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.lb-btn:hover { background: rgba(255,255,255,0.25); }
.lb-counter   { font-size: 11px; color: rgba(255,255,255,0.6); text-align: center; padding: 4px; }
.lb-body      { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; padding: 0 60px; }
.lb-img       { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.lb-footer {
  flex-shrink: 0; padding: 12px 16px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 12px;
}
.lb-footer-info { flex: 1; min-width: 0; }
.lb-footer-info h3   { font-family: var(--font-display); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.lb-footer-info p    { font-size: 11px; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.lb-footer-info span { font-size: 10px; color: rgba(255,255,255,0.4); }
.lb-footer .lb-btn   { width: 36px; height: 36px; font-size: 18px; }


/* ══ POPUPS FULLSCREEN (mobile) ══════════════════════════════
   Sobrescreve as regras acima em mobile para ocupar 100% do ecrã
   (melhor experiência em ecrãs pequenos vs. bottom-sheet 75-85%)
══════════════════════════════════════════════════════════════ */
#grupos-popup,
#desp-popup,
#list-popup {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important;
  z-index: 9999 !important;
}
.grupos-sheet,
.desp-sheet,
.list-sheet {
  width: 100% !important;
  height: 100dvh !important;
  max-width: 100% !important;
  max-height: 100dvh !important;
  background: var(--card) !important;
  border-radius: 0 !important;
  padding: 0 20px calc(40px + var(--safe-bottom)) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.grupos-body,
.desp-body,
.list-body {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  transform: translateZ(0) !important;  /* força GPU layer → scroll mais suave */
  touch-action: pan-y !important;
}
.grupos-sheet > *:not(.grupos-body),
.desp-sheet  > *:not(.desp-body),
.list-sheet  > *:not(.list-body) { flex-shrink: 0 !important; }
.list-handle       { width: 40px !important; height: 4px !important; background: var(--border) !important; border-radius: 2px !important; margin: 12px auto 8px !important; }
.desp-search-wrap  { flex-shrink: 0 !important; }


/* ══ RESPONSIVIDADE ══════════════════════════════════════════ */

/* Tablets e smartphones */
@media (max-width: 768px), (max-height: 600px) {
  #top-bar {
    padding: calc(10px + var(--safe-top)) 12px 10px !important;
    flex-wrap: wrap !important;
    gap: 12px 16px !important;
    justify-content: space-between !important;
  }
  .top-logo img { height: 40px !important; max-height: 40px !important; }
  .top-pills    { gap: 6px !important; justify-content: flex-end !important; flex-wrap: wrap !important; width: auto !important; }
  .pill         { padding: 5px 10px !important; font-size: 11px !important; border-radius: 16px !important; }
  .pill .pill-label { display: none !important; }  /* Oculta label em ecrãs pequenos */
  .pill .dot    { width: 5px !important; height: 5px !important; }

  #top-meta {
    position: absolute !important;
    top: 98px !important;
    left: 0 !important; right: 0 !important;
    padding: 0 12px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
  }
  .meta-pill { padding: 6px 12px !important; border-radius: 18px !important; justify-content: flex-start !important; }
  .meta-icon { width: 20px !important; height: 20px !important; }
  .meta-pill span:not(.meta-label):not(.meta-icon) { font-size: 12px !important; }
  .meta-pill .meta-label { font-size: 9px !important; }

  #ticker-bar  { width: 100% !important; margin-top: 4px !important; margin-left: 0 !important; }
  #ticker-item { font-size: 10px !important; padding: 4px 10px !important; }
}

/* Smartphones muito pequenos */
@media (max-width: 400px) {
  .pill { padding: 4px 6px !important; font-size: 9px !important; }
  .meta-pill { padding: 4px 8px !important; }
  .top-logo img { height: 30px !important; max-height: 34px !important; }
  .role-cards { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .role-card .label { font-size: 9px; }
}

/* Landscape com ecrã pequeno */
@media (max-height: 500px) and (orientation: landscape) {
  #top-bar  { flex-direction: row !important; padding: calc(8px + var(--safe-top)) 12px 8px !important; }
  #top-meta { top: 44px !important; padding: 0 12px !important; }
  .top-pills { gap: 4px !important; }
}

/* Tablets/Desktop — sheets em largura limitada + lightbox centrado */
@media (min-width: 601px) {
   
  #lightbox { align-items: center; justify-content: center; padding: 60px; }
  .lb-header, .lb-footer { display: none; }
  .lb-body   { padding: 0 60px; }
  .lb-img    { max-height: calc(100vh - 120px); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
  .lb-btn, .lb-counter { display: none; }
  #galeria-overlay { align-items: center; justify-content: center; }
  .galeria-modal   { max-width: 800px; max-height: 90vh; border-radius: 20px; }
}

/* Fix específico Safari/iOS — backdrop-filter */
@supports (-webkit-touch-callout: none) {
  .pill, .meta-pill, #ticker-item {
    -webkit-backdrop-filter: blur(16px) !important;
  }
}


@keyframes spin {
  0% { transform: rotate(0deg) !important; }
  100% { transform: rotate(360deg) !important; }
}

/* Garante que o ícone de play fique acima do vídeo quando carregado */
.card-play-icon {
  z-index: 2 !important;
}

  /* ── FAB Quero Doar ── */
      #fab-quero-doar {
        position: fixed;
        bottom: 220px;
        right: 16px;
        z-index: 1100;
        gap: 8px;
        background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
      width: 50px; height: 50px;
      border-radius: 16px;
      box-shadow: 0 4px 20px rgba(42, 157, 92, 0.55);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      flex-direction: column !important;
      justify-content: center;
      font-size: 10px;
      color: white;
      transition: transform 0.2s, box-shadow 0.2s;
      animation: doarePulse 2.5s ease-in-out infinite;
      padding: 2px !important;
      }
      #fab-quero-doar:hover, #fab-quero-doar:focus-visible {
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 8px 28px rgba(230,57,70,0.55);
        outline: none;
      }
      #fab-quero-doar:active { transform: scale(.97); }
      #fab-quero-doar .bi-heart-fill { font-size: 18px; animation: heartbeat 1.5s ease-in-out infinite; }
      .fab-quero-doar-label { line-height: 0.1; margin-top:-4px !important;}
      @keyframes heartbeat {
        0%,100% { transform: scale(1); }
        14%      { transform: scale(1.2); }
        28%      { transform: scale(1); }
        42%      { transform: scale(1.15); }
        56%      { transform: scale(1); }
      }

      /* ── Modal Quero Doar ── */
      #modal-quero-doar {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.65);
        z-index: 9000;
        align-items: flex-end;
        justify-content: center;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
      }
      #modal-quero-doar.open { display: flex; animation: mqd-fade-in .25s ease; }
      @keyframes mqd-fade-in { from { opacity:0 } to { opacity:1 } }

      .mqd-sheet {
        background: #13181f;
        border-radius: 24px 24px 0 0;
        padding: 28px 24px 40px;
        width: 100%;
        max-width: 480px;
        position: relative;
        animation: mqd-slide-up .3s cubic-bezier(.32,1.2,.42,1);
        border-top: 1px solid rgba(255,255,255,.08);
        text-align: center;
      }
      @keyframes mqd-slide-up { from { transform: translateY(60px); opacity:0 } to { transform: translateY(0); opacity:1 } }

      .mqd-handle {
        width: 40px; height: 4px;
        background: rgba(255,255,255,.18);
        border-radius: 2px;
        margin: 0 auto 24px;
      }
      .mqd-close {
        position: absolute;
        top: 16px; right: 18px;
        background: rgba(255,255,255,.1);
        border: none;
        color: #fff;
        width: 30px; height: 30px;
        border-radius: 50%;
        font-size: 14px;
        cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: background .15s;
      }
      .mqd-close:hover { background: rgba(255,255,255,.2); }

      .mqd-icon {
        font-size: 48px;
        color: #e63946;
        margin-bottom: 12px;
        animation: heartbeat 1.5s ease-in-out infinite;
      }
      .mqd-title {
        font-family: var(--font-display, 'Unbounded', sans-serif);
        font-size: 20px;
        font-weight: 900;
        color: #fff;
        margin: 0 0 8px;
      }
      .mqd-sub {
        color: rgba(255,255,255,.6);
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 28px;
      }
      .mqd-btns {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .mqd-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px;
        border-radius: 16px;
        font-size: 16px;
        font-weight: 700;
        font-family: var(--font-body, 'DM Sans', sans-serif);
        text-decoration: none;
        transition: transform .15s, box-shadow .15s, filter .15s;
        letter-spacing: .2px;
      }
      .mqd-btn:hover { transform: scale(1.03); filter: brightness(1.1); }
      .mqd-btn:active { transform: scale(.97); }
      .mqd-btn-whatsapp {
        background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
        color: #fff;
        box-shadow: 0 4px 16px rgba(37,211,102,.35);
      }
      .mqd-btn-ligar {
        background: linear-gradient(135deg, #3a86ff 0%, #1d4ed8 100%);
        color: #fff;
        box-shadow: 0 4px 16px rgba(58,134,255,.35);
      }
