:root {
  --bg: #1e2228;
  --panel: #262b33;
  --panel-alt: #2d333d;
  --border: #3a4150;
  --text: #e6e9ef;
  --text-dim: #9aa4b2;
  --accent: #4da3ff;
  --accent-dim: #2c5d8a;
  /* Red, split by use (the Nov 13 audit's quality-client-8: one #e05555 was
     3.79:1 as error words on a panel and 3.75:1 under white words):
     --danger-text for words, and for red lines and marks (borders, stripes,
     dots) on the dark panels, 5.07:1 or more on any of them; --danger-fill
     for a red button or badge with white words on it (--on-fill), 5.62:1.
     test/theme.test.mjs holds each pair. */
  --danger-text: #ff7b7b;
  --danger-fill: #c62828;
  --radius: 6px;

  /* Surfaces and text beyond the base palette. */
  --bg-deep: #14171b;       /* behind the canvas and the data panels; also the dark ring round handles and port dots */
  --canvas: #181c22;        /* the drawing's background, and the halo behind labels drawn on it */
  --text-faint: #5b6470;    /* lines and the drawings' own marks only (a rack's unit numbers, an export's header line), never words on a panel (2.37:1 on --panel) */
  --grid-line: rgba(255,255,255,0.035);
  --button-hover: #363d49;
  --accent-hover: #6fb4ff;
  --on-accent: #08121d;     /* text on a solid --accent button */
  --on-fill: #fff;          /* text on a solid coloured button or tab */
  --danger-hover: #b71c1c;  /* --danger-fill under the pointer, white words on it */
  --shadow-dialog: rgba(0, 0, 0, 0.45);

  /* Warning / waiting (amber): pending accounts and symbols, edited badges,
     view-only shares, unresolved adapters, collapsed palette groups. */
  --warn-fg: #e8a33d;
  --warn-fg-soft: #ffd27d;
  --warn-border: #7a5c1f;
  --warn-bg: #3a2e12;

  /* OK / approved (green): approve buttons, custom symbols, enabled
     manufacturers, editable shares, resolved adapters. */
  --ok-fg: #8fe38f;
  --ok-stroke: #4caf50;
  --ok-border: #2f6b2f;
  --ok-bg: #14301a;
  --ok-bg-hover: #1b4023;

  /* Discontinued items (red) and AI-drafted symbols (purple). */
  --disc-fg: #ff9d9d;
  --disc-border: #7a2f2f;
  --disc-bg: #3a1414;
  --ai-fg: #cbb2f0;
  --ai-border: #4b3a6b;
  --ai-bg: #251c38;

  /* Quote export buttons. */
  --excel: #2b7a3d;
  --excel-hover: #33903f;
  --pdf: #2b6a7a;
  --pdf-hover: #337d90;

  /* Rack frame and its slot lines. rack.js fills rack units with the same
     two values (js/theme.js), since those go into exports as attributes. */
  --rack-frame: #20242b;
  --rack-slot: #333a45;

  /* White paper: printing and the exported-drawing look. */
  --paper: #fff;
  --ink: #000;
  --print-rule: #ccc;
  --print-fill: #eee;       /* shaded header and totals rows on a printed report */

  /* Sign in with Microsoft's button, in Microsoft's own light theme on
     any card colour (its branding guidelines). */
  --ms-button-bg: #fff;
  --ms-button-hover: #f3f3f3;
  --ms-button-border: #8c8c8c;
  --ms-button-text: #5e5e5e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Topbar */
#topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 8px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* The Riser Draft lockup (index.html): the riser-taps mark, drawn in the text
   colour, then the wordmark. Narrower than the old text name, so the topbar
   never wraps sooner than it did. The sign-in card has a bigger one. */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  white-space: nowrap;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.brand-name { font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1; }
.brand-riser { font-weight: 800; }
.brand-draft { font-weight: 500; }

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: var(--radius);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.mode-btn.active {
  background: var(--accent-dim);
  color: var(--on-fill);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* On mobile these two groups (project actions + account) collapse behind a
   single hamburger button instead of wrapping across several rows — see the
   max-width:700px overrides below. On desktop the wrapper is invisible to
   layout, so .topbar-actions/.topbar-user behave exactly as if it weren't
   there. */
.mobile-menu-toggle { display: none; }
.topbar-secondary { display: contents; }
.topbar-nav { display: contents; }

button {
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

button:hover { background: var(--button-hover); }
button:active { background: var(--accent-dim); }

/* One keyboard-focus ring for everything that takes focus — buttons, tabs,
   palette items, fields. The browser's own ring is faint on this dark theme,
   and several controls have no border to carry it. A mouse click doesn't
   show it (that's what :focus-visible leaves out). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Undo/Redo say plainly when there's nothing to take back. */
.history-btn:disabled { opacity: 0.45; cursor: default; background: var(--panel-alt); }

.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-direction: column;
  min-width: 150px;
  z-index: 50;
  overflow: hidden;
}

.dropdown-menu.open { display: flex; }

.dropdown-menu button {
  border: none;
  border-radius: 0;
  text-align: left;
  background: transparent;
}

.dropdown-menu button:hover { background: var(--accent-dim); }
.dropdown-menu button:disabled { opacity: 0.45; cursor: default; background: transparent; }

/* A menu in the drawing toolbar opens rightwards from its button, not
   leftwards like the topbar's. */
.toolbar-dropdown .dropdown-menu { left: 0; right: auto; }

/* The Arrange menu (arrangeMenu.js): an item that needs more units selected
   is greyed as a disabled one is, but stays reachable by the arrow keys,
   with its tooltip saying how many. A rule sets its groups apart. */
.dropdown-menu button[aria-disabled="true"] { opacity: 0.45; cursor: default; background: transparent; }
.dropdown-menu .menu-group-start { border-top: 1px solid var(--border); }

/* Workspace */
#workspace {
  flex: 1;
  display: flex;
  min-height: 0;
}

#palette, #properties {
  width: 240px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 10px;
  overflow-y: auto;
}

#properties {
  border-right: none;
  border-left: 1px solid var(--border);
}

/* Panel chrome: pin/unpin buttons, drag-resize handles, and the slim edge
   tabs that restore an unpinned panel. Widths + pinned state persist in
   localStorage (js/panels.js). */
.panel-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.panel-header-row .palette-header { margin: 0; }
.panel-pin-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.panel-pin-btn:hover { color: var(--text); border-color: var(--border); background: var(--panel-alt); }
.panel-resizer {
  width: 5px;
  flex-shrink: 0;
  cursor: col-resize;
  background: transparent;
  transition: background 0.12s ease;
}
.panel-resizer:hover, .panel-resizer.dragging { background: var(--accent); opacity: 0.5; }
#canvas-area { position: relative; }
.panel-tab {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  z-index: 30;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 3px;
  cursor: pointer;
}
.panel-tab:hover { color: var(--text); background: var(--panel-alt); }
#palette-tab { left: 0; border-left: none; border-radius: 0 6px 6px 0; }
#properties-tab { right: 0; border-right: none; border-radius: 6px 0 0 6px; }

/* Collapsible palette groups */
.palette-group-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font: inherit;
}
.palette-group-toggle:hover { color: var(--text); }
.palette-group-chevron {
  font-size: 13px;
  line-height: 1;
  width: 14px;
  flex-shrink: 0;
  color: var(--text);
}
.palette-group-toggle.collapsed .palette-group-chevron { color: var(--warn-fg); }
.palette-group-toggle.collapsed .palette-group-count { color: var(--warn-fg); border-color: var(--warn-border); }
.palette-group-count {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 6px;
}

.palette-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin: 10px 0 6px;
}

.palette-header:first-child { margin-top: 0; }

#symbol-search {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  margin-bottom: 8px;
}

.symbol-filter-row {
  display: flex;
  flex-direction: column; /* stacked so long manufacturer names aren't clipped in the narrow palette */
  gap: 6px;
  margin-bottom: 8px;
}
.symbol-filter-row select {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
}

/* A team's own symbol: made from here, kept in Admin → Team symbols
   (teamSymbols.js). */
.palette-new-symbol {
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
}

.symbol-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.symbol-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  text-align: center;
  min-width: 0;
}

.symbol-item:hover { border-color: var(--accent); }

.symbol-item svg { width: 36px; height: 36px; }

/* AI drafts are usable straight away, but say so: a corner tag on the palette
   tile, and the full note in the properties panel where there's room. */
.symbol-item.ai-draft { position: relative; }

.symbol-ai-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--ai-fg);
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  /* Its own tooltip says what AI means (aiDraftWords.js). */
  cursor: help;
}

/* A team's own symbol says so in its tile's corner, like an AI draft. */
.symbol-item.team-symbol { position: relative; }
.symbol-team-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--bg);
  pointer-events: none;
}

.prop-team-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 10px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
}
.prop-team-note span { flex: 1 1 140px; min-width: 0; }
.prop-team-note button { font-size: 11px; padding: 3px 8px; }

.prop-disc-note {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}
.prop-disc-note .items-disc-badge { margin: 0 6px 0 0; }
.prop-retired-note {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}
.prop-gone-jack { margin: 0 0 10px; }
.port-ghost-row {
  font-size: 11px;
  font-style: italic;
  color: var(--text-dim);
  padding: 3px 0;
}
.prop-ai-note {
  margin: 0 0 10px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ai-fg);
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  border-radius: var(--radius);
}

.symbol-item .symbol-label {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.2;
  overflow-wrap: break-word;
  width: 100%;
}

/* The tile Enter in the search box places (ui.js showHighlight), ringed
   like a focused one, and only while the box has focus. */
#palette:has(#symbol-search:focus) .symbol-item.highlighted {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
#palette:has(#symbol-search:focus) .symbol-item.highlighted .symbol-label { color: var(--text); }

/* Best match's heading: a group heading that doesn't close. */
.palette-results-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.palette-empty {
  grid-column: 1 / -1;
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

/* Canvas area */
#canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-deep);
}

#canvas-toolbar {
  display: flex;
  /* Wrap onto extra rows when the canvas column gets narrow (e.g. the
     Properties panel dragged wide) instead of overflowing sideways
     underneath/over the side panels. */
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 4px;
  padding: 6px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#zoom-level {
  min-width: 42px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

#canvas-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
}
/* An empty drawing's card (emptyCanvas.js), in the middle of the view:
   drags and clicks go through it to the canvas, but for its button. */
