/* =============================================
   BBHM MAP — Styles
   ============================================= */

:root {
  --brand: #2f6e75;
  --brand-light: #e8f4f5;
  --brand-dark: #1e4d52;
  --accent: #f4a533;
  --bg: #f0f4f3;
  --card: #ffffff;
  --ink: #1a2a2c;
  --muted: #6b7c7e;
  --border: #e2eaeb;
  --radius: 20px;
  --sheet-radius: 24px;
  --tab-h: 68px;
  --header-h: 56px;
  --font: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--brand);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 16px;
  position: relative;
}

.logo {
  height: 36px;
  display: block;
}

.auth-btn {
  position: absolute;
  right: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.auth-btn:hover { background: rgba(255,255,255,.28); }

/* =============================================
   MAIN LAYOUT
   ============================================= */
.main {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--tab-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =============================================
   SEARCH
   ============================================= */
.search-wrap {
  padding: 12px 14px 8px;
  background: var(--bg);
  flex-shrink: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 999px;
  border: 1.5px solid var(--border);
  padding: 10px 14px;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.search-icon { font-size: 16px; flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}

.search-bar input::placeholder { color: var(--muted); }

/* =============================================
   MAP
   ============================================= */
.map-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
}

.map-type-toggle {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  flex-shrink: 0;
}

.map-type-toggle button {
  border: none;
  background: transparent;
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.map-type-toggle button.active {
  background: var(--brand);
  color: #fff;
}

/* Toggle no mapa principal — posição absoluta */
#mapTypeToggle {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
}

.locate-btn {
  position: absolute;
  bottom: 16px; right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--brand);
  z-index: 5;
  transition: transform .15s;
}
.locate-btn:active { transform: scale(.94); }

/* Pick mode */
.pick-ui {
  position: absolute;
  inset: 10px;
  z-index: 10;
  pointer-events: none; /* deixa clicar no mapa */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Cada filho precisa de pointer-events para ser clicável */
.pick-ui > * { pointer-events: auto; }

.pick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  border: 1.5px solid var(--border);
}

.pick-search-icon { font-size: 15px; flex-shrink: 0; }

.pick-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}

.pick-search input::placeholder { color: var(--muted); }

/* Toggle no topo direito, dentro do pick-ui */
.pick-map-toggle {
  position: absolute;
  top: 60px;
  right: 0;
}

.pick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.pick-hint-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  margin-right: 8px;
}

.pick-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pick-cancel,
.pick-confirm {
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  min-width: 90px;
  text-align: center;
}

.pick-cancel {
  background: var(--bg);
  color: var(--muted);
}

.pick-confirm {
  background: var(--brand);
  color: #fff !important;
  opacity: .4;
}

.pick-confirm:not(:disabled) {
  opacity: 1;
}

.pick-confirm:disabled {
  pointer-events: none;
}



/* =============================================
   BOTTOM SHEET
   ============================================= */
.sheet {
  background: var(--card);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.1);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 130px;
  transition: height .35s cubic-bezier(.32,.72,0,1);
  will-change: height;
}

.sheet-handle-wrap {
  padding: 12px 0 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
  /* área de toque grande */
  min-height: 32px;
}

.sheet-handle {
  width: 40px; height: 5px;
  background: #cbd5d6;
  border-radius: 999px;
  pointer-events: none;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 6px;
  flex-shrink: 0;
  user-select: none;
}

.sheet-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.sheet-count {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.sheet-list {
  overflow-y: auto;
  padding: 0 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
}

.loading-state {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* Place card */
.place-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border: 1.5px solid transparent;
}

.place-card:active { transform: scale(.98); }
.place-card:hover { border-color: var(--brand-light); box-shadow: 0 2px 12px rgba(47,110,117,.1); }

.unsave-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .2s, transform .15s;
}
.unsave-btn:hover { opacity: 1; transform: scale(1.15); }

.place-card-thumb {
  width: 60px; height: 60px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.place-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.place-card-body { flex: 1; min-width: 0; }

.place-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-card-cat,
.place-card-meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.place-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.place-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* =============================================
   TABBAR
   ============================================= */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 14px;
  transition: color .2s;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  flex: 1;
}

.tab.active { color: var(--brand); }

.tab-plus {
  width: 52px; height: 52px;
  border-radius: 50% !important;
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(47,110,117,.4);
  flex: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   MODALS
   ============================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
}

.modal.hidden { display: none; }

.modal-sheet {
  background: var(--card);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  animation: slideUp .25s ease-out;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 8px;
  flex-shrink: 0;
  background: var(--card);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
}

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin-bottom: 8px;
}

.modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.modal-close-inline {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}

.modal-body {
  padding: 8px 16px 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Prevent iOS zoom on all inputs/selects/textareas */
input, select, textarea {
  font-size: 16px !important;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  padding-top: 8px;
}

.modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Modal card (contactos) */
.modal-card {
  background: var(--card);
  border-radius: var(--sheet-radius);
  width: min(92vw, 420px);
  margin: auto;
  padding: 24px;
  position: relative;
  animation: popIn .2s ease-out;
}

.modal-card .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
}

