/* Leads Module CSS: Admin Spreadsheet Table View & Executive Phone Card View */

/* --- Container & Global Typography --- */
#view-leads {
  padding: 0 0 40px;
  max-width: 100%;
  min-width: 0;
}

/* Admin list-first navigation */
.crm-outline-button{display:inline-flex;align-items:center;gap:8px;border:2px solid #111;border-radius:12px;background:#fff;color:#111;padding:10px 18px;font-weight:850;text-transform:uppercase;letter-spacing:.025em;box-shadow:0 2px 0 #111}.crm-filter-panel{display:grid;grid-template-columns:1fr 1fr;gap:20px;border:2px solid #111;border-radius:14px;padding:24px 28px;margin:24px 0 30px}.crm-filter-panel label{font-size:.82rem;color:#334155}.crm-filter-panel select{display:block;width:100%;height:49px;margin-top:7px;border:2px solid #aaa;border-radius:13px;background:#fff;padding:0 16px;font-size:.88rem}.crm-search-panel{display:flex;align-items:center;gap:10px;border:2px solid #111;border-radius:14px;padding:26px 28px;margin-bottom:30px}.crm-search-panel input{width:100%;height:52px;border:2px solid #aaa;border-radius:13px;padding:0 18px 0 4px;font-size:.9rem;outline:none}.crm-search-icon{color:#94a3b8;margin-left:15px}.crm-list-stack{display:grid;gap:18px}.crm-list-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;border:2px solid #111;border-radius:14px;padding:28px 32px;background:#fff}.crm-list-title{display:flex;align-items:center;gap:16px}.crm-list-title h3{margin:0;font-size:1.05rem}.crm-list-metrics{display:flex;align-items:center;gap:28px;flex-wrap:wrap;margin:25px 0 20px;color:#334155;font-size:.82rem}.crm-list-metrics span{display:inline-flex;align-items:center;gap:4px}.crm-assigned-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:.75rem;text-transform:uppercase}.crm-agent-chip{border:2px dashed #aaa;border-radius:999px;padding:5px 12px;font-weight:800}.crm-agent-chip.muted{color:#64748b}.crm-list-card-actions{display:flex;align-items:center;gap:10px}.crm-card-button{display:inline-flex;align-items:center;gap:7px;border:2px solid #111;border-radius:12px;background:#fff;padding:9px 14px;text-transform:uppercase;font-weight:850}.crm-icon-button{border:0;background:transparent;padding:8px;display:grid;place-items:center}.crm-upload-panel{border:2px solid #111;border-radius:14px;padding:28px;margin-top:34px}.crm-upload-dropzone{min-height:390px;border:2px dashed #ddd;border-radius:18px;display:grid;place-content:center;justify-items:center;text-align:center;cursor:pointer}.crm-upload-dropzone:hover,.crm-upload-dropzone.dragging{background:#fafafa;border-color:#777}.crm-upload-icon{color:#475569;margin-bottom:22px}.crm-upload-dropzone>strong{font-size:1.3rem}.crm-upload-dropzone>p{font-size:1.02rem;color:#475569;margin:14px 0 26px}.crm-upload-select{display:inline-flex;align-items:center;gap:9px;border:2px solid #111;border-radius:12px;padding:10px 18px;font-weight:850;text-transform:uppercase}.crm-upload-file{display:flex;align-items:center;gap:14px;border:2px solid #111;border-radius:12px;padding:16px 18px}.crm-upload-file>div{flex:1}.crm-upload-file strong,.crm-upload-file small{display:block}.crm-upload-file small{color:#64748b;margin-top:3px}.crm-upload-review{margin-top:22px;border:2px solid #111;border-radius:14px;padding:26px}.crm-review-head{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:22px}.crm-review-head h3{margin:0 0 5px;font-size:1.2rem}.crm-review-head p{margin:0;color:#64748b}.crm-review-count{border:2px solid #111;border-radius:999px;padding:6px 12px;font-weight:800;font-size:.76rem}.crm-review-form{display:grid;gap:18px}.crm-review-destination{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.crm-review-destination label,.crm-review-mapping label,.crm-review-form>label{display:grid;gap:7px;font-weight:750;font-size:.8rem}.crm-review-destination select,.crm-review-mapping select,.crm-review-form>label select{height:46px;border:2px solid #aaa;border-radius:11px;padding:0 12px;background:#fff}.crm-review-mapping{display:grid;grid-template-columns:1fr 1fr;gap:14px}.crm-review-form h4{margin:0}.crm-review-owners .lead-choices{margin:0}
.leads-list-actions{display:flex;gap:8px;flex-wrap:wrap}.leads-list-search{width:100%;max-width:520px;margin:4px 0 18px;border:1.5px solid #cbd5e1;border-radius:10px;padding:11px 14px}.leads-list-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.leads-list-card{display:block;text-align:left;background:#fff;border:1.5px solid #cbd5e1;border-radius:14px;padding:18px;color:#0f172a;cursor:pointer;transition:.15s}.leads-list-card:hover{border-color:#0f172a;box-shadow:0 5px 16px #0f172a10;transform:translateY(-1px)}.leads-list-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.leads-list-card-top strong{font-size:1.05rem}.leads-list-card p{margin:16px 0 8px;color:#475569}.leads-list-card small{color:#64748b}.leads-upload-page{max-width:760px;padding:22px;display:grid;gap:16px}.leads-upload-page>label{display:grid;gap:6px;font-weight:750}.leads-upload-page input,.leads-upload-page select,.leads-upload-review select{width:100%;padding:10px;border:1.5px solid #cbd5e1;border-radius:9px}.leads-upload-review{display:grid;gap:12px;border-top:1px solid #e2e8f0;padding-top:18px}.leads-import-summary{padding:10px;border-radius:8px;background:#f8fafc}.leads-simple-tools{display:grid;grid-template-columns:minmax(220px,1fr) 230px;gap:10px;margin-bottom:14px}.leads-simple-tools input,.leads-simple-tools select{padding:10px 12px;border:1.5px solid #cbd5e1;border-radius:9px}.leads-simple-table-wrap{overflow:auto;border:1.5px solid #cbd5e1;border-radius:12px;background:#fff}.leads-simple-table{width:100%;border-collapse:collapse;min-width:820px}.leads-simple-table th,.leads-simple-table td{text-align:left;padding:13px;border-bottom:1px solid #e2e8f0;vertical-align:middle}.leads-simple-table th{font-size:.76rem;text-transform:uppercase;color:#64748b;background:#f8fafc}.leads-simple-table th:first-child,.leads-simple-table td:first-child{width:42px}.lead-name-link{border:0;background:transparent;padding:0;color:#0f172a;font-weight:800;text-decoration:underline;cursor:pointer}.leads-simple-table textarea{min-width:230px;min-height:54px;resize:vertical;border:1px solid #cbd5e1;border-radius:8px;padding:8px;vertical-align:middle}.lead-notes-inline-save{margin-left:7px;padding:7px 10px}.leads-simple-table tr:last-child td{border-bottom:0}

/* CRM alignment and overflow guards */
.crm-search-field{position:relative;width:100%;min-width:0}.crm-search-field .crm-search-icon{position:absolute;left:17px;top:50%;transform:translateY(-50%);margin:0;display:grid;place-items:center;pointer-events:none}.crm-search-field input{padding-left:50px}.crm-list-card,.crm-list-content,.crm-list-card-actions,.crm-review-form,.crm-review-destination,.crm-review-mapping,.crm-review-owners{min-width:0}.crm-list-card-actions{flex-wrap:wrap;justify-content:flex-end}.crm-outline-button,.crm-card-button,.crm-upload-select,.crm-review-destination>.secondary,.lead-import-footer>button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}.crm-icon-button{width:44px;height:44px;flex:none}.crm-review-owners .lead-choices{display:flex;flex-wrap:wrap;max-width:100%}.crm-review-owners .lead-choices label{max-width:100%;white-space:normal}.lead-import-footer{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap}.crm-upload-review,.crm-upload-panel{max-width:100%;min-width:0;overflow:hidden}

/* --- Admin Header Row (Screenshots 1 & 2) --- */
.lead-import-shell{display:grid;grid-template-columns:255px minmax(0,760px);gap:22px;align-items:start;max-width:1050px}.lead-import-rail{position:sticky;top:18px;background:#0f172a;color:#fff;border-radius:16px;padding:22px;min-height:430px}.lead-import-eyebrow{margin:0 0 22px;font-size:.68rem;font-weight:850;letter-spacing:.13em;color:#94a3b8}.lead-import-step{display:grid;grid-template-columns:34px 1fr;gap:12px;position:relative;padding-bottom:25px;color:#94a3b8}.lead-import-step:not(:last-of-type)::after{content:"";position:absolute;left:16px;top:36px;bottom:5px;width:1px;background:#334155}.lead-import-step>span{width:34px;height:34px;border:1px solid #475569;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.78rem;background:#1e293b;z-index:1}.lead-import-step strong,.lead-import-step small{display:block}.lead-import-step strong{font-size:.86rem;margin:1px 0 4px}.lead-import-step small{font-size:.7rem;line-height:1.35}.lead-import-step.active{color:#fff}.lead-import-step.active>span{background:#fff;color:#0f172a;border-color:#fff}.lead-import-step.done>span{background:#22c55e;border-color:#22c55e;color:#052e16}.lead-import-help{margin-top:26px;padding:14px;border-radius:11px;background:#1e293b}.lead-import-help strong{font-size:.76rem}.lead-import-help p{font-size:.69rem;color:#cbd5e1;line-height:1.5;margin:7px 0 0}.lead-import-main{display:grid;gap:14px}.lead-import-card{background:#fff;border:1px solid #dbe3ee;border-radius:16px;padding:22px;box-shadow:0 3px 14px #0f172a0a}.lead-import-card h3{margin:4px 0 5px;font-size:1.05rem}.lead-import-card>p{margin:0 0 18px;color:#64748b;font-size:.8rem}.lead-import-kicker{font-size:.66rem;font-weight:850;letter-spacing:.12em;color:#64748b}.lead-import-destination{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.lead-import-destination label,.lead-import-mapping label,.lead-import-review>label{display:grid;gap:6px;font-weight:750;font-size:.78rem}.lead-import-destination select,.lead-import-mapping select,.lead-import-review>label select{height:43px;border:1.5px solid #cbd5e1;border-radius:9px;padding:0 11px;background:#fff}.lead-import-dropzone{display:grid;justify-items:center;text-align:center;border:1.5px dashed #94a3b8;border-radius:14px;padding:28px 18px;background:#f8fafc;cursor:pointer;transition:.15s}.lead-import-dropzone:hover,.lead-import-dropzone.dragging{border-color:#2563eb;background:#eff6ff}.lead-import-upload-icon{width:50px;height:50px;border-radius:13px;display:grid;place-items:center;background:#e0e7ff;color:#3730a3;margin-bottom:12px}.lead-import-dropzone strong{font-size:.92rem}.lead-import-dropzone p{margin:5px 0 13px;color:#64748b;font-size:.76rem}.lead-import-browse{background:#0f172a;color:#fff;border-radius:8px;padding:8px 14px;font-size:.75rem;font-weight:800}.lead-import-file{display:flex;align-items:center;gap:12px;border:1px solid #cbd5e1;border-radius:12px;padding:13px 15px;background:#f8fafc}.lead-import-file>svg{color:#475569;flex:none}.lead-import-file>div{min-width:0;flex:1}.lead-import-file strong,.lead-import-file small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lead-import-file strong{font-size:.82rem}.lead-import-file small{font-size:.7rem;color:#64748b;margin-top:3px}.lead-import-change{padding:7px 10px;white-space:nowrap}.lead-import-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:18px}.lead-import-stats>div{white-space:pre-line;border:1px solid #e2e8f0;border-radius:10px;padding:11px;background:#f8fafc;font-size:.72rem;line-height:1.45}.lead-import-stats>div::first-line{font-size:1rem;font-weight:850;color:#0f172a}.lead-import-mapping{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.lead-import-review h4{font-size:.78rem;margin:5px 0 8px}.lead-import-review .lead-choices{margin:0 0 16px}.leads-import-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:transparent;padding:0;margin:18px 0}.lead-import-result{border-radius:10px;padding:11px;border:1px solid #e2e8f0;background:#f8fafc}.lead-import-result strong,.lead-import-result small{display:block}.lead-import-result strong{font-size:1.05rem}.lead-import-result small{font-size:.66rem;margin-top:3px;color:#64748b}.lead-import-result.good{background:#f0fdf4;border-color:#bbf7d0}.lead-import-result.warn{background:#fffbeb;border-color:#fde68a}.lead-import-result.bad{background:#fef2f2;border-color:#fecaca}.lead-import-footer{display:flex;justify-content:flex-end;gap:9px;padding-top:16px;border-top:1px solid #e2e8f0}
.lead-inline-notes-cell{min-width:330px;white-space:nowrap}.lead-inline-notes-cell textarea{display:inline-block;width:240px}.lead-inline-history-cell{min-width:125px}.lead-notes-inline-save{vertical-align:middle}
.leads-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.leads-admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.leads-back-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #000000;
  transition: background .15s ease;
}
.leads-back-btn:hover {
  background: #f1f5f9;
}
.leads-title-meta h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 850;
  color: #000000;
  line-height: 1.2;
}
.leads-title-meta p {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}
.leads-title-share {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #64748b;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  transition: all .15s ease;
}
.leads-title-share:hover {
  color: #000000;
  background: #f1f5f9;
}
.leads-add-lead-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .15s ease;
}
.leads-add-lead-btn:hover {
  background: #000000;
  color: #ffffff;
}

