:root {
  /* Corporate Deep Blue Palette (HubSpot-inspired) */
  --bg:              #F8FAFC;     /* Clean slate-gray neutral canvas */
  --bg-subtle:       #F1F5F9;     /* Structural panel backdrop */
  --surface:         #FFFFFF;     /* Primary container & card surface */
  --surface-hover:   #F1F5F9;     /* Hover state for tables and lists */

  /* Ink (Text Hierarchy) */
  --ink-primary:     #0F172A;     /* Deep navy-slate high-contrast headings/text */
  --ink-secondary:   #334155;     /* Slate medium copy and secondary labels */
  --ink-muted:       #64748B;     /* Muted metadata and placeholder text */

  /* Borders & Dividers */
  --border-light:    #E2E8F0;     /* Faint interior divider lines */
  --border-default:  #CBD5E1;     /* Standard boundary lines */
  --border-focus:    #0B66D0;     /* Deep blue interactive focus ring */

  /* Brand Interactive Surfaces */
  --action-bg:       #0B66D0;     /* Primary corporate blue button fill */
  --action-hover:    #0952A5;     /* Darker blue hover state */
  --action-text:     #FFFFFF;     /* Primary action text color */
  --action-tint:     #EFF6FF;     /* Soft blue background accent tint */
  --action-border:   #BFDBFE;     /* Soft blue border tint */

  /* Desaturated Semantic Accents */
  --success-bg:      #E6F7ED;
  --success-text:    #0D7C3D;
  --success-tint:    #10B981;

  --warning-bg:      #FFF8E5;
  --warning-text:    #946300;
  --warning-tint:    #F59E0B;

  --error-bg:        #FDE8E8;
  --error-text:      #C41E25;
  --error-tint:      #EF4444;

  /* Border Radii */
  --radius-ui:       6px;
  --radius-lg:       8px;
  --radius-xl:       12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--ink-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px; /* Space for fixed bottom nav */
}

/* Tabular numbers for financial and numeric data readability */
.mono, .tabular-nums, .subfield-amount, .subfield-contact, .mono-code {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Page Header & Typography */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.page-description {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-top: 4px;
}

/* Top Header Bar */
header {
  height: 56px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background-color: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 34px;
  width: auto;
  max-width: 210px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
}

.logo:hover .header-logo-img {
  transform: scale(1.02);
  opacity: 0.92;
}

main {
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  padding: 0 28px;
}

/* Excel Sheet Tabs Navigation (Top Filtering) */
.sheet-tabs-container {
  display: flex;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 4px;
  padding-bottom: 1px;
}

.sheet-tab-item {
  padding: 8px 14px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.sheet-tab-item:hover {
  color: var(--ink-primary);
  background-color: var(--surface-hover);
  border-radius: var(--radius-ui) var(--radius-ui) 0 0;
}

.sheet-tab-item.active {
  color: var(--action-bg);
  border-bottom-color: var(--action-bg);
  font-weight: 600;
  background-color: var(--action-tint);
  border-radius: var(--radius-ui) var(--radius-ui) 0 0;
}

.sheet-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  background-color: rgba(27, 42, 74, 0.08);
  color: var(--ink-secondary);
  line-height: 1;
  transition: all 0.15s ease;
}

.sheet-tab-item:hover .sheet-count-badge {
  color: var(--ink-primary);
  background-color: rgba(27, 42, 74, 0.14);
}

.sheet-tab-item.active .sheet-count-badge {
  background-color: var(--action-bg);
  color: #FFFFFF;
}

/* Three-dots button on sheet tabs */
.sheet-dots-btn,
.sheet-dots-system-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: var(--ink-secondary);
  padding: 4px 6px;
  border-radius: var(--radius-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.sheet-dots-btn:hover,
.sheet-dots-system-btn:hover {
  background-color: var(--surface-hover);
  color: var(--ink-primary);
}

/* Sheet Color Indicator Dot */
.sheet-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: var(--border-default);
  flex-shrink: 0;
}

.sheet-color-dot-all {
  background: linear-gradient(135deg, #0B66D0 0%, #10B981 50%, #F59E0B 100%);
}

/* Dimmed Sticky Bottom Horizontal Scrollbar Overlay */
.sticky-scroll-wrapper {
  position: fixed;
  bottom: 44px;
  left: 28px;
  right: 28px;
  max-width: calc(100% - 56px);
  margin: 0 auto;
  height: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 999;
  background: rgba(245, 248, 250, 0.85);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(4px);
  box-shadow: 0 -2px 8px rgba(27, 42, 74, 0.04);
  border-radius: 6px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.sticky-scroll-wrapper:hover {
  opacity: 1;
}

.sticky-scroll-content {
  height: 1px;
}

.sticky-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.sticky-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.sticky-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #CBD5E1; /* Dimmed slate thumb */
  border-radius: 6px;
}

.sticky-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Polished Bottom Navigation Bar */
.bottom-tabs-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background-color: var(--surface);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  z-index: 1000;
  padding: 0 24px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  gap: 8px;
}

.bottom-tab-button {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-ui);
  transition: all 0.15s ease;
}

