html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6fb;
}

.pg-log {
  display: flex;
  align-items: center;
  justify-content: center;
}

.box-log {
  width: 360px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.box-log h1 {
  margin: 0;
  font-size: 24px;
}

.sub-log {
  color: #6b7280;
  margin: 6px 0 18px 0;
}

.box-log label,
.bar-lat label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #374151;
  margin-bottom: 6px;
}

.box-log input,
.bar-lat input[type="text"],
.bar-lat select:not([multiple]) {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 14px;
}

.box-log button,
.bar-lat button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
}

.msg-log {
  margin-top: 12px;
  min-height: 18px;
  color: #b91c1c;
  font-size: 13px;
}

.pg-map {
  display: flex;
}

.bar-lat {
  width: 380px;
  min-width: 380px;
  box-sizing: border-box;
  background: #fff;
  border-right: 1px solid #d8dee8;
  padding: 16px;
  overflow-y: auto;
  height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.top-bar-txt {
  min-width: 0;
}

.top-bar h1 {
  font-size: 22px;
  margin: 0;
}

.sta-onl {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sep-sta {
  color: #9ca3af;
}

.btn-sai {
  width: auto !important;
  padding: 9px 12px !important;
  background: #ef4444 !important;
}

.mul-blk {
  margin-bottom: 12px;
}

.mul-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mul-top label {
  margin: 0;
}

.mul-acoes {
  display: flex;
  gap: 6px;
}

.btn-chip {
  width: auto !important;
  padding: 5px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  background: #2563eb !important;
}

.btn-chip-sec {
  background: #e5e7eb !important;
  color: #111827 !important;
}

.mul-list {
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.mul-list-alt {
  max-height: 230px;
}

.mul-opt {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 4px;
  margin: 0 !important;
  font-weight: normal !important;
  border-radius: 8px;
  cursor: pointer;
}

.mul-opt:hover {
  background: #f3f4f6;
}

.mul-opt input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px;
  min-height: 15px;
  margin: 1px 0 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  accent-color: #2563eb;
  flex: 0 0 15px;
}

.mul-opt span {
  font-size: 11px;
  color: #374151;
  line-height: 1.15;
  word-break: break-word;
}

.mul-sta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.mul-emp {
  font-size: 13px;
  color: #6b7280;
  padding: 8px;
}

.lin-chk {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px 0;
  font-weight: normal !important;
}

.lin-checks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px 0;
  flex-wrap: wrap;
}

.lin-checks .lin-chk {
  margin: 0;
}

.lin-sel-mini {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-weight: normal !important;
}

.lin-sel-mini span {
  font-size: 14px;
  color: #374151;
}

.bar-lat .lin-sel-mini select {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.lin-chk input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  accent-color: #2563eb;
  flex: 0 0 16px;
}

.lin-chk span {
  font-size: 14px;
  color: #374151;
}

.lin-btn {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.lin-btn button {
  flex: 1;
}

.btn-sec {
  background: #e5e7eb !important;
  color: #111827 !important;
}

.box-res,
.box-leg,
.box-url {
  margin-top: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  color: #374151;
}

.box-url #lblUrl {
  margin-top: 6px;
  word-break: break-all;
  font-size: 12px;
  color: #111827;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 8px;
  flex: 0 0 12px;
}

.dot-ver {
  background: #2563eb;
}

.dot-vem {
  background: #dc2626;
}

.dot-cin {
  background: #6b7280;
}

.dot-tec {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 999px;
  background: #f59e0b;
  border: 2px solid #000000;
  box-sizing: content-box;
  overflow: visible;
  z-index: 1;
}

.dot-tec::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-left: 2px solid #000000;
  border-bottom: 2px solid #000000;
  transform: translateX(-50%) rotate(-45deg);
  z-index: 0;
}

.dot-tec::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: #ffffff;
  z-index: 1;
}

.dot-cam {
  background: #16a34a;
}

.star-leg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: #16a34a;
  font-size: 19px;
  line-height: 16px;
}

.tri-leg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  color: #facc15;
  font-size: 15px;
  line-height: 14px;
  text-shadow:
    -1px 0 #dc2626,
    0 1px #dc2626,
    1px 0 #dc2626,
    0 -1px #dc2626;
}

