/* ═══════════════════════════════════════════════════════════
   LIVE TRACK — admin-only real-time employee location screen.
═══════════════════════════════════════════════════════════ */

#screen-live-track { display: flex; flex-direction: column; }

#screen-live-track .lt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--line, #e4ebf1);
}
#screen-live-track .lt-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#screen-live-track .lt-toggle input { width: 36px; height: 20px; accent-color: #059669; cursor: pointer; }
#screen-live-track .lt-interval {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft, #4a5b6c);
}
#screen-live-track .lt-interval input {
  width: 56px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line, #e4ebf1);
  border-radius: 8px;
  text-align: center;
}
#screen-live-track .lt-count-badge {
  margin-inline-start: auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #059669 14%, transparent);
  color: #059669;
  font-size: 11.5px;
  font-weight: 800;
}

#screen-live-track .lt-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
#screen-live-track .lt-map-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
#screen-live-track #lt-map {
  width: 100%;
  height: 100%;
}
#screen-live-track .lt-empty {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: color-mix(in srgb, var(--surface, #fff) 88%, transparent);
  color: var(--ink-muted, #9aa9b6);
}
#screen-live-track .lt-empty p { margin: 0; font-weight: 800; font-size: 14px; color: var(--ink-soft, #4a5b6c); }
#screen-live-track .lt-empty small { max-width: 320px; font-size: 12px; }

#screen-live-track .lt-roster {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border-left: 1px solid var(--line, #e4ebf1);
}
#screen-live-track .lt-roster__head {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted, #9aa9b6);
  border-bottom: 1px solid var(--line, #e4ebf1);
}
#screen-live-track .lt-roster__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#screen-live-track .lt-roster__empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-muted, #9aa9b6);
}
#screen-live-track .lt-roster__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  text-align: start;
  transition: background .12s ease;
}
#screen-live-track .lt-roster__item:hover { background: var(--surface-blue, #eef5fa); }
#screen-live-track .lt-roster__item--active { background: var(--surface-blue, #eef5fa); box-shadow: inset 0 0 0 1px var(--navy, #426482); }
#screen-live-track .lt-roster__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
#screen-live-track .lt-roster__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy, #426482);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
#screen-live-track .lt-roster__info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#screen-live-track .lt-roster__info strong { font-size: 12.5px; color: var(--ink, #1f2d3d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#screen-live-track .lt-roster__info small { font-size: 10.5px; color: var(--ink-muted, #9aa9b6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#screen-live-track .lt-roster__updated { opacity: .75; }
#screen-live-track .lt-roster__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-inline-end: 4px;
}
#screen-live-track .lt-roster__dot--work_order { background: #0284c7; }
#screen-live-track .lt-roster__dot--routine { background: #059669; }
#screen-live-track .lt-roster__dot--idle { background: #64748b; }

/* Leaflet marker for a live employee — plain inline SVG, no image assets. */
.lt-marker { background: none !important; border: none !important; }

@media (max-width: 860px) {
  #screen-live-track .lt-body { flex-direction: column; }
  #screen-live-track .lt-roster { width: 100%; max-height: 40vh; border-left: 0; border-top: 1px solid var(--line, #e4ebf1); }
}