.bottom-tab-button:hover {
  background-color: var(--surface-hover);
  color: var(--ink-primary);
}

.bottom-tab-button.active {
  background-color: var(--action-tint);
  color: var(--action-bg);
  font-weight: 600;
  border-bottom: 2px solid var(--action-bg);
}

.bottom-tab-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Alert Banners */
.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-ui);
  margin-bottom: 20px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}

.alert-banner-success {
  background-color: var(--success-bg);
  border-color: #B7E4C7;
  color: var(--success-text);
}

.alert-banner-warning {
  background-color: var(--warning-bg);
  border-color: #FDE68A;
  color: var(--warning-text);
}

.alert-banner-error {
  background-color: var(--error-bg);
  border-color: #FCA5A5;
  color: var(--error-text);
}

.alert-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-banner-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.alert-dismiss-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0 4px;
}

.alert-dismiss-btn:hover {
  opacity: 1;
}

/* Search Bar & Toolbar Controls */
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 540px;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-ui);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--ink-primary);
  background-color: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(11, 102, 208, 0.12);
}

/* Standardized Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-ui);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.btn-primary {
  background-color: var(--action-bg);
  color: var(--action-text);
  border-color: var(--action-bg);
}

.btn-primary:hover {
  background-color: var(--action-hover);
  border-color: var(--action-hover);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: #CBD5E1;
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--ink-primary);
}

.btn-danger {
  background-color: var(--error-bg);
  color: var(--error-text);
  border-color: #FCA5A5;
}

.btn-danger:hover {
  background-color: #FEE2E2;
}

/* Split Button Group & Dropdown Popover */
.split-btn-group {
  display: inline-flex;
  position: relative;
}

.split-btn-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.split-btn-toggle {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0 8px;
}

.split-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-ui);
  box-shadow: 0 10px 20px -3px rgba(27, 42, 74, 0.12);
  padding: 4px 0;
  z-index: 1200;
  display: none;
}

.split-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-primary);
  transition: background-color 0.15s ease;
}

.split-dropdown-item:hover {
  background-color: var(--surface-hover);
  color: var(--action-bg);
}

/* Floating Column Selector Dropdown Popover Card */
.column-selector {
  position: relative;
  display: inline-block;
}

.column-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 360px;
  max-height: 480px;
  overflow-y: auto;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px -4px rgba(27, 42, 74, 0.16);
  padding: 16px;
  z-index: 1200;
  display: none;
}

.column-dropdown-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.column-dropdown-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.column-search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-ui);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
}

.column-quick-actions {
  display: flex;
  gap: 6px;
}

.column-quick-actions button {
  background: var(--bg);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.column-quick-actions button:hover {
  background: var(--surface-hover);
  color: var(--action-bg);
}

.column-category-group {
  margin-bottom: 12px;
}

.column-category-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 6px;
  margin-top: 8px;
}

.column-category-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--ink-primary);
  cursor: pointer;
}

.column-category-group label:hover {
  color: var(--action-bg);
}

/* Custom Styled Checkboxes & Toggles */
.custom-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background-color: var(--surface);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  vertical-align: middle;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background-color: var(--action-bg);
  border-color: var(--action-bg);
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(11, 102, 208, 0.2);
}

/* Toggle Switch Component */
.toggle-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-switch-input {
  display: none;
}

