/* =====================================================================
   Defesa Civil — Panorama Municipal / Prefeitura de Paulo Afonso
   Complementa servicos.css: mesma fonte, paleta e cartões de Chamados,
   Obras e Serviços. Aqui fica só o que é próprio do módulo (mapa, camadas).
   ===================================================================== */

:root {
  --dc-r0: #909090; --dc-r1: #24a148; --dc-r2: #f2d33b; --dc-r3: #f47b2b; --dc-r4: #d32f2f;
}

body.dc-auth-pending .svc-app { visibility: hidden; }
.svc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--pa-dark-blue); outline-offset: 2px; }

/* ── cabeçalho ── */
.dc-back {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--svc-line); background: #fff; color: var(--svc-ink-2);
}
.dc-back:hover { background: var(--svc-blue-50); color: var(--pa-dark-blue); border-color: var(--svc-blue-100); }
.dc-back svg, .dc-shield svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-shield { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--pa-dark-blue); color: #fff; }
.dc-shield svg { width: 21px; height: 21px; }
.ob-updated { font-size: .72rem; color: var(--svc-muted); font-weight: 600; white-space: nowrap; }
.ob-updated.is-error { color: var(--svc-bad); }
.svc-main { padding-bottom: 24px; }

/* ── layout do mapa ── */
.dc-map-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; height: calc(100vh - 118px); min-height: 520px; }
.dc-side { display: flex; flex-direction: column; min-height: 0; }
.dc-side-scroll { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dc-panes { margin-bottom: 0; flex: 0 0 auto; }
.dc-panes button { flex: 1; justify-content: center; padding: 9px 8px; }
[data-pane-body] { display: flex; flex-direction: column; gap: 10px; }
[data-pane-body][hidden] { display: none; }
.dc-side-head { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.dc-side-head h3 { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pa-medium-blue); }
.dc-side-head .hint { font-size: .74rem; color: var(--svc-muted); font-weight: 600; }
.dc-side-head .svc-link { font-size: .76rem; }

.dc-search { position: relative; display: block; }
.dc-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--svc-soft); stroke-width: 2; }
.dc-search input {
  width: 100%; height: 38px; padding: 0 11px 0 34px; border: 1px solid #d5e0ee; border-radius: var(--svc-radius-sm);
  font: inherit; font-size: .85rem; color: var(--svc-ink-2); background: #fff; outline: none;
}
.dc-search input:focus, .dc-filter-block .svc-input:focus { border-color: var(--pa-medium-blue); box-shadow: 0 0 0 3px rgba(37, 99, 184, .14); }

/* grupos e linhas de camada */
.dc-layer-group { border: 1px solid var(--svc-line); border-radius: 12px; background: #fff; overflow: hidden; }
.dc-layer-group + .dc-layer-group { margin-top: 8px; }
.dc-layer-group > header { padding: 7px 12px; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--svc-muted); background: var(--svc-gray-bg); }
.dc-layer { display: grid; grid-template-columns: 26px 1fr auto 34px; align-items: center; gap: 9px; padding: 6px 12px; cursor: pointer; border-top: 1px solid var(--svc-line-2); }
.dc-layer:first-of-type { border-top: 0; }
.dc-layer:hover { background: var(--svc-hover); }
.dc-layer input { position: absolute; opacity: 0; pointer-events: none; }
.dc-layer-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.dc-layer-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-layer strong { font-size: .84rem; font-weight: 600; color: var(--svc-ink); min-width: 0; }
.dc-layer strong small { display: block; font-size: .7rem; font-weight: 500; color: var(--svc-muted); }
.dc-layer em { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--svc-muted); font-variant-numeric: tabular-nums; }
.dc-switch { width: 34px; height: 20px; border-radius: 99px; background: #cfd6df; position: relative; transition: background .15s; }
.dc-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.dc-layer input:checked ~ .dc-switch { background: var(--pa-dark-blue); }
.dc-layer input:checked ~ .dc-switch::after { transform: translateX(14px); }
.dc-layer input:focus-visible ~ .dc-switch { outline: 2px solid var(--pa-dark-blue); outline-offset: 2px; }
.dc-layer.is-off strong, .dc-layer.is-off em { color: var(--svc-soft); }
.dc-layer.is-empty { cursor: default; }
.dc-layer.is-empty .dc-switch { opacity: .4; }

/* filtros */
.dc-filter-block { display: flex; flex-direction: column; gap: 6px; }
.dc-filter-label { font-size: .72rem; font-weight: 600; color: var(--svc-ink-2); margin-top: 4px; }
.dc-filter-block .svc-input { width: 100%; height: 36px; border: 1px solid #d5e0ee; border-radius: var(--svc-radius-sm); padding: 0 10px; font: inherit; font-size: .84rem; background: #fff; color: var(--svc-ink-2); outline: none; }
.dc-period { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--svc-line); background: #fff; font-size: .76rem; font-weight: 600; color: var(--svc-ink-2);
}
.dc-chip[aria-pressed="false"] { opacity: .5; }
.dc-chip:hover { border-color: #c9d8ec; }

/* forma + cor: o nível nunca depende só da cor */
.dc-shape { width: 14px; height: 14px; flex: 0 0 auto; display: inline-block; background: var(--c); border: 1.5px solid rgba(23, 32, 44, .55); }
.dc-shape.s-circulo { border-radius: 50%; }
.dc-shape.s-quadrado { border-radius: 2px; }
.dc-shape.s-triangulo { clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.dc-shape.s-losango { transform: rotate(45deg) scale(.82); border-radius: 1px; }
.dc-nivel { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .76rem; color: var(--svc-ink); white-space: nowrap; }

/* lista lateral */
.dc-list { display: flex; flex-direction: column; gap: 6px; }
.dc-item {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; align-items: center; text-align: left; width: 100%;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--svc-line); background: #fff; cursor: pointer;
}
.dc-item:hover { border-color: #c9d8ec; background: #f8fbff; }
.dc-item.is-active { border-color: var(--pa-dark-blue); box-shadow: 0 0 0 2px var(--svc-blue-50); }
.dc-item b { font-size: .84rem; color: var(--svc-ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-item small { grid-column: 2; font-size: .72rem; color: var(--svc-muted); }
.dc-item .dc-layer-ico { width: 22px; height: 22px; border-radius: 7px; }
.dc-item .dc-layer-ico svg { width: 13px; height: 13px; }
.dc-empty { padding: 18px 10px; text-align: center; font-size: .82rem; color: var(--svc-muted); }

/* cartão do mapa */
.dc-map-card { position: relative; min-height: 0; }
.dc-map { position: absolute; inset: 0; background: #e8e6e1; }
.dc-map .ol-viewport { border-radius: var(--svc-radius); }
.dc-map-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.dc-group { pointer-events: auto; display: inline-flex; gap: 3px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .96); border: 1px solid var(--svc-line); box-shadow: 0 4px 14px rgba(15, 42, 77, .12); }
.dc-group button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; cursor: pointer;
  padding: 7px 11px; border-radius: 9px; font-size: .8rem; font-weight: 500; color: #3c587e; white-space: nowrap;
}
.dc-group button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-group button:hover { background: var(--svc-blue-50); color: var(--pa-dark-blue); }
.dc-group button.is-active { background: var(--pa-dark-blue); color: #fff; }
.dc-group.is-round { border-radius: 99px; }
.dc-group.is-round button.ico { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }



.dc-legend { position: absolute; right: 12px; bottom: 44px; max-width: 250px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .97); border: 1px solid var(--svc-line); box-shadow: 0 4px 14px rgba(15, 42, 77, .12); font-size: .76rem; }
.dc-legend h4 { margin: 0 0 6px; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--svc-muted); }
.dc-legend h4:not(:first-child) { margin-top: 9px; }
.dc-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dc-legend li { display: flex; align-items: center; gap: 7px; color: var(--svc-ink-2); font-weight: 600; }
.dc-legend .ln { width: 18px; height: 0; border-top: 3px solid var(--c); flex: 0 0 auto; }
.dc-legend .ln.dash { border-top-style: dashed; }
.dc-legend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(23, 32, 44, .25); flex: 0 0 auto; }
.dc-legend .box { width: 14px; height: 12px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); flex: 0 0 auto; border-radius: 2px; }

.dc-caption { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: .68rem; color: var(--svc-ink-2); pointer-events: none; }
.dc-caption span { background: rgba(255, 255, 255, .85); padding: 2px 6px; border-radius: 6px; }

/* cartão do registro selecionado (popup do mapa) */
.dc-popup { position: relative; width: 290px; padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--svc-line); box-shadow: var(--svc-shadow-lg); font-size: .82rem; }
.dc-popup::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: #fff; border-right: 1px solid var(--svc-line); border-bottom: 1px solid var(--svc-line); transform: translateX(-50%) rotate(45deg); }
.dc-popup-type { display: flex; align-items: center; gap: 7px; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--svc-muted); margin-bottom: 5px; padding-right: 26px; }
.dc-popup h4 { margin: 0 0 4px; font-size: .95rem; color: var(--svc-ink); }
.dc-popup dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.dc-popup dt { color: var(--svc-muted); font-size: .72rem; font-weight: 600; }
.dc-popup dd { margin: 0; color: var(--svc-ink-2); font-weight: 600; overflow-wrap: anywhere; }
.dc-popup-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.dc-popup-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--svc-muted); display: grid; place-items: center; }
.dc-popup-close:hover { background: var(--svc-gray-bg); }
.dc-popup-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.dc-popup-source { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--svc-line-2); font-size: .7rem; color: var(--svc-muted); }

