/* Engage Solar — Lead Recovery Intelligence (premium) */

body[data-es-panel-active="engage-intelligence"] .es-page-heading {
  display: none !important;
}

body[data-es-panel-active="engage-intelligence"] .es-content {
  margin-top: -0.65rem;
  padding: 0;
  background: #eef2f8;
  border-radius: 1.35rem 1.35rem 0 0;
  overflow: hidden;
}

body[data-es-panel-active="engage-intelligence"] .es-panel[data-es-panel="engage-intelligence"] {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: #eef2f8;
  min-height: 100%;
}

/* Lead Recovery embutido no Engage Config */
.es-panel--engage-config .ec-tab-panel[data-ec-panel="lead-recovery-intelligence"] {
  padding: 0;
}

.elri-embed-root .elri-shell {
  padding: 0;
  max-width: none;
  margin: 0;
}

.elri-embed-root .elri-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .elri-embed-root .elri-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.elri-shell {
  padding: 1.35rem 1.5rem 1.75rem;
  max-width: 1480px;
  margin: 0 auto;
}

.elri-redirect-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e8edf4;
  text-align: center;
}

/* Toolbar */
.elri-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.elri-breadcrumb {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: #64748b;
}

.elri-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: #0f172a;
}

.elri-lead {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
  max-width: 42rem;
}

.elri-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.elri-period-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.elri-period-pill svg {
  width: 1rem;
  height: 1rem;
  color: #64748b;
}

.elri-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.elri-btn svg {
  width: 1rem;
  height: 1rem;
}

.elri-btn--ghost {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

.elri-btn--outline {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.elri-btn--primary {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
}

.elri-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Main tabs */
.elri-main-tabs {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.elri-main-tab {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.elri-main-tab.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.elri-main-tab.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
}

/* KPI grid */
.elri-kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 1300px) {
  .elri-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .elri-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.elri-kpi-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 1rem;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.elri-kpi-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.elri-kpi-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.elri-kpi-icon svg {
  width: 1rem;
  height: 1rem;
}

.elri-kpi-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.elri-kpi-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.elri-kpi-sub {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

/* Banner */
.elri-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #bbf7d0;
}

.elri-hero-banner-copy {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.elri-hero-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #16a34a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.elri-hero-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.elri-hero-banner strong {
  display: block;
  font-size: 1rem;
  color: #14532d;
  margin-bottom: 0.25rem;
}

.elri-hero-banner p {
  margin: 0;
  font-size: 0.82rem;
  color: #166534;
}

/* Two col */
.elri-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 960px) {
  .elri-two-col {
    grid-template-columns: 1fr;
  }
}

.elri-panel {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.elri-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.elri-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.elri-panel-head h3 {
  margin: 0;
}

/* Insight bars */
.elri-insight-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
}

.elri-insight-row-label {
  color: #334155;
}

.elri-insight-row-count {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.elri-insight-bar {
  grid-column: 1 / -1;
  height: 0.4rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.elri-insight-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 999px;
}

/* Opportunity list */
.elri-opp-list {
  display: grid;
  gap: 0.5rem;
}

.elri-opp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
}

.elri-opp-item:last-child {
  border-bottom: 0;
}

.elri-opp-item button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: #0f172a;
  font-weight: 600;
}

.elri-opp-item button.is-active {
  color: #2563eb;
}

.elri-opp-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.elri-opp-badge[data-tone="ok"] {
  background: #dcfce7;
  color: #15803d;
}

.elri-opp-badge[data-tone="warn"] {
  background: #fef9c3;
  color: #a16207;
}

.elri-opp-badge[data-tone="special"] {
  background: #f3e8ff;
  color: #7c3aed;
}

/* Base summary strip */
.elri-base-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.elri-base-pill {
  flex: 1 1 180px;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #e8edf4;
  font-size: 0.8rem;
  color: #334155;
}

.elri-base-pill strong {
  display: block;
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

/* Table */
.elri-table-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.elri-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.elri-table-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.elri-table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #64748b;
}

.elri-table-actions select {
  margin-left: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
}

.elri-table-wrap {
  overflow-x: auto;
}

.elri-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 1200px;
}

.elri-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.elri-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}

.elri-sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.elri-priority {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.elri-priority[data-tone="danger"] {
  background: #fee2e2;
  color: #dc2626;
}

.elri-priority[data-tone="warn"] {
  background: #fef9c3;
  color: #a16207;
}

.elri-priority[data-tone="info"] {
  background: #dbeafe;
  color: #1d4ed8;
}

.elri-priority[data-tone="muted"] {
  background: #f1f5f9;
  color: #64748b;
}

.elri-row-special {
  background: #faf5ff;
}

.elri-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.elri-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}

.elri-pagination {
  display: flex;
  gap: 0.35rem;
}

.elri-page-btn {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
}

.elri-page-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Feedback / loading */
.elri-feedback {
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.elri-feedback[data-tone="danger"] {
  background: #fef2f2;
  color: #dc2626;
}

.elri-feedback[data-tone="success"] {
  background: #ecfdf5;
  color: #15803d;
}

.elri-loading {
  padding: 2rem;
  text-align: center;
  color: #64748b;
}

.elri-empty,
.elri-soon {
  padding: 2rem;
  text-align: center;
  color: #64748b;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e8edf4;
}

/* Analytics bars */
.elri-bars {
  display: grid;
  gap: 0.5rem;
}

.elri-bar-row {
  display: grid;
  grid-template-columns: 7rem 1fr 3rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
}

.elri-bar-track {
  height: 0.45rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.elri-bar-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
}

/* Modals */
.elri-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.elri-modal[hidden] {
  display: none !important;
}

.elri-modal-dialog {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.elri-modal-dialog--wide {
  width: min(760px, 100%);
}

.elri-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
}

.elri-modal-head h3 {
  margin: 0;
}

.elri-modal-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.elri-modal-body {
  padding: 1rem 1.15rem;
}

.elri-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #f1f5f9;
}

.elri-dl {
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.elri-dl div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
}

.elri-dl dt {
  color: #64748b;
  font-weight: 600;
}

.elri-warning {
  color: #a16207;
  background: #fef9c3;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
}

.elri-debug-pre {
  max-height: 200px;
  overflow: auto;
  font-size: 0.72rem;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 0.5rem;
}