.empty-canvas {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.empty-canvas p { margin: 0; }
.empty-canvas .empty-canvas-note { margin-top: 8px; color: var(--text-dim); font-size: 12px; }
.empty-canvas button { pointer-events: auto; margin-top: 10px; }
/* The Save button's label (saveLabel.js): "Saving…", "Saved 2:31 PM". */
.save-label { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.save-label.problem { color: var(--danger-text); }
.save-label:empty { display: none; }
/* The design's drawing sheets (sheetTabs.js): tabs under the canvas, the
   open one in the canvas's colour so it reads as the page it opens. The
   strip never shrinks; when the tabs run past it, it scrolls sideways. */
.sheet-tabs {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  height: 28px;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.sheet-tab-list {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.sheet-tab {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  max-width: 200px;
  border-right: 1px solid var(--border);
}
.sheet-tab.open { background: var(--canvas); box-shadow: inset 0 2px 0 var(--accent); }
.sheet-tab-btn, .sheet-tab-more, .sheet-tab-add {
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  padding: 0 10px;
}
.sheet-tab-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text-dim);
}
.sheet-tab.open .sheet-tab-btn { color: var(--text); }
.sheet-tab-btn:hover, .sheet-tab-more:hover, .sheet-tab-add:hover { background: var(--button-hover); }
.sheet-tab-num { font-weight: 600; color: var(--text-dim); }
.sheet-tab-name { overflow: hidden; text-overflow: ellipsis; }
/* At least 24 px wide, a pointer's target (WCAG 2.5.8). */
.sheet-tab-more { min-width: 24px; padding: 0 7px 0 2px; color: var(--text-dim); }
.sheet-tab-add { font-size: 16px; line-height: 1; padding: 0 12px; flex-shrink: 0; }
.sheet-tab .sheet-tab-num:first-child { padding-left: 10px; align-self: center; }
.sheet-tab-input {
  align-self: center;
  width: 140px;
  margin: 0 6px;
  padding: 2px 5px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
}
/* Its menu opens upwards, over the canvas, from the tab it's for. */
.sheet-tab-menu { top: auto; bottom: 100%; right: auto; margin: 0 0 4px; }
/* A tab dragged along the strip: faded, with a bar where it would go. */
.sheet-tab-list.dragging, .sheet-tab-list.dragging .sheet-tab-btn { cursor: grabbing; }
.sheet-tab.dragged { opacity: 0.55; }
.sheet-tab.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.sheet-tab.drop-after { box-shadow: inset -3px 0 0 var(--accent); }
.sheet-tab.open.drop-before { box-shadow: inset 0 2px 0 var(--accent), inset 3px 0 0 var(--accent); }
.sheet-tab.open.drop-after { box-shadow: inset 0 2px 0 var(--accent), inset -3px 0 0 var(--accent); }

/* Holds the scroll area out where the view is while the Signal Flow canvas
   shrinks back under it (signalFlow.js holdScrollArea): an empty point past
   the canvas's edge, let go of as the view moves back in. */
.canvas-scroll-hold {
  position: absolute;
  width: 1px;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}

#drawing-svg {
  display: block;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
  background-color: var(--canvas);
}

/* Devices */
.device-node { cursor: grab; }
.device-node.selected .device-box { stroke: var(--accent); stroke-width: 2.5; }
.device-node:active { cursor: grabbing; }
.marquee-rect {
  fill: rgba(77, 163, 255, 0.15);
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4,3;
  pointer-events: none;
}

/* Alignment guides while a unit is dragged (FR-72): a thin line, one
   screen pixel whatever the zoom, in a colour of their own so they never
   read as a selected unit's outline or a wire. */
.align-guides { pointer-events: none; }
.align-guide {
  stroke: #e0407b;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  shape-rendering: crispEdges;
}

/* Zones: dashed room/area/rack boundary annotations */
.zone-node { cursor: grab; }
.zone-node:active { cursor: grabbing; }
.zone-box {
  fill: rgba(154, 164, 178, 0.06);
  stroke: var(--text-dim);
  stroke-width: 1.5;
  stroke-dasharray: 7,5;
  pointer-events: all;
}
.zone-node.selected .zone-box { stroke: var(--accent); stroke-width: 2; }
.zone-label {
  fill: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  pointer-events: none;
  user-select: none;
}
.zone-node.selected .zone-label { fill: var(--accent); }
.zone-resize-handle {
  fill: var(--accent);
  stroke: var(--bg-deep);
  stroke-width: 1.5;
}
.zone-resize-nw, .zone-resize-se { cursor: nwse-resize; }
.zone-resize-ne, .zone-resize-sw { cursor: nesw-resize; }
.zone-draw-rect {
  fill: rgba(154, 164, 178, 0.12);
  stroke: var(--text-dim);
  stroke-width: 1.5;
  stroke-dasharray: 7,5;
  pointer-events: none;
}
#drawing-svg.zone-draw-cursor { cursor: crosshair; }
#drawing-svg { cursor: grab; }
#drawing-svg.panning { cursor: grabbing; }
.device-label {
  fill: var(--text);
  font-size: 11px;
  font-family: inherit;
  pointer-events: none;
  user-select: none;
}
.device-label-mfr {
  fill: var(--text-dim);
  font-size: 9.5px;
}
/* A device's sub-label, the small line under its name (see appendSublabel in
   signalFlow.js, which fits it to the box at this size). */
.device-label-sub {
  fill: var(--text-dim);
  font-size: 9.5px;
  font-style: italic;
}
/* A speaker's tap (FR-61). In its box's top-right corner (appendTapCorner in
   signalFlow.js, .device-label-tap-in) it's the sub-label's text as it is,
   in the box's own colours when exported too. Where the corner can't take
   it whole, a line of its own just under its box (appendTapLine): on the
   drawing's background, not in the box, so it has the background's halo
   where a wire runs past under the box, as a cable label does, and the
   page's ink when exported (below). */
.device-label-tap:not(.device-label-tap-in) {
  paint-order: stroke fill;
  stroke: var(--canvas);
  stroke-width: 3px;
  stroke-linejoin: round;
}
/* A tap cut with "…" sits outside its box, so hovering it shows the unit's
   tooltip (the tap whole) only if it takes the pointer, as the box does. */
#drawing-svg .device-label-tap-cut { pointer-events: auto; }

.port-dot {
  stroke: var(--bg-deep);
  stroke-width: 1;
  pointer-events: none;
}
.port-label {
  font-size: 8.5px;
  fill: var(--text-dim);
  pointer-events: none;
  user-select: none;
}
.port-connector {
  font-size: 6.5px;
  fill: #6b7280;
  opacity: 0.85;
}
.port-hit {
  fill: transparent;
  pointer-events: all;
  cursor: crosshair;
}
.port-hit:hover {
  fill: rgba(255, 255, 255, 0.1);
}
/* A ghost jack: one taken off its unit's symbol since its wire was drawn
   (state.js addGhostJacks). Its hollow, dashed dot is set on the dot itself
   (signalFlow.js renderPort), so exports draw it the same; its name is in
   italics and quieter than a real jack's. */
.port-ghost .port-label {
  font-style: italic;
  opacity: 0.8;
}

/* Connections */
.connection-group { transition: opacity 0.12s ease; }
.connection-group.dimmed { opacity: 0.18; }
.connection-line {
  fill: none;
  stroke-width: 2;
  cursor: pointer;
}
.connection-line.selected {
  stroke-width: 3;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.6));
}
.connection-hitarea {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  cursor: pointer;
}
.connection-group-flagged { cursor: pointer; }
.connection-flag-tag-hit { cursor: pointer; }
.connection-flag-tag-pole { stroke-width: 1.5; stroke-linecap: round; }
.connection-flag-tag-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: var(--canvas); /* the drawing's background, so the halo blends in */
  stroke-width: 3px;
  stroke-linejoin: round;
}
.connection-flag-tag-label.selected { fill: var(--accent); }
/* An off-sheet tag (a wire to a unit on another sheet, signalFlow.js
   drawOffSheetEnds) is the only thing drawn of its wire here, so its words
   are what's clicked to select it, as a line is. */
#drawing-svg .connection-stub .connection-flag-tag-label { pointer-events: auto; cursor: pointer; }
.connection-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: var(--canvas); /* the drawing's background, so the halo blends in */
  stroke-width: 3px;
  stroke-linejoin: round;
}
/* How the drawing looks exported, the same whether it's a PDF, PNG or SVG
   (see exportUtils.js): on a white page, so text that sits on the page
   itself, rather than inside a device box, turns dark with a white halo.
   `.drawing-svg` is a drawing package's own off-screen drawing
   (designPackage.js), which looks exactly the same; :is() keeps the id's
   weight for both. */
:is(#drawing-svg, .drawing-svg).export-look { background: var(--paper) !important; }
:is(#drawing-svg, .drawing-svg).export-look .connection-label,
:is(#drawing-svg, .drawing-svg).export-look .connection-flag-tag-label,
:is(#drawing-svg, .drawing-svg).export-look .device-label-tap:not(.device-label-tap-in) { fill: var(--ink); stroke: var(--paper); }
:is(#drawing-svg, .drawing-svg).export-look .adapter-badge-label { stroke: var(--paper); }
/* A rack's name above it, its Location over that and its RU numbers beside
   it sit on the page, not on the dark rack frame, so they need the page's
   ink too — in the screen's light text colour they all but vanish on white. */
:is(#drawing-svg, .drawing-svg).export-look :is(.rack-header-label, .rack-header-location, .rack-ru-label) { fill: var(--ink); }
:is(#drawing-svg, .drawing-svg).export-look :is(.waypoint-handle, .zone-resize-handle, .marquee-rect, .zone-draw-rect, .align-guides) { display: none; }
/* A drawing package's drawing (designPackage.js), drawn in the page so the
   stylesheet reaches it, but out of sight and out of reach while it's
   there: never display: none, which would leave nothing to measure. */
.drawing-offscreen { position: fixed; left: -100000px; top: 0; pointer-events: none; overflow: hidden; width: 1px; height: 1px; }
.drawing-offscreen .drawing-svg { display: block; }
.export-header-title { fill: var(--canvas); font-size: 24px; font-weight: 700; }
.export-header-meta { fill: var(--text-faint); font-size: 12px; }
.export-header-rule { stroke: #c9ced6; stroke-width: 1; }

.waypoint-handle {
  fill: var(--accent);
  stroke: var(--bg-deep);
  stroke-width: 1.5;
  cursor: grab;
  pointer-events: all;
}
.waypoint-handle:hover {
  fill: #fff;
}

/* Rack */
.rack-frame-bg { fill: var(--rack-frame); stroke: var(--border); stroke-width: 1.5; }
.rack-frame-bg.selected { stroke: var(--accent); stroke-width: 2.5; }
.rack-slot-line { stroke: var(--rack-slot); stroke-width: 1; }
.rack-ru-label { fill: var(--text-faint); font-size: 8px; }
.rack-device.selected rect.rack-device-box { stroke: var(--accent); stroke-width: 2.5; }
.rack-device-box { stroke: var(--border); stroke-width: 1; }
.rack-device-label { fill: var(--text); font-size: 11px; pointer-events: none; user-select: none; }
/* A unit's sub-label, after its name or under it (rack.js fits it at this size). */
.rack-device-sublabel { fill: var(--text-dim); font-size: 9.5px; font-style: italic; pointer-events: none; user-select: none; }
.rack-header-label { fill: var(--text); font-size: 12px; font-weight: 600; }
/* A rack's Location, the line over its name (rack.js fits it at this size). */
.rack-header-location { fill: var(--text-dim); font-size: 11px; }

/* Properties panel */
#properties-content .hint {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.4;
}
/* A rack's heat by unit: "est." on those worked out from watts. */
#properties-content .rack-heat-list { margin: 6px 0 10px; padding-left: 18px; }
.rack-heat-figure { white-space: nowrap; }
.rack-heat-est {
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10.5px;
}

.prop-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.prop-row label {
  font-size: 11px;
  color: var(--text-dim);
}

.prop-row input, .prop-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 13px;
  font-family: inherit;
}

/* A checkbox row (Supplied by others): the box beside its words, at the
   size of a field's text rather than a field's small label. */
.prop-row .prop-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.prop-row .prop-check input { margin: 0; padding: 0; }
.prop-check-row .hint { margin: 0; }

.prop-danger {
  background: var(--danger-fill);
  border-color: var(--danger-fill);
  color: var(--on-fill);
  width: 100%;
  margin-top: 4px;
}

.prop-flag-btn { width: 100%; margin-top: 4px; }
/* Speaker outputs and taps in Properties (FR-61, speakerOutputsUI.js): each
   output's mode, the line on what its speakers add up to with its status
   chip (the Tools tab's .tool-chip), and its speakers to go to. */
.spk-source { margin: 0 0 8px; }
.spk-output { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.spk-output:last-child { border-bottom: 0; }
.spk-output .prop-row { margin-bottom: 4px; }
.spk-run-line { margin: 2px 0; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.spk-run-line .spk-status { margin-right: 6px; font-size: 11px; padding: 1px 7px; }
.spk-run-reason { margin: 2px 0; font-size: 12px; line-height: 1.35; color: var(--text-dim); }
.spk-run-speakers { margin-top: 4px; font-size: 12px; }
.spk-run-speakers summary { cursor: pointer; color: var(--text-dim); }
.spk-run-speakers ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
.spk-run-go { width: 100%; text-align: left; font-size: 12px; padding: 3px 6px; overflow-wrap: anywhere; }
.spk-on-amp { margin: 0 0 10px; }
.spk-on-amp .spk-run-go { margin-top: 2px; }
.spk-tap-hint { margin: -6px 0 10px; }
/* LEA's own words on Smart Power Bridge, under the output it's on. */
.spk-bridge-note { margin: 4px 0; padding-left: 8px; border-left: 2px solid var(--border); }
/* A typed rating for an amp with none on file (FR-61 S8). */
.spk-typed { margin: 0 0 8px; }
.spk-typed .prop-row { margin-bottom: 4px; }
.spk-typed-hint { margin: 0 0 6px; }
.spk-typed-remove { width: auto; margin-top: 4px; }
/* Their sources' links, as a spec sheet link reads (specSheets.css). */
.spk-source a, .spk-bridge-note a { color: var(--accent); text-underline-offset: 2px; overflow-wrap: anywhere; }
.spk-source a:hover, .spk-source a:focus-visible, .spk-bridge-note a:hover, .spk-bridge-note a:focus-visible { color: var(--accent-hover); }
/* Drawing sheets in Properties (sheetMoveUI.js). */
.prop-sheet-row { display: flex; align-items: center; gap: 8px; }
.prop-sheet-row span { font-size: 13px; }
.prop-sheet-new { padding: 4px 10px; }
.prop-fit-zone, .prop-sheet-zone, .prop-off-sheet-go, .prop-sheet-wire { width: 100%; margin-top: 4px; }
/* Wire to another sheet (sheetWire.js): each choice under its name, the
   unit and jack lists a few rows tall, a greyed one saying why. */
.sheet-wire-field { display: block; }
.sheet-wire-field > span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 3px; }
.form-dialog select.sheet-wire-list { padding: 4px; }
.form-dialog select.sheet-wire-list option:disabled { color: var(--text-dim); }
.prop-off-sheet { margin: 8px 0 2px; font-size: 13px; }
.prop-flag-btn.active {
  background: #5a3d16;
  border-color: var(--warn-fg);
  color: #f5c988;
}

/* Dashed outline around the port rows an installed option card adds to its
   host chassis (see cardPortBands in signalFlow.js). */
.card-band { pointer-events: none; }
.card-band-box {
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.75;
}
.card-band-label {
  fill: var(--text-dim);
  font-size: 7.5px;
  letter-spacing: 0.03em;
  paint-order: stroke fill;
  stroke: var(--panel-alt);
  stroke-width: 2.5px;
  stroke-linejoin: round;
}

/* Collapsible sections in the properties panel (Option Cards, Ports) —
   same chevron/count treatment as the palette's category groups. */
.prop-section-body { margin-bottom: 4px; }
.prop-subsection { font-size: 10px; opacity: 0.9; padding-left: 4px; }
.prop-subsection-body { padding-left: 6px; border-left: 1px solid var(--border); margin-bottom: 6px; }

.slot-edit-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}
.slot-edit-row label { font-size: 11px; color: var(--text-dim); }
.slot-edit-row select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
}
/* A chassis's card rules (slotPickerUI.js): a card that would break one is
   greyed out, and the rule is said under the rows. */
.slot-edit-row select option:disabled { color: var(--text-dim); }
#properties-content .hint.slot-rules-refused { color: var(--warn-fg); }
.slot-rules-seat { margin: 2px 0 8px; }

.port-edit-row {
  display: flex;
  flex-wrap: wrap; /* label input gets a full-width line; controls wrap below */
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.port-edit-row input:first-child { flex: 1 1 100%; }
.port-edit-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
}
.port-edit-row select {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 4px;
  font-size: 11px;
  flex-shrink: 0;
}
.port-edit-row input.port-connector-input {
  flex: 0 0 64px;
}
.port-edit-row select.port-elec-select {
  flex: 0 1 auto;
  max-width: 92px;
  font-size: 10.5px;
  padding: 3px 2px;
}
.port-dir-badge {
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 5px;
  flex-shrink: 0;
}
.port-remove-btn {
  flex-shrink: 0;
  width: 22px;
  padding: 2px 0;
  line-height: 1;
  color: var(--text-dim);
}
.port-remove-btn:hover {
  color: var(--on-fill);
  background: var(--danger-fill);
  border-color: var(--danger-fill);
}
.port-add-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 10px;
}
.port-add-row button {
  flex: 1;
  font-size: 11.5px;
  padding: 5px 4px;
}

/* Legend */
#legend-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-swatch { display: block; width: 26px; height: 4px; flex-shrink: 0; }

/* Statusbar */
#statusbar {
  padding: 4px 12px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11.5px;
  flex-shrink: 0;
}
/* Something refused or failed (status.js setProblem): amber and bold, a
   little larger, so it isn't read as a note. */
#statusbar.problem {
  background: var(--warn-bg);
  border-top-color: var(--warn-border);
  color: var(--warn-fg-soft);
  font-size: 12.5px;
  font-weight: 600;
}

/* Utility */
.hidden { display: none !important; }

/* Quote panel */
#quote-panel, #reporting-panel, #admin-panel, #platform-panel, #account-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-deep);
  padding: 16px 20px;
  overflow-y: auto;
}

/* Admin and Platform: fixed nav rail on the left, sections scroll in their
   own column so the rail stays put on a long page. */
#admin-panel, #platform-panel {
  flex-direction: row;
  padding: 0;
  overflow-y: hidden;
}
.section-nav {
  width: 168px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 10px;
  background: var(--panel);
  border-right: 1px solid var(--border);
}
.section-nav-title { margin: 0 0 6px; padding: 0 10px; }
.section-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* A section this person may not see takes its button's row with it. */
.section-nav-list > li:has(> .section-nav-btn.hidden) { display: none; }
.section-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 12.5px;
  padding: 7px 10px;
  cursor: pointer;
}
.section-nav-btn:hover { color: var(--text); background: var(--panel-alt); }
.section-nav-btn.active { color: var(--text); background: var(--panel-alt); border-color: var(--border); }
.section-nav-btn .approvals-count-badge { margin-left: auto; }
.section-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 16px 20px;
}
/* Consistent breathing room between sections (e.g. after the last
   manufacturer row, before the next header). */
