/* equipment.css — Phase 5 design-system port for /equipment.
 *
 * Production has 3 catalog tables (Roll-off + Dumpster, Scrap,
 * Toilets) with no usage-history aggregations. The static design
 * features sparklines, share-of-type bars, hot/cold rows, last-used
 * timestamps, and an activity feed — all of which need new state.
 * This re-skin matches the design's *feel* (KPI strip, type-icon
 * section heads, cleaner tables) using only data already in
 * EquipmentState.
 *
 * `eq-` prefix avoids collision with classes used in the static
 * design HTMLs (assets/design/Equipment Dashboard.html).
 */

/* ---- Page header ---------------------------------------------------- */
.eq-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.eq-head .ttl {
  font: var(--fw-bold) 26px/1.05 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg-1);
  margin: 0;
}
.eq-head .sub {
  margin-top: 6px;
  font: var(--fw-regular) var(--fs-sm)/1.4 var(--font-body);
  color: var(--fg-3);
  max-width: 720px;
}

/* ---- KPI strip (4 cards) ------------------------------------------- */
.eq-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .eq-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .eq-kpi-row { grid-template-columns: 1fr; }
}
.eq-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.eq-kpi .lbl {
  font: var(--fw-semi) var(--fs-micro)/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-3);
}
.eq-kpi .val {
  font: var(--fw-bold) 30px/1 var(--font-display);
  letter-spacing: -0.015em;
  margin-top: 10px;
  color: var(--fg-1);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.eq-kpi .val .unit {
  font: var(--fw-medium) 13px/1 var(--font-body);
  color: var(--fg-3);
  letter-spacing: 0;
}
.eq-kpi .meta {
  font: var(--fw-medium) 11px/1 var(--font-mono);
  color: var(--fg-4);
  margin-top: 8px;
}

/* ---- Type section card --------------------------------------------- */
.eq-section {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.eq-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.eq-section-head .icon-tile {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.20);
  display: grid; place-items: center;
  color: var(--accent-300);
  flex-shrink: 0;
}
.eq-section-head .icon-tile svg { width: 18px; height: 18px; }
.eq-section-head .title { flex: 1; min-width: 0; }
.eq-section-head h2 {
  margin: 0;
  font: var(--fw-semi) var(--fs-h3)/1.2 var(--font-display);
  color: var(--fg-1);
}
.eq-section-head .sub {
  font: var(--fw-regular) var(--fs-sm)/1.4 var(--font-body);
  color: var(--fg-3);
  margin-top: 4px;
}
.eq-section-head .stat {
  text-align: right;
  flex-shrink: 0;
}
.eq-section-head .stat .v {
  font: var(--fw-bold) 18px/1 var(--font-display);
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.eq-section-head .stat .v .u {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--fg-3);
  margin-left: 3px;
}
.eq-section-head .stat .l {
  font: var(--fw-semi) 9px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-4);
  margin-top: 4px;
}

/* ---- Add-form panel ------------------------------------------------- */
.eq-add-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.eq-add-form .field { flex: 1; min-width: 140px; }
.eq-add-form .field .lbl {
  font: var(--fw-semi) 9px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-4);
  display: block;
  margin-bottom: 6px;
}
.eq-add-form .field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  font: var(--fw-medium) var(--fs-sm)/1 var(--font-body);
  color: var(--fg-2);
  flex-shrink: 0;
  height: 38px;
}
.eq-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-cta);
  color: var(--brand-cta-fg);
  font: var(--fw-semi) var(--fs-sm)/1 var(--font-body);
  padding: 9px 14px;
  border-radius: var(--r-md);
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  height: 38px;
  transition: background 120ms ease;
}
.eq-add-btn:hover { background: var(--brand-cta-hover); }

/* ---- Size table ----------------------------------------------------- */
.eq-table-wrap {
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  /* Horizontal scroll when the catalog table is wider than its
     column (right-rail aside makes the main column narrower than
     the table needs at full content width). overflow:hidden
     before would clip the rightmost columns ("Actions") instead
     of letting the user scroll to see them. */
  overflow-x: auto;
  max-width: 100%;
}
/* Stretch the underlying Radix table to fill the wrap so the
   catalog isn't a narrow column hugging the left edge with empty
   space to the right of it. Fixed table-layout forces columns
   to stick to the widths defined below (instead of squeezing
   based on content), which keeps the same column boundaries
   across all three section tables (Hard / Scrap / Toilets) so
   they line up vertically. */