/* --- Admin Toolbar (Management Operations) --- */
.leads-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}
.leads-admin-toolbar button {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  transition: all .15s ease;
}
.leads-admin-toolbar button:hover {
  background: #000000;
  color: #ffffff;
}
.leads-view-toggle {
  margin-left: auto;
  display: inline-flex;
  border: 2px solid #000000;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}
.leads-view-toggle button {
  border: none;
  border-radius: 0;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 750;
  background: transparent;
  color: #000000;
}
.leads-view-toggle button.active {
  background: #000000;
  color: #ffffff;
}

/* --- Search Bar (Screenshot 1 & 2) --- */
.leads-search-bar {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}
.leads-search-bar input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #000000;
  outline: none;
  transition: box-shadow .15s ease;
}
.leads-search-bar input:focus {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.leads-search-bar input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.leads-search-icon {
  position: absolute;
  left: 18px;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  pointer-events: none;
}

/* --- Filter Row --- */
.leads-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.leads-filters-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #000000;
}
.leads-filters-row select {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid #000000;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 650;
  color: #000000;
  outline: none;
  cursor: pointer;
}

/* --- Admin Table Layout (Screenshots 1 & 2) --- */
.leads-table-container {
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.leads-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 1280px;
}
.leads-table th {
  background: #fafafa;
  color: #000000;
  font-size: 0.80rem;
  font-weight: 850;
  padding: 16px 14px;
  border-bottom: 2px solid #000000;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.leads-table td {
  padding: 16px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.83rem;
  color: #0f172a;
  vertical-align: top;
}
.leads-table tr:hover td {
  background: #fbfcfe;
}
.leads-table tr:last-child td {
  border-bottom: none;
}