.section-content > [id*="-sec-"] { scroll-margin-top: 8px; margin-bottom: 34px; }
/* One section at a time: the others are put away until their button is
   clicked (adminUI.js). Kept apart from .hidden, which is who may see it. */
.section-content > .subpage-off { display: none; }
/* The two tabs' own look, their phone layout included, is css/admin.css's
   (Admin's, and the classes Platform shares) and css/platform.css's. */

/* The tables take the height their rows need (up to about ten rows each, see
   below) and the tab scrolls, rather than all of them being squeezed into
   what's left of the window beneath the charts. */
.reporting-columns {
  display: flex;
  gap: 20px;
  flex: none;
  margin-top: 12px;
}
.reporting-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.reporting-col .quote-table-wrap { flex: none; min-height: 0; margin-bottom: 16px; max-height: 380px; }
/* Export History spans the tab, so an export reads on one line. */
.report-history { flex: none; }
.report-history .quote-table-wrap { flex: none; min-height: 0; max-height: 380px; margin-bottom: 16px; }
#quote-export-log td:first-child { white-space: nowrap; }
/* A Design # or Opp # on one line, never broken at its hyphens (on a
   phone it would read as two numbers): the table scrolls sideways. */
#quote-export-log .report-design-number, #quote-export-log .report-opportunity { white-space: nowrap; }

/* Figures right-aligned with even-width digits, so a column lines up. */
.quote-table th.num,
.quote-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Money cells carry whole dollars for the screen and cents for the printed
   report (see moneyCell in reporting.js). */
.money-print { display: none; }

/* Totals rows stay in view at the foot of a table that scrolls. */
.quote-table tfoot td {
  position: sticky;
  bottom: 0;
  background: var(--panel-alt);
  font-weight: 600;
  border-top: 1px solid var(--border);
  border-bottom: none;
}
/* Trend: each period's subtotal row heads its manufacturers. */
.quote-table tr.report-period-row td { font-weight: 600; border-top: 1px solid var(--border); }
.quote-table td.report-subtotal-label { color: var(--text-dim); font-weight: 400; }

/* Export History: an export a later one of the same quote replaced. */
.quote-table tr.report-superseded td:not(.report-log-actions) { opacity: 0.55; }
.report-superseded-badge {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  white-space: nowrap;
}

.quote-header { margin-bottom: 14px; }

.quote-name-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  max-width: 320px;
}

.quote-name-label input {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 14px;
}

/* Export is blocked until the quote is named, so point at the field holding
   it up. Cleared as soon as a name is typed. */
.quote-name-label input.input-invalid {
  border-color: var(--danger-text);
}

/* Quote Name, then the design's Design # (read-only for everyone, a lock
   on it) and its Opp #, then Customer; they wrap under one another on a
   narrow screen, where the two numbers take the whole width. */
.quote-header-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.quote-header-fields .quote-name-label { flex: 0 1 320px; }
.quote-header-fields .quote-design-number-label { flex: 0 1 190px; }
.quote-header-fields .quote-opportunity-label { flex: 0 1 190px; }
.quote-header-fields .quote-customer-label { flex: 0 1 300px; }
.quote-name-label input[readonly] { color: var(--text-dim); }
.design-number-field { position: relative; display: block; }
.design-number-field input[readonly] {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border-style: dashed;
  padding-right: 28px;
  cursor: default;
}
.design-number-lock {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
@media (max-width: 700px) {
  .quote-header-fields .quote-design-number-label, .quote-header-fields .quote-opportunity-label { flex: 0 1 100%; max-width: 100%; }
}

.quote-columns {
  display: flex;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.quote-search-col { flex: 1.4; min-width: 0; display: flex; flex-direction: column; }
.quote-current-col { flex: 1; min-width: 340px; display: flex; flex-direction: column; }

.quote-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.quote-search-row select {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
}

.quote-search-row input[type="text"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
}

/* A file picker dressed as a button (Import price list, Import items, the
   logo): the same text colour as the buttons beside it. */
.quote-import-btn {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.quote-import-btn:hover { background: var(--button-hover); }

.quote-actions-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
}
.quote-actions-row button { flex: 1; padding: 8px 6px; font-size: 12.5px; font-weight: 600; }

/* The tick for the two estimates, under their buttons (msrpOnly.js). */
.quote-msrp-only { display: flex; align-items: center; gap: 5px; margin: -4px 0 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; width: fit-content; }
.quote-msrp-only input { margin: 0; }
.quote-msrp-only:has(input:disabled) { opacity: 0.45; cursor: default; }
.quote-msrp-only-for { font-weight: 400; color: var(--text-dim); }
.quote-msrp-only-note { margin: 0 0 8px; }
.quote-btn-excel { background: var(--excel); border-color: var(--excel); color: var(--on-fill); }
.quote-btn-excel:hover { background: var(--excel-hover); }
.quote-btn-pdf { background: var(--pdf); border-color: var(--pdf); color: var(--on-fill); }
.quote-btn-pdf:hover { background: var(--pdf-hover); }
.quote-btn-reset { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-fill); }
.quote-btn-reset:hover { background: var(--danger-hover); }
/* The BOM is a plain list, so a plain button beside the two estimates. */
.quote-btn-bom { background: var(--panel-alt); }
/* An estimate with no price list to fill it: off, with the notice above saying why. */
.quote-btn-excel:disabled, .quote-btn-pdf:disabled { opacity: 0.45; cursor: default; }
.quote-btn-excel:disabled:hover { background: var(--excel); }
.quote-btn-pdf:disabled:hover { background: var(--pdf); }
/* No price list yet, or quote lines with no price: the same amber as everything waiting on someone. */
.quote-noprice {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--warn-fg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-bg);
}
.quote-noprice strong { color: var(--warn-fg-soft); }
.quote-noprice-fill { margin-left: 2px; padding: 2px 10px; font-size: 12px; }

.quote-table-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  min-height: 120px;
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.quote-table th {
  position: sticky;
  top: 0;
  text-align: left;
  background: var(--panel-alt);
  color: var(--text-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.quote-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #2a2f38;
  vertical-align: top;
  color: var(--text);
}

.quote-table td.desc-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.quote-table .qty-input {
  width: 46px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 12px;
}

.quote-table button.add-btn, .quote-table button.remove-btn {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}
.quote-table button.remove-btn { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-fill); }

/* Pin the action column (Add to Quote / Download+Delete) to the right edge of
   the horizontally-scrolling table so it's never cut off, no matter how many
   pricing columns are shown. Scoped to the tables whose last column is a
   button — not the value-column tables. */
#quote-search-results th:last-child,
#quote-search-results td:last-child,
#quote-export-log th:last-child,
#quote-export-log td:last-child {
  position: sticky;
  right: 0;
  border-left: 1px solid var(--border);
}
#quote-search-results td:last-child,
#quote-export-log td:last-child { background: var(--panel); }
#quote-search-results th:last-child,
#quote-export-log th:last-child { background: var(--panel-alt); }
/* The search results' MSRP, Dealer and Distribution a little closer
   together than the other columns, so on a 1440 px screen the Distribution
   heading clears the pinned Add to Quote column now that the prices have
   their thousands commas. The columns after them scroll in sideways. */
#quote-search-results th:nth-child(n+4):nth-child(-n+6),
#quote-search-results td:nth-child(n+4):nth-child(-n+6) { padding-left: 5px; padding-right: 5px; }

#quote-search-hint, #quote-empty-hint, #quote-log-empty-hint {
  padding: 14px;
  margin: 0;
}

.quote-total-row {
  text-align: right;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.quote-total-row span { color: var(--accent); }

.quote-pricing-source-wrap { flex: 0 0 auto; max-height: 160px; }

/* Tools tab */
#tools-panel { padding: 16px 20px; overflow-y: auto; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-width: 900px;
}

.tool-card {
  text-align: left;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.tool-card:hover { border-color: var(--accent); }

.tool-card-title { font-weight: 600; margin-bottom: 6px; }
.tool-card-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }

.tools-back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 14px;
}

.tool-title { margin: 0 0 4px; }

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin-top: 14px;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
}
.tool-field input, .tool-field select, .tool-field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 7px 8px;
  font-size: 14px;
  font-family: inherit;
}
.tool-field textarea { resize: vertical; min-height: 70px; }

.tool-actions { display: flex; gap: 8px; }

