﻿/* ============================================================
   .release.shock — app-specific styles
   Loads AFTER shock.css + suite-app.css. Only the bits the shared
   app shell doesn't already provide: release/model cards, status
   chips, the engine note, coverage banner, dialog form rows.
   ============================================================ */

/* ---------- engine / assisted-match note ---------- */
.rel-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-left: 3px solid var(--info);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.45;
}
.rel-note b { color: var(--text); font-weight: 600; }
.rel-note__icon { color: var(--info); flex-shrink: 0; margin-top: 1px; }

/* ---------- status chips (computed from expiry) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chip--valid    { color: var(--pick);   border-color: rgba(63,185,80,.4);  background: rgba(63,185,80,.10); }
.chip--expiring { color: var(--unsure); border-color: rgba(217,166,10,.4); background: rgba(217,166,10,.10); }
.chip--expired  { color: var(--reject); border-color: rgba(200,7,10,.45);  background: rgba(200,7,10,.12); }
.chip--noexpiry  { color: var(--faint);  border-color: var(--app-line);     background: var(--app-surface2); }
.chip--archived  { color: var(--faint);  border-color: rgba(120,120,140,.35); background: rgba(120,120,140,.10); }
.chip--type      { color: var(--dim);    border-color: var(--app-line);     background: var(--app-surface2); }
.chip--type::before { display: none; }
.chip--signed    { color: var(--pick);   border-color: rgba(63,185,80,.4);  background: rgba(63,185,80,.10); }
.chip--unsigned  { color: var(--faint);  border-color: var(--app-line);     background: var(--app-surface2); }
.chip--conflict  { color: var(--unsure); border-color: rgba(217,166,10,.5); background: rgba(217,166,10,.10); }

/* ---------- completeness score pill ---------- */
.score-pill {
  display: inline-flex; align-items: center;
  font-size: 10px; font-family: var(--font-mono); font-weight: 700;
  padding: 2px 6px; border-radius: 10px; border: 1px solid currentColor;
  letter-spacing: .02em;
}
.score-pill--hi  { color: var(--pick);   background: rgba(63,185,80,.10); }
.score-pill--mid { color: var(--unsure); background: rgba(217,166,10,.10); }
.score-pill--lo  { color: var(--reject); background: rgba(200,7,10,.10); }

/* ---------- offline ribbon ---------- */
.offline-ribbon {
  position: sticky;
  top: 0;
  z-index: 800;
  background: rgba(217,120,10,.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px 16px;
  backdrop-filter: blur(4px);
}
.offline-ribbon[hidden] { display: none; }

/* ---------- library cards grid ---------- */
.rel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
/* compact dense-list view */
.rel-cards--compact { grid-template-columns: 1fr; gap: 3px; }
.rel-cards--compact .rel-card { flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; min-height: 0; }
.rel-cards--compact .rel-card__thumb { display: none; }
.rel-cards--compact .rel-card__body { flex-direction: row; align-items: center; padding: 0; flex: 1; gap: 8px; justify-content: space-between; }
.rel-cards--compact .rel-card__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.rel-cards--compact .rel-card__sub  { display: none; }
.rel-cards--compact .rel-card__meta { flex-wrap: nowrap; gap: 5px; }
.rel-card {
  display: flex;
  flex-direction: column;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .08s;
}
.rel-card:hover { border-color: var(--line2); }
.rel-card:active { transform: translateY(1px); }
.rel-card.is-selected { border-color: var(--info); box-shadow: 0 0 0 1px var(--info); }
.rel-card__thumb {
  aspect-ratio: 4 / 3;
  background: var(--app-surface2);
  overflow: hidden;
  position: relative;
}
.rel-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rel-card__refthumb { filter: brightness(.88) saturate(.8); }
.rel-card__noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint);
}
.rel-card__linked {
  position: absolute; bottom: 6px; right: 6px;
  font-family: var(--font-mono); font-size: 10px; color: #fff;
  background: rgba(0,0,0,.62); padding: 2px 6px; border-radius: 3px;
}
/* incoming (unfinished releases from applications) */
.inc-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 2px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--red, #C8070A); border-radius: 8px;
}
.inc-card__flag { background: var(--unsure, #D9A60A) !important; color: #1a1a1a !important; font-weight: 700; }

.rel-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.rel-card__name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25; }
.rel-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- empty library card ---------- */
.rel-empty { padding: 20px 0; display: flex; justify-content: center; }
.rel-empty__card {
  width: min(480px, 100%);
  text-align: center;
  border: 1px dashed var(--app-line);
  border-radius: 10px;
  padding: 40px 32px;
  background: var(--app-surface);
}
.rel-empty__card h2 { font-size: 19px; margin-bottom: 8px; }
.rel-empty__card p { color: var(--dim); font-size: 13px; margin-bottom: 20px; line-height: 1.5; }
.rel-empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- coverage banner ---------- */
.cov-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.cov-banner__big { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--text); }
.cov-banner__big small { font-size: 13px; color: var(--dim); font-weight: 400; }
.cov-banner__bar { flex: 1 1 160px; height: 8px; background: var(--app-surface2); border-radius: 4px; overflow: hidden; min-width: 120px; }
.cov-banner__fill { height: 100%; background: var(--pick); border-radius: 4px; transition: width .3s var(--ease); }
.cov-banner__stats { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.cov-banner__stats .pill { display: inline-flex; align-items: center; gap: 6px; }
.cov-banner__stats .dot { width: 8px; height: 8px; border-radius: 50%; }

/* coverage thumbnail state (assigned-release flag) */
.thumb.is-released   { border-color: var(--pick); }
.thumb.is-unreleased { border-color: var(--reject); }
.thumb__flag {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
}
.thumb__flag.f-released   { background: var(--pick); }
.thumb__flag.f-unreleased { background: var(--reject); }
.thumb__flag.f-expiring   { background: var(--unsure); }
.thumb__rel {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 10px; color: #e6e6ec; padding: 12px 6px 4px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- dialog form: two-column rows ---------- */
.rel-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rel-form-row .app-field { margin-bottom: 14px; }
.rf-preview {
  margin-top: 10px;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--app-line);
}

/* ---------- inspector bits ---------- */
.insp-portrait { width: 100%; border-radius: 6px; border: 1px solid var(--app-line); margin-bottom: 14px; display: block; }
.insp-noportrait {
  width: 100%; aspect-ratio: 4/3; border-radius: 6px; border: 1px dashed var(--app-line);
  display: flex; align-items: center; justify-content: center; color: var(--faint); margin-bottom: 14px;
}
.insp-name  { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.2; }
.insp-score { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.insp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.insp-kv { font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.insp-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--app-line); }
.insp-kv .k { color: var(--faint); }
.insp-kv .v { color: var(--text); text-align: right; word-break: break-word; }
.insp-notes { background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 5px; padding: 10px 12px; font-size: 13px; color: var(--dim); margin-bottom: 14px; line-height: 1.45; }

/* coverage inspector assignment select */
.insp-assign { margin-bottom: 14px; }
.insp-assign label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 5px; }
.insp-assign select {
  width: 100%; background: var(--app-bg); border: 1px solid var(--app-line); color: var(--text);
  border-radius: var(--radius); padding: 9px 11px; font: inherit; font-size: 14px;
}
.insp-assign select:focus { outline: none; border-color: var(--red); }