/* Checkbox Column */
.lead-col-check {
  width: 44px;
  text-align: center;
  vertical-align: middle !important;
}
.lead-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #000000;
}

/* Client Name */
.lead-name-cell {
  font-weight: 800;
  color: #000000;
  white-space: nowrap;
}
.lead-inline-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: #94a3b8;
  margin-left: 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.lead-inline-edit-btn:hover {
  color: #000000;
  background: #f1f5f9;
}

/* Phone & Subtext */
.lead-phone-cell strong {
  display: block;
  font-weight: 800;
  color: #000000;
  font-size: 0.84rem;
}
.lead-phone-cell small {
  display: block;
  font-size: 0.72rem;
  color: #0284c7;
  margin-top: 3px;
  line-height: 1.35;
}
.lead-phone-cell .lead-time-sub {
  color: #64748b;
}

/* Company */
.lead-company-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
}

/* Assigned Agent */
.lead-agent-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: #334155;
  white-space: nowrap;
}

/* List Badge */
.lead-list-badge {
  display: inline-block;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.lead-list-badge:hover {
  text-decoration: underline;
}

/* Sales Disposition */
.lead-disp-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: #0f172a;
  white-space: nowrap;
}

/* Admin QA */
.lead-qa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid #000000;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  white-space: nowrap;
}

