/* ChargeViz locations.css (from the webapp, comments stripped). */
.loc-page { display: flex; flex-direction: column; gap: var(--space-4); }
.loc-header { margin-bottom: 0; }
.loc-count { color: var(--text-muted); font-weight: var(--fw-regular); margin-left: var(--space-1); }
.loc-save-error { margin: 0; align-self: center; font-size: var(--text-xs); color: var(--color-negative); }
.loc-band { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.loc-stepper,
.loc-control {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 32px; background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs); font-size: var(--text-sm);
}
.loc-control { padding: 0 var(--space-3); cursor: pointer; }
.loc-control input[type=checkbox] { margin: 0; accent-color: var(--color-primary); }
.loc-control__label { color: var(--text-muted); }
.loc-control__select {
  border: 0; background: transparent; font: inherit; color: var(--text-primary);
  font-weight: var(--fw-medium); cursor: pointer;
}
.loc-control__select:focus { outline: none; }
.loc-control:focus-within { border-color: var(--color-border-focus); box-shadow: var(--focus-ring); }
.loc-stepper { overflow: hidden; }
.loc-stepper__btn {
  height: 100%; padding: 0 var(--space-3); border: 0; background: transparent;
  color: var(--text-secondary); font-size: var(--text-base); cursor: pointer;
}
.loc-stepper__btn:hover:not(:disabled) { background: var(--color-surface-subtle); color: var(--text-primary); }
.loc-stepper__btn:disabled { color: var(--text-disabled); cursor: default; }
.loc-stepper__btn:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.loc-stepper__label {
  min-width: 112px; height: 100%; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); border: 0;
  border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border);
  background: transparent; font: inherit; font-weight: var(--fw-semibold);
  color: var(--text-primary); padding: 0 var(--space-3); cursor: pointer;
}
.loc-stepper__label:hover { background: var(--color-surface-subtle); }
.loc-stepper__label:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.loc-month { position: relative; }
.loc-month__menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: var(--z-dropdown);
  width: 248px; padding: var(--space-2) var(--space-3) var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.loc-month__year + .loc-month__year { margin-top: var(--space-2); }
