/* ============================================================
   FRAME/SHIFT page styles (consumes tokens.css + ui.css)
   Page-specific layout + classes generated by page scripts.
   ============================================================ */

/* Legacy aliases — page scripts generate .btn / .data-table markup */
.btn { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 500; padding: 7px 14px; border-radius: var(--radius-sm); border: none; cursor: pointer; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
[data-theme='soft-morning'] .btn:hover { filter: brightness(0.96); }
.btn-sm { padding: 4px 10px; font-size: var(--text-xs); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--danger-fg); filter: none; }

.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table thead th { position: sticky; top: 0; background: var(--surface-1); font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); text-align: left; padding: 8px 10px; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; }
.data-table tbody td { padding: 6px 10px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.data-table tbody tr { box-shadow: inset 0 -1px 0 var(--line); }
.data-table tbody tr:hover { background: var(--surface-2); }

.desk-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }

.save-flash { font-size: var(--text-xs); color: var(--status-turned-bg); opacity: 0; transition: opacity 0.15s ease; }
.save-flash.show { opacity: 1; }

.hidden { display: none !important; }
.empty-state { color: var(--ink-faint); padding: var(--sp-6); text-align: center; }

/* ════════════════════════════════════════════════════════════
   SHOT DESK
   ════════════════════════════════════════════════════════════ */

/* Hero — the shot ID is what the eye lands on */
.desk-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.desk-hero-id { display: flex; align-items: center; gap: var(--sp-3); position: relative; min-height: 44px; }
.desk-shot-nav { display: flex; gap: 2px; }
.desk-nav-arrow { padding: 6px 10px; font-size: var(--text-md); }
.desk-shot-id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; cursor: pointer; }
.desk-hero-fields { display: flex; gap: var(--sp-3); align-items: flex-end; }
.desk-hero-fields .fs-field { min-width: 150px; }

/* Shot search (⌘F) — replaces the hero title while active */
.desk-shot-search { display: none; position: relative; }
.desk-shot-search.active { display: block; }
.desk-shot-search input { width: 300px; font-size: var(--text-md); }
.desk-shot-search-list { position: absolute; top: calc(100% + 4px); left: 0; width: 380px; max-height: 330px; overflow: auto; background: var(--surface-2); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); z-index: 60; }
.desk-shot-search-row { display: flex; align-items: stretch; }
.desk-shot-search-row + .desk-shot-search-row { box-shadow: inset 0 1px 0 var(--line); }
.desk-shot-search-item { flex: 1; display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: 8px 12px; background: none; border: none; cursor: pointer; color: var(--ink); text-align: left; font-size: var(--text-sm); }
.desk-shot-search-item:hover { background: var(--accent-soft); }
.desk-shot-search-item.empty { color: var(--ink-faint); cursor: default; }
.desk-shot-search-id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.desk-shot-search-meta { font-size: var(--text-xs); color: var(--ink-muted); }
.desk-shot-search-select { border: none; background: none; color: var(--accent); font-size: var(--text-xs); padding: 0 12px; cursor: pointer; }
.desk-shot-search-select.is-selected { color: var(--ink-faint); }

/* Layout: main column + quiet right rail */
.desk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: var(--sp-6); align-items: start; }
.desk-main { min-width: 0; }

/* Thumbnail + notes history share the top row */
.desk-top-grid { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: var(--sp-5); margin-bottom: var(--sp-6); }

/* 16:9 placeholder — future local-agent thumbnails drop in without
   layout change (issue #1). No upload UI, no external sources. */
.desk-thumbnail-frame { aspect-ratio: 16 / 9; background: var(--surface-1); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: var(--text-xs); letter-spacing: var(--label-tracking); text-transform: uppercase; overflow: hidden; }
.desk-thumbnail-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Notes history — the shot's memory, a clean timeline */
.desk-notes-section { margin-bottom: 0; }
.desk-history-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.desk-history-item { display: grid; grid-template-columns: 14px 118px minmax(0, 1fr); gap: 0 var(--sp-3); padding: 7px 0; position: relative; }
.desk-history-item + .desk-history-item { box-shadow: inset 0 1px 0 var(--line); }
.desk-history-marker { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); margin-top: 6px; }
.desk-history-date { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xs); color: var(--ink-muted); padding-top: 2px; white-space: nowrap; }
.desk-history-title { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.desk-history-detail { font-size: var(--text-xs); color: var(--ink-muted); font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.desk-history-empty, .desk-summary-empty, .desk-selection-empty, .desk-tab-empty { color: var(--ink-faint); font-size: var(--text-sm); padding: var(--sp-3) 0; }

/* Ranges & counts — pure machine data */
.desk-range-grid { display: flex; flex-direction: column; gap: var(--sp-2); }
/* 17 fixed-content columns; the row scrolls rather than letting
   tracks shrink below their timecodes (which made values overlap). */
.desk-range-record { display: grid; grid-template-columns: repeat(17, max-content); gap: 0 var(--sp-4); overflow-x: auto; padding: var(--sp-3); background: var(--surface-1); border-radius: var(--radius-md); }
.desk-range-record:not(.desk-range-record-current) { opacity: 0.62; }
.desk-range-cell { min-width: max-content; }
.desk-range-cell .desk-label { font-size: 10px; white-space: nowrap; }
.desk-range-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--ink); white-space: nowrap; }
.desk-range-cell-tc .desk-range-value { font-weight: 600; }