.tool-result {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tool-result-label { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.tool-result-value { font-size: 22px; font-weight: 700; color: var(--accent); }

/* The bigger calculators (js/tools/): fields side by side, help under a
   field, a problem under a field, several result rows, status chips, notes,
   a size table and the "How this is worked out" line. Live results: greyed
   while a field has a problem. */
.tool-form.tool-form-wide { max-width: 460px; }
.tool-field-row { display: flex; gap: 8px; align-items: flex-start; }
.tool-field-row > .tool-field { flex: 1 1 0; min-width: 0; }
.tool-field-row > .tool-field-unit { flex: 0 0 80px; }
.tool-field-help { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; margin: -6px 0 0; }
.tool-field > .tool-field-help { margin: 0; }
.tool-field-group { display: flex; flex-direction: column; gap: 8px; }
.tool-field-group > .tool-field-help { margin: -4px 0 2px; }
.tool-result > .tool-result-sub { margin-top: 10px; }
.tool-field-error { font-size: 12px; color: var(--danger-text); line-height: 1.35; }
.tool-field input[aria-invalid="true"] { border-color: var(--danger-text); }
.tool-more > summary { cursor: pointer; font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.tool-more[open] > summary { margin-bottom: 10px; }
.tool-more > .tool-field { margin-bottom: 10px; }
.tool-result.is-stale > .tool-note:first-child { margin-top: 0; }
.tool-field-help.tool-tap-note { grid-column: 1 / -1; }
.tool-field-help.tool-tap-note.is-warn { color: var(--warn-fg-soft); }
.tool-result-rows { display: grid; gap: 12px; }
.tool-result-row-value { font-size: 16px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.tool-result-sub { font-size: 12px; color: var(--text-dim); line-height: 1.4; margin: 3px 0 0; }
.tool-chip {
  display: inline-block;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tool-chip.ok { color: var(--ok-fg); background: var(--ok-bg); border-color: var(--ok-border); }
.tool-chip.warn { color: var(--warn-fg-soft); background: var(--warn-bg); border-color: var(--warn-border); }
.tool-chip.bad { color: var(--disc-fg); background: var(--disc-bg); border-color: var(--disc-border); }
.tool-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 7px 9px;
  border-radius: 4px;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-fg-soft);
}
.tool-note.bad { border-color: var(--disc-border); background: var(--disc-bg); color: var(--disc-fg); }
.tool-note.ok { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok-fg); }
.tool-compare { margin-top: 14px; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tool-table th, .tool-table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tool-table th { font-weight: 600; color: var(--text-dim); white-space: normal; }
.tool-table th:first-child, .tool-table td:first-child { text-align: left; }
.tool-table tr.is-current td { color: var(--accent); font-weight: 600; }
.tool-howto { margin-top: 14px; font-size: 12px; line-height: 1.45; color: var(--text-dim); }
.tool-howto strong { color: var(--text); font-weight: 600; }
.tool-howto details { margin-top: 6px; }
.tool-howto summary { cursor: pointer; color: var(--accent); }
.tool-howto ul { margin: 6px 0 0 18px; padding: 0; }
.tool-howto li { margin: 3px 0; }
.tool-group-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 8px; align-items: start; }
.tool-group-row > .tool-field { min-width: 0; }
.tool-group-row input { width: 100%; min-width: 0; }
/* 19px = the 12px label's line plus the field's 4px gap, so × lines up with the inputs. */
.tool-group-row .tool-remove { height: 34px; padding: 0; margin-top: 19px; }
.tool-group-row + .tool-group-row .tool-remove { margin-top: 0; }
/* Only the first row shows its labels; the rest keep them for screen readers. */
.tool-group-row + .tool-group-row .tool-row-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 700px) {
  #tools-panel { padding: 12px 16px; }
  .tool-form, .tool-form.tool-form-wide { max-width: none; }
  .tool-table { font-size: 12px; }
  .tool-table th, .tool-table td { padding: 4px 3px; }
}

/* Narrow viewports (matches the JS mobile breakpoint in modeAccess.js): the
   Quote tab's two side-by-side columns don't have room to sit next to each
   other — .quote-current-col's fixed 340px min-width forces .quote-search-col
   to collapse and its content overflows underneath, so stack them instead. */
@media (max-width: 700px) {
  .quote-columns { flex-direction: column; }
  .quote-search-col, .quote-current-col { min-width: 0; }
  .quote-actions-row { flex-wrap: wrap; }
  .quote-actions-row button { flex: 1 1 45%; }

  /* The tabs and the "☰" toggle wrap as one: beside the brand when they fit,
     otherwise together on the next row, rather than the toggle dropping onto
     a row by itself. */
  .topbar-nav {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
  }
  /* Five tabs (a seated admin's or Riser Draft support's: Home, Quote,
     Tools, Reporting, Admin) and the toggle keep to one row from 360px:
     whenever Admin's tab shows, the tabs, their gaps and the toggle are a
     little narrower. */
  .mode-switch:has(#tab-admin:not(.hidden)) { gap: 2px; }
  .mode-switch:has(#tab-admin:not(.hidden)) .mode-btn { padding-left: 7px; padding-right: 7px; }
  .topbar-nav:has(#tab-admin:not(.hidden)) { column-gap: 10px; }
  .topbar-nav:has(#tab-admin:not(.hidden)) .mobile-menu-toggle { padding-left: 10px; padding-right: 10px; }
  /* Six (the platform owner's: those and Platform) keep to one row from
     360px too, narrower still whenever Platform's tab shows (measured: 84px
     tall at 360 to 430, where the toggle took a row of its own, 124px, and
     at 360 the tabs two, 153px). More tabs than that (the design queue's,
     Services') wrap, never sideways. */
  .mode-switch:has(#tab-platform:not(.hidden)) { gap: 0; }
  .mode-switch:has(#tab-platform:not(.hidden)) .mode-btn { padding-left: 4px; padding-right: 4px; }
  .topbar-nav:has(#tab-platform:not(.hidden)) { column-gap: 4px; }
  .topbar-nav:has(#tab-platform:not(.hidden)) .mobile-menu-toggle { padding-left: 5px; padding-right: 5px; }

  /* Project actions (name/New/Open/Save/Export) + account (name/Submit
     Feature/Sign out) collapse behind a single "☰" toggle instead of
     wrapping across several rows of the topbar. The menu hangs from the
     topbar's own bottom edge, however many rows the topbar wraps to, so it
     never covers the toggle that closes it. */
  #topbar { position: relative; }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 20px;
    line-height: 1;
    padding: 4px 12px;
  }
  .topbar-secondary {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 6px);
    flex-direction: column;
    gap: 10px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    max-height: 75vh;
    overflow-y: auto;
    z-index: 65;
  }
  .topbar-secondary.open { display: flex; }
  .topbar-actions, .topbar-user {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    border-left: none;
    padding-left: 0;
  }
  .topbar-actions > *, .topbar-user > * { width: 100%; }
  .topbar-actions .dropdown > button, .topbar-user .dropdown > button { width: 100%; }
  .topbar-user .user-name { max-width: none; text-align: center; }
  /* In the phone menu the name is a full-width button like the others. */
  .topbar-user .user-account { justify-content: center; background: var(--panel-alt); border-color: var(--border); padding: 6px 12px; }
  /* The share badge's words wrap in the menu, a long owner's name and
     "(not on the team)" too, rather than run past its edge. */
  .topbar-actions .share-badge { white-space: normal; }

  /* On a phone the brand usually has a row to itself; the mark's smallest
     size keeps that row as short as it can be. */
  .brand svg { width: 24px; height: 24px; }
}

@media print {
  #topbar, #palette, #properties, #canvas-toolbar, #statusbar, .panel-resizer, .panel-tab, .sheet-tabs, .empty-canvas { display: none !important; }
  /* The drawing prints only from its own tabs: off them the canvas is
     .hidden, and an id here would outrank that, printing the last drawing
     above a report. */
  #workspace, #canvas-area:not(.hidden), #canvas-scroll { display: block !important; overflow: visible !important; height: auto !important; }
  /* The drawing is as wide as its canvas at the zoom, and the Signal Flow
     canvas grows with the drawing (signalFlow.js): on paper it's never wider
     than the page, shrunk to fit it whole rather than cut off at its edge. */
  #drawing-svg { max-width: 100% !important; height: auto !important; }
  .canvas-scroll-hold { display: none !important; }
  body { background: var(--paper); }

  #estimate-print-view { display: none; }
  body.printing-estimate > #app > *:not(#estimate-print-view) { display: none !important; }
  body.printing-estimate #estimate-print-view {
    display: block !important;
    background: var(--paper);
    color: var(--ink);
    font-family: "Century Gothic", "Futura", Arial, sans-serif;
    padding: 0.25in;
  }

  #reporting-panel.printing {
    display: block !important;
    background: var(--paper) !important;
    color: var(--ink) !important;
  }
  #reporting-panel.printing .quote-actions-row,
  #reporting-panel.printing .report-history {
    display: none !important;
  }
  #reporting-panel.printing .reporting-columns { display: block; }
  #reporting-panel.printing .quote-table-wrap { border: none; background: var(--paper); overflow: visible; max-height: none; }
  #reporting-panel.printing .quote-table th { background: var(--print-fill); color: var(--ink); }
  #reporting-panel.printing .quote-table td { color: var(--ink); border-color: var(--print-rule); }
}

/* Estimate print layout (screen styles harmless — element stays display:none outside print) */
.estimate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.estimate-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* A team's own logo, at most the box the Excel estimate gives it; OM's
   48px tall, as its estimates always printed it. */
.estimate-logo { max-height: 60px; max-width: 300px; object-fit: contain; }
.estimate-olm .estimate-logo { height: 48px; max-height: none; }
.estimate-team-name { font-size: 20px; font-weight: bold; }
.estimate-title { font-size: 28px; font-weight: bold; text-align: right; }
.estimate-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 12px;
}
.estimate-fields div { margin-bottom: 2px; text-align: right; }
/* The letterhead's lines as their admins typed them, spaces and all. */
#estimate-letterhead-lines { white-space: pre-wrap; }
.estimate-fields .fld-label { font-weight: bold; margin-right: 8px; }
.estimate-items-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.estimate-items-table th {
  text-align: center;
  font-weight: bold;
  border-bottom: 2px solid var(--ink);
  padding: 6px 4px;
}
.estimate-items-table td { text-align: center; padding: 5px 4px; border-bottom: 1px solid var(--print-rule); }
.estimate-items-table td.est-desc { text-align: left; }
.estimate-items-table td.est-mfr { text-align: left; }
.estimate-totals-row td { font-weight: bold; font-size: 13px; border-top: 2px solid var(--ink); border-bottom: none; }
/* Listed by room (FR-67): each room's heading across the table, and its subtotal. */
.estimate-items-table tr.estimate-room-row td { text-align: left; font-weight: bold; font-size: 11px; background: var(--print-fill); border-top: 1px solid var(--ink); }
.estimate-items-table tr.estimate-subtotal-row td { font-weight: bold; }
.estimate-items-table tr.estimate-subtotal-row td.est-desc { text-align: right; }
/* A rack in a room (John, Oct 22): its name, indented, over its lines,
   after the room's own; the room's subtotal is all of them. */
.estimate-items-table tr.estimate-rack-row td { text-align: left; font-weight: bold; padding-left: 18px; }
/* Over several pages, a room's heading stays with its first line and its
   subtotal with its last: Chrome breaks a printed table between any two
   rows unless told not to, and left a heading alone at the foot of a page.
   A rack's name stays with its first line too. */
.estimate-items-table tr.estimate-room-row { break-after: avoid; page-break-after: avoid; }
.estimate-items-table tr.estimate-rack-row { break-after: avoid; page-break-after: avoid; }
.estimate-items-table tr.estimate-subtotal-row { break-before: avoid; page-break-before: avoid; }
.estimate-disclaimers { margin-top: 14px; font-size: 9px; }
.estimate-disclaimers p { margin: 2px 0; }

/* ===== Platform: Symbol Library editor ===== */
.symbol-admin {
  display: flex;
  gap: 18px;
  align-items: stretch;
  min-height: 460px;
  flex: 1;
  margin-top: 8px;
}

.symbol-admin-list-col {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.symbol-admin-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
#symbol-admin-search {
  flex: 1;
  min-width: 0;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 13px;
}
.symbol-admin-new-btn { flex-shrink: 0; font-weight: 600; }

.symbol-admin-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  min-height: 240px;
}

.symbol-admin-cat {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding: 8px 10px 4px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}

.symbol-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.symbol-admin-row:hover { background: var(--panel-alt); }
.symbol-admin-row.active {
  background: var(--accent-dim);
  border-left-color: var(--accent);
}
.symbol-admin-row.is-hidden { opacity: 0.5; }

.symbol-admin-thumb {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.symbol-admin-row.active .symbol-admin-thumb { color: var(--text); }

.symbol-admin-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.symbol-admin-badge {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.symbol-admin-badge.edited { color: var(--warn-fg-soft); border-color: var(--warn-border); background: var(--warn-bg); }
.symbol-admin-badge.custom { color: var(--ok-fg); border-color: var(--ok-border); background: var(--ok-bg); }
.symbol-admin-badge.off { color: #c0c6d0; border-color: var(--border); background: var(--panel-alt); }
.symbol-admin-badge.pending { color: var(--warn-fg); border-color: var(--warn-border); background: var(--warn-bg); }

/* --- Symbol Approvals queue (Platform) --- */
.symbol-approvals { max-width: 980px; margin-bottom: 18px; }
.approvals-count-badge {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--warn-fg);
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
}
.approval-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
  margin-bottom: 10px;
}
.approval-preview { flex-shrink: 0; }
.approval-info { flex: 1; min-width: 0; }
.approval-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.approval-id { margin: 0 0 8px; }
.approval-ports { font-size: 12px; margin-bottom: 6px; }
.approval-ports ul { margin: 2px 0 0 18px; padding: 0; }
.approval-ports li { margin: 1px 0; }
.approval-ports-title { font-weight: 600; color: var(--text-dim); }
.hint-inline { color: var(--text-dim); font-size: 11px; }
/* A hint reporting a failure (a search or load that didn't work). The
   Properties panel sets its own hint colour by id, so it's named here too. */
.hint.error,
#properties-content .hint.error { color: var(--danger-text); }
.approval-actions { display: flex; gap: 8px; margin-top: 10px; }
.approval-actions .prop-danger { width: auto; margin-top: 0; }
.approval-approve-btn { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); font-weight: 600; }
.approval-approve-btn:hover { background: var(--ok-bg-hover); }
.approval-requests-header { font-weight: 600; margin: 14px 0 2px; }
.approval-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 8px 12px;
  margin-bottom: 6px;
}
.approval-request-text { min-width: 0; font-size: 12.5px; }

/* --- Items: the platform's shared item list (item + symbol link, managed
   together) and a team's price list, which share the table and editor --- */
/* Admin → Letterhead & estimate: the top of an estimate as it prints (on
   paper, so paper's colours in either theme), then the lines, the logo and
   the prices it shows. */
.letterhead-admin { max-width: 640px; }
.letterhead-preview {
  margin: 8px 0 14px;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: "Century Gothic", "Futura", Arial, sans-serif;
}
.letterhead-preview-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--ink);
}
/* Spaces as typed, as the PDF prints them. */
.letterhead-preview-lines { font-size: 11px; line-height: 1.4; min-height: 1em; white-space: pre-wrap; }
/* The item table's header, as the estimate's columns run. */
.letterhead-preview-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--print-rule);
  font-size: 10px;
  font-weight: bold;
}
.letterhead-columns { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.letterhead-column { display: inline-flex; align-items: center; gap: 6px; }
.letterhead-column input { width: auto; margin: 0; }
/* Never wider than the preview, which is narrower than 300px on a phone. */
.letterhead-logo { max-height: 60px; max-width: min(300px, 100%); height: auto; object-fit: contain; }
.letterhead-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.letterhead-form input[type="text"] { max-width: 420px; }
.letterhead-actions { display: flex; gap: 8px; align-items: center; }
.letterhead-status:empty { display: none; }
.prices-all-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-dim); }
.prices-all-toggle input { width: auto; margin: 0; }
.prices-clear-btn { color: var(--danger-text); border-color: var(--danger-text); }
.prices-clear-btn:hover { color: var(--on-fill); background: var(--danger-fill); }
.prices-status:empty { display: none; }
/* Eight columns: a shorter description, so the row's button stays in view.
   Both lists as wide as their Admin page (css/admin.css). */