/* Last Contacted */
.lead-contact-time {
  white-space: nowrap;
  font-weight: 650;
  color: #334155;
  font-size: 0.80rem;
  line-height: 1.4;
}

/* Notes Card Cell */
.lead-notes-box {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 200px;
  max-width: 260px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.lead-notes-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  color: #000000;
  margin-bottom: 6px;
}
.lead-notes-content {
  font-size: 0.78rem;
  color: #1e293b;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
  max-height: 72px;
  overflow: hidden;
}

/* History Column Cell */
.lead-history-cell {
  min-width: 170px;
}
.lead-hist-counts {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 6px;
}
.lead-hist-followup {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 650;
  color: #64748b;
  margin-bottom: 10px;
  white-space: nowrap;
}
.lead-hist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead-view-hist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.lead-view-hist-btn:hover {
  background: #000000;
  color: #ffffff;
}
.lead-icon-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: all .15s ease;
}
.lead-icon-action-btn:hover {
  color: #000000;
  background: #f1f5f9;
}

/* Pagination Row */
.leads-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 2px solid #000000;
  background: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
}
.leads-per-page-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.80rem;
  font-weight: 750;
  color: #000000;
}
.leads-per-page-wrap select {
  padding: 4px 10px;
  border: 1.5px solid #000000;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  outline: none;
}
.leads-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.leads-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1.5px solid #000000;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
}
.leads-page-btn:hover:not(:disabled) {
  background: #000000;
  color: #ffffff;
}
.leads-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ==========================================================================
   Executive CRM Contact Details Section - Redesign
   Ultra-clean, uniform, aesthetic B2B SaaS layout with Phosphor Icons
   ========================================================================== */
.lead-phone-layout {
  max-width: 440px;
  margin: 0 auto;
  padding: 6px 4px calc(112px + env(safe-area-inset-bottom));
}
.lead-desktop-workspace { display: contents; }
.lead-mobile-list-select { display: none; }

/* Top Bar: Search Bar | List Selector | Add Button */
.lead-phone-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 210px) 40px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.lead-phone-search {
  min-width: 0;
  margin-bottom: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.lead-phone-search .leads-search-icon {
  position: absolute;
  left: 13px;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  pointer-events: none;
}
.lead-phone-search input {
  width: 100%;
  height: 40px !important;
  background: #ffffff;
  border: 1.5px solid #000000 !important;
  border-radius: 10px !important;
  padding: 0 14px 0 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500;
  color: #000000;
  outline: none;
  transition: box-shadow .15s ease;
}
.lead-phone-search input:focus {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.lead-phone-search input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.lead-followup-pill-btn.lead-assigned-list-select {
  height: 40px !important;
  border: 1.5px solid #000000 !important;
  border-radius: 10px !important;
  background: #ffffff;
  padding: 0 32px 0 14px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #000000;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all .15s ease;
}
.lead-followup-pill-btn.lead-assigned-list-select:focus {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.lead-executive-add {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  padding: 0;
  border: 1.5px solid #000000 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #000000 !important;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-executive-add:hover {
  background: #000000 !important;
  color: #ffffff !important;
}
.lead-executive-add:focus-visible { outline: 2px solid #000000; outline-offset: 2px; }
.lead-executive-add-mobile { display: none; }

/* Uniform Card Design: 1.5px solid black, 12px rounded corners, crisp white */
.lead-phone-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: none;
}

/* Card 1: Lead Profile */
.lead-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.lead-profile-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #000000;
  letter-spacing: 0.01em;
}
.lead-inline-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-inline-edit-btn:hover {
  border-color: #000000;
  color: #000000;
}
.lead-profile-company-row {
  margin-bottom: 10px;
}
.lead-profile-edit-input {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 7px 11px;
  outline: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all .15s ease;
  font-family: inherit;
}
.lead-profile-edit-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}
.lead-profile-edit-input::placeholder {
  color: #94a3b8;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}
.lead-profile-company.lead-profile-edit-input {
  width: 100%;
}
.lead-profile-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 750;
  color: #000000;
  margin-bottom: 2px;
}
.lead-profile-date {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  margin: 2px 0 10px;
}
.lead-profile-location-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.lead-profile-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}
.lead-profile-location.lead-profile-edit-input {
  flex: 1;
}

