/* Basecamp shell — one hand-written stylesheet, no build step.
   Classes are prefixed bc- so they never collide with the Django admin or Bootstrap pages
   the sidebar links to. Add a class here before inventing one in a template. */

/* Brand tokens: docs/brand_guide.md. Amber and orange are the logo's two slash stripes; ink is
   the dark panel the sign-in page and the sidebar share. Amber and orange are fills, never text
   on white: orange text on a light background uses --bc-brand-text. */
:root {
  --bc-brand: #F6B420;
  --bc-brand-dark: #F07E20;
  --bc-brand-text: #C2410C;
  --bc-ink: #18181B;
  --bc-ink-2: #27272A;
  --bc-ink-3: #3F3F46;
  --bc-ink-text: #D4D4D8;
  --bc-ink-muted: #A1A1AA;
  --bc-ink-faint: #71717A;
  --bc-ink-strong: #F4F4F5;
  --bc-bg: #F5F6F8;
  --bc-card: #FFFFFF;
  --bc-text: #111827;
  --bc-muted: #6B7280;
  --bc-border: #E5E7EB;
  --bc-link: #1D4ED8;
  --bc-bad-bg: #FDE2E1; --bc-bad-fg: #991B1B;
  --bc-ok-bg: #FEF3C7;  --bc-ok-fg: #92400E;
  --bc-good-bg: #DCFCE7; --bc-good-fg: #166534;
  --bc-radius: 6px;
  --bc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.bc-body { font: 14px/1.45 var(--bc-font); color: var(--bc-text); background: var(--bc-bg); }
a { color: var(--bc-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--bc-brand-text); outline-offset: 2px; }
code { font-family: var(--bc-mono); font-size: 0.92em; background: #EEF0F3; padding: 1px 4px; border-radius: 3px; }

/* Layout */
.bc-app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.bc-sidebar { background: var(--bc-ink); color: var(--bc-ink-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.bc-main { min-width: 0; display: flex; flex-direction: column; }
.bc-content { padding: 20px 24px; flex: 1; }
.bc-foot { padding: 12px 24px; color: var(--bc-muted); font-size: 12px; border-top: 1px solid var(--bc-border); }

/* Sidebar: the sign-in page's brand panel carried into the shell. Ink background, the
   storefront's white wordmark, and the logo's two slash stripes (amber inside, orange at the
   edge) at the head of the panel and on the current page. */
.bc-brand { position: relative; display: block; flex: none; padding: 18px 48px 14px 16px; overflow: hidden; border-bottom: 1px solid var(--bc-ink-2); }
.bc-brand::before, .bc-brand::after { content: ""; position: absolute; top: -12px; bottom: -12px; width: 9px; transform: skewX(-8deg); }
.bc-brand::before { right: 6px; background: var(--bc-brand-dark); }
.bc-brand::after { right: 15px; background: var(--bc-brand); }
.bc-brand:hover { text-decoration: none; }
.bc-brand img { display: block; width: 164px; height: auto; }
.bc-brand-name { display: block; margin-top: 7px; font-size: 11px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--bc-ink-muted); }
.bc-brand:hover .bc-brand-name { color: var(--bc-ink-strong); }
.bc-nav { flex: 1; padding: 10px 8px 16px; }
.bc-nav-area { margin-bottom: 2px; }
.bc-nav-area-label { list-style: none; cursor: pointer; padding: 7px 10px; border-radius: var(--bc-radius); font-weight: 600; font-size: 13px; color: var(--bc-ink-strong); user-select: none; }
.bc-nav-area-label::-webkit-details-marker { display: none; }
.bc-nav-area-label::before { content: "▸"; display: inline-block; width: 14px; color: var(--bc-ink-faint); font-size: 11px; }
.bc-nav-area[open] > .bc-nav-area-label::before { content: "▾"; }
.bc-nav-area-label:hover { background: var(--bc-ink-2); }
.bc-nav-area-label.is-active { color: var(--bc-brand); }
.bc-nav-area-label.is-active::before { color: var(--bc-brand); }
.bc-nav-items { list-style: none; margin: 0; padding: 2px 0 6px 14px; }
.bc-nav-items a { display: flex; align-items: center; gap: 6px; color: var(--bc-ink-text); padding: 5px 10px; border-radius: var(--bc-radius); font-size: 13px; }
.bc-nav-items a:hover { background: var(--bc-ink-2); color: #fff; text-decoration: none; }
.bc-nav-items a.bc-nav-records { color: var(--bc-ink-muted); font-size: 12px; }
.bc-nav-items a.bc-nav-guide { color: var(--bc-ink-muted); font-size: 12px; }
.bc-nav-items a.is-current { background: var(--bc-ink-2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--bc-brand-dark), inset 6px 0 0 var(--bc-brand); padding-left: 14px; }
.bc-sidebar :focus-visible { outline: 2px solid var(--bc-brand); outline-offset: -2px; }
.bc-sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--bc-ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.bc-user { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bc-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bc-ink-strong); }
.bc-inline-form { margin: 0; }
.bc-link-btn { background: none; border: 0; color: var(--bc-ink-text); cursor: pointer; padding: 0; font: inherit; white-space: nowrap; }
.bc-link-btn:hover { color: #fff; text-decoration: underline; }

/* Top bar */
.bc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--bc-card); border-bottom: 1px solid var(--bc-border); position: sticky; top: 0; z-index: 5; }
/* The logo's slash pair ahead of every page title: the one brand mark inside a page. */
.bc-crumbs { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bc-crumbs::before { content: ""; flex: none; align-self: center; width: 10px; height: 18px; margin-right: 4px; background: linear-gradient(90deg, var(--bc-brand) 0 50%, var(--bc-brand-dark) 50% 100%); transform: skewX(-12deg); }
.bc-crumb { color: var(--bc-muted); font-size: 13px; }
.bc-crumb-sep { color: #9CA3AF; }
.bc-title { font-size: 18px; }
.bc-topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bc-guide-q { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #D1D5DB; background: #fff; color: var(--bc-muted); font-weight: 700; font-size: 13px; line-height: 1; }
.bc-guide-q:hover { border-color: var(--bc-brand); background: var(--bc-brand); color: #111; text-decoration: none; }

/* Job tray */
.bc-tray { position: relative; }
.bc-tray-link { display: inline-flex; align-items: center; gap: 6px; color: var(--bc-muted); font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--bc-border); }
.bc-tray-link:hover { text-decoration: none; background: var(--bc-bg); }
.bc-tray-dot { width: 8px; height: 8px; border-radius: 50%; background: #9CA3AF; }
.bc-tray-link.is-busy { color: var(--bc-text); border-color: var(--bc-brand); }
.bc-tray-link.is-busy .bc-tray-dot { background: var(--bc-brand-dark); animation: bc-pulse 1.4s ease-in-out infinite; }
@keyframes bc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.bc-tray-list { display: none; position: absolute; right: 0; top: 30px; margin: 0; padding: 6px 0; list-style: none; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 280px; z-index: 6; }
.bc-tray:hover .bc-tray-list, .bc-tray:focus-within .bc-tray-list { display: block; }
.bc-tray-list li a { display: block; padding: 6px 12px; font-size: 13px; color: var(--bc-text); }
.bc-tray-list li a:hover { background: var(--bc-bg); text-decoration: none; }

/* Levels, states, tags */
.bc-level { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 999px; background: var(--bc-ink-3); color: #E4E4E7; }
.bc-level-manager { background: #1E3A8A; color: #DBEAFE; }
.bc-level-owner { background: #7C2D12; color: #FFEDD5; }
.bc-level-staff { background: var(--bc-ink-3); color: #E4E4E7; }
.bc-state { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #EEF0F3; }
.bc-state-running { background: var(--bc-ok-bg); color: var(--bc-ok-fg); }
.bc-state-failed { background: var(--bc-bad-bg); color: var(--bc-bad-fg); }
.bc-state-succeeded { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 3px; background: #EEF0F3; color: var(--bc-muted); margin-left: 6px; vertical-align: middle; }
.bc-tag-ok { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-kind { display: inline-block; width: 52px; text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 0; border-radius: 3px; margin-right: 8px; background: #EEF0F3; color: var(--bc-muted); }
.bc-kind-import { background: #DBEAFE; color: #1E3A8A; }
.bc-kind-export { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-kind-tool { background: var(--bc-ok-bg); color: var(--bc-ok-fg); }
.bc-muted { color: var(--bc-muted); }
.bc-small { font-size: 12px; }
.bc-empty { color: var(--bc-muted); padding: 12px 0; }
.bc-lede { color: var(--bc-muted); max-width: 70ch; margin: 0 0 16px; }

/* Sections, cards, grids */
.bc-section { margin-bottom: 24px; }
.bc-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bc-section-head h2 { font-size: 15px; }
.bc-card { background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 16px; }
.bc-card-narrow { max-width: 560px; }
.bc-card-title { font-size: 14px; margin-bottom: 8px; }
.bc-grid { display: grid; gap: 16px; }
.bc-grid-2 { grid-template-columns: 1fr 1fr; }
.bc-grid-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bc-list { list-style: none; margin: 0; padding: 0; }
.bc-list li { padding: 4px 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bc-dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; }
.bc-dl dt { color: var(--bc-muted); }
.bc-dl dd { margin: 0; }
.bc-dl-wide { grid-template-columns: 130px 1fr; max-width: 900px; margin: 0 0 12px; }
.bc-defined { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

/* KPI cards */
.bc-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--bc-card); border: 1px solid var(--bc-border); border-left: 4px solid #D1D5DB; border-radius: var(--bc-radius); color: var(--bc-text); }
.bc-kpi:hover { text-decoration: none; border-color: #9CA3AF; }
.bc-kpi-value { font-size: 26px; font-weight: 600; line-height: 1.1; }
.bc-kpi-label { font-size: 12px; color: var(--bc-muted); }
.bc-kpi-attention { border-left-color: var(--bc-brand); }
.bc-kpi-attention .bc-kpi-value { color: var(--bc-brand-text); }
.bc-kpi-alert { border-left-color: #DC2626; }
.bc-kpi-alert .bc-kpi-value { color: var(--bc-bad-fg); }

/* Tables */
.bc-table { width: 100%; border-collapse: collapse; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }
.bc-table th, .bc-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--bc-border); vertical-align: top; }
.bc-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--bc-muted); background: #FAFAFB; white-space: nowrap; }
.bc-table tbody tr:hover { background: #FBFBFC; }
.bc-table tbody tr:last-child td { border-bottom: 0; }
.bc-table-dense th, .bc-table-dense td { padding: 5px 8px; font-size: 13px; }
.bc-actions-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.bc-table-wrap { overflow-x: auto; max-width: 100%; }
.bc-table-wrap .bc-table { min-width: 1100px; }
/* Wide tables keep their first column (the row's name) in view while the rest scrolls sideways.
   A sticky cell needs its own background, and an inset shadow because collapsed borders scroll away. */
.bc-table-freeze th:first-child, .bc-table-freeze td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bc-card); box-shadow: inset -1px 0 0 var(--bc-border); }
.bc-table-freeze th:first-child { background: #FAFAFB; }
.bc-table-freeze tbody tr:hover td:first-child { background: #FBFBFC; }
/* ...and their header row in view while the rows scroll, inside a box no taller than the window
   (a header can only stick inside the box that scrolls it; the wrap already scrolls sideways). */
.bc-table-wrap-tall { max-height: 75vh; overflow: auto; }
.bc-table-freeze thead th { position: sticky; top: 0; z-index: 2; background: #FAFAFB; box-shadow: inset 0 -1px 0 var(--bc-border); }
.bc-table-freeze thead th:first-child { z-index: 3; box-shadow: inset -1px -1px 0 var(--bc-border); }
.bc-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.bc-sortable a { color: inherit; }
.bc-sortable.is-sorted-desc a::after { content: " ▾"; }
.bc-sortable.is-sorted-asc a::after { content: " ▴"; }
.bc-table-meta { display: flex; justify-content: space-between; align-items: center; color: var(--bc-muted); font-size: 12px; margin: 8px 0; }
.bc-legend { display: inline-flex; gap: 6px; align-items: center; }
.bc-band { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; }
.bc-band-bad, .bc-band-cell.bc-band-bad { background: var(--bc-bad-bg); color: var(--bc-bad-fg); }
.bc-band-ok, .bc-band-cell.bc-band-ok { background: var(--bc-ok-bg); color: var(--bc-ok-fg); }
.bc-band-good, .bc-band-cell.bc-band-good { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-cell-title { min-width: 260px; }
.bc-cell-assign { min-width: 220px; }
tr.is-discontinued td { color: var(--bc-muted); }
.bc-q { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 3px; background: #EEF0F3; color: var(--bc-muted); margin-right: 4px; }
.bc-q4 { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-q3 { background: #DBEAFE; color: #1E3A8A; }
.bc-pager { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 12px; }

/* Log */
.bc-log { background: #0B1220; color: #D1D5DB; font-family: var(--bc-mono); font-size: 12px; padding: 12px; border-radius: var(--bc-radius); max-height: 70vh; overflow: auto; }
.bc-log-line { white-space: pre-wrap; }
.bc-log-time { color: #6B7280; margin-right: 8px; }

/* Forms and buttons */
.bc-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 12px 14px; margin-bottom: 12px; }
.bc-filters label, .bc-assign-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--bc-muted); }
.bc-filters input[type=search], .bc-filters input[type=number], .bc-filters input[type=date], .bc-filters input[type=text], .bc-filters input:not([type]), .bc-filters select, .bc-assign-form input[type=text], .bc-assign-form select, .bc-assign-form textarea { font: inherit; font-size: 13px; color: var(--bc-text); padding: 5px 8px; border: 1px solid #D1D5DB; border-radius: var(--bc-radius); background: #fff; min-width: 140px; }
.bc-check { flex-direction: row !important; align-items: center; gap: 6px !important; color: var(--bc-text) !important; font-size: 13px !important; }
.bc-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: var(--bc-radius); border: 1px solid #D1D5DB; background: #fff; color: var(--bc-text); cursor: pointer; }
.bc-btn:hover { background: var(--bc-bg); text-decoration: none; }
.bc-btn-primary { background: var(--bc-brand); border-color: var(--bc-brand); color: #111; font-weight: 600; }
.bc-btn-primary:hover { background: var(--bc-brand-dark); border-color: var(--bc-brand-dark); }
.bc-btn:disabled, .bc-btn[disabled] { opacity: .45; cursor: not-allowed; }
.bc-btn-primary:disabled:hover { background: var(--bc-brand); border-color: var(--bc-brand); }
.bc-btn-ghost { background: transparent; }
.bc-btn-small { padding: 2px 8px; font-size: 12px; }
.bc-btn-danger { color: var(--bc-bad-fg); }
.bc-form-actions { display: flex; gap: 8px; align-items: center; }
.bc-fieldset { border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; }
.bc-fieldset legend { font-size: 12px; color: var(--bc-muted); padding: 0 4px; }
.bc-assign-form { display: flex; flex-direction: column; gap: 8px; padding: 8px; background: #FAFAFB; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); min-width: 320px; }
.bc-chip { margin: 2px 0; }
.bc-chip-btn { font: inherit; font-size: 12px; background: #EEF0F3; border: 1px solid var(--bc-border); border-radius: 999px; padding: 2px 10px; cursor: pointer; color: var(--bc-text); text-align: left; }
.bc-chip-btn:hover { background: #E5E7EB; }
.bc-chip-complete .bc-chip-btn { background: var(--bc-good-bg); border-color: #BBF7D0; }
.bc-chip-in_progress .bc-chip-btn { background: var(--bc-ok-bg); border-color: #FDE68A; }
.bc-chip-review .bc-chip-btn { background: #DBEAFE; border-color: #BFDBFE; }

/* Flashes */
.bc-flashes { padding: 12px 24px 0; }
.bc-flash { padding: 8px 12px; border-radius: var(--bc-radius); background: #EEF0F3; margin-bottom: 8px; font-size: 13px; }
.bc-flash-success { background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-flash-error { background: var(--bc-bad-bg); color: var(--bc-bad-fg); }
.bc-flash-warning { background: var(--bc-ok-bg); color: var(--bc-ok-fg); }

/* HTMX affordances */
.htmx-request { opacity: 0.6; transition: opacity 120ms; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

/* Product workspace */
.bc-product-header { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: start; margin-bottom: 16px; }
.bc-product-title { font-size: 18px; font-weight: 600; }
.bc-product-flags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.bc-stats { display: flex; gap: 20px; margin: 0; }
.bc-stats div { display: flex; flex-direction: column; }
.bc-stats dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--bc-muted); }
.bc-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bc-border); margin-bottom: 16px; flex-wrap: wrap; }
.bc-tab { padding: 8px 14px; color: var(--bc-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.bc-tab:hover { color: var(--bc-text); text-decoration: none; }
.bc-tab.is-active { color: var(--bc-text); border-bottom-color: var(--bc-brand); font-weight: 600; }
.bc-tab.is-pending { font-style: italic; }
.bc-tab.is-pending::after { content: " ·"; color: #9CA3AF; }

/* Switch */
.bc-switch { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--bc-text); }
.bc-switch-track { width: 32px; height: 18px; border-radius: 999px; background: #D1D5DB; position: relative; transition: background 120ms; flex: none; }
.bc-switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: left 120ms; }
.bc-switch.is-on .bc-switch-track { background: var(--bc-brand-dark); }
.bc-switch.is-on .bc-switch-knob { left: 16px; }
.bc-switch:focus-visible .bc-switch-track { outline: 2px solid var(--bc-link); outline-offset: 2px; }
tr.is-flash td { animation: bc-flash-row 1.2s ease-out; }
@keyframes bc-flash-row { from { background: var(--bc-ok-bg); } to { background: transparent; } }
.bc-table-auto { min-width: 0 !important; }

/* Forms */
.bc-form { display: flex; flex-direction: column; gap: 14px; }
.bc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.bc-field { display: flex; flex-direction: column; gap: 4px; }
.bc-field-wide { grid-column: 1 / -1; }
.bc-field label { font-size: 12px; font-weight: 600; color: var(--bc-text); }
.bc-field input[type=text], .bc-field input[type=number], .bc-field input[type=date], .bc-field input:not([type]), .bc-field select, .bc-field textarea { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #D1D5DB; border-radius: var(--bc-radius); background: #fff; width: 100%; }
.bc-field-rich { background: var(--bc-card); }
.bc-help { font-size: 12px; color: var(--bc-muted); }
.bc-field-error { font-size: 12px; color: var(--bc-bad-fg); }
.bc-sticky-actions { position: sticky; bottom: 0; background: var(--bc-bg); padding: 10px 0; border-top: 1px solid var(--bc-border); z-index: 4; }

/* Media */
.bc-media-status:empty { display: none; }
.bc-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.bc-media-card { background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.bc-media-card.is-primary { border-color: var(--bc-brand); box-shadow: 0 0 0 1px var(--bc-brand); }
.bc-media-card.sortable-ghost { opacity: 0.4; }
.bc-media-thumb { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--bc-border); border-radius: 4px; overflow: hidden; cursor: grab; }
.bc-media-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bc-media-badge { position: absolute; top: 6px; left: 6px; background: var(--bc-brand); color: #111; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.bc-media-alt { font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid #D1D5DB; border-radius: 4px; width: 100%; }
.bc-media-roof { font: inherit; font-size: 12px; padding: 3px 4px; border: 1px solid #D1D5DB; border-radius: 4px; width: 100%; background: var(--bc-card); }
.bc-media-actions { display: flex; flex-wrap: wrap; gap: 4px; }

/* Modal */
.bc-modal { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.55); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bc-modal[hidden] { display: none; }
.bc-modal-panel { background: var(--bc-card); border-radius: 8px; padding: 16px 18px; width: min(760px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
/* A form that edits one row of a long list (the fit editor): wide enough for its three columns. */
.bc-modal-panel-wide { width: min(1120px, 100%); }
.bc-modal-panel .bc-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bc-modal-close { border: 0; background: none; font-size: 24px; line-height: 1; padding: 0 4px; color: var(--bc-muted); cursor: pointer; }
.bc-modal-close:hover { color: var(--bc-text); }
/* The page behind an open modal stays put. */
html:has(.bc-modal:not([hidden])) { overflow: hidden; }
.bc-crop-area { height: 420px; background: #F3F4F6; }
.bc-crop-area img { display: block; max-width: 100%; }
.bc-crop-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-link-dark { background: none; border: 0; font-size: 16px; cursor: pointer; color: var(--bc-muted); }

/* Chip picker */
.bc-picker { position: relative; }
.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; }
.bc-chip-item { display: inline-flex; align-items: center; gap: 4px; background: #EEF0F3; border: 1px solid var(--bc-border); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }
.bc-chip-x { background: none; border: 0; cursor: pointer; color: var(--bc-muted); font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.bc-chip-x:hover { background: #D1D5DB; color: var(--bc-text); }
.bc-picker-search { position: relative; }
.bc-picker-search input { width: 100%; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid #D1D5DB; border-radius: var(--bc-radius); }
.bc-picker-results:empty { display: none; }
.bc-picker-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 10; max-height: 280px; overflow: auto; }
.bc-picker-list { list-style: none; margin: 0; padding: 4px 0; }
.bc-picker-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.bc-picker-list button:hover, .bc-picker-list button:focus { background: var(--bc-bg); }
.bc-picker-empty { padding: 8px 10px; }

/* Variants */
tr.is-editing > td { background: #FAFAFB; }
.bc-inline-edit { padding: 6px 2px; }
.bc-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bc-warnings { margin: 6px 0 0; padding-left: 18px; }
.bc-warnings li { margin: 2px 0; }

/* Category tree */
.bc-indent { display: inline-block; width: calc(var(--depth, 0) * 18px); }

.bc-intents { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bc-intent { align-items: flex-start !important; }
.bc-intent input { margin-top: 3px; }

/* Segmented control (product lifecycle) */
.bc-segmented { display: inline-flex; border: 1px solid #D1D5DB; border-radius: var(--bc-radius); overflow: hidden; }
.bc-seg { font: inherit; font-size: 12px; padding: 4px 12px; background: #fff; border: 0; border-right: 1px solid #D1D5DB; cursor: pointer; color: var(--bc-text); }
.bc-seg:last-child { border-right: 0; }
.bc-seg:hover:not(:disabled) { background: var(--bc-bg); }
.bc-seg.is-on { background: var(--bc-brand); color: #111; font-weight: 600; cursor: default; }
.bc-seg:disabled:not(.is-on) { color: #9CA3AF; cursor: not-allowed; }

/* Docs, videos, FAQ, specs */
[x-cloak] { display: none !important; }
.bc-form-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.bc-form-row .bc-field { min-width: 160px; }
.bc-add { margin-top: 8px; }
.bc-add > summary { list-style: none; display: inline-flex; }
.bc-add > summary::-webkit-details-marker { display: none; }
.bc-faq { margin-bottom: 8px; }
.bc-faq-answer { margin: 4px 0 8px; color: var(--bc-text); }
.bc-spec-form { display: flex; flex-direction: column; gap: 6px; }
.bc-spec-choices { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bc-spec-choice { font-size: 12px !important; }
.bc-input-small { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid #D1D5DB; border-radius: 4px; }

.bc-kpi-text { font-size: 18px; }

/* Collapsible lists in a preview (fit sheet import diff) */
.bc-details { margin: 8px 0; border: 1px solid var(--bc-border); border-radius: 6px; padding: 6px 10px; }
.bc-details > summary { cursor: pointer; font-weight: 600; }
.bc-reasons { border: 0; padding: 0; margin: 6px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.bc-reasons legend { padding: 0; margin-bottom: 4px; }
.bc-reasons label { display: flex; gap: 6px; align-items: flex-start; }
.bc-details ul, .bc-details p { margin: 6px 0 0; max-height: 320px; overflow: auto; }
.bc-nowrap { white-space: nowrap; }
.bc-input-narrow { width: 5em; }
tr.is-highlighted td { background: var(--bc-good-bg); }
.bc-inline { display: inline-flex; gap: 4px; align-items: center; margin-right: 14px; font-weight: normal; }
.bc-resolve { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.bc-resolve .bc-picker { min-width: 220px; margin: 0; }
.bc-filters .bc-input-narrow { min-width: 0; width: 5em; }
.bc-filters label.bc-inline { flex-direction: row; align-items: center; color: var(--bc-text); font-size: 13px; }
.bc-slot-img { max-width: 100%; max-height: 140px; object-fit: contain; background: #F3F4F6; border-radius: 4px; }
.bc-row-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 3px; background: #F3F4F6; }
.bc-ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bc-ov-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: #F3F4F6; display: block; }
.bc-ov-empty { display: flex; align-items: center; justify-content: center; color: var(--bc-muted); font-size: 13px; }
.bc-ov-card textarea { width: 100%; }
.bc-ref-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bc-ref-pair figure { margin: 0; }
.bc-ref-candidate { display: flex; flex-direction: column; gap: 4px; }
.bc-table-scroll { overflow-x: auto; max-width: 100%; }
.bc-ops td:first-child { min-width: 280px; width: 45%; }

/* Site content editor (content/editor.py renders the controls) */
.bc-content-meta { margin-bottom: 12px; }
/* A page's publishing state above the editor: draft or unpublished edits, schedule, preview. */
.bc-cstate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.bc-cstate-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-cstate-tools .bc-inline-form { display: inline-flex; align-items: center; gap: 6px; }
/* Image fields: click the picture to set its focal point; pick an uploaded image from a grid. */
/* An image field takes a whole row, so a page's images stack at one left edge. The picture is up to
   7/8 of the row wide and 320px tall; the frame inside shrinks to it, so the focal dot sits where
   it was clicked. */
.bc-cimage-pic { flex: 0 0 100%; line-height: 0; }
.bc-cfocal { position: relative; display: inline-block; max-width: 87.5%; cursor: crosshair; line-height: 0; }
.bc-cfocal[hidden] { display: none; }
.bc-cfocal-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(214, 69, 49, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); pointer-events: none; }
/* Variant edit form: a manager's cost box under the fields */
/* Variant edit form: delete sits apart from save, at the far end of the actions */
.bc-variant-delete { margin-left: auto; }
.bc-form-actions:has(.bc-variant-delete-note) { flex-wrap: wrap; }
.bc-variant-delete-note { flex-basis: 100%; text-align: right; }
/* Product -> Requirements: checkout questions as a checklist, then the products it requires */
.bc-req-mode { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.bc-req-block { grid-template-columns: minmax(0, 1fr); }
.bc-req-questions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 14px; }
.bc-req-question { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; padding: 6px 8px; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #fff; cursor: pointer; }
.bc-req-question.is-off { opacity: .55; cursor: default; }
.bc-req-question input { margin-top: 3px; }
.bc-req-wording { display: block; color: var(--bc-muted); margin-top: 2px; }
.bc-req-products { margin: 0; padding-left: 18px; columns: 2 320px; }
/* Site Config & Content -> Images: one tile per uploaded image */
.bc-ilib { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bc-ilib-tile { display: flex; flex-direction: column; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: var(--bc-card); overflow: hidden; }
.bc-ilib-thumb { display: flex; align-items: center; justify-content: center; height: 170px; background: #F3F4F6; }
.bc-ilib-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bc-ilib-body { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; }
.bc-ilib-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-ilib-uses { margin: 0; padding-left: 16px; font-size: 12px; }
.bc-ilib-alt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bc-ilib-alt input { flex: 1 1 140px; min-width: 0; }
.bc-ilib-delete { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.bc-ilib-delete:hover { text-decoration: underline; }
.bc-clibrary-tile { position: relative; }
.bc-clibrary-tile > button { width: 100%; }
.bc-clibrary-full { position: absolute; top: 3px; right: 3px; padding: 0 5px; border-radius: 3px; background: rgba(17, 24, 39, .7); color: #fff; font-size: 12px; line-height: 18px; text-decoration: none; }
.bc-clibrary-full:hover { background: rgba(17, 24, 39, .9); }
/* the picker opens on its own row under the button, not squeezed beside it */
.bc-cimage [data-library]:not(:empty) { flex: 0 0 100%; }
.bc-clibrary-scope { display: inline-flex; gap: 10px; margin-right: 6px; }
.bc-clibrary-scope .is-on { font-weight: 600; color: var(--bc-text); text-decoration: underline; text-underline-offset: 3px; }
.bc-clibrary-scope button[disabled] { opacity: .5; cursor: default; }
.bc-clibrary { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 6px 0; max-height: 320px; overflow: auto; }
.bc-clibrary button { padding: 0; border: 1px solid var(--bc-border, #d7dbe0); border-radius: 4px; background: #fff; cursor: pointer; }
.bc-clibrary img { width: 100%; height: 72px; object-fit: cover; display: block; border-radius: 3px 3px 0 0; }
.bc-clibrary span { display: block; padding: 2px 4px; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-clink-find { max-width: 160px; }
.bc-crow-head { cursor: grab; }
.bc-content-editor .bc-content-tab { align-items: start; }
.bc-content-list { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.bc-cgroup { grid-column: 1 / -1; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 10px 12px 12px; margin: 0; background: var(--bc-card); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.bc-cgroup > legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.bc-crep { display: flex; flex-direction: column; gap: 10px; }
.bc-crows { display: flex; flex-direction: column; gap: 10px; }
.bc-crow { border: 1px solid var(--bc-border); border-left: 3px solid var(--bc-brand); border-radius: var(--bc-radius); padding: 8px 10px 10px; background: var(--bc-bg); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.bc-crow .bc-cgroup { background: var(--bc-card); }
.bc-crow-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.bc-crow-tools { display: flex; gap: 10px; }
.bc-crow-tools button { background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--bc-muted); padding: 0 2px; }
.bc-crow-tools button:hover { color: var(--bc-text); }
.bc-crep > .bc-btn, .bc-crep > .bc-form-actions { align-self: flex-start; }
.bc-cimage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bc-cimage-thumb { display: block; width: auto; height: auto; max-width: 100%; max-height: 320px; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #fff; }
.bc-cimage input[name$="__alt"] { flex: 1 1 100%; }
.bc-clink { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-clink select, .bc-clink input { flex: 1 1 200px; }
.bc-content-editor .bc-sticky-actions #content-status .bc-flash { margin: 0; }

/* Area health (basecamp/home/health.html) */
.bc-nav-red { float: right; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; line-height: 18px; border-radius: 9px; background: var(--bc-bad-fg); color: #fff; padding: 0 5px; }
.bc-health { display: flex; flex-direction: column; gap: 6px; max-width: 900px; }
.bc-health-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px; padding: 10px 14px; background: var(--bc-card); border: 1px solid var(--bc-border); border-left-width: 4px; border-radius: var(--bc-radius); color: var(--bc-text); }
.bc-health-row:hover { text-decoration: none; background: #FBFBFC; }
.bc-health-bad { border-left-color: var(--bc-bad-fg); }
.bc-health-ok { border-left-color: var(--bc-ok-fg); }
.bc-health-good { border-left-color: var(--bc-good-fg); }
.bc-health-good .bc-health-count { color: var(--bc-muted); }
.bc-health-count { font-size: 22px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bc-health-text { display: flex; flex-direction: column; gap: 2px; }

/* Site content editor: where a field shows on the storefront (content/placement.py) */
.bc-cwhere-tab { grid-column: 1 / -1; margin: 0; padding: 8px 12px; background: #EEF6FF; border: 1px solid #BFDBFE; border-radius: var(--bc-radius); font-size: 13px; }
.bc-cwhere { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 12px; color: var(--bc-muted); }
.bc-cwhere-text { margin-right: 4px; }
.bc-cwhere-text strong { color: var(--bc-text); }
.bc-cscreen { padding: 1px 8px; border-radius: 999px; background: var(--bc-good-bg); color: var(--bc-good-fg); font-weight: 600; }
.bc-cscreen.is-off { background: #F3F4F6; color: #9CA3AF; text-decoration: line-through; font-weight: 400; }
.bc-cwhere-also { flex-basis: 100%; color: var(--bc-ok-fg); }
.bc-cwhere-unused { padding: 6px 10px; background: var(--bc-ok-bg); color: var(--bc-ok-fg); border-radius: var(--bc-radius); }

/* Fitment sync: the kind of change, as a tint rather than another column to read.
   Strong enough to tell apart at a glance down a long table, light enough to keep
   dark text readable on top. Failures win over the kind, because they are the ones
   to look at first. */
.bc-table tbody tr.bc-kind-new_fit { background: #DFF3E5; }
.bc-table tbody tr.bc-kind-year_extension { background: #DCEAFA; }
.bc-table tbody tr.bc-kind-changed_kit { background: #FCEFC7; }
.bc-table tbody tr.bc-kind-removed_fit { background: #F9DEDB; }
.bc-table tbody tr.bc-kind-unresolved_vehicle { background: #E8E0FA; }
.bc-table tbody tr.bc-kind-unknown_sku { background: #E7E9ED; }
.bc-table tbody tr.bc-kind-failed { background: #F6C6C2; }
.bc-table tbody tr[class*="bc-kind-"]:hover { filter: brightness(0.96); }

/* A part: its role, its number, and what it is in our catalogue. */
.bc-part { white-space: nowrap; line-height: 1.5; }
.bc-part + .bc-part { margin-top: 2px; }
.bc-part-code { display: inline-block; min-width: 68px; color: var(--bc-muted); font-size: 11px; text-transform: lowercase; }
.bc-part-unknown { color: var(--bc-bad-fg); border-bottom: 1px dotted var(--bc-bad-fg); }
.bc-kind-chip { font-size: 13px; font-weight: 600; padding: 3px 8px; }

/* Agent briefs: Markdown edited as written */
.bc-brief-body { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }

/* Sign in: a brand panel beside the form; one column on a phone. Nobody is signed in yet, so
   no sidebar. The panel's right padding keeps the text clear of the stripes, which lean left
   toward the bottom. The logo is the storefront's own (static/basecamp/brand/). */
.bc-signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bc-card); }
.bc-signin-brand { display: none; position: relative; overflow: hidden; background: var(--bc-ink); color: var(--bc-ink-strong); padding: 48px 150px 48px 56px; }
.bc-signin-brand::before, .bc-signin-brand::after { content: ""; position: absolute; top: -10%; bottom: -10%; width: 40px; transform: skewX(-8deg); }
.bc-signin-brand::before { right: 0; background: var(--bc-brand-dark); }
.bc-signin-brand::after { right: 40px; background: var(--bc-brand); }
.bc-signin-brand-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; max-width: 380px; }
.bc-signin-brand img { width: 260px; max-width: 100%; height: auto; display: block; }
.bc-signin-app { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.5px; margin: 0 0 12px; }
.bc-signin-pitch { font-size: 16px; line-height: 1.5; color: var(--bc-ink-muted); margin: 0; }
.bc-signin-since { font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--bc-ink-faint); margin: 0; }
.bc-signin-main { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.bc-signin-form { width: 100%; max-width: 360px; }
.bc-signin-logo { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 0 40px; }
.bc-signin-title { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 0 0 6px; color: var(--bc-text); }
.bc-signin-sub { margin: 0 0 28px; color: var(--bc-muted); }
.bc-signin-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 46px; padding: 0 16px; border: 1px solid #747775; border-radius: 999px; background: #fff; color: #1F1F1F; font: 500 15px/1 var(--bc-font); text-decoration: none; transition: background 0.15s, box-shadow 0.15s; }
.bc-signin-google:hover { background: #F8F9FA; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.25); text-decoration: none; }
.bc-signin-google:focus-visible { outline: 3px solid var(--bc-brand); outline-offset: 2px; }
.bc-signin-google svg { width: 20px; height: 20px; flex: none; }
.bc-signin-or { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--bc-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.bc-signin-or::before, .bc-signin-or::after { content: ""; flex: 1; height: 1px; background: var(--bc-border); }
.bc-signin-password { display: block; text-align: center; color: var(--bc-text); font-weight: 500; padding: 11px 16px; border: 1px solid var(--bc-border); border-radius: 999px; text-decoration: none; }
.bc-signin-password:hover { background: var(--bc-bg); text-decoration: none; }
.bc-signin-note { margin: 28px 0 0; font-size: 13px; line-height: 1.5; color: var(--bc-muted); }
.bc-sign-in-error { color: var(--bc-bad-fg); background: var(--bc-bad-bg); border-radius: var(--bc-radius); padding: 10px 12px; margin: 0 0 20px; font-size: 14px; line-height: 1.45; }
@media (min-width: 900px) {
  .bc-signin { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .bc-signin-brand { display: block; }
  .bc-signin-logo { display: none; }
}

/* Inventory: a vendor's suggested order against the free-freight minimum */
.bc-vendor-order { border-top: 1px solid var(--bc-border); padding: 8px 0; }
.bc-vendor-order summary { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.bc-vendor-order summary strong { min-width: 140px; }
.bc-vendor-order table { margin: 8px 0; }
.bc-vendor-plan { margin: 8px 0 4px; }
.bc-vendor-plan .bc-filters { margin: 0; }
.bc-vendor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bc-vendor-busy { display: flex; gap: 12px; align-items: center; opacity: .8; }
.bc-carton-form { display: grid; gap: 4px; }
.bc-carton-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* A note under a row's form controls (labels without an order: the likely order). */
.bc-row-note { flex-basis: 100%; }
.bc-meter { display: inline-block; width: 140px; height: 8px; background: #EEF0F3; border-radius: 999px; overflow: hidden; }
.bc-meter-fill { display: block; height: 100%; background: var(--bc-brand); }
.bc-meter-full { background: var(--bc-good-fg); }
.bc-bad { color: var(--bc-bad-fg); }
.bc-tag-warn { background: var(--bc-ok-bg); color: var(--bc-ok-fg); }

/* Charts. The three series take the first three slots of the dataviz reference
   palette, in fixed order, validated 2026-09-24 against the white card surface:
   CVD dE 9.2 (target 8), normal-vision dE 27.6 (floor 15). Aqua is 2.8:1 on white,
   so every chart ships a legend and a table view -- identity is never color alone.
   Basecamp has no dark mode, so these are light-surface steps only. */
:root {
  --bc-series-1: #2a78d6;  /* blue   */
  --bc-series-2: #eb6834;  /* orange */
  --bc-series-3: #1baf7a;  /* aqua   */
  /* Carriers take slots 7, 5 and 6 instead, so a carrier never wears a source's color on
     the stats page. Validated 2026-10-02 all-pairs on white: CVD dE 17.6, normal-vision dE
     33.9. Magenta is 2.6:1, covered by the legend and the table view. */
  --bc-carrier-ups: #4a3aa7;    /* violet  */
  --bc-carrier-fedex: #e87ba4;  /* magenta */
  --bc-carrier-usps: #008300;   /* green   */
  --bc-chart-grid: #e1e0d9;
  --bc-chart-axis: #c3c2b7;
  --bc-chart-ink: #898781;
}
.bc-chart { position: relative; }
.bc-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.bc-chart .bc-grid-line { stroke: var(--bc-chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.bc-chart .bc-axis-line { stroke: var(--bc-chart-axis); stroke-width: 1; shape-rendering: crispEdges; }
.bc-chart .bc-axis-text { fill: var(--bc-chart-ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.bc-chart .bc-cap { fill: var(--bc-text); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-chart .bc-col { outline: none; }
.bc-chart .bc-col-hit { fill: transparent; }
.bc-chart .bc-col:hover .bc-col-hit,
.bc-chart .bc-col:focus-visible .bc-col-hit { fill: rgba(17, 24, 39, 0.06); }
.bc-chart .bc-col:focus-visible .bc-col-hit { stroke: var(--bc-link); stroke-width: 1; }
.bc-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 12px; color: var(--bc-muted); }
.bc-chart-legend li { display: flex; align-items: center; gap: 6px; }
.bc-chart-legend .bc-swatch { width: 10px; height: 10px; border-radius: 2px; }   /* rect key: these are bars */
.bc-chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: 6px; padding: 8px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.bc-chart-tip[hidden] { display: none; }
.bc-chart-tip .bc-tip-date { color: var(--bc-muted); margin-bottom: 4px; }
.bc-chart-tip .bc-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.bc-chart-tip .bc-tip-key { width: 12px; height: 2px; flex: 0 0 auto; }            /* line key, not a box */
.bc-chart-tip .bc-tip-val { min-width: 2.2em; text-align: right; font-weight: 600; color: var(--bc-text); font-variant-numeric: tabular-nums; }
.bc-chart-tip .bc-tip-name { color: var(--bc-muted); }
.bc-chart-tip .bc-tip-total { border-top: 1px solid var(--bc-border); margin-top: 4px; padding-top: 4px; }
.bc-chart-note { font-size: 12px; color: var(--bc-muted); margin: 8px 0 0; }
.bc-chart .bc-chart-marker { stroke: var(--bc-chart-ink); stroke-width: 1; stroke-dasharray: 3 3; }
.bc-carrier-cat-title { margin-top: 20px; }
/* A .bc-stats row in a narrow card: whole stats drop to the next row instead of each
   label and value breaking mid-phrase ("3.6 / days"). A modifier, not a change to
   .bc-stats, which three workspace pages lay out on its current behaviour. */
.bc-stats-wrap { flex-wrap: wrap; row-gap: 10px; }
.bc-stats-wrap dt, .bc-stats-wrap dd { white-space: nowrap; }

/* ---------------------------------------------------------------- shared small pieces */
.bc-tag-bad { background: var(--bc-bad-bg); color: var(--bc-bad-fg); }
.bc-btn.is-active { background: var(--bc-text); border-color: var(--bc-text); color: #fff; }
.bc-kpi-good { border-left-color: #16A34A; }
.bc-kpi-good .bc-kpi-value { color: var(--bc-good-fg); }
.bc-neg { color: var(--bc-bad-fg); font-weight: 600; }
.bc-thin { color: var(--bc-ok-fg); }

/* ---------------------------------------------------------------- Sales margins (basecamp/sales/margins.html) */
.bc-sales-lede { max-width: none; }
.bc-sales-filters .bc-sales-presets { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-sales-filters input[type=text], .bc-sales-filters input[type=date], .bc-sales-filters select { min-width: 130px; }
.bc-sales-kpis { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.bc-sales-kpis .bc-kpi-value { font-size: 22px; font-variant-numeric: tabular-nums; }
.bc-sales-kpis .bc-kpi-value.bc-sales-kpi-pair { font-size: 16px; }
.bc-sales-quality { margin: 0 0 20px; }
.bc-sales-quality span { margin-right: 10px; }
.bc-sales-metric { display: inline-flex; align-items: center; gap: 4px; color: var(--bc-muted); }
/* revenue and contribution over time, one pair of bars per period */
.bc-sales-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 8px 4px 0; border-bottom: 1px solid var(--bc-border); margin-bottom: 22px; }
.bc-sales-bar { flex: 1 1 0; display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative; }
.bc-sales-bar i { display: block; flex: 1; background: #C9D8E4; }
.bc-sales-bar i.is-contribution, .bc-sales-legend i.is-contribution { background: #16A34A; }
.bc-sales-bar span { position: absolute; bottom: -18px; left: 0; right: 0; font-size: 10px; color: var(--bc-muted); text-align: center; white-space: nowrap; overflow: hidden; }
.bc-sales-legend i { display: inline-block; width: 12px; height: 12px; vertical-align: middle; margin: 0 4px 0 10px; background: #C9D8E4; }
/* margin distribution; a bar with rows in it opens them */
.bc-sales-hist { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 18px 4px 0; border-bottom: 1px solid var(--bc-border); margin: 8px 0 44px; }
.bc-sales-hb { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.bc-sales-hb i { display: block; background: #DBEAFE; border: 1px solid #93C5FD; }
.bc-sales-hb.is-neg i { background: var(--bc-bad-bg); border-color: #F87171; }
.bc-sales-hb-n { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; }
.bc-sales-hb-l { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--bc-muted); white-space: nowrap; }
.bc-sales-hb-r { position: absolute; bottom: -34px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--bc-muted); }
.bc-sales-bandlink { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bc-sales-bandlink:hover i, .bc-sales-bandlink:focus-visible i { background: #FDE68A; border-color: var(--bc-brand-dark); }
.bc-sales-bandlink.is-active i { background: var(--bc-brand); border-color: var(--bc-brand-dark); }
.bc-sales-band-note { margin: 0 0 8px; }
.bc-sales-range { display: inline-flex; align-items: center; gap: 4px; }
.bc-sales-costlink { color: inherit; border-bottom: 1px dotted #9CA3AF; }
.bc-sales-costlink:hover { text-decoration: none; border-bottom-color: var(--bc-text); }
/* the cost slide-out: its head stays put and its body scrolls, so a table's header row can stick */
.bc-sales-backdrop { position: fixed; inset: 0; background: rgba(17, 24, 39, .25); display: none; z-index: 40; }
.bc-sales-backdrop.is-open { display: block; }
.bc-sales-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 96vw); background: var(--bc-card); border-left: 1px solid var(--bc-border); box-shadow: -8px 0 24px rgba(0, 0, 0, .15); transform: translateX(102%); transition: transform .18s ease; z-index: 50; display: flex; flex-direction: column; overflow: hidden; }
.bc-sales-panel.is-open { transform: none; }
.bc-sales-panel-head { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: #FAFAFB; border-bottom: 1px solid var(--bc-border); }
.bc-sales-panel-head h2 { font-size: 15px; margin: 0; }
.bc-sales-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px; }
.bc-sales-panel thead th { position: sticky; top: -12px; z-index: 1; background: #FAFAFB; box-shadow: inset 0 -1px 0 var(--bc-border); }
.bc-sales-why { border-left: 3px solid var(--bc-brand-dark); padding: 8px 12px; background: var(--bc-ok-bg); margin: 0 0 12px; font-size: 13px; }
.bc-sales-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.bc-sales-facts div { border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 8px 10px; font-size: 12px; color: var(--bc-muted); }
.bc-sales-facts b { display: block; font-size: 16px; color: var(--bc-text); }
.bc-sales-panel tr.is-chosen td { background: var(--bc-good-bg); font-weight: 600; }

/* ---------------------------------------------------------------- System One fit guide */
.bc-fitguide td { white-space: nowrap; }
.bc-fitguide .bc-fitguide-group th { background: #F3F4F6; color: var(--bc-text); text-transform: none; letter-spacing: 0; font-size: 13px; }

/* Fitment sync: a status card per source, and a queue worked one row at a time. The
   action sits in the same top-right spot of every row, so settling one slides the next
   under the pointer; the toast is fixed so it never moves the rows. */
.bc-sync-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bc-sync-source { background: var(--bc-card); border: 1px solid var(--bc-border); border-left: 4px solid var(--bc-good-fg); border-radius: var(--bc-radius); padding: 12px 14px; }
.bc-sync-source.is-warn { border-left-color: var(--bc-ok-fg); background: #FFFBEB; }
.bc-sync-source.is-bad { border-left-color: var(--bc-bad-fg); background: #FEF2F2; }
.bc-sync-source-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bc-sync-source-name { font-weight: 600; font-size: 14px; }
.bc-sync-source-when { font-size: 20px; font-weight: 700; margin: 6px 0 2px; line-height: 1.2; }
.bc-sync-source-meta { font-size: 12px; color: var(--bc-muted); }
.bc-queue { table-layout: fixed; }
.bc-queue td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
/* The column headings stay in view under the top bar while the rows scroll. */
.bc-queue thead th { position: sticky; top: var(--bc-topbar-h, 70px); z-index: 4; box-shadow: inset 0 -1px 0 var(--bc-border); }
/* Roof type, mount type and vehicle details above each side's parts: what the parts are for. */
.bc-fit-facts { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 0 0 8px; padding: 0 0 6px; border-bottom: 1px dashed var(--bc-border); align-items: baseline; }
.bc-fit-facts dt { font-size: 11px; color: var(--bc-muted); white-space: nowrap; }
.bc-fit-facts dd { margin: 0; font-size: 13px; color: var(--bc-text); font-weight: 600; }
.bc-fit-facts dd.is-unset { font-weight: 400; color: var(--bc-muted); }
.bc-fit-planned { font-size: 11px; color: var(--bc-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.bc-fit-next-to { margin: 0; padding: 0 0 0 14px; }
.bc-fit-next-to li { margin: 0 0 2px; }
.bc-queue .bc-part { white-space: normal; }
.bc-queue-what { font-weight: 600; }
.bc-queue-vehicle { font-size: 15px; font-weight: 600; }
.bc-queue-names { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 0; align-items: baseline; }
.bc-queue-names dt { font-size: 12px; color: var(--bc-muted); }
.bc-queue-names dd { margin: 0; font-size: 15px; font-weight: 600; }
.bc-queue-act { display: flex; flex-direction: column; gap: 6px; }
.bc-queue-act .bc-btn { justify-content: center; text-align: center; white-space: normal; }
.bc-queue-act select { width: 100%; }
.bc-part-added { background: var(--bc-good-bg); border-radius: 3px; padding: 0 3px; }
.bc-part-removed { text-decoration: line-through; color: var(--bc-muted); }
.bc-toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: 440px; padding: 10px 14px; border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.15); font-size: 13px; background: var(--bc-good-bg); color: var(--bc-good-fg); }
.bc-toast-error { background: var(--bc-bad-bg); color: var(--bc-bad-fg); }
.bc-queue .bc-col-change { width: 20%; }
.bc-queue .bc-col-vehicle { width: 16%; }
.bc-queue .bc-col-act { width: 250px; }
/* Fit sheet imports: the rack-system picker is a filterable list, wide enough for the names. */
.bc-picker { width: 100%; min-width: 320px; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #D1D5DB; border-radius: var(--bc-radius); background: #fff; }
select.bc-picker { margin-top: 6px; }

/* Inventory: a vendor's facts (lead time, supply, delivery record) as separate labelled chips */
.bc-facts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.bc-fact { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 600; color: var(--bc-text); background: #F3F4F6; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 2px 8px; }
.bc-fact-label { font-weight: 400; color: var(--bc-muted); }
.bc-fact-warn { background: var(--bc-ok-bg); border-color: #FDE68A; color: var(--bc-ok-fg); }
.bc-fact-warn .bc-fact-label { color: var(--bc-ok-fg); }
/* Inventory: "Why N?" opens the reorder rules' arithmetic for one line (stock_planning.explain) */
.bc-why summary { list-style: none; cursor: pointer; }
.bc-why summary::-webkit-details-marker { display: none; }
.bc-why-link { color: var(--bc-link); margin-left: 6px; white-space: nowrap; }
.bc-why[open] .bc-why-link { color: var(--bc-muted); }
.bc-why p { margin: 6px 0 2px; max-width: 70ch; line-height: 1.45; color: var(--bc-text); }

/* ---------------------------------------------------------------- Cash flow (basecamp/sales/cash_flow.html) */
.bc-cash-chart .bc-cash-line { fill: none; stroke: var(--bc-series-1); stroke-width: 2; stroke-linejoin: round; }
.bc-cash-chart .bc-cash-line-scenario { stroke: var(--bc-series-2); stroke-dasharray: 5 3; }
.bc-cash-chart .bc-cash-line-actual { stroke: var(--bc-series-3); }                 /* the ledger's last 30 days */
.bc-cash-chart .bc-cash-line-actual.is-secondary { stroke: var(--bc-chart-ink); stroke-dasharray: 4 3; stroke-width: 1.5; }   /* QuickBooks, when NSB's own line is drawn */
.bc-cash-chart .bc-cash-today { stroke: var(--bc-muted); stroke-width: 1; stroke-dasharray: 2 3; shape-rendering: crispEdges; }
.bc-cash-chart .bc-cash-floor { stroke: var(--bc-bad-fg); stroke-width: 1; stroke-dasharray: 4 4; shape-rendering: crispEdges; }
.bc-cash-key { display: inline-block; width: 14px; height: 2px; vertical-align: middle; }   /* line key, not a box */
.bc-cash-key-floor { background: var(--bc-bad-fg); }
.bc-cash-kpi-scenario { border-left-color: var(--bc-series-2); }
.bc-cash-table { font-size: 12px; font-variant-numeric: tabular-nums; }
.bc-cash-table-wrap { max-height: 78vh; overflow: auto; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }
.bc-table-wrap .bc-cash-table { min-width: 1180px; border: 0; border-radius: 0; }   /* a column per card, vendor and loan */
.bc-cash-table th, .bc-cash-table td { padding: 4px 4px; }
.bc-cash-table th:first-child, .bc-cash-table td:first-child, .bc-cash-table .bc-cash-balance { padding-left: 8px; padding-right: 8px; }
.bc-cash-table th { letter-spacing: 0; font-size: 11px; }
.bc-cash-table thead th { position: sticky; top: 0; z-index: 2; height: 26px; box-sizing: border-box; border-bottom: 1px solid var(--bc-border); }
.bc-cash-table thead tr + tr th { top: 26px; }                     /* under the group row */
.bc-cash-table th.bc-cash-group-head { text-align: center; border-left: 1px solid var(--bc-border); border-right: 1px solid var(--bc-border); }
.bc-cash-table th:first-child, .bc-cash-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bc-card); }
.bc-cash-table thead th:first-child { z-index: 3; background: #FAFAFB; }
.bc-cash-table .bc-cash-balance { position: sticky; right: 0; z-index: 1; background: var(--bc-card); box-shadow: inset 1px 0 0 var(--bc-border); }
.bc-cash-table thead th.bc-cash-balance { z-index: 3; background: #FAFAFB; }
.bc-cash-table .bc-cash-low { display: block; font-size: 11px; font-weight: 400; color: var(--bc-muted); white-space: normal; }
.bc-cash-table .bc-cash-low.bc-neg { color: var(--bc-bad-fg); }
.bc-cash-table .bc-cash-month { cursor: pointer; font-weight: 600; }
.bc-cash-table .bc-cash-month td { background: #F3F4F6; border-top: 1px solid var(--bc-border); }
.bc-cash-table .bc-cash-month:hover td { background: #ECEEF1; }
.bc-cash-table .bc-cash-month.is-below td { background: var(--bc-bad-bg); }
.bc-cash-table .bc-cash-caret { display: inline-block; width: 1em; color: var(--bc-muted); }
.bc-cash-table .bc-cash-day.is-weekend td:first-child { color: var(--bc-muted); }
.bc-cash-table .bc-cash-day.is-below td { background: #FDF3F2; }
.bc-cash-table .bc-cash-day.is-actual td { background: #F1F8F5; }                 /* happened: from the QuickBooks ledger */
.bc-cash-table .bc-cash-day.is-actual.is-below td { background: #F6EEEC; }
.bc-cash-table .bc-cash-day.is-part-booked td { background: #FBF6E9; }           /* booked payments + estimated deposits */
.bc-cash-tag-part { background: #F6E7C1; color: #7A5300; }
.bc-cash-tip .bc-cash-tag-bank { background: #E3ECFA; color: #1D4F91; }          /* an NSB line read through Plaid */
.bc-cash-nsb { font-size: 13px; margin: 0 0 16px; padding: 8px 10px; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #fff; }
.bc-cash-nsb.is-attention { border-color: var(--bc-bad-fg); }
.bc-cash-nsb-actions { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.bc-cash-nsb-diff { color: var(--bc-muted); }
.bc-cash-nsb-choose { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 8px 0; }
.bc-cash-nsb-choose label { display: flex; gap: 6px; align-items: center; }
.bc-cash-table .bc-cash-day.is-first-forecast td { border-top: 2px solid var(--bc-series-1); }
.bc-cash-past-note { margin: 0 0 8px; }
.bc-cash-source { color: var(--bc-muted); font-size: 13px; margin: -8px 0 16px; padding-left: 10px; border-left: 3px solid var(--bc-border); }
.bc-cash-source strong { color: var(--bc-text); }
.bc-cash-past-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; background: #F1F8F5; border: 1px solid var(--bc-border); border-radius: 2px; }
.bc-cash-tip .bc-cash-tag-actual { background: #DDF2EA; color: #146C4C; }
.bc-cash-table .bc-cash-cell { cursor: default; }
.bc-cash-table .bc-cash-cell:hover, .bc-cash-table .bc-cash-cell:focus-visible { background: #E8EEF9; outline: none; }
.bc-cash-tip { position: fixed; white-space: normal; max-width: 420px; z-index: 20; }
.bc-cash-tip .bc-cash-tip-row { line-height: 1.45; padding: 2px 0; }
.bc-cash-tip .bc-cash-tip-row + .bc-cash-tip-row { border-top: 1px solid var(--bc-border); }
.bc-cash-tip .bc-tip-val { display: inline-block; min-width: 5.5em; }
.bc-cash-tip .bc-tag { font-size: 11px; }
.bc-cash-tip .bc-cash-tip-hint { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--bc-border); color: var(--bc-link); }
.bc-cash-table .bc-cash-cell.has-bills { cursor: pointer; text-decoration: underline dotted var(--bc-muted); text-underline-offset: 3px; }
.bc-cash-stream { font-weight: 600; }
.bc-cash-group { margin: 14px 0 6px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.bc-cash-forms { margin-top: 16px; align-items: start; }
.bc-cash-forms h3 { margin: 0 0 8px; font-size: 14px; }
.bc-cash .bc-inline-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.bc-cash .bc-table td.bc-small { white-space: nowrap; }
/* Fitment sync: "Apply all N" for the kind on screen */
.bc-bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; padding: 10px 12px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }
.bc-bulk-bar .bc-small { flex: 1; min-width: 260px; }
.bc-btn-primary.bc-btn-danger, .bc-bulk-bar .bc-btn-danger { background: var(--bc-bad-fg); border-color: var(--bc-bad-fg); color: #fff; }
/* Vendor catalogue: "Make draft products" from ticked SEMA parts */
.bc-drafts { margin-top: 10px; }
.bc-drafts > summary { list-style: none; display: inline-block; cursor: pointer; }
.bc-drafts > summary::-webkit-details-marker { display: none; }
.bc-drafts-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }

/* Carrier invoices: a bench label's quote against what was billed, inside its row */
.bc-charge-table { margin: 6px 0; width: auto; }
.bc-charge-table td, .bc-charge-table th { padding: 2px 8px; }
/* Fitment sync: "Upload Thule file" pop-over in the page actions */
.bc-upload-pop { position: relative; display: inline-block; }
.bc-upload-pop > summary { list-style: none; }
.bc-upload-pop > summary::-webkit-details-marker { display: none; }
.bc-upload-pop-form { position: absolute; right: 0; top: 38px; z-index: 6; width: 400px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.bc-upload-pop-form p { margin: 0; }
.bc-upload-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
/* Fitment sync: add a part a fit waits on, from its queue row (services/missing_parts.py). */
.bc-add-part { position: relative; }
.bc-add-part > summary { list-style: none; cursor: pointer; }
.bc-add-part > summary::-webkit-details-marker { display: none; }
.bc-add-part-form { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; width: 380px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); text-align: left; }
.bc-add-part-form p { margin: 0; }
/* A row's hover filter makes it a stacking context; lift the row holding an open form above the rows below. */
.bc-queue tr:has(.bc-add-part[open]) { position: relative; z-index: 7; filter: none; }
@media (max-width: 640px) { .bc-add-part-form { position: static; width: auto; } }

/* User manuals (basecamp/manual/page.html): contents on the left, the manual on the right; one column on a phone */
.bc-manual { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.bc-manual-toc { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow-y: auto; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 12px 14px; font-size: 13px; }
.bc-manual-toc-title { margin: 0 0 6px; font-weight: 600; color: var(--bc-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.bc-manual-toc ol { list-style: none; margin: 0; padding: 0; }
.bc-manual-toc li { margin: 4px 0; line-height: 1.3; }
.bc-manual-toc-subsection { padding-left: 12px; font-size: 12px; }
.bc-manual-body { background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); padding: 20px 28px; max-width: 860px; line-height: 1.55; }
.bc-manual-body h2 { font-size: 19px; margin: 28px 0 8px; padding-top: 8px; border-top: 1px solid var(--bc-border); }
.bc-manual-body h3 { font-size: 16px; margin: 20px 0 6px; }
.bc-manual-body .bc-manual-section:first-child h2 { border-top: 0; margin-top: 0; }
.bc-manual-body p { margin: 0 0 10px; }
.bc-manual-body ol, .bc-manual-body ul { margin: 0 0 12px; padding-left: 22px; }
.bc-manual-body li { margin: 3px 0; }
.bc-manual-section { scroll-margin-top: 72px; }
.bc-manual-section:target > h2, .bc-manual-section:target > h3 { background: var(--bc-ok-bg); }
.bc-manual-intro { color: var(--bc-muted); }
.bc-manual-table { margin: 4px 0 14px; }
.bc-manual-table caption { caption-side: top; text-align: left; font-size: 12px; color: var(--bc-muted); padding: 0 0 4px; }
.bc-manual-table td p, .bc-manual-table th p { margin: 0; }
.bc-manual-figure { margin: 8px 0 18px; }
.bc-manual-figure img { max-width: 100%; height: auto; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }
.bc-manual-figure figcaption { font-size: 12px; color: var(--bc-muted); font-style: italic; margin-top: 4px; }
@media (max-width: 900px) {
  .bc-manual { grid-template-columns: minmax(0, 1fr); }
  .bc-manual-toc { position: static; max-height: none; }
  .bc-manual-body { padding: 16px; }
}

/* ---------------------------------------------------------------- Hide the sidebar (any page)
   The pack bench runs on one PC with the page open all day, and wants the width. The choice is
   remembered per browser; the class is set on <html> before the page paints (base.html). */
.bc-nav-toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: -4px; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #fff; color: var(--bc-muted); cursor: pointer; font: inherit; font-size: 14px; line-height: 1; }
.bc-nav-toggle:hover { background: var(--bc-bg); color: var(--bc-text); }
html.bc-nav-hidden .bc-app { grid-template-columns: minmax(0, 1fr); }
html.bc-nav-hidden .bc-sidebar { display: none; }

/* ---------------------------------------------------------------- Shipping bench (basecamp/shipping/pack.html, close_out.html, pack_note.html)
   The bench is read standing up, across a table, with a box in hand. Two things are louder here
   than anywhere else in the shell: the carrier's colour and name (which pile the box goes in),
   and the order's fitment and customer note (the two things a packer must not miss).
   Carrier colours come from each carrier's own branding, keyed on the CARRIER, never the account
   (the pile is the carrier's), and always shown with the name. services/carriers.py names them;
   a test keeps every carrier styled. */
.bc-bench { max-width: 1150px; }
/* These pages hide things by setting `.hidden` in script (the booking dialog, the scale readout,
   buttons and tags), and a class that sets `display` beats the browser's own [hidden] rule.
   (2026-09-11 booking dialog, 2026-09-28 scale bar.) */
.bc-bench [hidden], .bc-print-page [hidden] { display: none !important; }
.bc-carrier-ups   { --bc-c: #5A3A22; --bc-c-bg: #F4EDE6; }
.bc-carrier-fedex { --bc-c: #4D148C; --bc-c-bg: #F0E9F8; }
.bc-carrier-usps  { --bc-c: #004B87; --bc-c-bg: #E5EEF7; }
.bc-carrier-other { --bc-c: #555555; --bc-c-bg: #EEEEEE; }
.bc-cchip { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: var(--bc-c); white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bc-bench tr[class*="bc-carrier-"] td:last-child { box-shadow: inset -4px 0 0 var(--bc-c); }
.bc-carrier-banner { background: var(--bc-c); color: #fff; padding: 14px 18px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bc-carrier-banner-name { font-size: 34px; font-weight: 800; letter-spacing: 0.02em; line-height: 1; }
.bc-carrier-banner-pile { font-size: 17px; font-weight: 600; }
.bc-carrier-banner-sub { font-size: 13px; opacity: 0.9; flex-basis: 100%; }
@media print { .bc-carrier-banner { border: 3px solid #000; } }

/* panels: a card with a heading strip; a table inside sits flush */
.bc-bench-panel { background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); margin-bottom: 16px; overflow: hidden; }
.bc-bench-panel > h2 { font-size: 13px; padding: 10px 16px; background: #FAFAFB; border-bottom: 1px solid var(--bc-border); }
.bc-bench-panel-body { padding: 16px; }
.bc-bench-panel-body.is-flush { padding: 0; overflow-x: auto; }
.bc-bench-panel.is-overflowing { overflow: visible; }
.bc-bench-panel.is-overflowing > h2 { border-radius: var(--bc-radius) var(--bc-radius) 0 0; }
/* Suggestion list under a text box (the bench's order number): always opens downward. */
.bc-combo { position: relative; }
.bc-combo-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 100%; width: max-content; max-width: min(560px, 90vw); margin: 0; padding: 4px 0; list-style: none; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12); }
.bc-combo-item { display: flex; flex-direction: column; padding: 6px 12px; cursor: pointer; }
.bc-combo-item span { font-size: 12px; color: var(--bc-muted); }
.bc-combo-item:hover, .bc-combo-item.is-active { background: var(--bc-ok-bg); }
.bc-bench-panel .bc-table { border: 0; border-radius: 0; }
.bc-bench .bc-flash { font-size: 14px; padding: 10px 14px; }
.bc-bench .bc-flash ul { margin: 6px 0 0 18px; padding: 0; }
.bc-bench-panel-body .bc-flash:last-child { margin-bottom: 0; }

/* form rows: fields side by side, wrapping on a narrow screen; bench inputs a size up */
.bc-bench-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.bc-bench-row > .bc-field { flex: 0 1 240px; min-width: 0; }
.bc-bench-row > .bc-field.is-narrow { flex: 0 0 96px; }
.bc-bench-row > .bc-field.is-box { flex: 0 0 220px; }
.bc-bench-row > .bc-field.is-wide { flex: 0 1 380px; }
.bc-bench .bc-field input[type=text], .bc-bench .bc-field input[type=number], .bc-bench .bc-field select { font-size: 15px; padding: 7px 9px; }
.bc-bench-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 14px; }
.bc-bench-check input { width: 16px; height: 16px; flex: none; }
.bc-bench-big { font-size: 17px; font-weight: 700; padding: 12px 24px; }
.bc-bench-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.bc-bench-actions form { margin: 0; }

/* facts in a row: order card, booked label, cheapest rate */
.bc-bench-facts { display: flex; flex-wrap: wrap; gap: 14px 30px; padding: 14px 16px; background: var(--bc-card); border: 1px solid var(--bc-border); border-radius: var(--bc-radius); margin-bottom: 16px; }
.bc-bench-panel-body .bc-bench-facts { background: #FAFAFB; }
.bc-bench-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bc-muted); margin-bottom: 3px; }
.bc-bench-facts b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-bench-facts b.is-small { font-size: 14px; }
.bc-bench-facts .bc-cchip { font-size: 13px; }
.bc-bench-good { color: var(--bc-good-fg); }
.bc-bench-bad { color: var(--bc-bad-fg); }

/* fitment and the customer's words */
.bc-bench-fit { border: 2px solid var(--bc-text); border-radius: var(--bc-radius); padding: 14px 16px; margin-bottom: 14px; background: var(--bc-card); }
.bc-bench-fit.is-bad { border-color: #DC2626; background: var(--bc-bad-bg); }
.bc-bench-fit-car { font-size: 26px; font-weight: 700; line-height: 1.15; }
.bc-bench-fit-desc { font-size: 15px; margin-top: 6px; }
.bc-bench-fit-warn { color: var(--bc-bad-fg); font-weight: 700; margin-top: 8px; }
.bc-bench-note { border: 2px solid var(--bc-brand-dark); border-radius: var(--bc-radius); background: #FFF7EA; padding: 14px 16px; margin-bottom: 14px; }
.bc-bench-note .bc-bench-k { color: var(--bc-brand-text); }
.bc-bench-note-text { font-size: 17px; white-space: pre-wrap; line-height: 1.35; }
.bc-bench-note-refs { margin-top: 8px; font-size: 13px; }
.bc-bench-tags { margin-bottom: 14px; }
.bc-bench-tags .bc-tag { margin: 0 6px 0 0; font-size: 12px; padding: 1px 8px; }
/* per line: the vehicle and the checkout answers */
.bc-bench-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.bc-bench-chips span { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid #BFDBFE; background: #EFF6FF; border-radius: 3px; }
.bc-bench-chips span.is-bad { border-color: #FCA5A5; background: var(--bc-bad-bg); color: var(--bc-bad-fg); font-weight: 700; }
.bc-bench-chips span.is-fit { background: #fff; border-color: #D1D5DB; }
tr.is-done td { color: var(--bc-muted); background: #FAFAFB; }
.bc-bench-acct { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bc-muted); }
.bc-bench input.bc-bench-qty { width: 64px; }

/* packages */
.bc-bench-piece { position: relative; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #FAFAFB; padding: 12px; margin-bottom: 10px; }
.bc-bench-piece-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--bc-muted); margin-bottom: 8px; }
.bc-bench-piece > .bc-bench-rm { position: absolute; top: 8px; right: 8px; }
.bc-bench-piece .bc-bench-row { margin-bottom: 6px; }
.bc-bench-lengths { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-bench input.is-estimated { background: #FFF7EA; border-color: var(--bc-brand-dark); }
.bc-bench input.is-from-scale { background: var(--bc-good-bg); }
.bc-bench-estbadge { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; padding: 0 6px; border: 1px solid var(--bc-brand-dark); border-radius: 3px; color: var(--bc-brand-text); margin-left: 6px; }
.bc-bench-confirm { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--bc-brand-dark); border-radius: var(--bc-radius); background: #FFF7EA; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.bc-bench-confirm.is-done { border-color: #16A34A; background: var(--bc-good-bg); }
.bc-bench-confirm input { width: 16px; height: 16px; flex: none; }

/* the scale */
.bc-bench-scale { border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: #FAFAFB; padding: 10px 12px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bc-bench-scale-reading { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.bc-bench-scale-reading.is-stale { color: var(--bc-muted); }
.bc-bench-scale-unit { font-size: 14px; color: var(--bc-muted); margin-left: 2px; }
.bc-bench-scale-spacer { flex: 1 1 auto; }
.bc-bench-scale #scaletargets { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* rates */
.bc-bench tr.is-best td { background: var(--bc-good-bg); }
.bc-bench tr.is-best td:first-child { box-shadow: inset 3px 0 0 #16A34A; }
.bc-bench button.bc-bench-book:disabled { cursor: not-allowed; border-style: dashed; border-color: #D1D5DB; color: var(--bc-muted); background: #F4F4F5; font-weight: 400; }

/* the booking confirmation, in the colour of the pile */
.bc-bench-dialog { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.bc-bench-dialog-box { background: var(--bc-card); width: min(520px, 100%); border: 4px solid var(--bc-c); border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.bc-bench-dialog-body { padding: 16px 18px; font-size: 15px; line-height: 1.45; }
.bc-bench-dialog-price { font-size: 22px; font-weight: 700; }
.bc-bench-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 18px 18px; }
.bc-bench-dialog-actions .bc-btn { font-size: 15px; padding: 9px 18px; }
.bc-bench-dialog-actions .bc-bench-dialog-confirm { background: var(--bc-c); border-color: var(--bc-c); color: #fff; font-weight: 700; }

/* the whole page waits while a request is in flight */
.bc-bench-busy { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.6); display: flex; align-items: center; justify-content: center; z-index: 2000; cursor: wait; }
.bc-bench-busy-box { background: var(--bc-card); padding: 26px 34px; text-align: center; min-width: 320px; max-width: 460px; border-radius: 8px; border-top: 5px solid var(--bc-brand); }
.bc-bench-busy-msg { font-size: 20px; font-weight: 700; margin-top: 14px; }
.bc-bench-busy-sub { font-size: 14px; color: var(--bc-muted); margin-top: 6px; }
.bc-bench-busy-spin { width: 38px; height: 38px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--bc-border); border-top-color: var(--bc-brand-dark); animation: bc-bench-spin 0.8s linear infinite; }
@keyframes bc-bench-spin { to { transform: rotate(360deg); } }

/* the packing note: a page of its own, printed and put in the box */
.bc-print-page { background: #fff; }
.bc-print-page .bc-bench { max-width: 800px; padding: 20px 24px; }
.bc-bench-sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--bc-text); padding-bottom: 8px; margin: 14px 0; }
.bc-bench-sheet-head h1 { font-size: 24px; }
.bc-bench-sheet-addr { font-size: 15px; line-height: 1.35; margin-bottom: 14px; }
@media print {
  .bc-noprint { display: none !important; }
  .bc-print-page .bc-bench { padding: 0; max-width: none; }
  .bc-print-page { color: #000; }
  .bc-bench-fit, .bc-bench-note { break-inside: avoid; }
}

/* Catalog → Search synonyms */
.bc-ss-list { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--bc-muted); }
.bc-ss-list .bc-btn { padding: 0 4px; font-size: 11px; }
.bc-ss-preview { min-height: 1.4em; }

/* Category workspace → Buying guide */
.bc-mono, .bc-field textarea.bc-mono { font-family: var(--bc-mono); font-size: 12px; }
.bc-guide-section { border: 1px solid #E5E7EB; border-radius: var(--bc-radius); padding: 12px 14px; margin-bottom: 10px; background: var(--bc-card); }
.bc-guide-section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bc-guide-section-head h3 { margin: 0; font-size: 15px; }
.bc-guide-section-head .bc-guide-actions { margin-left: auto; display: flex; gap: 6px; }
.bc-guide-faqs { margin: 8px 0 0; padding-left: 0; list-style: none; }
.bc-guide-faqs li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid #F1F2F4; }
.bc-guide-faqs li .bc-guide-actions { margin-left: auto; display: flex; gap: 6px; }
