/**
 * Mejoras UX auditoría v1 (sin forzar tamaño widget)
 * body.cf-genesys = producción · body.cf-dev = demo local (?dev=1)
 */

/* ─── Ocultar chrome / demo en producción ───────────── */
body.cf-genesys:not(.cf-dev) .dev-only { display: none !important; }
body.cf-genesys:not(.cf-dev) .hs-prop { display: none !important; }
body.cf-genesys:not(.cf-dev) .etapa-demo-tag { display: none !important; }
body.cf-genesys:not(.cf-dev) .etapa-select-wrap { display: none !important; }
body.cf-genesys:not(.cf-dev) #cf_etapa_display { display: block !important; }
body.cf-genesys:not(.cf-dev) #ticket-state-strip { display: none !important; }
body.cf-genesys:not(.cf-dev) .pipeline-banner { display: none !important; }
body.cf-genesys:not(.cf-dev) #mql-etapa-label { display: none !important; }

/* ─── Ribbon: contraste y sin animación distractora ─ */
body.cf-genesys .cr-sub,
body.cf-genesys .tb-meta { color: #B8D4F0; }

body.cf-genesys .cr-timer-label { color: #B8D4F0; }

body.cf-genesys .tb-dot-live { animation: none; }

/* ─── Compliance strip neutro ───────────────────────── */
body.cf-genesys .compliance-strip {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 5px 12px;
  gap: 12px;
  flex-wrap: wrap;
}

body.cf-genesys .compliance-strip .cs-label { color: var(--text2); }
body.cf-genesys .compliance-strip .cs-item:has(.cs-warn) .cs-label { color: var(--amber); }
body.cf-genesys .compliance-strip .cs-item:has(.cs-no) .cs-label { color: var(--red); }
body.cf-genesys .compliance-strip .cs-item:has(.cs-ok) .cs-label { color: var(--green); }

/* ─── Tipografía mínima operativa ───────────────────── */
body.cf-genesys .field-label,
body.cf-genesys .contact-tab-title,
body.cf-genesys .card-title { font-size: 11px; }

body.cf-genesys .field-input,
body.cf-genesys .field-select,
body.cf-genesys .notes-ta { font-size: 12px; }

body.cf-genesys .save-btn { font-size: 13px; }

/* ─── Sub-blocks: fondo neutro en producción ────────── */
body.cf-genesys .sub-block.e0,
body.cf-genesys .sub-block.e1,
body.cf-genesys .sub-block.e2,
body.cf-genesys .sub-block.e3,
body.cf-genesys .sub-block.e4,
body.cf-genesys .sub-block.e5,
body.cf-genesys .sub-block.e6,
body.cf-genesys .sub-block.e7,
body.cf-genesys .sub-block.e8,
body.cf-genesys .sub-block.e9,
body.cf-genesys .sub-block.e10 {
  background: var(--surface2);
  border: 1px solid var(--border);
}

body.cf-genesys .sub-block .sub-title { color: var(--text2) !important; }

/* ─── Guía unificada de llamada ─────────────────────── */
.cf-call-hint,
body.cf-genesys .portal-hint,
body.cf-genesys .note-hint,
body.cf-genesys .inv-flow-hint {
  font-size: 10px;
  color: var(--text2);
  line-height: 1.45;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--hu-navy2);
  border-radius: var(--r);
  margin-top: 6px;
  margin-bottom: 6px;
}

/* ─── WF-03: pendientes arriba, completos colapsados ─ */
.portal-checklist.wf03-collapsed .portal-row-done { display: none; }
.portal-checklist.wf03-collapsed .portal-wf03-summary { display: flex; }
.portal-wf03-summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: var(--green-bg);
  border: 1px solid var(--green-b);
  border-radius: var(--r);
  font-size: 11px;
  cursor: pointer;
}
.portal-wf03-summary:hover { filter: brightness(0.98); }

/* ─── Captura producto E4 en tipificación ───────────── */
.cxc-tip-producto {
  margin-top: 8px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: var(--r);
}

.cxc-tip-producto .field-group { margin-top: 6px; }

/* ─── Especialista E2: acordeón expediente ──────────── */
.cf-exp-accordion {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: #fff;
}

.cf-exp-accordion summary {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hu-navy2);
  cursor: pointer;
  list-style: none;
}

.cf-exp-accordion summary::-webkit-details-marker { display: none; }

.cf-exp-accordion[open] summary { border-bottom: 1px solid var(--border); }

.cf-exp-accordion .cap-grid { padding: 8px 10px; }

body.cf-genesys .field-group.field-validation-error .field-label,
body.cf-genesys .field-group.is-missing .field-label { color: var(--red); }