/* Call & WhatsApp Action Buttons: Simple, clean, unified twin SaaS buttons */
.lead-contact-actions-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 14px !important;
  box-shadow: none !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lead-sticky-call-btn,
.lead-sticky-whatsapp-btn {
  height: 42px;
  border: 1.5px solid #000000;
  border-radius: 10px;
  background: #ffffff;
  color: #000000;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  width: 100%;
}
.lead-sticky-call-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #000000;
  transition: color .15s ease;
}
.lead-sticky-call-btn:hover {
  background: #000000;
  color: #ffffff;
}
.lead-sticky-call-btn:hover svg {
  color: #ffffff;
}
.lead-sticky-whatsapp-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #16a34a;
  transition: color .15s ease;
}
.lead-sticky-whatsapp-btn:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}
.lead-sticky-whatsapp-btn:hover svg {
  color: #ffffff;
}
.lead-sticky-call-btn:active,
.lead-sticky-whatsapp-btn:active {
  transform: translateY(1px);
}

/* Card 2: Contact Stats */
.lead-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}
.lead-stat-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead-stat-icon-wrap {
  width: 34px;
  height: 34px;
  border: 1.5px solid #000000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #000000;
}
.lead-stat-text strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #000000;
  line-height: 1.1;
}
.lead-stat-text small {
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.02em;
}
.lead-stat-last-contact {
  text-align: right;
}
.lead-stat-last-contact strong {
  font-size: 0.86rem;
  font-weight: 750;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.lead-stat-last-contact small {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.lead-stats-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0 -18px 12px;
}
.lead-stats-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lead-status-pill-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  color: #000000;
}
.lead-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #000000;
}
.lead-view-history-flow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #000000;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 14px;
  font-size: 0.74rem;
  font-weight: 750;
  color: #000000;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-view-history-flow-btn:hover {
  background: #000000;
  color: #ffffff;
}

/* Card 3: Next Follow-Up */
.lead-followup-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.lead-followup-underline-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid #000000;
  border-radius: 8px;
  padding: 6px 12px;
  background: #ffffff;
}
.lead-followup-underline-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: #000000;
  width: 100%;
  letter-spacing: 0.02em;
  font-family: inherit;
}
.lead-followup-underline-wrap svg {
  color: #000000;
  flex-shrink: 0;
}

/* Section 4: CALL OUTCOME / DISPOSITION */
.lead-section-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  margin: 16px 0 8px 2px;
}
.lead-outcome-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 0;
}
.lead-outcome-field {
  margin-bottom: 12px;
}
.lead-outcome-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}
.lead-outcome-field select {
  width: 100%;
  height: 40px;
  border: 1.5px solid #000000;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #000000;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-clear-sel-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 4px 0;
  transition: color .15s ease;
}
.lead-clear-sel-btn:hover {
  color: #000000;
}