.toggle-switch-slider {
  width: 38px;
  height: 20px;
  background-color: #CBD5E1;
  border-radius: 20px;
  position: relative;
  transition: background-color 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.toggle-switch-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch-input:checked + .toggle-switch-slider {
  background-color: var(--action-bg);
}

.toggle-switch-input:checked + .toggle-switch-slider::before {
  transform: translateX(18px);
}

/* Data Table Grid & Lead Row Color Coding */
.data-table-container {
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background-color: #F8FAFC;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-default);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-primary);
  vertical-align: middle;
}

/* Table Inline Local Notes */
.table-inline-note {
  width: 100%;
  min-width: 175px;
  max-width: 230px;
  min-height: 48px;
  max-height: 80px;
  padding: 5px 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  line-height: 1.4;
  color: #1E293B;
  background-color: #FFFFFF;
  border: 1px solid #D0D7E2;
  border-radius: 4px;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.table-inline-note:focus {
  border-color: #0B66D0;
  box-shadow: 0 0 0 2px rgba(11, 102, 208, 0.15);
}

.table-inline-note::placeholder {
  color: #94A3B8;
  font-style: italic;
}

.lead-row-dark-bg .table-inline-note {
  background-color: rgba(255, 255, 255, 0.95);
}

.note-save-status {
  font-size: 10.5px;
  font-weight: 500;
  position: absolute;
  bottom: 3px;
  right: 14px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.note-save-status.saving {
  color: #0B66D0;
}

.note-save-status.saved {
  color: #10B981;
}

.note-save-status.error {
  color: #EF4444;
}


/* Modern Card-Row Hybrid & Alternating Zebra Rows */
.data-table tbody tr.lead-row {
  border-left-width: 4px;
  border-left-style: solid;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.data-table tbody tr.lead-row:nth-child(even) {
  background-color: #FFFFFF;
}

.data-table tbody tr.lead-row:nth-child(odd) {
  background-color: #F8FAFC;
}

.data-table tbody tr.lead-row:hover {
  background-color: #F1F5F9 !important;
  box-shadow: inset 0 0 0 1px rgba(11, 102, 208, 0.08);
}

.data-table tbody tr.lead-row.selected {
  background-color: #EFF6FF !important;
}

.lead-name-link {
  font-size: 13.5px;
  font-weight: 600;
  color: #0F172A;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-block;
}

.lead-name-link:hover {
  color: var(--action-bg);
  text-decoration: underline;
}

/* Subfield Data Rows inside Table Cells */
.subfield-line {
  margin-bottom: 2px;
}

.subfield-line:last-child {
  margin-bottom: 0;
}

.subfield-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin-right: 5px;
}

.subfield-val {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-primary);
}

/* Compact Key-Value Matrix Grid */
.matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.matrix-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  line-height: 1.35;
}

.matrix-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 48px;
}

.matrix-value {
  font-size: 12px;
  font-weight: 500;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-hero {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.matrix-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748B;
  font-variant-numeric: tabular-nums;
}

.matrix-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  background-color: #F1F5F9;
  color: #475569;
  line-height: 1.2;
}

/* Contact Details Helpers with Micro SVG Icons */
.contact-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #334155;
  margin-top: 1px;
}

