/* ==========================================================================
   CrewClever — Unified Design System
   All custom styling lives here. Change variables to restyle everything.
   ========================================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS — change these to restyle the entire app
   ========================================================================== */
:root {

  /* ── Brand colors — CrewClever ── */
  --cc-primary:          #FF4F00;
  --cc-primary-dark:     #CC3F00;
  --cc-primary-light:    #FFE8DC;
  --cc-primary-rgb:      255, 79, 0;

  /* ── Neutrals ── */
  --cc-bg:               #f8f8f6;
  --cc-sidebar-bg:       #f7f7f6;
  --cc-surface:          #FFFFFF;
  --cc-border:           #E8E8E4;
  --cc-border-light:     #EFEFEC;
  --cc-muted-bg:         #efeeeb;
  --cc-text:             #0F0F0F;
  --cc-text-muted:       #6B6B6B;
  --cc-text-light:       #c8c8c4;

  /* ── Semantic ── */
  --cc-danger:           #A32D2D;
  --cc-danger-bg:        #FCEBEB;
  --cc-warning:          #854F0B;
  --cc-warning-bg:       #FAEEDA;
  --cc-success:          #1E9E6B;
  --cc-success-bg:       #D4F0E4;

  /* ── Bootstrap overrides ── */
  --primary-rgb:         var(--cc-primary-rgb);
  --secondary-rgb:       var(--cc-primary-rgb);
  --success-rgb:         var(--cc-primary-rgb);
  --links-rgb:           var(--cc-primary-rgb);

  /* ── Purple — active/selected states (Zapier-inspired) ── */
  --cc-purple:           #2d3e50;
  --cc-purple-dark:      #1a2530;
  --cc-purple-light:     #e8ecf0;
  --cc-purple-border:    #b0bec8;

  /* ── Nav colors — used by BOTH main sidebar and settings secondary nav ──
     Change these two groups and both navs update together              */
  --settings-nav-active-bg:    #e8ecf0;
  --settings-nav-active-color: #2d3e50;
  --settings-nav-hover-bg:     #f0f3f5;
  --settings-nav-hover-color:  #2d3e50;

  /* ── Typography ── */
  --cc-font:             'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cc-radius:           8px;
  --cc-radius-sm:        6px;
  --cc-radius-lg:        12px;
  --cc-radius-pill:      20px;

  /* ════════════════════════════════════════════════════════
     SIZE SCALE — change --cc-size to 1, 2, 3, 4, or 5
     1 = compact  |  2 = default  |  3 = comfortable
     4 = large    |  5 = extra large / accessibility
     ════════════════════════════════════════════════════════ */
  --cc-size: 3;

  /* Base unit */
  --cc-unit: calc(var(--cc-size) * 4px);

  /* Font sizes          sz1  sz2  sz3  sz4  sz5  */
  --cc-text-xs:   calc(9px  + var(--cc-size) * 1px);  /* 10  11  12  13  14 */
  --cc-text-sm:   calc(10px + var(--cc-size) * 1px);  /* 11  12  13  14  15 */
  --cc-text-base: calc(11px + var(--cc-size) * 1px);  /* 12  13  14  15  16 */
  --cc-text-md:   calc(12px + var(--cc-size) * 1px);  /* 13  14  15  16  17 */
  --cc-text-lg:   calc(14px + var(--cc-size) * 2px);  /* 16  18  20  22  24 */
  --cc-text-xl:   calc(16px + var(--cc-size) * 3px);  /* 19  22  25  28  31 */
  --cc-text-2xl:  calc(18px + var(--cc-size) * 4px);  /* 22  26  30  34  38 */
  --cc-text-3xl:  calc(20px + var(--cc-size) * 5px);  /* 25  30  35  40  45 */

  /* Spacing               sz1  sz2  sz3  sz4  sz5 */
  --cc-space-xs: calc(2px  + var(--cc-size) * 1px);  /*  3   4   5   6   7 */
  --cc-space-sm: calc(4px  + var(--cc-size) * 2px);  /*  6   8  10  12  14 */
  --cc-space-md: calc(6px  + var(--cc-size) * 3px);  /*  9  12  15  18  21 */
  --cc-space-lg: calc(8px  + var(--cc-size) * 4px);  /* 12  16  20  24  28 */
  --cc-space-xl: calc(12px + var(--cc-size) * 5px);  /* 17  22  27  32  37 */

  /* Input / button height — set explicitly to match --cc-size
     size:  1    2    3    4    5
            28   32   35   40   46
     Update BOTH lines when changing --cc-size              */
  --cc-input-h:     35px;
  --cc-btn-h:       40px;
  --cc-input-pad-x: calc(6px + var(--cc-size) * 2px); /* 8  10  12  14  16 */

  /* Labels */
  --cc-label-size:   var(--cc-text-sm);
  --cc-label-weight: 500;
}

/* ==========================================================================
   2. GLOBAL BASE
   ========================================================================== */
body {
  background-color: var(--cc-bg);
  font-family: var(--cc-font);
  font-size: var(--cc-text-base);
  color: var(--cc-text);
}

a { color: var(--cc-primary); }
a:hover { color: var(--cc-primary-dark); }

p {
  font-size: var(--cc-text-base);
  color: var(--cc-text);
}

h1 { font-size: var(--cc-text-3xl); }
h2 { font-size: var(--cc-text-2xl); }
h3 { font-size: var(--cc-text-xl); }
h4, h5 { font-size: var(--cc-text-lg); }
h6 { font-size: var(--cc-text-md); }

/* ==========================================================================
   3. FORM CONTROLS — scale with --cc-size
   ========================================================================== */
.form-control,
.form-select {
  height: var(--cc-input-h);
  font-size: var(--cc-text-base) !important;
  font-family: var(--cc-font);
  padding: 0 var(--cc-input-pad-x);
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-sm);
  color: var(--cc-text);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 3px rgba(var(--cc-primary-rgb), .12);
}
textarea.form-control {
  height: auto;
  padding: var(--cc-space-sm) var(--cc-input-pad-x);
}
.form-control-sm, .form-select-sm {
  height: var(--cc-input-h);
  font-size: var(--cc-text-sm) !important;
  padding: 0 calc(var(--cc-input-pad-x) - 2px);
}
.form-label,
label.form-label {
  font-size: var(--cc-label-size);
  font-weight: var(--cc-label-weight);
  color: var(--cc-text-muted);
  margin-bottom: var(--cc-space-xs);
  font-family: var(--cc-font);
}
.form-check-input {
  background-color: #fafafa;
  border: 1px solid var(--cc-border);
}
.form-check-input:checked {
  background-color: var(--cc-primary);
  border-color: var(--cc-primary);
}
.table-responsive {
  border-radius: 12px;
  border: 1px solid var(--cc-border);
}
.border-cus-12  { border-radius: 12px !important; }
.border-cus-col { border: 1px solid var(--cc-border) !important; box-shadow: unset !important; }
.border-cus-no-shadow { box-shadow: unset !important; }