#prices-list, #spec-sheets-list { max-width: 1240px; }
#prices-list .items-desc-cell { max-width: 220px; }
.prices-status.error { color: var(--danger-text); }
.items-editor-note { flex-basis: 100%; margin: 0; }
.items-team-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 8px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  vertical-align: 1px;
}
.items-shared-badge { color: var(--text-dim); border-color: var(--border); }
/* The price list import's preview (priceList.js). */
.price-import-summary { font-weight: 600; margin: 0 0 10px; }
/* Focus starts here (read first), but it isn't a control. */
.price-import-summary:focus { outline: none; }
.price-import-section { margin-bottom: 10px; }
.price-import-heading { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-dim); margin-bottom: 4px; }
.price-import-list {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.price-import-choice { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin: 3px 0; }
.price-import-choice input { width: auto; margin: 2px 0 0; flex: none; }
/* The check's dialog: wider than a form's, each change one row that wraps
   on a phone (its line and item, then old → new). */
.price-import-dialog .unit-picker-box { width: min(680px, calc(100vw - 32px)); }
.price-import-dialog .price-import-list { max-height: 200px; }
.price-import-row { display: flex; flex-wrap: wrap; gap: 0 10px; padding: 2px 0; }
.price-import-key { font-weight: 600; }
.price-import-what { color: var(--text-dim); }
.price-import-dialog .hint.price-import-note { margin: 10px 0 6px; }
.price-import-download { margin: 10px 0 0; }
.price-import-dialog .hint.price-import-limit { margin: 8px 0 0; }
/* The file's manufacturers: each name and its rows, then its picker; and
   a row's pick of two or more items. */
.price-import-maker { padding: 3px 0 5px; border-bottom: 1px solid var(--border); }
.price-import-maker:last-child { border-bottom: 0; }
.price-import-maker-pick, .price-import-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.price-import-dialog .form-dialog .price-import-maker-pick select,
.price-import-dialog .form-dialog .price-import-pick select { width: auto; max-width: 100%; margin: 0; padding: 3px 6px; font-size: 12px; }
.price-import-dialog .price-import-names { margin: -4px 0 10px; }
/* Import and Cancel stay in sight however long the check is (the box
   scrolls; its padding is 18px 20px). */
.price-import-dialog .unit-picker-actions {
  position: sticky;
  bottom: -18px;
  margin: 14px -20px -18px;
  padding: 10px 20px 18px;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.items-admin-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.items-admin-toolbar input[type="search"] { flex: 1; min-width: 220px; max-width: 380px; }
.items-admin-list { max-width: 1100px; overflow-x: auto; }
.items-admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.items-admin-table th, .items-admin-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.items-admin-table th { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.items-admin-table th.num, .items-admin-table td.num { text-align: right; }
.items-desc-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.items-num-cell { font-weight: 600; }
.items-symbol-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.items-symbol-missing { color: var(--danger-text); }
.items-edit-btn { padding: 2px 10px; font-size: 11.5px; }
.items-editor-row > td { padding: 0 10px 10px; }
.items-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}
.items-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-dim); }
.items-disc-field { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 7px; }
.items-disc-field input[type="checkbox"] { width: auto; }
.items-field input { width: 120px; }
.items-field.wide { flex: 1; min-width: 220px; }
.items-field.wide input { width: 100%; }
/* As wide as the box under it, wrapped (the table cell it's in doesn't wrap). */
.items-field-hint { max-width: 120px; white-space: normal; font-size: 10.5px; line-height: 1.3; color: var(--text-dim); }
.items-editor-actions { display: flex; gap: 8px; align-items: center; }
.items-editor-actions .prop-danger { width: auto; margin-top: 0; }

/* An item's rack accessories (FR-64, accessoryLinksEditor.js): a box under
   its editor, a row per link, and the "Kit" badge on a listed item that
   has any. */
.acc-box { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.acc-title { font-size: 12px; font-weight: 600; color: var(--text); }
.acc-hint { margin: 0; }
.acc-list { display: flex; flex-direction: column; gap: 6px; }
.acc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.acc-kit { display: inline-flex; gap: 6px; align-items: baseline; min-width: 180px; }
.acc-mfr { color: var(--text-dim); font-size: 11px; }
.acc-row select { width: auto; }
.acc-row input[type="text"] { width: 140px; }
.acc-row input[maxlength] { flex: 1; min-width: 160px; }
.acc-required { display: inline-flex; gap: 4px; align-items: center; color: var(--text-dim); font-size: 11px; }
.acc-required input[type="checkbox"] { width: auto; }
.acc-add-row { padding-top: 4px; border-top: 1px dashed var(--border); }
.acc-none { margin: 0; }
.acc-status { min-height: 1em; }
.acc-csv-toolbar { align-items: center; }
.acc-csv-label { font-size: 12px; color: var(--text-dim); }
.acc-check-errors { margin: 4px 0 8px; padding-left: 18px; max-height: 220px; overflow-y: auto; font-size: 12px; }
.acc-kit-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  vertical-align: 1px;
}

/* --- "Which placed unit did you mean?" picker. Namespaced away from the
   existing .modal-* classes used by the My Projects dialog. --- */
.unit-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.unit-picker-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 12px 40px var(--shadow-dialog);
}
.unit-picker-title { font-weight: 600; margin-bottom: 4px; }
.unit-picker-box .hint { margin: 0 0 12px; }
.unit-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
  margin-bottom: 6px;
}
.unit-picker-row-text { font-size: 12.5px; min-width: 0; }
.unit-picker-row-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.unit-picker-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.unit-picker-actions .prop-danger { width: auto; margin-top: 0; }
/* A phone: a dialog's buttons stay in sight at its foot however long it is
   (the box scrolls; its padding is 18px 20px), as the price list import's
   always do, and are big enough for a finger. */
@media (max-width: 700px) {
  .form-dialog .unit-picker-actions {
    position: sticky;
    bottom: -18px;
    flex-wrap: wrap;
    margin: 14px -20px -18px;
    padding: 10px 20px 18px;
    background: var(--panel);
    border-top: 1px solid var(--border);
  }
  .form-dialog .unit-picker-actions button { min-height: 44px; }
}

/* --- Check design (designCheckUI.js): findings in groups, each a
   disclosure; a finding that can be gone to is a full-width button. --- */
.design-check-dialog .unit-picker-box {
  width: min(600px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.check-findings { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding-right: 4px; }
.check-group { margin: 0 0 10px; }
.check-group-title { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
/* A speaker run certainly over its amp, or wired wrong (FR-61): red, first. */
.check-error > .check-group-title { color: var(--disc-fg); }
.check-warning > .check-group-title { color: var(--warn-fg); }
.check-info > .check-group-title { color: var(--text-dim); }
.design-check-dialog .check-group-about { margin: 2px 0 6px; font-size: 12px; }
.check-items { list-style: none; margin: 0; padding: 0; }
.check-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
button.check-item:hover { background: var(--button-hover); border-color: var(--accent-dim); }
.check-item-detail { font-size: 11.5px; color: var(--text-dim); }
.check-error .check-item { border-left: 3px solid var(--disc-border); }
.check-warning .check-item { border-left: 3px solid var(--warn-border); }
.unit-picker-actions .check-export-anyway { background: var(--panel-alt); }
/* The Export menu's first item checks rather than exports. */
.dropdown-menu .export-menu-check { border-bottom: 1px solid var(--border); }
/* Quote's Check Design: a link-like button beside the "Current Quote"
   heading, outside the export row, so the export buttons keep one line.
   The Revisions heading's "Show all (N)" is one too (quoteRevisions.css). */
.quote-current-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quote-check-link, .quote-revisions-toggle {
  background: none;
  border: none;
  /* A taller target to tap than the heading's line, without making the
     heading any taller. */
  padding: 4px 0;
  margin: -4px 0;
  line-height: 13px;
  color: var(--accent);
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: underline;
}
/* Why an export can't go yet or failed, or why a typed price isn't one
   (quoteSaid.js), under the export buttons until it's done. */
.quote-said {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-fg-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}
.quote-said-text { flex: 1 1 260px; min-width: 0; }
/* The design's whole name is on the button, so a long one wraps inside the
   line rather than running past it. */
.quote-said-use { flex: 0 1 auto; max-width: 100%; text-align: left; overflow-wrap: anywhere; font-size: 12px; padding: 4px 10px; }
/* "1 drawn unit isn't on the quote (discontinued when placed) · Check Design" */
.quote-disc-note {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}
.quote-disc-note .items-disc-badge { margin: 0 2px 0 0; }
/* The quote listed by room (FR-67): the List control beside the Current
   Quote heading, in the heading's line but not its capitals; the note over
   the list; each room's heading and subtotal rows. */
.quote-current-title { display: inline-flex; align-items: center; gap: 10px; }
.quote-order-label {
  display: inline-flex; align-items: center; gap: 5px;
  text-transform: none; letter-spacing: normal; font-size: 12px; color: var(--text-dim);
}
.quote-order-label select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 4px; font-size: 12px;
}
.quote-room-note { margin: 0 0 6px; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
#quote-current-items tr.quote-room-row > td {
  background: var(--panel-alt); color: var(--text); font-weight: 600; font-size: 12px;
  border-top: 1px solid var(--border); padding-top: 6px; padding-bottom: 6px;
}
/* A rack in a room (John, Oct 22): its name under the room's own lines,
   and its lines, indented; the room's subtotal is all of them. */
#quote-current-items tr.quote-rack-row > td {
  padding: 5px 8px 5px 24px; color: var(--text-dim); font-weight: 600; font-size: 12px;
}
#quote-current-items tr.quote-rack-line > td:first-child { padding-left: 24px; }
#quote-current-items tr.quote-room-subtotal > td { color: var(--text-dim); font-weight: 600; }
#quote-current-items tr.quote-room-subtotal > td:first-child { text-align: right; }
#quote-current-items .quote-price-none { color: var(--text-dim); font-style: italic; }
/* The generic units' note is muted: a neutral badge, no colour of its own. */
.items-generic-badge {
  display: inline-block;
  margin: 0 2px 0 0;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 8px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  vertical-align: 1px;
}
/* "6 drawn" under a Quote line's Qty box: muted; amber when the quote has fewer. */
.quote-drawn { display: block; margin-top: 2px; font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.quote-drawn.is-short { color: var(--warn-fg); }
/* A line sold in pairs or packs (packQuantity.js): "[2] pairs" and
   "(4 speakers)" under it, and "Sold in pairs now · Count in pairs" under a
   line made before its item had a pack size. */
.quote-pack-words { font-size: 12px; color: var(--text); white-space: nowrap; }
.quote-pack-units { display: block; margin-top: 2px; font-size: 11px; color: var(--text); white-space: nowrap; }
.quote-pack-since { display: block; margin-top: 2px; max-width: 12em; font-size: 11px; line-height: 1.35; color: var(--text-dim); }
/* "Pair" / "Pack of 4" beside a model number: a neutral note, like Kit. */
.items-pack-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 8px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  vertical-align: 1px;
}
.quote-drawn-said {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.quote-check-link:hover, .quote-check-link:active,
.quote-revisions-toggle:hover, .quote-revisions-toggle:active { background: none; color: var(--accent-hover); }

/* --- Number Repeats dialog (repeatsDialog.js): one row per set --- */
.repeats-box { width: min(640px, calc(100vw - 40px)); }
.repeats-table-wrap { overflow-x: auto; }
.repeats-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.repeats-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--border);
}
.repeats-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.repeats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.repeats-model { overflow-wrap: anywhere; }
.repeats-prefix {
  width: 7em;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 12.5px;
  font-family: inherit;
  text-transform: uppercase;
}
.repeats-prefix.invalid { border-color: var(--danger-text); }
.repeats-tags { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Under the tags: what the run changes in that set ("2 kept, 1 new · replaces MIC-07"). */
.repeats-changes { font-size: 11px; white-space: normal; margin-top: 2px; }
/* Under a set's row, the table's width, when the prefix typed is one Label
   Cables uses ("SPK-001 … is how Label Cables numbers speaker cables"): a
   note only, the run still goes. The row above it gives up its rule. */
.repeats-table tr.has-note td { border-bottom: none; padding-bottom: 2px; }
.repeats-table td.repeats-prefix-note { font-size: 11px; color: var(--warn-fg); padding-top: 0; }
/* On a phone the Tags wrap, so the table fits the dialog (at 360 and 375 px it
   was 316 px in a 278 or 293 px box and scrolled sideways) and the note under
   a row isn't cut at its edge. */
@media (max-width: 480px) {
  .repeats-tags { white-space: normal; }
}
.repeats-renumber { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12.5px; cursor: pointer; }
.repeats-renumber input { margin: 2px 0 0; flex: none; }
.repeats-renumber > span > span { display: block; }
.repeats-apply {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.repeats-apply:hover { background: var(--accent-hover); }

/* --- Discontinued items: a visible note everywhere, never a removal --- */
.items-disc-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 8px;
  color: var(--disc-fg);
  border: 1px solid var(--disc-border);
  background: var(--disc-bg);
  vertical-align: 1px;
}
.items-row-discontinued .items-num-cell,
.items-row-discontinued td:first-child { color: var(--text-dim); }
.symbol-item.discontinued { position: relative; }
.symbol-item.discontinued::after {
  content: "DISC";
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 0 4px;
  border-radius: 6px;
  color: var(--disc-fg);
  border: 1px solid var(--disc-border);
  background: var(--disc-bg);
  pointer-events: none;
}

/* --- Manufacturers admin (enable/disable per deployment) --- */
.manufacturers-admin-list { max-width: 560px; }
.manufacturer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 5px;
}
.manufacturer-row.disabled .manufacturer-name { color: var(--text-dim); text-decoration: line-through; }
.manufacturer-name { flex: 1; min-width: 0; font-size: 13px; }
/* Admin → Team symbols: one row per symbol, archived ones dimmed. */
.team-symbols-list { max-width: 720px; }
.team-symbol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 5px;
}
.team-symbol-row.archived .team-symbol-text { opacity: 0.6; }
.team-symbol-row .symbol-admin-thumb { flex-shrink: 0; }
.team-symbol-text { flex: 1; min-width: 0; }
.team-symbol-name { font-size: 13px; overflow-wrap: anywhere; }
.team-symbol-about { display: block; margin-top: 2px; }
.team-symbol-row button { flex-shrink: 0; }
@media (max-width: 520px) {
  .team-symbol-row { flex-wrap: wrap; }
  .team-symbol-text { flex-basis: calc(100% - 50px); }
}

