/* Owner: W2-CAMPAIGNS-A / W3-CAMPAIGNS-B (campaign editor, its dialogs and the campaign list).
   Editor root: .camp-ws.  List root: .campaigns-page.  Dialog roots: .camp-approve-dialog, .camp-build-dialog,
   .camp-fill-dialog, .new-campaign-dialog, .camp-type-dialog, .camp-copy-dialog.
   Hooks kept: .camp-left, .camp-preview, .jumpbar, .design-current. */

/* =====================================================================
   Frame: editor bar / inspector + preview / action bar
   ===================================================================== */
.camp-ws {
  display: grid; grid-template-columns: var(--inspector-w) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  flex: 1 1 auto; min-height: 0; min-width: 0; background: var(--canvas);
}
.camp-ws > .editor-bar { grid-row: 1; grid-column: 1 / -1; }
.camp-ws > .action-bar { grid-row: 3; grid-column: 1 / -1; }
.camp-ws .camp-left {
  grid-row: 2; grid-column: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative;
  background: var(--surface-2); border-right: 1px solid var(--line); padding: 0 8px 24px;
  scrollbar-width: thin; scrollbar-gutter: stable;
}
.camp-ws .camp-center { grid-row: 2; grid-column: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.camp-ws .camp-status { display: inline-flex; align-items: center; }

/* ---- Jump bar: wraps onto a second row, never scrolls sideways ---- */
.camp-ws .jumpbar {
  position: sticky; top: 0; z-index: var(--z-sticky); margin: 0 -8px 8px; padding: 8px 8px 7px;
  display: flex; flex-wrap: wrap; gap: 4px; overflow: hidden;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.camp-ws .jumpbar button {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; flex: 0 0 auto;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface);
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.camp-ws .jumpbar button:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.camp-ws .jumpbar button.is-current { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.camp-ws .jumpbar button.has-problem { border-color: var(--bad-line); }
.camp-ws .jumpbar button .dot { width: 7px; height: 7px; }

/* ---- Callouts at the top of the inspector ---- */
.camp-ws .camp-callouts { display: flex; flex-direction: column; gap: 6px; }
.camp-ws .camp-callouts:not(:empty) { margin-bottom: 8px; }

/* ---- Sections ---- */
.camp-ws .camp-left .panel-section { margin-bottom: 8px; box-shadow: var(--shadow-1); }
.camp-ws .camp-left .panel-section .section-head { min-height: 40px; }
.camp-ws .camp-left .panel-section .section-title { font-size: 14px; }
.camp-ws .camp-left .panel-section .section-body { padding: 10px; }
.camp-ws .camp-left .panel-section .section-controls .btn.small { height: 26px; }
.camp-ws .camp-switch { align-items: center; gap: 6px; }
.camp-ws .camp-switch .switch-label { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.camp-ws .camp-switch .track { margin-top: 0; }
.camp-ws .camp-body { display: flex; flex-direction: column; }
.camp-ws .camp-left .field { margin-bottom: 10px; }
.camp-ws .camp-left .field-label { font-size: 13px; }
.camp-ws .camp-left .input { min-height: 32px; padding: 5px 9px; font-size: 13px; }
/* Paired fields share a row and split it evenly. */
.camp-ws .camp-left .row > .field { flex: 1 1 0; min-width: 0; }
.camp-ws .camp-left .camp-pair { flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
.camp-ws .camp-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.camp-ws .camp-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.camp-ws .camp-none { font-size: 13px; color: var(--muted); padding: 6px 0 10px; }
.camp-ws .camp-sub { margin: 14px 0 4px; font-size: 13px; }
.camp-ws .camp-sub:first-child { margin-top: 0; }
.camp-ws .camp-body > .hint { margin-bottom: 6px; }
.camp-ws .camp-body > .callout { margin-bottom: 8px; }

/* ---- Rows (deal, daily, bulk, product) ---- */
.camp-ws .camp-rows { display: flex; flex-direction: column; gap: 4px; margin: 0 -6px 8px; }
.camp-ws .camp-row { padding: 4px; border-radius: var(--r-md); border: 1px solid transparent; }
.camp-ws .camp-row:hover, .camp-ws .camp-row:focus-within { background: var(--surface-2); border-color: var(--line); }
.camp-ws .camp-row .input { min-height: 30px; height: 30px; padding: 4px 8px; font-size: 13px; }
.camp-ws .camp-row .btn.small { height: 28px; }
.camp-ws .camp-row .btn.small.ghost { color: var(--ink-2); }
.camp-ws .camp-row .btn.small.icon-only { width: 28px; padding: 0; }
.camp-ws .camp-row .menu-btn { min-width: 28px; width: 28px; padding: 0; }
.camp-ws .camp-row-line { display: grid; gap: 4px; align-items: center; }
.camp-ws .camp-row.deal { display: flex; flex-direction: column; gap: 4px; }
.camp-ws .camp-row.deal .camp-row-line.main { grid-template-columns: 24px 16px 88px minmax(0, 1fr); }
.camp-ws .camp-row.deal .camp-row-line.sub { grid-template-columns: minmax(0, 1fr) auto auto; padding-left: 48px; }
/* A row being dragged to a new place (ui/sortable.js) */
.camp-ws .is-lifted { background: var(--surface); border-color: var(--line); }
.camp-ws .row-num { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.camp-ws .camp-row .input.note { color: var(--ink-2); }
/* The description grows with its text (sized in JS); dragging its corner would break the row. */
.camp-ws .camp-row textarea.desc { display: block; resize: none; }
.camp-ws .camp-row.daily { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.camp-ws .camp-row.bulk { display: flex; flex-direction: column; gap: 4px; }
.camp-ws .camp-row.bulk .camp-row-line.main { grid-template-columns: 112px minmax(0, 1fr) 34px; }
.camp-ws .camp-row.bulk .camp-row-line.sub { grid-template-columns: minmax(0, 1fr) auto auto; }
.camp-ws .camp-row.bulk select.input { height: 30px; min-height: 30px; padding: 3px 6px; }
.camp-ws .camp-row input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.camp-ws .camp-row.product { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.camp-ws .product-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); display: block; }
.camp-ws .row-actions { display: inline-flex; align-items: center; gap: 2px; }
.camp-ws .camp-hide { gap: 4px; padding: 0 8px; }
.camp-ws .camp-hide.is-hidden { color: var(--accent-ink); }
/* A hidden row stays in the list, greyed, and is not drawn. */
.camp-ws .camp-row.is-hidden { border-style: dashed; border-color: var(--line-strong); background: var(--surface-2); }
.camp-ws .camp-row.is-hidden .input { opacity: .55; }

/* ---- Brands (Brands of the Week): this week's list, then Add a brand ---- */
.camp-ws .camp-brand-list { list-style: none; margin: 0 -6px 6px; padding: 0; display: flex; flex-direction: column; gap: 0; }
.camp-ws .camp-brand-row {
  display: grid; grid-template-columns: 24px 16px 52px minmax(0, 1fr) auto; gap: 6px; align-items: center;
  padding: 0 4px 0 0; border-radius: var(--r-md); border: 1px solid transparent;
}
.camp-ws .camp-brand-row:hover, .camp-ws .camp-brand-row:focus-within { background: var(--surface); border-color: var(--line); }
.camp-ws .camp-brand-logo {
  width: 52px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.camp-ws .camp-brand-logo img, .camp-ws .camp-brand-addlogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.camp-ws .camp-brand-logo.is-missing, .camp-ws .camp-brand-addlogo.is-missing { background: var(--surface-2); border-style: dashed; color: var(--muted); }
.camp-ws .camp-brand-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.camp-ws .camp-brand-name { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-ws .camp-brand-missing { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--bad-ink); }
.camp-ws .camp-brand-missing .ico { flex: 0 0 auto; }
.camp-ws .camp-left .camp-brand-variant { min-height: 22px; height: 22px; padding: 0 4px; font-size: 12px; width: auto; max-width: 100%; }
.camp-ws .camp-brand-row .btn.small { height: 28px; }
.camp-ws .camp-brand-row.has-text { align-items: start; padding-top: 4px; padding-bottom: 4px; }
.camp-ws .camp-brand-row.has-text .row-num, .camp-ws .camp-brand-row.has-text .camp-brand-logo { margin-top: 2px; }
.camp-ws .camp-brand-texts { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 4px; margin-top: 3px; }
.camp-ws .camp-left .camp-brand-text { min-height: 26px; height: 26px; padding: 2px 6px; font-size: 12px; }
.camp-ws .camp-brand-tools { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 12px; }
.camp-ws .camp-brand-tools > .btn { align-self: flex-start; }
.camp-ws .camp-brand-colours { display: flex; flex-direction: column; gap: 6px; }
.camp-ws .camp-brand-colour { display: flex; align-items: center; gap: 8px; min-width: 0; }
.camp-ws .camp-brand-colour input[type="color"] { width: 34px; height: 28px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
.camp-ws .camp-brand-colour-name { font-weight: 700; font-size: 13px; white-space: nowrap; }
.camp-ws .camp-brand-colour .hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-ws .camp-brand-row .btn.small.icon-only { width: 28px; padding: 0; }
.camp-ws .camp-brand-row .btn.small.ghost { color: var(--ink-2); }
.camp-ws .camp-brand-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; min-height: 26px; }
.camp-ws .camp-brand-head .camp-sub { margin: 0; min-width: 0; }
.camp-ws .camp-brand-head .camp-brand-menu { flex: 0 0 auto; height: 26px; padding: 0 6px 0 8px; gap: 2px; color: var(--accent-ink); }
.camp-ws .camp-own-hint { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 6px; font-size: 12px; line-height: 16px; color: var(--info-ink); }
.camp-ws .camp-own-hint .ico { flex: 0 0 auto; margin-top: 1px; }
.camp-ws .camp-own-hint.tone-warn { color: var(--warn-ink); }
.camp-ws .camp-newbrand { flex: 0 0 auto; font-size: 12px; }
.camp-ws .camp-brand-addhead { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.camp-ws .camp-brand-addhead .camp-sub { margin: 0; flex: 0 0 auto; }
.camp-ws .camp-left .camp-brand-addhead .input { flex: 1 1 auto; min-width: 0; min-height: 30px; height: 30px; }
.camp-ws .camp-brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px;
  max-height: 232px; overflow-y: auto; padding: 2px; margin: 0 -2px 6px; scrollbar-width: thin;
}
.camp-ws .camp-brand-grid > .camp-none { grid-column: 1 / -1; }
.camp-ws .camp-brand-add {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 4px 4px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; color: var(--ink-2); cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.camp-ws .camp-brand-add:hover { border-color: var(--accent-line); box-shadow: var(--shadow-1); color: var(--accent-ink); }
.camp-ws .camp-brand-addlogo {
  width: 72px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.camp-ws .camp-brand-addname { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Look ---- */
.camp-ws .camp-design-card { padding: 10px; margin-bottom: 12px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); }
.camp-ws .design-current { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 0 8px; }
.camp-ws .design-current .thumb {
  width: 120px; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden;
  background: var(--stage); display: flex; align-items: center; justify-content: center; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
}
.camp-ws .design-current .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camp-ws .design-current .thumb:hover { border-color: var(--accent); }
.camp-ws .design-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.camp-ws .design-name strong { overflow-wrap: anywhere; line-height: 1.3; }
.camp-ws .camp-default { margin-left: 6px; vertical-align: 1px; }
.camp-ws .design-actions { display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; }
.camp-ws .design-actions .btn.small { height: 26px; }
.camp-ws .design-actions .btn.ghost { padding: 0 6px; color: var(--accent-ink); }
.camp-ws .camp-use-plate { align-items: center; }
.camp-ws .camp-use-plate .switch-label { font-size: 13px; }
.camp-ws .camp-art-line { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.camp-ws .camp-art-line .ico { flex: 0 0 auto; margin-top: 1px; color: var(--muted); }
.camp-ws .camp-left .camp-colour { margin-bottom: 14px; }
.camp-ws .camp-colour > .field-label { display: block; margin-bottom: 6px; }
.camp-ws .camp-colour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.camp-ws .camp-colour .field-hint { margin-top: 4px; }
.camp-ws .camp-colour .swatch-picker { gap: 5px; }
.camp-ws .camp-colour .swatch-btn { width: 26px; height: 26px; }
.camp-ws .camp-colour .swatch-name { flex: 1 0 100%; margin: 2px 0 0; color: var(--ink-2); }
.camp-ws .camp-colour .swatch-name:empty { display: none; }
.camp-ws .camp-colour > .callout { margin-top: 8px; }
.camp-ws .camp-locked-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 6px; }
.camp-ws .camp-locked {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; min-height: 32px; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-size: 13px; color: var(--ink-2);
}
.camp-ws .camp-locked strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.camp-ws .camp-locked-sw { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 4px; border: 1px solid var(--line-strong); }
.camp-ws .camp-locked .camp-locked-ico { flex: 0 0 auto; color: var(--muted); }
.camp-ws .camp-locked.is-art .ico { flex: 0 0 auto; color: var(--muted); }
.camp-ws .camp-link {
  border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--accent-line);
}
.camp-ws .camp-link:hover { text-decoration-color: currentColor; }
.camp-ws .camp-follow { height: 24px; padding: 0 10px; font-size: 12px; flex: 0 0 auto; }
.camp-ws .camp-recolour { margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.camp-ws .camp-switch-row { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
.camp-ws .camp-switch-row .switch-label { font-size: 13px; }
.camp-ws .camp-switch-row .info-tip { margin-top: -2px; }
.camp-ws .camp-look-note { margin-top: 2px; }
.camp-ws .camp-art-pickers { margin-top: 10px; }
.camp-ws .camp-left .camp-art-pickers .camp-colour { margin-bottom: 10px; }
.camp-ws .camp-art-pickers .camp-back { margin: -4px 0 12px; }
.camp-ws .camp-art-colours > .field-hint, .camp-ws .camp-art-pickers > .field-hint { margin-top: 0; }

/* ---- Outputs ---- */
.camp-ws .output-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.camp-ws .output-group { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.camp-ws .output-group:first-child { margin-top: 0; }
.camp-ws .output-item .check-line { gap: 6px; align-items: center; }
.camp-ws .output-item .check-line .hint { margin-left: 2px; }
.camp-ws .output-item .out-size { white-space: nowrap; font-variant-numeric: tabular-nums; }
.camp-ws .output-item .sub { margin: 3px 0 0 22px; font-size: 12px; color: var(--muted); }
.camp-ws .output-item label.sub { gap: 6px; }
.camp-ws .output-item label.sub input { width: 14px; height: 14px; }
/* A narrow inspector (under 480px, so below 1600px wide): the size goes under the
   output's name instead of wrapping beside it. */
@media (max-width: 1599px) {
  .camp-ws .output-item > .check-line { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; row-gap: 0; }
  .camp-ws .output-item > .check-line .out-size { grid-column: 2; margin-left: 0; font-size: 12px; line-height: 16px; }
}

/* ---- More options ---- */
.camp-ws .camp-kv { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.camp-ws .camp-type-name { font-weight: 600; margin-top: 2px; }
.camp-ws .camp-left .logo-preview img { max-width: 100%; max-height: 110px; }

/* =====================================================================
   Preview toolbar and stage
   ===================================================================== */
/* A narrower window (or 8 stores' buttons) wraps onto a second row rather than hiding
   the sizes, the design and Proof off the right edge (the user, 11/1). */
.camp-ws .camp-tabs {
  flex: 0 0 auto; min-height: var(--toolbar-h); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; row-gap: 6px; min-width: 0;
  padding: 5px 12px; background: var(--surface); border-bottom: 1px solid var(--line);
}
/* The sizes, the design and Proof come first; the store buttons follow, so a wrap puts
   them on the second row and the sizes stay at the top. */
.camp-ws .camp-tabs .toolbar-end { order: 4; }
.camp-ws .camp-tabs .camp-stores { order: 5; }
/* The store and output buttons never shrink; the design name gives way first. */
.camp-ws .camp-tabs .seg { flex: 0 0 auto; }
.camp-ws .camp-tabs .seg.small .seg-btn { flex: 0 0 auto; padding: 0 7px; }
.camp-ws .camp-stores .seg-btn { gap: 4px; }
.camp-ws .camp-stores .seg-btn.is-ok .ico { color: var(--ok-ink); }
.camp-ws .camp-stores .seg-btn.is-bad .ico { color: var(--bad-ink); }
.camp-ws .camp-stores .seg-btn[aria-checked="true"] .ico { color: inherit; }
.camp-ws .camp-outputs .seg-btn { gap: 4px; }
.camp-ws .camp-outputs .seg-btn .ico { opacity: .8; }
.camp-ws .camp-design { display: inline-flex; align-items: center; gap: 0; min-width: 96px; flex: 0 1 auto; }
.camp-ws .camp-design .icon-btn { width: 26px; height: 26px; }
.camp-ws .camp-design-btn { min-width: 0; max-width: 100%; height: 28px; padding: 0 8px; gap: 4px; }
.camp-ws .camp-design-pre { color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.camp-ws .camp-design-name { max-width: 140px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-ws .camp-design-btn .ico { flex: 0 0 auto; }
.camp-ws .camp-tabs .info-tip { flex: 0 0 auto; }
.camp-ws .camp-tabs .toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.camp-ws .camp-tabs .camp-proof-btn { height: 28px; padding: 0 10px; gap: 6px; }
.camp-ws .camp-tabs .toolbar-end:empty { margin-left: auto; }
.camp-ws .camp-preview {
  flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--stage);
}
.camp-ws .camp-preview svg { display: block; flex: 0 0 auto; max-width: 100%; max-height: 100%; box-shadow: var(--shadow-art); background: var(--surface); }
.camp-ws .camp-preview .empty { max-width: 420px; }

/* =====================================================================
   Action bar
   ===================================================================== */
.camp-ws .action-bar .status-pill { flex: 0 1 auto; max-width: 460px; }
.camp-ws .action-bar .action-left { flex: 0 0 auto; }
.camp-ws .action-bar .action-right { flex: 0 0 auto; }
.camp-ws .action-bar .camp-next { max-width: 220px; }
.camp-ws .action-bar .camp-next span { overflow: hidden; text-overflow: ellipsis; }

/* =====================================================================
   Dialogs
   ===================================================================== */
/* Checks: the logos and artwork the campaign uses. */
.camp-checks-extra { display: flex; flex-direction: column; gap: 16px; }
.camp-checks-extra .camp-layout-notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }

/* Approve & export */
.camp-approve-dialog .camp-approve-lead { color: var(--ink-2); }
.camp-approve-dialog .tbl { margin-bottom: 12px; }
.camp-approve-dialog .camp-skip-why { margin-top: 4px; font-size: 12px; color: var(--bad-ink); }
.camp-approve-dialog .camp-formats .row { gap: 16px; }
.camp-approve-dialog .callout { margin-bottom: 12px; }
.camp-approve-dialog .camp-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.camp-approve-dialog .camp-result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.camp-approve-dialog .camp-result-name { overflow-wrap: anywhere; }
.camp-approve-dialog .camp-result a { color: var(--accent-ink); }
.camp-approve-dialog .camp-save-all { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }

/* Build campaigns from a sheet */
.camp-build-dialog .camp-pair { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.camp-build-dialog .camp-pair > .field { flex: 1 1 0; min-width: 0; }
.camp-build-dialog .camp-build-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.camp-build-dialog .camp-build-card { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.camp-build-dialog .camp-build-title { font-weight: 700; }
.camp-build-dialog .camp-build-note { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--ink-2); }
.camp-build-dialog .camp-build-note .ico { flex: 0 0 auto; margin-top: 1px; }
.camp-build-dialog .camp-build-note.tone-warn, .camp-build-dialog .camp-build-note.tone-info { color: var(--t-ink); font-weight: 600; }
.camp-build-dialog .camp-build-changes { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }

/* Refill from a store's weekly slide */
.camp-fill-dialog .camp-fill-choices { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.camp-fill-dialog .camp-fill-summary { font-weight: 600; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.camp-fill-dialog .callout { margin-bottom: 10px; }

/* New campaign */
.new-campaign-dialog .camp-pair { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.new-campaign-dialog .camp-pair > .field { flex: 1 1 0; min-width: 0; }
.new-campaign-dialog .field-error { margin: -4px 0 10px; }
.new-campaign-dialog .camp-new-exists:not(:empty) { margin-bottom: 10px; }
.new-campaign-dialog .camp-new-design { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.new-campaign-dialog .camp-new-design .ico { color: var(--muted); }

/* Change type */
.camp-type-dialog .camp-type-note { margin: 0; color: var(--ink-2); font-size: 13px; }

/* Copy to another week */
.camp-copy-dialog .camp-copy-lead { margin: 0 0 12px; color: var(--ink-2); }
.camp-copy-dialog .camp-pair { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.camp-copy-dialog .camp-pair > .field { flex: 1 1 0; min-width: 0; }
.camp-copy-dialog .field-error { margin: -4px 0 10px; }
.camp-copy-dialog .camp-copy-exists:not(:empty) { margin-bottom: 4px; }

/* =====================================================================
   Campaigns page: weeks of campaigns as tiles or a list
   ===================================================================== */
.campaigns-page .camp-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.campaigns-page .camp-head-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.campaigns-page .camp-build-hint { font-size: 12px; text-align: right; }
.campaigns-page .camp-filters .input { min-width: 200px; }
.campaigns-page .camp-filters .seg .ico { opacity: .85; }
.campaigns-page .camp-week-head { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.campaigns-page .camp-week-head .hint { font-size: 13px; }
.campaigns-page .camp-week-head .btn.small { height: 28px; }
.campaigns-page .camp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 12px; }
@media (min-width: 1600px) {
  .campaigns-page .camp-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.campaigns-page .camp-list-tbl { table-layout: fixed; }
.campaigns-page .camp-list-tbl th, .campaigns-page .camp-list-tbl td { vertical-align: middle; }
.campaigns-page .camp-list-tbl td { padding-top: 7px; padding-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.campaigns-page .camp-list-tbl .col-type { width: 13%; }
.campaigns-page .camp-list-tbl .col-headline { width: auto; }
.campaigns-page .camp-list-tbl .col-content { width: 12%; }
.campaigns-page .camp-list-tbl .col-state { width: 176px; }
.campaigns-page .camp-list-tbl .col-notes { width: 18%; }
.campaigns-page .camp-list-tbl .col-outputs { width: 11%; }
.campaigns-page .camp-list-tbl .col-updated { width: 96px; }
.campaigns-page .camp-list-tbl .col-more { width: 52px; }
.campaigns-page .camp-list-tbl .row-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.campaigns-page .camp-list-tbl .row-link:hover { text-decoration: underline; }
.campaigns-page .camp-list-tbl .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-wrap: nowrap; }
.campaigns-page .camp-list-tbl .camp-row-menu { overflow: visible; text-align: right; padding-left: 4px; padding-right: 10px; }
.camp-ws .camp-brand-size { display: flex; align-items: center; gap: 8px; }
.camp-ws .camp-brand-size .range-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.camp-ws .camp-brand-size input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.camp-ws .camp-brand-size .range-readout { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.camp-ws .camp-brand-names { margin: 2px 0 10px; }
.camp-ws .camp-brand-panel { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; }
.camp-ws .camp-brand-panel .field { margin: 0; }
/* A hidden brand stays in the lineup, greyed, and is not drawn. */
.camp-ws .camp-brand-row.is-hidden { border-style: dashed; border-color: var(--line-strong); background: var(--surface-2); }
.camp-ws .camp-brand-row.is-hidden .camp-brand-logo, .camp-ws .camp-brand-row.is-hidden .camp-brand-name, .camp-ws .camp-brand-row.is-hidden .input { opacity: .5; }
.camp-ws .camp-brand-hidden { font-weight: 600; color: var(--muted); }
.camp-ws .output-item.is-unavailable { opacity: .45; }
.camp-ws .output-item.is-unavailable .check-line { cursor: not-allowed; }
.camp-approve-dialog .camp-combine { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.camp-approve-dialog .camp-combine-list { margin: 6px 0 0 24px; padding: 0; font-size: 13px; }
.camp-ws .camp-missing { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.camp-ws .camp-left .camp-missing-pick { max-width: 100%; }
.camp-ws .camp-missing-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.camp-ws .camp-missing-row .camp-missing-pick { flex: 1 1 140px; min-width: 0; }
/* Brands of the Week + Month: the switch that puts a brand in the month row */
.camp-ws .camp-month-btn.is-on { color: var(--accent-ink); background: var(--accent-soft); }
.camp-ws .camp-brand-month { margin-left: 6px; font-size: 11px; vertical-align: middle; }

/* Stores section: which stores run the campaign, one switch each. */
.camp-ws .camp-store-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin-top: 8px; }

/* Adjust layout in the campaign editor (same look as the slide editor's). */
.camp-ws .mode-switch { margin-right: 8px; }
.camp-ws .layout-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.camp-ws .layout-panel-head { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 3; margin: -12px -12px 0; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.camp-ws .layout-panel-head h2 { font-size: 16px; margin: 0; }
.camp-ws .layout-panel-head .spacer { flex: 1; }
.camp-ws .layout-panel .de-controls-col { overflow: visible; max-height: none; padding: 0; }
.camp-ws .layout-outlines rect { fill: none; }
.camp-ws .layout-outlines .halo { stroke: var(--surface); stroke-width: 8; opacity: .75; }
.camp-ws .layout-outlines .dash { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 14 10; }
.camp-ws .camp-preview.de-pickable svg { cursor: pointer; }