/* ==========================================================================
   4. BUTTONS — scale with --cc-size
   ========================================================================== */
.btn {
  height: var(--cc-btn-h);
  font-size: var(--cc-text-base);
  font-family: var(--cc-font);
  padding: 0 var(--cc-space-lg);
  border-radius: var(--cc-radius-sm);
  align-items: center;
  gap: var(--cc-space-xs);
  white-space: nowrap;
}
.btn-sm {
  height: calc(var(--cc-btn-h) - 6px);
  font-size: var(--cc-text-sm);
  padding: 0 var(--cc-space-md);
}
.btn-primary {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--cc-primary-dark);
  border-color: var(--cc-primary-dark);
  color: #fff;
}
.btn-dark {
  background: transparent;
  border: 1px solid #0F0F0F;
  color: #0F0F0F;
}
.btn-dark:hover, .btn-dark:focus {
  background: #0F0F0F;
  border-color: #0F0F0F;
  color: #fff;
}
.btn-outline-primary {
  background: transparent;
  border-color: var(--cc-primary);
  color: var(--cc-primary);
}
.btn-outline-primary:hover {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  color: #fff;
}
.btn-outline-secondary {
  background: transparent;
  border-color: #0F0F0F;
  color: #0F0F0F;
}
.btn-outline-secondary:hover {
  background: var(--cc-muted-bg);
  border-color: #0F0F0F;
  color: #0F0F0F;
}

/* ==========================================================================
   5. CARDS
   ========================================================================== */
.custom-card,
.custom-card-376 {
  border: 1px solid var(--cc-border);
  box-shadow: none;
  border-radius: var(--cc-radius);
  background: var(--cc-surface) !important;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--cc-border);
  padding: var(--cc-space-md) var(--cc-space-lg);
}
.card-body {
  padding: var(--cc-space-lg);
}
.card-title {
  font-size: var(--cc-text-md);
  font-weight: 600;
  color: var(--cc-text);
}

/* ==========================================================================
   6. MAIN SIDEBAR NAV
   ========================================================================== */
.app-sidebar,
.app-sidebar .main-sidebar-header {
  background: var(--cc-sidebar-bg);
  border-right: 1px solid var(--cc-border);
}
.app-sidebar .main-sidebar-header { justify-content: left; }
.app-sidebar .main-sidebar-header .header-logo img {
  height: 2rem;
  margin-top: 6px;
}
.app-sidebar .side-menu__label {
  font-size: var(--cc-text-base);
  font-family: var(--cc-font);
  vertical-align: middle;
  padding-left: 4px;
  color: var(--cc-text);
}
.app-sidebar .side-menu__icon {
  margin-inline-end: .625rem;
  width: 1.15rem; height: 1.15rem;
  font-size: 1.35rem;
  color: var(--cc-text-muted);
  fill: var(--cc-text-muted);
}

/* Active */
.app-sidebar .side-menu__item.active {
  background-color: var(--settings-nav-active-bg) !important;
  font-weight: 500;
  margin: 5px 0;
  border-radius: var(--cc-radius);
}
.app-sidebar .side-menu__item.active .side-menu__label {
  color: var(--settings-nav-active-color) !important;
}
.app-sidebar .side-menu__item.active .side-menu__icon {
  fill: var(--settings-nav-active-color);
  color: var(--settings-nav-active-color);
}

/* Hover */
.app-sidebar .side-menu__item:hover {
  background-color: var(--settings-nav-hover-bg) !important;
  border-radius: var(--cc-radius);
}
.app-sidebar .side-menu__item:hover .side-menu__label {
  color: var(--settings-nav-hover-color) !important;
}
.app-sidebar .side-menu__item:hover .side-menu__icon {
  fill: var(--settings-nav-hover-color);
  color: var(--settings-nav-hover-color);
}

/* ==========================================================================
   7. PIPELINE BOARD
   ========================================================================== */

/* Tabs */
.queue-tab {
  display: inline-flex; align-items: center; gap: var(--cc-space-xs);
  font-size: var(--cc-text-sm); font-weight: 500;
  padding: var(--cc-space-xs) var(--cc-space-md);
  border-radius: var(--cc-radius-pill); cursor: pointer;
  border: 1px solid var(--cc-border);
  background: transparent; color: var(--cc-text-muted);
  transition: all 0.15s; white-space: nowrap;
}
.queue-tab.active             { background: transparent; color: var(--cc-purple); border-color: transparent; border-bottom: 2px solid var(--cc-purple); border-radius: 0; font-weight: 600; }
.queue-tab:hover:not(.active) { background: var(--cc-muted-bg); color: var(--cc-text); border-color: var(--cc-border); }

