/* DESK-V2 CORE STYLES */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #f1f5f9 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  overflow-x: hidden;
}

.et_pb_section, .et_pb_row, .et_pb_column, .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background-color: transparent !important;
}

#lead-hub-root {
  width: 100%;
  max-width: 1380px;
  margin: 0.5rem auto !important;
  padding: 0 4px !important;
  box-sizing: border-box;
}
#lead-hub-root * { box-sizing: border-box; }

/* 🔒 SECURITY PIN GATE OVERLAY */
#lh-pin-gate-modal {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background: rgba(2, 6, 23, 0.95) !important;
  backdrop-filter: blur(10px);
  z-index: 99999999 !important;
  display: flex; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box;
}

.lh-gate-card {
  background: #0f172a;
  border: 3px solid #38bdf8;
  border-radius: 20px;
  padding: 2.25rem 1.75rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.lh-gate-input {
  width: 100%;
  padding: 0.85rem;
  background: #020617 !important;
  border: 2px solid #38bdf8 !important;
  border-radius: 10px;
  color: #ffffff !important;
  font-size: 1.4rem !important;
  text-align: center;
  font-weight: 900 !important;
  letter-spacing: 5px;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
}

/* NAVIGATION HEADER */
.lh-nav-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

.lh-header-clock {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 800;
  background: #020617;
  border: 1px solid #334155;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
}

/* FILTER BAR & ACTION BUTTON LAYOUT */
.lh-filter-bar {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.1);
}

.lh-search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lh-search-input {
  flex: 1;
  min-width: 240px;
  padding: 0.85rem 1rem;
  background: #ffffff !important;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  color: #0f172a !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

.lh-chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lh-filter-chip {
  background: #1e293b;
  color: #f8fafc !important;
  border: 1px solid #64748b;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex: none;
}
.lh-filter-chip.active, .lh-filter-chip:hover {
  background: #38bdf8;
  color: #0f172a !important;
  border-color: #38bdf8;
}

.lh-pillar-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid #1e293b;
}