/* ── painel ── */
[data-view] .svc-grid-2b > .svc-card { min-height: 0; }
.ob-updated:empty { display: none; }
.dc-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bg-gradient-danger { background: linear-gradient(135deg, #9d2020, #d9534f); }
.bg-gradient-orange { background: linear-gradient(135deg, #b4380f, var(--pa-orange)); }
.bg-gradient-violet { background: linear-gradient(135deg, #4c2a8f, #7c5cd6); }
.dc-bars { display: flex; flex-direction: column; gap: 8px; }
.dc-bar { display: grid; grid-template-columns: minmax(96px, 170px) 1fr 44px; align-items: center; gap: 12px; font-size: .82rem; }
.dc-bar-label { display: flex; align-items: center; gap: 7px; color: var(--svc-ink-2); font-weight: 600; min-width: 0; }
.dc-bar-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-bar-track { height: 12px; border-radius: 99px; background: var(--svc-line-2); overflow: hidden; }
.dc-bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--pa-dark-blue)); min-width: 3px; transition: width .4s ease; }
.dc-bar b { text-align: right; font-variant-numeric: tabular-nums; color: var(--svc-ink); }
.dc-source { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--svc-line-2); font-size: .7rem; color: var(--svc-muted); }
.dc-bairro-ficha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }

/* ── tabelas e formulário ── */
.dc-table-note { font-size: .76rem; color: var(--svc-muted); margin: 8px 2px 0; }
.badge-rascunho { background: var(--svc-gray-bg); color: var(--svc-muted); }
.badge-enviado { background: #fef7da; color: #a16207; }
.badge-aprovado { background: #e6effc; color: var(--pa-dark-blue); }
.badge-publicado { background: var(--svc-ok-bg); color: var(--svc-ok); }
.badge-rejeitado { background: var(--svc-bad-bg); color: var(--svc-bad); }
.dc-geom-box { grid-column: span 2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--svc-gray-bg); font-size: .82rem; color: var(--svc-ink-2); }
.dc-geom-box b { color: var(--svc-ink); }
.dc-nivel-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dc-nivel-pick label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: 1px solid #d5e0ee; border-radius: var(--svc-radius-sm); cursor: pointer; font-size: .8rem; font-weight: 600; background: #fff; }
.dc-nivel-pick input { position: absolute; opacity: 0; }
.dc-nivel-pick label:has(input:checked) { border-color: var(--pa-dark-blue); box-shadow: 0 0 0 2px var(--svc-blue-50); background: var(--svc-blue-50); }
.dc-nivel-pick label:has(input:focus-visible) { outline: 2px solid var(--pa-dark-blue); outline-offset: 2px; }

@media (max-width: 1280px) { .dc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dc-map-layout { height: calc(100vh - 168px); } }
@media (max-width: 980px) {
  .dc-map-layout { grid-template-columns: 1fr; height: auto; }
  .dc-map-card { height: 68vh; min-height: 420px; order: -1; }
  .dc-side-scroll { max-height: none; }
  .dc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-bairro-ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-header-title .svc-eyebrow, .ob-updated { display: none; }
  .dc-legend { display: none; }
}
@media print {
  html.dc-view-mapa, body.dc-view-mapa { height: auto; overflow: visible; display: block; }
  .dc-map3d:not([hidden]) ~ .dc-legend { display: block !important; }
  .brand-bar, .svc-header, .svc-banner, .dc-side, .dc-map-bar, .svc-toasts { display: none !important; }
  .svc-main { padding: 0; }
  .dc-map-layout { display: block; height: auto; }
  .dc-map-card { height: 94vh; border: 0; }
  .dc-legend { display: block !important; }
}

/* celular: nada pode alargar a página */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .svc-header { padding: 8px 12px; gap: 8px; }
  .svc-header-tools { gap: 6px; }
  .svc-header-tools #dcNovaArea span, .svc-perfil { display: none; }
  .svc-header-tools #dcNovaArea { padding: 0 11px; }
  .svc-main { padding: 12px 12px 24px; }
  .svc-banner { margin: 10px 12px 0; }
  .dc-map-bar { flex-direction: column; align-items: flex-start; }
  .dc-group button { padding: 7px 9px; }
  .dc-popup { width: min(290px, 78vw); }
  .svc-form { grid-template-columns: 1fr; }
  .svc-form .span-2, .svc-form-section, .dc-geom-box, .svc-note { grid-column: auto; }
  .dc-nivel-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── página do mapa: fixa, sem rolagem; mapa e painel de borda a borda ── */
html.dc-view-mapa { height: 100%; overflow: hidden; }
body.dc-view-mapa { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.dc-view-mapa .svc-app { flex: 1 1 auto; min-height: 0; height: auto; }
body.dc-view-mapa .svc-main { flex: 1 1 auto; min-height: 0; padding: 0; display: flex; flex-direction: column; }
body.dc-view-mapa .svc-main > section[data-view="mapa"] { flex: 1 1 auto; min-height: 0; }
body.dc-view-mapa .svc-banner { margin: 0; border-radius: 0; border-width: 0 0 1px; }
.dc-map-layout { height: 100%; min-height: 0; gap: 0; grid-template-columns: 340px minmax(0, 1fr); }
.dc-side { border: 0; border-right: 1px solid var(--svc-line); border-radius: 0; background: var(--svc-surface); box-shadow: none; overflow: hidden; }
.dc-map-card { border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: #e8e6e1; }
.dc-map .ol-viewport { border-radius: 0 !important; }
.dc-map3d { position: absolute; inset: 0; z-index: 1; background: #eef2ea; }
/* o CSS do MapLibre põe position: relative em .maplibregl-map; aqui o mapa 3D cobre o cartão inteiro */
.dc-map-card .dc-map3d, .dc-map-card .dc-map3d.maplibregl-map { position: absolute; inset: 0; }
.dc-map3d[hidden] { display: none; }
.dc-map-bar, .dc-legend, .dc-caption { z-index: 3; }
.dc-legend { bottom: 36px; }
.dc-map-loading { position: absolute; top: 50%; left: 50%; z-index: 4; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 99px; background: #17202c; color: #fff; font-size: .84rem; font-weight: 600; box-shadow: 0 10px 26px rgba(10, 28, 54, .3); }

/* modos do mapa */
.dc-group button.is-3d.is-active { background: linear-gradient(135deg, #4c2a8f, #7c5cd6); }
.dc-group button.is-heat.is-active { background: linear-gradient(135deg, #b4380f, #d32f2f); }

/* ferramentas em círculos, como no painel de trânsito */
.dc-tools { pointer-events: auto; display: flex; gap: 8px; }
.dc-cbtn {
  width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgb(255 255 255 / 92%); color: var(--svc-ink);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 2px 10px rgb(23 32 44 / 16%);
  transition: background .2s, color .2s, transform .15s;
}
.dc-cbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-cbtn:hover { background: #fff; }
.dc-cbtn:active { transform: scale(.94); }

/* legenda do mapa de calor */
.dc-heat-scale { width: 190px; height: 10px; margin: 4px 0 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(36, 161, 72, .15), #24a148, #f2d33b, #f47b2b, #d32f2f); }
.dc-heat-labels { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 600; color: var(--svc-muted); }
.dc-legend-note { margin: 6px 0 0; max-width: 210px; font-size: .7rem; color: var(--svc-muted); }

/* cartão do registro no 3D */
.dc-ml-popup .maplibregl-popup-content { padding: 0; background: none; box-shadow: none; }
.dc-ml-popup .maplibregl-popup-tip { display: none; }
.dc-ml-popup .dc-popup { margin-bottom: 10px; }

/* ── cadastro de área de risco com mini mapa (como o de Obras) ── */
.svc-dialog.dc-cad-dialog { width: min(1220px, 100%); }
.dc-cad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.dc-cad-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dc-cad-side .svc-form-section { grid-column: auto; }
.dc-cad-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dc-cad-tools { flex-wrap: wrap; background: var(--svc-blue-50); border-color: var(--svc-blue-100); box-shadow: none; }
.dc-ic { display: inline-flex; }
.dc-cad-map { position: relative; height: 440px; border-radius: 12px; overflow: hidden; border: 1px solid var(--svc-line); background: #e8e6e1; }
.dc-cad-map .ol-zoom { top: 8px; left: 8px; }
.dc-cad-hint { font-size: .8rem; font-weight: 600; color: var(--svc-ink-2); }
.dc-cad-coord { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dc-cad-coord[hidden] { display: none; }
.dc-cad-coord input { flex: 1 1 150px; height: 34px; padding: 0 10px; border: 1px solid #d5e0ee; border-radius: var(--svc-radius-sm); font: inherit; font-size: .84rem; color: var(--svc-ink); background: #fff; outline: none; }
.dc-cad-coord input:focus { border-color: var(--pa-medium-blue); box-shadow: 0 0 0 3px rgba(37, 99, 184, .14); }
.dc-cad-coord .err { width: 100%; font-size: .74rem; color: var(--svc-bad); }
.dc-cad .dc-geom-box, .dc-cad .svc-note { grid-column: auto; }

@media (max-width: 980px) {
  .dc-map-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 42%); height: 100%; }
  .dc-map-card { height: auto; min-height: 0; order: -1; }
  .dc-side { border-right: 0; border-top: 1px solid var(--svc-line); }
  .dc-cad { grid-template-columns: 1fr; }
  .dc-cad-side { position: static; order: -1; }
  .dc-cad-map { height: 300px; }
}
@media (max-width: 760px) {
  .dc-map-bar { flex-direction: row; align-items: flex-start; }
  .dc-group button span { display: none; }
}

/* ── áreas de risco: filtros da lista unificada ── */
.dc-area-filtros { flex-wrap: wrap; align-items: center; }
.dc-area-filtros select { flex: 0 1 190px; min-width: 150px; }
.dc-zona { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.dc-zona.is-urbana { background: #e8eefb; color: #1e3f8a; }
.dc-zona.is-rural { background: #f4ecdc; color: #7a5413; }

/* ── contatos de emergência ── */
.dc-resp-tabs { margin-top: 2px; }
.dc-contatos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dc-contato { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--svc-line); border-radius: 10px; background: #fff; min-width: 0; }
.dc-contato.is-destaque { border-color: #f1c4c4; background: #fff8f8; }
.dc-contato-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-contato-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--pa-dark-blue); letter-spacing: .01em; overflow-wrap: anywhere; }
.dc-contato.is-destaque .dc-contato-num { color: #b42318; }
.dc-contato-tipo { font-size: .68rem; color: var(--svc-ink-2); background: var(--svc-gray-bg); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.dc-contato b { font-size: .92rem; }
.dc-contato small { color: var(--svc-ink-2); font-size: .78rem; line-height: 1.35; }
.dc-contato .muted { font-size: .74rem; color: var(--svc-soft); }
.dc-contato-acoes { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.dc-contato-acoes .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-contato-acoes .btn span { display: inline-flex; }

/* ── ferramentas: minha localização ── */
.dc-tools { flex-wrap: wrap; justify-content: flex-end; }
.dc-cbtn.is-on { color: #2563eb; }
.dc-cbtn.is-off { color: var(--svc-soft); }
.dc-ic svg, .btn .dc-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc-header-tools #dcRelatorio svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-popup-actions .btn { display: inline-flex; align-items: center; gap: 5px; }
.svc-act { position: relative; }
.dc-act-n { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--pa-dark-blue); color: #fff; font-style: normal; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center; }

/* ── fotos ── */
.dc-fotos-bloco { display: flex; flex-direction: column; gap: 8px; }
.dc-fotos-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-fotos-bar .btn { display: inline-flex; align-items: center; gap: 6px; }
.dc-fotos-bar .dc-table-note { margin: 0; }
.dc-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.dc-foto { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--svc-line); background: #eef0f3; }
.dc-foto.is-nova { border: 2px solid #2563eb; }
.dc-foto-ver { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.dc-foto-ver:focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }
.dc-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-foto-tag { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 99px; background: #2563eb; color: #fff; font-size: .66rem; font-weight: 700; }
.dc-foto-x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(23 32 44 / 72%); color: #fff; cursor: pointer; }
.dc-foto-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.dc-fotos-vazio { grid-column: 1 / -1; margin: 0; padding: 16px; border: 1px dashed var(--svc-line); border-radius: 10px; text-align: center; font-size: .8rem; color: var(--svc-muted); }
.svc-dialog.dc-foto-dialog { width: min(1100px, 100%); }
.dc-foto-grande { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 8px; }

/* ── relatório de risco ── */
@media (max-width: 760px) {
  .svc-header-tools #dcRelatorio span { display: none; }
  .svc-header-tools #dcRelatorio { padding: 0 11px; }
}
@media (max-width: 1500px) { .svc-header-tools .svc-perfil { display: none; } }

/* =====================================================================
   Layout "Desktop • Defesa Civil • Mapa integrado" (Figma Panorama Hub)
   menu lateral · barra superior · painel de lentes · mapa com cartões
   ===================================================================== */
.dc-shell {
  --ink: #172438; --muted: #65798f; --soft: #94a3b8; --blue: #2476ce; --blue-soft: #eaf3fd; --line: #e3e9f0; --canvas: #f3f6fa;
  --shadow: 0 6px 24px rgba(23, 36, 56, .10), 0 1px 3px rgba(23, 36, 56, .06);
  font-family: 'Roboto', var(--pa-font); color: var(--ink);
  display: grid; grid-template-columns: 240px minmax(0, 1fr); height: 100vh; height: 100dvh; background: #fff;
}
body.dc-view-mapa { display: block; }
.brand-bar { display: none; }
.dc-shell svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dc-shell button { font-family: inherit; }

/* menu lateral */
.dc-nav { display: flex; flex-direction: column; min-height: 0; padding: 22px 12px 12px; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; }
.dc-nav-logo { display: block; padding: 0 12px 26px; }
.dc-nav-logo img { display: block; width: 122px; height: auto; }
.dc-nav-label { margin: 0 12px 10px; font-size: .68rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.dc-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: .92rem; color: var(--ink); text-decoration: none; }
.dc-nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.dc-nav-item:hover { background: var(--canvas); }
.dc-nav-item.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.dc-nav-item em { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--blue); color: #fff; font-style: normal; font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.dc-nav hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 22px; }
.dc-mods { display: grid; gap: 2px; }
.dc-mod { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.dc-mod i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.dc-mod:not(:has(i)) { grid-template-columns: 1fr auto; }
.dc-mod strong { font-size: .9rem; font-weight: 500; min-width: 0; }
.dc-mod small { display: block; font-size: .74rem; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dc-mod em { font-style: normal; font-size: .8rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.dc-mod:hover { background: var(--canvas); }
.dc-mod.is-active { background: var(--blue-soft); }
.dc-mod.is-active strong, .dc-mod.is-active em { color: var(--blue); }
.dc-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--canvas); }
.dc-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 600; flex: 0 0 auto; }
.dc-user strong { font-size: .9rem; font-weight: 500; min-width: 0; }
.dc-user small { display: block; font-size: .76rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.dc-nav-veu { display: none; }

/* corpo e barra superior */
.dc-body { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dc-top { display: flex; align-items: center; gap: 14px; padding: 14px 24px 14px 32px; border-bottom: 1px solid var(--line); background: #fff; min-height: 80px; }
.dc-menu-btn { display: none; }
.dc-top-title { min-width: 0; }
.dc-top-title h1 { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.dc-top-title p { margin: 3px 0 0; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--canvas); margin-left: 4px; }
.dc-seg button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .86rem; cursor: pointer; }
.dc-seg button svg { width: 17px; height: 17px; }
.dc-seg button:hover { color: var(--ink); }
.dc-seg button.is-active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(23, 36, 56, .12); }
.dc-seg button em { font-style: normal; font-size: .68rem; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: rgba(36, 118, 206, .12); color: var(--blue); }
.dc-seg button em:empty { display: none; }
.dc-top-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.dc-top .dc-search { position: relative; display: block; width: 250px; }
.dc-top .dc-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.dc-top .dc-search input { width: 100%; height: 40px; padding: 0 10px 0 40px; border: 1px solid transparent; border-radius: 14px; background: var(--canvas); font: inherit; font-size: .86rem; color: var(--ink); outline: 0; }
.dc-top .dc-search input::placeholder { color: var(--muted); }
.dc-top .dc-search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(36, 118, 206, .12); }
.dc-live { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: #e7f5ec; color: #2f7d5b; font-size: .8rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.dc-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dc-live.is-spinning::before { animation: dc-pulso 1s ease-in-out infinite; }
.dc-live:has(.is-error) { background: #fdecec; color: #b42318; }
@keyframes dc-pulso { 50% { opacity: .25; } }
.dc-bell { position: relative; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(23, 36, 56, .06); }
.dc-bell svg { width: 20px; height: 20px; }
.dc-bell i { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 2px solid #fff; }
.dc-bell i[hidden] { display: none; }

/* página do mapa */
body.dc-view-mapa .svc-app.dc-shell { height: 100vh; height: 100dvh; }
.dc-shell .svc-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 32px; }
body.dc-view-mapa .dc-shell .svc-main { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dc-shell .dc-map-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; height: 100%; min-height: 0; }
.dc-map-layout.is-recolhido { grid-template-columns: 0 minmax(0, 1fr); }
.dc-map-layout.is-recolhido .dc-side { visibility: hidden; }
.dc-shell .dc-side { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; overflow: hidden; }
.dc-shell .dc-side-scroll { padding: 20px 24px 28px; gap: 0; height: 100%; }
.dc-lentes-pergunta { margin: 0 0 12px; font-size: .86rem; color: var(--muted); }
.dc-lentes { display: grid; gap: 12px; margin-bottom: 26px; }
.dc-lente { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; color: var(--ink); transition: border-color .15s, background .15s; }
.dc-lente:hover { border-color: #c8d6e6; }
.dc-lente.is-active { border: 2px solid var(--blue); padding: 11px 13px; background: #f5f9fe; }
.dc-lente-ico { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; }
.dc-lente-ico svg { width: 19px; height: 19px; }
.dc-lente.is-active .dc-lente-ico { color: var(--ink); }
.dc-lente strong { font-size: .96rem; font-weight: 600; min-width: 0; }
.dc-lente small { display: block; margin-top: 3px; font-size: .82rem; font-weight: 400; line-height: 1.35; color: var(--muted); }
.dc-lente em { font-style: normal; font-size: .7rem; font-weight: 500; padding: 4px 9px; border-radius: 99px; background: var(--canvas); color: var(--muted); white-space: nowrap; }
.dc-lente.is-active em { background: var(--blue); color: #fff; }
.dc-shell .dc-side-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.dc-shell .dc-side-head h3 { margin: 0; font-size: .84rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.dc-shell .dc-side-head h3 em { margin-left: 6px; font-style: normal; font-size: .68rem; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--blue); color: #fff; }
.dc-link { border: 0; background: none; padding: 0; color: var(--blue); font-size: .86rem; font-weight: 500; cursor: pointer; }
.dc-link:hover { text-decoration: underline; }

/* linhas de camada (componente "Linha de camada") */
.dc-shell #dcLayers { display: grid; gap: 14px; }
.dc-shell #dcLayers .dc-layer-group { border: 0; background: transparent; display: grid; gap: 12px; overflow: visible; border-radius: 0; }
.dc-shell #dcLayers .dc-layer-group + .dc-layer-group { margin-top: 10px; }
.dc-shell #dcLayers .dc-layer-group > header { padding: 0; background: transparent; font-size: .74rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.dc-shell .dc-layer { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; padding: 13px 14px 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; }
.dc-shell .dc-layer:hover { background: #fafcfe; }
.dc-shell .dc-layer.is-on { border: 2px solid var(--blue); padding: 12px 13px; }
.dc-shell .dc-layer .dc-layer-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.dc-shell .dc-layer .dc-layer-ico svg { width: 18px; height: 18px; stroke-width: 1.8; }
.dc-shell .dc-layer.is-off .dc-layer-ico { background: var(--canvas); color: var(--muted); }
.dc-shell .dc-layer strong { font-size: .92rem; font-weight: 500; color: var(--ink); }
.dc-shell .dc-layer strong small { margin-top: 4px; font-size: .78rem; font-weight: 400; color: var(--muted); }
.dc-shell .dc-layer.is-off strong { color: var(--ink); }
.dc-shell .dc-layer.is-empty strong { color: var(--soft); }
.dc-shell .dc-switch { width: 38px; height: 22px; background: #e3e9f0; }
.dc-shell .dc-switch::after { width: 18px; height: 18px; }
.dc-shell .dc-layer input:checked ~ .dc-switch { background: var(--blue); }
.dc-shell .dc-layer input:checked ~ .dc-switch::after { transform: translateX(16px); }
.dc-nova { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; padding: 12px; border: 1px dashed #b9cbe0; border-radius: 16px; background: #fff; color: var(--blue); font-size: .88rem; font-weight: 500; cursor: pointer; }
.dc-nova svg { width: 18px; height: 18px; }
.dc-nova:hover { background: var(--blue-soft); }
.dc-nova[hidden] { display: none; }
.dc-shell .dc-filter-block { margin-bottom: 22px; }

/* mapa e elementos flutuantes */
.dc-shell .dc-map-card { border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: #e8e6e1; }
.dc-esq { position: absolute; top: 16px; left: 16px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: calc(100% - 92px); pointer-events: none; }
.dc-esq > * { pointer-events: auto; }
.dc-shell .dc-resumo { position: static; max-width: none; display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 10px 20px; border: 0; border-radius: 99px; background: #fff; box-shadow: var(--shadow); font-size: .86rem; color: var(--muted); }
.dc-shell .dc-resumo-item { gap: 7px; }
.dc-shell .dc-resumo-item::before { width: 8px; height: 8px; }
.dc-shell .dc-resumo-item b { font-weight: 600; }
.dc-shell .dc-legend { position: static; max-width: 240px; padding: 16px; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow); font-size: .84rem; }
.dc-shell .dc-legend h3 { margin: 0 0 10px; font-size: .86rem; font-weight: 600; color: var(--ink); }
.dc-shell .dc-legend h4 { margin: 10px 0 6px; font-size: .66rem; font-weight: 500; color: var(--muted); }
.dc-shell .dc-legend h3 + h4 { display: none; }
.dc-shell .dc-legend ul { gap: 9px; }
.dc-shell .dc-legend li { font-weight: 400; color: var(--ink); gap: 9px; }
.dc-shell .dc-legend-note { margin: 10px 0 0; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.dc-direita { position: absolute; top: 72px; right: 72px; z-index: 3; width: 300px; max-height: calc(100% - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.dc-detalhe[hidden], .dc-cenario[hidden] { display: none; }
.dc-detalhe .dc-popup { width: auto; padding: 18px; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow); font-size: .84rem; }
.dc-detalhe .dc-popup::after { display: none; }
.dc-detalhe .dc-popup-close { top: 12px; right: 12px; }
.dc-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-right: 28px; }
.dc-pop-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); font-size: .72rem; font-weight: 500; white-space: nowrap; }
.dc-pop-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.dc-pop-meta { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dc-detalhe .dc-popup h4 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.dc-detalhe .dc-pop-sub { margin: 0 0 14px; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.dc-detalhe .dc-pop-stats { gap: 8px; }
.dc-detalhe .dc-pop-stat { padding: 10px; border-radius: 12px; background: var(--canvas); }
.dc-detalhe .dc-pop-stat b { font-size: 1rem; font-weight: 600; }
.dc-detalhe .dc-pop-stat span { margin-top: 2px; font-size: .7rem; font-weight: 400; color: var(--muted); }
.dc-detalhe .dc-pop-aviso { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: .76rem; font-weight: 500; }
.dc-detalhe .dc-pop-aviso.is-bad { background: #fdecec; color: #b42318; }
.dc-pop-aviso .dc-ic svg { width: 15px; height: 15px; }
.dc-pop-botoes { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.dc-btn-pri { flex: 1 1 auto; max-width: 150px; height: 44px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-size: .92rem; font-weight: 500; cursor: pointer; }
.dc-btn-pri:hover { background: #1d65b3; }
.dc-pop-botoes .dc-link { font-size: .92rem; }
.dc-detalhe .dc-popup dl { margin-top: 4px; }
.dc-detalhe .dc-popup-source { border-top-color: var(--line); }
.dc-shell .dc-cenario { position: static; width: auto; padding: 18px; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow); font-size: .82rem; }
.dc-shell .dc-cenario-eyebrow { font-size: .7rem; font-weight: 500; letter-spacing: .06em; color: var(--blue); }
.dc-shell .dc-cenario h4 { margin: 8px 26px 14px 0; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.dc-shell .dc-cenario-tile { padding: 10px 12px; border-radius: 12px; background: var(--canvas); }
.dc-shell .dc-cenario-tile b { font-size: 1.15rem; font-weight: 600; }
.dc-shell .dc-cenario-tile span { font-weight: 400; font-size: .72rem; }
.dc-shell .dc-cenario p { font-size: .74rem; line-height: 1.45; }
.dc-shell .dc-cenario .btn { width: 100%; justify-content: center; }

/* controles do mapa (coluna à direita) */
.dc-ctrl { position: absolute; top: 16px; right: 16px; z-index: 3; display: flex; flex-direction: column; gap: 10px; }
.dc-ctrl-g { display: flex; flex-direction: column; border-radius: 14px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.dc-ctrl-g button, .dc-ctrl-b { width: 44px; height: 44px; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.dc-ctrl-g button + button { border-top: 1px solid var(--line); }
.dc-ctrl-b { border-radius: 14px; box-shadow: var(--shadow); }
.dc-ctrl-g button svg, .dc-ctrl-b svg { width: 20px; height: 20px; }
.dc-ctrl-g button:hover, .dc-ctrl-b:hover { background: var(--canvas); }
.dc-ctrl-b[aria-pressed="true"] { color: var(--blue); }
.dc-ctrl .dc-cbtn.is-on { color: #2563eb; }
.dc-bases { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: flex; gap: 4px; padding: 5px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.dc-bases button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: .86rem; cursor: pointer; }
.dc-bases button svg { width: 17px; height: 17px; }
.dc-bases button:hover { color: var(--ink); }
.dc-bases button.is-active { background: #172438; color: #fff; font-weight: 500; }
.dc-escala { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3; padding: 4px 10px; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(23, 36, 56, .15); }
.dc-escala-inner { border: 1.5px solid var(--ink); border-top: 0; height: 6px; font-size: .72rem; font-weight: 500; color: var(--ink); text-align: center; line-height: 0; padding-top: 0; }
.dc-escala-inner { line-height: 1; height: auto; padding: 0 0 2px; }
.dc-shell .dc-caption { left: 16px; bottom: 16px; z-index: 3; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1500px) {
  .dc-top .dc-search { width: 210px; }
  .dc-top-title h1 { font-size: 1.3rem; }
  .dc-shell .dc-map-layout { grid-template-columns: 360px minmax(0, 1fr); }
}

@media (max-height: 820px) { .dc-shell .dc-legend { display: none; } }
@media (max-width: 1180px) {
  .dc-shell { grid-template-columns: 1fr; }
  .dc-nav { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.dc-menu-aberto .dc-nav { transform: none; }
  .dc-nav-veu:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(15, 23, 42, .35); }
  .dc-menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; flex: 0 0 auto; }
  .dc-menu-btn svg { width: 20px; height: 20px; }
  .dc-top { padding: 12px 16px; gap: 12px; }
  .dc-top .dc-search { display: none; }
}
@media (max-width: 860px) {
  body.dc-view-mapa { overflow: auto; height: auto; }
  body.dc-view-mapa .svc-app.dc-shell { height: auto; }
  .dc-top { flex-wrap: wrap; }
  .dc-top-title p { white-space: normal; }
  .dc-seg { order: 3; width: 100%; margin: 0; }
  .dc-seg button { flex: 1; justify-content: center; }
  .dc-shell .dc-map-layout { grid-template-columns: 1fr; height: auto; }
  .dc-shell .dc-map-card { height: 72vh; min-height: 460px; order: -1; }
  .dc-shell .dc-side { border-right: 0; border-top: 1px solid var(--line); }
  .dc-esq { max-width: calc(100% - 90px); }
  .dc-shell .dc-legend { display: none; }
  .dc-direita { left: 12px; right: 12px; top: auto; bottom: 70px; width: auto; max-height: 55%; }
  .dc-bases button span { display: none; }
  .dc-shell .svc-main { padding: 16px; }
}
@media print {
  .dc-nav, .dc-top, .dc-ctrl, .dc-bases, .dc-side, .dc-direita { display: none !important; }
  .dc-shell { display: block; height: auto; }
  .dc-shell .dc-map-layout { display: block; }
  .dc-shell .dc-map-card { height: 94vh; }
}
/* bases de resumo, cenário e estatísticas (também usadas no cartão 3D) */
.dc-resumo-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dc-resumo-item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.dc-resumo-item b { color: var(--ink, #172438); font-variant-numeric: tabular-nums; }
.dc-cenario { position: relative; }
.dc-cenario-eyebrow { text-transform: uppercase; }
.dc-cenario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dc-cenario-tile b { display: block; color: var(--ink, #172438); font-variant-numeric: tabular-nums; }
.dc-cenario-tile span { color: var(--muted, #65798f); }
.dc-cenario p { margin: 12px 0; color: var(--muted, #65798f); }
.dc-pop-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dc-pop-stat { padding: 7px; border-radius: 10px; background: #f3f6fa; min-width: 0; }
.dc-pop-stat b { display: block; font-size: .9rem; color: #172438; white-space: nowrap; }
.dc-pop-stat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .66rem; color: #65798f; }
.dc-pop-sub { margin: 0 0 8px; font-size: .78rem; color: #65798f; }
.dc-pop-aviso { margin: 8px 0 0; padding: 6px 9px; border-radius: 9px; background: #eaf3fd; color: #2476ce; font-size: .72rem; }
.dc-pop-aviso.is-bad { background: #fdecec; color: #b42318; }

/* =====================================================================
   Revisão 2: barra superior enxuta, lentes múltiplas, pins do Panorama,
   ficha presa ao pin, ferramentas e inteligência territorial
   ===================================================================== */
.dc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 560px) minmax(0, 1fr); align-items: center; gap: 24px; }
.dc-top .dc-top-title { grid-column: 1; }
.dc-top .dc-search { grid-column: 2; width: 100%; display: block; }
.dc-top .dc-search input { height: 44px; border-radius: 14px; font-size: .9rem; }
.dc-btn-nova { grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-size: .9rem; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(36, 118, 206, .28); }
.dc-btn-nova svg { width: 18px; height: 18px; stroke-width: 2.2; }
.dc-btn-nova:hover { background: #1d65b3; }
.dc-btn-nova[hidden] { display: none; }

/* lentes: várias ao mesmo tempo */
.dc-lente { position: relative; }
.dc-lente-check { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; display: none; place-items: center; box-shadow: 0 0 0 3px #fff; }
.dc-lente-check svg { width: 13px; height: 13px; stroke-width: 3; }
.dc-lente.is-active .dc-lente-check { display: grid; }
.dc-voltar { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 0; border: 0; background: none; color: var(--blue); font-size: .86rem; font-weight: 500; cursor: pointer; }
.dc-voltar svg { width: 16px; height: 16px; }

/* ficha presa ao pin */
.dc-shell .dc-popup { width: 330px; padding: 18px; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(23, 36, 56, .18), 0 2px 6px rgba(23, 36, 56, .08); font-size: .84rem; max-height: 62vh; overflow-y: auto; }
.dc-shell .dc-popup::after { border: 0; bottom: -6px; box-shadow: 3px 3px 6px rgba(23, 36, 56, .06); }
.dc-shell .ol-overlay-container:has(.dc-popup) { filter: none; }
.dc-shell .dc-popup .dc-popup-close { top: 12px; right: 12px; }
.dc-shell .dc-popup h4 { margin: 0 0 6px; font-size: 1.08rem; font-weight: 600; color: var(--ink); padding-right: 22px; }
.dc-shell .dc-pop-sub { margin: 0 0 12px; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.dc-shell .dc-pop-stats { gap: 8px; }
.dc-shell .dc-pop-stat { padding: 9px 10px; border-radius: 12px; background: var(--canvas); }
.dc-shell .dc-pop-stat b { font-size: .98rem; font-weight: 600; }
.dc-shell .dc-pop-stat span { margin-top: 2px; font-size: .68rem; }
.dc-shell .dc-pop-aviso { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; font-size: .76rem; font-weight: 500; }
.dc-shell .dc-popup dl { margin: 10px 0 0; gap: 5px 12px; }
.dc-shell .dc-popup dt { font-weight: 400; font-size: .76rem; }
.dc-shell .dc-popup dd { font-weight: 500; color: var(--ink); }
.dc-shell .dc-popup-source { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .7rem; }
.dc-shell .dc-popup-actions { margin-top: 12px; }
.dc-shell .dc-pop-head { padding-right: 26px; }

/* contexto integrado */
.dc-ctx { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.dc-ctx-h { margin: 0 0 2px; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dc-ctx-l { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; font: inherit; color: var(--ink); }
button.dc-ctx-l { cursor: pointer; }
button.dc-ctx-l:hover { background: var(--canvas); }
.dc-ctx-l.is-alerta { background: #fff4e5; }
.dc-ctx-i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); }
.dc-ctx-i svg { width: 16px; height: 16px; stroke-width: 2; }
.dc-ctx-t { font-size: .72rem; color: var(--muted); min-width: 0; }
.dc-ctx-t b { display: block; margin-top: 1px; font-size: .8rem; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-ctx-l.is-alerta b { color: #9a3412; white-space: normal; }

/* alternador do rodapé: selecionado em azul */
.dc-bases button.is-active { background: var(--blue); color: #fff; }
.dc-ctrl-b.is-on { background: var(--blue); color: #fff; }

/* cartão de mapas e ferramentas */
.dc-ferr { position: absolute; top: 16px; right: 72px; z-index: 6; width: 340px; max-height: calc(100% - 32px); overflow-y: auto; padding: 18px; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(23, 36, 56, .18), 0 2px 6px rgba(23, 36, 56, .08); }
.dc-ferr[hidden] { display: none; }
.dc-ferr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dc-ferr-head strong { font-size: 1rem; font-weight: 600; }
.dc-ferr-x { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.dc-ferr-x:hover { background: var(--canvas); }
.dc-ferr-x svg { width: 16px; height: 16px; }
.dc-ferr-label { margin: 14px 0 8px; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dc-ferr-bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-ferr-bases button { display: grid; gap: 6px; padding: 6px 6px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: .78rem; color: var(--ink); cursor: pointer; }
.dc-ferr-bases button.is-active { border-color: var(--blue); color: var(--blue); font-weight: 500; box-shadow: 0 0 0 3px rgba(36, 118, 206, .12); }
.dc-thumb { display: block; height: 52px; border-radius: 9px; }
.dc-thumb.is-ruas { background: linear-gradient(115deg, transparent 46%, #fff 46% 52%, transparent 52%), linear-gradient(25deg, transparent 58%, #f6d58a 58% 63%, transparent 63%), linear-gradient(160deg, #aadaff 0 28%, #eef0eb 28%); }
.dc-thumb.is-sat { background: radial-gradient(circle at 30% 35%, #6b7f4b 0 18%, transparent 19%), radial-gradient(circle at 70% 70%, #8a7d5c 0 22%, transparent 23%), linear-gradient(160deg, #2f5a73 0 30%, #4f6b3e 30%); }
.dc-thumb.is-claro { background: linear-gradient(115deg, transparent 46%, #fff 46% 51%, transparent 51%), linear-gradient(160deg, #d7e3ea 0 28%, #f4f4f2 28%); border: 1px solid var(--line); }
.dc-ferr-modos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--canvas); }
.dc-ferr-modos button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .76rem; cursor: pointer; }
.dc-ferr-modos button svg { width: 18px; height: 18px; }
.dc-ferr-modos button.is-active { background: var(--blue); color: #fff; font-weight: 500; }
.dc-ferr-lista { display: grid; gap: 4px; }
.dc-ferr-lista button { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.dc-ferr-lista button:hover { background: var(--canvas); }
.dc-ferr-lista button > svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.dc-ferr-lista span { font-size: .88rem; font-weight: 500; }
.dc-ferr-lista small { display: block; margin-top: 2px; font-size: .74rem; font-weight: 400; color: var(--muted); }
.dc-ferr-lista small b { font-weight: 600; color: var(--ink); }
.dc-ferr-lista small em { margin-left: 6px; font-style: normal; font-size: .66rem; padding: 1px 6px; border-radius: 99px; background: var(--blue); color: #fff; }
.dc-ferr-icones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dc-ferr-icones button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: .7rem; cursor: pointer; }
.dc-ferr-icones button:hover { background: var(--canvas); }
.dc-ferr-icones svg { width: 20px; height: 20px; color: var(--muted); }
.dc-ferr-icones button[aria-pressed="false"] svg { color: var(--soft); }
.dc-ferr-sync { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: #e7f5ec; color: #2f7d5b; font-size: .76rem; font-weight: 500; cursor: pointer; }
.dc-ferr-sync svg { width: 15px; height: 15px; }
.dc-ferr-sync.is-spinning svg { animation: dc-gira 1s linear infinite; }
.dc-ferr-sync:has(.is-error) { background: #fdecec; color: #b42318; }
@keyframes dc-gira { to { transform: rotate(360deg); } }

/* medição */
.dc-medida { padding: 5px 10px; border-radius: 10px; background: #172438; color: #fff; font-size: .78rem; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 10px rgba(23, 36, 56, .25); }
.dc-medir-aviso { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 99px; background: #172438; color: #fff; font-size: .82rem; box-shadow: var(--shadow); }
.dc-medir-aviso .dc-ic svg { width: 16px; height: 16px; }
.dc-medir-aviso button { height: 30px; padding: 0 14px; border: 0; border-radius: 99px; background: #fff; color: #172438; font-weight: 600; cursor: pointer; }

/* legenda social */
.dc-legend .dot.is-cad { width: 14px; height: 14px; background: rgba(219, 39, 119, .32); border: 1.6px solid #db2777; box-shadow: none; }

.dc-shell .svc-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.dc-shell .svc-page-head h2 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.dc-shell .svc-page-head p { margin: 6px 0 0; max-width: 820px; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.dc-btn-ico { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; max-width: none; white-space: nowrap; }
@media (max-width: 1180px) {
  .dc-top { display: flex; }
  .dc-top .dc-search { display: block; flex: 1 1 auto; }
  .dc-btn-nova span { display: none; }
  .dc-btn-nova { padding: 0 12px; }
}
@media (max-width: 860px) { .dc-top-title { display: none; } .dc-ferr { left: 12px; right: 12px; width: auto; } }
/* ajustes da revisão 2 */
.dc-top-title h1 { overflow: hidden; text-overflow: ellipsis; }
/* com uma ficha aberta, os cartões flutuantes saem da frente */
.dc-map-card.tem-ficha .dc-direita, .dc-map-card.tem-ficha .dc-legend { display: none; }

/* revisão 3: voltar ao Panorama, recarregar ao lado de Nova área, sem lista/relatório */
.dc-voltar-panorama { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px 18px; padding: 7px 12px 7px 8px; border-radius: 10px; background: var(--canvas); color: var(--ink); font-size: .82rem; font-weight: 500; text-decoration: none; align-self: flex-start; }
.dc-voltar-panorama svg { width: 16px; height: 16px; stroke-width: 2.2; }
.dc-voltar-panorama:hover { background: var(--blue-soft); color: var(--blue); }
.dc-top-acoes { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.dc-top-acoes .dc-btn-nova { grid-column: auto; }
.dc-btn-recarregar { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(23, 36, 56, .06); }
.dc-btn-recarregar svg { width: 19px; height: 19px; stroke-width: 2; }
.dc-btn-recarregar:hover { background: var(--canvas); }
.dc-btn-recarregar.is-spinning svg { animation: dc-gira 1s linear infinite; }
.dc-btn-recarregar:has(.is-error) { border-color: #f5b5b5; color: #b42318; }
/* localização não é liga/desliga: nunca fica azul */
.dc-ctrl-b.is-on { background: #fff; color: var(--ink); }
.dc-ctrl .dc-cbtn.is-on, .dc-ctrl .dc-cbtn.is-off { color: var(--ink); }
#dcFerramentasBtn.is-on { background: var(--blue); color: #fff; }
.dc-ferr-bases { grid-template-columns: repeat(2, 1fr); }
.dc-btn-excluir, .svc-modal .dc-btn-excluir { color: #b42318 !important; display: inline-flex; align-items: center; gap: 6px; }
.dc-btn-excluir:hover { background: #fdecec !important; }
.dc-shell .dc-popup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-shell .dc-popup-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
/* revisão 4: grupos recolhíveis, interruptor contido, cruzamento do bairro */
.dc-shell .dc-layer { position: relative; }
.dc-shell .dc-layer input { inset: 0; width: 1px; height: 1px; }
html.dc-view-mapa, body.dc-view-mapa { overscroll-behavior: none; }
.dc-layer-cab { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 2px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--muted); }
.dc-layer-cab > span:first-child { font-size: .74rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }
.dc-layer-cab small { margin-left: auto; font-size: .72rem; color: var(--muted); }
.dc-layer-seta { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--muted); transition: transform .15s; }
.dc-layer-seta svg { width: 16px; height: 16px; stroke-width: 2.2; }
.dc-layer-cab:hover .dc-layer-seta { background: var(--canvas); color: var(--ink); }
.dc-layer-cab.is-fechado .dc-layer-seta { transform: rotate(-90deg); }
.dc-shell #dcLayers .dc-layer-group.is-fechado { gap: 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.dc-ctx-mais { margin: 2px 0 0 48px; font-size: .74rem; color: var(--muted); }
.dc-esq { bottom: 56px; }
.dc-shell .dc-resumo { flex: 0 0 auto; }
.dc-shell .dc-legend { min-height: 0; max-height: 100%; overflow-y: auto; flex: 0 1 auto; scrollbar-width: thin; }
