html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, "Segoe UI", sans-serif;
}

#cesium {
  width: 100%;
  height: 100vh;
  position: relative;
}

/* ── Floating "my location" button (bottom-right) ─────────────────────
   Sits opposite Cesium's bottom-left credit bar so it never overlaps.
   Big tap target for mobile; turns cyan while a fix is in progress. */
#v-locate {
  position: absolute;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1000;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #e8ecf1;
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  -webkit-tap-highlight-color: transparent;
  transition: color 140ms, border-color 140ms, background 140ms;
}
#v-locate:hover { border-color: rgba(95, 198, 255, 0.6); }
#v-locate:active { transform: scale(0.95); }
#v-locate.locating { color: #5fc6ff; border-color: rgba(95, 198, 255, 0.7); }
#v-locate.locating svg { animation: vlocSpin 1s linear infinite; }
#v-locate.active { color: #5fc6ff; border-color: rgba(95, 198, 255, 0.7); }
#v-locate:disabled { opacity: 0.5; cursor: default; }
@keyframes vlocSpin { to { transform: rotate(360deg); } }

#panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 999;
  background: rgba(20, 20, 30, 0.88);
  color: #eee;
  padding: 12px 14px;
  border-radius: 8px;
  width: 320px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
}

/* ── Left layers panel ────────────────────────────────────────────── */
#left-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 999;
  background: rgba(20, 20, 30, 0.88);
  color: #eee;
  border-radius: 8px;
  width: 260px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
}
#left-panel .lp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
#left-panel .lp-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #9ad;
  letter-spacing: 0.3px;
}
#left-panel #lp-toggle {
  background: none;
  border: none;
  color: #aac;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}
#left-panel.collapsed #lp-body { display: none; }
#left-panel.collapsed #lp-toggle { transform: rotate(-90deg); }
#left-panel #lp-body { padding: 6px 8px 10px; }

#left-panel .lp-section {
  margin: 2px 0;
}
#left-panel .lp-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cde;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}
#left-panel .lp-section > summary::-webkit-details-marker { display: none; }
#left-panel .lp-section > summary::before {
  content: "▸";
  font-size: 10px;
  color: #8a98ae;
  transition: transform 0.15s;
}
#left-panel .lp-section[open] > summary::before { transform: rotate(90deg); }
#left-panel .lp-section > summary:hover { background: rgba(255, 255, 255, 0.04); }
#left-panel .lp-count {
  margin-left: auto;
  color: #8a98ae;
  font-size: 10px;
  font-weight: 400;
}

#left-panel .lp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
#left-panel .lp-row:hover { background: rgba(255, 255, 255, 0.04); }
#left-panel .lp-row input[type=checkbox] { margin: 0; }
#left-panel .lp-row .lp-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
#left-panel .lp-row .lp-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cde;
}
#left-panel .lp-row .lp-meta {
  font-size: 10px;
  color: #8a98ae;
  flex-shrink: 0;
}
/* Per-row fly-to button. The label normally forwards clicks to its
   checkbox; the JS click handler does e.preventDefault + stopPropagation
   so this button stays independent. */
#left-panel .lp-row .lp-eye {
  background: none;
  border: 1px solid transparent;
  color: #aac;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
#left-panel .lp-row:hover .lp-eye { opacity: 1; }
#left-panel .lp-row .lp-eye:hover {
  background: rgba(108, 216, 168, 0.18);
  border-color: rgba(108, 216, 168, 0.4);
  color: #cfe;
}
/* Feature-count badge — live count of loaded features. The fully-loaded
   modifier paints it green so the user sees at a glance which tilesets
   have finished streaming. */
#left-panel .lp-row .lp-feat {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #aac;
}
#left-panel .lp-row .lp-feat.fully-loaded { color: #6cd8a8; }
#left-panel .lp-row .lp-feat.lp-feat-idle { color: #8a98ae; }
#left-panel .lp-row .lp-tag-primary {
  color: #cee;
  background: rgba(108, 216, 168, 0.18);
  border: 1px solid rgba(108, 216, 168, 0.4);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 9px;
}

/* ── View tools section inside the left panel ───────────────────────
   Re-skins the basemap dropdown + button trio so they fit the narrow
   left-panel width and match the dark-panel aesthetic. */
