:root {
  --primary: #1da1c2;
  --primary-dark: #15728a;
  --secundary: #edb94b;
  --text-color: #506670;
  --yellow-50: #fdf8ed;
  --yellow-100: #f9e9c7;
  --bg: #fffdfa;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  color: var(--text-color);
  background: var(--bg);
}

.text-plamev { color: var(--primary) !important; }
.text-muted-plamev { color: var(--text-color); }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--bg);
}
@media (min-width: 1025px) {
  .hero {
    background-image: url("../img/bgCredentialNetwork.svg");
    background-size: cover;
    background-position: center 58%;
  }
}
.hero-title {
  font-family: "Grandstander", "Poppins", Arial, sans-serif;
  font-weight: 900;
  color: var(--primary);
  font-size: 40px;
  line-height: 1.15;
  max-width: 640px;
  margin-top: 1.5rem;
}
.hero-title span { color: var(--secundary); }
@media (min-width: 992px) { .hero-title { font-size: 56px; } }

.search-box {
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 64px;
  padding: 0 1rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  color: var(--text-color);
  text-align: left;
  cursor: pointer;
}
.search-box i { font-size: 1.4rem; color: var(--text-color); }
.search-box input {
  border: 0; outline: 0; width: 100%; height: 100%; background: transparent; color: inherit;
}
.search-box:focus-within, button.search-box:focus-visible {
  border-color: var(--secundary);
  box-shadow: 0 0 0 .2rem rgba(237, 185, 75, .25);
}

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  height: 31px; padding: 0 .75rem;
  border: 1px solid #e5e7eb; border-radius: 999px;
  font-size: 11px; background: #fff;
}
.chip-label { background: transparent; }
.chip-active { background: var(--yellow-50); border-color: var(--yellow-50); }
.chip-active:hover { background: var(--yellow-100); border-color: #f5d9a0; }
.chip-active button { border: 0; background: none; padding: 0; line-height: 1; color: var(--text-color); }

.btn-map { height: 40px; font-size: .875rem; border: 1px solid #e5e7eb; }

/* ---------- Botões ---------- */
.btn-plamev { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-plamev:hover, .btn-plamev:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-plamev { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.btn-outline-plamev:hover { background: var(--primary); color: #fff; }

/* ---------- Layout lista + mapa ---------- */
.layout { display: flex; flex-direction: column; gap: 1.5rem; }
.layout.com-mapa .lista-wrap { max-height: 420px; overflow-y: auto; }
.layout.com-mapa #lista > * { width: 100%; }
.mapa-wrap { height: 360px; border-radius: 1rem; overflow: hidden; border: 1px solid #e5e7eb; position: relative; z-index: 0; }
#mapa { width: 100%; height: 100%; }
@media (min-width: 992px) {
  .layout.com-mapa { flex-direction: row; }
  .layout.com-mapa .lista-wrap { width: 420px; flex: 0 0 420px; max-height: 720px; }
  .layout.com-mapa .mapa-wrap { flex: 1; height: 720px; position: sticky; top: calc(var(--site-header-h, 0px) + 1rem); }
}
.lista-wrap::-webkit-scrollbar { width: 6px; }
.lista-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ---------- Card ---------- */
.card-clinica {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  padding: 1rem;
  height: 100%;
  display: flex; flex-direction: column;
  transition: box-shadow .3s, border-color .3s;
}
.card-clinica.ativo {
  border-color: #4ab4ce;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .35), 0 8px 24px rgba(56, 189, 248, .25);
}
.badge-novo { background: var(--primary); color: #fff; font-size: 10px; font-weight: 600; border-radius: 999px; padding: .35rem .75rem; }
.badge-cat { background: #fdf2f8; color: #9d174d; font-size: 10px; font-weight: 600; border-radius: 999px; padding: .35rem .75rem; }
.nota { font-size: .9rem; }
.nota i { color: #f5b301; }

.logo-clinica { height: 80px; display: flex; align-items: center; margin-bottom: 1rem; }
.logo-clinica img { max-height: 80px; max-width: 100%; object-fit: contain; }
.logo-fallback {
  height: 72px; width: 72px; border-radius: 1rem;
  display: grid; place-items: center;
  background: #e8f6f9; color: var(--primary);
  font-family: "Grandstander", sans-serif; font-weight: 900; font-size: 1.6rem;
}
.nome-clinica { font-size: 1.25rem; font-weight: 600; color: var(--primary); margin-bottom: .75rem; overflow-wrap: anywhere; }
.endereco { font-weight: 700; overflow-wrap: anywhere; }
.fone a { color: var(--text-color); font-weight: 700; text-decoration: none; }
.fone .bi-whatsapp { color: #22c55e; font-size: 1.3rem; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.status-dot.aberto { background: #22c55e; }
.pill { background: #e5e7eb; border-radius: 999px; padding: .2rem .55rem; font-size: 12px; white-space: nowrap; }

.ver-mais {
  border: 0; border-top: 1px dashed #d1d5db; background: none;
  width: 100%; margin-top: auto; padding-top: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--primary); font-weight: 600; font-size: .875rem;
}
.ver-mais i { transition: transform .3s; }
.ver-mais[aria-expanded="true"] i { transform: rotate(180deg); }
.detalhes { font-size: .875rem; }
.detalhes ul { padding-left: 1.1rem; margin-bottom: .75rem; }
.descricao { white-space: pre-line; }

.empty { text-align: center; padding: 3rem 1rem; }
.empty > i { font-size: 2.5rem; color: var(--secundary); }

/* ---------- Modal / Tom Select ---------- */
.modal-content { border-radius: 30px; padding: 1rem; }
.modal-title { color: var(--primary); font-weight: 600; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.ts-wrapper.single .ts-control { min-height: 48px; display: flex; align-items: center; }
.ts-wrapper.focus .ts-control { border-color: var(--secundary); box-shadow: 0 0 0 .2rem rgba(237, 185, 75, .25); }
.ts-dropdown .active { background: #e8f6f9; color: inherit; }

/* ---------- Mapa ---------- */
.pin-plamev {
  width: 100%; height: 100%; border-radius: 50% 50% 50% 0;
  background: var(--primary); border: 3px solid #fff;
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.3);
  display: grid; place-items: center;
}
.pin-plamev span {
  transform: rotate(45deg); color: #fff; line-height: 1;
  font-family: "Grandstander", "Poppins", sans-serif; font-weight: 900; font-size: 15px;
}
.pin-plamev.sel { background: var(--secundary); }
.leaflet-control-layers { font-family: "Poppins", Arial, sans-serif; font-size: 13px; border-radius: .5rem !important; }
.leaflet-popup-content { font-family: "Poppins", Arial, sans-serif; font-size: 13px; }