@keyframes popIn {
  from { transform: scale(.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* =============================================
   DETAIL MODAL
   ============================================= */
.detail-body {
  padding: 0 0 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.detail-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 0;
  scrollbar-width: none;
  width: 100%;
  box-sizing: border-box;
}
.detail-photos::-webkit-scrollbar { display: none; }

.detail-photo {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.detail-no-photo {
  width: 100%;
  height: 140px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.detail-body > .detail-cat-badge,
.detail-body > h2,
.detail-body > .detail-meta,
.detail-body > p,
.detail-body > .detail-chars,
.detail-body > .detail-actions,
.detail-body > .detail-section {
  padding-left: 16px;
  padding-right: 16px;
}

.detail-cat-badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 12px 0 8px 16px;
}

.detail-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}

.detail-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 14px;
}

.detail-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.char-chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.char-chip.yes { background: #e8f5e9; border-color: #c8e6c9; color: #2e7d32; }
.char-chip.no  { background: #fce4ec; border-color: #f8bbd0; color: #c62828; }

.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-directions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 13px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
}

.btn-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--bg);
  color: var(--brand);
  border: 1.5px solid var(--brand);
  padding: 13px 18px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.detail-address {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
  padding-left: 16px;
  padding-right: 16px;
}

.detail-link-wrap {
  padding: 0 16px 16px;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.detail-photo-add {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg);
  transition: border-color .2s, color .2s, background .2s;
}

.detail-photo-add:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.detail-add-label {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  color: inherit;
}

.photo-confirm-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.photo-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.photo-save-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.photo-cancel-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
}

/* Secções (rating + comentários) */
.detail-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

/* Rating */
.rating-display {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.stars-input {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.stars-input .star {
  font-size: 32px;
  color: #ddd;
  cursor: pointer;
  transition: color .15s, transform .15s;
  line-height: 1;
}

.stars-input .star.active { color: #f4a533; }
.stars-input .star:hover  { transform: scale(1.15); }

.rating-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}

/* Comentários */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
}

.comment-author {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 3px;
}

.comment-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.comment-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.comment-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form input,
.comment-form textarea {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  outline: none;
  resize: none;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--brand); }

.btn-comment {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* =============================================
   ADD FORM
   ============================================= */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--brand); }

.cat-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-opt {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.cat-opt.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chars-wrap { margin-bottom: 18px; }

.chars-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--ink);
}

.chars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.char-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.char-row label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 0;
}

.char-row select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 13px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}

.btn-pick {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1.5px dashed var(--brand);
  background: var(--brand-light);
  color: var(--brand);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s;
}
.btn-pick:hover { background: #d5e9eb; }

.pick-confirm {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #2e7d32;
}

/* Photo slots */
.photo-slots {
  display: flex;
  gap: 8px;
}

.slot {
  width: 80px; height: 80px;
  border-radius: 12px;
  border: 1.5px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  background: var(--bg);
  transition: border-color .2s;
  overflow: hidden;
  position: relative;
}

.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot img { width: 100%; height: 100%; object-fit: cover; }

.btn-submit {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(47,110,117,.35);
  transition: transform .15s;
  margin-top: 4px;
}
.btn-submit:active { transform: scale(.98); }

/* =============================================
   CONTACTS
   ============================================= */
.contacts-logo {
  display: block;
  max-width: 180px;
  margin: 0 auto 16px;
}

.modal-card h2 {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.contact-list li:last-child { border-bottom: none; }
.contact-list a { color: var(--brand); text-decoration: none; font-weight: 700; }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.hidden { display: none; }

.lb-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.9);
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 24px;
  padding: 8px 14px;
  z-index: 2;
}

.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* =============================================
   MAP MARKERS (custom)
   ============================================= */
.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
  border: 2.5px solid #fff;
  cursor: pointer;
  transition: transform .15s;
}
.map-pin:hover { transform: scale(1.15); }

/* =============================================
   WELCOME SCREEN
   ============================================= */
.welcome-screen {
  position: fixed;
  inset: 0;
  background: var(--brand);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity .35s, transform .35s;
}

.welcome-screen.hiding {
  opacity: 0;
  transform: scale(.96);
  pointer-events: none;
}

.welcome-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.welcome-logo {
  height: 56px;
  margin-bottom: 20px;
}

.welcome-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}

.welcome-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.welcome-btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(47,110,117,.35);
}

.welcome-skip {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
}

.dir-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  flex-shrink: 0;
}
.dir-filters::-webkit-scrollbar { display: none; }

.dir-filters .filter-chip {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}

.dir-filters .filter-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.dir-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  z-index: 9999;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* =============================================
   AUTH / PERFIL
   ============================================= */
.auth-btn {
  position: absolute;
  right: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.auth-btn:hover { background: rgba(255,255,255,.28); }

.auth-btn.logged-in {
  background: transparent;
  border: none;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.auth-btn.logged-in img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.profile-email {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg);
  border-radius: 14px;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat-n {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
}

.profile-stat-l {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.profile-places-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-logout {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: #fce4ec;
  color: #c62828;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* Selo de verificação */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

/* Botão editar no detalhe */
.btn-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg);
  color: var(--muted);
  border: 1.5px solid var(--border);
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  width: 100%;
}

.btn-delete {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: none;
  color: #c62828;
  border: 1.5px solid #f8bbd0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
}

/* Badge Novo */
.new-badge {
  display: inline-block;
  background: #f4a533;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

.card-new {
  background: #edf4f4;
}