/* The team symbol dialog (teamSymbols.js): the editor's form in a wider
   box, its rows laid out as on the Platform tab rather than as a small
   form's full-width fields. */
.symbol-dialog .unit-picker-box { width: min(620px, calc(100vw - 32px)); }
.symbol-dialog .form-dialog select { width: auto; margin-bottom: 0; padding: 4px 6px; font-size: 12px; }
.symbol-dialog .prop-row select { padding: 5px 7px; font-size: 13px; }
.symbol-dialog .symbol-admin-icon-row select { flex: 1; min-width: 0; }
.symbol-dialog .symbol-preview-wrap { margin-bottom: 12px; }

.manufacturer-count { flex-shrink: 0; }
.manufacturer-toggle { min-width: 84px; }
/* On a phone the Admin page's column is narrow (its nav rail takes the rest):
   the find box takes its own line, and a row's name its own line above the
   count and the button, so nothing runs over or off the page. */
@media (max-width: 520px) {
  .manufacturers-admin-toolbar input[type="search"] { min-width: 0; max-width: none; flex-basis: 100%; }
  .manufacturer-row { flex-wrap: wrap; }
  .manufacturer-name { flex-basis: 100%; overflow-wrap: anywhere; }
  .manufacturer-count { flex: 1; }
}
.manufacturer-toggle.on { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }

.symbol-admin-editor {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px;
}

.symbol-admin-empty { padding: 30px 10px; text-align: center; }

.symbol-admin-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.symbol-admin-editor-title { font-size: 15px; font-weight: 600; }

.symbol-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow-x: auto;
}
.symbol-preview-svg { max-width: 100%; height: auto; }
.symbol-preview-svg .preview-box { fill: var(--panel-alt); stroke: var(--border); stroke-width: 1.5; }
.symbol-preview-svg .preview-glyph { stroke: var(--text-dim); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.symbol-preview-svg .preview-dot { stroke: var(--bg-deep); stroke-width: 1; }
.symbol-preview-svg .preview-port { fill: var(--text-dim); font-size: 8.5px; }
.symbol-preview-svg .preview-conn { fill: var(--text-dim); font-size: 6.5px; opacity: 0.8; }
.symbol-preview-svg .preview-name { fill: var(--text); font-size: 11px; }
.symbol-preview-svg .preview-name-mfr { fill: var(--text-dim); font-size: 9.5px; }

.symbol-admin-fields { margin-bottom: 4px; }

.symbol-admin-icon-row { display: flex; align-items: center; gap: 8px; }
.symbol-admin-icon-row select { flex: 1; min-width: 0; }
.symbol-admin-icon-thumb {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

.symbol-admin-size-row { display: flex; gap: 10px; margin-bottom: 10px; }
.symbol-admin-num { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-dim); }
.symbol-admin-num input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 13px;
}
.symbol-admin-size-hint { margin: 0 0 14px; }
/* A team's symbol (symbolEditor.js, simple): its rack units in view, the
   rest folded under More settings. */
.symbol-admin-ru { max-width: 160px; margin-bottom: 10px; }
.symbol-admin-more { margin: 4px 0 10px; }
.symbol-admin-more > summary { cursor: pointer; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.symbol-admin-more > .hint { margin: 0 0 8px; }

.symbol-admin-ports-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.symbol-admin-addport-btn { font-size: 11px; padding: 3px 8px; }
.symbol-admin-noports { margin: 0 0 6px; }

.symbol-admin-dirsel {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.symbol-admin-dirsel input { margin: 0; }

.symbol-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.symbol-admin-save-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.symbol-admin-save-btn:hover { background: var(--accent-hover); }
.symbol-admin-del-btn { width: auto; margin-top: 0; margin-left: auto; }

.symbol-admin-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  min-height: 16px;
}
.symbol-admin-status.error { color: var(--danger-text); }
/* "Placed 7 times in 3 designs" (symbolUsage.js), under a symbol's name. */
.symbol-usage-line { margin: -4px 0 10px; }
.approval-usage { margin: -4px 0 8px; }
/* A change refused because the symbol changed after it was opened: what
   changed, and the ways on (symbolAdmin.js, symbolApprovals.js,
   teamSymbols.js). */
.symbol-conflict {
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--warn-fg-soft);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
}
.symbol-conflict p { margin: 0 0 6px; }
.symbol-conflict ul { margin: 0 0 6px; padding-left: 18px; }
.symbol-conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* "Jacks taken off" (portChangeDialog.js): over the dialog it's asked from. */
.port-change-dialog { z-index: 210; }
.port-change-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.port-change-jack { font-size: 12.5px; margin-bottom: 4px; }
.port-change-to { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.port-change-to select { flex: 1; min-width: 0; }

/* ===== Auth: login gate ===== */
#login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(1200px 600px at 50% -10%, #232a34, var(--bg));
  padding: 20px;
  /* The card, then the Terms lines under it. A card taller than a phone's
     screen scrolls in the gate, never the page under it. Centered by the
     two spacers below, not justify-content: center, which would push the
     top of a too-tall column above the gate where scrolling can't reach
     it (a landscape phone, or one with its keyboard open). */
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#login-gate::before, #login-gate::after { content: ""; flex: 1 0 0; }
/* The Terms lines are for signing in: not under the update notice or the
   accounting email's Billing complete, which hide #login-signin. */
#login-gate:has(#login-signin.hidden) .login-legal { display: none; }
/* While the gate is up, the app under it doesn't scroll: on a phone its
   controls below the first screen showed under the card. */
html:has(> body > #login-gate:not(.hidden)) { overflow: hidden; }
html:has(> body > #login-gate:not(.hidden)) body { overflow: hidden; }
.login-card { flex: none; }
.login-legal { flex: none; width: 100%; max-width: 360px; margin-top: 14px; text-align: center; color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.login-legal p { margin: 2px 0; }
.login-legal a { color: inherit; text-decoration: underline; white-space: nowrap; }
.login-legal a:hover { color: var(--text); }
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 12px 40px var(--shadow-dialog);
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
  margin-bottom: 14px;
}
.login-brand svg { width: 56px; height: 56px; flex: none; }
.login-brand .brand-name { font-size: 28px; }
.login-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }
#google-signin-btn { display: flex; justify-content: center; min-height: 40px; }
.login-note { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; margin: 4px 0; }
.login-error { color: var(--danger-text); font-size: 12.5px; min-height: 16px; margin: 12px 0 0; }

.dev-login { margin-top: 18px; text-align: left; }
.dev-login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}
.dev-login-divider::before,
.dev-login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.dev-login input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
.dev-admin-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
  cursor: pointer;
}
.dev-admin-label select {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
}
.dev-login button { width: 100%; padding: 8px; font-weight: 600; }

/* Email sign-in (emailSignIn.js): "or" under Google and Microsoft (the
   same width), a secondary button that opens the address form, then
   "Check your email" with the code box, or the card for a link opened
   here. */
.login-method { display: flex; justify-content: center; min-height: 40px; margin-top: 10px; }
/* Sign in with Microsoft (microsoftSignIn.js), in Microsoft's light theme
   (the four-square logo, #5e5e5e on white, a #8c8c8c border), the size and
   shape of Google's button above it, on any card colour. */
.microsoft-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 260px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ms-button-border);
  border-radius: 20px;
  background: var(--ms-button-bg);
  color: var(--ms-button-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.microsoft-signin:hover:not(:disabled) { background: var(--ms-button-hover); }
.microsoft-signin:disabled { opacity: 0.6; cursor: default; }
.microsoft-signin svg { flex: none; }
.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
  margin: 18px 0 14px;
}
.login-or::before,
.login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-secondary {
  width: 260px;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.email-signin-form { text-align: left; }
.email-signin-label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.email-signin-row { display: flex; gap: 8px; }
.email-signin-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.email-signin-row button { flex: none; padding: 8px 14px; }
.email-signin-form .login-note { margin-top: 8px; }
.email-signin-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px !important; letter-spacing: 4px; }
.email-step-title { font-size: 16px; font-weight: 600; margin: 6px 0 8px; color: var(--text); overflow-wrap: anywhere; }
/* Focused (tabindex -1) so the card is read out and nothing on it is pressed by a key: no ring on a title,
   nor on the card's first line ("Sign in to continue", authClient.js focusWaysIn). */
.email-step-title:focus, #login-sub:focus { outline: none; }
.email-step-text { line-height: 1.5; margin-bottom: 16px; overflow-wrap: anywhere; }
.email-step-text:empty { display: none; }
/* The Terms step's Terms of Service and Privacy Policy (termsStep.js): the accent, underlined, visited or
   not, never the browser's own blue on the card. */
.email-step-text a { color: var(--accent); text-decoration: underline; }
.email-step-text a:hover { color: var(--accent-hover); }
.email-signin-step .login-note { overflow-wrap: anywhere; }
.email-signin-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.email-signin-actions button:disabled { opacity: 0.5; cursor: default; }
.email-signin-actions button:disabled:hover { background: var(--panel-alt); }
#email-signin-sent .login-note { margin-top: 10px; }
#email-signin-sent .login-note:empty { display: none; }

/* The notice on the sign-in card while the server is being updated. */
.login-notice-title { font-size: 15px; font-weight: 600; margin: 14px 0 6px; color: var(--warn-fg); }
.login-notice .login-sub { line-height: 1.5; margin-bottom: 20px; }