#left-panel .lp-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 4px 4px 18px;
}
#left-panel .lp-tool-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
#left-panel .lp-tool-row.lp-btn-row {
  flex-wrap: wrap;
}
#left-panel .lp-tool-label {
  color: #9ab;
  flex-shrink: 0;
  font-size: 11px;
}
#left-panel .lp-tool-input {
  flex: 1;
  font-size: 11px;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.25);
  color: #cde;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  min-width: 0;            /* let it shrink inside the flex parent */
}
#left-panel .lp-tools button {
  background: rgba(40, 40, 55, 0.6);
  color: #cde;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  flex: 1;
}
#left-panel .lp-tools button:hover {
  background: rgba(108, 216, 168, 0.15);
  border-color: rgba(108, 216, 168, 0.4);
  color: #cfe;
}
#left-panel .lp-tools button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#left-panel .lp-tool-result {
  font-size: 10px;
  color: #9ab;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}

/* ── Picked feature section in the left panel ─────────────────────── */
#left-panel .lp-picked-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 4px 6px 18px;
  font-size: 11px;
}
#left-panel .lp-picked-body #picked {
  font-size: 11px;
  color: #cde;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  padding: 6px 8px;
  /* V4 from the UX audit: cap so a feature with hundreds of Psets
     can't push the rest of the left panel below the viewport. */
  max-height: 50vh;
  overflow-y: auto;
}
#left-panel .lp-picked-body #picked .field {
  margin: 1px 0;
  font-size: 11px;
  word-break: break-all;
}
#left-panel .lp-picked-body #picked .field .key {
  color: #8aa;
  margin-right: 4px;
}
#left-panel .lp-picked-body #picked .empty {
  color: #8a98ae;
  font-style: italic;
}
#left-panel .lp-picked-body #picked details > summary {
  font-size: 10px;
  color: #9bd;
  padding: 2px 4px;
}
#left-panel .lp-picked-body button {
  background: rgba(40, 40, 55, 0.6);
  color: #cde;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  flex: 1;
}
#left-panel .lp-picked-body button:hover:not(:disabled) {
  background: rgba(108, 216, 168, 0.15);
  border-color: rgba(108, 216, 168, 0.4);
  color: #cfe;
}
#left-panel .lp-picked-body button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#left-panel .lp-picked-body #route-result {
  font-size: 10px;
  color: #9ab;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  padding: 4px 6px;
}

/* ── Right-panel tabs ────────────────────────────────────────────── */
.rp-tabbar {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rp-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #9ab;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid transparent;
}
.rp-tab:hover { color: #cde; background: rgba(255,255,255,0.04); }
.rp-tab.active {
  color: #cee;
  background: rgba(108,216,168,0.12);
  border-bottom-color: #6cd8a8;
}
.rp-tab .rp-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 400;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #cde;
}
.tab-panel { display: block; }
.tab-panel[hidden] { display: none; }

/* ── Query Builder card ──────────────────────────────────────────── */
#qb-card .qb-section { margin-bottom: 8px; }
#qb-card .qb-section-title {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #9ab;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  font-weight: 600;
}
#qb-card .qb-add-btn {
  margin-left: auto;
  background: rgba(108,216,168,0.15);
  color: #cfe;
  border: 1px solid rgba(108,216,168,0.4);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 10px;
  cursor: pointer;
}
#qb-card .qb-add-btn:hover { background: rgba(108,216,168,0.28); }
#qb-card .qb-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#qb-card .qb-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0,0,0,0.16);
  border-radius: 4px;
  padding: 4px;
  min-height: 28px;
}
#qb-card .qb-filter-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(40,40,55,0.5);
  border-radius: 4px;
  padding: 3px 5px;
  flex-wrap: wrap;
}
#qb-card .qb-filter-row select,
#qb-card .qb-filter-row input {
  font-size: 11px;
  padding: 2px 4px;
  background: rgba(0,0,0,0.25);
  color: #cde;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  min-width: 60px;
}
#qb-card .qb-filter-row .qb-type {
  flex: 1 1 110px;
  font-weight: 600;
  color: #cee;
}
#qb-card .qb-filter-row .qb-input {
  flex: 1 1 60px;
}
#qb-card .qb-filter-row .qb-del {
  background: none;
  border: 1px solid transparent;
  color: #f99;
  cursor: pointer;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 12px;
  margin-left: auto;
}
#qb-card .qb-filter-row .qb-del:hover {
  background: rgba(230,120,120,0.15);
  border-color: rgba(230,120,120,0.4);
}
#qb-card .qb-models {
  background: rgba(0,0,0,0.16);
  border-radius: 4px;
  padding: 4px;
  max-height: 100px;
  overflow-y: auto;
}
#qb-card .qb-models label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
  color: #cde;
  cursor: pointer;
}
#qb-card .qb-models label:hover { background: rgba(255,255,255,0.04); }
#qb-card .qb-models .qb-model-all {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 4px;
  margin-bottom: 2px;
  font-weight: 600;
  color: #cee;
}
#qb-card #qb-status.error { color: #f99; }
#qb-card #qb-status.ok    { color: #6cd8a8; }
#qb-card #qb-run:disabled { opacity: 0.5; cursor: not-allowed; }