/* View toggle */
.view-toggle { display: inline-flex; border: 1px solid var(--cc-border); border-radius: 7px; overflow: hidden; }
.view-toggle-btn {
  display: inline-flex; align-items: center; gap: var(--cc-space-xs);
  padding: var(--cc-space-xs) var(--cc-space-md);
  font-size: var(--cc-text-sm); font-weight: 500;
  background: transparent; color: var(--cc-text-muted);
  border: none; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.view-toggle-btn:first-child        { border-right: 1px solid var(--cc-border); }
.view-toggle-btn.active             { background: var(--cc-purple-light); color: var(--cc-purple-dark); font-weight: 600; }
.view-toggle-btn:hover:not(.active) { background: var(--cc-muted-bg); color: var(--cc-text); }

/* Scroll wrappers */
.main-content, .app-content, .container-fluid { overflow-x: visible !important; }
#boardScrollWrapper {
  overflow-x: scroll !important; overflow-y: visible;
  -webkit-overflow-scrolling: touch; width: 100%;
  scrollbar-width: thin; scrollbar-color: var(--cc-border) var(--cc-bg);
}
#boardScrollWrapper::-webkit-scrollbar       { height: 8px; }
#boardScrollWrapper::-webkit-scrollbar-track { background: var(--cc-bg); border-radius: 4px; }
#boardScrollWrapper::-webkit-scrollbar-thumb { background: var(--cc-border); border-radius: 4px; }
#boardScrollWrapper::-webkit-scrollbar-thumb:hover { background: #c8c8c4; }
#boardScrollTop {
  overflow-x: scroll; overflow-y: hidden; width: 100%; margin-bottom: 4px;
  scrollbar-width: thin; scrollbar-color: var(--cc-border) var(--cc-bg);
}
#boardScrollTop::-webkit-scrollbar       { height: 8px; }
#boardScrollTop::-webkit-scrollbar-track { background: var(--cc-bg); border-radius: 4px; }
#boardScrollTop::-webkit-scrollbar-thumb { background: var(--cc-border); border-radius: 4px; }
#boardScrollTop::-webkit-scrollbar-thumb:hover { background: #c8c8c4; }
#boardScrollTop > div { height: 1px; }

/* Board layout */
#pipelineBoard {
  display: flex; gap: var(--cc-space-md);
  align-items: flex-start; min-width: max-content; padding-bottom: 12px;
}

/* Columns */
.pipeline-col {
  flex: 0 0 270px; width: 270px;
  background: var(--cc-bg); border-radius: var(--cc-radius);
  border: 1px solid var(--cc-border);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 260px); transition: opacity 0.2s;
}
.pipeline-col.stage-closed       { opacity: 0.65; }
.pipeline-col.stage-closed:hover { opacity: 1; }
.pipeline-col.col-hidden         { display: none; }
.pipeline-col-header {
  padding: var(--cc-space-md) var(--cc-space-md) calc(var(--cc-space-md) - 2px);
  border-bottom: 1px solid var(--cc-border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0;
}
.pipeline-col-title {
  font-size: var(--cc-text-sm); font-weight: 600; color: var(--cc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pipeline-col-count {
  font-size: var(--cc-text-xs); font-weight: 600; color: var(--cc-text-muted);
  background: var(--cc-muted-bg); border-radius: var(--cc-radius-pill);
  padding: 1px 7px; flex-shrink: 0; min-width: 22px; text-align: center;
  transition: background 0.2s, color 0.2s;
}
.pipeline-col-count.has-leads { background: var(--cc-muted-bg); color: var(--cc-text-muted); font-weight: 600; }
.pipeline-col-cards {
  padding: var(--cc-space-sm); overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 7px; min-height: 60px;
}

/* Lead cards */
.lead-card {
  background: var(--cc-surface); border-radius: var(--cc-radius-sm);
  border: 1px solid var(--cc-border);
  padding: var(--cc-space-md);
  cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s;
}
.lead-card:hover { box-shadow: 0 2px 8px rgba(45,62,80,0.08); border-color: var(--cc-purple-border); }
.lead-card-top   { display: flex; align-items: flex-start; gap: var(--cc-space-sm); margin-bottom: var(--cc-space-sm); }
.lead-avatar {
  width: calc(26px + var(--cc-size) * 2px);
  height: calc(26px + var(--cc-size) * 2px);
  border-radius: 50%;
  background: var(--cc-purple-light); color: var(--cc-purple-dark);
  font-size: var(--cc-text-xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lead-name      { font-size: var(--cc-text-base); font-weight: 600; color: var(--cc-text); line-height: 1.3; word-break: break-word; }
.lead-phone     { font-size: var(--cc-text-xs); color: var(--cc-text-muted); margin-top: 2px; }
.lead-card-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* Pills */
.due-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--cc-text-xs); font-weight: 500;
  padding: 2px 7px; border-radius: var(--cc-radius-pill); white-space: nowrap;
}
.due-overdue  { background: var(--cc-danger-bg);    color: var(--cc-danger); }
.due-today    { background: var(--cc-warning-bg);   color: var(--cc-warning); }
.due-upcoming { background: var(--cc-purple-light); color: var(--cc-purple-dark); }
.due-none     { background: var(--cc-muted-bg);     color: var(--cc-text-muted); }
.rev-pill      { font-size: var(--cc-text-xs); font-weight: 500; padding: 2px 7px; border-radius: var(--cc-radius-pill); white-space: nowrap; }
.rev-confirmed { background: var(--cc-purple-light); color: var(--cc-purple-dark); }
.rev-potential { background: var(--cc-muted-bg);     color: var(--cc-text-muted); }
.source-pill   { font-size: var(--cc-text-xs); color: var(--cc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.health-dot    { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }

/* Empty / skeleton / load more */
.col-empty { padding: 18px 12px; text-align: center; font-size: var(--cc-text-xs); color: var(--cc-text-light); font-style: italic; }
.skeleton-card { background: var(--cc-surface); border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-border); padding: var(--cc-space-md); }
.skeleton-line { background: var(--cc-muted-bg); border-radius: 4px; margin-bottom: 7px; animation: skshimmer 1.4s ease-in-out infinite; }
.skeleton-line:last-child { margin-bottom: 0; }
@keyframes skshimmer { 0%,100%{opacity:1} 50%{opacity:0.4} }
.load-more-btn {
  width: 100%; padding: 7px; font-size: var(--cc-text-xs); color: var(--cc-text-muted);
  background: transparent; border: none; border-top: 1px solid var(--cc-border);
  cursor: pointer; flex-shrink: 0; transition: background 0.12s;
}
.load-more-btn:hover    { background: var(--cc-purple-light); color: var(--cc-purple-dark); }
.load-more-btn:disabled { cursor: default; color: var(--cc-text-light); }

/* Filters / search */
.btn-filters { font-size: var(--cc-text-sm); color: var(--cc-text); border-color: var(--cc-border); }
.btn-filters:hover, .btn-filters:focus { background: var(--cc-muted-bg); }
.btn-filters.filter-active { background: var(--cc-purple); color: #fff; border-color: var(--cc-purple); }
#boardSearch { width: 240px; font-size: var(--cc-text-base); border-color: var(--cc-border); border-radius: var(--cc-radius-sm); }
#boardSearch:focus { border-color: var(--cc-primary); box-shadow: none; }
#hideEmptyWrap { display: none; align-items: center; gap: 6px; font-size: var(--cc-text-sm); color: var(--cc-text-muted); cursor: pointer; user-select: none; }
#hideEmptyWrap input { cursor: pointer; }

/* Offcanvas */
#leadOffcanvas { width: 800px; max-width: 100%; }
@media (max-width: 1199.98px) { #leadOffcanvas { width: 100%; } }
#leadLoader { background: rgba(255,255,255,0.85); z-index: 10; }
#leadQuickViewFrame.invisible { visibility: hidden; }

/* Lead views grid */
.lead-views-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--cc-space-lg); }
.lead-view-card {
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius);
  padding: var(--cc-space-sm) var(--cc-space-xl);
  cursor: pointer; background: var(--cc-surface); transition: .15s; width: 100%;
}
.lead-view-card:hover  { border-color: var(--cc-primary-light); }
.lead-view-card.active { border-color: var(--cc-purple); box-shadow: 0 0 0 1px var(--cc-purple); }
.lead-view-title { font-size: var(--cc-text-xs); color: var(--cc-text-muted); }
.lead-view-count { font-size: var(--cc-text-xl); font-weight: 600; margin-top: 4px; color: var(--cc-text); }

/* ==========================================================================
   8. SETTINGS PAGES — secondary vertical nav + content layout
   ========================================================================== */
.settings-sidenav,
.settings-sidenav ~ *,
.settings-page-wrap,
.settings-content-col {
  font-family: var(--cc-font);
}

/* Desktop sidebar */
.settings-sidenav {
  width: 200px; flex-shrink: 0; padding-top: 4px;
  display: flex; flex-direction: column;
}
.settings-sidenav-group-label {
  display: block; font-size: var(--cc-text-xs); font-weight: 600;
  color: var(--cc-text-muted); text-transform: uppercase; letter-spacing: .07em;
  padding: 16px 12px 6px; user-select: none;
}
.settings-sidenav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; margin: 1px 0; border-radius: var(--cc-radius-sm);
  font-size: var(--cc-text-md); font-weight: 400; color: var(--cc-text);
  text-decoration: none; transition: background .1s, color .1s;
  white-space: nowrap; width: 100%; box-sizing: border-box;
}
.settings-sidenav-item i { font-size: 15px; flex-shrink: 0; color: var(--cc-text-muted); transition: color .1s; }
.settings-sidenav-item:hover           { color: var(--settings-nav-hover-color); text-decoration: none; }
.settings-sidenav-item:hover i         { color: var(--settings-nav-hover-color); }
.settings-sidenav-item.active          { color: var(--settings-nav-active-color); font-weight: 500; }
.settings-sidenav-item.active i        { color: var(--settings-nav-active-color); }

/* Page structure */
.settings-page-wrap   { max-width: 1200px; }
.settings-content-col { max-width: 1000px; flex: 1; min-width: 0; }

/* Headings */
.settings-page-title {
  font-size: var(--cc-text-2xl); font-weight: 600;
  color: var(--cc-text); margin-bottom: 4px;
}
.settings-page-subtitle {
  font-size: var(--cc-text-base); color: var(--cc-text-muted); margin-bottom: 1.75rem;
}
.settings-section-heading {
  font-size: var(--cc-text-md); font-weight: 600; color: var(--cc-text);
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--cc-border-light);
}

/* Form overrides inside settings */
.settings-page-wrap .form-label,
.settings-page-wrap label.form-label {
  font-size: var(--cc-label-size);
  font-weight: var(--cc-label-weight);
  color: var(--cc-text-muted);
}
.settings-page-wrap .form-control,
.settings-page-wrap .form-select {
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-sm);
  color: var(--cc-text);
}
.settings-page-wrap .form-control:focus,
.settings-page-wrap .form-select:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 3px rgba(var(--cc-primary-rgb), .10);
}