/* Section 5: NOTES */
.lead-notes-editor-box {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.lead-notes-editor-box textarea {
  width: 100%;
  min-height: 90px;
  border: none;
  outline: none;
  font-size: 0.84rem;
  font-weight: 500;
  color: #0f172a;
  resize: vertical;
  background: transparent;
  line-height: 1.5;
  font-family: inherit;
}
.lead-notes-editor-box textarea::placeholder {
  color: #94a3b8;
}
.lead-notes-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.lead-notes-cancel-btn {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-notes-cancel-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.lead-notes-save-btn {
  flex: 1;
  border: 1.5px solid #000000;
  border-radius: 8px;
  background: #000000;
  color: #ffffff;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.lead-notes-save-btn:hover {
  background: #27272a;
}

/* Split Layout & Desktop Grid */
.lead-view-split-layout {
  display: block;
}
.lead-numbers-sidebar {
  display: none;
}

@media (min-width: 900px) {
  .lead-phone-layout {
    max-width: 1380px;
    padding: 8px 12px 40px;
  }
  .lead-phone-top-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) 40px;
    gap: 12px;
    margin-bottom: 16px;
  }
  .lead-phone-top-bar .lead-phone-search { min-width: 0; margin: 0; }
  .lead-phone-top-bar .lead-followup-pill-btn { width: 100%; max-width: none; }
  .lead-contact-actions-card .lead-sticky-nav-btn { display: none; }
  
  .lead-view-split-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
  }
  .lead-numbers-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid #000000;
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 120px);
    height: auto;
    box-shadow: none;
  }
  .lead-numbers-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #000000;
  }
  .lead-numbers-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .lead-numbers-meta strong {
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #000000;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lead-numbers-count-pill {
    font-size: 0.70rem;
    font-weight: 750;
    padding: 2px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    white-space: nowrap;
  }
  .lead-numbers-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding-right: 4px;
    max-height: calc(100vh - 210px);
  }
  .lead-numbers-list::-webkit-scrollbar {
    width: 5px;
  }
  .lead-numbers-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
  }
  .lead-number-item {
    display: block;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all .15s ease;
  }
  .lead-number-item:hover {
    border-color: #000000;
    background: #f8fafc;
  }
  .lead-number-item.active {
    background: #fafafa;
    color: #000000;
    border: 1.5px solid #000000;
    box-shadow: none;
  }
  .lead-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
  }
  .lead-item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 750;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
  }
  .lead-number-item.active .lead-item-index {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
  }
  .lead-item-phone {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lead-item-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.70rem;
    color: #64748b;
  }
  .lead-item-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
  }
  .lead-item-status {
    font-size: 0.64rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }
  .lead-numbers-empty {
    padding: 24px 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.80rem;
    font-weight: 600;
  }

  /* Compressed right workspace */
  .lead-details-compressed-workspace {
    min-width: 0;
  }
  .lead-desktop-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 1.08fr) minmax(320px, 0.92fr);
    grid-template-areas: "overview workflow";
    gap: 16px;
    align-items: start;
  }
  .lead-workspace-overview {
    grid-area: overview;
    display: grid;
    gap: 0;
  }
  .lead-workspace-workflow {
    grid-area: workflow;
    display: grid;
    gap: 0;
  }
  .lead-workspace-notes, .lead-workspace-outcome {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .lead-workspace-notes {
    grid-area: auto;
    width: 100%;
    max-width: 100%;
  }
  .lead-workspace-outcome {
    margin-top: 0;
  }
  .lead-workspace-notes .lead-notes-editor-box {
    flex: none;
    display: block;
    height: auto;
    min-height: 80px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
  .lead-workspace-notes .lead-notes-editor-box textarea {
    min-height: 70px;
    height: 70px;
    resize: none;
    overflow: auto;
  }
  .lead-workspace-outcome .lead-outcome-card {
    flex: 1;
  }
  .lead-workspace-notes .lead-section-title {
    margin-top: 0;
  }
  .lead-phone-card {
    margin-bottom: 14px;
  }
  .lead-outcome-card {
    margin-bottom: 0;
  }
}

@media (max-width: 899px) {
  .lead-phone-top-bar {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 12px;
  }
  .lead-phone-top-bar .lead-phone-search {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }
  .lead-phone-top-bar .lead-desktop-list-select {
    display: none;
  }
  body:not(:has(#view-leads.active)) .mobile-topbar .lead-mobile-list-select {
    display: none;
  }
  body:has(#view-leads.active) .mobile-topbar .lead-mobile-list-select {
    display: inline-flex;
    flex: 0 1 auto;
    width: min(46vw, 170px);
    min-width: 110px;
    max-width: 46vw;
    margin-left: auto;
    padding: 7px 27px 7px 10px;
    font-size: .69rem;
  }
  .lead-executive-add-desktop { display: none; }
  body:has(#view-leads.active) .mobile-topbar .lead-executive-add-mobile {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    font-size: 1.4rem;
    margin-left: 0;
  }
  .lead-contact-actions-card {
    position: fixed;
    z-index: 60;
    left: 12px;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0 !important;
    padding: 8px !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1.5px solid #000000 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    display: flex !important;
    align-items: center;
  }
  .lead-contact-actions-card .lead-sticky-nav-btn {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid #000000;
    background: #ffffff;
    align-items: center;
    justify-content: center;
  }
  .lead-contact-actions-card .lead-sticky-call-btn,
  .lead-contact-actions-card .lead-sticky-whatsapp-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    gap: 6px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
}

/* --- Modals & Popups --- */
.leads-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: 90vh;
  overflow: auto;
  border: 2px solid #000000;
  border-radius: 16px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.leads-dialog .dialog-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.leads-dialog .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #000000;
}
.leads-dialog .dialog-head h2 {
  margin: 0;
  font-weight: 850;
  font-size: 1.25rem;
}
.leads-alert {
  padding: 12px 16px;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  color: #92400e;
  font-weight: 700;
  font-size: 0.84rem;
  margin-bottom: 16px;
}
.lead-timeline {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.lead-timeline article {
  padding: 14px;
  border: 2px solid #000000;
  background: #f8fafc;
  border-radius: 12px;
}
.lead-timeline p {
  white-space: pre-wrap;
  margin: 6px 0;
  font-size: 0.82rem;
}
.lead-history-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.lead-history-action button,
.lead-history-action a {
  flex: 1 1 190px;
  justify-content: center;
}

/* Dialog form inputs */
.leads-dialog label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.leads-dialog input,
.leads-dialog select,
.leads-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 2px solid #000000;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  outline: none;
}
.leads-dialog textarea {
  min-height: 80px;
}
.crm-call-customer {
  margin: -4px 0 2px;
  color: #64748b;
  font-size: .9rem;
}
.crm-call-settings {
  display: grid;
  gap: 4px;
}
.crm-call-settings > small {
  display: block;
  margin: -8px 0 10px;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 500;
  text-transform: none;
}
.crm-fixed-language {
  display: grid;
  gap: 5px;
  margin: 2px 0 8px;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
}
.crm-fixed-language > span {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.crm-fixed-language > strong { font-size: .9rem; }
.crm-fixed-language > small {
  color: #64748b;
  font-size: .82rem;
  line-height: 1.4;
  font-weight: 500;
  text-transform: none;
}
.crm-call-greeting {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.leads-dialog .crm-call-greeting-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  cursor: pointer;
}
.leads-dialog .crm-call-greeting-toggle input {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #111827;
}
.leads-dialog .crm-call-greeting textarea {
  min-height: 86px;
  resize: vertical;
  font: inherit;
  font-weight: 500;
  text-transform: none;
}
.crm-call-greeting small,
.crm-call-ring-help {
  display: block;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 500;
  text-transform: none;
}
.crm-call-actions {
  justify-content: stretch;
}
.crm-call-actions button {
  flex: 1;
  min-height: 44px;
}
.lead-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}
.lead-choices label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid #000000;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.lead-choices input {
  width: auto;
  margin: 0;
}
.leads-preview {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 8px;
  border: 1.5px solid #000000;
}