/* Results-list rows inside the Query tab — slight tweaks so they
   fit alongside the builder. */
.tab-panel[data-tab="query"] .result-row { margin: 2px 0; }

/* ── Tab badges (live counts on the tab labels) ─────────────────── */
.rp-tab .rp-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 400;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cde;
}
.rp-tab.active .rp-badge {
  background: rgba(108, 216, 168, 0.25);
  color: #cfe;
}

/* ── WOs tab ───────────────────────────────────────────────────── */
#wos-scope-summary {
  display: flex;
  gap: 6px;
  font-size: 11px;
  flex-wrap: wrap;
  align-items: center;
}
.wos-status-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.wos-status-chip[data-status="open"]        { color: #fec; }
.wos-status-chip[data-status="in_progress"] { color: #9bd; }
.wos-status-chip[data-status="completed"]   { color: #6cd8a8; }
.wos-status-chip[data-status="cancelled"]   { color: #f99; }
.wos-status-chip strong { color: #fff; font-weight: 600; }

#wos-all-list .wos-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}
#wos-all-list .wos-row:hover {
  background: rgba(108, 216, 168, 0.08);
  border-color: rgba(108, 216, 168, 0.25);
}
#wos-all-list .wos-row .wos-priority-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
#wos-all-list .wos-row .wos-priority-dot[data-p="urgent"] { background: #f06868; }
#wos-all-list .wos-row .wos-priority-dot[data-p="high"]   { background: #e8a060; }
#wos-all-list .wos-row .wos-priority-dot[data-p="normal"] { background: #9ab; }
#wos-all-list .wos-row .wos-priority-dot[data-p="low"]    { background: #789; }
#wos-all-list .wos-row .wos-row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cde;
}
#wos-all-list .wos-row .wos-row-meta {
  font-size: 10px;
  color: #8a98ae;
  font-family: ui-monospace, monospace;
}

.wos-kpi-tile {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  padding: 6px 8px;
}
.wos-kpi-tile .lbl {
  font-size: 9px;
  color: #9ab;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.wos-kpi-tile .val {
  font-size: 14px;
  color: #cee;
  font-weight: 600;
  margin-top: 2px;
  font-family: ui-monospace, monospace;
}
.wos-kpi-tile .val.empty { color: #8a98ae; font-weight: 400; }

/* ── Teams tab ─────────────────────────────────────────────────── */
#teams-list .team-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid transparent;
}
#teams-list .team-row:hover {
  background: rgba(108, 216, 168, 0.08);
  border-color: rgba(108, 216, 168, 0.25);
}
#teams-list .team-row input[type="checkbox"] { margin: 0; }
#teams-list .team-row .team-swatch {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
  border: 1px solid white;
}
#teams-list .team-row .team-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #cde;
}
#teams-list .team-row .team-meta {
  font-size: 10px; color: #9ab;
}
#teams-list .team-row .team-fly {
  background: none; border: 1px solid transparent;
  color: #aac; cursor: pointer;
  padding: 0 5px; border-radius: 3px; font-size: 12px;
}
#teams-list .team-row .team-fly:hover {
  background: rgba(108, 216, 168, 0.18);
  color: #cfe;
  border-color: rgba(108, 216, 168, 0.4);
}

/* ── Routes tab ────────────────────────────────────────────────── */
#routes-summary-body {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
#routes-summary-body .routes-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
}
#routes-summary-body .routes-badge.optimal {
  background: rgba(108, 216, 168, 0.18);
  border-color: rgba(108, 216, 168, 0.4);
  color: #cfe;
}
#routes-team-list .routes-team-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid transparent;
}
#routes-team-list .routes-team-row:hover {
  background: rgba(108, 216, 168, 0.08);
  border-color: rgba(108, 216, 168, 0.25);
}
#routes-team-list .routes-team-row .routes-team-swatch {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
  border: 1px solid white;
}
#routes-team-list .routes-team-row .routes-team-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #cde;
}
#routes-team-list .routes-team-row .routes-team-meta {
  font-size: 10px; color: #9ab; font-family: ui-monospace, monospace;
}
#routes-team-list .routes-team-row .routes-team-fly {
  background: none; border: 1px solid transparent;
  color: #aac; cursor: pointer;
  padding: 0 5px; border-radius: 3px; font-size: 12px;
}
#routes-team-list .routes-team-row .routes-team-fly:hover {
  background: rgba(108, 216, 168, 0.18);
  color: #cfe;
  border-color: rgba(108, 216, 168, 0.4);
}

/* The "All WOs" details card needs a list-style fix because we used
   <details>/<summary> for the collapsible. */
#wos-all-card > summary {
  font-size: 13px;
  color: #9ad;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
