/* ═══════════════════════════════════════════════════════════════════════════
   Campaign workspace — "Dashboard First" (approved comp, 2026-09-07)

   The detail page opens on a real dashboard: a readiness ring and checklist,
   four stats with their context, the build timeline, what the matched placements
   are made of, keyword coverage per topic, and the top channels. Every card
   links into the section that owns it. The other five sections are horizontal
   tabs. The create/edit wizard is a stepper on a dimmed ground, so the campaign
   it belongs to stays visible behind it.

   Everything is scoped under .db-df. The teal is Mirrors' own; hue is spent on
   status and progress only, never decoration.
   ═══════════════════════════════════════════════════════════════════════════ */

.db-df {
  --df-bg:      #F5F7F9;
  --df-surface: #FFFFFF;
  --df-ink:     #141A22;
  --df-muted:   #66707B;
  --df-faint:   #9AA3AD;
  --df-line:    #E2E6EB;
  --df-line-2:  #EEF1F4;
  --df-hover:   #F7F9FA;

  --df-teal:    #0FB8A2;
  --df-teal-dk: #088E89;
  --df-soft:    #E6F8F6;
  --df-warn:    #D97706;
  --df-bad:     #DC2626;
  --df-violet:  #7C3AED;
  --df-violet-s:#F5F3FF;

  --df-sans: "Manrope", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --df-ctl:  "IBM Plex Sans", "Inter", system-ui, sans-serif;

  /* Edge to edge inside .app-content's 26px padding, as the comp draws it. */
  margin: -26px;
  width: auto;
  min-height: calc(100vh - 64px);
  padding: 0 0 26px;
  background: var(--df-bg);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-variant-numeric: tabular-nums;
}
.db-df *:focus-visible { outline: 2px solid var(--df-teal); outline-offset: 2px; border-radius: 6px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.df-hd { display: flex; align-items: flex-start; gap: 14px; padding: 14px 22px 12px; background: var(--df-surface); flex-wrap: wrap; }
.df-hd-main { min-width: 0; flex: 1; }
.df-crumb { font-size: 12px; color: var(--df-muted); margin-bottom: 3px; }
.df-crumb a { color: var(--df-muted); cursor: pointer; text-decoration: none; }
.df-crumb a:hover { color: var(--df-ink); }
.df-hd h1 { font-size: 19px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.df-meta { font-size: 12.5px; color: var(--df-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.df-meta a { color: var(--df-teal-dk); cursor: pointer; text-decoration: none; font-weight: 600; }
.df-hd-actions { display: flex; gap: 8px; flex: none; align-items: center; }

.df-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #E2E8F0; color: #475569; white-space: nowrap; }
.df-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.df-pill.is-live { background: #DCFCE7; color: #15803D; }
.df-pill.is-scheduled { background: #FEF3C7; color: #B45309; }
.df-pill.is-held { background: #FEE2E2; color: #B91C1C; }

.df-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid rgba(15,58,58,.25); border-radius: 6px; background: var(--df-surface);
  font-family: var(--df-ctl); font-size: 14px; font-weight: 400; color: #4A5E5E;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.df-btn:hover:not(:disabled) { background: var(--df-hover); border-color: rgba(15,58,58,.4); color: var(--df-ink); }
.df-btn:disabled { opacity: .55; cursor: not-allowed; }
.df-btn--primary { background: var(--df-teal); border-color: var(--df-teal); color: #fff; }
.df-btn--primary:hover:not(:disabled) { background: var(--df-teal-dk); border-color: var(--df-teal-dk); color: #fff; }
.df-btn .bi { font-size: 12px; }
.df-btn--sm { height: 28px; font-size: 13px; padding: 0 10px; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.df-tabs { display: flex; gap: 2px; padding: 0 22px; background: var(--df-surface); border-bottom: 1px solid var(--df-line); overflow-x: auto; scrollbar-width: none; }
.df-tabs::-webkit-scrollbar { display: none; }
.df-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; background: transparent;
  font-family: var(--df-sans); font-size: 12.5px; font-weight: 600; color: var(--df-muted); cursor: pointer;
  white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.df-tab:hover { color: var(--df-ink); }
.df-tab.is-on { color: var(--df-ink); border-bottom-color: var(--df-teal); }
.df-tab b { font-size: 11px; font-weight: 600; color: var(--df-faint); }
.df-tab.is-on b { color: var(--df-teal-dk); }
.df-tab i.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--df-warn); flex: none; }

.df-main { padding: 16px 22px 0; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.df-card { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; padding: 14px 16px; }
.df-card h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--df-muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.df-card h3 a { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--df-teal-dk); cursor: pointer; text-transform: none; letter-spacing: 0; }
.df-card h3 a:hover { text-decoration: underline; }

/* ── Dashboard grid ──────────────────────────────────────────────────────── */
.df-dash { display: grid; grid-template-columns: 300px repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.df-dash .df-ready { grid-row: span 2; }
.df-dash .df-wide-2 { grid-column: span 2; }
.df-dash .df-wide-4 { grid-column: span 4; }

.df-ready-top { display: flex; align-items: center; gap: 14px; }
.df-ready-top b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.df-ready-top small { color: var(--df-muted); font-size: 12px; }
.df-ring svg { width: 52px; height: 52px; transform: rotate(-90deg); flex: none; }
.df-chk { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.df-chk li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; cursor: pointer; background: transparent; border: 0; padding: 0; text-align: left; font-family: inherit; color: inherit; width: 100%; }
.df-chk li:hover { color: var(--df-teal-dk); }
.df-chk i { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #C9D0D8; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-style: normal; flex: none; margin-top: 1px; }
.df-chk li.is-done i { background: var(--df-teal); border-color: var(--df-teal); color: #fff; }
.df-chk li.is-need i { border-color: var(--df-bad); }
.df-chk li.is-need { color: var(--df-bad); }

.df-stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.df-stat span { font-size: 11.5px; color: var(--df-muted); }
.df-stat small { display: block; font-size: 11px; color: var(--df-teal-dk); margin-top: 2px; cursor: pointer; }
.df-stat small.is-plain { color: var(--df-muted); cursor: default; }

.df-bars { display: flex; flex-direction: column; gap: 8px; }
.df-bar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 58px; gap: 10px; align-items: center; font-size: 12px; background: transparent; border: 0; padding: 0; font-family: inherit; color: inherit; text-align: left; width: 100%; }
.df-bar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-bar i { display: block; height: 10px; border-radius: 3px; background: var(--df-line); overflow: hidden; }
.df-bar i b { display: block; height: 100%; width: 100%; background: var(--df-teal); transform-origin: left center; transition: transform .35s ease; }
.df-bar > span:last-child { text-align: right; color: var(--df-muted); }

.df-tl { display: flex; flex-direction: column; gap: 9px; font-size: 12px; }
.df-tl div { display: grid; grid-template-columns: 16px 1fr auto; gap: 9px; align-items: center; }
.df-tl i { width: 9px; height: 9px; border-radius: 50%; background: var(--df-teal); justify-self: center; }
.df-tl i.is-run { background: var(--df-warn); }
.df-tl i.is-todo { background: var(--df-line); }
.df-tl span:last-child { color: var(--df-muted); white-space: nowrap; }

.df-mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.df-mini td { padding: 6px 0; border-top: 1px solid var(--df-line-2); }
.df-mini tr:first-child td { border-top: 0; }
.df-mini td.n { text-align: right; color: var(--df-muted); white-space: nowrap; }
.df-mini tr { cursor: pointer; }
.df-mini tr:hover td { color: var(--df-teal-dk); }

.df-empty-card { color: var(--df-muted); font-size: 12.5px; padding: 6px 0; }

/* ── Section panes ───────────────────────────────────────────────────────── */
.df-pane { display: flex; flex-direction: column; gap: 12px; }
.df-sec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.df-sec-h h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.df-sec-h .df-count { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--df-soft); color: var(--df-teal-dk); }
.df-sec-h .sp { flex: 1; }
.df-sub { font-size: 12.5px; color: var(--df-muted); margin: -4px 0 0; }

/* ── Wizard ──────────────────────────────────────────────────────────────── */
/* Viewport-anchored: the app sidebar is 220px, 62px collapsed, 280/88px wide,
   and a top bar under 992px — a scrim pinned to any one of those is wrong in the
   other four states and leaves a lit strip of page content beside the dialog. */
.df-wz-scrim { position: fixed; inset: 0; background: rgba(20,26,34,.42); z-index: 1040; }
.df-wz {
  position: fixed; top: 46px; bottom: 40px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100vw - 80px)); z-index: 1041;
  background: var(--df-surface); border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.45);
  display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; font-family: var(--df-sans); color: var(--df-ink);
}
.df-wz-h { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--df-line); }
.df-wz-h h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.df-wz-h .sub { font-size: 12.5px; color: var(--df-muted); }
.df-wz-h .sp { flex: 1; }
.df-wz-x { border: 0; background: transparent; color: var(--df-muted); cursor: pointer; font-size: 15px; padding: 4px; border-radius: 6px; line-height: 1; }
.df-wz-x:hover { background: var(--df-line-2); color: var(--df-ink); }

.df-stepper { display: flex; padding: 12px 22px; gap: 0; border-bottom: 1px solid var(--df-line); background: #FAFBFC; }
.df-step { flex: 1; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--df-muted); cursor: pointer; background: transparent; border: 0; padding: 0; font-family: inherit; text-align: left; min-width: 0; }
.df-step:disabled { cursor: not-allowed; opacity: .75; }
.df-step i { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #C9D0D8; background: var(--df-surface); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-style: normal; font-weight: 700; flex: none; }
.df-step.is-on { color: var(--df-ink); font-weight: 700; }
.df-step.is-on i { background: var(--df-ink); border-color: var(--df-ink); color: #fff; }
.df-step.is-done i { background: var(--df-teal); border-color: var(--df-teal); color: #fff; }
.df-step.has-warn i { border-color: var(--df-warn); color: var(--df-warn); }
.df-step .rule { flex: 1; height: 1px; background: var(--df-line); margin: 0 10px; min-width: 12px; }
.df-step:last-child .rule { display: none; }

.df-wz-b { padding: 18px 22px; overflow: auto; }
.df-wz-b h3 { font-size: 15px; font-weight: 700; margin: 0 0 3px; }
.df-wz-b .step-sub { font-size: 12.5px; color: var(--df-muted); margin: 0 0 16px; }
.df-wz-f { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--df-line); }
.df-wz-f .hint { flex: 1; text-align: right; font-size: 12.5px; color: var(--df-muted); }
.df-wz-f .hint.is-bad { color: var(--df-bad); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.df-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.df-grid .span2 { grid-column: span 2; }
.df-field label { display: block; font-size: 12px; font-weight: 600; color: #3E4650; margin-bottom: 5px; }
.df-field label .req { color: var(--df-bad); }
.df-field .hint { display: block; font-size: 11.5px; color: var(--df-faint); margin-top: 4px; }
.df-field input[type=text], .df-field input[type=number], .df-field input[type=date], .df-field select, .df-field textarea {
  width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid rgba(15,58,58,.25); border-radius: 6px;
  background: var(--df-surface); font-family: var(--df-ctl); font-size: 13.5px; color: var(--df-ink);
}
.df-field textarea { min-height: 76px; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
.df-field input:focus, .df-field select:focus, .df-field textarea:focus { outline: 0; border-color: var(--df-teal); box-shadow: 0 0 0 3px rgba(15,184,162,.15); }
.df-field input:disabled, .df-field select:disabled { background: #F3F5F7; color: var(--df-faint); cursor: not-allowed; }
.df-field.is-ai input, .df-field.is-ai select, .df-field.is-ai .searchable-select { box-shadow: 0 0 0 2px var(--df-violet-s); border-color: #C4B5FD; }

.df-dv { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.df-dv span { font-size: 11.5px; color: var(--df-muted); padding: 3px 9px; border-radius: 6px; background: var(--df-line-2); }
.df-dv b { color: var(--df-ink); font-family: "IBM Plex Mono", monospace; }

/* ── Chips ───────────────────────────────────────────────────────────────── */
.df-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.df-chip { display: inline-flex; align-items: center; gap: 5px; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--df-line-2); color: #1F2937; }
.df-chip button { border: 0; background: transparent; color: var(--df-muted); cursor: pointer; padding: 0; line-height: 1; font-size: 11px; }
.df-chip button:hover { color: var(--df-bad); }
.df-chip.is-sub { background: var(--df-soft); color: var(--df-teal-dk); font-family: var(--df-sans); font-size: 12px; }
.df-chip.is-ex { background: #FEF2F2; color: #991B1B; }
.df-chip-in { min-width: 150px; flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--df-ctl); font-size: 13px; padding: 4px 2px; color: var(--df-ink); }
.df-chipbox { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 5px 8px; border: 1px solid rgba(15,58,58,.25); border-radius: 6px; background: var(--df-surface); }
.df-chipbox:focus-within { border-color: var(--df-teal); box-shadow: 0 0 0 3px rgba(15,184,162,.15); }
/* A sheet can bring hundreds of chips into one topic; scroll inside the box so the step stays usable. */
.df-chipbox { max-height: 240px; overflow-y: auto; }

/* ── Topics ──────────────────────────────────────────────────────────────── */
.df-topic { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 10px; padding: 12px 14px; }
.df-topic-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.df-topic-h i { width: 8px; height: 8px; border-radius: 2px; background: var(--df-teal); flex: none; }
.df-topic-h b { font-size: 13.5px; font-weight: 700; }
.df-topic-h .n { font-size: 11.5px; color: var(--df-muted); }
.df-topic-h .sp { flex: 1; }
.df-topic-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 5px 0; }
.df-topic-row > label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--df-muted); padding-top: 6px; font-weight: 600; }
.df-topic.is-ex .df-topic-h i { background: var(--df-bad); }

/* ── AI assistant ────────────────────────────────────────────────────────── */
.df-ai { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; padding: 14px 16px; }
.df-ai-h { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 11px; }
.df-ai-h .bi { font-size: 17px; color: var(--df-violet); flex: none; margin-top: 1px; }
.df-ai-h b { display: block; font-size: 13.5px; }
.df-ai-h span { font-size: 12.5px; color: var(--df-muted); }
.df-ai-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.df-ai-row .df-ai-in { flex: 1; min-width: 240px; position: relative; }
.df-ai-row input { width: 100%; height: 34px; padding: 0 30px 0 10px; border: 1px solid rgba(15,58,58,.25); border-radius: 6px; font-family: var(--df-ctl); font-size: 13.5px; }
.df-ai-row input:focus { outline: 0; border-color: var(--df-violet); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.df-ai-row .clr { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--df-muted); cursor: pointer; }
.df-ai-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 11px; padding: 10px 12px; border-radius: 8px; background: var(--df-violet-s); border: 1px solid #DDD6FE; font-size: 12.5px; color: #3B2A6B; }
.df-ai-note .bi { color: var(--df-violet); flex: none; margin-top: 1px; }
.df-ai-note div { flex: 1; }
.df-ai-note.is-bad { background: #FEF2F2; border-color: #FECACA; color: #7F1D1D; }
.df-ai-note.is-bad .bi { color: var(--df-bad); }

/* ── Filters ─────────────────────────────────────────────────────────────── */
.df-fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.df-fgroup { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; padding: 12px 14px; }
.df-fgroup h4 { margin: 0 0 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--df-muted); }
.df-fgroup .df-field { margin-bottom: 10px; }
.df-fgroup .df-field:last-child { margin-bottom: 0; }
.df-ftb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.df-ftb > b { font-weight: 700; }
.df-fchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 14px; background: var(--df-soft); color: var(--df-teal-dk); }
.df-fchip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; line-height: 1; font-size: 11px; }
.df-ftb a { color: var(--df-teal-dk); cursor: pointer; font-weight: 600; }

/* ── Buckets ─────────────────────────────────────────────────────────────── */
.df-brow { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--df-line-2); font-size: 12.5px; }
.df-brow:first-of-type { border-top: 0; }
.df-brow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-brow span { color: var(--df-muted); white-space: nowrap; }
.df-brow .df-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--df-line-2); color: #3E4650; }
.df-brow-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  font-weight: 600; color: var(--df-ink); text-decoration: none; }
/* .df-brow span is muted for the metadata columns; the name must not inherit that. */
.df-brow-name span { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-bfilters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -2px; }
.df-bfilters-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--df-muted); margin-right: 2px; }
.df-brow .df-fchip { white-space: normal; max-width: 100%; font-size: 11.5px; padding: 2px 8px; border-radius: 10px;
  background: var(--df-line-2); color: #3E4650; overflow-wrap: anywhere; }
.df-fchip b { font-weight: 600; margin-right: 3px; }
.df-brow .df-bfilters-none { font-size: 11.5px; font-style: italic; }
.df-brow-name i { flex: none; font-size: 10.5px; color: var(--df-faint); }
.df-brow-name:hover, .df-brow-name:hover i { color: var(--df-teal-dk); }
.df-brow-name:hover span { text-decoration: underline; }
.df-brow-name:focus-visible { outline: 2px solid var(--df-teal); outline-offset: 3px; border-radius: 4px; }
.df-brow button.lnk { border: 0; background: transparent; color: var(--df-teal-dk); cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 0; }

/* ── Job progress ────────────────────────────────────────────────────────── */
.df-job { border: 1px solid var(--df-line); border-radius: 12px; background: var(--df-surface); padding: 12px 14px; }
.df-job-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.df-job-h span { display: inline-flex; align-items: center; gap: 9px; }
.df-job-h i.live { width: 8px; height: 8px; border-radius: 50%; background: var(--df-teal); box-shadow: 0 0 0 3px rgba(15,184,162,.18); }
.df-job-t { height: 7px; border-radius: 4px; background: var(--df-line-2); overflow: hidden; margin: 10px 0 8px; }
.df-job-t i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--df-teal), #35D6C1); transform-origin: left center; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.df-job-p { display: flex; gap: 16px; font-size: 11.5px; color: var(--df-faint); flex-wrap: wrap; }
.df-job-p span.is-done { color: var(--df-teal); }
.df-job-p span.is-now { color: var(--df-ink); font-weight: 700; }
.df-job-p em { margin-left: auto; font-style: normal; color: var(--df-muted); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.df-tablewrap { overflow: auto; background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; }
.df-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.df-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--df-muted); padding: 9px 10px; border-bottom: 1px solid var(--df-line); background: #FAFBFC; position: sticky; top: 0; z-index: 1; font-weight: 700; }
.df-table th.is-sortable { cursor: pointer; }
.df-table td { padding: 8px 10px; border-bottom: 1px solid var(--df-line-2); vertical-align: middle; }
.df-table tbody tr:hover td { background: var(--df-hover); }
.df-table td.n { text-align: right; }
.df-table td.nm { min-width: 220px; max-width: 340px; }
.df-table td.nm a { display: block; font-weight: 600; color: var(--df-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.df-table td.nm a:hover { color: var(--df-teal-dk); }
.df-table td.nm small { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--df-faint); }
.df-table .df-thumb { width: 56px; height: 32px; border-radius: 4px; object-fit: cover; background: var(--df-line-2); display: block; }
.df-table .df-thumb.is-round { width: 30px; height: 30px; border-radius: 50%; }
/* A video deleted or made private on YouTube: an explicit tile rather than
   YouTube's grey "•••" placeholder, and a muted row, when the user opts to see them. */
.df-table .df-thumb--gone { display: inline-flex; align-items: center; justify-content: center; font-size: .56rem;
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7686; background: #f3f5f8;
  border: 1px dashed #c9d1dc; }
.df-table tr.is-gone td { color: #7a8594; }
.df-table tr.is-gone td a { color: inherit; }
.df-qc { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--df-line-2); color: #3E4650; }
.df-qc.is-wl { background: #DCFCE7; color: #15803D; }
.df-qc.is-bl { background: #FEE2E2; color: #B91C1C; }
.df-score { display: inline-block; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 5px; background: var(--df-soft); color: var(--df-teal-dk); }
.df-score.is-mid { background: #FEF3C7; color: #92400E; }
.df-score.is-lo { background: var(--df-line-2); color: var(--df-muted); }
.df-reason { display: block; color: var(--df-faint); font-size: 11px; white-space: normal; max-width: 170px; }
.df-pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px 0; font-size: 12.5px; color: var(--df-muted); }
.df-pager span.b { display: flex; gap: 6px; }

/* ── States ──────────────────────────────────────────────────────────────── */
.df-empty { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; padding: 40px 24px; text-align: center; }
.df-empty .bi { font-size: 24px; color: var(--df-faint); }
.df-empty h3 { font-size: 15px; font-weight: 700; margin: 12px 0 4px; }
.df-empty p { font-size: 13px; color: var(--df-muted); margin: 0 auto 14px; max-width: 56ch; }
.df-skel { background: var(--df-surface); border: 1px solid var(--df-line); border-radius: 12px; overflow: hidden; }
.df-skel div { height: 44px; border-top: 1px solid var(--df-line-2); display: flex; align-items: center; padding: 0 14px; }
.df-skel div:first-child { border-top: 0; }
.df-skel span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--df-line-2) 25%, #F5F7F9 37%, var(--df-line-2) 63%); background-size: 400% 100%; animation: df-shim 1.4s ease infinite; }
@keyframes df-shim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.df-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; }
.df-alert.is-warn { background: #FFF7ED; border: 1px solid #FED7AA; color: #7C2D12; }
.df-alert.is-bad { background: #FEF2F2; border: 1px solid #FECACA; color: #7F1D1D; }
.df-alert.is-ok { background: var(--df-soft); border: 1px solid #BDEBE3; color: #0B5F55; }
.df-alert .bi { flex: none; margin-top: 1px; }
.df-alert div { flex: 1; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.df-modal-scrim { position: fixed; inset: 0; background: rgba(20,26,34,.4); z-index: 1050; }
.df-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1051; width: min(560px, 92vw); max-height: 80vh; background: var(--df-surface); border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden; }
.df-modal-h { padding: 16px 20px 10px; border-bottom: 1px solid var(--df-line); }
.df-modal-h b { font-size: 15px; }
.df-modal-h span { display: block; font-size: 12.5px; color: var(--df-muted); }
.df-modal-b { padding: 12px 20px; overflow: auto; }
.df-modal-f { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--df-line); font-size: 12.5px; color: var(--df-muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1300px) {
  .df-dash { grid-template-columns: 280px repeat(2, minmax(0,1fr)); }
  .df-dash .df-wide-4 { grid-column: span 2; }
  .df-fgrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .df-fgroup--wide .df-fgroup-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .df-dash { grid-template-columns: 1fr 1fr; }
  .df-dash .df-ready { grid-row: auto; grid-column: span 2; }
  .df-dash .df-wide-2, .df-dash .df-wide-4 { grid-column: span 2; }
  .df-fgrid, .df-grid { grid-template-columns: 1fr; }
  .df-fgroup--wide .df-fgroup-fields { grid-template-columns: 1fr; }
  .df-grid .span2 { grid-column: span 1; }
  .df-wz { top: 20px; bottom: 20px; left: 12px; transform: none; width: calc(100vw - 24px); }
  .df-stepper { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .db-df *, .db-df *::before, .db-df *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── Bulk Context import (stepper Step 2) ────────────────────────────────── */
.df-ctx-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.df-ctx-sp { flex: 1 1 auto; }
.df-hidden-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.df-ctx-hint { margin: 8px 0 0; font-size: 12px; color: var(--df-muted); max-width: 72ch; line-height: 1.55; }
.df-ctx-hint b { color: var(--df-ink); font-weight: 700; }

.df-import { margin-top: 14px; border: 1px solid var(--df-line); border-radius: 12px;
  background: var(--df-surface); overflow: hidden;
  box-shadow: 0 10px 24px -18px rgba(20,26,34,.5); }
.df-import-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border-bottom: 1px solid var(--df-line-2); background: var(--df-hover); font-size: 13px; }
.df-import-h .bi { color: var(--df-teal-dk); }
.df-import-h .n { margin-left: auto; color: var(--df-muted); font-size: 12px;
  font-variant-numeric: tabular-nums; }

.df-import-counts { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 14px 4px; }
.df-import-counts span { font-size: 12px; color: var(--df-muted); }
.df-import-counts b { display: block; font-size: 19px; line-height: 1.2; color: var(--df-ink);
  font-variant-numeric: tabular-nums; }

.df-import-list { list-style: none; margin: 8px 0 0; padding: 0 14px; }
.df-import-list li { display: flex; align-items: baseline; gap: 7px; padding: 3px 0;
  font-size: 12.5px; color: var(--df-ink); }
.df-import-list .bi { color: var(--df-teal-dk); font-size: 12px; }
.df-import-list li.is-warn { color: #7C2D12; }
.df-import-list li.is-warn .bi { color: var(--df-warn); }
.df-import-list b { font-variant-numeric: tabular-nums; }

.df-import-after { margin: 10px 14px 0; padding: 9px 12px; border-radius: 9px;
  background: var(--df-soft); color: #0B5F55; font-size: 12.5px; }
.df-import-after b { font-variant-numeric: tabular-nums; }

.df-import-why { margin: 10px 14px 0; font-size: 12px; color: var(--df-muted); }
.df-import-why summary { cursor: pointer; color: var(--df-teal-dk); font-weight: 600; }
.df-import-why div { padding: 3px 0 0 14px; }

.df-import-act { display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  margin-top: 12px; border-top: 1px solid var(--df-line-2); background: var(--df-hover); }
.df-import-note { margin: 0; padding: 0 14px 12px; font-size: 12px; color: var(--df-muted); }

.df-fgroup--wide { grid-column: 1 / -1; }
.df-fgroup--wide .df-fgroup-fields {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 14px; align-items: start;
}
.df-fgroup--wide .df-fgroup-fields .df-field { margin-bottom: 10px; }

/* Group subtitle — used by the QC group to say what separates it from the AI one. */
.df-fgroup-sub { margin: -4px 0 10px; font-size: 11.5px; color: var(--df-muted); line-height: 1.5; }
.df-fgroup-sub b { color: var(--df-ink); font-weight: 700; }
.df-fhint { margin: 4px 0 0; font-size: 11px; color: var(--df-faint); line-height: 1.45; }

/* Placement Videos: why the video matched — tactic above, keywords beneath. */
.df-ctxcell { max-width: 230px; }
.df-ctxtopic { display: block; font-weight: 600; font-size: 12px; color: var(--df-ink); }
.df-ctxcell small { display: block; font-size: 11px; color: var(--df-muted); line-height: 1.4;
  overflow-wrap: anywhere; }

/* ── Bucket tree + Refresh ───────────────────────────────────────────────── */
.df-btools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.df-btools .sp { flex: 1; }
.df-bsum { font-size: 12.5px; color: var(--df-muted); }
.df-bsum b { color: var(--df-ink, inherit); font-variant-numeric: tabular-nums; }
.df-bname { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.df-chev { border: 0; background: transparent; padding: 2px 4px; line-height: 1; cursor: pointer; color: var(--df-muted); border-radius: 4px; }
.df-chev:hover { background: var(--df-line-2); }
.df-chev:focus-visible { outline: 2px solid var(--df-accent, #0FB8A2); outline-offset: 1px; }
.df-chev-gap { display: inline-block; width: 22px; flex: none; }
.df-brow.is-nested { border-left: 2px solid var(--df-line-2); padding-left: 8px; }
.df-later { font-style: normal; color: var(--df-muted); }
.df-spin { animation: df-spin .9s linear infinite; }
@keyframes df-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .df-spin { animation: none; } }

/* ── Placements / Placement Videos search + bucket filter ────────────────── */
.df-pfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.df-pfilter .df-ai-in { flex: 1 1 260px; min-width: 0; position: relative; }
.df-pfilter input { width: 100%; height: 34px; padding: 0 30px 0 10px; border: 1px solid rgba(15,58,58,.25); border-radius: 6px; font-family: var(--df-ctl); font-size: 13.5px; }
.df-pfilter input:focus { outline: 0; border-color: var(--df-accent, #0FB8A2); box-shadow: 0 0 0 3px rgba(15,184,162,.18); }
.df-pfilter .clr { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--df-muted); cursor: pointer; }
.df-sel { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--df-line); border-radius: 8px; background: #fff; max-width: 280px; min-width: 0; }
.df-bcell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bucket ID, locked-filter note, Placements header note */
.df-bid { font-family: var(--df-mono, ui-monospace, monospace); font-size: 11px; color: var(--df-muted); background: var(--df-line-2); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.df-bfilters-h .bi-lock-fill, .df-lock { font-size: 10px; opacity: .7; }
.df-pnote { margin: 0 0 10px; font-size: 12.5px; color: var(--df-muted); }
.df-pnote b { color: var(--df-ink); font-variant-numeric: tabular-nums; }

/* Default exclusions admin page */
.df-xpage { max-width: 880px; padding: 16px 22px 28px; }
.df-xpage textarea { width: 100%; min-height: 360px; font-family: var(--df-mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--df-line); border-radius: 8px; resize: vertical; }
.df-xpage textarea:focus { outline: 0; border-color: var(--df-accent, #0FB8A2); box-shadow: 0 0 0 3px rgba(15,184,162,.18); }
.df-xmeta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--df-muted); margin: 6px 0 10px; }
.df-xmeta b { color: var(--df-ink); font-variant-numeric: tabular-nums; }
.df-xbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.df-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.df-xbadge { display: inline-block; margin-bottom: 6px; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--df-line-2); color: var(--df-muted); }

.df-xsearch { margin: 4px 0 8px; }
.df-xsearch input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid rgba(15,58,58,.25); border-radius: 6px; font-family: var(--df-ctl); font-size: 13px; }
.df-xsearch input:focus { outline: 0; border-color: var(--df-accent, #0FB8A2); box-shadow: 0 0 0 3px rgba(15,184,162,.18); }
.df-xbadge--chg { background: #FDF3DF; color: #8A5A00; margin-left: 6px; }
.df-chip.is-removed { background: #FDF3DF; color: var(--df-muted); text-decoration: line-through; }
.df-chip.is-removed button { text-decoration: none; }