/* Empty state */
.lead-empty-state {
  padding: 48px 20px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .crm-filter-panel,.crm-list-card,.crm-review-destination,.crm-review-mapping{grid-template-columns:1fr}.crm-list-card-actions{justify-content:flex-start;flex-wrap:wrap}.crm-search-panel{padding:16px}.crm-upload-panel{padding:14px}.crm-upload-dropzone{min-height:300px}.crm-review-head{display:block}.crm-review-count{display:inline-block;margin-top:10px}
  .lead-import-shell{grid-template-columns:1fr}.lead-import-rail{position:static;min-height:0}.lead-import-help{display:none}.lead-import-destination,.lead-import-mapping{grid-template-columns:1fr}.lead-import-stats,.leads-import-summary{grid-template-columns:1fr 1fr}
  .leads-admin-header {
    flex-direction: column;
    align-items: stretch;
  }
  .leads-admin-title-wrap {
    justify-content: space-between;
  }
  .leads-add-lead-btn {
    width: 100%;
    justify-content: center;
  }
  .leads-admin-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .lead-sticky-bottom-bar {
    bottom: calc(8px + env(safe-area-inset-bottom));
  }
}
@media (max-width:1100px){.crm-list-card{grid-template-columns:1fr}.crm-list-card-actions{justify-content:flex-start}.crm-review-destination{grid-template-columns:1fr}.crm-review-destination>.secondary{justify-self:start}}

