/* ============================================================================
   THOR — PROSPECCIÓN (workspace «Privado») · look & feel Apple
   [PROSPECCIÓN SEP 2026]

   Da a Mis leads (kanban + lista + ficha), Buscar contactos y Plantillas el
   mismo lenguaje visual que el kanban público (kanban-apple-redesign.css):
   fondo gris suave, tarjetas blancas redondeadas, botones pill, controles
   segmentados iOS, tablas limpias y modales con desenfoque.

   El HTML lo pinta public/js/prospeccion.js con clases `pr-*`. Los botones
   siguen usando .thor-btn / .thor-btn--primary|secondary|ghost; aquí se
   neutraliza el gradiente naranja global de style.css (`.section button`)
   con selectores :is(#sección) de mayor especificidad.
   ============================================================================ */

/* ===== TOKENS ===== */
:root {
  --pr-bg: #f5f5f7;
  --pr-col-bg: #ececee;
  --pr-card: #ffffff;
  --pr-card-2: #f7f7f9;
  --pr-text: #1d1d1f;
  --pr-text-2: #6e6e73;
  --pr-text-3: #a1a1a6;
  --pr-border: rgba(0, 0, 0, .08);
  --pr-border-2: rgba(0, 0, 0, .14);
  --pr-accent: #e88732;
  --pr-accent-soft: rgba(232, 135, 50, .14);
  --pr-blue: #0a84ff; --pr-green: #34c759; --pr-red: #ff3b30; --pr-amber: #ff9f0a;
  --pr-purple: #5e5ce6; --pr-pink: #bf5af2; --pr-teal: #32ade6; --pr-gray: #8e8e93;
  --pr-r-lg: 20px; --pr-r: 16px; --pr-r-md: 12px; --pr-r-sm: 10px; --pr-r-pill: 980px;
  --pr-sh-card: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 16px rgba(0, 0, 0, .05);
  --pr-sh-card-h: 0 8px 22px rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .10);
  --pr-sh-modal: 0 0 0 .5px rgba(0, 0, 0, .05), 0 8px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --pr-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --pr-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --pr-hover: rgba(0, 0, 0, .05);
  --pr-ring: 0 0 0 3px rgba(232, 135, 50, .28);
}
[data-theme="dark"] {
  --pr-bg: #000; --pr-col-bg: #161618; --pr-card: #1c1c1e; --pr-card-2: #242426;
  --pr-text: #f5f5f7; --pr-text-2: #aeaeb2; --pr-text-3: #8e8e93;
  --pr-border: rgba(255, 255, 255, .10); --pr-border-2: rgba(255, 255, 255, .18);
  --pr-hover: rgba(255, 255, 255, .07);
  --pr-sh-card: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 16px rgba(0, 0, 0, .4);
  --pr-sh-card-h: 0 10px 28px rgba(0, 0, 0, .6);
  --pr-sh-modal: 0 0 0 .5px rgba(255, 255, 255, .08), 0 8px 40px rgba(0, 0, 0, .6);
}

/* ===== SECCIONES ===== */
#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection {
  background: var(--pr-bg) !important;
  font-family: var(--pr-font);
  color: var(--pr-text);
}
.pr-root {
  font-family: var(--pr-font);
  color: var(--pr-text);
  display: flex; flex-direction: column; gap: 16px;
  -webkit-font-smoothing: antialiased;
}
.pr-root *, .pr-root *::before, .pr-root *::after { box-sizing: border-box; }
.pr-root a { color: var(--pr-blue); text-decoration: none; }
.pr-root a:hover { text-decoration: underline; }