/* Tags / flags / comments */
.desk-tags-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.desk-tags-grid > .fs-label { grid-column: 1 / -1; margin-bottom: calc(-1 * var(--sp-2)); }
.desk-tags-wide { grid-column: 1 / -1; }
.desk-flags { grid-column: 1 / -1; display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.desk-flag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink-muted); cursor: pointer; }
.desk-flag input { width: auto; accent-color: var(--accent); }
.desk-flag:has(input:checked) { color: var(--ink); }

/* Production request */
.desk-turnover-grid { display: grid; grid-template-columns: 140px 1fr; gap: var(--sp-4); }
.desk-save-row { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }

/* Latest activity — three quiet summary groups, no boxes-in-boxes */
.desk-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.desk-summary-card { background: var(--surface-1); border-radius: var(--radius-md); padding: var(--sp-3); }
.desk-summary-title { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-2); }
.desk-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-3); }
.desk-summary-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.desk-summary-item strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.desk-summary-item-wide { grid-column: 1 / -1; }

/* Tabs */
.desk-tabs { display: flex; gap: 2px; margin-bottom: var(--sp-3); }
.desk-tab { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink-muted); background: none; border: none; padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.desk-tab:hover { color: var(--ink); background: var(--surface-1); }
.desk-tab.active { color: var(--ink); background: var(--accent-soft); font-weight: 500; }
.desk-tab-panel { display: none; }
.desk-tab-panel.active { display: block; }
.desk-data-table-wrap { overflow: auto; border-radius: var(--radius-md); background: var(--surface-1); max-height: 420px; }

/* Elements tab */
.desk-elements-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.desk-element-card { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-4); background: var(--surface-1); border-radius: var(--radius-md); padding: var(--sp-3); }
.desk-element-card-muted { opacity: 0.6; }
.desk-element-thumb { aspect-ratio: 16 / 9; background: var(--surface-2); border-radius: var(--radius-sm); }
.desk-element-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.desk-element-id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-md); }
.desk-element-actions { display: flex; gap: var(--sp-1); }
.desk-element-badges { display: flex; gap: var(--sp-1); margin: var(--sp-1) 0; }
.desk-badge { display: inline-flex; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-muted); }
.desk-element-description { font-size: var(--text-sm); color: var(--ink-muted); }
.desk-element-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: var(--sp-2) var(--sp-3); align-content: start; }
.desk-mini-field { display: flex; flex-direction: column; min-width: 0; }
.desk-mini-field strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); font-weight: 500; overflow-wrap: anywhere; }
.desk-element-editor { display: none; margin-top: var(--sp-3); }
.desk-element-editor.active { display: block; }
.desk-element-editor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2) var(--sp-3); }
.desk-element-editor-grid label { display: flex; flex-direction: column; gap: 3px; }
.desk-element-editor-wide { grid-column: 1 / -1; }
.desk-element-editor-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.desk-inline-title { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-2); }
.desk-add-plate { margin-top: var(--sp-4); }
.desk-add-plate-grid { display: grid; grid-template-columns: 70px 1fr 130px 130px 130px auto auto; gap: var(--sp-2); align-items: center; }