/* ===== Auth: topbar user ===== */
.topbar-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  margin-left: 6px;
  border-left: 1px solid var(--border);
}
.user-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.user-name { font-size: 12.5px; color: var(--text-dim); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The team the page is working in, beside the name. */
.user-team {
  font-size: 11.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The name (and picture) is the way to the Account page (Your account): a
   button that reads as the name, a little lighter than the topbar's other
   buttons. */
.user-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border-color: transparent;
  padding: 2px 6px;
}
.user-account:hover .user-name, #btn-account.active .user-name { color: var(--text); }
#btn-account.active { border-color: var(--accent-dim); color: var(--text); }
/* The plain team name (one team) gives way to the project's name and its
   New, Open and Save, which need the room more; the Account page names the
   team. Someone on more than one team keeps the switcher everywhere. */
.topbar-user.with-project #user-team { display: none; }
/* The team switcher (teamSwitcher.js): the team chip as a button, for
   someone on more than one team, with the teams in a menu under it. */
.team-switch-btn { cursor: pointer; background: var(--bg); line-height: 1.5; }
.team-switch-btn:hover { color: var(--text); border-color: var(--accent-dim); }
/* Opens on whichever side of the chip fits (teamSwitcher.js), never wider
   than the window: a long team name wraps rather than being cut off. */
.team-switch-menu { min-width: 220px; max-width: min(440px, calc(100vw - 16px)); }
.team-switch-menu button { white-space: normal; }
.team-switch-menu button.current { color: var(--text-dim); cursor: default; }
.team-switch-menu button.current:hover { background: transparent; }

/* Under the topbar while Riser Draft support is in the team: amber for
   everyone on it, and accent blue for support itself, so it never forgets
   whose team it's in. */
.team-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 6px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--warn-fg);
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  flex-shrink: 0;
}
.team-banner.support-self { color: var(--text); background: var(--accent-dim); border-bottom-color: var(--accent); }
/* The demo company's band (demoBand.js): green, so a demo never looks like
   a warning. */
.team-banner.demo-band:not(.support-self) { color: var(--ok-fg); background: var(--ok-bg); border-bottom-color: var(--ok-border); }
.team-banner-text { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.team-banner button { padding: 3px 10px; font-size: 12px; }
.team-banner .team-banner-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
}

/* ===== People tables: a team's members (Admin → People & invites, and the
   Account page read-only), and the platform owner's Teams list on the
   Platform tab ===== */
.people-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.people-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: var(--panel-alt);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.people-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 12.5px; }
.people-table tbody tr:last-child td { border-bottom: none; }
.people-name { font-size: 13px; }
.people-email, .people-dim { font-size: 11.5px; color: var(--text-dim); }
.people-you, .people-badge {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 4px;
}
.people-you { color: var(--accent); border: 1px solid var(--accent-dim); }
.people-badge { color: var(--warn-fg); border: 1px solid var(--warn-border); background: var(--warn-bg); }
.people-table select,
.people-table input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12.5px;
}
/* Platform → Teams: a search and status filter over the table; each row's
   Manage… and Delete… open a dialog (platformPage.js). */
/* Email sign-in's mails, counts only (platformPage.js renderSignInEmails). */
.platform-signin-emails {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  max-width: 720px;
}
.platform-signin-emails .people-dim { font-size: 12px; line-height: 1.5; }
.platform-signin-title { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.platform-teams-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.platform-teams-toolbar input[type="search"],
.platform-teams-toolbar select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
}
.platform-teams-toolbar input[type="search"] { flex: 1; min-width: 220px; max-width: 380px; }
.platform-teams-toolbar select { background: var(--panel-alt); }
.platform-teams-list { max-width: 1200px; overflow-x: auto; }
.platform-teams-table td { vertical-align: top; }
.platform-admin + .platform-admin { margin-top: 6px; }
.platform-teams-status { margin-top: 10px; font-size: 12px; color: var(--text-dim); min-height: 16px; }
.platform-teams-status.error { color: var(--danger-text); }
.platform-status-word { font-size: 13px; }
.platform-status-word.on { color: var(--accent); }
.platform-status-word.held { color: var(--warn-fg); }
.platform-seat-line { white-space: nowrap; }
.platform-seat-line.over { color: var(--warn-fg); }
/* Possible Designer seat sharing (seatMoveWords.js): the flag under the
   seats, Seat moves… under it, and the dialog's list of moves. */
.platform-seat-sharing { margin-top: 4px; }
.platform-seat-moves { margin-top: 4px; }
.platform-seat-move-list { max-height: 50vh; overflow-y: auto; }
.platform-seat-move { font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.platform-seat-move:last-child { border-bottom: 0; }
/* The Manage dialog: the status choices (styled as the invite dialog's),
   a comp's end date and note under them, then the seats and plan. */
.platform-manage { display: flex; flex-direction: column; gap: 12px; }
.platform-manage fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; }
.platform-manage legend { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); padding: 0 4px; }
.platform-manage .hint { margin: 8px 0 0; }
.platform-comp, .platform-fields { display: grid; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.platform-comp { grid-template-columns: auto 1fr; margin: 2px 0 4px; }
.platform-fields { grid-template-columns: auto auto 1fr; }
.form-dialog .platform-manage input,
.form-dialog .platform-manage select { margin-bottom: 0; }
.platform-manage input[type="number"],
.platform-manage input[type="date"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}
.platform-manage input[type="number"] { width: 90px; }
.platform-manage-note { font-size: 12px; color: var(--warn-fg); margin: 0; }
.platform-manage-note:empty { display: none; }

/* ===== Account page (and Admin's Team, People & invites, Plan & billing
   and Riser Draft support, which draw the same cards: adminTeam.js) ===== */
.account-content { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.account-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.account-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.account-text { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
/* Why the tools are off: the same amber as everything waiting on someone. */
.account-banner {
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--warn-fg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-bg);
}
.account-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0 0 12px;
  font-size: 13px;
}
.account-facts dt { color: var(--text-dim); }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }
.account-name-change { margin-left: 6px; padding: 2px 8px; font-size: 12px; }
.account-legal { margin-top: 10px; }
/* Plan & billing (billingCard.js): the Pay form's ticks and total. */
.billing-tick { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: 13px; }
.billing-tick a { color: var(--accent); }
.billing-total { margin: 8px 0 2px; font-weight: 600; }
.billing-manage-status { margin-left: 8px; }
.account-row input[type="number"] { max-width: 120px; }
/* The sign-in card's Terms step (termsStep.js). */
.terms-agree { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13px; }
/* Its newsletter box, under the tick (separate from agreeing). */
.terms-newsletter { margin-top: -2px; }
/* Your account's newsletter toggle (accountPage.js). */
.account-newsletter { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; }
.account-newsletter-label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.account-newsletter .account-status:empty { display: none; }
.account-legal a { color: inherit; }
.account-form { margin-top: 8px; }
.account-label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.account-row { display: flex; gap: 8px; }
.account-row input {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.account-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.account-primary:hover { background: var(--accent-hover); }
.account-primary:disabled { opacity: 0.6; cursor: default; }
.account-row select {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  max-width: 360px;
}
.account-status { min-height: 16px; margin: 6px 0 0; }
/* Get started's own question, under its step, needs no room kept for a
   message until there is one. */
.account-step .account-status:empty { display: none; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.account-subhead { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.account-link { color: var(--accent); font-size: 12.5px; }
/* "Contact Riser Draft" when it opens Send feedback rather than a mail. */
.account-linkbutton {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 12.5px;
  text-decoration: underline;
}
.account-linkbutton:hover { background: none; color: var(--accent-hover); }

/* Get started: each step ticked off once the server says it's done. */
.account-steps { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; }
.account-step { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.account-step-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}
.account-step.done .account-step-mark { color: var(--ok-fg); border-color: var(--ok-border); background: var(--ok-bg); }
.account-step.done .account-step-title { color: var(--text-dim); }
.account-step-title { font-weight: 600; }
.account-step .people-dim { margin: 2px 0 0; line-height: 1.45; }

/* Invitations for you, from other teams. */
.account-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
  font-size: 13px;
}
.account-invite-text { min-width: 0; overflow-wrap: anywhere; }

/* Leave team: set apart from everything else, and red. */
.account-danger { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--border); }
.account-danger .hint { margin: 0 0 8px; }
.account-danger-button { color: var(--danger-text); border-color: var(--danger-text); }
.account-danger-button:hover { color: var(--on-fill); background: var(--danger-fill); }
.unit-picker-actions .account-danger-button:hover { background: var(--danger-hover); }

/* People: the seat meters over the list. */
.seat-meters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.seat-meter-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-bottom: 3px; flex-wrap: wrap; }
.seat-meter-count { color: var(--text-dim); }
.seat-meter-track { height: 6px; border-radius: 3px; background: var(--panel-alt); border: 1px solid var(--border); overflow: hidden; }
.seat-meter-fill { height: 100%; background: var(--accent); }
.seat-meter.over .seat-meter-fill { background: var(--warn-fg); }
.seat-meter.over .seat-meter-count { color: var(--warn-fg); }
.seat-more { font-size: 12px; }
.seat-meters .account-banner { margin-bottom: 0; }

/* The list scrolls sideways inside the card on a narrow screen, never the
   page; last activity, the widest column, goes first. */
.people-scroll { overflow-x: auto; }
.people-actions { white-space: nowrap; text-align: right; }
.people-action { padding: 4px 8px; font-size: 12px; margin-left: 4px; }
.people-invite td { background: var(--bg); }
.people-state { font-size: 11.5px; color: var(--text-dim); }
.people-state.pending { color: var(--warn-fg); }
/* The Role select keeps to the width of its usual labels: a longer one (a
   Designer choice with the date someone may take it) would otherwise widen
   the column and push the row's actions out of the card. What became of a
   role change goes under it, on that person's own row (a refusal stays
   until the next change). */
.people-place { max-width: 190px; }
.people-place select { max-width: 100%; }
.people-row-status { font-size: 11.5px; color: var(--warn-fg); margin-top: 4px; }
.people-row-status:empty { display: none; }
.people-invite-bar { margin: 12px 0 4px; }
/* On a phone each person is a block of lines rather than a row of
   columns, with last activity left out. */
@media (max-width: 700px) {
  .people-wide, .people-none, .people-list thead { display: none; }
  .people-list, .people-list tbody, .people-list tr, .people-list td { display: block; }
  .people-list tr { padding: 6px 0; border-bottom: 1px solid var(--border); }
  .people-list tbody tr:last-child { border-bottom: none; }
  .people-list td { padding: 3px 12px; border-bottom: none; }
  .people-list td[data-label]::before { content: attr(data-label) ": "; }
  .people-list .people-actions { text-align: left; }
  .people-list .people-action { margin: 2px 6px 2px 0; }
}
/* The support log in Admin → Riser Draft support: a plain table, refusals
   in amber. */
.support-log td { vertical-align: top; }
.support-log-when { white-space: nowrap; }
.support-log-result { white-space: nowrap; }
.support-log-result.refused { color: var(--warn-fg); }
.support-log-more { margin: 10px 0 0; }
.people-removed { margin-top: 12px; font-size: 13px; }
.people-removed summary { cursor: pointer; color: var(--text-dim); }
.people-removed .hint { margin: 8px 0; }
.people-gone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.people-gone-text { min-width: 0; overflow-wrap: anywhere; }

/* The Account page's and Admin's dialogs (modal.js openFormDialog): a small
   form. */
.form-dialog input[type="text"],
.form-dialog input[type="email"],
.form-dialog select {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
.form-dialog .account-row input { margin-bottom: 0; }
.form-dialog-status { min-height: 16px; margin: 4px 0 0 !important; color: var(--warn-fg); }
.invite-choices { border: none; padding: 0; margin: 0 0 10px; }
.invite-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
  cursor: pointer;
  font-size: 13px;
}
.invite-choice:has(input:checked) { border-color: var(--accent-dim); }
.invite-choice input { margin-top: 3px; }
.invite-choice-label { font-weight: 600; }
.invite-choice-about { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.invite-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px !important; }


/* ===== Phase 2: project name field + My Projects modal ===== */
#project-name-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 13px;
  width: 170px;
  font-family: inherit;
}
#project-name-input:focus { outline: none; border-color: var(--accent); }
/* The field and the share badge's short word inside it (.share-tag): on a
   desktop bar a box exactly the field's, so the tag centres on it. (In a
   phone's ☰ menu it is as wide as the menu, and the tag never shows.) */
.project-name-field { display: flex; position: relative; }
/* The name and, under it, a quiet line with the design's Design # and Opp #
   (projectsUI.js syncProjectName): the bar grows a few px for it, and no
   wider, so it wraps at the widths it did before. The line is never wider
   than the name field: the Design # comes first and is always whole (20
   characters at most, about 130 px), and a long Opp # ("Opp OPP-2026-0016",
   an older design's old number) ends in an ellipsis, its whole in the
   line's title and on the Quote tab. Between 701 and 1100 px wide the Opp
   # gives way first; the Design # stays. In the phone's ☰ menu the line is
   as wide as the menu, so nothing is cut. */