/* Hint / save flash */
.settings-hint       { font-size: var(--cc-text-xs); color: var(--cc-text-muted); margin-top: 4px; }
.settings-save-flash { font-size: var(--cc-text-base); color: var(--cc-primary); }

/* Toggle switch */
.toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #d1d5db;
  border-radius: 22px; cursor: pointer; transition: background .2s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--cc-primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }
.settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--cc-border-light);
}
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-label { font-size: var(--cc-text-md); font-weight: 500; color: var(--cc-text); }
.settings-toggle-desc  { font-size: var(--cc-text-sm); color: var(--cc-text-muted); margin-top: 2px; }

/* ==========================================================================
   9. MOBILE — Settings drill-down pattern
   ========================================================================== */
@media (max-width: 768px) {
  .settings-page-wrap   { flex-direction: column !important; gap: 0 !important; }
  .settings-sidenav     { display: none !important; }
  .settings-content-col { max-width: 100% !important; width: 100%; padding: 0 4px; }
  .settings-page-title    { font-size: var(--cc-text-xl) !important; }
  .settings-page-subtitle { font-size: var(--cc-text-sm) !important; margin-bottom: 1rem !important; }

  /* Mobile section list */
  .settings-mobile-list { width: 100%; padding: 0 4px; }
  .settings-mobile-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; text-decoration: none;
    border-bottom: 1px solid var(--cc-border-light); background: var(--cc-surface);
    transition: background .1s;
  }
  .settings-mobile-row:last-child { border-bottom: none; }
  .settings-mobile-row:hover { background: var(--cc-bg); }
  .settings-mobile-row-icon {
    width: 36px; height: 36px; border-radius: var(--cc-radius-sm);
    background: var(--cc-muted-bg); display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
  }
  .settings-mobile-row-icon i    { font-size: 17px; color: var(--cc-text-muted); }
  .settings-mobile-row-text      { flex: 1; min-width: 0; }
  .settings-mobile-row-title     { font-size: 14px; font-weight: 500; color: var(--cc-text); }
  .settings-mobile-row-subtitle  { font-size: 12px; color: var(--cc-text-muted); margin-top: 1px; }
  .settings-mobile-row-chevron   { font-size: 18px; color: var(--cc-text-light); flex-shrink: 0; }

  /* Back button */
  .settings-mobile-back {
    display: flex !important; align-items: center; gap: 4px;
    padding: 12px 4px 6px; font-size: 14px; font-weight: 500;
    color: var(--cc-text-muted); text-decoration: none;
  }
  .settings-mobile-back i { font-size: 18px; }
  .settings-mobile-back:hover { color: var(--cc-text); }
}

