@font-face {
  font-family: Inter;
  src: url(inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(manrope.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #142d27;
  --muted: #566c65;
  --soft: #f3f7f4;
  --panel: #fff;
  --border: #dce7e1;
  --green: #17694b;
  --green-dark: #0a5037;
  --mint: #e9f5ed;
  --active: #168358;
  --inactive: #7b6352;
  --tan: #f7eee7;
  --shadow: 0 2px 5px #16362a06;
  --radius: 16px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font:
    400 1rem/1.5 Inter,
    system-ui,
    sans-serif;
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Manrope, Inter, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #1b845e;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  width: 100%;
  margin: auto;
  min-height: 55px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand,
.account {
  display: flex;
  align-items: center;
  gap: 17px;
}
.wordmark {
  display: block;
  position: relative;
  width: 113px;
  height: 40px;
  overflow: hidden;
  flex: none;
}
.wordmark img {
  position: absolute;
  max-width: none;
  width: 175px;
  height: auto;
  left: -33px;
  top: -5px;
}
.brand-divider {
  height: 26px;
  width: 1px;
  background: #dfe8e3;
}
.brand-title {
  font:
    800 0.88rem Manrope,
    sans-serif;
  white-space: nowrap;
}
.account {
  gap: 10px;
  min-width: 0;
}
.account-email {
  color: var(--muted);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}
.button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 13px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 680;
  line-height: 1.2;
  text-decoration: none;
}
.button-primary {
  background: var(--green);
  color: #fff;
}
.button-primary:hover:not(:disabled) {
  background: var(--green-dark);
}
.button-light {
  background: #fff;
  color: #28463a;
  border-color: #dbe7e0;
  box-shadow: var(--shadow);
}
.button-light:hover:not(:disabled) {
  background: #eff7f2;
  border-color: #b4d2c0;
}
.button-quiet {
  background: transparent;
  color: var(--muted);
  padding-inline: 10px;
}
.button-quiet:hover {
  background: #ecf4ef;
  color: var(--ink);
}
.workspace {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 16px 14px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}
h1 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.049em;
  line-height: 1.12;
}
.live-toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 2px;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  background: #e3f2e8;
  border: 1px solid #d8eadd;
  border-radius: 30px;
  padding: 6px 11px;
  font-size: 0.84rem;
  font-weight: 720;
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.connection[data-tone="demo"] {
  background: #e8edf5;
  border-color: #dce4f2;
  color: #344d6f;
}
.connection[data-tone="error"] {
  background: #f7eee7;
  border-color: #eddfd4;
  color: #82522e;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #eaf0f8;
  border: 1px solid #dce6f1;
  border-radius: 10px;
  color: #344f72;
  padding: 8px 13px;
  margin-bottom: 10px;
  font-size: 0.875rem;
}
.notice[data-tone="error"] {
  background: #f9f0e9;
  border-color: #eee0d7;
  color: #78472b;
}
.notice-inner {
  display: flex;
  align-items: center;
  gap: 9px;
}
.notice .icon {
  width: 1rem;
  height: 1rem;
}
.link-button {
  border: 0;
  padding: 4px 0;
  background: none;
  color: inherit;
  font-weight: 770;
  font-size: 0.875rem;
  white-space: nowrap;
}
.link-button:hover {
  text-decoration: underline;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 10px;
}
.metric {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 5px 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}
.metric-number {
  color: var(--ink);
  font: 800 1.25rem/1.15 Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
}
#ativos { color: var(--green-dark); }
#inativos { color: #82522e; }
.monitor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(265px, 22vw, 365px);
  gap: 12px;
}
.panel {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-head {
  min-height: 54px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.panel-caption h2 {
  font-size: 1.1rem;
  line-height: 1.27;
}
.panel-caption p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.panel-icon {
  display: grid;
  place-items: center;
  background: #edf5f0;
  color: #398260;
  border-radius: 9px;
  width: 35px;
  height: 35px;
  flex: none;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.fit {
  min-height: 35px;
  padding: 6px 10px;
  font-size: 0.82rem;
}
.fit .icon {
  width: 1.06rem;
  height: 1.06rem;
}
.map-frame {
  position: relative;
  background: #e6ede5;
}
#mapa {
  height: max(400px, 68dvh);
  background-color: #e7eee5;
  background-image:
    linear-gradient(90deg, #c7d9cd70 1px, transparent 1px),
    linear-gradient(#c7d9cd70 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
  font-family: Inter, system-ui, sans-serif;
}
.leaflet-container .leaflet-tile-pane {
  filter: saturate(0.76);
}
.map-key {
  position: absolute;
  left: 11px;
  bottom: 11px;
  z-index: 450;
  background: #fff;
  color: #39534a;
  border: 1px solid #dce8e0;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 13px;
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 650;
  pointer-events: none;
}
.map-key span,
.map-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--active);
  flex: none;
}
.dot.inactive {
  background: #957658;
}
.dot.neutral {
  background: #7b9488;
}
.map-notice {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 90px);
  color: #6d4c2d;
  background: #fff5e8;
  border: 1px solid #e9d9c5;
  border-radius: 8px;
  z-index: 450;
  padding: 6px 10px;
  font-size: 0.8rem;
}
.map-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid #e4ece7;
  color: var(--muted);
  font-size: 0.78rem;
}
.list-head {
  padding-bottom: 9px;
}
.list-controls {
  padding: 0 14px 10px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.search-input,
.select-input {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid #dce7e1;
  border-radius: 9px;
  color: var(--muted);
  background: #fafcfb;
  padding: 0 10px;
  gap: 7px;
}
.search-input input,
.select-input select {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  min-height: 36px;
  color: var(--ink);
  font-size: 0.875rem;
}
.search-input:focus-within,
.select-input:focus-within {
  border-color: #5da082;
  outline: 1px solid #5da082;
}
.search-input input:focus-visible,
.select-input select:focus-visible {
  outline: 0;
}
.search-input .icon {
  width: 1rem;
  height: 1rem;
}
.select-input {
  position: relative;
}
.select-input select {
  appearance: none;
  padding-right: 20px;
}
.select-input::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  right: 13px;
  top: 14px;
  transform: rotate(45deg);
  border-right: 1px solid #648174;
  border-bottom: 1px solid #648174;
  pointer-events: none;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  background: #f0f5f2;
  border-radius: 8px;
}
.filter {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #4d685f;
  font-size: 0.78rem;
  font-weight: 670;
  padding: 3px;
}
.filter[aria-pressed="true"] {
  background: #fff;
  color: #1f5941;
  border-color: #dce8e0;
  box-shadow: 0 1px 3px #214c3510;
}
.filter:hover {
  color: var(--green-dark);
}
.device-list {
  list-style: none;
  margin: 0;
  padding: 0 7px 7px;
  max-height: max(280px, 58dvh);
  overflow: auto;
}
.device-list li + li {
  border-top: 1px solid #e8efeb;
}
.device-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  padding: 9px 8px;
  background: transparent;
  border-radius: 9px;
  color: var(--ink);
  text-align: left;
}
.device-row:hover,
.device-row[aria-pressed="true"] {
  background: #edf7f0;
}
.device-row:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: -2px;
}
.device-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--mint);
  color: var(--green);
}
.device-icon.inactive {
  background: var(--tan);
  color: #896b55;
}
.device-icon .icon {
  width: 1rem;
  height: 1rem;
}
.device-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.device-body strong {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.025em;
}
.device-body small {
  font-size: 0.77rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.device-status {
  display: flex;
  align-items: end;
  flex-direction: column;
  gap: 3px;
  flex: none;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 2px 6px;
  line-height: 1.35;
  font-weight: 680;
  font-size: 0.73rem;
  color: #136746;
  background: #e7f4ea;
  white-space: nowrap;
}
.status-pill.inactive {
  color: #785136;
  background: #f7eee7;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
}
.device-time {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.list-empty {
  color: var(--muted);
  padding: 23px 16px;
  line-height: 1.6;
  font-size: 0.88rem;
}
.fleet-marker {
  width: max-content;
}
.marker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #c6dfd1;
  border-radius: 30px;
  padding: 4px 9px 4px 5px;
  box-shadow: 0 3px 9px #172c2760;
  color: #144e34;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.marker-label .dot {
  width: 11px;
  height: 11px;
  border: 2px solid #e4f7ea;
  background: #168358;
}
.marker-label.inactive {
  border-color: #e8daca;
  color: #6f5746;
}
.marker-label.inactive .dot {
  border-color: #f8ede4;
  background: #9b7451;
}
.marker-label.selected {
  outline: 2px solid #1a845a;
  outline-offset: 2px;
}
.marker-label.inactive.selected {
  outline-color: #9b7451;
}
.popup {
  min-width: 160px;
  color: var(--ink);
}
.popup strong {
  font:
    800 1.07rem Manrope,
    sans-serif;
}
.popup p {
  margin: 6px 0;
  font-size: 0.81rem;
  line-height: 1.4;
}
.popup a {
  display: inline-block;
  margin-top: 3px;
  color: var(--green-dark);
  font-weight: 700;
}
dialog {
  width: min(440px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #d2e2d8;
  padding: 22px;
  background: white;
  color: var(--ink);
  box-shadow: 0 18px 65px #0c241e42;
}
dialog::backdrop {
  background: #14302a85;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.dialog-head h2 {
  font-size: 1.24rem;
}
.dialog-head .button {
  min-height: 34px;
  padding: 6px;
}
dialog p,
dialog ol {
  font-size: 0.91rem;
  color: var(--muted);
}
#formLogin label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 680;
}
#formLogin input {
  border: 1px solid #d6e3db;
  border-radius: 8px;
  min-height: 42px;
  padding: 7px 10px;
}
#formLogin > .button {
  width: 100%;
  margin-top: 16px;
}
dialog ol {
  padding-left: 1.3em;
  margin: 12px 0 17px;
}
dialog li + li {
  margin-top: 8px;
}
dialog .form-error {
  margin-top: 10px;
  color: #983e3c;
}
@media (min-width: 721px) and (min-height: 560px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .workspace,
  .monitor,
  .map-frame {
    flex: 1 1 0;
    min-height: 0;
  }
  .monitor { grid-template-rows: minmax(0, 1fr); }
  #mapa { height: 100%; }
  .device-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
}
@media (max-width: 720px) {
  .header-inner {
    gap: 8px;
    padding-inline: 12px;
    min-height: 51px;
  }
  .brand,
  .account { gap: 8px; }
  .brand-title,
  .brand-divider { display: none; }
  .account-email { max-width: 105px; }
  .workspace { padding: 8px 8px 16px; }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
  }
  .live-toolbar { gap: 6px; }
  .monitor { grid-template-columns: minmax(0, 1fr); }
  #mapa { height: max(340px, 68dvh); }
  .panel-head { min-height: 51px; }
  .map-panel .panel-icon { display: none; }
  .map-actions { flex: none; }
  .map-actions .fit { padding-inline: 8px; }
  .map-actions #enquadrar span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 395px) {
  .account-email {
    display: none;
  }
  .fit {
    font-size: 0.71rem;
  }
  .map-foot {
    font-size: 0.71rem;
  }
}