.eq-table-wrap table {
  width: 100%;
  table-layout: fixed;
}
/* Per-column widths — applied to every catalog table so column
   boundaries align across sections. The Usage column gets the
   biggest budget since it carries the sparkline + share bar +
   percent label; Actions stays tight (icon-only buttons). */
.eq-table-wrap th:nth-child(1),
.eq-table-wrap td:nth-child(1) { width: 90px; }      /* Type    */
.eq-table-wrap th:nth-child(2),
.eq-table-wrap td:nth-child(2) { width: 110px; }     /* Size    */
.eq-table-wrap th:nth-child(3),
.eq-table-wrap td:nth-child(3) { width: 80px; }      /* Has lid */
.eq-table-wrap th:nth-child(4),
.eq-table-wrap td:nth-child(4) { width: 180px; }     /* Inventory */
.eq-table-wrap th:nth-child(5),
.eq-table-wrap td:nth-child(5) { width: auto; }      /* Usage — flex */
.eq-table-wrap th:nth-child(6),
.eq-table-wrap td:nth-child(6) { width: 110px; }     /* Last used */
.eq-table-wrap th:nth-child(7),
.eq-table-wrap td:nth-child(7) { width: 90px; }      /* Actions */
.eq-empty {
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  color: var(--fg-4);
  font-size: var(--fs-sm);
  font-style: italic;
}

.eq-th {
  font: var(--fw-semi) 10px/1 var(--font-body) !important;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-4) !important;
  background: var(--bg-card) !important;
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--border-1) !important;
  /* Header labels stay on one line so "Has lid" / "Last used" don't
     wrap into "Has\nlid" when the column is narrow. */
  white-space: nowrap;
}
.eq-cell {
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--border-1) !important;
  /* Cell contents stay on one line — the size pill ("30 yd³") was
     wrapping to "30\nyd³" when the rail was added. Inventory pill,
     usage cell, and action buttons all read on a single row. */
  white-space: nowrap;
}

/* ---- Lid badges (Yes / No) ----------------------------------------- */
.eq-lid {
  font: var(--fw-semi) var(--fs-micro)/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.eq-lid.yes {
  background: var(--status-complete-bg);
  color: var(--status-complete-fg);
  border-color: var(--status-complete-bd);
}
.eq-lid.no {
  background: var(--bg-input);
  color: var(--fg-4);
  border-color: var(--border-2);
}
/* Placeholder em-dash for sections where the lid concept doesn't
   apply (Scrap = always open; Toilets = integral lid). Lets the
   "Has lid" column line up across all 3 catalog tables. */
.eq-lid.na {
  background: transparent;
  color: var(--fg-4);
  border-color: transparent;
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.5;
}

/* ---- Size label cell (mono, like equipment IDs) -------------------- */
.eq-size-label {
  font: var(--fw-semi) 14px/1 var(--font-mono);
  color: var(--fg-1);
  letter-spacing: 0.02em;
}
.eq-type-cell {
  font: var(--fw-medium) var(--fs-sm)/1 var(--font-body);
  color: var(--fg-2);
}

/* ---- Inline edit + actions ----------------------------------------- */
.eq-input {
  width: 160px;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 7px 10px;
  color: var(--fg-1);
  font: var(--fw-medium) var(--fs-sm)/1 var(--font-body);
  outline: none;
  transition: border-color 120ms ease;
}
.eq-input:focus { border-color: var(--accent-400); }
.eq-input::placeholder { color: var(--fg-4); }

.eq-row-actions { display: inline-flex; gap: 6px; }
.eq-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  color: var(--fg-2);
  font: var(--fw-semi) var(--fs-xs)/1 var(--font-body);
  padding: 6px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.eq-icon-btn:hover { background: var(--bg-hover); color: var(--fg-1); }
/* Icon-only variant for tight columns (table action cells) — square,
   no text label, hover tooltips identify the action. */
.eq-icon-btn.icon-only {
  padding: 6px;
  width: 28px;
  height: 28px;
  justify-content: center;
}
.eq-icon-btn.primary {
  background: var(--brand-cta);
  color: var(--brand-cta-fg);
  border-color: transparent;
}
.eq-icon-btn.primary:hover { background: var(--brand-cta-hover); }
.eq-icon-btn.danger:hover {
  color: var(--status-issue-fg);
  border-color: var(--status-issue-bd);
  background: var(--status-issue-bg);
}

/* ---- Lid-coverage badge in section head ---------------------------- */
/* Sits next to the size-count stat on the hard-waste section header
 * (".eq-section-head .stat" already defines the count block). The
 * sub-info appears under the percentage and reads as "9 of 12 with lids". */
.eq-lid-pct {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--border-1);
  text-align: right;
  flex-shrink: 0;
}
.eq-lid-pct .v {
  font: var(--fw-bold) 18px/1 var(--font-display);
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.eq-lid-pct .l {
  font: var(--fw-semi) 9px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-4);
  margin-top: 4px;
}
.eq-lid-pct .frac {
  font: var(--fw-medium) 11px/1 var(--font-mono);
  color: var(--fg-3);
  margin-top: 4px;
}

