/* ============================================================
   Lead Finder
   ============================================================ */
.lf-filter-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
@media (max-width: 768px) {
  .lf-filter-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   Inline-Style Migration 2026 — Zero Inline Styles Policy
   All classes use design tokens only. No raw values.
   ═══════════════════════════════════════════════════════════ */

/* ── Visibility ──────────────────────────────────────────── */
.hidden               { display: none !important; }
.visually-hidden-input { display: none; }

/* ── Typography reset for tab-bar page headings ──────────── */
.page-tab-title { margin: 0; font: var(--k-text-h1); }

/* ── Spacing utilities (4px grid steps) ────────────────────  */
.mt-20      { margin-top: 20px; }
.mt-24      { margin-top: 24px; }
.card-mt    { margin-top: 16px; }
.card-mt-24 { margin-top: 24px; }

/* ── Loading placeholder text ────────────────────────────── */
.card-body-loading { padding: 24px; color: var(--k-text-secondary); }
.text-muted        { color: var(--k-text-secondary); }
.text-success      { color: var(--k-success)   !important; }
.text-warning      { color: var(--k-warning)   !important; }
.text-error        { color: var(--k-error)     !important; }

/* ── Bulk-action toolbar (campaigns) ────────────────────── */
.camp-bulk-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--k-surface-raised); border-radius: var(--k-radius-md); margin-bottom: 12px; flex-wrap: wrap; }

/* ── A/Z select wrap ────────────────────────────────────── */
.opt-az-select-wrap { margin-top: 8px; }

/* ── IEP preview iframe ─────────────────────────────────── */
.iep-preview-iframe { width: 100%; border: 0; display: block; }

/* ── IEP body — deliverability mode ────────────────────── */
.iep-body--deliv { background: #fff !important; padding: 0 !important; }

/* ── Postback URL box ───────────────────────────────────── */
.pb-url-label { font-size: 12px; font-weight: 500; color: var(--md-sys-color-on-surface-variant, #49454f); margin-bottom: 4px; }
.pb-url-code  { display: block; padding: 10px 12px; background: var(--md-sys-color-surface-container, #f3edf7); border-radius: var(--k-radius-sm); font-size: 12px; word-break: break-all; color: var(--md-sys-color-on-surface, #1d1b20); line-height: 1.5; }
.pb-url-copy-btn { margin-top: 8px; font-size: 12px; }
.pb-save-btn { margin-top: 8px; }

/* ── Table: icon-button action cell ─────────────────────── */
.table-row-actions { display: flex; gap: 4px; align-items: center; }

/* ── Full-width form textarea ───────────────────────────── */
.form-textarea {
  width: 100%; margin-top: 16px; padding: 12px;
  border: 1px solid var(--k-border); border-radius: var(--k-radius-md);
  font: var(--k-text-body); resize: vertical;
}

/* ── Campaign / page toolbar strip ─────────────────────── */
.cd-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.leads-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; flex-wrap: wrap;
}

/* ── Leads page (Instantly-spec) ────────────────────────── */
.lead-page { display: flex; flex-direction: column; }
.lead-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.lead-toolbar-left { display: flex; align-items: center; gap: 12px; }
.lead-toolbar-right { display: flex; align-items: center; gap: 10px; }
.lead-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--k-border); border-radius: var(--k-radius-sm);
  padding: 8px 14px; min-width: 220px; background: transparent;
}
.lead-search .material-symbols-outlined { font-size: 20px; color: var(--k-text-secondary); }
.lead-search input {
  border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--k-text); width: 100%;
}
.lead-search input::placeholder { color: var(--k-text-muted); }
.lead-filter-btn {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--k-border); border-radius: var(--k-radius-sm);
  padding: 8px 16px; background: transparent;
  font-size: 14px; font-weight: 500; color: var(--k-text);
  cursor: pointer; white-space: nowrap;
}
.lead-filter-btn .material-symbols-outlined { font-size: 18px; color: var(--k-text-secondary); }
.lead-filter-btn:hover { background: var(--k-surface-hover); }
.lead-import-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--k-cta); color: #fff; border: none;
  border-radius: var(--k-radius-sm); padding: 10px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.lead-import-btn .material-symbols-outlined { font-size: 18px; }