.track-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: #edf6ff;
}
.track-heading p,
.track-help { color: var(--muted); font-size: 0.875rem; }
.track-start { background: #13774a; }
.track-end { background: #aa402a; }
.popup .popup-history { display: block; margin-top: 10px; }
#formHistorico label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-weight: 650;
  font-size: 0.875rem;
}
#formHistorico select,
#formHistorico input {
  color: var(--ink);
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 9px;
  background: #fafcfb;
}
#formHistorico select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23566c65' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.track-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.track-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.track-message {
  background: var(--soft);
  border-radius: 8px;
  padding: 8px 10px;
}
.track-check {
  display: flex;
  align-items: start;
  gap: 8px;
  font-size: 0.875rem;
  margin-block: 12px;
}
.button-danger-light { color: #8a2825; background: #fff4f2; border-color: #f0cfca; }
.button-danger-light:hover:not(:disabled) { background: #fee8e4; }
.button-danger { color: #fff; background: #9e302b; border-color: #9e302b; }
.button-danger:hover:not(:disabled) { background: #802722; }
.live-toolbar { flex-wrap: wrap; }
.map-file-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0 14px 9px;
  font-size: 0.875rem;
}
.map-file-controls:not(:has(> :not([hidden]))) { display: none; }
#mapaArquivo { flex: 1 1 11rem; color: var(--muted); }
#fundoSatelitePortal { display: flex; align-items: center; gap: 5px; margin-left: auto; }


body.mapa-em-destaque { overflow: hidden; }
body.mapa-em-destaque .map-panel {
  position: fixed;
  inset: 6px;
  z-index: 1000;
  box-shadow: 0 0 0 8px var(--soft);
}
body.mapa-em-destaque .map-frame { flex: 1 1 0; min-height: 0; }
body.mapa-em-destaque #mapa { height: 100%; }

#temaPortal {
  min-width: 36px;
  padding-inline: 8px;
}
#temaPortal[aria-pressed="true"] {
  color: var(--green-dark);
  background: var(--mint);
}
.map-actions #temaPortal {
  min-height: 35px;
}
@media (max-width: 720px) {
  #temaPortal span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .map-actions { max-width: 65%; }
}