/* Right rail — quiet sidebar, not bordered boxes */
.desk-sidepanel { display: flex; flex-direction: column; gap: var(--sp-5); position: sticky; top: 76px; }
.desk-side-stats { padding-bottom: var(--sp-3); box-shadow: inset 0 -1px 0 var(--line); }
.desk-side-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.desk-side-group > .fs-label { margin-bottom: 2px; }
.desk-selection-actions { display: flex; gap: var(--sp-1); }
.desk-selected-shots { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; }
.desk-selection-chip { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: var(--surface-1); border-radius: var(--radius-sm); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xs); }
.desk-selection-remove { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: var(--text-xs); padding: 0 2px; }
.desk-selection-remove:hover { color: var(--danger); }
.desk-side-danger { margin-top: var(--sp-4); padding-top: var(--sp-4); box-shadow: inset 0 1px 0 var(--line); }

/* ════════════════════════════════════════════════════════════
   DATABASE (database.html + js/app.js)
   ════════════════════════════════════════════════════════════ */

.db-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-5); height: calc(100vh - 52px); }
.db-sidebar { display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; }
.db-filters, .db-bulk { display: flex; flex-direction: column; gap: var(--sp-2); }
.db-filter-row { display: flex; gap: var(--sp-2); }
.db-filter-row > * { flex: 1; min-width: 0; }
.db-counts { padding: var(--sp-1) 0; }
.db-bulk { padding-bottom: var(--sp-3); box-shadow: inset 0 -1px 0 var(--line); }
.db-sidebar-footer { font-size: var(--text-xs); color: var(--ink-faint); padding-top: var(--sp-1); }

/* Shot list */
.shot-list { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
.shot-item { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.shot-item:hover { background: var(--surface-1); }
.shot-item.active { background: var(--accent-soft); }
.shot-item-left { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.shot-select-input { width: auto; accent-color: var(--accent); cursor: pointer; }
.vfx-id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Badges (app.js statusBadge emits .badge .badge-<STATUS-WITH-DASHES>) */
.badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; background: var(--surface-2); color: var(--ink-muted); }
.badge-lg { font-size: var(--text-xs); padding: 3px 10px; }
.badge-NEW { background: var(--status-new-bg); color: var(--status-new-fg); }
.badge-TURNED-OVER { background: var(--status-turned-bg); color: var(--status-turned-fg); }
.badge-ON-HOLD { background: var(--status-hold-bg); color: var(--status-hold-fg); }
.badge-OMIT { background: var(--status-omit-bg); color: var(--status-omit-fg); }
.badge-APPROVED { background: var(--status-approved-bg); color: var(--status-approved-fg); }
.badge-REVIEW { background: var(--status-review-bg); color: var(--status-review-fg); }
.badge-vendor { background: var(--accent-soft); color: var(--ink); }
.badge-current { background: var(--status-turned-bg); color: var(--status-turned-fg); }
.badge-original { background: var(--surface-2); color: var(--ink-muted); }
.badge-change-New { background: var(--status-turned-bg); color: var(--status-turned-fg); }
.badge-change-Changed { background: var(--status-hold-bg); color: var(--status-hold-fg); }
.badge-change-Omitted { background: var(--status-review-bg); color: var(--status-review-fg); }

/* Detail panel */
.detail-panel { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.detail-empty { color: var(--ink-faint); display: flex; align-items: center; justify-content: center; height: 100%; }
.card { background: var(--surface-1); border-radius: var(--radius-lg); padding: var(--sp-4); }
.card-section-title { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-3); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

.shot-header { display: flex; gap: var(--sp-4); }
.shot-thumbnail { width: 220px; aspect-ratio: 16 / 9; flex-shrink: 0; background: var(--surface-2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shot-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.shot-thumbnail .placeholder { color: var(--ink-faint); font-size: var(--text-xs); letter-spacing: var(--label-tracking); text-transform: uppercase; }
.shot-info { flex: 1; min-width: 0; }
.shot-title-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.shot-title { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; }

.tc-grid { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin: var(--sp-2) 0 var(--sp-3); }
.tc-cell .label { font-size: 10px; }
.tc-cell .value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-md); color: var(--ink); }
.tc-cell .value.highlight { font-weight: 600; }
.tc-cell .value.plain { font-family: var(--font-sans); }

.label { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.value { font-size: var(--text-sm); color: var(--ink); }
.value.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-3); }
.field:last-child { margin-bottom: 0; }

.flags-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.flag-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink-muted); cursor: pointer; }
.flag-label input { width: auto; accent-color: var(--accent); }
.flag-label:has(input:checked) { color: var(--ink); }