@media (min-width: 769px) {
  .settings-mobile-list { display: none !important; }
  .settings-mobile-back { display: none !important; }
}

/* ==========================================================================
   10. CUSTOM SEARCHABLE DROPDOWNS
   ========================================================================== */
.tz-wrapper, .ph-wrapper { position: relative; }

.tz-display, .ph-display {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px var(--cc-input-pad-x);
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-surface); cursor: pointer;
  font-size: var(--cc-text-base); color: var(--cc-text);
  height: var(--cc-input-h); user-select: none;
  font-family: var(--cc-font); transition: border-color .15s;
  box-sizing: border-box;
}
.tz-display:hover, .ph-display:hover { border-color: #adb5bd; }

.tz-display .tz-chevron,
.ph-display .ph-chevron {
  font-size: 11px; color: var(--cc-text-muted); transition: transform .2s; flex-shrink: 0;
}
.tz-display.open .tz-chevron,
.ph-display.open .ph-chevron { transform: rotate(180deg); }

.tz-dropdown, .ph-dropdown {
  display: none; position: absolute; z-index: 1050;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--cc-surface); border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius); overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.tz-dropdown.open, .ph-dropdown.open { display: block; }

.tz-search-wrap, .ph-search-wrap {
  padding: var(--cc-space-sm); border-bottom: 1px solid var(--cc-border-light);
}
.tz-search, .ph-search {
  width: 100%; box-sizing: border-box;
  padding: 7px var(--cc-input-pad-x) 7px 32px;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  font-size: var(--cc-text-base); color: var(--cc-text); outline: none;
  font-family: var(--cc-font);
  background: var(--cc-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}
.tz-search:focus, .ph-search:focus {
  border-color: var(--cc-primary);
  background-color: var(--cc-surface);
}

.tz-list, .ph-list { max-height: 240px; overflow-y: auto; }
.tz-option, .ph-option {
  padding: 8px var(--cc-space-md);
  font-size: var(--cc-text-base); color: var(--cc-text);
  cursor: pointer; transition: background .1s; font-family: var(--cc-font);
}
.tz-option:hover, .ph-option:hover       { background: var(--settings-nav-hover-bg); color: var(--settings-nav-hover-color); }
.tz-option.selected, .ph-option.selected { background: var(--settings-nav-active-bg); color: var(--settings-nav-active-color); font-weight: 500; }
.tz-option.hidden, .ph-option.hidden     { display: none; }

.tz-no-results, .ph-no-results {
  padding: 12px; font-size: var(--cc-text-base);
  color: var(--cc-text-muted); text-align: center; display: none;
}

.ph-option-divider {
  padding: 4px var(--cc-space-md); font-size: var(--cc-text-xs);
  color: var(--cc-border); border-top: 1px solid var(--cc-border-light);
}

.ph-input-row { display: flex; gap: 0; align-items: stretch; }
.ph-input-row .ph-wrapper { width: auto; flex-shrink: 0; max-height: var(--cc-input-h); }
.ph-input-row .ph-wrapper .ph-display {
  border-radius: var(--cc-radius-sm) 0 0 var(--cc-radius-sm);
  border-right: none; white-space: nowrap;
  padding: 0 10px 0 8px; gap: 6px; height: 100%;
}
.ph-input-row input[type=tel] {
  border-radius: 0 var(--cc-radius-sm) var(--cc-radius-sm) 0;
  flex: 1; height: var(--cc-input-h);
}
.ph-dropdown { min-width: 260px; }

/* ==========================================================================
   11. LOGO & ICON UPLOAD
   ========================================================================== */
.cc-asset-upload {
  display: flex; align-items: normal; gap: var(--cc-space-md);
}
.cc-asset-preview {
  flex-shrink: 0; width: 80px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-bg); overflow: hidden;
}
.cc-asset-preview.logo { height: 52px; width: 140px; }
.cc-asset-preview.icon { height: 52px; width: 140px; }
.cc-asset-preview img  { width: 100%; height: 100%; object-fit: contain; }
.cc-asset-info { display: flex; flex-direction: column; gap: var(--cc-space-xs); max-width: 140px; }

@media (max-width: 768px) {
  .cc-logo-icon-grid          { flex-direction: column !important; }
  .cc-logo-icon-grid > div    { width: 100% !important; }
  .cc-asset-preview.logo      { width: 120px; height: 60px; }
  .cc-asset-preview.icon      { width: 120px; height: 60px; }
}

/* ==========================================================================
   12. CREWCLEVER STAGE PANEL — quick view panel styles
   ========================================================================== */

/* Section cards inside stage panels */
.nl-section {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.nl-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; cursor: pointer; user-select: none;
  transition: background 0.1s;
}
.nl-section-header:hover { background: var(--cc-muted-bg); }
.nl-section-header-left {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--cc-text-base); font-weight: 500; color: var(--cc-text);
}
.nl-section-header-left i { font-size: 15px; color: var(--cc-text-muted); }
.nl-section-toggle {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--cc-muted-bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--cc-text); transition: background 0.12s;
  flex-shrink: 0; line-height: 1;
}
.nl-section-toggle.open { background: var(--cc-purple); color: #fff; }
.nl-section-body {
  display: none; border-top: 1px solid var(--cc-border-light); padding: 14px 16px;
}
.nl-section-body.open { display: block; }

/* Move stage bar */
.nlp-move-bar {
  background: var(--cc-surface); border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius); padding: 12px 14px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.nlp-move-label { font-size: var(--cc-text-sm); color: var(--cc-text-muted); flex-shrink: 0; }
.nlp-next-btn {
  flex: 1; padding: 8px 12px;
  background: var(--cc-purple); color: #fff;
  border: none; border-radius: var(--cc-radius-sm);
  font-size: var(--cc-text-base); font-weight: 500; cursor: pointer;
  text-align: left; display: flex; align-items: center;
  justify-content: space-between; transition: background 0.12s;
}
.nlp-next-btn:hover { background: var(--cc-purple-dark); }
.nlp-next-btn .nlp-next-arrow {
  background: rgba(255,255,255,0.2); border-radius: 20px;
  padding: 2px 8px; font-size: 11px;
}
.nlp-dots-btn {
  width: 34px; height: 34px;
  background: var(--cc-muted-bg); border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--cc-text); transition: background 0.12s;
  font-weight: 700; letter-spacing: 1px; flex-shrink: 0;
}
.nlp-dots-btn:hover { background: var(--cc-border); }