:root[data-tema="escuro"] {
  color-scheme: dark;
  --ink: #e5f1eb;
  --muted: #b0c5bc;
  --soft: #101916;
  --panel: #182520;
  --border: #344a41;
  --green: #1d6b4c;
  --green-dark: #9bdfbc;
  --mint: #224333;
  --active: #52cc95;
  --inactive: #d7a47d;
  --tan: #3d2e25;
  --shadow: 0 2px 8px #0005;
  --campo: #121e19;
  --realce: #273c32;
  --aviso-texto: #f1c6a2;
  --aviso-borda: #68503e;
  --info-fundo: #233646;
  --info-texto: #bcddf8;
  --info-borda: #3a566b;
}
[data-tema="escuro"] :focus-visible { outline-color: #7defb3; }
[data-tema="escuro"] .wordmark { background: #fff; border-radius: 7px; }
[data-tema="escuro"] .brand-divider { background: var(--border); }
[data-tema="escuro"] :is(.header, dialog, .map-key, .marker-label, .leaflet-popup-content-wrapper, .leaflet-popup-tip) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--border);
}
[data-tema="escuro"] dialog::backdrop { background: #000a; }
[data-tema="escuro"] .button-primary:hover:not(:disabled) { background: #25825b; }
[data-tema="escuro"] :is(.button-light, .leaflet-bar a) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--border);
}
[data-tema="escuro"] :is(.button-light, .button-quiet, .leaflet-bar a):hover:not(:disabled) {
  background: var(--realce);
  color: var(--ink);
  border-color: var(--border);
}
[data-tema="escuro"] .leaflet-bar a.leaflet-disabled {
  background: var(--campo);
  color: #81988d;
}
[data-tema="escuro"] :is(.panel-icon, .device-icon, .status-pill, .connection[data-tone="ok"]) {
  background: var(--mint);
  color: var(--green-dark);
  border-color: var(--border);
}
[data-tema="escuro"] :is(.device-icon.inactive, .status-pill.inactive, .connection[data-tone="error"], .notice[data-tone="error"], .map-notice) {
  background: var(--tan);
  color: var(--aviso-texto);
  border-color: var(--aviso-borda);
}
[data-tema="escuro"] :is(.notice[data-tone="demo"], .connection[data-tone="demo"], .track-heading) {
  background: var(--info-fundo);
  color: var(--info-texto);
  border-color: var(--info-borda);
}
[data-tema="escuro"] #inativos { color: var(--aviso-texto); }
[data-tema="escuro"] :is(.search-input, .select-input, #formHistorico select, #formHistorico input, #formLogin input, .filters) {
  background-color: var(--campo);
  border-color: var(--border);
  color: var(--ink);
}
[data-tema="escuro"] .select-input::after { border-color: var(--muted); }
[data-tema="escuro"] .filter { color: var(--muted); }
[data-tema="escuro"] :is(.filter[aria-pressed="true"], .device-row:hover, .device-row[aria-pressed="true"]) {
  color: var(--ink);
  background: var(--realce);
  border-color: var(--border);
}
[data-tema="escuro"] .filter:hover { color: var(--ink); }
[data-tema="escuro"] :is(.device-list li + li, .map-foot) { border-color: var(--border); }
[data-tema="escuro"] :is(.map-frame, #mapa) { background-color: #14211d; }
[data-tema="escuro"] #mapa {
  background-image: linear-gradient(90deg, #344a4160 1px, transparent 1px),
    linear-gradient(#344a4160 1px, transparent 1px);
}
[data-tema="escuro"] .leaflet-tile-pane .mapa-ruas {
  filter: invert(0.86) hue-rotate(175deg) saturate(0.72) brightness(0.83);
}
[data-tema="escuro"] .leaflet-control-attribution {
  background: #182520e8;
  color: var(--muted);
}
[data-tema="escuro"] :is(.leaflet-control-attribution a, .leaflet-popup-content a) { color: var(--green-dark); }
[data-tema="escuro"] :is(.leaflet-popup-content-wrapper, .leaflet-popup-tip) { box-shadow: 0 3px 13px #0008; }
[data-tema="escuro"] .leaflet-popup-close-button { color: var(--muted); }
[data-tema="escuro"] .leaflet-popup-close-button:hover { color: var(--ink); }
[data-tema="escuro"] .marker-label { border-color: #609b80; color: var(--green-dark); }
[data-tema="escuro"] .marker-label.inactive { border-color: #976c50; color: var(--aviso-texto); }
[data-tema="escuro"] .marker-label .dot { background: var(--active); border-color: var(--mint); }
[data-tema="escuro"] .marker-label.inactive .dot { background: var(--inactive); border-color: var(--tan); }
[data-tema="escuro"] .marker-label.selected { outline-color: var(--active); }
[data-tema="escuro"] .marker-label.inactive.selected { outline-color: var(--inactive); }
[data-tema="escuro"] .dot.inactive { background: var(--inactive); }
[data-tema="escuro"] .form-error { color: #ffb5b1; }
[data-tema="escuro"] .button-danger-light { color: #ffb5b1; background: #452a2a; border-color: #704242; }
[data-tema="escuro"] .button-danger-light:hover:not(:disabled) { background: #583232; }