/* ---- Usage column (sparkline + count + share bar) ----------------- */
.eq-usage-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 140px;
}
.eq-usage-count {
  font: var(--fw-semi) 12px/1 var(--font-body);
  color: var(--fg-2);
}
.eq-usage-count .n {
  color: var(--fg-1);
  font-weight: var(--fw-bold);
}
.eq-usage-count .lbl {
  margin-left: 4px;
  font: var(--fw-medium) 10px/1 var(--font-body);
  color: var(--fg-4);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}
.eq-spark {
  width: 200px;
  max-width: 100%;
  height: 28px;
  overflow: visible;
  display: block;
}
.eq-spark polyline {
  fill: none;
  stroke: var(--accent-400);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.eq-cold-row .eq-spark polyline { stroke: var(--fg-4); opacity: 0.55; }

.eq-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eq-share-bar {
  width: 160px;
  max-width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 160px;
}
.eq-share-bar > span {
  display: block;
  height: 100%;
  background: var(--accent-500);
  border-radius: inherit;
  transition: width 200ms ease;
}
.eq-share-pct {
  font: 600 11px/1 var(--font-mono);
  color: var(--accent-300);
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}
.eq-cold-row .eq-share-bar > span { background: var(--fg-4); opacity: 0.55; }
.eq-cold-row .eq-share-pct { color: var(--fg-4); opacity: 0.55; }

/* ---- Last-used cell ------------------------------------------------ */
.eq-last-used {
  font: var(--fw-medium) 12px/1.2 var(--font-mono);
  color: var(--fg-2);
  white-space: nowrap;
}
.eq-last-used.cold { color: var(--fg-4); }
.eq-last-used.never {
  color: var(--fg-4);
  font-style: italic;
  font-family: var(--font-body);
}

/* ---- Cold row (≥ COLD_THRESHOLD_DAYS unused) ----------------------- */
/* Dims everything in the row uniformly — Tailwind's row-level opacity
 * isn't reachable through Radix's table, so we lean on direct child
 * cell selectors. */
.eq-cold-row > td {
  opacity: 0.62;
}
.eq-cold-row .eq-size-label,
.eq-cold-row .eq-type-cell {
  color: var(--fg-3);
}

/* ---- Controls strip (view filter) --------------------------------- */
.eq-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.eq-controls-label {
  font: var(--fw-semi) 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-4);
}

/* Segmented button group — three mutually-exclusive view modes. */
.eq-segmented {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.eq-seg-btn {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--fg-3);
  font: var(--fw-semi) var(--fs-sm)/1 var(--font-body);
  transition: background 120ms ease, color 120ms ease;
}
.eq-seg-btn:hover { color: var(--fg-1); }
.eq-seg-btn.active {
  background: var(--bg-card);
  color: var(--accent-300);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.eq-seg-btn:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 1px;
}