.contact-line.copyable {
  cursor: pointer;
  user-select: none;
  width: fit-content;
  max-width: 100%;
  padding: 1px 4px;
  margin-left: -4px;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.contact-line.copyable:hover {
  color: var(--action-bg);
  background-color: rgba(11, 102, 208, 0.08);
}

.contact-line.copyable:hover .contact-icon {
  stroke: var(--action-bg);
}

.contact-icon {
  width: 13px;
  height: 13px;
  stroke: #64748B;
  flex-shrink: 0;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.contact-icon.copied {
  stroke: #10B981 !important;
  transform: scale(1.15);
}

.contact-copied-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 1.5px 5px;
  border-radius: 3px;
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  margin-left: 2px;
  animation: contactBadgeFadeIn 0.15s ease-out;
}

@keyframes contactBadgeFadeIn {
  from { opacity: 0; transform: translateY(-1px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.phone-type-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  background-color: #F1F5F9;
  color: #64748B;
  margin-left: 4px;
  display: inline-block;
  line-height: 1.2;
}

/* Refined Pill Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.status-new {
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.status-active {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #B8E6CB;
}

.status-responded {
  background-color: var(--action-tint);
  color: var(--action-bg);
  border: 1px solid #BFDBFE;
}

.status-non-active {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid #FCD34D;
}

.status-dnc {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid #FCA5A5;
}

/* Custom Status Pill Selector */
.custom-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.custom-status-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding-right: 14px;
  color: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23516079' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}

.custom-status-select option {
  background-color: #FFFFFF;
  color: #1B2A4A;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 8px 12px;
}

/* Custom Status Drag-and-Drop Reordering */
.status-card-item {
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.status-card-item.is-dragging {
  opacity: 0.45;
  background-color: var(--bg-subtle) !important;
  box-shadow: 0 8px 24px rgba(11, 102, 208, 0.14) !important;
  border-style: dashed !important;
  border-color: var(--action-border) !important;
}

.status-card-item.drag-over-top {
  border-top: 3px solid var(--action-bg) !important;
}

.status-card-item.drag-over-bottom {
  border-bottom: 3px solid var(--action-bg) !important;
}

.status-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 24px;
  cursor: grab;
  color: #94A3B8;
  border-radius: 4px;
  user-select: none;
  touch-action: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.status-drag-handle:hover {
  color: var(--action-bg);
  background-color: var(--action-tint);
}

.status-drag-handle:active {
  cursor: grabbing;
}

/* High-Contrast Dynamic Readability for Saturated/Dark Status Badges */
.custom-status-badge.custom-status-badge-dark {
  color: #FFFFFF !important;
}

.custom-status-badge.custom-status-badge-dark .custom-status-select {
  color: #FFFFFF !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
}

/* High-Contrast Dynamic Readability for Saturated/Dark Status Rows */
.data-table tbody tr.lead-row.lead-row-dark-bg {
  color: #FFFFFF !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .lead-name-link {
  color: #FFFFFF !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .subfield-line,
.data-table tbody tr.lead-row.lead-row-dark-bg .subfield-val,
.data-table tbody tr.lead-row.lead-row-dark-bg .matrix-value {
  color: #F8FAFC !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .subfield-label,
.data-table tbody tr.lead-row.lead-row-dark-bg .matrix-label {
  color: #CBD5E1 !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-line span {
  color: #F1F5F9 !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-line.copyable:hover {
  color: #FFFFFF !important;
  background-color: rgba(255, 255, 255, 0.18) !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-line.copyable:hover .contact-icon {
  stroke: #FFFFFF !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-icon {
  stroke: #CBD5E1 !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-icon.copied {
  stroke: #34D399 !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .contact-copied-badge {
  background-color: rgba(16, 185, 129, 0.35) !important;
  color: #A7F3D0 !important;
  border-color: rgba(52, 211, 153, 0.6) !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .phone-type-tag {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .matrix-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .agent-avatar-chip span:last-child {
  color: #F8FAFC !important;
}

.data-table tbody tr.lead-row.lead-row-dark-bg .td-actions {
  background-color: transparent !important;
}

/* Agent Avatar Chip */
.agent-avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
}

.agent-avatar-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--action-tint);
  color: var(--action-bg);
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--action-border);
}

/* Sticky Action Column (Solid Background Fix to Prevent Transparency Bleed-through) */
.th-actions, .td-actions {
  position: sticky;
  right: 0;
  background-color: #FFFFFF;
  z-index: 5;
  box-shadow: -4px 0 8px -2px rgba(0, 0, 0, 0.05);
}

.data-table tbody tr.lead-row:nth-child(odd) .td-actions {
  background-color: #F8FAFC;
}

.data-table tbody tr.lead-row:nth-child(even) .td-actions {
  background-color: #FFFFFF;
}

.data-table tbody tr.lead-row:hover .td-actions {
  background-color: #F1F5F9;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Ghost Action Buttons with Micro Tooltip / Hover States */
.btn-action-ghost {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background-color: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  outline: none;
}

.btn-action-ghost:hover {
  background-color: #EFF6FF;
  color: #0B66D0;
  border-color: #BFDBFE;
}

.btn-action-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background-color: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-action-icon:hover {
  background-color: var(--action-tint);
  color: var(--action-bg);
  border-color: var(--action-border);
}

/* Pagination Footer */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--ink-secondary);
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.per-page-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-ui);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-primary);
  background-color: var(--surface);
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Bulk Actions Toolbar */
.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  margin-bottom: 16px;
  background-color: var(--action-tint);
  border: 1px solid var(--action-border);
  border-radius: var(--radius-ui);
  animation: fadeIn 0.15s ease-out;
  color: var(--action-bg);
  font-weight: 500;
}

.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Slide-out Right Detail Panel Component */
.side-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(27, 42, 74, 0.35);
  z-index: 2000;
  display: none;
  justify-content: flex-end;
  animation: fadeIn 0.15s ease-out;
}

.side-panel-overlay.active {
  display: flex;
}

.side-panel-card {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background-color: var(--surface);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.side-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #F8FAFC;
}

.side-panel-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
}