/* ===== CABECERA DE PÁGINA ===== */
.pr-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pr-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; color: var(--pr-text); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pr-title small { font-size: 14px; font-weight: 500; color: var(--pr-text-3); letter-spacing: 0; }
.pr-sub { margin-top: 4px; font-size: 13px; color: var(--pr-text-2); line-height: 1.45; max-width: 780px; }
.pr-sub b { color: var(--pr-text); font-weight: 600; }
.pr-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== BOTONES (pills Apple; ganan a style.css `.section button`) ===== */
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn,
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) button.thor-btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important;
  height: 34px !important; padding: 0 15px !important; margin: 0 !important;
  border-radius: var(--pr-r-pill) !important;
  font-family: var(--pr-font) !important; font-size: 13px !important; font-weight: 600 !important; letter-spacing: -.005em !important;
  line-height: 1 !important; white-space: nowrap !important;
  background-image: none !important; box-shadow: none !important; text-shadow: none !important;
  transform: none !important; overflow: visible !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease !important;
  cursor: pointer !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn::before,
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn::after { display: none !important; content: none !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--primary {
  background: var(--pr-accent) !important; color: #fff !important; border: 1px solid transparent !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--primary:hover { background: #d97a28 !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--secondary {
  background: var(--pr-card) !important; color: var(--pr-text) !important; border: 1px solid var(--pr-border-2) !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--secondary:hover { background: var(--pr-hover) !important; border-color: var(--pr-text-3) !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--ghost {
  background: transparent !important; color: var(--pr-text-2) !important; border: 1px solid transparent !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--ghost:hover { background: var(--pr-hover) !important; color: var(--pr-text) !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--danger { color: var(--pr-red) !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--danger:hover { background: rgba(255, 59, 48, .10) !important; color: var(--pr-red) !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--icon { width: 34px !important; padding: 0 !important; font-size: 15px !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--sm { height: 28px !important; padding: 0 11px !important; font-size: 12px !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn--sm.thor-btn--icon { width: 28px !important; font-size: 13px !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn:disabled {
  opacity: .45 !important; cursor: not-allowed !important; background-image: none !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-btn:focus-visible { outline: none !important; box-shadow: var(--pr-ring) !important; }

/* ===== CAMPOS ===== */
.pr-input, .pr-select, .pr-textarea {
  width: 100%; height: 34px; padding: 0 12px;
  border: 1px solid var(--pr-border-2); border-radius: var(--pr-r-sm);
  background: var(--pr-card); color: var(--pr-text);
  font-family: var(--pr-font); font-size: 13px; line-height: 1.3;
  box-shadow: none; outline: none; margin: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pr-textarea { height: auto; padding: 9px 12px; line-height: 1.45; resize: vertical; min-height: 60px; }
.pr-textarea--mono { font-family: var(--pr-mono); font-size: 12px; }
.pr-select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; }
.pr-select[multiple] { height: auto; padding: 6px; background-image: none; }
.pr-select[multiple] option { padding: 5px 8px; border-radius: 6px; }
.pr-input:focus, .pr-select:focus, .pr-textarea:focus { border-color: var(--pr-accent); box-shadow: var(--pr-ring); }
.pr-input::placeholder, .pr-textarea::placeholder { color: var(--pr-text-3); }
.pr-input[type="search"] { padding-left: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><circle cx='6' cy='6' r='4.2' fill='none' stroke='%23a1a1a6' stroke-width='1.6'/><path d='M9.2 9.2L12.5 12.5' stroke='%23a1a1a6' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: 11px center; }
.pr-input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.pr-input--auto, .pr-select--auto { width: auto; }
.pr-input--sm, .pr-select--sm { height: 28px; font-size: 12px; padding: 0 10px; }
.pr-select--sm { padding-right: 26px; }
.pr-input--sm[type="search"] { padding-left: 28px; background-position: 9px center; }
.pr-file { font-family: var(--pr-font); font-size: 13px; color: var(--pr-text-2); }
.pr-file::file-selector-button {
  height: 30px; padding: 0 13px; margin-right: 10px; border: 1px solid var(--pr-border-2); border-radius: var(--pr-r-pill);
  background: var(--pr-card); color: var(--pr-text); font-family: var(--pr-font); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.pr-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pr-label { font-size: 12px; font-weight: 600; color: var(--pr-text-2); letter-spacing: -.005em; }
.pr-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--pr-text); cursor: pointer; user-select: none; white-space: nowrap; }
.pr-check--muted { color: var(--pr-text-2); font-size: 12px; }
.pr-check input[type="checkbox"], .pr-radio-option input[type="radio"], .pr-table input[type="checkbox"] {
  width: 16px; height: 16px; margin: 0; accent-color: var(--pr-accent); flex-shrink: 0; cursor: pointer;
}
.pr-form { display: flex; flex-direction: column; gap: 12px; }
.pr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-grid-2 > .pr-field--full { grid-column: 1 / -1; }
.pr-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pr-grid-21 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.pr-form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.pr-form-footer--between { justify-content: space-between; }
.pr-hint { font-size: 12px; color: var(--pr-text-2); line-height: 1.45; }
.pr-hint--muted { color: var(--pr-text-3); }
@media (max-width: 640px) { .pr-grid-2, .pr-grid-21 { grid-template-columns: 1fr; } }

/* ===== SEGMENTED CONTROL (iOS) ===== */
.pr-seg { display: inline-flex; background: rgba(0, 0, 0, .06); border-radius: 11px; padding: 3px; gap: 2px; }
[data-theme="dark"] .pr-seg { background: rgba(255, 255, 255, .10); }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .pr-seg .thor-btn,
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .pr-seg button.thor-btn {
  height: 28px !important; padding: 0 12px !important; border-radius: 9px !important; border: none !important;
  background: transparent !important; color: var(--pr-text-2) !important; font-size: 12.5px !important;
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .pr-seg .thor-btn:hover { color: var(--pr-text) !important; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .pr-seg .thor-btn.is-active {
  background: var(--pr-card) !important; color: var(--pr-text) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04) !important;
}

/* ===== KPIs ===== */
.pr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pr-kpi {
  background: var(--pr-card); border: 1px solid var(--pr-border); border-radius: var(--pr-r);
  padding: 14px 16px; box-shadow: var(--pr-sh-card); display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.pr-kpi__valor { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--pr-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pr-kpi__etiqueta { font-size: 12px; color: var(--pr-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-kpi__etiqueta span { color: var(--pr-text-3); }

/* ===== BARRA DE FILTROS ===== */
.pr-filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--pr-card); border: 1px solid var(--pr-border); border-radius: var(--pr-r); padding: 10px 12px; box-shadow: var(--pr-sh-card);
}
.pr-filters .pr-input[type="search"] { width: 260px; max-width: 100%; }
.pr-filters .pr-select { max-width: 230px; }
.pr-filters__spacer { flex: 1 1 auto; }
.pr-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== TARJETA GENÉRICA ===== */
.pr-card {
  background: var(--pr-card); border: 1px solid var(--pr-border); border-radius: var(--pr-r);
  box-shadow: var(--pr-sh-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.pr-card--flush { padding: 0; overflow: hidden; }
.pr-card__title { font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: var(--pr-text); }
.pr-section-title { font-size: 13px; font-weight: 700; letter-spacing: -.01em; color: var(--pr-text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-section-title span.muted { font-weight: 500; color: var(--pr-text-3); }

/* ===== BADGES ===== */
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--pr-r-pill);
  font-family: var(--pr-font); font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: -.005em; white-space: nowrap;
  background: rgba(110, 110, 115, .12); color: var(--pr-text-2);
}
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--brand { background: var(--pr-accent-soft); color: #b85f12; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--success { background: rgba(52, 199, 89, .14); color: #1e8f3f; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--warning { background: rgba(255, 159, 10, .16); color: #b36a00; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--danger { background: rgba(255, 59, 48, .12); color: #c92a1f; }
:is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--info { background: rgba(10, 132, 255, .12); color: #0a64c2; }
[data-theme="dark"] :is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--brand { color: #f0a25e; }
[data-theme="dark"] :is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--success { color: #5fd57e; }
[data-theme="dark"] :is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--warning { color: #ffb84d; }
[data-theme="dark"] :is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--danger { color: #ff6b61; }
[data-theme="dark"] :is(#leadsKanbanSection, #prospeccionBuscarSection, #leadsPlantillasSection, .prospeccion-modal) .thor-badge--info { color: #5eaaff; }
.pr-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ===== KANBAN ===== */
.pr-board {
  display: flex; gap: 14px; align-items: stretch; overflow-x: auto; overflow-y: hidden;
  padding: 4px 4px 18px; height: calc(100vh - 340px); min-height: 460px; scroll-behavior: smooth;
}
.pr-board::-webkit-scrollbar { height: 10px; }
.pr-board::-webkit-scrollbar-thumb { background: var(--pr-border-2); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.pr-col {
  --pr-etapa: var(--pr-blue);
  flex: 0 0 262px; display: flex; flex-direction: column; min-height: 0;
  background: var(--pr-col-bg); border: 1px solid var(--pr-border); border-radius: var(--pr-r-lg);
  transition: box-shadow .2s ease, outline-color .15s ease; outline: 2px dashed transparent; outline-offset: -2px;
}
.pr-col.is-over { outline-color: var(--pr-accent); box-shadow: 0 4px 18px rgba(0, 0, 0, .07); }
.pr-col[data-etapa="nuevo"]       { --pr-etapa: var(--pr-blue); }
.pr-col[data-etapa="contactado"]  { --pr-etapa: var(--pr-purple); }
.pr-col[data-etapa="respondio"]   { --pr-etapa: var(--pr-pink); }
.pr-col[data-etapa="reunion"]     { --pr-etapa: var(--pr-amber); }
.pr-col[data-etapa="cualificado"] { --pr-etapa: var(--pr-green); }
.pr-col[data-etapa="convertido"]  { --pr-etapa: #248a3d; }
.pr-col[data-etapa="nurturing"]   { --pr-etapa: var(--pr-teal); }
.pr-col[data-etapa="descartado"]  { --pr-etapa: var(--pr-gray); }
.pr-col__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0;
  padding: 15px 16px 11px; border-bottom: 1px solid var(--pr-border);
}
.pr-col__title { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; letter-spacing: -.015em; color: var(--pr-text); min-width: 0; }
.pr-col__title::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--pr-etapa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pr-etapa) 18%, transparent); flex-shrink: 0; }
.pr-col__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-col__count { font-size: 11.5px; font-weight: 700; color: var(--pr-text-2); background: rgba(110, 110, 115, .14); border-radius: var(--pr-r-pill); padding: 2px 9px; font-variant-numeric: tabular-nums; }
.pr-col__body { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 60px; scrollbar-width: thin; scrollbar-color: var(--pr-border-2) transparent; }
/* Las tarjetas NUNCA se encogen para caber: con 150 tarjetas la columna hace scroll, no las aplasta */
.pr-col__body > * { flex: 0 0 auto !important; min-height: 0; }
.lead-card.pr-lead { flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; }
.pr-col__body::-webkit-scrollbar { width: 8px; }
.pr-col__body::-webkit-scrollbar-track { background: transparent; }
.pr-col__body::-webkit-scrollbar-thumb { background: var(--pr-border-2) !important; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.pr-col__more { padding: 0 12px 12px; flex-shrink: 0; display: flex; }
.pr-col__empty { font-size: 12px; color: var(--pr-text-3); text-align: center; padding: 18px 8px; border: 1px dashed var(--pr-border-2); border-radius: var(--pr-r-md); }

.lead-card.pr-lead {
  position: relative; background: var(--pr-card); border: 1px solid var(--pr-border); border-radius: var(--pr-r);
  box-shadow: var(--pr-sh-card); padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 5px; cursor: grab; overflow: hidden;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s ease, border-color .2s ease, opacity .15s ease;
}
.lead-card.pr-lead::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pr-etapa); opacity: .9; }
.lead-card.pr-lead:hover { border-color: var(--pr-border-2); box-shadow: var(--pr-sh-card-h); transform: translateY(-3px); }
.lead-card.pr-lead:active { cursor: grabbing; }
.lead-card.pr-lead.is-dragging { opacity: .5; }
.pr-lead__empresa { font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; color: var(--pr-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-lead__contacto { font-size: 12.5px; color: var(--pr-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-lead__meta { font-size: 11.5px; color: var(--pr-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-lead__paso { font-size: 11.5px; color: var(--pr-text-2); background: var(--pr-card-2); border-radius: 8px; padding: 4px 8px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-lead .pr-badges { margin-top: 4px; }

/* ===== TABLAS ===== */
.pr-table-wrap { overflow: auto; }
.pr-table { width: 100%; border-collapse: collapse; font-family: var(--pr-font); font-size: 13px; color: var(--pr-text); }
.pr-table th {
  text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--pr-text-2); background: var(--pr-card-2); border-bottom: 1px solid var(--pr-border); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.pr-table th.c, .pr-table td.c { text-align: center; }
.pr-table td { padding: 10px 14px; border-bottom: 1px solid var(--pr-border); vertical-align: middle; }
.pr-table tbody tr:last-child td { border-bottom: none; }
.pr-table tbody tr { transition: background .12s ease; }
.pr-table tbody tr:hover td { background: var(--pr-hover); }
.pr-table tbody tr.is-link { cursor: pointer; }
.pr-table tbody tr.is-principal td { background: var(--pr-accent-soft); }
.pr-table tbody tr.is-muted { opacity: .55; }
.pr-table .t1 { font-weight: 600; letter-spacing: -.01em; color: var(--pr-text); }
.pr-table .t2 { font-size: 11.5px; color: var(--pr-text-3); margin-top: 1px; }
.pr-table .t3 { font-size: 12px; color: var(--pr-text-2); }
.pr-table td.nowrap, .pr-table th.nowrap { white-space: nowrap; }
.pr-table td.acciones { white-space: nowrap; text-align: right; }
.pr-table td.empty { color: var(--pr-text-3); text-align: center; padding: 26px 14px; }
.pr-table--compact th { padding: 8px 10px; } .pr-table--compact td { padding: 7px 10px; }
.pr-pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--pr-text-2); }
.pr-pager__botones { display: flex; gap: 6px; }

/* ===== AVISOS ===== */
.pr-alert { padding: 10px 12px; border-radius: var(--pr-r-md); font-size: 13px; line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.pr-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.pr-alert--warning { background: rgba(255, 159, 10, .14); color: #8a5200; }
.pr-alert--info { background: rgba(10, 132, 255, .12); color: #0a5bb0; }
.pr-alert--danger { background: rgba(255, 59, 48, .10); color: #b3261e; }
.pr-alert--success { background: rgba(52, 199, 89, .14); color: #1e7d38; }
[data-theme="dark"] .pr-alert--warning { color: #ffc266; }
[data-theme="dark"] .pr-alert--info { color: #7dbcff; }
[data-theme="dark"] .pr-alert--danger { color: #ff8a80; }
[data-theme="dark"] .pr-alert--success { color: #7ee29a; }
.pr-error { color: var(--pr-red); font-size: 13px; margin: 0; }
.pr-muted { color: var(--pr-text-2); font-size: 13px; margin: 0; }
.pr-empty { color: var(--pr-text-3); font-size: 13px; text-align: center; padding: 28px 12px; }

/* ===== MODAL ===== */
.prospeccion-modal {
  position: fixed; inset: 0; z-index: var(--thor-z-modal, 9000);
  background: rgba(0, 0, 0, .40); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto;
  font-family: var(--pr-font); color: var(--pr-text); -webkit-font-smoothing: antialiased;
  animation: prFadeIn .18s ease;
}
.prospeccion-modal *, .prospeccion-modal *::before, .prospeccion-modal *::after { box-sizing: border-box; }
.prospeccion-modal a { color: var(--pr-blue); text-decoration: none; }
.prospeccion-modal a:hover { text-decoration: underline; }
.pr-modal {
  position: relative; width: 100%; max-height: calc(100vh - 80px); overflow: auto;
  background: var(--pr-card); border-radius: 18px; box-shadow: var(--pr-sh-modal); padding: 22px 24px 24px;
  display: flex; flex-direction: column; gap: 14px; animation: prPop .22s cubic-bezier(.2, .7, .3, 1);
}
.pr-modal::-webkit-scrollbar { width: 10px; }
.pr-modal::-webkit-scrollbar-thumb { background: var(--pr-border-2); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.pr-modal__close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .06); color: rgba(0, 0, 0, .55); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; z-index: 2;
}
.pr-modal__close:hover { background: rgba(0, 0, 0, .12); }
[data-theme="dark"] .pr-modal__close { background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .75); }
.pr-modal__title { margin: 0; padding-right: 36px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; color: var(--pr-text); }
.pr-modal__title small { font-size: 13px; font-weight: 500; color: var(--pr-text-3); letter-spacing: 0; }
.pr-modal__sub { font-size: 12.5px; color: var(--pr-text-2); margin-top: -8px; }
.pr-modal__loading { color: var(--pr-text-2); font-size: 13px; padding: 8px 0; }
@keyframes prFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes prPop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ===== FICHA DEL LEAD ===== */
.pr-ficha__head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; padding-right: 28px; }
.pr-ficha__head > div:first-child { min-width: 0; flex: 1 1 320px; }
.pr-ficha__meta { font-size: 12px; color: var(--pr-text-3); margin-top: 2px; }
.pr-ficha__contacto { font-size: 13px; color: var(--pr-text-2); margin-top: 4px; }
.pr-ficha__estado { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pr-ficha__links { margin-top: 8px; font-size: 12.5px; display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--pr-text-2); }
.pr-ficha__acciones { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; }
.pr-ficha__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .pr-ficha__grid { grid-template-columns: 1fr; } }
.pr-panel { background: var(--pr-card-2); border: 1px solid var(--pr-border); border-radius: var(--pr-r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pr-panel--white { background: var(--pr-card); }
.pr-panel .pr-table th { background: transparent; }
.pr-panel .pr-table-wrap { max-height: 320px; overflow: auto; background: var(--pr-card); border: 1px solid var(--pr-border); border-radius: var(--pr-r-sm); }
.pr-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pr-details { border: 1px solid var(--pr-border); border-radius: var(--pr-r-md); background: var(--pr-card); }
.pr-details > summary { cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 700; letter-spacing: -.01em; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--pr-text); }
.pr-details > summary::-webkit-details-marker { display: none; }
.pr-details > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.8px solid var(--pr-text-3); border-bottom: 1.8px solid var(--pr-text-3); transform: rotate(-45deg); transition: transform .15s ease; margin-left: 2px; }
.pr-details[open] > summary::before { transform: rotate(45deg); }
.pr-details > *:not(summary) { padding: 0 14px 14px; }
.pr-details--plain { border: none; background: transparent; }
.pr-details--plain > summary { padding: 6px 0; font-weight: 600; color: var(--pr-text-2); font-size: 12.5px; }
.pr-details--plain > *:not(summary) { padding: 6px 0 0; }
.pr-list { display: flex; flex-direction: column; }
.pr-list__item { font-size: 12.5px; padding: 8px 0; border-top: 1px solid var(--pr-border); line-height: 1.45; color: var(--pr-text); }
.pr-list__item:first-child { border-top: none; }
.pr-list__item b { font-weight: 600; }
.pr-list__item .muted { color: var(--pr-text-3); }
.pr-list__item .sub { color: var(--pr-text-2); margin-top: 3px; white-space: pre-wrap; }
.pr-list__item .err { color: var(--pr-red); margin-top: 3px; }
.pr-timeline { max-height: 560px; overflow: auto; display: flex; flex-direction: column; padding-right: 4px; }
.pr-tl { position: relative; display: flex; gap: 10px; padding: 8px 0; font-size: 12.5px; line-height: 1.45; }
.pr-tl + .pr-tl { border-top: 1px solid var(--pr-border); }
.pr-tl__icon { width: 26px; height: 26px; border-radius: 50%; background: var(--pr-card); border: 1px solid var(--pr-border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.pr-tl__body { min-width: 0; flex: 1; }
.pr-tl__body b { font-weight: 600; }
.pr-tl__meta { color: var(--pr-text-3); font-size: 11.5px; margin-left: 4px; }
.pr-tl__desc { color: var(--pr-text-2); white-space: pre-wrap; margin-top: 2px; }

/* ===== OPCIONES RADIO (asistentes) ===== */
.pr-options { display: flex; flex-direction: column; gap: 6px; }
.pr-radio-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--pr-border-2); border-radius: var(--pr-r-md); background: var(--pr-card); transition: border-color .15s ease, background .15s ease;
}
.pr-radio-option:hover { background: var(--pr-hover); }
.pr-radio-option:has(input:checked) { border-color: var(--pr-accent); background: var(--pr-accent-soft); }
.pr-radio-option input[type="radio"] { margin-top: 2px; }
.pr-radio-option b { font-weight: 600; font-size: 13px; }
.pr-radio-option .sub { font-size: 12px; color: var(--pr-text-2); margin-top: 2px; }
.pr-checks { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.pr-checks .pr-check { white-space: normal; }
.pr-checks .pr-check .muted { color: var(--pr-text-3); }

/* ===== BUSCAR CONTACTOS ===== */
.pr-tabs { display: inline-flex; background: rgba(0, 0, 0, .06); border-radius: 11px; padding: 3px; gap: 2px; }
[data-theme="dark"] .pr-tabs { background: rgba(255, 255, 255, .10); }
.pr-preview { border: 1px solid var(--pr-border); border-radius: var(--pr-r-md); padding: 14px; background: var(--pr-card-2); font-size: 13px; line-height: 1.5; }
.pr-preview hr { border: none; border-top: 1px solid var(--pr-border); margin: 8px 0; }
.pr-historial { font-size: 12px; }
.pr-historial .pr-list__item { font-size: 12px; }
.pr-historial code { font-family: var(--pr-mono); font-size: 11px; color: var(--pr-text-3); }

/* ===== PLANTILLAS ===== */
.pr-plantilla { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 18px; border-top: 1px solid var(--pr-border); }
.pr-plantilla:first-child { border-top: none; }
.pr-plantilla:hover { background: var(--pr-hover); }
.pr-plantilla__info { min-width: 0; flex: 1; }
.pr-plantilla__nombre { font-size: 14px; font-weight: 600; letter-spacing: -.01em; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pr-plantilla__asunto { font-size: 12.5px; color: var(--pr-text-2); margin-top: 3px; }
.pr-plantilla__extracto { font-size: 12px; color: var(--pr-text-3); margin-top: 4px; white-space: pre-wrap; max-height: 54px; overflow: hidden; }
.pr-plantilla__acciones { display: flex; gap: 6px; flex-shrink: 0; }
.pr-stack--tight { gap: 6px; }
.pr-card__head { padding: 14px 18px 0; }

/* ===== Neutralización de reglas globales de style.css / dark-mode.css ===== */
.pr-input[type="date"], .pr-input[type="time"], .pr-input[type="datetime-local"], .pr-input[type="number"], .pr-input[type="email"] { width: 100%; }
.pr-input--auto[type="search"] { width: auto; }
.pr-check input[type="checkbox"], .pr-radio-option input[type="radio"], .pr-table input[type="checkbox"], .pr-root input[type="checkbox"], .prospeccion-modal input[type="checkbox"], .prospeccion-modal input[type="radio"] {
  padding: 0; margin: 0; border: none; border-radius: 3px; background: transparent; box-shadow: none; width: 16px; height: 16px; accent-color: var(--pr-accent);
}
.pr-file { padding: 0; margin: 0; border: none; background: transparent; box-shadow: none; }
.prospeccion-modal .pr-modal__title, .pr-root .pr-title { font-family: var(--pr-font); }
[data-theme="dark"] .pr-input, [data-theme="dark"] .pr-select, [data-theme="dark"] .pr-textarea {
  background-color: var(--pr-card-2) !important; border-color: var(--pr-border-2) !important; color: var(--pr-text) !important;
}
[data-theme="dark"] .pr-input:focus, [data-theme="dark"] .pr-select:focus, [data-theme="dark"] .pr-textarea:focus { border-color: var(--pr-accent) !important; background-color: var(--pr-card-2) !important; }
[data-theme="dark"] .pr-input::placeholder, [data-theme="dark"] .pr-textarea::placeholder { color: var(--pr-text-3) !important; }
[data-theme="dark"] .pr-root .pr-label, [data-theme="dark"] .prospeccion-modal .pr-label { color: var(--pr-text-2) !important; }
.pr-table thead, .pr-table thead th { background: var(--pr-card-2) !important; border-bottom: 1px solid var(--pr-border) !important; color: var(--pr-text-2) !important; }
.pr-table tbody tr:hover { background: transparent !important; }
.pr-input:focus, .pr-select:focus, .pr-textarea:focus { border-color: var(--pr-accent) !important; box-shadow: var(--pr-ring) !important; }