/* ---- Clickable usage cell (active rows open the drill dialog) ----- */
.eq-usage-cell.clickable {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 6px 8px;
  margin: -6px -8px;  /* visually flush with table cell */
  cursor: pointer;
  text-align: left;
  width: auto;
  transition: background 120ms ease, border-color 120ms ease;
}
.eq-usage-cell.clickable:hover {
  background: var(--bg-hover);
  border-color: var(--border-2);
}
.eq-usage-cell.clickable:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 1px;
}

/* ---- Drill-down dialog -------------------------------------------- */
.eq-drill {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  color: var(--fg-1);
}
.eq-drill-table-wrap {
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.eq-drill-cell {
  padding: 8px 12px !important;
  border-bottom: 1px solid var(--border-1) !important;
  font: var(--fw-medium) var(--fs-sm)/1.3 var(--font-body);
  color: var(--fg-2);
  vertical-align: middle;
}
.eq-drill-cell.mono {
  font-family: var(--font-mono);
  color: var(--fg-3);
  white-space: nowrap;
}
.eq-drill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: var(--fw-semi) var(--fs-xs)/1 var(--font-body);
  color: var(--accent-300);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background 120ms ease, color 120ms ease;
}
.eq-drill-link:hover {
  background: var(--bg-hover);
  color: var(--accent-200);
}
.eq-drill-empty {
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: 28px;
  text-align: center;
  color: var(--fg-4);
  font-style: italic;
  font-size: var(--fs-sm);
}

/* ============================================================ */
/* Per-unit serial register (Units dialog + row entry button)   */
/* ============================================================ */

/* "N units" entry button under each catalog row's inventory pill. */
.eq-units-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 3px 9px;
  color: var(--fg-3);
  font: var(--fw-semi) 11.5px/1 var(--font-body);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease,
    border-color 120ms ease;
}
.eq-units-btn:hover {
  background: rgba(148, 163, 184, 0.10);
  color: var(--fg-1);
  border-color: var(--border-1);
}

.eq-units-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
  overflow-y: auto;
}
.eq-unit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 8px 10px;
}
.eq-unit-row.add {
  background: transparent;
  border-style: dashed;
  margin-bottom: 4px;
}
.eq-unit-row.editing {
  border-color: var(--accent-500);
}
.eq-unit-serial {
  font-weight: var(--fw-semi);
  font-size: 13px;
  color: var(--fg-1);
  min-width: 110px;
}
.eq-unit-serial.muted {
  color: var(--fg-4);
  font-style: italic;
  font-weight: 500;
}
.eq-unit-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.30);
  color: #fb7185;
  border-radius: var(--r-md);
  padding: 7px 10px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.eq-unit-loc {
  font-size: 11.5px;
  color: var(--fg-4);
  white-space: nowrap;
}
.eq-unit-loc.out {
  color: var(--accent-500);
  font-weight: var(--fw-semi);
}

/* ============================================================ */
/* Right-rail (Equipment Dashboard.html § eq-aside)              */
/* ============================================================ */

.eq-content-grid {
  display: grid;
  /* Rail trimmed from 320px to 280px so the catalog tables get
     ~40px more horizontal room — enough to keep the Actions
     column visible at typical viewport widths without needing
     horizontal scroll. The form fields inside the rail still
     fit comfortably at 280px. */
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) {
  .eq-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.eq-main-col {
  min-width: 0;   /* lets the catalog tables shrink inside the grid */
}
.eq-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 12px;
  align-self: start;
}
.eq-aside-card {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  padding: 14px 14px 16px;
}
.eq-aside-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 9px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-1);
}
.eq-aside-card-head svg { color: var(--fg-4); flex-shrink: 0; }