/* ---------- multi-select bulk-assign bar (coverage) ---------- */
.cov-bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--app-surface2); border: 1px solid var(--info);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 12px;
  position: sticky; top: 0; z-index: 5;
}
.cov-bulkbar[hidden] { display: none; }
.cov-bulkbar__count { font-size: 13px; color: var(--text); }
.cov-bulkbar__count b { font-family: var(--font-mono); color: var(--info); }
.cov-bulkbar__sel {
  flex: 1 1 200px; min-width: 150px; background: var(--app-bg);
  border: 1px solid var(--app-line); color: var(--text);
  border-radius: var(--radius); padding: 7px 10px; font: inherit; font-size: 13px;
}
.cov-bulkbar__sel:focus { outline: none; border-color: var(--info); }

/* multi-selected thumbs: stronger ring + corner check */
.thumb.is-multisel { outline: 2px solid var(--info); outline-offset: 1px; }
.thumb.is-multisel::before {
  content: "✓"; position: absolute; z-index: 3; top: 6px; left: 6px;
  width: 18px; height: 18px; border-radius: 4px; background: var(--info); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}

/* ---------- signature pad (release form) ---------- */
.sig-hint { text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 11px; font-weight: 400; }
.sigpad-wrap { position: relative; }
.sigpad {
  width: 100%; height: 130px; display: block;
  background: var(--app-bg); border: 1px solid var(--app-line);
  border-radius: var(--radius); touch-action: none; cursor: crosshair;
}
.sigpad-clear    { position: absolute; top: 8px; right: 8px; }
.sigpad-type-btn { position: absolute; top: 8px; left: 8px; }
.sigpad-type-input {
  display: block;
  width: 100%; box-sizing: border-box;
  margin-top: 6px;
  padding: 8px 14px;
  border: 1px solid var(--app-line); border-radius: var(--radius);
  background: var(--app-surface2); color: var(--text);
  font: italic 20px Georgia, "Times New Roman", serif;
  text-align: center;
}
.sigpad-type-input:focus { outline: none; border-color: var(--accent); }

/* ---------- smart expiry suggestion ---------- */
.expiry-hint {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; padding: 7px 10px;
  background: rgba(63,185,80,.08); border: 1px solid rgba(63,185,80,.3);
  border-radius: var(--radius); font-size: 12px;
}
.expiry-hint__lbl { flex: 1; color: var(--dim); }
.expiry-hint[hidden] { display: none; }

/* ---------- status pipeline (inspector) ---------- */
.status-pipeline {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0; margin: 12px 0 14px; padding: 0 2px;
}
.status-pipeline__step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; position: relative; gap: 5px;
}
.status-pipeline__connector {
  position: absolute; top: 7px; right: 50%; left: -50%;
  height: 2px; background: var(--app-line); z-index: 0;
}
.status-pipeline__connector.is-done { background: var(--pick); }
.status-pipeline__dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--app-line);
  background: var(--app-bg); z-index: 1; flex-shrink: 0;
}
.status-pipeline__step.is-done .status-pipeline__dot { background: var(--pick); border-color: var(--pick); }
.status-pipeline__step.is-next .status-pipeline__dot { border-color: var(--accent); background: var(--app-bg);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 99,102,241), .18); }
.status-pipeline__lbl {
  font-size: 10px; color: var(--faint); text-align: center; line-height: 1.2;
  white-space: nowrap;
}
.status-pipeline__step.is-done .status-pipeline__lbl { color: var(--pick); }
.status-pipeline__step.is-next .status-pipeline__lbl { color: var(--text); font-weight: 600; }

/* ---------- expiry heatmap calendar (rail) ---------- */
.expiry-cal__row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; cursor: pointer; border-radius: 5px;
  transition: background .12s;
}
.expiry-cal__row:hover { background: var(--app-surface2); }
.expiry-cal__mo  { font-size: 11px; color: var(--dim); min-width: 50px; }
.expiry-cal__bar { flex: 1; height: 6px; background: var(--app-line); border-radius: 3px; overflow: hidden; }
.expiry-cal__fill { display: block; height: 100%; border-radius: 3px; transition: width .2s; }
.expiry-cal__n   { font-size: 11px; color: var(--faint); min-width: 20px; text-align: right; }