#wos-all-card > summary::-webkit-details-marker { display: none; }
#wos-all-card > summary::before {
  content: "▸";
  color: #8a98ae;
  transition: transform 0.15s;
}
#wos-all-card[open] > summary::before { transform: rotate(90deg); }
#left-panel .empty {
  color: #9aa7bd;
  font-style: italic;
  font-size: 11px;
  padding: 4px 8px;
}

#panel h3 {
  margin: 0;
  font-size: 14px;
  color: #9ad;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.dash-link {
  font-size: 11px;
  color: #9ad;
  text-decoration: none;
  padding: 3px 6px;
  border: 1px solid rgba(120, 160, 230, 0.3);
  border-radius: 4px;
}

.dash-link:hover {
  background: rgba(120, 160, 230, 0.15);
}

.model-switch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.model-switch-row select {
  font-size: 11px;
  padding: 1px 4px;
  flex: 1;
  max-width: 180px;
}

#panel .meta {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 6px;
}

#panel .key {
  color: #aaa;
}

#panel .empty {
  color: #9aa7bd;
  font-style: italic;
}

#panel .error {
  color: #f88;
}

#status {
  font-size: 11px;
  color: #9aa7bd;
  margin-bottom: 8px;
}

.card {
  background: rgba(40, 40, 55, 0.6);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.card header {
  font-size: 11px;
  color: #aac;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.card header .count {
  color: #9aa7bd;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.row label {
  font-size: 11px;
  color: #ccd;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

select, input[type="number"], button {
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 3px 6px;
  font: inherit;
}

/* Dropdown panel that opens when a <select> is clicked. Without these
   rules the <option> elements inherit OS-native styling (white box +
   grey text) which is unreadable against the dark UI. Works in
   Chromium and Firefox; Safari ignores option styling and falls back
   to the native picker — acceptable since Safari ends up showing the
   OS-themed list which is also readable. */
select option,
select optgroup {
  background-color: #1c222d;
  color: #eee;
}
select option:checked,
select option:hover {
  background-color: #2a3142;
  color: #cde;
}
select:focus option:checked {
  /* WebKit needs an explicit highlight for the selected row inside an
     open dropdown; otherwise it goes back to the default blue
     against-white that's unreadable. */
  background: linear-gradient(#2a3142, #2a3142);
}

input[type="number"] {
  width: 50px;
}

button {
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: rgba(120, 160, 230, 0.25);
  border-color: rgba(120, 160, 230, 0.5);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#picked .field {
  margin-bottom: 2px;
  word-break: break-all;
}

#results-list {
  max-height: 240px;
  overflow-y: auto;
  font-size: 11px;
}

#results-list .result-row {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

#results-list .result-row:hover {
  background: rgba(120, 160, 230, 0.15);
}

#results-list .result-row .cls {
  color: #9ad;
  font-weight: 600;
}

#results-list .result-row .extra {
  color: #9aa7bd;
  font-size: 10px;
}

textarea {
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 3px 6px;
  font: inherit;
  resize: vertical;
}

#wo-list .wo-row {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 6px;
}

#wo-list .wo-row .wo-clickable {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
}

#wo-list .wo-row .wo-clickable:hover {
  background: rgba(120, 160, 230, 0.1);
}

#wo-list .wo-title {
  flex: 1;
  font-size: 12px;
}

#wo-list .wo-meta {
  font-size: 10px;
  color: #9aa7bd;
}

#wo-list .wo-row.editing {
  background: rgba(120, 160, 230, 0.18);
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #9aa7bd;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn.danger:hover {
  color: #fff;
  background: rgba(180, 50, 50, 0.5);
  border-color: rgba(220, 60, 60, 0.6);
}

.form-mode {
  font-size: 10px;
  color: #9ad;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

#route-result {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(255, 200, 60, 0.12);
  border-left: 3px solid #fc6;
  border-radius: 3px;
  font-size: 11px;
}

#route-result .route-summary b {
  color: #fc6;
}

#gis-layers .gis-layer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#gis-layers .gis-layer:last-child {
  border-bottom: none;
}

#gis-layers .gis-layer label {
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

#gis-layers .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

#gis-layers .gis-meta {
  font-size: 10px;
  color: #9aa7bd;
}

.pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill.open       { background: #345; color: #9bd; }
.pill.in_progress{ background: #543; color: #fc8; }
.pill.completed  { background: #353; color: #9d9; }
.pill.cancelled  { background: #444; color: #aaa; }
.pill.urgent     { background: #722; color: #fcc; }
.pill.high       { background: #642; color: #fc9; }
.pill.normal     { background: #345; color: #bcd; }
.pill.low        { background: #333; color: #aaa; }