/* Contact button in mini header */
.nlp-contact-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; background: var(--cc-primary); color: #fff;
  border: none; border-radius: var(--cc-radius-sm);
  font-size: var(--cc-text-sm); font-weight: 500; cursor: pointer;
  transition: background 0.12s; white-space: nowrap;
}
.nlp-contact-btn:hover { background: var(--cc-primary-dark); }

/* Type buttons in contact section */
.nlp-type-btn {
  padding: 7px 14px;
  border: 1px solid #0F0F0F; border-radius: var(--cc-radius-sm);
  background: transparent; font-size: var(--cc-text-sm); font-weight: 500;
  color: #0F0F0F; cursor: pointer; transition: all 0.12s;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.nlp-type-btn:hover { background: var(--cc-muted-bg); }
.nlp-type-btn.active { background: #2d3e50; color: #fff; border-color: #2d3e50; }
.nlp-type-btn i { font-size: 13px; }

/* Day quick buttons */
.nlp-day-btn {
  flex: 1; padding: 6px 3px;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-surface); font-size: var(--cc-text-xs);
  color: var(--cc-text-muted); cursor: pointer; transition: all 0.12s; text-align: center;
}
.nlp-day-btn:hover { background: var(--cc-muted-bg); }
.nlp-day-btn.active { background: var(--cc-purple); color: #fff; border-color: var(--cc-purple); }

/* ==========================================================================
   13. PIPELINE COLUMN STAGE ACCENTS
   ========================================================================== */
.pipeline-col-header { position: relative; }
.pipeline-col[data-stage="lead_intake"] .pipeline-col-title::before   { content:''; display:inline-block; width:3px; height:13px; background:#FF4F00; border-radius:2px; margin-right:7px; vertical-align:middle; }
.pipeline-col[data-stage="assessment"] .pipeline-col-title::before    { content:''; display:inline-block; width:3px; height:13px; background:#2d3e50; border-radius:2px; margin-right:7px; vertical-align:middle; }
.pipeline-col[data-stage="quoting"] .pipeline-col-title::before       { content:''; display:inline-block; width:3px; height:13px; background:#0ea5e9; border-radius:2px; margin-right:7px; vertical-align:middle; }
.pipeline-col[data-stage="order"] .pipeline-col-title::before         { content:''; display:inline-block; width:3px; height:13px; background:#10b981; border-radius:2px; margin-right:7px; vertical-align:middle; }
.pipeline-col[data-stage="invoicing"] .pipeline-col-title::before     { content:''; display:inline-block; width:3px; height:13px; background:#f59e0b; border-radius:2px; margin-right:7px; vertical-align:middle; }
.pipeline-col[data-stage="closed"] .pipeline-col-title::before        { content:''; display:inline-block; width:3px; height:13px; background:#6B6B6B; border-radius:2px; margin-right:7px; vertical-align:middle; }

/* ==========================================================================
   14. QUICK VIEW — lead workspace page
   ========================================================================== */

/* ── Back link ── */
.qv-back-link {
  color: var(--cc-text-muted);
  text-decoration: none;
  font-size: var(--cc-text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.12s;
}
.qv-back-link:hover { color: var(--cc-text); }

/* ── Collapsible sections ── */
.qv-section {
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--cc-surface);
}
.qv-section-header {
  padding: 11px 16px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  transition: background 0.12s;
}
.qv-section-header:hover { background: var(--cc-muted-bg); }
.qv-section-title {
  font-size: 11px; font-weight: 600;
  color: var(--cc-text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 8px;
}
.qv-section-title i { color: var(--cc-text-muted) !important; font-size: 14px; }
.qv-section-chevron {
  font-size: 12px; color: var(--cc-text-muted);
  transition: transform 0.2s;
}
.qv-section-chevron.open { transform: rotate(180deg); }
.qv-section-body {
  border-top: 1px solid var(--cc-border-light);
  display: none; flex-direction: column; gap: 0;
}
.qv-section-body.open { display: flex; }
.qv-section-body-inner { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

/* ── Stage panel styles ── */
.sp-section-label {
  font-size: 11px; font-weight: 500; color: var(--cc-text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.sp-type-row { display: flex; gap: 6px; }
.sp-type-btn {
  flex: 1; padding: 7px 6px; text-align: center;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-surface); font-size: 12px; font-weight: 500;
  color: var(--cc-text-muted); cursor: pointer; transition: all 0.12s;
}
.sp-type-btn:hover { background: var(--cc-muted-bg); color: var(--cc-text); }
.sp-type-btn.active {
  background: var(--cc-purple-light);
  color: var(--cc-purple-dark);
  border-color: var(--cc-purple-border);
}
.sp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-pill {
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--cc-border);
  font-size: 12px; color: var(--cc-text-muted); cursor: pointer;
  transition: all 0.12s; user-select: none;
}
.sp-pill:hover { border-color: var(--cc-border); color: var(--cc-text); background: var(--cc-muted-bg); }
.sp-pill.active { background: var(--cc-muted-bg); color: var(--cc-text); border-color: #c8c8c4; }
.sp-day-row { display: flex; gap: 6px; }
.sp-day-btn {
  flex: 1; padding: 6px 4px; text-align: center;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-surface); font-size: 11px;
  color: var(--cc-text-muted); cursor: pointer; transition: all 0.12s;
}
.sp-day-btn:hover { background: var(--cc-muted-bg); }
.sp-day-btn.active {
  background: var(--cc-purple-light);
  color: var(--cc-purple-dark);
  border-color: var(--cc-purple-border);
}
.sp-divider { height: 1px; background: var(--cc-border-light); }
.sp-move-main {
  width: 100%; padding: 9px 13px; background: var(--cc-muted-bg);
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color 0.12s; color: var(--cc-text-muted);
}
.sp-move-main:hover { border-color: #c8c8c4; }
.sp-stage-dd {
  display: none; border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-sm); overflow: hidden; margin-top: 6px;
}
.sp-stage-dd.open { display: block; }
.sp-dd-grp {
  padding: 7px 12px 4px; font-size: 10px; font-weight: 500;
  color: var(--cc-text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; background: var(--cc-muted-bg);
}
.sp-dd-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-top: 1px solid var(--cc-border-light); cursor: pointer;
  transition: background 0.12s; background: var(--cc-surface);
}
.sp-dd-item:hover { background: var(--cc-muted-bg); }
.sp-dd-item.is-cur { opacity: 0.4; pointer-events: none; }
.sp-dd-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sp-dd-name { font-size: 13px; color: var(--cc-text); flex: 1; }
.sp-dd-tag { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 20px; }
.sp-dd-tag.next { background: var(--cc-purple-light); color: var(--cc-purple-dark); }
.sp-dd-tag.skip { background: var(--cc-muted-bg); color: var(--cc-text-muted); }
.sp-move-confirm {
  width: 100%; padding: 10px; background: var(--cc-purple);
  color: #fff; border: none; border-radius: var(--cc-radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 0.15s; margin-top: 8px;
}
.sp-move-confirm:hover { background: var(--cc-purple-dark); }

/* ── Log activity section ── */
.act-type-select-wrap { position: relative; }
.act-type-select-wrap select {
  width: 100%; padding: 9px 36px 9px 14px;
  border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
  background: var(--cc-surface); font-size: 13px; color: var(--cc-text);
  appearance: none; cursor: pointer; font-family: var(--cc-font);
}
.act-type-select-wrap::after {
  content: '∨'; position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%); font-size: 12px;
  color: var(--cc-text-muted); pointer-events: none;
}
.act-form { display: none; flex-direction: column; gap: 10px; }
.act-form.active { display: flex; }

/* ── Estimate line items ── */
.est-line { padding: 10px 30px 8px 10px; }
.btn-remove-line {
  top: 8px; right: 8px; width: 20px; height: 20px;
  background: var(--cc-danger-bg); border-radius: 50%;
  color: var(--cc-danger); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.btn-remove-line:hover { background: #fecaca; }

/* ── Misc row buttons ── */
.measurement-row {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--cc-border-light);
}
.measurement-row:last-child { border-bottom: none; }
.measurement-row input { font-size: 12px; }
.btn-add-row {
  font-size: 12px; color: var(--cc-text-muted); background: none;
  border: 1px dashed var(--cc-border); border-radius: var(--cc-radius-sm);
  padding: 6px 12px; cursor: pointer; width: 100%;
  margin-top: 6px; transition: all 0.12s;
}
.btn-add-row:hover { border-color: #c8c8c4; color: var(--cc-text); }
.btn-remove-row {
  background: none; border: none; color: var(--cc-text-light);
  font-size: 16px; cursor: pointer; padding: 0 2px;
  line-height: 1; transition: color 0.12s; flex-shrink: 0;
}
.btn-remove-row:hover { color: var(--cc-danger); }

/* ── Contact shortcut buttons — all same outline dark style ── */
.contact-shortcut {
  border-color: var(--cc-border) !important;
  color: var(--cc-text) !important;
  background: transparent !important;
}
.contact-shortcut:hover {
  background: var(--cc-muted-bg) !important;
  border-color: var(--cc-text) !important;
  color: var(--cc-text) !important;
}

/* ── Lead avatar in header ── */
.lead-header-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cc-muted-bg);
  color: var(--cc-text);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Activity timeline ── */
.tl-entry .rounded-circle { flex-shrink: 0; }

/* ==========================================================================
   15. MISC FIXES
   ========================================================================== */

/* Back to Jobs / back navigation links — neutral not orange */
.qv-back-link,
a[href*="jobs"].back-link,
.back-to-jobs {
  color: var(--cc-text-muted) !important;
  text-decoration: none;
  font-size: var(--cc-text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qv-back-link:hover,
a[href*="jobs"].back-link:hover,
.back-to-jobs:hover {
  color: var(--cc-text) !important;
}

/* Mini header inside new-lead-panel — stage badge neutral */
.nlp-stage-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--cc-muted-bg);
  color: var(--cc-text-muted);
  border: 1px solid var(--cc-border);
}

/* nlp-move-bar next stage button — Crew Orange (primary action) */
.nlp-next-btn {
  background: var(--cc-primary) !important;
  border: none;
}
.nlp-next-btn:hover {
  background: var(--cc-primary-dark) !important;
}

/* Section toggle open state — charcoal not hard black */
.nlp-section-toggle.open {
  background: var(--cc-purple) !important;
  color: #fff;
}

/* Follow-up badge — warning amber */
.nlp-fu-badge {
  font-size: 11px;
  color: var(--cc-warning);
  background: var(--cc-warning-bg);
  border: 1px solid #F5D6A0;
  padding: 3px 9px;
  border-radius: 20px;
  margin-left: 6px;
}

/* Back to Jobs link */
#quickViewBackArrow {
  color: var(--cc-text-muted) !important;
  font-weight: 500;
}
#quickViewBackArrow:hover {
  color: var(--cc-text) !important;
}

/* nlp-log-btn — now uses standard outline dark style via .nlp-section-body .btn-outline-secondary */

/* nlp-next-btn removed — panel now uses sp-move-main dropdown */

/* ── Buttons inside nlp collapse panels — outline dark, auto width ── */
.nlp-section-body .btn-outline-secondary {
  border-color: #0F0F0F;
  color: #0F0F0F;
  background: transparent;
}
.nlp-section-body .btn-outline-secondary:hover {
  background: var(--cc-muted-bg);
  border-color: #0F0F0F;
  color: #0F0F0F;
}

/* ==========================================================================
   16. LEAD HEADER — mobile optimised
   ========================================================================== */

/* Contact dropdown items */
.contact-dd-item {
  border-bottom: 1px solid var(--cc-border-light);
  transition: background 0.1s;
}
.contact-dd-item:last-child { border-bottom: none; }
.contact-dd-item:hover { background: var(--cc-muted-bg); }

/* Copy button */
.copy-btn {
  background: var(--cc-muted-bg);
  border: none;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--cc-text-muted);
  cursor: pointer;
  line-height: 1.6;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--cc-text); background: #e5e5e2; }

/* Lead header contact detail row truncation */
@media (max-width: 480px) {
  .lead-header-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 11px !important;
  }
}

/* ==========================================================================
   16. LEAD HEADER — mobile optimised
   ========================================================================== */

/* Contact dropdown items */
.contact-dd-item {
  border-bottom: 1px solid var(--cc-border-light);
  transition: background 0.1s;
}
.contact-dd-item:last-child { border-bottom: none; }
.contact-dd-item:hover { background: var(--cc-muted-bg); }

/* Copy button — standalone pill */
.copy-btn {
  background: var(--cc-muted-bg);
  border: none;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--cc-text-muted);
  cursor: pointer;
  line-height: 1.6;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--cc-text); background: #e5e5e2; }

/* Lead header contact detail row truncation */
@media (max-width: 480px) {
  .lead-header-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 11px !important;
  }
}

/* ==========================================================================
   17. PANEL HISTORY SECTIONS
   ========================================================================== */

.nlp-history-wrap { margin-bottom: 10px; }
.nlp-history-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--cc-text-muted); margin-bottom: 6px;
}
.nlp-history-list {
  max-height: 200px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: var(--cc-border) transparent;
}
.nlp-history-list::-webkit-scrollbar { width: 4px; }
.nlp-history-list::-webkit-scrollbar-thumb { background: var(--cc-border); border-radius: 4px; }
.nlp-history-list .nlp-history-item { margin-bottom: 0; }
.nlp-history-item {
  background: var(--cc-muted-bg); border-radius: 6px;
  padding: 8px 10px; font-size: 12px;
}
.nlp-history-item-top {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.nlp-history-item-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--cc-surface); border: 1px solid var(--cc-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nlp-history-item-icon i { font-size: 11px; color: var(--cc-text-muted); }
.nlp-history-item-title { font-size: 12px; font-weight: 500; color: var(--cc-text); flex: 1; }
.nlp-history-item-time  { font-size: 11px; color: var(--cc-text-muted); }
.nlp-history-item-note  {
  font-size: 12px; color: var(--cc-text-muted);
  margin-top: 2px; padding-left: 28px; line-height: 1.4;
}
.nlp-history-loader {
  padding: 8px 0; display: flex; justify-content: center;
}
.nlp-history-divider {
  height: 1px; background: var(--cc-border-light); margin: 10px 0;
}
.nlp-show-more-btn {
  width: 100%; padding: 5px; font-size: 11px; color: var(--cc-text-muted);
  background: transparent; border: none;
  border-top: 1px solid var(--cc-border-light);
  cursor: pointer; margin-top: 4px; transition: color 0.12s;
}
.nlp-show-more-btn:hover { color: var(--cc-text); }

/* Current follow-up card */
.nlp-fu-card {
  background: var(--cc-muted-bg); border-radius: 6px;
  padding: 10px 12px; margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 10px;
}
.nlp-fu-card-icon        { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.nlp-fu-card-icon.overdue  { color: var(--cc-danger); }
.nlp-fu-card-icon.today    { color: var(--cc-warning); }
.nlp-fu-card-icon.upcoming { color: var(--cc-purple); }
.nlp-fu-card-date   { font-size: 13px; font-weight: 500; color: var(--cc-text); margin: 0 0 2px; }
.nlp-fu-card-reason { font-size: 12px; color: var(--cc-text-muted); margin: 0; }

/* ==========================================================================
   18. PRODUCT MULTI-SELECT
   ========================================================================== */

.nlp-product-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 10px;
  background: var(--cc-purple-light); border: 1px solid var(--cc-purple-border);
  border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--cc-purple-dark);
}
.nlp-product-pill-remove {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--cc-purple-dark); font-size: 14px; line-height: 1;
  display: flex; align-items: center; opacity: 0.7;
}
.nlp-product-pill-remove:hover { opacity: 1; }
.nlp-product-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-size: 13px; color: var(--cc-text); cursor: pointer;
  border-bottom: 1px solid var(--cc-border-light); transition: background 0.1s;
}
.nlp-product-option:last-child { border-bottom: none; }
.nlp-product-option:hover { background: var(--cc-muted-bg); }
.nlp-product-option.selected { background: var(--cc-purple-light); }
.nlp-product-option input[type=checkbox] { flex-shrink: 0; accent-color: var(--cc-purple); }