/* signed indicators */
.chip--signed   { color: var(--pick);  border-color: rgba(63,185,80,.4); background: rgba(63,185,80,.10); }
.chip--unsigned { color: var(--faint); border-color: var(--app-line);    background: var(--app-surface2); }
.insp-sign {
  width: 100%; max-height: 120px; object-fit: contain; background: #fff;
  border: 1px solid var(--app-line); border-radius: 5px; margin-bottom: 14px; padding: 6px;
}
.rel-card__sign {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  width: 18px; height: 18px; border-radius: 4px;
  background: rgba(63,185,80,.92); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.rel-card__sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- smart-import dialog ---------- */
.imp-progress { margin-top: 14px; }
.imp-progress[hidden] { display: none; }
.imp-progress__label { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.imp-progress__track { height: 6px; background: var(--app-surface2); border-radius: 3px; overflow: hidden; }
.imp-progress__fill { height: 100%; width: 0; background: var(--info); border-radius: 3px; transition: width .25s var(--ease, ease); }
.imp-progress__detail { margin-top: 6px; font-size: 11px; color: var(--faint); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--dim); line-height: 1.4; cursor: pointer; }
.imp-opt input { accent-color: var(--red); margin-top: 2px; flex-shrink: 0; }

/* ---------- library detail table ---------- */
.rel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rel-table th, .rel-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--app-line); }
.rel-table th { position: sticky; top: 0; background: var(--app-surface); color: var(--dim); font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; z-index: 2; }
.rel-table th:hover { color: var(--text); }
.rel-table tbody tr { cursor: pointer; }
.rel-table tbody tr:hover { background: var(--app-surface2); }
.rel-table tbody tr.is-selected { background: rgba(74,143,255,.12); box-shadow: inset 2px 0 0 var(--info); }
.rel-table td { color: var(--text); }

/* ---------- expiry dashboard strip ---------- */
.exp-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(217,166,10,.10); border: 1px solid rgba(217,166,10,.4); color: var(--text); border-radius: 6px; padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.exp-strip[hidden] { display: none; }
.exp-strip b { font-family: var(--font-mono); color: var(--unsure); }
.exp-strip__icon { font-size: 14px; }
.exp-strip__sp { flex: 1 1 auto; }

/* ---------- library search ---------- */
.lib-search { background: var(--app-bg); border: 1px solid var(--app-line); color: var(--text); border-radius: var(--radius); padding: 6px 10px; font: inherit; font-size: 13px; width: 220px; max-width: 38vw; }
.lib-search:focus { outline: none; border-color: var(--info); }