.lead-import-btn:hover { background: var(--k-cta-hover); }
.lead-table-wrap {
  border: 1px solid var(--k-border); border-radius: var(--k-radius-md);
  overflow: hidden; background: var(--k-surface);
}
.lead-provider-cell { display: flex; align-items: center; gap: 8px; }
.leads-preview-count { font: var(--k-text-label); margin: 12px 0 8px; }
.leads-preview-more  { font: var(--k-text-small); color: var(--k-text-tertiary, var(--k-text-secondary)); }

@media (max-width: 768px) {
  .lead-toolbar { flex-direction: column; align-items: stretch; }
  .lead-toolbar-right { flex-wrap: wrap; }
  .lead-search { min-width: unset; }
}

/* ── Stat row flex-fill ─────────────────────────────────── */
.cd-stat-row { flex: 1; }

/* ── Inline stat chip ───────────────────────────────────── */
.cd-stat-item {
  display: inline-flex; align-items: center;
  gap: 4px; margin-right: 16px; font: var(--k-text-label);
  font-variant-numeric: tabular-nums;
  background: var(--k-surface-sunken); padding: 4px 10px;
  border-radius: var(--k-radius-full);
}

/* ── Provider icon + text row ───────────────────────────── */
.provider-wrap { display: inline-flex; align-items: center; gap: 6px; }

/* ── Campaign detail: tab footer actions ───────────────── */
.cd-tab-actions {
  display: flex; gap: 12px; margin-top: 24px;
  padding-top: 24px; border-top: 1px solid var(--k-border-light);
}

/* ── Campaign detail pane ───────────────────────────────── */
.cd-content             { padding: 0; }
.cd-hdr-title           { margin: 0; font-size: 24px; font-weight: 700; color: var(--k-text); line-height: 1.2; }
.campaign-header-bar    { gap: 12px; padding-bottom: 8px; }
.campaign-header-bar .cd-hdr-status { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; font-size: 13px; color: var(--k-text-secondary); }
.campaign-status-row-detail { padding: 6px 0 18px; gap: 12px; font-size: 13px; color: var(--k-text-secondary); }
.campaign-status-row-detail:empty { display: none; padding: 0; }

/* ── Split panel panes ──────────────────────────────────── */
.split-left  { overflow-y: auto; }
.split-right { padding: 24px; }

/* ── Schedule tab ────────────────────────────────────────── */
.schedule-hdr-block { padding: 16px; border-bottom: 1px solid var(--k-border-light); }
.schedule-hdr-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.schedule-hdr-row:last-child { margin-bottom: 0; }
.schedule-date-val  { color: var(--k-primary); margin-left: auto; }
.schedule-hdr-label { font-size: 13px; color: var(--k-text-secondary); }
.schedule-hdr-row--edit { cursor: default; }
.schedule-date-input {
  border: 1px solid var(--k-border); border-radius: 4px;
  padding: 2px 6px; font-size: 13px; color: var(--k-text);
  background: var(--k-surface); outline: none;
  margin-left: auto;
}
.schedule-date-edit-btn {
  background: none; border: none; cursor: pointer;
  color: var(--k-text-secondary); font-size: 16px; line-height: 1;
  padding: 0 4px; opacity: 0.5;
}
.schedule-date-edit-btn:hover { opacity: 1; }
.schedule-item-row  { padding: 14px 20px; }
.schedule-item-name { flex: 1; }
.schedule-sec-hd    { font-size: 20px; font-weight: 600; color: var(--k-text-secondary); margin-bottom: 12px; }
.schedule-sec-hd-mt { font-size: 20px; font-weight: 600; color: var(--k-text-secondary); margin: 20px 0 12px; }
.schedule-section-card {
  border: 0.8px solid rgba(0,0,0,0.1); border-radius: var(--k-radius-sm);
  padding: 27px 28px 31px; margin-top: 16px;
}
.schedule-section-card:first-child { margin-top: 0; }
.schedule-input {
  width: 100%; border: 0.8px solid var(--k-border); border-radius: var(--k-radius-sm);
  padding: 16px 24px; font-size: 16px; outline: none;
}
.schedule-input:focus { border-color: var(--k-instant-blue); }