/* Alert variant — the "Out 30+ days" idle-units card draws attention in amber. */
.eq-aside-card--alert { border-color: rgba(245, 158, 11, 0.40); }
.eq-aside-card-head--alert {
  color: #f59e0b;
  border-bottom-color: rgba(245, 158, 11, 0.30);
}
.eq-aside-card-head--alert svg { color: #f59e0b; }

/* ---- Add-a-size form rows ---- */
.eq-rail-form-row { margin-bottom: 12px; }
.eq-rail-form-label {
  font: 600 10px/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-4);
  margin-bottom: 6px;
}
.eq-rail-seg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.eq-rail-seg-btn {
  padding: 7px 10px;
  font: 600 12px/1 var(--font-body);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  transition: background 80ms ease, color 80ms ease, border-color 80ms ease;
}
.eq-rail-seg-btn:hover {
  background: var(--bg-input);
  color: var(--fg-1);
}
.eq-rail-seg-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.eq-rail-unit-suffix {
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.eq-rail-lid-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
}
.eq-rail-lid-info { font-size: 13px; color: var(--fg-1); }
.eq-rail-lid-hint {
  margin-top: 2px;
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.4;
}
.eq-rail-form-err {
  background: rgba(244, 63, 94, 0.10);
  border: 1px solid rgba(244, 63, 94, 0.30);
  color: #fb7185;
  border-radius: var(--r-md);
  padding: 7px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}
.eq-rail-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--accent-500, #f59e0b);
  color: #0f172a;
  border: none;
  border-radius: var(--r-md);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
  transition: background 80ms ease;
}
.eq-rail-submit:hover { background: #fbbf24; }

/* ---- Type-mix bar chart ---- */
.eq-mix-list { display: flex; flex-direction: column; gap: 10px; }
.eq-mix-row {
  display: grid;
  grid-template-columns: 60px 1fr 36px;
  align-items: center;
  gap: 10px;
}
.eq-mix-label {
  font-size: 12px;
  color: var(--fg-2);
}
.eq-mix-bar {
  height: 16px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}
.eq-mix-bar-fill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  height: 100%;
  border-radius: 999px;
  transition: width 200ms ease;
  min-width: 26px;       /* leaves room for "0%" / "1%" labels */
}
.eq-mix-pct {
  font: 600 10px/1 var(--font-mono);
  color: #0f172a;        /* dark text on the bright fill colors */
  letter-spacing: 0.02em;
}
.eq-mix-value {
  font: 500 12px/1 var(--font-mono);
  color: var(--fg-3);
  text-align: right;
}

/* ---- Catalog activity feed ---- */
.eq-feed-list { display: flex; flex-direction: column; gap: 10px; }
.eq-feed-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.eq-feed-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.85);
}
.eq-feed-text { flex: 1; min-width: 0; }
.eq-feed-msg {
  font-size: 12.5px;
  color: var(--fg-1);
  line-height: 1.4;
}
.eq-feed-meta {
  font-size: 11px;
  color: var(--fg-4);
  margin-top: 2px;
}
.eq-feed-empty {
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
  line-height: 1.5;
}

/* ============================================================ */
/* Equipment-map sticky filters (Phase 41 — design parity)       */
/* ============================================================ */

/* Sticky wrapper around the section head + filter row + active
   chips. Pins to the top of the viewport (under the page-shell's
   sticky top strip at ~56px) so when the user scrolls down a
   tall map, the filter controls stay visible. */
/* Default: filter row sits in the natural document flow above
   the map. Scrolls away with the page on a long viewport. */
.eq-map-filters {
  background: var(--bg-card);
  border-bottom: 1px solid var(--bd-1);
  padding: 12px 16px 10px;
  margin: 0 -16px 12px;
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
}
/* `.follow` variant — sticks to the top of the viewport (under
   the page-shell top strip) and z-indexed above the Leaflet
   pane so the filter overlays the map as the user scrolls down
   a tall canvas. Subtle blur + slight opacity so the dispatcher
   gets a hint of the map underneath without losing legibility. */
.eq-map-filters.follow {
  position: sticky;
  top: 56px;
  z-index: 600;        /* Leaflet panes top out around 500–600 */
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);
}
.eq-map-follow-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}
.eq-map-follow-toggle.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.eq-map-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.eq-map-filter-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  flex: 1 1 280px;
}
/* Type-toggles block doesn't want to fight the chip group for
   horizontal space — keep it natural-width when possible. */
.eq-map-filter-block:first-child {
  flex: 0 0 auto;
}
/* Active-filter chip strip below the controls row. */
.eq-map-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--bd-1);
}

/* Compact icon-only variant for the map's Add / Clear buttons —
   inherit the existing .eq-add-btn / .eq-icon-btn styles, just
   tighten the box. */
.eq-add-btn.icon-only,
.eq-icon-btn.icon-only {
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
