/* ==========================================================================
   Project Document Studio — Modern Leads CRM Module Styles
   ========================================================================== */

.project-leads-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Page Head */
.project-leads-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.project-leads-head h2 {
  color: #102a4d !important;
  font-size: clamp(22px, 1.7vw, 25px) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  margin: 0 0 3px !important;
}

.project-leads-head p {
  color: #60738e !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  margin: 3px 0 0 !important;
}

.project-leads-head .members-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#projectLeadsImportBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 39, 70, 0.04);
  transition: all 0.18s ease;
}

#projectLeadsImportBtn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f2746;
}

#projectLeadsAddBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: #0f2746;
  border: 1px solid #1c385c;
  box-shadow: 0 2px 6px rgba(15, 39, 70, 0.2);
  transition: all 0.18s ease;
}

#projectLeadsAddBtn:hover {
  background: #16365d;
  box-shadow: 0 4px 12px rgba(15, 39, 70, 0.28);
  transform: translateY(-1px);
}

/* ==========================================================================
   Compact KPI Cards (No Text Truncation, 7 In-One-Row on Desktop)
   ========================================================================== */

.project-leads-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.project-lead-kpi-card {
  text-align: left;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 62px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 39, 70, 0.03);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.project-lead-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px -4px rgba(15, 39, 70, 0.09);
  transform: translateY(-1px);
}

.project-lead-kpi-card.active {
  border-color: #0f2746 !important;
  background: #fbfcfe !important;
  box-shadow: 0 0 0 2px #0f2746, 0 4px 12px -2px rgba(15, 39, 70, 0.12) !important;
}

.project-lead-kpi-card .members-summary-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.project-lead-kpi-card:hover .members-summary-icon {
  transform: scale(1.05);
}

.project-lead-kpi-card .members-summary-icon svg {
  width: 15px;
  height: 15px;
}

/* Distinct Tones per KPI card */
.project-lead-kpi-all .members-summary-icon { background: #eff6ff; color: #2563eb; }
.project-lead-kpi-active .members-summary-icon { background: #eef2ff; color: #4f46e5; }
.project-lead-kpi-new .members-summary-icon { background: #ecfdf5; color: #059669; }
.project-lead-kpi-today_followups .members-summary-icon { background: #fffbeb; color: #d97706; }
.project-lead-kpi-site_visit .members-summary-icon { background: #ecfeff; color: #0891b2; }
.project-lead-kpi-hot .members-summary-icon { background: #fff1f2; color: #e11d48; }
.project-lead-kpi-converted .members-summary-icon { background: #f5f3ff; color: #7c3aed; }

.project-lead-kpi-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.project-lead-kpi-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
  max-height: 2.3em;
  overflow: hidden;
}

.project-lead-kpi-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #0f2746;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.project-lead-kpi-sub {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-lead-kpi-hot .project-lead-kpi-sub {
  color: #e11d48;
  font-weight: 600;
}

.project-lead-kpi-new .project-lead-kpi-sub {
  color: #059669;
  font-weight: 600;
}

/* ==========================================================================
   Today Follow-ups Queue Panel (Full Width Stretch & Responsive)
   ========================================================================== */

.lead-followup-queue-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  box-shadow: 0 1px 3px rgba(15, 39, 70, 0.04) !important;
}

.lead-followup-queue-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 12px !important;
}

.lead-followup-queue-head h3 {
  margin: 0 !important;
  color: #102a4d !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.lead-followup-queue-head p {
  margin: 3px 0 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
}

.lead-followup-queue-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.lead-followup-queue-actions button {
  min-height: 32px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.lead-followup-queue-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.6fr) !important;
  gap: 16px !important;
  width: 100% !important;
  align-items: start !important;
  box-sizing: border-box !important;
}

.lead-followup-queue-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}

.lead-followup-queue-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 12px 14px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lead-followup-queue-item:hover,
.lead-followup-queue-item.is-active {
  border-color: #0f2746 !important;
  background: #fbfcfe !important;
  box-shadow: 0 4px 14px rgba(15, 39, 70, 0.08) !important;
}

.lead-followup-queue-item-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.lead-followup-queue-item-row strong {
  font-size: 13.5px !important;
  color: #0f2746 !important;
  font-weight: 700 !important;
}

.lead-followup-queue-chip {
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
}

.lead-followup-queue-chip.today {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.lead-followup-queue-chip.overdue {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 1px solid #fecdd3 !important;
}

.lead-followup-queue-item-meta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 12px !important;
  color: #64748b !important;
  flex-wrap: wrap !important;
}

.lead-followup-queue-focus {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 16px 18px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lead-followup-queue-focus-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding-bottom: 10px !important;
}

.lead-followup-queue-focus-head span {
  font-size: 11px !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
}

.lead-followup-queue-focus-head h4 {
  margin: 2px 0 0 !important;
  color: #0f2746 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.lead-followup-queue-focus-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}

.lead-followup-queue-focus-grid div {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.lead-followup-queue-focus-grid span {
  font-size: 11px !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

.lead-followup-queue-focus-grid strong {
  color: #0f2746 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.lead-followup-queue-focus p {
  margin: 0 !important;
  color: #475569 !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
}

/* ==========================================================================
   Filters Card & Inputs
   ========================================================================== */

.project-leads-filters {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(15, 39, 70, 0.04);
  width: 100%;
  box-sizing: border-box;
}

.project-leads-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.project-leads-search-row .members-filter-search {
  flex: 1 1 240px;
  min-width: 200px;
  position: relative;
}

.project-leads-search-row .members-filter-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 36px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 11px center;
  font-size: 13px;
  color: #0f2746;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.project-leads-search-row .members-filter-search input:focus {
  background-color: #ffffff;
  border-color: #0f2746;
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 39, 70, 0.1);
}

.project-leads-inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-leads-inline-filter span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.project-leads-inline-filter select {
  min-height: 38px;
  padding: 6px 30px 6px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.project-leads-inline-filter select:focus {
  border-color: #0f2746;
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 39, 70, 0.1);
}

.project-leads-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-leads-filter-toggle:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f2746;
}

/* ==========================================================================
   Full Width Segmented Pipeline Tabs Strip (Equal Width Distribution)
   ========================================================================== */

.project-leads-tabs {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 6px !important;
  background: #0f2746 !important;
  padding: 5px !important;
  border-radius: 12px !important;
  border: 1px solid #1c385c !important;
  box-shadow: 0 2px 8px rgba(10, 25, 45, 0.16) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.project-leads-tabs .tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 6px !important;
  padding: 8px 10px !important;
  min-height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #c4d4e6 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.project-leads-tabs .tab:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px);
}

.project-leads-tabs .tab.is-active {
  background: #ffffff !important;
  color: #0f2746 !important;
  font-weight: 700 !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-1px);
}