/* ── Days picker ─────────────────────────────────────────── */
.days-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Option Enable/Disable button pair ──────────────────── */
.opt-btn-pair { display: flex; gap: 0; }
.opt-btn-pair .opt-btn {
  height: 44px; padding: 0 20px; font: var(--k-text-label); font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--k-border); background: var(--k-surface); color: var(--k-text);
  transition: all var(--k-dur-normal) var(--k-ease);
}
.opt-btn-pair .opt-btn:first-child { border-radius: 8px 0 0 8px; }
.opt-btn-pair .opt-btn:last-child  { border-radius: 0 8px 8px 0; border-left: none; }
.opt-btn-pair .opt-btn:hover { border-color: var(--k-primary); color: var(--k-primary); background: var(--k-primary-light); }
.opt-btn-pair .opt-btn.active-enable  { background: var(--k-success); color: #fff; border-color: var(--k-success); }
.opt-btn-pair .opt-btn.active-disable { background: var(--k-text); color: #fff; border-color: var(--k-text); }

/* ── Option card instantly-style overrides ───────────────── */
.option-card {
  background: transparent; border: 1px solid var(--k-border);
  border-radius: var(--k-radius-sm); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 12px;
}
.option-card .option-title { font-size: 16px; font-weight: 600; color: var(--k-text); margin-bottom: 4px; }
.option-card .option-desc  { font-size: 14px; font-weight: 400; color: var(--k-text-secondary); }

/* ── Chart bordered wrapper ─────────────────────────────── */
.chart-bordered-wrap {
  border: 1px solid var(--k-border); border-radius: var(--k-radius-md);
  padding: 20px 24px; margin-top: 20px; background: var(--k-surface);
}
.chart-bordered-wrap .chart-legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-bottom: 14px; font-size: 12px; color: var(--k-text-secondary);
}
.chart-bordered-wrap .chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-bordered-wrap .chart-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chart-bordered-wrap .chart-svg { height: 240px; width: 100%; display: block; }
.chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 200px; gap: 8px; color: var(--k-text-secondary);
}
.chart-empty .material-symbols-outlined { font-size: 36px; color: var(--k-text-tertiary, #b7bcc6); }
.chart-empty-title { font-size: 14px; font-weight: 500; color: var(--k-text); }
.chart-empty-desc  { font-size: 12px; color: var(--k-text-secondary); }

/* ── Step analytics bordered section ────────────────────── */
.step-analytics-section {
  border: 1px solid var(--k-border); border-radius: var(--k-radius-md);
  padding: 12px 28px; margin-top: 20px;
}
.step-analytics-section h3 {
  font-size: 16px; font-weight: 700; color: var(--k-text);
  padding: 12px 0; margin: 0;
}
.step-analytics-section table th {
  font-size: 16px; font-weight: 700; color: var(--k-text);
  text-transform: none; padding: 24px 0 12px;
}
.step-analytics-section table td {
  font-size: 16px; font-weight: 400; color: var(--k-text);
  padding: 20px 0;
}

/* ── Leads stats row (instantly-style inline numbers) ──── */
.lead-stats-inline {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.lead-stats-inline .lead-stat {
  display: flex; align-items: center; gap: 5px;
  font-size: 14px; color: var(--k-text);
  padding: 4px 10px; border-radius: var(--k-radius-xl);
  background: var(--k-surface); border: 1px solid var(--k-border);
}
.lead-stats-inline .lead-stat .material-symbols-outlined {
  font-size: 14px; color: var(--k-text-secondary);
}
.lead-stats-inline .lead-stat strong { font-weight: 700; font-size: 14px; }
.lead-stats-inline .lead-stat span  { font-weight: 400; color: var(--k-text-secondary); font-size: 12px; }
.lead-stats-inline .lead-stat--hi   { border-color: var(--k-green); background: #f0fdf4; }
.lead-stats-inline .lead-stat--hi .material-symbols-outlined { color: var(--k-success-mid); }
.lead-stats-inline .lead-stat--warn { border-color: var(--k-warning); background: #fffbeb; }
.lead-stats-inline .lead-stat--warn .material-symbols-outlined { color: var(--k-amber-dark); }

/* ── Email/name cell ─────────────────────────────────────── */
.lead-email-cell { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.lead-email-main { display: flex; align-items: center; gap: 6px; }
.lead-name-sub   { font-size: 11px; color: var(--k-text-secondary); padding-left: 20px; }

/* ── ESP provider mini icon ──────────────────────────────── */
.lead-esp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.lead-esp.google    { background: #fff; border: 1px solid #e5e7eb; }
.lead-esp.microsoft { background: #fff; border: 1px solid #e5e7eb; }
.lead-esp.yahoo     { background: #6001d2; color: #fff; }
.lead-esp.zoho      { background: #e42527; color: #fff; }
.lead-esp.custom    { background: #f5f3ff; border: 1px solid #c4b5fd; }

/* ── Company cell with country flag ─────────────────────── */
.lead-company-cell { display: flex; align-items: center; gap: 6px; }
.lead-country-flag { font-size: 14px; flex-shrink: 0; }

/* ── Step badge ──────────────────────────────────────────── */
.lead-step-badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  color: var(--k-primary); background: #eef2ff; border-radius: 10px;
  padding: 2px 8px; white-space: nowrap;
}

/* ── Last sent cell ──────────────────────────────────────── */
.lead-sent-cell   { display: flex; flex-direction: column; }
.lead-sent-rel    { font-size: 13px; color: var(--k-text-secondary); white-space: nowrap; }

/* ── dim placeholder ─────────────────────────────────────── */
.text-muted-dim   { color: var(--k-border); font-size: 13px; }

/* ── Drawer improvements ─────────────────────────────────── */
.lead-drawer-hd { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--k-border); }
.lead-drawer-hd-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lead-drawer-hd h3 { margin: 0; font-size: 16px; color: var(--k-text); word-break: break-all; }
.lead-drawer-subname { font-size: 13px; color: var(--k-text-secondary); }
.lead-drawer-section-title { margin: 20px 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--k-text-secondary); }
.lead-drawer-section-title:first-child { margin-top: 0; }
.lead-drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 8px; }
.lead-drawer-field { display: flex; flex-direction: column; gap: 2px; }
.lead-drawer-field-label { font-size: 11px; color: var(--k-text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }
.lead-drawer-field-val { font-size: 14px; color: var(--k-text); word-break: break-word; }

/* ── Leads table instantly-style headers ─────────────────── */
.leads-table-instantly th {
  font-size: 11px; font-weight: 400; color: var(--k-text-secondary);
  text-transform: uppercase; letter-spacing: 0.44px;
  padding: 10px 8px; border-bottom: 0.8px solid var(--k-border);
}
.leads-table-instantly td {
  font-size: 14px; font-weight: 400; color: var(--k-text);
  padding: 12px 8px; border-bottom: 0.8px solid var(--k-border);
}

/* ── Options footer actions ──────────────────────────────── */
.options-footer {
  display: flex; justify-content: center; gap: 16px;
  padding: 24px 0; margin-top: 24px;
}
.options-footer .btn-save-outline {
  height: 44px; border: 1.5px solid var(--k-primary); border-radius: var(--k-radius-sm);
  padding: 0 32px; font: var(--k-text-label); font-size: 14px; font-weight: 600;
  color: var(--k-primary); background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--k-dur-normal) var(--k-ease);
  white-space: nowrap;
}
.options-footer .btn-save-outline:hover { background: var(--k-primary-light); border-color: var(--k-primary); }
.options-footer .btn-pause-red {
  height: 44px; border: none; border-radius: var(--k-radius-sm);
  padding: 0 32px; font: var(--k-text-label); font-size: 14px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--k-dur-normal) var(--k-ease);
  box-shadow: var(--k-shadow-error); white-space: nowrap;
}
.options-footer .btn-pause-red:hover { box-shadow: 0 6px 20px rgba(239,68,68,0.35); transform: translate3d(0,-1px,0); }

/* ── S2S Postback Config Section ───────────────────────── */
.postback-section {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--md-sys-color-outline-variant, #cac4d0);
}
.postback-section h3 { display: flex; align-items: center; gap: 8px; }
.postback-section h3 .material-symbols-outlined { font-size: 20px; color: var(--md-sys-color-primary, #6750a4); }
.postback-url-box { margin: 12px 0; }

/* ── Advanced toggle button ────────────────────────────── */
.btn-adv-toggle {
  height: 44px; border-radius: var(--k-radius-sm); padding: 0 20px;
  font: var(--k-text-label); font-size: 14px; font-weight: 600; color: var(--k-text-secondary);
  background: var(--k-surface-sunken); border: 1.5px solid var(--k-border);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  margin: 16px 0; transition: all var(--k-dur-normal) var(--k-ease);
}
.btn-adv-toggle:hover { background: var(--k-surface-hover); border-color: var(--k-text-secondary); color: var(--k-text); }