/* ---------- coverage review state ---------- */
.thumb.is-review { border-color: var(--info); }
.thumb__flag.f-review { background: var(--info); }
.insp-review { background: rgba(74,143,255,.10); border: 1px solid rgba(74,143,255,.4); border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; }
.insp-review__t { font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.insp-review__name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

/* ---------- inspector PDF language select ---------- */
.insp-lang { background: var(--app-bg); border: 1px solid var(--app-line); color: var(--text); border-radius: var(--radius); padding: 5px 8px; font: inherit; font-size: 12px; }
.insp-lang:focus { outline: none; border-color: var(--info); }

/* ---------- compliance dashboard ---------- */
.comp-dash { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.comp-dash[hidden] { display: none; }
.comp-dash__m { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: 6px; padding: 8px 14px; min-width: 84px; }
.comp-dash__m b { display: block; font-family: var(--font-mono); font-size: 18px; color: var(--text); line-height: 1.1; }
.comp-dash__m span { font-size: 11px; color: var(--faint); }

/* ---------- audit line ---------- */
.insp-audit { font-family: var(--font-mono); font-size: 10px; color: var(--faint); margin-top: 8px; word-break: break-all; }

/* ---------- release form section headers ---------- */
.rf-section {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 18px 0 6px; border-top: 1px solid var(--app-line);
  margin-top: 6px;
}
.rf-section:first-of-type { margin-top: 0; border-top: none; padding-top: 4px; }

/* ---------- topbar File ▾ dropdown ---------- */
.app-file-menu { position: relative; }
.app-file-menu__toggle { white-space: nowrap; }
.app-file-menu__drop {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: 6px; min-width: 170px; padding: 4px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.app-file-menu:hover .app-file-menu__drop,
.app-file-menu:focus-within .app-file-menu__drop { display: flex; flex-direction: column; gap: 2px; }
.app-file-menu__item {
  background: none; border: none; padding: 8px 12px; text-align: left;
  cursor: pointer; color: var(--text); font: inherit; font-size: 13px;
  border-radius: 4px; width: 100%;
}
.app-file-menu__item:hover { background: var(--app-surface2); }

/* ---------- plan limit banner ---------- */
.plan-banner {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: rgba(200,7,10,.1); border-bottom: 1px solid rgba(200,7,10,.3);
  padding: 7px 16px; font-size: 13px; color: var(--dim);
}
.plan-banner[hidden] { display: none; }
.plan-banner__link { color: var(--red, #C8070A); font-weight: 600; text-decoration: none; white-space: nowrap; }
.plan-banner__link:hover { text-decoration: underline; }

/* ---------- template selector (release form) ---------- */
.rf-templates { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--app-line); }
.rf-tpl-sel {
  flex: 1 1 0; background: var(--app-bg); border: 1px solid var(--app-line);
  color: var(--text); border-radius: var(--radius); padding: 7px 10px; font: inherit; font-size: 13px;
}
.rf-tpl-sel:focus { outline: none; border-color: var(--info); }

/* ---------- QR code dialog ---------- */
.qr-canvas-wrap { display: flex; justify-content: center; padding: 20px 0; min-height: 80px; align-items: center; }
.qr-canvas-wrap canvas { image-rendering: pixelated; border: 1px solid var(--app-line); border-radius: 6px; padding: 12px; background: #fff; }

/* ---------- activity timeline (inspector) ---------- */
.insp-timeline { margin-top: 14px; }
.insp-timeline__title { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.timeline-entry {
  display: flex; align-items: baseline; gap: 8px; padding: 5px 0;
  border-bottom: 1px solid var(--app-line); font-size: 12px;
}
.timeline-entry:last-of-type { border-bottom: none; }
.timeline-entry__icon { color: var(--faint); font-size: 11px; flex-shrink: 0; width: 14px; text-align: center; }
.timeline-entry__body { flex: 1 1 0; color: var(--dim); line-height: 1.35; }
.timeline-entry__body b { color: var(--text); font-weight: 600; }
.timeline-entry__time { font-family: var(--font-mono); font-size: 10px; color: var(--faint); white-space: nowrap; }

/* ---------- smart search ---------- */
.smart-search {
  position: relative; flex: 1 1 0; min-width: 160px; max-width: 440px;
}
.smart-search__input-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  background: var(--app-surface2); border: 1px solid var(--app-line);
  border-radius: 6px; padding: 3px 8px; min-height: 32px; cursor: text;
}
.smart-search__input-row:focus-within { border-color: var(--info); box-shadow: 0 0 0 2px color-mix(in srgb, var(--info) 18%, transparent); }
.smart-search__input {
  background: none; border: none; outline: none; color: var(--text);
  font: inherit; font-size: 12.5px; flex: 1 1 80px; min-width: 60px; padding: 2px 0;
}
.smart-search__input::placeholder { color: var(--faint); }
.search-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--info); color: #fff; border-radius: 4px;
  font-size: 11px; padding: 2px 5px 2px 7px; white-space: nowrap;
  font-weight: 500; line-height: 1.5; flex-shrink: 0;
}
.search-chip__field { opacity: .65; margin-right: 1px; }
.search-chip__remove {
  background: none; border: none; color: inherit; padding: 0 0 0 2px;
  cursor: pointer; font-size: 14px; opacity: .65; line-height: 1;
  display: flex; align-items: center; transition: opacity .1s;
}
.search-chip__remove:hover { opacity: 1; }
.smart-search__suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  list-style: none; margin: 0; padding: 4px 0; max-height: 240px; overflow-y: auto;
}
.smart-search__suggest[hidden] { display: none; }
.ss-sep { font-size: 10px; color: var(--faint); padding: 6px 12px 3px; text-transform: uppercase; letter-spacing: .06em; }
.ss-item {
  padding: 7px 12px; cursor: pointer; font-size: 12px; color: var(--dim);
  display: flex; align-items: center; gap: 8px; user-select: none;
}
.ss-item:hover, .ss-item.is-active { background: var(--app-surface2); color: var(--text); }
.ss-item__field { font-size: 10px; color: var(--faint); font-family: var(--font-mono); min-width: 52px; flex-shrink: 0; }
.ss-item__val { flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-item__hint { font-size: 10px; color: var(--faint); }

/* ---------- library drag-drop overlay ---------- */
#pane-releases { position: relative; min-height: 120px; }
.lib-drop-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10,10,14,.82);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--info);
  border-radius: 8px; margin: 4px; pointer-events: none;
}
.lib-drop-overlay[hidden] { display: none; }
.lib-drop-overlay__inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--info); text-align: center; padding: 24px;
}
.lib-drop-overlay__inner svg { opacity: .9; }
.lib-drop-overlay__inner p { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.lib-drop-overlay__sub { font-size: 12px !important; font-weight: 400 !important; color: var(--faint) !important; }

/* ---------- list view thumb column ---------- */
.rel-table__thumb-col { width: 36px; padding: 4px 6px !important; }
.rel-table__thumb { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; display: block; background: var(--app-surface2); }
.rel-table__nothumb { width: 32px; height: 32px; border-radius: 4px; background: var(--app-surface2); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.rel-table__sessions { font-size: 11px; color: var(--info); font-family: var(--font-mono); }
.tbl-arrow { font-size: 9px; opacity: .7; }
/* tighten table cell padding for density */
.rel-table td { padding: 6px 8px; vertical-align: middle; }
.rel-table th { padding: 7px 8px; }

/* ---------- view toggle icon buttons ---------- */
.lib-view-btns {
  display: inline-flex; border: 1px solid var(--app-line); border-radius: 6px; overflow: hidden; gap: 0;
}
.lib-view-btn {
  background: none; border: none; padding: 6px 9px; cursor: pointer; color: var(--dim);
  display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s;
}
.lib-view-btn:hover { background: var(--app-surface2); color: var(--text); }
.lib-view-btn[aria-pressed="true"] { background: var(--info); color: #fff; }
.lib-view-btn + .lib-view-btn { border-left: 1px solid var(--app-line); }

/* ---------- group-by control + collapsible search ---------- */
.lib-groupby { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.lib-groupby select {
  background: var(--app-surface2); border: 1px solid var(--app-line); color: var(--text);
  border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px;
}
.lib-groupby select:focus { outline: none; border-color: var(--info); }
.lib-search-toggle.is-active { background: var(--info); color: #fff; border-color: var(--info); }

/* ---------- grouped library sections (thumbnail view) ---------- */
.rel-group { margin-bottom: 18px; }
.rel-group__head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 6px 2px 10px; border-bottom: 1px solid var(--app-line); margin-bottom: 12px;
}
.rel-group__icon { color: var(--faint); flex-shrink: 0; }
.rel-group__name { flex: 1 1 auto; }
.rel-group__count {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  background: var(--app-surface2); border-radius: 999px; padding: 2px 9px;
}
.rel-group__grid { margin: 0; }

/* grouped rows in table view */
.rel-table__group td {
  background: var(--app-surface2); font-weight: 600; font-size: 12px; color: var(--text);
  padding: 8px 10px !important; position: sticky; left: 0;
}

/* reference-face count badge on a card */
.rel-card__faces {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(10,10,14,.72); color: #fff; border-radius: 999px;
  font-size: 10px; font-family: var(--font-mono); padding: 2px 7px 2px 5px;
}
.rel-card__faces svg { opacity: .85; }

/* ---------- voice dictation (mic button on fields) ---------- */
.mic-wrap { position: relative; display: block; }
.app-field .mic-wrap > input, .app-field .mic-wrap > textarea { width: 100%; padding-right: 40px; }
.mic-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 8px;
  color: var(--dim); cursor: pointer; transition: color .12s, border-color .12s, background .12s;
}
.mic-wrap > textarea + .mic-btn { top: 12px; transform: none; }
.mic-btn:hover { color: var(--text); border-color: var(--line2); }
.mic-btn.is-rec { color: #fff; background: var(--red); border-color: var(--red); animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(200,7,10,.5); } 50% { box-shadow: 0 0 0 5px rgba(200,7,10,0); } }

/* ---------- guided whole-form voice dictation ---------- */
.rf-dictate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.rf-dictate[hidden] { display: none; }
.rf-dictate-bar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--info) 16%, var(--app-surface));
  border: 1px solid color-mix(in srgb, var(--info) 45%, var(--app-line));
  border-radius: 8px; padding: 9px 12px; margin: 0 0 14px;
}
.rf-dictate-bar[hidden] { display: none; }
.rf-dictate-bar__dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0;
  animation: mic-pulse 1s ease-in-out infinite;
}
.rf-dictate-bar__txt { font-size: 13px; color: var(--text); line-height: 1.4; }
.rf-dictate-bar__sp { flex: 1 1 auto; }
/* the field currently being dictated */
.rf-dictating {
  outline: 2px solid var(--info) !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--info) 22%, transparent) !important;
}