.project-leads-tabs .tab span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-leads-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.project-leads-tabs .tab.is-active .project-leads-tab-count {
  background: #0f2746 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Leads Data Table
   ========================================================================== */

.project-leads-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 39, 70, 0.04);
  overflow: hidden;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.project-leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.project-leads-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.project-leads-table th {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.project-leads-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.project-leads-table tbody tr:hover {
  background-color: #f8fafc;
}

.project-leads-table tbody tr.selected {
  background-color: #f0fdf4 !important;
}

.project-leads-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: #1e293b;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

/* Lead Info Cell */
.project-lead-identity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-lead-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.lead-avatar-tone-1 { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.lead-avatar-tone-2 { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.lead-avatar-tone-3 { background: #eef2ff; color: #4338ca; border: 1px solid #e0e7ff; }
.lead-avatar-tone-4 { background: #fff1f2; color: #be123c; border: 1px solid #ffe4e6; }
.lead-avatar-tone-5 { background: #fdf4ff; color: #a21caf; border: 1px solid #fae8ff; }
.lead-avatar-tone-6 { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }

.project-lead-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-lead-name-wrap strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f2746;
  line-height: 1.25;
}

.project-lead-row-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

/* Contact Cell */
.project-lead-contact-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.project-lead-contact-phone {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-lead-contact-email {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-lead-contact-icon {
  stroke: #94a3b8;
  flex-shrink: 0;
}

/* Source Cell */
.project-lead-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.project-lead-source-icon {
  font-size: 12px;
  line-height: 1;
}

/* Priority & Status Badges */
.badge-priority-high,
.project-lead-priority-badge-high {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 1px solid #fecdd3 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.badge-priority-medium,
.project-lead-priority-badge-medium {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.badge-priority-low,
.project-lead-priority-badge-low {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

/* Owner Cell */
.project-lead-owner-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 2px 4px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.project-lead-owner-cell:hover {
  background: #f1f5f9;
}

.project-lead-owner-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #0f2746;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-lead-owner-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.project-lead-owner-copy strong {
  font-size: 12.5px;
  color: #0f2746;
}

.project-lead-owner-copy small {
  font-size: 10.5px;
  color: #64748b;
}

.project-lead-owner-cell.unassigned {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 4px 10px;
}

.project-lead-owner-cell.unassigned:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.project-lead-owner-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.project-lead-owner-link {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  margin-left: 4px;
}

/* Actions Menu Trigger */
.project-leads-table td details.table-row-menu summary {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.project-leads-table td details.table-row-menu summary:hover {
  background: #f8fafc;
  border-color: #0f2746;
  color: #0f2746;
}

/* Bulk Bar */
.project-leads-bulk-bar {
  background: #0f2746;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 16px;
  margin: 12px 14px 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(15, 39, 70, 0.2);
}

.project-leads-bulk-bar.is-visible {
  display: flex;
}

.project-leads-bulk-bar strong {
  color: #ffffff;
  font-size: 13.5px;
}

.project-leads-bulk-bar span {
  color: #94a3b8;
  font-size: 12px;
}

.project-leads-bulk-actions {
  display: inline-flex;
  gap: 8px;
}

.project-leads-bulk-actions button {
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* Footer & Pagination */
.project-leads-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
}

.project-leads-table-footer select {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  color: #334155;
}

/* ==========================================================================
   Responsive Adaptations (Tablet & Medium Screens: <= 1080px)
   ========================================================================== */

@media (max-width: 1080px) {
  .project-leads-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .project-lead-kpi-card:last-child {
    grid-column: span 2;
  }
  .project-leads-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: thin;
  }
  .project-leads-tabs .tab {
    flex: 0 0 auto !important;
    padding: 7px 14px !important;
  }
}

/* ==========================================================================
   Mobile & Small Screens (<= 768px)
   ========================================================================== */

@media (max-width: 768px) {
  .project-leads-shell {
    gap: 12px !important;
  }

  .project-leads-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .project-leads-head .members-page-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .project-leads-head .members-page-actions button {
    justify-content: center !important;
    min-height: 42px !important;
    width: 100% !important;
  }

  /* KPI Cards on Mobile: Balanced 2-column compact grid */
  .project-leads-kpis {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  /* 7th card spans both columns on mobile */
  .project-lead-kpi-card:last-child {
    grid-column: 1 / -1 !important;
  }

  .project-lead-kpi-card {
    min-height: 56px !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  .project-lead-kpi-card .members-summary-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 7px !important;
  }

  .project-lead-kpi-card .members-summary-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  .project-lead-kpi-label {
    font-size: 10px !important;
  }

  .project-lead-kpi-value {
    font-size: 18px !important;
  }

  .project-lead-kpi-sub {
    font-size: 9.5px !important;
  }

  /* Today Follow-ups Queue on Mobile */
  .lead-followup-queue-panel {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .lead-followup-queue-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .lead-followup-queue-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Search & Filter on Mobile */
  .project-leads-filters {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .project-leads-search-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .project-leads-search-row .members-filter-search {
    width: 100% !important;
    min-width: 0 !important;
  }

  .project-leads-search-row .members-filter-search input {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  .project-leads-inline-filter {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  .project-leads-inline-filter select {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 42px !important;
  }

  .project-leads-filter-toggle {
    width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
  }

  /* Segmented Tabs Strip on Mobile: Smooth Horizontal Scrollable Pill Bar */
  .project-leads-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 4px !important;
    border-radius: 12px !important;
    gap: 4px !important;
  }

  .project-leads-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .project-leads-tabs .tab {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
  }

  /* Table Hide on Mobile */
  .project-leads-table-card {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .project-leads-table-card > .table-wrap {
    display: none !important;
  }

  /* Mobile Cards List */
  .project-leads-mobile-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .project-lead-mobile-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 39, 70, 0.04) !important;
    transition: all 0.2s ease !important;
  }

  .project-lead-mobile-card:active {
    background-color: #f8fafc !important;
  }

  .project-lead-mobile-card.selected {
    border-color: #0f2746 !important;
    background: #f0fdf4 !important;
    box-shadow: 0 0 0 2px #0f2746 !important;
  }

  .project-lead-mobile-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 8px !important;
  }

  .project-lead-mobile-identity {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .project-lead-mobile-identity input {
    width: 20px !important;
    height: 20px !important;
    accent-color: #0f2746 !important;
    cursor: pointer !important;
  }

  .project-lead-mobile-id {
    font-family: ui-monospace, SFMono-Regular, monospace !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #0f2746 !important;
    background: #f1f5f9 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
  }

  .project-lead-mobile-head .table-row-menu > summary {
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f2746 !important;
  }

  .project-lead-mobile-contact {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    cursor: pointer !important;
  }

  .project-lead-mobile-contact strong {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f2746 !important;
  }

  .project-lead-mobile-contact span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
  }

  .project-lead-mobile-contact small {
    font-size: 11.5px !important;
    color: #64748b !important;
  }

  .project-lead-mobile-fields {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
    margin: 0 !important;
    padding-top: 10px !important;
    border-top: 1px solid #f1f5f9 !important;
  }

  .project-lead-mobile-fields dt {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    color: #94a3b8 !important;
    margin-bottom: 2px !important;
  }

  .project-lead-mobile-fields dd {
    margin: 0 !important;
    font-size: 12.5px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
  }

  .project-lead-mobile-fields .project-lead-mobile-owner {
    grid-column: 1 / -1 !important;
  }

  /* Bulk bar on mobile */
  .project-leads-bulk-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    margin: 8px 0 !important;
  }

  .project-leads-bulk-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .project-leads-bulk-actions button {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
  }

  /* Pagination on mobile */
  .project-leads-table-footer {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    text-align: center !important;
    padding: 12px 10px !important;
  }

  .project-leads-table-footer .pagination-controls {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .project-leads-table-footer select,
  .project-leads-table-footer .ghost-btn {
    min-height: 40px !important;
  }
}