/* Tabs (Database detail) */
.tab-headers { display: flex; gap: 2px; margin-bottom: var(--sp-3); }
.tab-header { font-size: var(--text-sm); color: var(--ink-muted); padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.tab-header:hover { color: var(--ink); background: var(--surface-2); }
.tab-header.active { color: var(--ink); background: var(--accent-soft); font-weight: 500; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Plates */
.plate-card { background: var(--surface-2); border-radius: var(--radius-md); padding: var(--sp-3); margin-bottom: var(--sp-2); }
.plate-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.plate-title { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-md); }
.plate-badges { display: flex; gap: var(--sp-1); margin-top: 3px; }
.plate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2) var(--sp-3); }
.add-plate-btn { color: var(--accent); font-size: var(--text-sm); cursor: pointer; padding: var(--sp-2) 0; }
.add-plate-btn:hover { text-decoration: underline; }

.bottom-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.audit-info { display: flex; gap: var(--sp-5); align-items: center; }

/* ════════════════════════════════════════════════════════════
   TOOL PAGES (Audit, VFX ID Tool, Pull, Submissions, Submission
   EDL, Shoot Metadata) — shared import-* / desk-module skeleton
   ════════════════════════════════════════════════════════════ */

.desk-page { padding: var(--sp-5); max-width: 1680px; margin: 0 auto; }

/* Layouts that used to be main+rail grids; rails are gone */
.import-layout, .audit-layout { display: block; }
.import-sidepanel { float: right; width: 240px; margin-left: var(--sp-5); }

.import-main { min-width: 0; }
.import-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.import-title { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; margin: 2px 0 4px; }
.import-copy { font-size: var(--text-sm); color: var(--ink-muted); max-width: 70ch; }
.import-links { display: flex; gap: var(--sp-2); }
.import-link-btn { font-size: var(--text-sm); color: var(--ink-muted); padding: 6px 11px; border-radius: var(--radius-sm); text-decoration: none; background: var(--surface-1); }
.import-link-btn:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }

/* Module: was a bordered card; now a quiet surface section */
.desk-module { background: transparent; margin-bottom: var(--sp-5); }
.import-module, .audit-upload-card, .audit-controls { background: var(--surface-1); border-radius: var(--radius-lg); padding: var(--sp-4); }
.desk-module-title { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-3); }
.desk-module-subtitle { font-size: var(--text-xs); color: var(--ink-faint); margin: -8px 0 var(--sp-3); }
.desk-field-block { display: flex; flex-direction: column; gap: 5px; }
.desk-field-block + .desk-field-block { margin-top: var(--sp-3); }

/* Drop zones — one look everywhere */
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); padding: var(--sp-6) var(--sp-4); background: var(--surface-2); border: 1.5px dashed var(--line); border-radius: var(--radius-lg); color: var(--ink-muted); text-align: center; cursor: pointer; transition: border-color 0.12s ease; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); color: var(--ink); }
.import-upload-icon { font-size: 20px; opacity: 0.7; }
.import-upload-sub { font-size: var(--text-xs); color: var(--ink-faint); }

.audit-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.audit-file-meta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xs); color: var(--ink-muted); margin-top: var(--sp-2); }
.audit-prod-pill { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); background: var(--surface-1); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
.audit-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink-muted); cursor: pointer; }
.audit-toggle input { width: auto; accent-color: var(--accent); }

.import-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.import-save-status { font-size: var(--text-sm); color: var(--ink-muted); margin-top: var(--sp-2); min-height: 18px; }
.import-help-card { font-size: var(--text-xs); color: var(--ink-muted); background: var(--surface-1); border-radius: var(--radius-sm); padding: 8px 10px; }