/* ---------- one-utterance quick fill ---------- */
.rf-quick { margin: 0 0 14px; border: 1px solid var(--app-line); border-radius: 8px; padding: 8px 12px; background: var(--app-surface); }
.rf-quick > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); list-style: none; }
.rf-quick > summary::-webkit-details-marker { display: none; }
.rf-quick > summary::before { content: "▸"; color: var(--faint); margin-right: 6px; }
.rf-quick[open] > summary::before { content: "▾"; }
.rf-quick textarea { width: 100%; resize: vertical; }
.rf-quick__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ---------- model image database (reference gallery) ---------- */
.ref-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ref-thumb {
  position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--app-line); background: var(--app-bg); flex-shrink: 0;
}
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-thumb--new { border-color: var(--info); box-shadow: 0 0 0 1px var(--info); }
.ref-thumb__tag {
  position: absolute; left: 0; bottom: 0; right: 0; text-align: center;
  font-size: 9px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--info); color: #fff; padding: 1px 0;
}
.ref-thumb__x {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 1;
  border: none; border-radius: 50%; background: rgba(10,10,14,.74); color: #fff;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.ref-thumb__x:hover { background: var(--reject); }

/* ============================================================
   MOBILE / SMARTPHONE LAYER (release.shock only)
   Turns the desktop 3-column shell into a phone-first app:
   a slide-in filter drawer, a bottom-sheet inspector, full-screen
   dialogs, a floating "Add release" button, and large finger-
   friendly signature pads — the EasyRelease on-set workflow.
   These elements are hidden on desktop and only activate ≤860px.
   ============================================================ */

/* new mobile-only chrome — hidden by default (desktop) */
.app-navtoggle { display: none; }           /* hamburger (opens filter drawer) */
.m-fab { display: none; }                   /* floating add-release button */
.m-backdrop { display: none; }              /* dim layer behind drawers/sheets */
.insp-close { display: none; }              /* inspector close (mobile sheet) */

@media (max-width: 860px) {

  /* ---- topbar: compact, only the essentials ---- */
  .app-topbar { gap: 8px; padding: 0 10px; }
  .app-engine,
  #btn-help { display: none; }              /* redundant / desktop-only chrome */
  .app-navtoggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0; font-size: 18px; line-height: 1;
    flex-shrink: 0;
  }
  .app-brand { font-size: 14px; }
  #btn-settings { padding: 8px 10px; }
  #btn-add { display: none; }               /* replaced by the FAB */

  /* ---- slide-in filter drawer (rail) ---- */
  .app-rail.is-open {
    display: flex; position: fixed; top: 52px; bottom: 0; left: 0; right: auto;
    width: min(320px, 86vw); z-index: 62;
    box-shadow: 6px 0 30px rgba(0,0,0,.5);
    animation: m-rail-in .22s ease;
    -webkit-overflow-scrolling: touch;
  }
  @keyframes m-rail-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }

  /* ---- bottom-sheet inspector (release detail + actions) ---- */
  .app-inspector.is-open {
    display: flex; flex-direction: column;
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%;
    max-height: 84vh; z-index: 64;
    border-top: 1px solid var(--app-line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.55);
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: m-sheet-up .24s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes m-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
  /* grab handle + close button for the sheet */
  .app-inspector.is-open::before {
    content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
    background: var(--app-line); margin: 4px auto 12px; flex-shrink: 0;
  }
  .app-inspector.is-open .insp-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 12px; right: 14px;
    width: 34px; height: 34px; border-radius: 999px;
    background: var(--app-surface2); border: 1px solid var(--app-line);
    color: var(--dim); font-size: 18px; line-height: 1; z-index: 2;
  }

  /* ---- dim backdrop behind any open drawer/sheet ---- */
  .m-backdrop.is-on {
    display: block; position: fixed; inset: 0; z-index: 60;
    background: rgba(0,0,0,.5); -webkit-tap-highlight-color: transparent;
  }

  /* ---- floating "Add release" button (primary on-set action) ---- */
  .m-fab {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; z-index: 55;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--red); color: #fff; border: none;
    font-size: 30px; line-height: 1; font-weight: 300;
    box-shadow: 0 6px 20px rgba(200,7,10,.45);
  }
  .m-fab:active { transform: scale(.94); }

  /* ---- toolbar / tabs: wrap and breathe ---- */
  .app-toolbar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .app-tabs { width: 100%; }
  .app-tab { flex: 1 1 0; justify-content: center; padding: 9px 8px; font-size: 13px; }
  .app-tab .kbd { display: none; }          /* keyboard hints irrelevant on touch */
  .app-toolbar__spacer { display: none; }
  .smart-search { flex: 1 1 100%; max-width: none; order: 3; }
  #tab-summary, #size-ctl { display: none; }

  /* ---- content cards: roomy two-up / one-up ---- */
  .app-scroll { padding: 12px 12px calc(86px + env(safe-area-inset-bottom)); }
  .rel-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

  /* ---- full-screen dialogs (add release, settings) ---- */
  .app-dialog { padding: 0; align-items: stretch; }
  .app-dialog__panel {
    width: 100%; max-width: 100%; height: 100%; max-height: 100%;
    border-radius: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .app-dialog__panel h2 { font-size: 17px; }
  /* keep the save/cancel bar pinned and reachable above the keyboard */
  .app-dialog__actions {
    position: sticky; bottom: 0; margin: 16px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--app-surface); border-top: 1px solid var(--app-line);
  }
  .app-dialog__actions .ab { flex: 1 1 0; justify-content: center; padding: 12px; }

  /* ---- forms: single column, no iOS zoom, big touch targets ---- */
  .rel-form-row { grid-template-columns: 1fr; gap: 0; }
  .app-field input,
  .app-field select,
  .app-field textarea,
  .rf-tpl-sel {
    font-size: 16px;                        /* ≥16px stops iOS auto-zoom on focus */
    padding: 11px 12px;
  }
  .app-field label { font-size: 13px; }
  .rf-templates { flex-wrap: wrap; }

  /* ---- signature pad: large finger-signing area ---- */
  .sigpad { height: 200px; }
  .sigpad-clear { top: 10px; right: 10px; padding: 8px 12px; }

  /* ---- misc touch sizing ---- */
  .ab { padding: 10px 14px; }
  .ab--sm { padding: 8px 12px; }
  .rel-empty__actions { flex-direction: column; }
  .rel-empty__actions .ab { width: 100%; justify-content: center; }
  .cov-bulkbar { flex-wrap: wrap; }
}