/* Keep the desktop CRM on one viewport; only the lead-number rail scrolls. */
@media (min-width: 901px) {
  body:has(#view-leads.active) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  body:has(#view-leads.active) #app,
  body:has(#view-leads.active) .workspace {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  body:has(#view-leads.active) .content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  body:has(#view-leads.active) #view-leads.active {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }
  body:has(#view-leads.active) .lead-phone-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  body:has(#view-leads.active) .lead-phone-top-bar {
    flex: 0 0 auto;
    margin-bottom: 12px;
  }
  body:has(#view-leads.active) .lead-view-split-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
  }
  body:has(#view-leads.active) .lead-numbers-sidebar {
    position: static;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  body:has(#view-leads.active) .lead-numbers-list {
    min-height: 0;
    max-height: none;
  }
  body:has(#view-leads.active) .lead-details-compressed-workspace,
  body:has(#view-leads.active) .lead-desktop-workspace {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}
.crm-archived-badge{border:1px solid #94a3b8;border-radius:999px;padding:3px 9px;color:#64748b;font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}

/* ==========================================================================
   REDESIGNED LEAD IMPORT WORKSPACE (Minimalist, Clean, Left/Right Aligned)
   ========================================================================== */

/* Header action: Download Template */
.crm-download-template-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}
.crm-download-template-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.crm-download-template-btn svg {
  color: #64748b;
  transition: color 0.15s ease;
}
.crm-download-template-btn:hover svg {
  color: #0f172a;
}

/* Two-column grid container */
.lead-import-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 20px;
  min-width: 0;
  align-items: stretch;
}
.lead-import-workspace:has(.crm-upload-review:not([hidden])) {
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
}

/* Left Panel: Upload Card */
.lead-import-workspace .crm-upload-panel {
  margin: 0;
  padding: 24px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.02);
  min-height: 480px;
}

/* Dropzone (Initial state) */
.lead-import-workspace .crm-upload-dropzone {
  flex: 1;
  min-height: 380px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: #fafbfc;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lead-import-workspace .crm-upload-dropzone:hover,
.lead-import-workspace .crm-upload-dropzone.dragging {
  border-color: #0f172a;
  background: #f1f5f9;
}
.lead-import-workspace .crm-upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.2s ease;
}
.lead-import-workspace .crm-upload-dropzone:hover .crm-upload-icon {
  transform: translateY(-2px);
}
.lead-import-workspace .crm-upload-dropzone > strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}
.lead-import-workspace .crm-upload-dropzone > p {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0 0 14px;
}
.crm-drop-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 20px;
}
.lead-import-workspace .crm-upload-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  transition: all 0.15s ease;
}
.lead-import-workspace .crm-upload-dropzone:hover .crm-upload-select {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Selected File State (Left Panel) */
.crm-selected-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.crm-file-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.crm-import-section-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.crm-file-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 3px 10px;
}
.crm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

.lead-import-workspace .crm-upload-file {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  margin-bottom: 20px;
  transition: all 0.15s ease;
}
.crm-file-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.crm-file-info {
  min-width: 0;
  flex: 1;
}
.crm-file-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
}
.crm-file-info small {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 3px;
}
.crm-change-file-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.crm-change-file-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* File guidelines below file card */
.crm-file-guidelines {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-top: auto;
}
.crm-guidelines-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  color: #334155;
  margin-bottom: 10px;
}
.crm-guidelines-head svg {
  color: #059669;
  flex: none;
}
.crm-guidelines-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.crm-guidelines-list li {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  position: relative;
  padding-left: 14px;
}
.crm-guidelines-list li::before {
  content: "•";
  position: absolute;
  left: 3px;
  color: #94a3b8;
}
.crm-guidelines-list li strong {
  color: #334155;
  font-weight: 600;
}

/* Right Panel: Setup & Review */
.lead-import-workspace .crm-upload-review {
  margin: 0;
  min-width: 0;
  min-height: 480px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.02);
}

.crm-import-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.crm-review-count {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.76rem;
  font-weight: 600;
}

/* Form structure */
.lead-import-workspace .crm-review-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.crm-field-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.crm-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}
.crm-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.crm-field-hint {
  font-size: 0.72rem;
  color: #64748b;
}

/* Destination List Row */
.lead-import-workspace .crm-review-destination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.crm-select {
  height: 42px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 13px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.15s ease;
}
.crm-select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}
.crm-create-list-btn {
  height: 42px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.crm-create-list-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Executive Assignment Chips */
.lead-import-workspace .crm-review-owners .lead-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
}
.lead-import-workspace .crm-review-owners .lead-choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 13px;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.lead-import-workspace .crm-review-owners .lead-choices label:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.lead-import-workspace .crm-review-owners .lead-choices label:has(input:checked) {
  border-color: #0f172a;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lead-import-workspace .crm-review-owners .lead-choices input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #0f172a;
  cursor: pointer;
}

/* Validation Results Summary Grid */
.lead-import-workspace .leads-import-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
  background: transparent;
  padding: 0;
}
.lead-import-workspace .leads-import-summary[hidden] {
  display: none;
}
.lead-import-result {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: left;
}
.lead-import-result strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.lead-import-result small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 3px;
}
.lead-import-result.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.lead-import-result.good strong {
  color: #15803d;
}
.lead-import-result.neutral {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.lead-import-result.neutral strong {
  color: #1d4ed8;
}
.lead-import-result.warn {
  background: #fffbeb;
  border-color: #fde68a;
}
.lead-import-result.warn strong {
  color: #b45309;
}
.lead-import-result.bad {
  background: #fef2f2;
  border-color: #fecaca;
}
.lead-import-result.bad strong {
  color: #b91c1c;
}

/* Footer Actions: Left and Right Aligned */
.lead-import-workspace .lead-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}
.crm-btn-secondary {
  height: 42px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.crm-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.crm-btn-primary {
  height: 42px;
  padding: 0 22px;
  border: none;
  border-radius: 9px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.crm-btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.2);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .lead-import-workspace:has(.crm-upload-review:not([hidden])) {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .lead-import-workspace .crm-upload-panel,
  .lead-import-workspace .crm-upload-review {
    padding: 16px;
  }
  .lead-import-workspace .crm-review-destination {
    grid-template-columns: 1fr;
  }
  .lead-import-workspace .leads-import-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .lead-import-workspace .lead-import-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .crm-btn-secondary,
  .crm-btn-primary {
    width: 100%;
  }
}