/* Tables */
.import-table-wrap { overflow: auto; border-radius: var(--radius-md); background: var(--surface-1); max-height: 60vh; }
.review-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.review-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-1); font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); text-align: left; padding: 9px 10px; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; }
.review-table tbody td { padding: 7px 10px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.review-table tbody tr { box-shadow: inset 0 -1px 0 var(--line); }
.review-table tbody tr:hover { background: var(--surface-2); }
.review-table input[type='checkbox'] { width: auto; accent-color: var(--accent); }
.review-table input[type='text'], .review-table select { padding: 4px 7px; font-size: var(--text-xs); }
.editable-cell { background: var(--surface-2); border-radius: var(--radius-sm); }

/* Audit change-kind rows (script emits status colours via classes/vars) */
.review-table tr.row-changed td:first-child { box-shadow: inset 2px 0 0 var(--diff-changed); }
.review-table tr.row-omitted td:first-child { box-shadow: inset 2px 0 0 var(--diff-omitted); }
.review-table tr.row-new td:first-child { box-shadow: inset 2px 0 0 var(--diff-new); }

/* Pull tool: paste box + inline stat strip */
.shotlist-page-layout { display: block; }
.shotlist-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: start; }
.shotlist-textarea { min-height: 130px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.shotlist-summary { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 130px; }
.shotlist-stat-card { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.shotlist-stat-card strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-md); }
.shotlist-export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.shotlist-actions-grid { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.shotlist-action-form { display: flex; gap: var(--sp-2); align-items: flex-end; flex-wrap: wrap; }
.shotlist-results-wrap { max-height: 55vh; }
.shotlist-unmatched-list { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.shotlist-unmatched-chip { font-family: var(--font-mono); font-size: var(--text-xs); background: var(--surface-2); color: var(--status-review-bg); border-radius: 99px; padding: 2px 8px; }

/* Misc shared bits on tool pages */
.text-dim, .mono-dim { color: var(--ink-faint); }
.mono-dim { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat { display: flex; align-items: baseline; gap: 7px; }
.stat strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-md); }
.generated-file-card { background: var(--surface-1); border-radius: var(--radius-md); padding: var(--sp-3); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); }
.exists-badge { display: inline-flex; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 99px; padding: 2px 7px; background: var(--status-hold-bg); color: var(--status-hold-fg); }
.shot-status-badge { display: inline-flex; font-size: 10px; font-weight: 600; text-transform: uppercase; border-radius: 99px; padding: 2px 7px; background: var(--surface-2); color: var(--ink-muted); }
.ng-flag { color: var(--status-review-bg); font-weight: 600; }
.info-bar { font-size: var(--text-sm); color: var(--ink-muted); background: var(--surface-1); border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.save-summary { font-size: var(--text-sm); color: var(--ink-muted); }
.btn-success { background: var(--status-turned-bg); color: var(--status-turned-fg); }

/* Submission packages list (import-submissions) */
.pkg-card { background: var(--surface-1); border-radius: var(--radius-md); padding: var(--sp-3); margin-bottom: var(--sp-2); }
.pkg-header { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.pkg-name { font-weight: 600; }
.pkg-date, .pkg-stat { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xs); color: var(--ink-muted); }
.pkg-actions { display: flex; gap: var(--sp-2); }
.pkg-detail { margin-top: var(--sp-2); }
.sub-form { display: grid; gap: var(--sp-2); }
.sub-vendor, .sub-dept, .sub-version { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sub-desc { color: var(--ink-muted); }

/* Modal (import-submissions) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 90; }
.modal > div, .modal-box { background: var(--surface-1); border-radius: var(--radius-lg); padding: var(--sp-5); max-width: 560px; width: 92%; box-shadow: var(--shadow-pop); }
.modal-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-4); }

/* ════════════════════════════════════════════════════════════
   SETTINGS + TURNOVERS (former app-shell pages)
   ════════════════════════════════════════════════════════════ */

.app-shell { display: block; }
.main-area { padding: var(--sp-5); max-width: 1480px; margin: 0 auto; }
.control-bar { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.page-title { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; }
.control-spacer { flex: 1; }
.sidebar-production { display: flex; align-items: center; gap: var(--sp-2); }
.sidebar-production label { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.sidebar-production select { width: auto; min-width: 180px; }
.page-kicker { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.page-body label { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.page-body .desk-module { background: var(--surface-1); border-radius: var(--radius-lg); }
.form-group { display: flex; flex-direction: column; gap: 4px; }

/* Theme switcher (Settings → Appearance) */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.theme-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface-1); border: 1.5px solid transparent; border-radius: var(--radius-lg); padding: var(--sp-3); cursor: pointer; color: var(--ink-muted); font-family: var(--font-sans); font-size: var(--text-xs); }
.theme-card strong { color: var(--ink); font-size: var(--text-sm); }
.theme-card:hover { background: var(--surface-2); }
.theme-card.active { border-color: var(--accent); }
.theme-swatch { width: 100%; height: 34px; border-radius: var(--radius-sm); margin-bottom: 4px; }
.theme-swatch-deep-focus { background: linear-gradient(120deg, #0d0e10 55%, #15171a 55%, #15171a 85%, #4a8fe0 85%); }
.theme-swatch-quiet-mind { background: linear-gradient(120deg, #1b1e26 55%, #232733 55%, #232733 85%, #8c93d8 85%); }
.theme-swatch-soft-morning { background: linear-gradient(120deg, #f4f1ea 55%, #fbf9f4 55%, #fbf9f4 85%, #a4742c 85%); }