/* extra-narrow phones */
@media (max-width: 380px) {
  .rel-cards { grid-template-columns: 1fr 1fr; }
  .app-brand small { display: none; }
}

/* respect reduced-motion: drop the slide-in animations (drawers still appear,
   just without the transition — also guarantees the resting on-screen state) */
@media (prefers-reduced-motion: reduce) {
  .app-rail.is-open,
  .app-inspector.is-open { animation: none !important; }
}

/* ---------- v19 additions ---------- */

/* card hover preview panel */
.rel-card { position: relative; overflow: visible; }
.rel-card__preview {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 200px; max-width: 260px;
  background: var(--app-panel); border: 1px solid var(--app-line);
  border-radius: var(--radius); padding: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  display: flex; gap: 8px; align-items: flex-start;
  opacity: 0; pointer-events: none;
  transition: opacity .15s .3s;
  font-size: 11px; color: var(--faint); line-height: 1.45;
}
.rel-card:hover .rel-card__preview { opacity: 1; }
.rcp-photo { width: 44px; height: 54px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.rcp-lines { flex: 1; word-break: break-word; }

/* ---------- v18 additions ---------- */

/* quick status filter pill strip */
.lib-filter-pills {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px 0 6px; border-bottom: 1px solid var(--app-line);
  margin-bottom: 6px;
}
.lib-pill {
  padding: 3px 10px; border-radius: 20px; font-size: 12px;
  border: 1px solid var(--app-line); background: transparent;
  color: var(--faint); cursor: pointer; transition: background .15s, color .15s;
}
.lib-pill:hover { color: var(--dim); background: var(--hover); }
.lib-pill--active { background: var(--accent, #6366f1); color: #fff; border-color: transparent; }

/* territory breakdown in sidebar */
.territory-stats { padding: 4px 10px 8px; }
.territory-row {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0; border-bottom: 1px solid var(--app-line); font-size: 12px;
}
.territory-k { flex: 0 0 70px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.territory-bar { flex: 1; height: 4px; background: var(--app-line); border-radius: 2px; overflow: hidden; }
.territory-fill { height: 100%; background: var(--accent, #6366f1); border-radius: 2px; }
.territory-v { flex: 0 0 20px; text-align: right; color: var(--dim); font-family: var(--font-mono); font-size: 11px; }

/* release chain links in inspector */
.insp-chain { font-size: 12px; color: var(--faint); padding: 3px 0; }
.link-btn {
  background: none; border: none; padding: 0; color: var(--accent, #6366f1);
  cursor: pointer; font-size: 12px; text-decoration: underline dotted;
}
.link-btn:hover { color: var(--dim); }

/* ---------- v17 additions ---------- */

/* agency readiness chips in inspector */
.agency-badges { padding: 10px 0 4px; }
.agency-badges__lbl { font-size: 11px; color: var(--faint); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.agency-badges__row { display: flex; flex-wrap: wrap; gap: 4px; }
.agency-chip {
  display: inline-block; font-size: 10px; font-family: var(--font-mono); font-weight: 700;
  padding: 2px 5px; border-radius: 3px; cursor: default;
}
.agency-chip--pass { color: var(--pick);   background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.22); }
.agency-chip--fail { color: var(--faint); background: var(--app-bg);       border: 1px solid var(--app-line); }

/* ---------- v16 additions ---------- */

/* expiry digest banner */
.digest-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: rgba(217,166,10,.10);
  border-bottom: 1px solid rgba(217,166,10,.28);
  font-size: 13px; color: var(--dim);
}
.digest-banner__msg { flex: 1; }
.digest-banner[hidden] { display: none; }

/* form progress bar */
.rf-progress-bar {
  height: 3px; background: var(--app-line); margin-bottom: 12px;
  border-radius: 2px; overflow: hidden;
}
.rf-progress-fill { height: 100%; width: 0; border-radius: 2px; transition: width .25s, background .25s; }

/* shoot-template badge */
.rf-template-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; margin-bottom: 10px;
  background: rgba(63,185,80,.10); border: 1px solid rgba(63,185,80,.28);
  border-radius: var(--radius); font-size: 12px; color: var(--pick);
}
.rf-template-badge[hidden] { display: none; }
.rf-template-clear {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  color: var(--pick); font-size: 13px; line-height: 1;
}

/* phone format hint */
.field-hint { font-size: 11px; color: var(--reject); margin-top: 3px; display: block; }
.field-hint[hidden] { display: none; }

/* library health stats panel */
.health-stats { padding: 4px 10px 8px; }
.health-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0; border-bottom: 1px solid var(--app-line); font-size: 12px;
}
.health-k { color: var(--faint); }
.health-v { color: var(--dim); font-family: var(--font-mono); }
.health-v--hi   { color: var(--pick); }
.health-v--lo   { color: var(--reject); }
.health-v--warn { color: var(--unsure); font-weight: 600; }

/* ---------- v20 additions ---------- */

/* score histogram (5-bucket distribution in health rail) */
.score-hist {
  display: flex; gap: 3px; align-items: flex-end;
  height: 52px; padding: 6px 10px 4px;
}
.score-hist__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.score-hist__bar {
  width: 100%; background: var(--accent, #6366f1);
  border-radius: 2px 2px 0 0; min-height: 2px; transition: height .3s;
}
.score-hist__lbl { font-size: 9px; color: var(--faint); }

/* score breakdown in inspector */
.score-expand-btn { font-size: 11px; }
.insp-score-detail {
  padding: 5px 0 2px; border-top: 1px solid var(--app-line);
  margin: 3px 0 8px;
}
.insp-score-detail[hidden] { display: none; }
.sb-row {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--faint); padding: 2px 0;
}
.sb-row--done { color: var(--ink, var(--dim)); }
.sb-pts { margin-left: auto; font-weight: 700; color: var(--accent, #6366f1); font-family: var(--font-mono); font-size: 10px; }

/* inspector pin button */
.insp-pin-btn {
  position: absolute; top: 10px; right: 36px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; opacity: .35; transition: opacity .15s; padding: 2px 4px;
  line-height: 1;
}
.insp-pin-btn:hover { opacity: .8; }
.insp-pin-btn--active { opacity: 1; color: var(--red, #C8070A); }

/* draft resume banner */
.draft-resume-banner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.25);
  border-radius: 6px; padding: 7px 10px; margin-bottom: 10px; font-size: 12px;
}
.draft-resume-banner span { flex: 1; }
.draft-resume-banner[hidden] { display: none; }

/* keyboard shortcuts dialog table */
.shortcuts-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.shortcuts-table td { padding: 6px 8px; border-bottom: 1px solid var(--app-line); }
.shortcuts-table td:first-child { width: 110px; white-space: nowrap; }
kbd {
  display: inline-block; background: var(--app-panel);
  border: 1px solid var(--app-line); border-radius: 4px;
  padding: 1px 5px; font-family: var(--font-mono); font-size: 11px;
  box-shadow: 0 1px 0 var(--app-line);
}

/* digest banner expiry email button */
.digest-banner__email { flex-shrink: 0; }

/* ---------- v21 additions ---------- */

/* complete-now CTA banner in inspector */
.insp-complete-cta {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.07); border: 1px solid rgba(99,102,241,.22);
  border-radius: 6px; padding: 7px 10px; margin: 6px 0 10px; font-size: 12px;
}
.insp-complete-cta__msg { flex: 1; color: var(--dim); }

/* compare dialog grid */
.compare-scroll { overflow-x: auto; padding-bottom: 4px; }
.cmp-grid {
  display: grid; gap: 0; min-width: max-content;
  border-top: 1px solid var(--app-line);
}
.cmp-lbl {
  padding: 5px 8px; font-size: 11px; font-weight: 600; color: var(--faint);
  border-bottom: 1px solid var(--app-line); text-transform: uppercase; letter-spacing: .04em;
  background: var(--app-bg); white-space: nowrap;
}
.cmp-col {
  padding: 5px 10px; font-size: 12px; border-bottom: 1px solid var(--app-line);
  border-left: 1px solid var(--app-line); text-align: center;
}
.cmp-col--head {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px; background: var(--app-panel); border-left: 1px solid var(--app-line);
}
.cmp-photo { width: 48px; height: 56px; object-fit: cover; border-radius: 4px; }
.cmp-photo--empty {
  width: 48px; height: 56px; border-radius: 4px; background: var(--app-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--faint);
}
.cmp-name { font-size: 11px; font-weight: 600; text-align: center; max-width: 100px; word-break: break-word; }
.cmp-col--ok   { color: var(--pick); font-weight: 700; }
.cmp-col--miss { color: var(--reject); font-weight: 700; }

/* AI quick-fill buttons in form header */
.ai-quick-btns {
  display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap;
}

/* territory input in bulkbar */
.cov-bulkbar__terr {
  height: 28px; border: 1px solid var(--app-line); border-radius: var(--radius);
  background: var(--app-panel); color: var(--dim); font-size: 12px;
  padding: 0 8px; width: 110px;
}
.cov-bulkbar__terr:focus { outline: none; border-color: var(--accent, #6366f1); }

/* settings auto-archive toggle */
.settings-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dim); margin: 8px 0 12px; cursor: pointer;
}
.settings-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }

/* ---- v22 block (Tranche 11) ---- */

/* copy-ref: clickable ID ref span in inspector */
.copy-ref {
  cursor: pointer;
  border-radius: 3px;
  transition: background .15s, opacity .15s;
}
.copy-ref:hover { background: var(--app-line); opacity: .85; }
@keyframes ref-pulse {
  0%   { background: rgba(99,102,241,.35); }
  100% { background: transparent; }
}
.copy-ref--pulse { animation: ref-pulse .6s ease-out forwards; }

/* AI quality review panel inside inspector */
.insp-ai-review {
  font-size: 12px; color: var(--dim); line-height: 1.55;
  background: rgba(99,102,241,.06); border: 1px solid rgba(99,102,241,.2);
  border-radius: 6px; padding: 8px 10px; margin: 6px 0 4px;
}
.insp-ai-review[hidden] { display: none; }

/* bulk edit dialog hint text */
.bulk-edit-hint {
  font-size: 12px; color: var(--faint); margin: 0 0 12px;
}

/* territory compliance report button — matches gap report styling */
#btn-territory-report { margin-left: 4px; }


/* ===== v23 additions ===== */
/* same-model prefill banner */
.prefill-banner { display: flex; align-items: center; gap: 8px; background: rgba(99,102,241,.07); border: 1px solid rgba(99,102,241,.22); border-radius: 6px; padding: 6px 10px; margin: 4px 0 8px; font-size: 12px; flex-wrap: wrap; }
.prefill-banner[hidden] { display: none; }
.prefill-banner__name { font-weight: 600; color: var(--dim); }

/* floating AI library report panel */
.lib-ai-report-panel { position: fixed; bottom: 20px; right: 20px; max-width: 380px; background: var(--app-panel); border: 1px solid var(--app-line); border-radius: 10px; padding: 14px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.25); z-index: 900; }
.lib-ai-report-panel[hidden] { display: none; }
.lib-ai-report-panel__close { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--faint); line-height: 1; }
.lib-ai-report-panel__title { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 8px; }
.lib-ai-report-panel__text { font-size: 13px; color: var(--dim); line-height: 1.55; }


/* ===== v24 additions ===== */
/* confidence dot overlay on coverage thumbnails (green=high, amber=medium, red=low) */
.conf-dot { position: absolute; bottom: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); z-index: 2; }
.thumb { position: relative; }

/* score sparkline in stats rail */
.score-sparkline { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.score-sparkline svg { flex-shrink: 0; }
.score-spark-lbl { font-size: 11px; color: var(--faint); white-space: nowrap; }

/* ---- v25: T14 clickable banner pills, dup thumb, coverage portrait, name hint ---- */
.pill--clickable { cursor: pointer; border: none; font: inherit; color: inherit; padding: 0; background: transparent; display: inline-flex; align-items: center; gap: 4px; }
.pill--clickable:hover { text-decoration: underline; opacity: .85; }
.thumb--dup { outline: 2px dashed var(--unsure); outline-offset: 2px; }
.insp-portrait--from-cov { opacity: .82; }
.field-hint { font-size: 11px; color: var(--accent); margin-left: 6px; }

/* ---- v26: T15 engine dot, select-all, coverage sort, scope/territory hints ---- */
.engine-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.engine-dot--ok { background: var(--pick, #22c55e); }
.engine-dot--off { background: var(--faint, #888); }
.engine-dot--err { background: var(--unsure, #f59e0b); }
.engine-dot--checking { background: var(--info, #3b82f6); animation: engine-pulse .8s ease-in-out infinite alternate; }
@keyframes engine-pulse { from { opacity: .4; } to { opacity: 1; } }

/* ---- v27: T16 tab badges, tips strip, bulk controls, DOB hint ---- */
.cov-tab-pct { font-size: 10px; font-weight: 700; color: var(--accent, #6366f1); margin-left: 3px; opacity: .85; }
.cov-tips { font-size: 11px; color: var(--dim); padding: 5px 14px; background: var(--panel2); border-bottom: 1px solid var(--line2); letter-spacing: .01em; user-select: none; }
.cov-tips b, .cov-tips .kbd { color: var(--text); }

/* ---- v28: T17 score search, minor filter, session note, AI-complete, duplicate ---- */
[data-rel-act="ai-complete"]:disabled { opacity: .5; cursor: default; }
[data-rel-act="duplicate"] { }

/* ---- v29 polish pass ---- */

/* rail library / coverage name pills */
.rail-lib-name { font-size: 13px; color: var(--text); padding: 0 10px 8px; }

/* coverage "Filter" sub-label spacing */
.rail-filter-title { margin-top: 6px; }

/* session note container in coverage rail */
.rail-note-wrap { padding: 8px 10px 4px; }
.rail-note-label {
  font-size: 10px; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 4px;
}
#cov-note {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 11px;
  resize: vertical; background: var(--app-surface2);
  border: 1px solid var(--app-line); border-radius: var(--radius);
  color: var(--text); padding: 4px 6px;
}
#cov-note:focus { outline: none; border-color: var(--info); }

/* local-first footer section in rail */
.app-rail__group--divider { border-top: 1px solid var(--app-line); }
.rail-local-note { font-size: 12px; color: var(--faint); padding: 0 10px 8px; line-height: 1.4; margin: 0; }