.tri-leg::before {
  content: "▲";
}

.alarm-leg {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  flex: 0 0 22px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23242424' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 18 10 6M36 14V4M55 18 62 6'/%3E%3C/g%3E%3Cpath d='M19 44v-9c0-11 8-18 17-18s17 7 17 18v9H19Z' fill='%23ef5b63' stroke='%23242424' stroke-width='6' stroke-linejoin='round'/%3E%3Cellipse cx='31' cy='31' rx='7' ry='13' transform='rotate(8.6 31 31)' fill='white' opacity='.18'/%3E%3Cpath d='M16 44h40l3 19H13Z' fill='white' stroke='%23242424' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bar-lat .res-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 3px 4px;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.bar-lat .res-item + .res-item {
  margin-top: 3px;
}

.bar-lat .res-item:hover,
.bar-lat .res-item.atv {
  background: #eef2ff;
}

.res-lab,
.res-leg {
  display: inline-flex;
  align-items: center;
  color: #374151;
}

.box-res + .mul-blk {
  margin-top: 16px;
}

.bar-lat #selRede + .lin-chk,
.bar-lat #selRede + .lin-chk + .lin-btn,
.box-leg {
  display: none !important;
}

.map-box {
  flex: 1;
  position: relative;
  height: 100vh;
}

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

.msg-map {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(17,24,39,.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 20;
}

.oculto {
  display: none;
}

.pop-box {
  min-width: 280px;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.45;
}

.pop-tit {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #111827;
}

.pop-lin {
  margin-bottom: 5px;
  color: #374151;
}

.pop-alm {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
}

.pop-alm-dev {
  margin-top: 8px;
  color: #374151;
}

.pop-alm-event {
  margin-top: 4px;
  font-weight: 700;
  color: #991b1b;
}

#txtRam,
#txtVen {
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.hid {
  display: none !important;
}

@media (max-width: 900px) {
  .pg-map {
    display: block;
    min-height: 100vh;
  }

  .bar-lat {
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: 52vh;
    border-right: 0;
    border-bottom: 1px solid #d8dee8;
    padding: 14px;
  }

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #fff;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }

  .top-bar h1 {
    font-size: 18px;
  }

  .sta-onl {
    font-size: 11px;
  }

  .map-box {
    height: 48vh;
    min-height: 420px;
  }

  .lin-checks {
    gap: 10px;
  }

  .lin-btn {
    gap: 8px;
  }

  .lin-btn button {
    min-height: 52px;
    font-size: 13px;
    padding: 10px 8px;
  }

  .box-res,
  .box-url {
    padding: 10px;
  }

  .mul-list {
    max-height: 160px;
  }

  .mul-list-alt {
    max-height: 180px;
  }
}

@media (max-width: 640px) {
  .bar-lat {
    max-height: 58vh;
    padding: 12px;
  }

  .top-bar {
    gap: 10px;
  }

  .top-bar h1 {
    font-size: 17px;
  }

  .top-bar-txt {
    flex: 1;
  }

  .sep-sta {
    display: none;
  }

  .btn-sai {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  .box-log input,
  .bar-lat input[type="text"],
  .bar-lat select:not([multiple]) {
    font-size: 16px;
  }

  .lin-checks {
    align-items: flex-start;
    flex-direction: column;
  }

  .lin-sel-mini {
    width: 100%;
    justify-content: space-between;
  }

  .bar-lat .lin-sel-mini select {
    min-width: 140px;
  }

  .lin-btn {
    flex-wrap: wrap;
  }

  .lin-btn button {
    flex: 1 1 calc(50% - 4px);
  }

  .lin-btn button:last-child {
    flex-basis: 100%;
  }

  .res-leg,
  .res-lab {
    font-size: 13px;
  }

  .box-url #lblUrl {
    font-size: 11px;
  }

  .mul-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .mul-acoes {
    width: 100%;
    justify-content: flex-end;
  }

  .mul-list {
    max-height: 140px;
  }

  .mul-list-alt {
    max-height: 160px;
  }

  .map-box {
    height: 42vh;
    min-height: 360px;
  }

  .msg-map {
    right: 10px;
    left: 10px;
    bottom: 10px;
    font-size: 12px;
  }
}