.project-name-cell { display: flex; flex-direction: column; gap: 2px; }
.project-name-cell:has(.design-numbers:not(.hidden)) #project-name-input { padding-top: 4px; padding-bottom: 4px; }
.design-numbers {
  display: block;
  max-width: 170px;
  padding: 0 2px;
  font-size: 10.5px;
  line-height: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.design-numbers .design-number-text { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.design-numbers .opp-number-text { color: var(--accent-hover); }
@media (min-width: 701px) and (max-width: 1100px) {
  .design-numbers .opp-number-text, .design-numbers .numbers-sep { display: none; }
}
@media (max-width: 700px) {
  .design-numbers { max-width: none; white-space: normal; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 16, 0.6);
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
}
.modal-close:hover { color: var(--text); background: none; }
.modal-foot {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.projects-search-row { padding: 10px 16px 0; display: flex; gap: 8px; align-items: center; }
.projects-trash-btn { flex-shrink: 0; font-size: 12px; padding: 5px 10px; white-space: nowrap; }
/* My Projects' Trash (projectsTrash.js): what it is, in the rows' quieter
   size, then a row per design. */
.trash-intro { margin: 2px 6px 8px; font-size: 11.5px; line-height: 1.45; color: var(--text-dim); }
.trash-info { flex: 1; min-width: 0; }
.trash-days { font-variant-numeric: tabular-nums; }
/* What a delete or a restore just did (projectsUI.js), Undo beside it. */
.projects-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 16px 0;
  padding: 6px 6px 6px 10px;
  font-size: 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.projects-notice-text { flex: 1; min-width: 0; }
/* Something that failed (projectsUI.js sayFailure): marked as a problem. */
.projects-notice.error {
  background: var(--warn-bg);
  border-color: var(--danger-text);
  color: var(--warn-fg-soft);
  font-weight: 600;
}
.projects-notice button { flex-shrink: 0; font-size: 12px; padding: 3px 12px; }
/* On a phone, a Trash row's name and details have the width, its buttons a
   line of their own, big enough to tap. */
@media (max-width: 480px) {
  .trash-row { flex-wrap: wrap; row-gap: 8px; }
  .trash-row .trash-info { flex-basis: 100%; }
  .trash-row .project-name-line { white-space: normal; }
  .trash-row .project-opportunity { white-space: nowrap; }
  .trash-row .project-row-actions { width: 100%; gap: 8px; }
  .trash-row .project-row-actions button { flex: 1; min-height: 40px; font-size: 13px; }
  .projects-notice button { min-height: 40px; }
}
.projects-search-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 13px;
  font-family: inherit;
}
.projects-list { overflow-y: auto; padding: 8px; }
.projects-empty { padding: 30px 12px; text-align: center; }
.project-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
}
.project-row:hover { background: var(--panel-alt); }
.project-row.current { background: var(--accent-dim); }
.project-open {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 0;
  cursor: pointer;
}
.project-open:hover { background: none; }
.project-name-line { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
/* My Projects: the design's Design # and Opp # lead the quiet line, under
   a name that may clip its own (projectsUI.js). */
.project-numbers { font-size: 11.5px; margin-bottom: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-numbers .design-number-text { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.project-numbers .opp-number-text { color: var(--accent-hover); }
.project-row.current .project-numbers .design-number-text, .project-row.current .project-numbers .opp-number-text { color: var(--on-fill); }
/* Trash: the design's Design # beside its name, same line, quieter. */
.project-opportunity {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}
.project-current-tag {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
  margin-left: 6px;
}
.project-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.project-row-actions button {
  font-size: 11px;
  padding: 4px 8px;
  color: var(--text-dim);
}
.project-row-actions button:hover { color: var(--text); }
.project-row-actions button.project-delete:hover { color: var(--on-fill); background: var(--danger-fill); border-color: var(--danger-fill); }

/* ===== Canvas toolbar toggles (grid / snap / line style) ===== */
.toolbar-toggle { font-size: 12px; }
.toolbar-toggle.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}
#drawing-svg.no-grid { background-image: none; }

/* Per-quote download/delete actions in the reporting Export History */
.report-log-actions { display: flex; gap: 6px; }
.report-download-btn {
  font-size: 11px;
  padding: 3px 9px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.report-download-btn:hover { background: var(--accent-hover); }
.report-delete-btn {
  font-size: 11px;
  padding: 3px 9px;
  color: var(--text-dim);
}
.report-delete-btn:hover { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-fill); }

/* ===== Reporting: date range + period filter ===== */
.report-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.report-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.report-filter-row input[type="date"],
.report-filter-row input[type="search"],
.report-filter-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 13px;
  font-family: inherit;
}
/* Wide enough for its placeholder and a full opportunity number. */
.report-filter-row input[type="search"] { width: 210px; max-width: 100%; box-sizing: border-box; }

/* Date range presets beside From/To. "Custom" isn't a button: it only
   shows which range is in use once the dates are edited by hand. */
.report-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.report-preset-btn { font-size: 12px; padding: 5px 10px; }
.report-preset-btn[aria-pressed="true"],
.report-preset-custom {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}
.report-preset-custom {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--accent);
  border-radius: 4px;
}
/* A Reporting seat's Home is this tab, on a phone too: a finger's room for
   its buttons and fields, as Home's own (css/home.css). */
@media (max-width: 700px) {
  #reporting-panel .quote-actions-row button, .report-preset-btn,
  .report-filter-row button, .report-filter-row input, .report-filter-row select { min-height: 44px; }
}

/* People / Manufacturer multi-select filter dropdowns */
.report-filter-dropdown .dropdown-menu {
  min-width: 230px;
  max-width: 280px;
  padding: 8px;
  flex-direction: column;
  align-items: stretch;
}
.report-filter-dropdown .dropdown-menu.report-filter-menu-left { left: 0; right: auto; }
.report-filter-menu-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.report-filter-menu-actions button {
  flex: 1;
  font-size: 11px;
  padding: 4px 6px;
}
.report-filter-menu-note { margin: 4px 2px; font-size: 12px; color: var(--text-dim); }
.report-filter-menu-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.report-filter-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.report-filter-check-row:hover { background: var(--panel-alt); }
.report-filter-check-row input { flex: none; }
.report-filter-check-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-count { color: var(--accent); font-weight: 600; }
.filter-count.hidden { display: none; }

/* ===== Reporting: charts ===== */
.reporting-charts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.reporting-chart-card {
  flex: 1 1 260px;
  min-width: 240px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.reporting-chart-card .palette-header { margin: 0 0 10px; }
/* The charts sit centred in cards that the row stretches to one height. */
.reporting-chart-card > [id^="report-chart-"] {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-axis-label { font-size: 12px; fill: var(--text-dim); font-family: inherit; }
.chart-value-label { font-size: 12px; fill: var(--text); font-weight: 600; font-family: inherit; }
.chart-bar { cursor: pointer; }
.chart-bar:hover,
.donut-segment:hover { filter: brightness(1.18); }
.donut-segment { cursor: pointer; transition: filter 0.1s ease; }
.chart-empty-hint {
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: 30px 0;
  margin: 0;
}

/* The donut is a fixed size with its legend beside it (below it in a narrow
   card), so it never outgrows the other charts. */
.chart-donut-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.chart-svg.chart-donut { width: 168px; flex: none; }
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 190px;
  min-width: 0;
}
.chart-legend-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.chart-legend-swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.chart-legend-label {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-legend-value { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }

.chart-donut-total-label {
  font-size: 12px;
  fill: var(--text-dim);
  text-anchor: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: inherit;
}
.chart-donut-total-value {
  font-size: 18px;
  fill: var(--text);
  font-weight: 700;
  text-anchor: middle;
  font-family: inherit;
}

.chart-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.chart-tooltip.hidden { display: none; }
.chart-tooltip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tooltip-row + .chart-tooltip-row { margin-top: 3px; }
.chart-tooltip-swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chart-tooltip-label { color: var(--text-dim); }
.chart-tooltip-value { color: var(--text); margin-left: auto; padding-left: 10px; }

@media print {
  #reporting-panel.printing .reporting-charts,
  #reporting-panel.printing .report-presets { display: none !important; }
  #reporting-panel.printing .money-screen { display: none; }
  #reporting-panel.printing .money-print { display: inline; }
  #reporting-panel.printing .quote-table tfoot td { position: static; background: var(--print-fill); }
}

/* --- Adapter advisories on connections --- */
/* A device whose symbol was deleted from the library reads as the same kind
   of amber advisory. */
.adapter-warning,
.missing-symbol-note {
  font-size: 11.5px;
  color: var(--warn-fg-soft);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 6px 8px;
  margin: 0 0 6px;
}
.adapter-badge { pointer-events: none; }
.adapter-badge-box { fill: var(--warn-bg); stroke: var(--warn-fg); stroke-width: 1.2; }
.adapter-badge.resolved .adapter-badge-box { fill: var(--ok-bg); stroke: var(--ok-stroke); }
.adapter-badge-mark { fill: var(--warn-fg); font-size: 9px; font-weight: 700; }
.adapter-badge.resolved .adapter-badge-mark { fill: var(--ok-fg); }
.adapter-badge-label {
  fill: var(--warn-fg);
  font-size: 9px;
  font-weight: 600;
  paint-order: stroke fill;
  stroke: var(--canvas);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.adapter-badge.resolved .adapter-badge-label { fill: var(--ok-fg); }
/* A discontinued unit's DISCONTINUED tag on the drawing (discontinuedTag.js),
   in the palette's DISC badge colours. The screen's only: a print of the
   canvas leaves it off unless it's switched on for exports. */
.discontinued-tag-box { fill: var(--disc-bg); stroke: var(--disc-border); stroke-width: 1; }
.discontinued-tag-text { fill: var(--disc-fg); font-size: 7.5px; font-weight: 700; pointer-events: none; }
#drawing-svg.export-no-disc-tags .discontinued-tag { display: none; }

/* --- Sharing a design with a teammate --- */
.share-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
  align-self: center;
}
.share-badge.hidden { display: none; }
.share-badge.view, .share-tag.view { background: #2b2417; border-color: var(--warn-border); color: var(--warn-fg-soft); }
.share-badge.edit, .share-tag.edit { background: #16261c; border-color: #2f6b45; color: var(--ok-fg); }
/* A teammate's design, open with the team admin's access. */
.share-badge.admin, .share-tag.admin { background: #172334; border-color: var(--accent-dim); color: var(--accent-hover); }
/* Where the top bar has no room for the badge's words (projectsUI.js
   fitShareBadge, FR-97), the badge steps aside, still heard by a screen
   reader, and on the drawing tabs its short word ("Admin", "Shared",
   "View only") sits inside the name field's right end, taking none of the
   bar's width; its title has the full words. A ring of the field's colour
   keeps it clear of a long name, and it gives the field back while the
   name is being typed. */
.share-badge.no-room {
  position: absolute; width: 1px; height: 1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.share-tag {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  font-size: 10.5px;
  line-height: 14px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 3px var(--bg);
  white-space: nowrap;
  cursor: text;
}
.share-tag.hidden, #project-name-input:focus + .share-tag { display: none; }

.projects-section-header {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 12px 0 6px;
}
.projects-section-header:first-child { margin-top: 0; }
.project-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin-left: 4px;
  vertical-align: middle;
}

/* The share dialog opens *from* My Projects, so it has to sit above that
   modal (.modal-overlay, z-index 900) while staying under the login gate. */
.share-overlay { z-index: 950; }
/* "Your access changed" (authClient.js): above everything but the login
   gate, which the maintenance notice uses. */
.access-overlay { z-index: 980; }
.share-box { min-width: 380px; max-width: 90vw; }
.share-body { margin: 4px 0 10px; }
.share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.share-who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.share-row select, .share-add select {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px;
  font-size: 12px;
}
.share-add {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.share-add select:first-child { flex: 1; min-width: 140px; }

/* --- Symbol approvals: filter bar + paging --- */
.approvals-toolbar {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.approvals-toolbar input {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
}
.approvals-toolbar select {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px;
  font-size: 13px;
  max-width: 240px;
}
/* The "load more" row, and the notice when the requests couldn't be loaded. */
.approvals-more,
.approvals-error {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.approvals-more .hint,
.approvals-error .hint { margin: 0; }
/* Approving many at once: the bulk buttons, the batch's status line with
   Undo this batch, and each card's tick box. */
.approvals-bulk,
.approvals-batch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.approvals-select-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.approvals-batch {
  max-width: 980px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
  padding: 8px 12px;
  margin: 0 0 10px;
  font-size: 13px;
}
.approvals-batch-flash { margin: 0 0 6px; }
.approvals-batch-flash:last-child,
.approvals-batch .approvals-batch-line { margin: 0; }
.approvals-batch-flash.error { color: var(--danger-text); }
.approval-select { margin: 0; flex-shrink: 0; cursor: pointer; }
.approval-select:disabled { cursor: not-allowed; }
.approvals-bulk button:disabled,
.approvals-batch button:disabled { opacity: 0.45; cursor: default; }
.approvals-bulk .approval-approve-btn:disabled:hover { background: var(--ok-bg); }

/* Cable IDs (F501.01): capitals on screen as on the printed label, and a
   clash with another cable called out, since IDs must be unique. */
.cable-id-input { text-transform: uppercase; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.cable-id-clash { color: var(--danger-text); margin-top: -4px; }
