        html, body {
            height: 100%;
            margin: 0;
            background: #121212;
        }

        #map {
            height: 100%;
            width: 100%;
        }

        /* =====================================================
           BLINKING BUS (SAFE FOR LEAFLET)
           ===================================================== */
       /* Color-aware blinking (SAFE for Leaflet) */
.bus-blink .bus-core {
    animation: busBlink 1.2s infinite;
}

@keyframes busBlink {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--glow-color);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 12px 6px rgba(0,0,0,0);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0,0,0,0);
    }
}
/* ================= LEFT PANEL ================= */
/* Move ONLY the zoom buttons */
/* MOVE ONLY ZOOM BUTTONS – FORCE OVERRIDE */
.leaflet-bottom.leaflet-right .leaflet-control-zoom.leaflet-bar {
  margin-bottom: 100px !important;   /* above bottom bar */
  margin-right: 16px !important;     /* from right edge */
}



/* ================= SWITCH STYLE ================= */

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  font-size: 12px;
}

.label-text {
  color: #222;
}

/* Switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cfd6dd;
  transition: 0.25s;
  border-radius: 20px;
}

/* Circle */
.slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

/* ON state */
.switch input:checked + .slider {
  background-color: #1b7f4b; /* transit green */
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

#left-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #dcdfe3;
  border-radius: 4px;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #333;
  margin: 3px 0;
}
.panel-header {
  text-align: center;
}

.panel-logo {
  display: block;
  margin: 0 auto 6px auto;
  width: 75px;
  height: auto;
}

#left-panel {
  transform: translateX(0);
  transition: transform 0.3s ease;
}

#left-panel.collapsed {
  transform: translateX(-100%);
}
#left-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;                  /* slimmer panel */
  height: calc(100% - 90px);   /* stop above bottom bar */
  background: #f7f8fa;
  padding: 10px 10px 14px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  overflow-y: auto;
  z-index: 1000;
  border-right: 1px solid #dcdfe3;
}

/* Section container */
#left-panel details {
  margin-bottom: 10px;
}

#left-panel summary {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #333;

  padding: 8px 8px;
  margin-bottom: 4px;

  background: #ffffff;              /* white button */
  border: 1px solid #dcdfe3;        /* boundary */
  border-radius: 4px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}


#left-panel summary:hover {
  background: #f1f4f7;
  border-color: #c5cbd3;
}

/* Remove default arrow */
#left-panel summary::-webkit-details-marker {
  display: none;
}

/* Custom arrow */
#left-panel summary::after {
  content: "▾";
  font-size: 12px;
  color: #666;
}

#left-panel details[open] summary::after {
  content: "▴";
}

/* Items */
.panel-items {
  padding-left: 4px;
  margin-top: 6px;
}

#left-panel label {
  display: flex;
  align-items: center;
  margin: 5px 0;
  cursor: pointer;
  gap: 6px;
}

#left-panel input {
  margin-right: 4px;
}

/* Visual indicators */
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.line {
  width: 14px;
  height: 2px;
}

.square {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

/* Colors */
.green { background: #2ee66b; }
.red   { background: #d32f2f; }
.black { background: #000000; }
.navy  { background: #072a40; }
.pink  { background: #f8c8d8; }
.mint  { background: #e6f4ea; }
/* ================= PANEL HEADER ================= */

.panel-header {
  margin-bottom: 12px;
}

.panel-title {
  font-size: 20px;
  font-weight: bold;
  color: #1b7f4b;              /* transit green */
  margin-bottom: 8px;
  text-align: center;
}

/* Search box */
.panel-search {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ccd2d8;
  border-radius: 4px;
  outline: none;
  background: #ffffff;
  box-sizing: border-box;
}

.panel-search::placeholder {
  color: #888;
}

.panel-search:focus {
  border-color: #1b7f4b;
  box-shadow: 0 0 0 1px rgba(27,127,75,0.15);
}

/* ================= RIGHT PANEL ================= */

#right-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: calc(100% - 90px);   /* leave space for bottom bar */
  background: #ffffff;
  padding: 12px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  border-left: 1px solid #dcdfe3;
  z-index: 1000;
  overflow-y: auto;
}

/* Placeholder */
#right-panel .placeholder {
  color: #777;
  font-style: italic;
  margin-top: 40%;
  text-align: center;
}

/* Details container */
#right-panel .details h3 {
  font-size: 13px;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #333;
}

/* Key-value rows */
#right-panel .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

#right-panel .row span {
  color: #666;
}

#right-panel .row strong {
  color: #111;
}

/* Status badges */
#right-panel .status {
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
}

#right-panel .status.moving {
  background: #e6f4ea;
  color: #1b7f4b;
}

#right-panel .status.idle {
  background: #fdecea;
  color: #b00020;
}


   /* ================= BOTTOM BAR ================= */

/* ================= BOTTOM BAR (FULL WIDTH) ================= */

#bottom-bar {
  position: fixed;          /* NOT absolute */
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #ffffff;
  border-top: 1px solid #dcdfe3;
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  z-index: 2000;            /* above panels and map */
  box-sizing: border-box;
}


/* Sections */
.bottom-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 4px;
}

/* Events */
.events {
  flex: 3;
  overflow: hidden;
}

.event {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.event span {
  color: #555;
}

.event.warning {
  color: #b00020;
  font-weight: bold;
}

/* Status */
.status {
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  color: #333;
}
/* Stable pulsating manhole alert */
.manhole-blink {
  animation: manholePulse 1.5s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes manholePulse {
  0% {
    opacity: 0.9;
    stroke-width: 3;
  }
  50% {
    opacity: 0.4;
    stroke-width: 8;
  }
  100% {
    opacity: 0.9;
    stroke-width: 3;
  }
}