/* ==========================================================================
   19. FILE UPLOAD
   ========================================================================== */

.nlp-upload-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; background: var(--cc-muted-bg);
  border: 1px solid var(--cc-border); border-radius: 6px;
  margin-bottom: 6px; font-size: 12px;
}
.nlp-upload-item .nlp-upload-status {
  font-size: 11px; color: var(--cc-text-muted); margin-left: auto; flex-shrink: 0;
}
.nlp-upload-item .nlp-upload-remove {
  background: none; border: none; color: var(--cc-text-muted);
  font-size: 16px; cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
}
.nlp-upload-item .nlp-upload-remove:hover { color: var(--cc-danger); }

/* ==========================================================================
   20. ASSIGN DROPDOWN
   ========================================================================== */

.nlp-assign-option {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  cursor: pointer; border-bottom: 1px solid var(--cc-border-light);
  transition: background 0.1s;
}
.nlp-assign-option:last-child { border-bottom: none; }
.nlp-assign-option:hover { background: var(--cc-muted-bg); }

/* ==========================================================================
   21. ACTIVITY TIMELINE FILTERS
   ========================================================================== */

#tl-filter-type,
#tl-filter-date {
  border-color: var(--cc-border);
  font-size: 12px;
  color: var(--cc-text);
  background: var(--cc-surface);
  border-radius: var(--cc-radius-sm);
}
#tl-filter-type:focus,
#tl-filter-date:focus {
  border-color: var(--cc-purple);
  box-shadow: none;
}


/* Pins Settings to the true bottom of the sidebar, outside the
   scrolling nav list — .app-sidebar is position:fixed with
   .main-sidebar filling it at height:100%, so turning the sidebar
   into a flex column lets .main-sidebar scroll independently while
   .sidebar-bottom-menu stays fixed at the end of the column. */
.app-sidebar { display: flex !important; flex-direction: column !important; }
.app-sidebar .main-sidebar { flex: 1 1 auto !important; overflow-y: auto !important; height: auto !important; }
.sidebar-bottom-menu { flex: 0 0 auto; border-top: 1px solid rgba(0, 0, 0, .08); padding: 6px 0; }