.loc-month__year-label {
  margin: var(--space-1) 0; font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.loc-month__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.loc-month__option {
  padding: 6px 0; border: 0; border-radius: var(--radius-sm); background: transparent;
  font: inherit; font-size: var(--text-sm); color: var(--text-primary); cursor: pointer;
}
.loc-month__option:hover { background: var(--color-surface-subtle); }
.loc-month__option:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-month__option.is-current {
  background: var(--color-primary); color: var(--color-primary-text); font-weight: var(--fw-semibold);
}
.loc-filters { display: flex; }
.loc-filters .chip-bar { padding-top: 0; }
.loc-filters .chip__btn { white-space: nowrap; }
.loc-search { flex: 1 1 220px; min-width: 180px; cursor: text; }
.loc-search__icon { color: var(--text-muted); }
.loc-search__input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; color: var(--text-primary);
}
.loc-table {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.loc-table[aria-busy=true] > * { opacity: .55; transition: opacity var(--dur) var(--ease-out); }
.loc-table[aria-busy=true]::after {
  content: 'Updating…'; position: absolute; top: var(--space-3); left: 50%;
  transform: translateX(-50%); z-index: 6; pointer-events: none;
  padding: 4px var(--space-3); border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-primary-text);
  font-size: var(--text-xs); font-weight: var(--fw-semibold); box-shadow: var(--shadow-md);
}
.loc-summary {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  padding: var(--space-3) var(--space-4); font-size: var(--text-sm);
}
.loc-summary__lead { display: flex; align-items: center; flex: none; }
.loc-summary__title { font-weight: var(--fw-semibold); }
.loc-summary__tags { display: flex; gap: var(--space-2); flex-wrap: wrap; flex: 0 1 auto; min-width: 0; }
.loc-summary__setups { margin-left: auto; flex: none; }
.loc-tag,
.loc-pill { --mode-bg: var(--color-accent-soft); --mode-fg: var(--cyan-700); }
.loc-tag--highway,
.loc-pill--highway { --mode-bg: var(--color-warning-bg); --mode-fg: var(--color-warning); }
.loc-tag--admin,
.loc-pill--admin { --mode-bg: var(--color-neutral-bg); --mode-fg: var(--navy-700); }
.loc-tag {
  border: 1px solid transparent; border-radius: var(--radius-full);
  background: var(--mode-bg); color: var(--mode-fg);
  padding: 3px var(--space-3); font: inherit; font-size: var(--text-xs);
  font-weight: var(--fw-semibold); cursor: pointer;
}
.loc-tag:hover:not(:disabled) { border-color: var(--mode-fg); }
.loc-tag:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-tag:disabled { opacity: .55; cursor: default; }
.loc-tag[aria-pressed=true] { background: var(--mode-fg); color: var(--color-surface); }
.loc-notice {
  margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--color-surface-subtle); color: var(--text-secondary); font-size: var(--text-sm);
}
.loc-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs); overflow: hidden;
}
.loc-scroll { overflow: auto; max-height: 70vh; }
.loc-grid { display: flex; flex-direction: column; min-width: max-content; font-variant-numeric: tabular-nums; }
.loc-row { display: flex; border-bottom: 1px solid var(--color-border); }
.loc-row:last-child { border-bottom: 0; }
.loc-row--head { position: sticky; top: 0; z-index: 3; background: var(--color-surface-subtle); }
.loc-cell {
  flex: 0 0 188px; width: 188px; padding: var(--space-3);
  display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm);
  background: var(--color-surface);
}
.loc-row--head .loc-cell { background: var(--color-surface-subtle); }
.loc-row:not(.loc-row--head) .loc-cell { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.loc-cell--location {
  flex-basis: 240px; width: 240px; position: sticky; left: 0; z-index: 2;
  border-right: 1px solid var(--color-border); gap: var(--space-1);
}
.loc-row--head .loc-cell--location { z-index: 4; }
.loc-cell--head { padding: var(--space-3); justify-content: center; }
.loc-cell--gear {
  flex: 0 0 44px; width: 44px; margin-left: auto; padding: 0;
  position: sticky; right: 0; z-index: 4;
  align-items: center; justify-content: center;
  border-left: 1px solid var(--color-border);
}
.loc-gear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
}
.loc-gear:hover { background: var(--color-surface); color: var(--text-primary); }
.loc-gear:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-head { display: flex; align-items: center; min-width: 0; }
.loc-head .loc-sort { min-width: 0; }
.loc-head .info__tip { display: none; left: auto; right: -8px; transform: none; }
.loc-head .info__tip::after { left: auto; right: 10px; transform: none; }
.loc-head .info:hover .info__tip,
.loc-head .info:focus-visible .info__tip { display: block; }
.loc-sort {
  display: flex; gap: var(--space-1); align-items: baseline; max-width: 100%;
  color: var(--text-muted); font-size: .6875rem; font-weight: var(--fw-semibold);
  letter-spacing: .04em; text-transform: uppercase; line-height: var(--lh-snug);
  white-space: nowrap; text-decoration: none;
}
.loc-sort__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.loc-sort:hover { color: var(--text-primary); text-decoration: none; }
.loc-sort:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.loc-sort__arrow { color: var(--color-primary); }
.loc-name { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-name { font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.loc-name-link { position: relative; display: block; max-width: 100%; color: inherit; text-decoration: none; }
.loc-name-link:hover .loc-name,
.loc-name-link:focus-visible .loc-name { text-decoration: underline; }
.loc-name-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.loc-map-hint {
  position: absolute; left: 0; top: calc(100% + 2px); z-index: 5; pointer-events: none;
  padding: 2px var(--space-2); border-radius: var(--radius-xs);
  background: var(--color-primary); color: var(--color-primary-text);
  font-size: var(--text-xs); font-weight: var(--fw-semibold); white-space: nowrap;
  opacity: 0; transition: opacity var(--dur-fast) var(--ease-out);
}
.loc-name-link:hover .loc-map-hint,
.loc-name-link:focus-visible .loc-map-hint { opacity: 1; }
.loc-pills { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; margin-top: 2px; }
.loc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-full);
  background: var(--color-surface-subtle); color: var(--text-secondary);
  padding: 2px var(--space-2); font: inherit; font-size: var(--text-xs);
  font-weight: var(--fw-semibold); cursor: pointer; text-align: left;
}
.loc-pill:hover { border-color: var(--mode-fg); color: var(--mode-fg); background: var(--mode-bg); }
.loc-pill:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-pill__dot { flex: none; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--mode-fg); }
.loc-value { line-height: var(--lh-snug); font-size: 14.5px; font-weight: var(--fw-medium); }
.loc-value--text { font-size: var(--text-sm); }
.loc-value--pos { color: var(--color-positive); font-weight: var(--fw-semibold); }
.loc-value--neg { color: var(--color-negative); font-weight: var(--fw-semibold); }
.loc-sub { color: var(--text-muted); font-size: var(--text-xs); }
.loc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.loc-mom {
  font-size: 11px; font-weight: var(--fw-semibold); line-height: 16px; white-space: nowrap;
  border-radius: var(--radius-full); padding: 0 6px;
}
.loc-mom--up { color: var(--color-positive); background: var(--color-positive-bg); }
.loc-mom--down { color: var(--color-negative); background: var(--color-negative-bg); }
.loc-mom--flat { color: var(--text-muted); background: var(--color-surface-subtle); }
.loc-footer {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); background: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--text-secondary);
}
.loc-pager { display: inline-flex; align-items: center; gap: var(--space-2); }
.loc-per { display: inline-flex; align-items: center; gap: var(--space-2); }
.loc-per__select {
  height: 26px; padding: 0 var(--space-2); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); background: var(--color-surface);
  font: inherit; font-size: var(--text-xs); color: var(--text-primary); cursor: pointer;
}
.loc-footer__note { margin-left: auto; color: var(--text-muted); }
.loc-modal-layer { align-items: flex-start; }
.loc-modal { width: min(560px, 100%); }
.loc-modal--perimeter { width: min(600px, 100%); }
.loc-modal__inner,
.loc-editor { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.loc-modal__head {
  position: relative; flex: none;
  padding: var(--space-6) var(--space-16) var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.loc-modal__meta { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--text-sm); }
.loc-modal__body { display: flex; flex-direction: column; gap: var(--space-4); }
.loc-modal__foot {
  flex: none; align-items: center;
  padding: var(--space-4) var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}
.loc-modal__reset { margin-right: auto; }
.loc-modal__group {
  margin: var(--space-2) 0 0; font-size: var(--text-xs); font-weight: var(--fw-semibold);
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted);
}
.loc-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.loc-order__item {
  display: flex; align-items: center; gap: var(--space-1);
  padding: 3px var(--space-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-sm);
}
.loc-order__item.is-drop-target { border-color: var(--color-accent); }
.loc-order__handle { color: var(--text-muted); cursor: grab; }
.loc-order__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-icon-btn {
  border: 0; background: transparent; color: var(--text-secondary); cursor: pointer;
  width: 22px; height: 22px; border-radius: var(--radius-xs); font-size: var(--text-xs);
}
.loc-icon-btn:hover:not(:disabled) { background: var(--color-surface-sunken); color: var(--text-primary); }
.loc-icon-btn:disabled { color: var(--text-disabled); cursor: default; }
.loc-icon-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-picker-group { display: flex; flex-direction: column; }
.loc-pick {
  display: flex; align-items: flex-start; gap: var(--space-2);
  padding: 6px 0; cursor: pointer; font-size: var(--text-sm);
}
.loc-pick input { flex: none; margin: 3px 0 0; accent-color: var(--color-primary); }
.loc-pick__text { display: flex; flex-direction: column; gap: 2px; }
.loc-pick__tip { color: var(--text-muted); font-size: var(--text-xs); line-height: var(--lh-snug); }
.loc-segmented { display: flex; gap: var(--space-1); }
.loc-segmented__option {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 6px var(--space-1); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-secondary); cursor: pointer; text-align: center; position: relative;
}
.loc-segmented__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.loc-segmented__option.is-active {
  background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-text);
}
.loc-segmented__option:focus-within { box-shadow: var(--focus-ring); }
.loc-editor__section {
  border: 0; margin: 0; padding: 0; min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-2);
}
.loc-editor__section .field__label { display: flex; justify-content: space-between; align-items: baseline; }
.loc-editor__section .range { display: block; margin: var(--space-2) 0 var(--space-1); }
.loc-editor__section .range:disabled { opacity: .45; }
.loc-editor__section .km-input { width: 4.4em; }
.loc-editor__label { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text-primary); }
.loc-editor__help { margin: 0; font-size: var(--text-xs); color: var(--text-muted); line-height: var(--lh-snug); }
.loc-editor__error { margin: 0; font-size: var(--text-xs); color: var(--color-negative); }
.loc-check { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); cursor: pointer; }
.loc-check input { margin: 0; accent-color: var(--color-primary); }
.loc-picker { display: flex; flex-direction: column; gap: var(--space-2); }
.loc-picker__toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  height: 36px; padding: 0 var(--space-3); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--text-sm); color: var(--text-primary); cursor: pointer;
}
.loc-picker__toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.loc-picker__panel {
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  overflow: hidden; background: var(--color-surface);
}
.loc-picker__tools {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2); border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
}
.loc-picker__filter {
  flex: 1; min-width: 0; height: 28px; padding: 0 var(--space-2);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--text-sm); background: var(--color-surface);
}
.loc-picker__filter:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--focus-ring); }
.loc-picker__list { list-style: none; margin: 0; padding: 0; height: min(280px, 38vh); overflow-y: auto; }
.loc-pickitem {
  display: flex; align-items: flex-start; gap: var(--space-2);
  padding: 6px var(--space-3); cursor: pointer; border-bottom: 1px solid var(--color-border);
}
.loc-pickitem:hover { background: var(--color-surface-subtle); }
.loc-pickitem:has(input:checked) { background: var(--color-accent-soft); }
.loc-pickitem input { flex: none; margin: 3px 0 0; accent-color: var(--color-primary); }
.loc-pickitem__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.loc-pickitem__name { font-size: var(--text-sm); font-weight: var(--fw-medium); }
.loc-pickitem__meta { font-size: var(--text-xs); color: var(--text-muted); }
@media (max-width: 720px) {
  .loc-cell--location { flex-basis: 180px; width: 180px; }
  .loc-footer__note { margin-left: 0; }
  .loc-modal__head { padding: var(--space-4) var(--space-12) var(--space-3) var(--space-4); }
  .loc-modal__foot { padding: var(--space-3) var(--space-4) var(--space-4); flex-wrap: wrap; }
}
.loc-setup-save { display: flex; flex-direction: column; gap: var(--space-2); }
.loc-setup-save__row { display: flex; gap: var(--space-2); }
.loc-setup-save__name { flex: 1 1 auto; min-width: 0; }
.loc-setups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.loc-setup {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.loc-setup__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loc-setup__name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.loc-setup__meta { color: var(--text-muted); font-size: var(--text-xs); }
.loc-setup__actions,
.loc-setup__confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.loc-setup__actions form { display: contents; }
.loc-setup__confirm > span { flex: 1 1 100%; }
