/* ============================================================
   CLAY TABLE — Pixel-perfect Clay.com design system
   ============================================================ */

/* ── Layout overrides when on leads table page ─────────────── */
body.page-leads-table .modules-pipeline { display: none !important; }
body.page-leads-table .content {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
body.page-leads-table .main {
  overflow: hidden !important;
}

/* ── Workspace shell ────────────────────────────────────────── */
.clay-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #111827;
  overflow: hidden;
}

/* ── Top toolbar ────────────────────────────────────────────── */
.clay-topbar {
  height: 42px;
  border-bottom: 1px solid #E0D5C5;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 4px;
  flex-shrink: 0;
  background: #FFFFFF;
  overflow-x: auto;
  overflow-y: hidden;
}
.clay-topbar::-webkit-scrollbar { display: none; }

.clay-pill-btn {
  height: 26px;
  padding: 0 9px;
  border: 1px solid #E0D5C5;
  border-radius: 5px;
  background: #FFFFFF;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}
.clay-pill-btn:hover { background: #F5F0E8; }
.clay-pill-btn:active { background: #EDE5D8; }

.clay-topbar-sep {
  width: 1px;
  height: 18px;
  background: #E0D5C5;
  flex-shrink: 0;
}
.clay-topbar-spacer { flex: 1; min-width: 8px; }

/* Auto-run toggle */
.clay-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0 4px;
}
.clay-toggle-sw {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #D1D5DB;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.clay-toggle-sw.on { background: #D4642A; }
.clay-toggle-sw::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.clay-toggle-sw.on::after { left: 14px; }

/* Special buttons */
.clay-sculptor-btn {
  background: transparent;
  border-color: #D4642A;
  color: #D4642A;
}
.clay-sculptor-btn:hover { background: rgba(212, 100, 42, 0.10); }

.clay-tools-btn {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #BE123C;
}
.clay-tools-btn:hover { background: #FFE4E6; }

/* Instantly branded button */
.clay-instantly-btn {
  background: #F0F5FF;
  border-color: #B3D4FF;
  color: #0052CC;
  font-weight: 500;
  gap: 6px;
}
.clay-instantly-btn:hover {
  background: #DEEBFF;
  border-color: #4C9AFF;
}
.clay-instantly-btn:active {
  background: #B3D4FF;
}

/* ── Search bar ─────────────────────────────────────────────── */
.clay-search-bar {
  height: 38px;
  border-bottom: 1px solid #E0D5C5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #FFFFFF;
  flex-shrink: 0;
}
.clay-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #111827;
  font-family: inherit;
  background: transparent;
}
.clay-search-bar input::placeholder { color: #9CA3AF; }
.clay-search-close {
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  cursor: pointer;
  color: #9CA3AF;
  font-size: 13px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clay-search-close:hover { background: #F3F4F6; color: #374151; }

/* ── Table wrapper ──────────────────────────────────────────── */
.clay-table-wrap {
  flex: 1;
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}
#ct-table-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.clay-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.clay-table-wrap::-webkit-scrollbar-track { background: #F5F0E8; }
.clay-table-wrap::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }
.clay-table-wrap::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ── The grid ───────────────────────────────────────────────── */
.clay-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

/* ── Column headers ─────────────────────────────────────────── */
.clay-th {
  height: 36px;
  border: 1px solid #E0D5C5;
  background: #F5F0E8;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  padding: 0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  user-select: none;
  overflow: hidden;
}
.clay-th-inner {
  display: flex;
  align-items: center;
  padding: 0 8px;
  height: 36px;
  gap: 5px;
}
.clay-th-icon {
  font-size: 11px;
  color: #9CA3AF;
  font-style: normal;
  font-weight: 600;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  line-height: 1;
}
.clay-th-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.clay-th:hover { background: #EDE5D8; }

/* ── Column header menu button (···) ── */
.clay-th-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 4px;
  color: #6B7280;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  flex-shrink: 0;
  line-height: 1;
}
.clay-th:hover .clay-th-menu-btn {
  display: flex;
}
.clay-th-menu-btn:hover {
  background: #E5E7EB;
  color: #111827;
}

/* ── Unnamed column dot ── */
.clay-th-unnamed-dot {
  font-size: 8px;
  color: #F59E0B;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Column rename inline input ── */
.clay-th-rename-input {
  flex: 1;
  min-width: 0;
  height: 24px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: 1.5px solid #D4642A;
  border-radius: 3px;
  padding: 0 5px;
  outline: none;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}

/* Resize handle */
.clay-th-resize {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 1;
}
.clay-th-resize:hover { background: #D4642A; }

/* % enrichment row */
.clay-pct-row td {
  height: 22px;
  border: 1px solid #E0D5C5;
  background: #F5F0E8;
  padding: 0 8px;
  font-size: 11px;
  color: #9CA3AF;
  position: sticky;
  top: 36px;
  z-index: 9;
}

/* Number + checkbox merged header column */
.clay-th-num {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  background: #F5F0E8;
}

/* Enrichment progress bar */
.clay-col-bar {
  height: 2px;
  background: #E5E5E5;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.clay-col-bar-fill {
  height: 100%;
  background: #10B981;
  transition: width 0.4s ease;
}

/* ── AI enrichment column header ─────────────────────────── */
.clay-th-ai {
  background: #F5F0E8;
}
.clay-th-ai:hover { background: #EDE5D8; }

/* ── Formula checkbox column header ──────────────────────── */
.clay-th-formula {
  background: #F0FDF4;
}
.clay-th-formula:hover { background: #DCFCE7; }

.clay-th-formula-icon {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

/* ── Formula checkbox cells ───────────────────────────────── */
.clay-td-formula {
  background: #FAFFFE;
}
tr.clay-row:hover .clay-td-formula { background: #F0FDF4; }
tr.clay-row.clay-selected .clay-td-formula { background: #DCFCE7; }

.clay-cell-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.clay-cell-formula-err {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  font-size: 13px;
  color: #F59E0B;
}

.clay-fchk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
  line-height: 1;
}

/* ── Formula checkbox panel UI ───────────────────────────── */
.fcb-condition-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fcb-op-sel  { flex: 0 0 auto; min-width: 140px; }
.fcb-val-inp { flex: 1; }

.fcb-preview-wrap {
  margin-top: 16px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  overflow: hidden;
}
.fcb-preview-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
}
.fcb-preview-cells {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fcb-prev-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #374151;
}
.fcb-prev-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: #6B7280;
}

.clay-th-icon-ai {
  font-style: normal;
  font-size: 12px;
  color: #D4642A;
  flex-shrink: 0;
}

.clay-ai-run-btn {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid rgba(212,100,42,0.35);
  border-radius: 4px;
  background: rgba(212,100,42,0.10);
  color: #D4642A;
  font-size: 10px;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s;
  flex-shrink: 0;
}
.clay-th-ai:hover .clay-ai-run-btn { opacity: 1; }
.clay-ai-run-btn:hover { background: rgba(212,100,42,0.20); border-color: rgba(212,100,42,0.5); }

/* ── Context / run dropdown ───────────────────────────────── */
.clay-ctx-drop {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 200px;
  padding: 4px 0;
  overflow: visible;
}
#addcol-drop {
  min-width: 280px;
  width: auto;
  overflow: visible;
}
.clay-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}
.clay-ctx-item:hover { background: #F3F4F6; }
.clay-ctx-item.danger { color: #EF4444; }
.clay-ctx-item.danger:hover { background: #FEF2F2; }
.clay-ctx-group-label {
  padding: 6px 14px 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.clay-ctx-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 3px 0;
}

/* + Add column */
.clay-addcol-th {
  background: #FAFAFA;
  min-width: 130px;
  width: 130px;
  z-index: 10;
  border-left: 1px solid #E0D5C5;
}
.clay-addcol-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 36px;
  width: 100%;
  background: none;
  border: none;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.clay-addcol-btn:hover { background: #F3F4F6; color: #374151; }

/* ── Data rows ──────────────────────────────────────────────── */
.clay-td {
  height: 36px;
  min-width: 0;
  max-width: 240px;
  border: 1px solid #E0D5C5;
  background: #FFFFFF;
  padding: 0;
  vertical-align: middle;
  overflow: hidden;
  position: relative;
}
/* Pinned number+checkbox column must NOT inherit data-column min-width */
.clay-td.clay-td-num { min-width: unset; }
.clay-td-num {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  text-align: center;
  font-size: 11px;
  color: #C4C9D4;
  background: #FAFAFA;
  cursor: pointer;
  user-select: none;
}
.clay-td-num:hover { background: #F3F4F6; color: #6B7280; }

/* Row hover */
tr.clay-row:hover .clay-td { background: #F5F0E8; }
tr.clay-row:hover .clay-td-num { background: #EDE5D8; }

/* Row selected */
tr.clay-row.clay-selected .clay-td { background: #F5F0E8; }
tr.clay-row.clay-selected .clay-td-num { background: #EDE5D8; color: #C97D28; }

/* Cell selected (click) */
td.clay-td.cell-selected {
  outline: 2px solid #D4642A;
  outline-offset: -2px;
  z-index: 2;
}

/* Cell editing */
td.clay-td.cell-editing { padding: 0; overflow: visible; z-index: 5; }
td.clay-td.cell-editing input {
  width: 100%;
  height: 100%;
  border: 2px solid #D4642A;
  outline: none;
  padding: 0 7px;
  font-size: 13px;
  font-family: inherit;
  background: #FFFFFF;
  box-sizing: border-box;
}

/* ── Cell content ───────────────────────────────────────────── */
.clay-cell {
  display: flex;
  align-items: center;
  padding: 0 8px;
  height: 36px;
  gap: 5px;
  overflow: hidden;
}
.clay-cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #111827;
  flex: 1;
  min-width: 0;
}
.clay-cell-empty .clay-cell-text { color: #D1D5DB; }
.clay-cell-url { cursor: pointer; }
.clay-cell-url .clay-cell-text { color: #D4642A; }
.clay-cell-url:hover .clay-cell-text { text-decoration: underline; }

/* Status pills */
.clay-status-valid      { background: #DCFCE7; color: #166534; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-status-invalid    { background: #FEE2E2; color: #991B1B; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-status-unknown    { background: #FEF9C3; color: #854D0E; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-status-risky      { background: #FEF3C7; color: #92400E; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-status-verifying  { background: rgba(212,100,42,0.08); color: #D4642A; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }

/* Email verify / Find Email — shared radio group */
.ev-radio-group  { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ev-radio-label  { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #374151; cursor: pointer; }
.ev-radio-label input[type="radio"] { accent-color: #2563EB; cursor: pointer; }
.ev-radio-hint   { color: #9CA3AF; font-size: 11px; }

/* Find Email column header */
.clay-th-findemail { background: #F0F9FF !important; }
.clay-th-icon-fe   { font-size: 13px; flex-shrink: 0; }

/* Find Email panel — source column grid */
.fe-source-grid   { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.fe-source-row    { display: flex; align-items: center; gap: 8px; }
.fe-source-label  { font-size: 11px; color: #6B7280; min-width: 110px; flex-shrink: 0; }
.fe-src-sel       { flex: 1; font-size: 12px !important; padding: 4px 6px !important; height: auto !important; }

/* Find Email cell values */
.clay-fe-email    { color: #2563EB; text-decoration: none; font-size: 12px; }
.clay-fe-email:hover { text-decoration: underline; }
.clay-fe-notfound { color: #9CA3AF; font-style: italic; font-size: 12px; }

/* ── Bottom bar ─────────────────────────────────────────────── */
.clay-bottom-bar {
  height: 36px;
  border-top: 1px solid #E0D5C5;
  background: #F5F0E8;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.clay-bottom-tabs {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  gap: 4px;
  border-right: 1px solid #E0D5C5;
}
.clay-sheet-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: #FFFFFF;
  border: 1px solid #E0D5C5;
  color: #374151;
  white-space: nowrap;
  font-family: inherit;
}
.clay-sheet-tab.active {
  background: #F5F0E8;
  border-color: #E0D5C5;
  color: #C97D28;
}
.clay-add-tab-btn {
  height: 22px;
  padding: 0 7px;
  border: 1px solid #E0D5C5;
  border-radius: 3px;
  background: #FFFFFF;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  font-family: inherit;
}
.clay-add-tab-btn:hover { background: #F3F4F6; }
.clay-bottom-spacer { flex: 1; }
.clay-bottom-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-size: 12px;
  color: #6B7280;
  white-space: nowrap;
}
.clay-bottom-right {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  border-left: 1px solid #E0D5C5;
  height: 100%;
}
.clay-bottom-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid #E0D5C5;
  border-radius: 3px;
  background: #FFFFFF;
  font-size: 11px;
  color: #6B7280;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.clay-bottom-btn:hover { background: #F3F4F6; }
.clay-bottom-btn.danger { color: #EF4444; border-color: #FCA5A5; }
.clay-bottom-btn.danger:hover { background: #FEF2F2; }

/* ── CSV Import Modal ───────────────────────────────────────── */
.csv-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.csv-modal {
  background: #FFFFFF;
  border-radius: 12px;
  width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative;
}
.csv-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 0;
  position: relative;
  margin-bottom: 4px;
}
.csv-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.csv-modal-close, .csv-modal-back {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #E0D5C5;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 13px;
  top: 16px;
  font-family: inherit;
}
.csv-modal-close { right: 16px; }
.csv-modal-back  { left: 16px; }
.csv-modal-close:hover, .csv-modal-back:hover { background: #F3F4F6; }
.csv-modal-body { padding: 16px 20px; }

/* Dropzone */
.csv-dropzone {
  border: 1.5px dashed #D1D5DB;
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.csv-dropzone:hover, .csv-dropzone.dragging {
  border-color: #D4642A;
  background: rgba(212,100,42,0.06);
}
.csv-dropzone-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  color: #9CA3AF;
}
.csv-dropzone-text { font-size: 13px; color: #374151; }
.csv-dropzone-browse { color: #D4642A; text-decoration: underline; }

/* File selected state */
.csv-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F9FAFB;
  border: 1px solid #E0D5C5;
  border-radius: 8px;
}
.csv-file-name {
  flex: 1;
  font-size: 13px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.csv-remove-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #E0D5C5;
  border-radius: 4px;
  background: #FFFFFF;
  font-size: 11px;
  color: #6B7280;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.csv-remove-btn:hover { background: #FEF2F2; border-color: #FCA5A5; color: #991B1B; }

/* Form fields */
.csv-modal-form { margin-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.csv-form-row { display: flex; align-items: center; gap: 10px; }
.csv-form-label { font-size: 12px; color: #374151; font-weight: 500; width: 90px; flex-shrink: 0; }
.csv-form-select {
  flex: 1;
  height: 30px;
  border: 1px solid #E0D5C5;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  color: #374151;
  background: #FFFFFF;
  font-family: inherit;
}
.csv-form-select:focus { outline: none; border-color: #D4642A; }
.csv-form-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}
.csv-form-check input[type="checkbox"] { width: 14px; height: 14px; accent-color: #D4642A; cursor: pointer; }

/* Step 2 dest cards */
.csv-filename-banner {
  background: #F9FAFB;
  border: 1px solid #E0D5C5;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.csv-dest-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.csv-dest-card {
  border: 1.5px dashed #D1D5DB;
  border-radius: 8px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.csv-dest-card:hover, .csv-dest-card.selected {
  border-color: #D4642A;
  background: rgba(212,100,42,0.06);
}
.csv-dest-card-icon { width: 34px; height: 34px; color: #9CA3AF; }
.csv-dest-card:hover .csv-dest-card-icon,
.csv-dest-card.selected .csv-dest-card-icon { color: #D4642A; }
.csv-dest-card-label { font-size: 13px; font-weight: 500; color: #374151; }
.csv-dest-card:hover .csv-dest-card-label,
.csv-dest-card.selected .csv-dest-card-label { color: #D4642A; }

/* Step 3 importing */
.csv-importing {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.csv-spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid #E0D5C5;
  border-top-color: #D4642A;
  border-radius: 50%;
  animation: clay-spin 0.75s linear infinite;
}
@keyframes clay-spin { to { transform: rotate(360deg); } }
.csv-importing-text { font-size: 14px; color: #374151; }

/* Modal footer */
.csv-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid #E0D5C5;
}
.csv-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.csv-btn.primary { background: #D4642A; color: #FFFFFF; }
.csv-btn.primary:hover { background: #BF5420; }
.csv-btn.secondary { background: rgba(212,100,42,0.10); color: #D4642A; }
.csv-btn.secondary:hover { background: rgba(212,100,42,0.18); }
.csv-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Enrichment Panel ───────────────────────────────────────── */
.enrich-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enrich-panel {
  background: #FFFFFF;
  border-radius: 12px;
  width: 740px;
  height: 560px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  overflow: hidden;
}
.enrich-header {
  padding: 16px 20px 0;
  border-bottom: 1px solid #E0D5C5;
  flex-shrink: 0;
}
.enrich-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.enrich-title { font-size: 15px; font-weight: 600; color: #111827; }
.enrich-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #E0D5C5;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 14px;
  font-family: inherit;
}
.enrich-close:hover { background: #F3F4F6; }

.enrich-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #E0D5C5;
  border-radius: 6px;
  padding: 0 10px;
  height: 32px;
  margin-bottom: 11px;
}
.enrich-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #374151;
  font-family: inherit;
  background: transparent;
}
.enrich-search input::placeholder { color: #9CA3AF; }

.enrich-tabs { display: flex; }
.enrich-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
.enrich-tab.active { color: #111827; border-bottom-color: #111827; font-weight: 500; }
.enrich-tab:hover:not(.active) { color: #374151; }
.enrich-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.enrich-tab-dot.green  { background: #2D8A4E; }
.enrich-tab-dot.purple { background: #C97D28; }
.enrich-tab-dot.blue   { background: #D4642A; }

/* Panel body */
.enrich-body { flex: 1; display: flex; overflow: hidden; }
.enrich-sidebar {
  width: 185px;
  border-right: 1px solid #E0D5C5;
  padding: 6px 0;
  overflow-y: auto;
  flex-shrink: 0;
}
.enrich-sidebar::-webkit-scrollbar { width: 4px; }
.enrich-sidebar::-webkit-scrollbar-thumb { background: #E5E5E5; border-radius: 2px; }
.enrich-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}
.enrich-cat:hover { background: #F3F4F6; }
.enrich-cat.active { background: rgba(212,100,42,0.08); color: #D4642A; }
.enrich-cat-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

.enrich-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.enrich-content::-webkit-scrollbar { width: 4px; }
.enrich-content::-webkit-scrollbar-thumb { background: #E5E5E5; border-radius: 2px; }
.enrich-section-hd {
  padding: 8px 16px 3px;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.enrich-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  cursor: pointer;
}
.enrich-item:hover { background: #F9FAFB; }
.enrich-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.enrich-item-name { flex: 1; font-size: 13px; color: #111827; }
.enrich-item-badges { display: flex; align-items: center; gap: 5px; }
.enrich-credit-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid #A7F3D0;
  border-radius: 4px;
  font-size: 11px;
  color: #059669;
  background: #ECFDF5;
  white-space: nowrap;
}
.enrich-upgrade-pill {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #92400E;
  background: #FEF3C7;
}
.enrich-star {
  font-size: 14px;
  color: #D1D5DB;
  cursor: pointer;
  line-height: 1;
}
.enrich-star:hover { color: #F59E0B; }
.enrich-star.filled { color: #F59E0B; }

/* ── AI Enrichment — per-cell processing spinner ─────────── */
.ct-enrich-spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid #E0D5C5;
  border-top-color: #D4642A;
  border-radius: 50%;
  animation: clay-spin 0.75s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   USE AI PANEL — right-side slide-over
══════════════════════════════════════════════════════════ */

/* Overlay */
#uai-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1199;
}

/* Panel shell */
.uai-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: #FFFFFF;
  border-left: 1px solid #E5E7EB;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.uai-panel.uai-panel-visible {
  transform: translateX(0);
}

/* Header */
.uai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 13px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.uai-header-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
}
.uai-header-title svg { color: #D4642A; }
.uai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.uai-icon-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 14px;
  transition: background 0.12s;
}
.uai-icon-btn:hover { background: #F3F4F6; color: #111827; }

/* Scrollable body */
.uai-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uai-body::-webkit-scrollbar { width: 4px; }
.uai-body::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

/* Template chips row */
.uai-template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.uai-chip {
  padding: 4px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  font-size: 11.5px;
  color: #374151;
  background: #F9FAFB;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  white-space: nowrap;
}
.uai-chip:hover { border-color: #D4642A; background: rgba(212,100,42,0.08); color: #D4642A; }
.uai-chip.active { border-color: #D4642A; background: rgba(212,100,42,0.10); color: #D4642A; font-weight: 500; }

/* Use-case radio row */
.uai-usecase-row {
  display: flex;
  gap: 8px;
}
.uai-usecase-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #F9FAFB;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #374151;
  transition: border-color 0.12s, background 0.12s;
}
.uai-usecase-btn.active {
  border-color: #D4642A;
  background: rgba(212,100,42,0.08);
  color: #D4642A;
  font-weight: 500;
}
.uai-usecase-btn .uai-radio {
  width: 13px;
  height: 13px;
  border: 1.5px solid #D1D5DB;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s;
}
.uai-usecase-btn.active .uai-radio {
  border-color: #D4642A;
  background: #D4642A;
  box-shadow: inset 0 0 0 2px #fff;
}

/* Collapsible sections */
.uai-section {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}
.uai-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #F9FAFB;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  user-select: none;
  transition: background 0.1s;
}
.uai-section-hd:hover { background: #F3F4F6; }
.uai-section-hd .uai-caret {
  font-size: 10px;
  color: #9CA3AF;
  transition: transform 0.18s;
}
.uai-section.open .uai-caret { transform: rotate(180deg); }
.uai-section-body {
  display: none;
  padding: 12px;
  border-top: 1px solid #E5E7EB;
  flex-direction: column;
  gap: 10px;
}
.uai-section.open .uai-section-body { display: flex; }

/* Labels and inputs */
.uai-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.uai-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 12px;
  color: #111827;
  background: #FAFAFA;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s;
}
.uai-input:focus { border-color: #D4642A; background: #fff; }
.uai-textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  line-height: 1.5;
}

/* Model selector */
.uai-model-wrap {
  position: relative;
}
.uai-model-btn {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #FAFAFA;
  font-size: 12px;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.12s;
}
.uai-model-btn:hover { border-color: #9CA3AF; }
.uai-model-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 10;
  overflow: hidden;
  display: none;
}
.uai-model-dropdown.open { display: block; }
.uai-model-group-label {
  padding: 7px 12px 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.uai-model-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
}
.uai-model-opt:hover { background: #F3F4F6; }
.uai-model-opt.selected { background: rgba(212,100,42,0.10); color: #D4642A; font-weight: 500; }
.uai-model-credit {
  font-size: 10.5px;
  color: #9CA3AF;
  background: #F3F4F6;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Output field rows */
.uai-output-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uai-output-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.uai-output-row .uai-input { flex: 1; margin: 0; }
.uai-output-type {
  padding: 7px 8px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 11.5px;
  color: #6B7280;
  background: #F9FAFB;
  cursor: pointer;
  white-space: nowrap;
}
.uai-output-del {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  color: #D1D5DB;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.1s, background 0.1s;
}
.uai-output-del:hover { color: #EF4444; background: #FEF2F2; }
.uai-add-output-btn {
  align-self: flex-start;
  padding: 5px 10px;
  border: 1px dashed #D1D5DB;
  border-radius: 6px;
  background: none;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.uai-add-output-btn:hover { border-color: #D4642A; color: #D4642A; }

/* Run settings */
.uai-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #374151;
}
.uai-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}
.uai-toggle input { opacity: 0; width: 0; height: 0; }
.uai-toggle-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s;
}
.uai-toggle-slider::before {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  left: 2.5px;
  top: 2.5px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.uai-toggle input:checked + .uai-toggle-slider { background: #D4642A; }
.uai-toggle input:checked + .uai-toggle-slider::before { transform: translateX(14px); }

/* Panel footer */
.uai-footer {
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  background: #FAFAFA;
}
.uai-btn-secondary {
  padding: 7px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  background: #FFFFFF;
  font-size: 12.5px;
  color: #374151;
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.12s, background 0.12s;
}
.uai-btn-secondary:hover { border-color: #9CA3AF; background: #F9FAFB; }
.uai-btn-primary {
  padding: 7px 16px;
  border: none;
  border-radius: 7px;
  background: #D4642A;
  font-size: 12.5px;
  color: #FFFFFF;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
}
.uai-btn-primary:hover { background: #BF5420; }
.uai-btn-primary:disabled { background: rgba(212,100,42,0.4); cursor: not-allowed; }

/* Add column dropdown (two-section) */
#addcol-drop {
  position: absolute;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 1100;
  min-width: 280px;
  width: auto;
  overflow: visible;
  padding: 6px 0;
}
.addcol-section-label {
  padding: 6px 12px 3px;
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.addcol-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
}
.addcol-item:hover { background: #F3F4F6; }
.addcol-item .addcol-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.addcol-item .addcol-icon.purple { background: rgba(212,100,42,0.10); color: #D4642A; }
.addcol-item .addcol-icon.gray   { background: #F3F4F6; color: #6B7280; }
.addcol-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 5px 0;
}

/* ══════════════════════════════════════════════════════════
   COMPANY DATA SCRAPING PANEL — clean right-side slide-over
══════════════════════════════════════════════════════════ */

.ds-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e5e5e5;
  box-shadow: -8px 0 24px rgba(0,0,0,0.10);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.ds-panel.ds-panel-visible { transform: translateX(0); }

.ds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.ds-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.ds-close {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.ds-close:hover { background: #F3F4F6; color: #111; }

.ds-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.ds-body::-webkit-scrollbar { width: 4px; }
.ds-body::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

.ds-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.ds-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  color: #111;
  background: #FAFAFA;
  transition: border-color 0.12s, background 0.12s;
  -webkit-appearance: none;
  appearance: none;
}
.ds-input:focus { border-color: #D4642A; background: #fff; }

.ds-textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 10px;
  box-sizing: border-box;
  outline: none;
  color: #111;
  background: #FAFAFA;
  transition: border-color 0.12s, background 0.12s;
}
.ds-textarea:focus { border-color: #D4642A; background: #fff; }

.ds-chips-label {
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 6px;
}
.ds-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.ds-chip {
  padding: 4px 10px;
  border: 1px solid #E0E0E0;
  border-radius: 14px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  background: #FAFAFA;
  font-family: 'SF Mono', 'Menlo', monospace;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ds-chip:hover { background: rgba(212,100,42,0.08); border-color: #D4642A; color: #D4642A; }

/* ── AI Text — Input Source column picker ── */
.ds-col-picker {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 6px 8px;
  background: #FAFAFA;
  margin-bottom: 4px;
}
.ds-col-picker::-webkit-scrollbar { width: 4px; }
.ds-col-picker::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

.ds-col-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #374151;
  transition: background 0.1s;
}
.ds-col-opt:hover { background: #F3F4F6; }
.ds-col-opt input[type="checkbox"] {
  accent-color: #D4642A;
  cursor: pointer;
  flex-shrink: 0;
}
.ds-col-opt-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-col-opt-badge {
  font-size: 10px;
  background: rgba(212,100,42,0.10);
  color: #D4642A;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 600;
  flex-shrink: 0;
}

.ds-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.ds-save-btn {
  width: 100%;
  padding: 11px;
  background: #D4642A;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.ds-save-btn:hover { background: #BF5420; }

/* ── Cell tooltip ───────────────────────────────────────────── */
.ct-tooltip {
  display: none;
  position: fixed;
  background: #1F2937;
  color: #F9FAFB;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 5px;
  max-width: 420px;
  word-break: break-word;
  white-space: pre-wrap;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ── Cell detail panel ─────────────────────────────────────── */
.cdp-panel .cdp-body {
  gap: 12px;
}
.cdp-content {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 12px;
  max-height: 340px;
  overflow-y: auto;
  flex-shrink: 0;
}
.cdp-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.cdp-prompt {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
}
.cdp-status-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
}
.cdp-status-badge.processing { background: rgba(212,100,42,0.08); color: #D4642A; }
.cdp-status-badge.error      { background: #FEF2F2; color: #EF4444; }