.btn-pillar-hero {
  width: 100%;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(192, 132, 252, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
  background: #c084fc;
  color: #0f172a !important;
}
.btn-pillar-hero:hover { transform: translateY(-2px); filter: brightness(1.1); }

.lh-action-bar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (min-width: 768px) {
  .lh-action-bar-grid { grid-template-columns: repeat(4, 1fr); }
}

.btn-pillar {
  width: 100%;
  border: none;
  padding: 0.85rem 0.65rem;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-pillar:hover { transform: translateY(-2px); filter: brightness(1.1); }

.pillar-feed { background: #fbbf24; color: #0f172a !important; }
.pillar-engage { background: #10b981; color: #0f172a !important; }
.pillar-video { background: #f43f5e; color: #ffffff !important; }
.pillar-retrieve { background: #38bdf8; color: #0f172a !important; }

/* INBOX GRID */
.lh-inbox-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 1rem;
  align-items: start;
}

.lh-list-pane {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}

.lh-list-header {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 900;
  color: #38bdf8;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.lh-list-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: transparent !important;
  padding: 0 !important;
}

.lh-lead-card {
  padding: 1.15rem;
  background: #0f172a !important;
  border: 2px solid #334155;
  border-radius: 14px;
  cursor: pointer;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.lh-lead-card:hover, .lh-lead-card.active-lead {
  background: #1e293b !important;
  border-color: #38bdf8;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.lh-lead-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.35rem; }
.lh-lead-name { font-weight: 900; font-size: 1.05rem; color: #ffffff !important; }
.lh-lead-time { font-size: 0.75rem; color: #cbd5e1; font-weight: 800; white-space: nowrap; }
.lh-lead-source { font-size: 0.85rem; color: #38bdf8; font-weight: 800; margin-bottom: 0.35rem; display: block; }
.lh-lead-snippet { font-size: 0.85rem; color: #f8fafc !important; font-weight: 600; line-height: 1.35; margin: 0; }

/* COLOR PILLS */
.lh-tag { font-size: 0.7rem; font-weight: 900; padding: 0.25rem 0.55rem; border-radius: 6px; text-transform: uppercase; display: inline-block; }
.tag-seller { background: #451a03; color: #fde047; border: 1px solid #fbbf24; }
.tag-buyer { background: #064e3b; color: #34d399; border: 1px solid #059669; }
.tag-builder { background: #7c2d12; color: #ffedd5; border: 1px solid #f97316; }
.tag-atty { background: #7f1d1d; color: #fca5a5; border: 1px solid #ef4444; }
.tag-lender { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }
.tag-cobroker { background: #0c4a6e; color: #7dd3fc; border: 1px solid #38bdf8; }
.tag-default { background: #334155; color: #f8fafc; }

.lh-detail-pane {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lh-selector-card {
  background: #0f172a;
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.15);
}

.lh-detail-box {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 1.15rem;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.15);
  position: relative;
}

.lh-card-top-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.75rem;
}

.lh-contact-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #f8fafc;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #1e293b;
}

.lh-contact-list-item { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; flex-wrap: wrap; }

.lh-gis-pill-btn {
  background: #fbbf24;
  color: #0f172a;
  border: none;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 900;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: filter 0.15s ease;
  margin-left: 0.35rem;
  text-decoration: none !important;
}
.lh-gis-pill-btn:hover { filter: brightness(1.1); }

.btn-take-action-wide {
  width: 100%;
  background: #f59e0b;
  color: #0f172a;
  border: none;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  text-transform: uppercase;
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  transition: filter 0.15s ease;
}
.btn-take-action-wide:hover { filter: brightness(1.1); }

.lh-reply-card {
  background: #0f172a;
  border: 2px solid #a855f7;
  border-radius: 14px;
  padding: 1.15rem;
  color: #ffffff;
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.15);
}

.lh-reply-select, .lh-reply-textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: #020617;
  border: 1px solid #334155;
  color: #ffffff !important;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.lh-action-btns { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.btn-lh-send {
  flex: 1;
  min-width: 110px;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.85rem;
  border: none;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
}
.btn-lh-sms { background: #10b981; color: #0f172a !important; }
.btn-lh-email { background: #38bdf8; color: #0f172a !important; }
.btn-lh-call { background: #fbbf24; color: #0f172a !important; }

.lh-task-box { margin-top: 0.65rem; background: #020617; border: 1px solid #334155; border-radius: 8px; padding: 0.65rem; }
.progress-bg { background: #1e293b; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 0.35rem; }
.progress-fill { background: #10b981; height: 100%; width: 0%; }
.lh-task-item { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: #f8fafc; font-weight: 700; margin-top: 0.4rem; cursor: pointer; }

/* 📜 COLLAPSIBLE TIMELINE DRAWER */
.lh-timeline-box {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.lh-timeline-item {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
}
.lh-timeline-date {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 800;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lh-drawer-toggle-btn {
  width: 100%;
  background: #1e293b;
  color: #fbbf24;
  border: 1px solid #fbbf24;
  padding: 0.45rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  margin-top: 0.4rem;
  transition: filter 0.15s ease;
}
.lh-drawer-toggle-btn:hover { filter: brightness(1.2); }

.lh-modal-backdrop {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(2, 6, 23, 0.88); backdrop-filter: blur(8px); z-index: 999999 !important;
  display: flex; align-items: flex-start; justify-content: center; padding: 80px 0.85rem 1rem 0.85rem; box-sizing: border-box; overflow-y: auto;
}
.lh-modal-card {
  background: #0f172a; border: 2px solid #38bdf8; border-radius: 14px;
  width: 100%; max-width: 640px; padding: 1.25rem; box-shadow: 0 25px 50px rgba(0,0,0,0.7);
}
.lh-modal-title { margin: 0 0 0.85rem; font-size: 1.15rem; color: #ffffff; font-weight: 900; border-bottom: 1px solid #334155; padding-bottom: 0.55rem; }
.lh-form-group { margin-bottom: 0.85rem; }
.lh-form-label { display: block; color: #38bdf8; font-size: 0.8rem; font-weight: 900; margin-bottom: 0.3rem; text-transform: uppercase; }
.lh-form-input { width: 100%; padding: 0.75rem; background: #ffffff; border: 2px solid #cbd5e1; border-radius: 8px; color: #0f172a !important; font-size: 0.9rem; font-weight: 800; box-sizing: border-box; }

.ingest-pill-btn {
  background: #1e293b; color: #cbd5e1; border: 1px solid #334155;
  padding: 0.45rem 0.75rem; border-radius: 10px; font-weight: 800; font-size: 0.78rem;
  cursor: pointer; flex: 1; min-width: 90px; text-align: center;
}

.btn-add-task-inline {
  background: #38bdf8; color: #0f172a; border: none; padding: 0.45rem 0.75rem;
  border-radius: 6px; font-weight: 900; font-size: 0.78rem; cursor: pointer; margin-top: 0.5rem;
}

.btn-edit-contact-inline {
  background: #1e293b; color: #fbbf24; border: 1px solid #fbbf24; padding: 0.3rem 0.65rem;
  border-radius: 6px; font-weight: 800; font-size: 0.75rem; cursor: pointer; transition: filter 0.15s ease;
}
.btn-edit-contact-inline:hover { filter: brightness(1.2); }

.lh-compliance-warning-box {
  display: none; background: #451a03; border: 1px solid #fbbf24; color: #fde047;
  padding: 0.75rem; border-radius: 8px; font-size: 0.82rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.85rem;
}

.lh-modal-actions { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 1rem; }
.btn-modal-cancel { background: #334155; color: #fff; border: none; padding: 0.65rem 1.15rem; border-radius: 8px; font-weight: 800; cursor: pointer; }
.btn-modal-save { background: #38bdf8; color: #0c4a6e; border: none; padding: 0.65rem 1.15rem; border-radius: 8px; font-weight: 900; cursor: pointer; }

@media (max-width: 768px) {
  #lead-hub-root { padding: 0 4px !important; margin: 0.25rem auto !important; width: 100% !important; }
  .lh-nav-header { flex-direction: column; align-items: stretch; text-align: center; gap: 0.5rem; }
  .lh-inbox-grid { grid-template-columns: 1fr !important; gap: 0.5rem !important; }
  .lh-action-bar-grid { grid-template-columns: 1fr 1fr; }
  .lh-detail-box { padding: 0.85rem !important; }
}