.side-panel-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.side-panel-section {
  background-color: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.side-panel-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.detail-val {
  font-size: 13.5px;
  color: var(--ink-primary);
  font-weight: 500;
}

.side-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  background-color: #F8FAFC;
}

/* Modals Overlay Layer */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(27, 42, 74, 0.4);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-default);
  animation: slideUp 0.18s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #F8FAFC;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--ink-secondary);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #F8FAFC;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

/* Settings Card-Based Section Layout */
.settings-section-card {
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.settings-section-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* Custom Status Settings Color Preset Buttons */
.color-preset-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
  padding: 0;
}

.color-preset-btn:hover {
  transform: scale(1.15);
}

/* Empty State Component */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background-color: var(--surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--ink-muted);
  margin-bottom: 12px;
  stroke-width: 1.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

/* Floating Sheet Dropdown Portal */
.sheet-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-ui);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 600;
  min-width: 120px;
  margin-top: 4px;
  padding: 4px 0;
}

.sheet-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.sheet-dropdown-item:hover {
  background-color: var(--surface-hover);
  color: var(--ink-primary);
}

.sheet-dropdown-item.text-danger {
  color: var(--error-text);
}

.sheet-dropdown-item.text-danger:hover {
  background-color: var(--error-bg);
}

/* Header Right Action Controls (Notifications & User Avatar Dropdown) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-action-btn {
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.header-action-btn:hover {
  background-color: var(--surface-hover);
  color: var(--action-bg);
  border-color: var(--action-border);
}

.notification-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--action-bg);
  border: 2px solid var(--surface);
}

.header-user-btn {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  height: 36px;
  padding: 0 12px 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
}

.header-user-btn:hover {
  background-color: var(--surface-hover);
  border-color: #CBD5E1;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--action-bg);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.user-dropdown-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px -4px rgba(27, 42, 74, 0.16);
  padding: 6px 0;
  z-index: 1500;
}

.user-dropdown-item {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--ink-primary);
  text-decoration: none;
  transition: background-color 0.15s ease;
  font-family: 'Inter', sans-serif;
}

.user-dropdown-item:hover {
  background-color: var(--surface-hover);
  color: var(--action-bg);
}

.user-dropdown-item.text-danger {
  color: var(--error-text);
}

.user-dropdown-item.text-danger:hover {
  background-color: var(--error-bg);
}

/* Settings Sub-Navigation Tabs Bar */
.settings-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 24px;
  overflow-x: auto;
}

.settings-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-tab-link:hover {
  color: var(--ink-primary);
  background-color: var(--surface-hover);
  border-radius: var(--radius-ui) var(--radius-ui) 0 0;
}

.settings-tab-link.active {
  color: var(--action-bg);
  border-bottom-color: var(--action-bg);
  font-weight: 600;
  background-color: var(--action-tint);
  border-radius: var(--radius-ui) var(--radius-ui) 0 0;
}

/* Quotation Outreach & Broadcast Preview Modals */
.outreach-modal-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background: #FFFFFF;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.outreach-channel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.outreach-tab-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: #FFFFFF;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.outreach-tab-btn.active {
  background: #0B66D0;
  color: #FFFFFF;
  border-color: #0B66D0;
}

.sms-preview-wrapper {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.sms-preview-bubble {
  max-width: 540px;
  margin: 0 auto 20px auto;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sms-bubble-text {
  background: #E0F2FE;
  color: #0369A1;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.sms-bubble-mms {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  text-align: center;
  padding: 12px;
}

.sms-mms-preview-card {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

.sms-mms-header {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sms-mms-header-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sms-mms-body {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  background: #F8FAFC;
  padding: 14px;
}

.batch-progress-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #FFFFFF;
  padding: 6px 12px;
}

.batch-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 12.5px;
}

.batch-progress-row:last-child {
  border-bottom: none;
}


