body {
  font-family: Nunito Sans, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: #30a5bf;
  min-height: 100vh;
  background-color: #f7f7f7 !important; /* Ensure consistent background across all devices */
}

#page-wrapper {
  padding: 50px;
  background-color: #f7f7f7;
  min-height: 100vh;
  box-sizing: border-box;
}

.inner-page-wrapper {
  margin: auto;
  width: 100%;
}

#table-wrapper {
  width: 100%;
  position: relative;
  overflow-x: auto;
}

/* Add scroll hint for mobile devices */
@media only screen and (max-width: 900px) {
  #table-wrapper::before {
    content: '← Swipe to see more →';
    position: absolute;
    top: -25px;
    right: 10px;
    font-size: 11px;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 10;
    opacity: 0.8;
    pointer-events: none;
    animation: fadeInOut 8s ease-in-out;
    animation-delay: 1s;
    animation-fill-mode: both;
  }

  /* Hide hint when user starts interacting with the table */
  #table-wrapper:hover::before,
  #table-wrapper:focus-within::before {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  15%, 70% { opacity: 0.8; }
  100% { opacity: 0; }
}

@keyframes pulseHint {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

.table-scroll-wrapper {
  width: 100%;
  min-width: 1300px;
}

.table-header {
  display: flex;
  background-color: #EDEEF4;
  border-radius: 4px;
  border: 1px solid #F3F3F3;
  padding: 0 10px;
  width: 100%;
  min-width: 1300px;
  z-index: 100;
  transition: box-shadow 0.2s ease;
}

.single-row {
  display: flex;
  align-items: center;
  margin-top: 1px;
  background-color: #fff !important;
  border-radius: 4px;
  border: 1px solid #F3F3F3;
  box-sizing: border-box;
  padding: 0 10px;
  transition: background-color 0.2s;
  width: fit-content;
  min-width: 100%;
}

.single-row:hover {
  background-color: #f9fafb;
}

.single-table-header {
  padding: 10px 6px;
  box-sizing: border-box;
  font-weight: bold;
  flex-grow: 0;
  flex-shrink: 0;
  font-size: 13px;
  position: relative;
  display: flex;
  align-items: center;
  line-height: 14px;
  color: #555;
}

.single-table-header .th-content {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
}

.single-table-header.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.single-table-header.sortable:hover {
  background-color: rgba(224, 226, 232, 0.5);
}

/* Sort icons - Lucide move-up / move-down DOM elements */
.single-table-header .sort-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  gap: 0;
}
.single-table-header .sort-icons i,
.single-table-header .sort-icons svg {
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  margin: 0 -2px;
  opacity: 0.7;
  color: #222;
  stroke-width: 3;
  flex-shrink: 0;
  transition: opacity 0.15s, color 0.15s;
  cursor: pointer;
}
.single-table-header .sort-up-icon:hover svg,
.single-table-header .sort-up-icon:hover {
  opacity: 1 !important;
  color: #30a5bf !important;
}
.single-table-header .sort-down-icon:hover svg,
.single-table-header .sort-down-icon:hover {
  opacity: 1 !important;
  color: #30a5bf !important;
}
.single-table-header.sort-asc .sort-up-icon,
.single-table-header.sort-asc .sort-up-icon svg {
  opacity: 1 !important;
  color: #30a5bf !important;
}
.single-table-header.sort-desc .sort-down-icon,
.single-table-header.sort-desc .sort-down-icon svg {
  opacity: 1 !important;
  color: #30a5bf !important;
}

.single-cell {
  padding: 10px 6px;
  box-sizing: border-box;
  flex-grow: 0;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 14px;
  display: flex;
  align-items: flex-start;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  min-height: 40px;
  vertical-align: top;
}

.single-cell a {
  text-decoration: none;
  border-bottom: 0;
  cursor: pointer;
  color: var(--main-color-192342);
}

.single-cell a:hover {
  border-bottom: 0
}

/* Override hover underline for specific clickable elements */
.single-cell .clickable-company:hover,
.single-cell .clickable-project:hover,
.single-cell .clickable-news:hover {
  border-bottom: none !important;
}

/* Column widths - Updated for new columns */
.single-table-header:nth-child(1), .single-cell:nth-child(1) { /* Status */
  width: 100px;
}
.single-table-header:nth-child(2), .single-cell:nth-child(2) { /* Priority */
  width: 110px;
}
.single-table-header:nth-child(3), .single-cell:nth-child(3) { /* Company */
  width: 182px;
}

/* Company cell specific layout for vertical stacking */
.single-cell:nth-child(3) {
  flex-direction: column;
  align-items: flex-start;
}
.single-table-header:nth-child(4), .single-cell:nth-child(4) { /* Project */
  width: 122px;
}
.single-table-header:nth-child(5), .single-cell:nth-child(5) { /* News Title */
  width: 200px;
}
.single-table-header:nth-child(6), .single-cell:nth-child(6) { /* Prospect Reason */
  width: 280px;
}
.single-table-header:nth-child(7), .single-cell:nth-child(7) { /* Location */
  width: 120px;
}
.single-table-header:nth-child(8), .single-cell:nth-child(8) { /* Date */
  width: 100px;
  text-align: center;
}
.single-table-header:nth-child(9), .single-cell:nth-child(9) { /* Draft Email */
  width: 115px;
  text-align: center;
}
.single-table-header:nth-child(10), .single-cell:nth-child(10) { /* Contacts */
  width: 100px;
  text-align: center;
}
.single-table-header:nth-child(11), .single-cell:nth-child(11) { /* Email Status */
  width: 120px;
}
.single-table-header:nth-child(12), .single-cell:nth-child(12) { /* Notes */
  width: 120px;
  text-align: center;
}
.single-table-header:nth-child(13), .single-cell:nth-child(13) { /* Delete */
  width: 35px;
  text-align: center;
}

.priority-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-high {
  background: #fef2f2;
  color: #dc2626;
}

.priority-medium {
  background: #fffbeb;
  color: #d97706;
}

.priority-low {
  background: #f0fdf4;
  color: #059669;
}

.priority-lowest {
  background: #faf5ff;
  color: #7c3aed;
}

/* Sticky header enhancements */
.table-header {
  transition: box-shadow 0.2s ease;
}

.table-header.scrolled {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* When header is fixed, make sure it appears above everything */
.table-header[style*="position: fixed"] {
  z-index: 1000 !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Ensure table content doesn't get hidden behind sticky header */
.table-body {
  position: relative;
}

/* Mobile-specific sticky header adjustments */
@media only screen and (max-width: 768px) {
  .table-header {
    top: 50px; /* Adjust for smaller mobile navigation */
  }
}

@media only screen and (max-width: 641px) {
  .table-header {
    top: 45px; /* Further adjustment for very small screens */
    font-size: 11px; /* Slightly smaller font for mobile */
  }
  
  .single-table-header {
    padding: 8px 4px; /* Reduce padding on mobile */
  }
}

button {
    font-family: Nunito Sans, sans-serif;
}

.relevance-score {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #374151;
  min-width: 30px;
  text-align: center;
}

.relevance-high {
  background: #dcfce7;
  color: #166534;
}

.relevance-medium {
  background: #fef3c7;
  color: #92400e;
}

.relevance-low {
  background: #fee2e2;
  color: #991b1b;
}

.services-needed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  max-width: 100%;
  overflow: hidden;
}

.services-visible {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.service-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #e4e7ee;
  background: #f1f5f9;
  color: #5b6577;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  transition: background-color 0.2s ease;
  cursor: default;
}

.service-tag:hover {
  background: #e2e8f0;
}

/* Smaller service tags for table rows */
.single-row .service-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 2px 7px;
  max-width: 100px;
}

.modal-header h3{
  letter-spacing: 0;
}


.view-more-btn {
  background: #f3f4f6;
  color: #6b7280;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.view-more-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Expandable services styles */
.services-expand-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
}

.services-expand-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.services-expand-btn:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #9ca3af;
}

.services-expand-btn.expanded {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.services-expand-btn.expanded:hover {
  background: #fecaca;
  border-color: #f87171;
}

.services-hidden {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
  width: 100%;
  max-height: 60px;
  overflow-y: auto;
  box-sizing: border-box;
}

.services-show-less {
  margin-top: 2px;
  width: auto;
  flex-basis: auto;
}

.no-services {
  color: #9ca3af;
  font-style: italic;
  font-size: 11px;
}

/* Expandable prospect reason styles */
.reason-expand-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
}

.reason-visible {
  width: 100%;
}

.reason-expand-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.reason-expand-btn:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #9ca3af;
}

.reason-expand-btn.expanded {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #d1d5db;
}

.reason-expand-btn.expanded:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #9ca3af;
}

.reason-hidden {
  width: 100%;
  margin-top: 2px;
}

.no-reason {
  color: #9ca3af;
  font-style: italic;
  font-size: 11px;
}

.prospect-title {
  font-weight: 500;
  color: #1f2937;
  line-height: 1.3;
}

.company-name {
  font-weight: 600;
  color: #1f2937;
}

.project-name {
  color: #6366f1;
  font-weight: 500;
}

/* Assistant button styling for draft email and drill down buttons */
.draft-email-btn,
.drill-down-btn {
  background-color: transparent !important;
  color: #f59e0b !important;
  border: 1px solid #f59e0b !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  font-family: "Inter", sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.draft-email-btn:hover,
.drill-down-btn:hover {
  background-color: #f59e0b !important;
  color: white !important;
}

.draft-email-btn--loading,
.draft-email-btn--loading:hover {
  background-color: #f5f5f5 !important;
  color: #aaa !important;
  border-color: #ddd !important;
  cursor: not-allowed !important;
  opacity: 0.75 !important;
}

.draft-email-btn:hover .sparkles-icon,
.drill-down-btn:hover .sparkles-icon {
  filter: brightness(100) !important;
}

.draft-email-btn .sparkles-icon,
.drill-down-btn .sparkles-icon {
  width: 12px !important;
  height: 12px !important;
  margin-right: 3px !important;
  fill: currentColor !important;
}

/* Contacts button styling */
.contacts-btn {
  background-color: transparent !important;
  color: #30a5bf!important;
  border: 1px solid #30a5bf!important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "Inter", sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  gap: 4px !important;
}

.contacts-btn:hover {
  background-color: #30a5bf!important;
  color: white !important;
}

.contacts-btn i {
  font-size: 11px !important;
}

#load-more-wrapper {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

.load-more-btn {
  text-decoration: none;
  background: #30a5bf;
  box-shadow: 0px 3px 10px #0000001a;
  color: white;
  border-radius: 6px !important;
  width: auto !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  cursor: pointer !important;
  margin-right: 8px !important;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e4e7ee;
  transition: opacity 0.15s ease;
  font-family: Nunito Sans, sans-serif;
}

.load-more-btn:hover {
  opacity: 0.8;
}

.load-more-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

#no-data {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 16px;
  background-color: white;
  border-radius: 4px;
  border: 1px solid #F3F3F3;
}

#company-view-no-data {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 16px;
  background-color: white;
  border-radius: 4px;
  border: 1px solid #F3F3F3;
}

/* Email Draft Modal Styles - Use specific selectors to avoid conflicts */
#email-draft-modal.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 80px;
  box-sizing: border-box;
}

#email-draft-modal .modal-content {
  background-color: white;
  border-radius: 8px;
  max-height: calc(100vh - 120px);
  max-width: 800px;
  width: 90%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 100000;
}

#email-draft-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f7f7f7;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

#email-draft-modal .modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

#email-draft-modal .modal-header .close {
  font-size: 24px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#email-draft-modal .modal-header .close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

#email-draft-modal .modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 0;
}

.email-draft-content {
  padding: 10px 0;
}

.email-field {
  margin-bottom: 15px;
}

.email-field label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
  font-size: 14px;
}

.email-field input,
.email-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.email-field input:focus,
.email-field textarea:focus {
  outline: none;
  border-color: #30a5bf;
  box-shadow: 0 0 0 2px rgba(48, 165, 191, 0.1);
}

.email-field input[readonly] {
  background-color: #f9fafb;
  color: #6b7280;
}

.email-field input:disabled,
.form-group input:disabled,
.form-group textarea:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.email-contacts {
  margin: 20px 0;
  padding: 15px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.email-contacts h4 {
  margin: 0 0 15px 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border: none;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0;
  transition: background-color 0.2s ease;
}

.contact-item:first-child {
  border-top: 1px solid #e5e7eb;
}

.contact-item:hover {
  background-color: #f9fafb;
}

.contact-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.contact-title {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.contact-email {
  font-size: 13px;
  color: #30a5bf;
  margin: 0;
}

.view-bio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid #30a5bf;
  background-color: #fff;
  color: #30a5bf;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  gap: 6px;
  flex-shrink: 0;
}


.view-bio-btn:hover {
  background-color: #30a5bf;
  color: white;
}

.view-bio-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background-color: #f3f4f6;
  color: #9ca3af;
  border-color: #d1d5db;
}

.view-bio-btn:disabled:hover {
  background-color: #f3f4f6;
  color: #9ca3af;
}

.contact-bio-section {
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border-left: 3px solid #30a5bf;
  border-radius: 4px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

.bio-content {
  font-size: 13px;
  line-height: 1.6;
}

.bio-content p {
  margin: 0 0 8px 0;
  color: #374151;
}

.bio-content p:last-child {
  margin-bottom: 0;
}

.bio-content strong {
  color: #1f2937;
  font-weight: 600;
}

.bio-text {
  margin-top: 4px;
  padding: 8px;
  background: #ffffff;
  border-radius: 4px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}

.bio-not-found {
  color: #6b7280 !important;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bio-not-found i {
  color: #9ca3af;
}

.bio-sales-intelligence {
  margin-top: 8px;
  padding: 10px;
  background: #ffffff;
  border-radius: 4px;
  border-left: 3px solid #10b981;
}

.sales-intel-item {
  margin: 0 0 8px 0 !important;
  font-size: 12px !important;
}

.sales-intel-item:last-child {
  margin-bottom: 0 !important;
}

.sales-intel-item strong {
  color: #059669;
}

.email-key-points {
  margin: 20px 0 0 0;
  padding: 15px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.email-key-points h4 {
  margin: 0 0 10px 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
}

.email-key-points ul {
  margin: 0;
  padding-left: 20px;
}

.email-key-points li {
  font-size: 13px;
  color: #374151;
  margin-bottom: 5px;
  line-height: 1.4;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
  flex-shrink: 0;
}

.email-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border-top: none;
}

.email-action-button {
  display: flex !important;
  align-items: center;
  padding: 8px 12px;
  font-size: 11px;
  border: 1px solid #30a5bf;
  background-color: #fff;
  color: #30a5bf;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}
 
.email-action-button svg {
  margin-right: 5px;
}

.email-action-button:hover {
  background-color: #30a5bf;
  color: white;
}

.email-action-button i {
  margin-right: 4px;
  font-size: 10px;
}

.regenerate-btn {
  background-color: #f59e0b !important;
  border-color: #f59e0b !important;
  color: white !important;
}

.regenerate-btn:hover {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
}

.regenerate-btn:disabled {
  background-color: #9ca3af !important;
  border-color: #9ca3af !important;
  cursor: not-allowed !important;
}

.prospect-reason {
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Contacts Modal Styles */
#contacts-modal.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease-in;
}

#contacts-modal .modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 0;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
  max-height: calc(100vh - 120px);
  max-width: 800px;
  width: 95%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#contacts-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f7f7f7;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

#contacts-modal .modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

#contacts-modal .modal-header .close {
  font-size: 24px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

#contacts-modal .modal-header .close:hover {
  color: #1f2937;
}

#contacts-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.contacts-modal-content {
  padding: 0;
}

#contacts-company-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  padding: 20px 20px 16px 20px;
  margin: 0;
  border-bottom: none;
  background-color: #f9fafb;
}

.contacts-list-wrapper {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0;
  background-color: #fff;
}

.contacts-list-wrapper::-webkit-scrollbar {
  width: 8px;
}

.contacts-list-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.contacts-list-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.contacts-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

#contacts-loading {
  display: none;
  text-align: center;
  padding: 40px;
}

#contacts-loading .loader {
  display: block;
  margin: 0 auto 20px auto;
}

#contacts-loading p {
  margin-top: 15px;
  color: #30a5bf;
  font-size: 14px;
}

#contacts-error {
  display: none;
  text-align: center;
  padding: 40px;
}

#contacts-error i {
  font-size: 32px;
  color: #ef4444;
  display: block;
  margin-bottom: 15px;
}

#contacts-error p {
  margin-top: 15px;
  color: #6b7280;
  font-size: 14px;
}

#_footer {
  display: none !important;
}

.date-section .table-header {
  background-color: #f7f7f7;
  border-radius: 4px;
  border: 1px solid #F3F3F3;
  padding: 0 10px;
  width: 100%;
  min-width: 1300px;
}

/* Remove the original table header since we're using date sections */
#table-wrapper > .table-header {
  display: none;
}

/* Remove the original table body since we're using date sections */
#table-wrapper > #table-body {
  display: none;
}

/* Service Provider Header */
#service-provider-header {
  margin-bottom: 20px;
  background-color: #fff;
  /* box-shadow: rgba(0, 0, 0, 0.06) 0px 8px 24px;  */
  border-radius: 14px;
  padding: 25px 20px;
  border: 1px solid rgb(228, 231, 238);
}

.provider-header-content h2 {
  margin: 0 0 15px 0;
  font-size: 22px;
  font-weight: 700;
}

.provider-header-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-detail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-label {
  font-weight: 600;
  color: #4b5563;
  min-width: 120px;
  flex-shrink: 0;
}

.provider-detail div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media only screen and (max-width: 900px) {
  #page-wrapper {
    padding: 26px;
  }

  .single-cell {
    padding: 4px 6px;
    font-size: 12px;
  }

  .inner-page-wrapper {
    max-width: 100%;
  }

  #table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling */
  }

  .table-scroll-wrapper {
    min-width: 1200px; /* Adjusted for better content display */
  }

  .table-header {
    min-width: 1200px;
  }

  .single-row {
    background-color: #fff !important;
  }
  
  .date-header {
    font-size: 20px;
    margin: 20px 0 10px 0;
  }
  
  .date-section .table-header {
    min-width: 1200px;
  }
  
  #service-provider-header {
    margin-bottom: 15px;
  }
  
  .provider-header-content h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .provider-header-details {
    gap: 10px;
  }
  
  .provider-detail {
    gap: 10px;
  }
  
  .detail-label {
    min-width: 100px;
    font-size: 12px;
  }
}

@media only screen and (max-width: 641px) {
  #page-wrapper {
    padding: 10px;
    box-sizing: border-box;
    padding-top: 10px !important;
    background-color: #f7f7f7 !important; /* Override inline style to maintain consistent background */
  }

  .inner-page-wrapper {
    width: unset;
    max-width: 100%;
  }

  #table-wrapper {
    max-width: unset;
    width: 100%;
    overflow-x: auto;
    box-shadow: unset;
    padding: 0 10px;
    /* Enhanced mobile scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #30a5bf #f0f0f0; /* Firefox */
  }

  /* Enhanced scrollbar styling for mobile */
  #table-wrapper::-webkit-scrollbar {
    height: 8px;
  }

  #table-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
  }

  #table-wrapper::-webkit-scrollbar-thumb {
    background: #30a5bf;
    border-radius: 4px;
  }

  #table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #2a94a8;
  }

  .table-scroll-wrapper {
    width: 100%;
    min-width: 1000px; /* Increased minimum width for better column spacing */
    position: relative;
  }

  /* Add a subtle shadow to indicate scrollable content */
  .table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
    opacity: 0.5;
  }

  .table-header {
    width: min-content;
    min-width: 1000px; /* Match the table-scroll-wrapper min-width */
  }

  .single-row {
    width: min-content;
    background-color: #fff !important;
  }

  .single-cell {
    padding: 4px 6px;
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
  }

  .single-cell a {
    border-bottom: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure text doesn't overflow in narrow columns */
  .single-cell {
    max-width: 0; /* This forces text to wrap within the cell width */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* But allow specific columns to show full text */
  .single-cell:nth-child(3), /* Company */
  .single-cell:nth-child(4), /* Project */
  .single-cell:nth-child(5), /* News Title */
  .single-cell:nth-child(6)  /* Prospect Reason */ {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }

  /* Adjust column widths for mobile - optimized for better content visibility */
  .single-table-header:nth-child(1), .single-cell:nth-child(1) {
    width: 80px; /* Status */
    min-width: 80px;
  }
  .single-table-header:nth-child(2), .single-cell:nth-child(2) {
    width: 100px; /* Priority */
    min-width: 100px;
  }
  .single-table-header:nth-child(3), .single-cell:nth-child(3) {
    width: 169px; /* Company */
    min-width: 169px;
  }
  .single-table-header:nth-child(4), .single-cell:nth-child(4) {
    width: 97px; /* Project */
    min-width: 97px;
  }
  .single-table-header:nth-child(5), .single-cell:nth-child(5) {
    width: 200px; /* News Title */
    min-width: 200px;
  }
  .single-table-header:nth-child(6), .single-cell:nth-child(6) {
    width: 180px; /* Prospect Reason */
    min-width: 180px;
  }
  .single-table-header:nth-child(7), .single-cell:nth-child(7) {
    width: 150px; /* Services */
    min-width: 150px;
  }
  .single-table-header:nth-child(8), .single-cell:nth-child(8) {
    width: 100px; /* Location */
    min-width: 100px;
  }
  .single-table-header:nth-child(9), .single-cell:nth-child(9) {
    width: 90px; /* Date */
    min-width: 90px;
  }
  .single-table-header:nth-child(10), .single-cell:nth-child(10) {
    width: 72px; /* Draft Email */
    min-width: 72px;
  }
  .single-table-header:nth-child(11), .single-cell:nth-child(11) {
    width: 100px; /* Email Status */
    min-width: 100px;
  }
  .single-table-header:nth-child(12), .single-cell:nth-child(12) {
    width: 70px; /* Notes */
    min-width: 70px;
  }
  .single-table-header:nth-child(13), .single-cell:nth-child(13) {
    width: 60px; /* Last column */
    min-width: 60px;
  }

  #email-draft-modal .modal-content {
    width: 95%;
    margin: 10px;
    max-height: calc(100vh - 80px);
  }

  #email-draft-modal .modal-header {
    padding: 15px;
  }

  #email-draft-modal .modal-body {
    padding: 15px;
  }

  .config-modal .modal-content {
    width: 98%;
    margin: 5px;
    max-height: calc(100vh - 60px);
  }

  .config-modal .modal-header {
    padding: 15px;
  }

  .config-modal .modal-body {
    padding: 15px;
  }

  .config-modal .modal-footer {
    padding: 12px 15px;
  }

  .modal-footer {
    padding: 12px 15px;
  }

  .email-actions {
    flex-direction: column;
    gap: 6px;
  }

  .email-action-button {
    padding: 6px 10px;
    font-size: 10px;
    width: 100%;
    justify-content: center;
  }
  
  .date-header {
    font-size: 18px;
    margin: 15px 0 10px 0;
  }
  
  .date-section .table-header {
    width: min-content;
    min-width: 1000px; /* Match the updated table width */
  }
  
  #service-provider-header {
    margin-bottom: 10px;
  }
  
  .provider-header-content h1 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  /* Mobile filter controls */
  .filter-controls-wrapper {
    margin-bottom: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    position: relative;
    /* Better scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #30a5bf #f0f0f0;
  }

  /* Enhanced scrollbar for filter controls */
  .filter-controls-wrapper::-webkit-scrollbar {
    height: 6px;
  }

  .filter-controls-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
  }

  .filter-controls-wrapper::-webkit-scrollbar-thumb {
    background: #30a5bf;
    border-radius: 3px;
  }

  #filter-control-buttons-wrapper {
    flex-wrap: nowrap;
    min-width: max-content;
    gap: 6px;
  }

  .filter-selector {
    padding: 6px 12px;
    font-size: 14px;
    margin-right: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
    border-radius: 6px;
  }

  .filter-selector-label {
    font-size: 14px;
  }

  /* Add subtle scroll indicator for filters on mobile with CSS animation */
  .filter-controls-wrapper::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    background: rgba(247,247,247,0.9);
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0.7;
    animation: scrollHintBounce 4s ease-in-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
  }

  /* Hide filter hint when user hovers or scrolls */
  .filter-controls-wrapper:hover::after,
  .filter-controls-wrapper:focus-within::after {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  @keyframes scrollHintBounce {
    0% { transform: translateY(-50%) translateX(0); opacity: 0; }
    15%, 70% { transform: translateY(-50%) translateX(0); opacity: 0.7; }
    45% { transform: translateY(-50%) translateX(3px); opacity: 1; }
    100% { transform: translateY(-50%) translateX(0); opacity: 0; }
  }
  
  .provider-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-label {
    min-width: auto;
    font-size: 11px;
  }
}

/* =================================================================
   SHARED FILTER STYLES
   Used across all tabs: event view, company view, insights view
   ================================================================= */

.filter-controls-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#filter-control-buttons-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Event view button styling - matches insights view */
.filter-controls-wrapper .btn {
  text-decoration: none;
  background: white;
  box-shadow: 0px 3px 10px #0000001a;
  color: #4b5563;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e4e7ee;
  transition: all 0.2s ease;
  margin-bottom: 0 !important;
  text-transform: none !important;
  flex-shrink: 0;
}

.filter-controls-wrapper .btn-secondary {
  background: white;
  color: #4b5563;
}

.filter-controls-wrapper .btn-secondary:hover {
  background: #f9fafb;
  border-color: #30a5bf;
  color: #30a5bf;
}

.filter-controls-wrapper .btn i,
.filter-controls-wrapper .btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Filter selector button */
.filter-selector {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  padding: 6px 15px;
  font-size: 14px;
  font-weight: bold;
  color: #192342;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
  background-color: #fff;
  flex-shrink: 0;
}

.filter-selector:hover {
  background-color: #f5f5f5;
}

.filter-selector.open {
  background-color: #f5f5f5;
  box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2),
    0px 3px 4px 0px rgba(0, 0, 0, 0.14),
    0px 1px 8px 0px rgba(0, 0, 0, 0.12);
}

.filter-selector-label {
  font-size: 14px;
  white-space: nowrap;
  color: #192342;
  user-select: none;
}

.filter-selector-header {
  position: absolute;
  top: 5px;
  right: 5px;
}

.filter-selector-content {
  position: absolute;
  background-color: #fff;
  padding: 26px 0 10px 0;
  box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2),
    0px 3px 4px 0px rgba(0, 0, 0, 0.14),
    0px 1px 8px 0px rgba(0, 0, 0, 0.12);
  left: 0;
  width: max-content;
  min-width: 200px;
  border-radius: 4px;
  display: none;
  z-index: 1999;
  top: 45px;
}

.filter-selector.open .filter-selector-content {
  display: block;
}

.filter-selector-options {
  max-height: 300px;
  overflow-y: auto;
  padding: 0 20px;
}

.filter-selector-options::-webkit-scrollbar {
  width: 8px;
}

.filter-selector-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filter-selector-options::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 10px;
}

.filter-selector-options::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

.filter-close-btn {
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #666;
  padding: 5px;
  line-height: 1;
}

.filter-close-btn:hover {
  color: #333;
}

.filter-option {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  transform: scale(1.2);
  margin-right: 10px;
  cursor: pointer;
}

.filter-option label {
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.filter-search-wrapper {
  margin-bottom: 10px;
}

.filter-search-wrapper input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.filter-search-wrapper input:focus {
  outline: none;
  border-color: #30a5bf;
}

.filter-checkbox-list {
  max-height: 200px;
  overflow-y: auto;
}

.filter-selector-footer {
  display: flex;
  padding: 15px 20px 0 20px;
  margin-top: 10px;
  border-top: 1px solid #d4d4d4;
  justify-content: space-between;
  gap: 10px;
}

.filter-selector-footer button {
  cursor: pointer;
  border-radius: 2px;
  outline: 0;
  border: 2px solid #30a5bf;
  padding: 10px 20px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  min-width: 100px;
  white-space: nowrap;
}

.filter-btn-clear {
  background-color: #fff;
  color: #30a5bf;
  flex: 1;
}

.filter-btn-clear:hover {
  background-color: #f5f5f5;
}

.filter-btn-clear.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.filter-btn-search {
  color: #fff;
  background-color: #30a5bf;
  flex: 1;
}

.filter-btn-search:hover {
  background-color: #2891a8;
}

/* Column-header filter icon button (used in table th cells) */
.th-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  padding: 1px 3px;
  opacity: 0.75;
  border-radius: 3px;
  line-height: 1;
  vertical-align: middle;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.th-filter-btn:hover {
  opacity: 1;
  color: #30a5bf;
}

.th-filter-btn.active {
  opacity: 1;
  color: #30a5bf;
}

.th-filter-btn svg {
  display: block;
  width: 12px !important;
  height: 12px !important;
}

/* Column-header inline filter dropdown */
.header-filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  min-width: 230px;
  max-width: 300px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  z-index: 2000;
  overflow: hidden;
  font-weight: normal;
}

.header-filter-dropdown.open {
  display: block;
}

.header-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.header-filter-header .filter-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #94a3b8;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}

.header-filter-header .filter-close-btn:hover {
  color: #ef4444;
}

/* Filter Tags */
.filter-tag {
  border: 1px solid #bdbdbd;
  padding: 4px 4px 4px 12px;
  display: flex;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  border-radius: 20px;
  background-color: #fff;
}

.filter-tag-bold {
  font-weight: 700;
  color: #192342;
}

.filter-tag-close-btn {
  margin-left: 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 14px;
  color: #666;
  background: transparent;
  border: none;
}

.filter-tag-close-btn:hover {
  color: #192342;
  font-weight: 700;
  background-color: #f0f0f0;
}

@keyframes growOut {
  0% {
    transform: scale(0);
  }
  80% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#date-range-picker {
  display: flex;
}

.custom-date-wrapper {
  position: relative;
}

#date-range-picker input {
  padding: 6px 8px 6px 34px;
  width: 130px;
  border: 1px solid;
  border-radius: 4px;
}

#date-range-picker input:first-of-type {
  margin-right: 10px;
}

.calendar-icon-wrapper {
  position: absolute;
  left: 0;
  width: 33px;
  height: 29px;
  bottom: 0;
  padding: 10px;
  box-sizing: border-box;
  background-color: var(--main-color-192342);
  border-radius: 4px 0 0 4px;
}

.calendar-icon-wrapper img {
  filter: invert(1);
  transform: translateY(-3px);
}

.input-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.subtext {
  font-size: 12px;
  font-weight: 300;
  margin-top: 6px;
}

.filter-close-btn {
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #999;
  padding: 5px;
}

.filter-close-btn:hover {
  color: #666;
}

.modal-open {
  overflow: hidden;
}

.noscroll {
  overflow: hidden;
}

/* Service Provider Header Updates */
.provider-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.provider-header-left {
  flex: 1;
}

.provider-header-right {
  flex-shrink: 0;
}

.configure-btn {
  text-decoration: none;
  background: #30a5bf;
  box-shadow: 0px 3px 10px #0000001a;
  color: white;
  border-radius: 6px !important;
  width: auto !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  cursor: pointer !important;
  margin-right: 8px !important;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e4e7ee;
  transition: opacity 0.15s ease;
}

.configure-btn:hover {
  opacity: 0.8;
}

.configure-btn i {
  font-size: 16px;
}

/* Prospect Configuration Modal */
.config-modal.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 80px;
  box-sizing: border-box;
}

.config-modal .modal-content {
  background-color: white;
  border-radius: 8px;
  max-height: calc(100vh - 120px);
  max-width: 900px;
  width: 95%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 100000;
}

.config-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f7f7f7;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.config-modal .modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.config-modal .modal-header .close {
  font-size: 24px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.config-modal .modal-header .close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.config-modal .modal-body {
  padding: 0 !important;
  background: #f7f7f7 !important;
  overflow-y: auto;
  overflow-x: visible;
  max-height: calc(90vh - 140px);
  min-height: 0;
  margin-bottom: 0;
}

/* Config Modal Header */
.config-modal-header {
  background: #f7f7f7 !important;
  border-bottom: 1px solid #ddd !important;
  padding: 16px 24px !important;
}

.config-modal-header h3 {
  font-size: 18px !important;
  color: #33475b !important;
  font-weight: 600 !important;
}

/* Config Tabs */
.config-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.config-tab-btn {
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-content h3 {
    letter-spacing: 0 !important;
}

.config-tab-btn:hover {
  color: #30a5bf;
}

.config-tab-btn.active {
  color: #30a5bf;
  border-bottom-color: #30a5bf;
}

.config-tab-btn i {
  font-size: 14px;
}

/* Config Tab Content */
.config-tab-content {
  display: none;
  padding: 24px;
  background: #fff;
}

.config-tab-content.active {
  display: block;
}

.config-modal .modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 11;
  margin-top: 0;
}

.config-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
}

.config-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.config-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.config-section h4 {
  color: #30a5bf;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  margin-top: 5px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

.form-group textarea:focus {
  outline: none;
  border-color: #30a5bf;
  box-shadow: 0 0 0 2px rgba(48, 165, 191, 0.1);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
  padding: 8px 0;
  text-transform: none;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.1);
  cursor: pointer;
}

.config-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
}

.config-action-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.config-action-button.cancel-btn {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.config-action-button.cancel-btn:hover {
  background-color: #e9e9e9;
  color: #333;
}

.config-action-button.save-btn {
  background: linear-gradient(135deg, #30a5bf 0%, #2d96b3 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(48, 165, 191, 0.2);
}

.config-action-button.save-btn:hover {
  background: linear-gradient(135deg, #2d96b3 0%, #2a8ba3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(48, 165, 191, 0.3);
}

.config-action-button.save-btn:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Service Areas Styling */
.global-checkbox-wrapper {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.global-checkbox-wrapper .checkbox-label {
  padding: 0;
  margin: 0;
  font-weight: 600;
  color: #333;
  text-transform: none;
}

.form-control,
select.form-control,
input[type="text"].form-control,
input[type="date"].form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
}

.form-control:focus,
select.form-control:focus,
input[type="text"].form-control:focus,
input[type="date"].form-control:focus {
  outline: none;
  border-color: #30a5bf;
  box-shadow: 0 0 0 2px rgba(48, 165, 191, 0.1);
}

.form-control:disabled,
select.form-control:disabled,
input[type="text"].form-control:disabled,
input[type="date"].form-control:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.service-area-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.service-area-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
  width: auto;
  border: 1px solid #e4e7ee;
  box-shadow: 0px 3px 10px #0000001a;
}

.service-area-btn i {
  font-size: 10px;
}

.save-area-btn {
  background: #30a5bf;
  color: white;
}

.save-area-btn:hover {
  opacity: 0.8;
}

.reset-area-btn {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.reset-area-btn:hover {
  opacity: 0.8;
}

.saved-areas-list {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.saved-areas-list:empty {
  display: none;
}

.saved-areas-list > div {
  padding: 12px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.saved-areas-list > div:hover {
  background-color: #f0f0f0;
  border-color: #30a5bf;
  box-shadow: 0 2px 4px rgba(48, 165, 191, 0.1);
}

.saved-areas-list > div > div:first-child {
  flex: 1;
  color: #30a5bf;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.saved-areas-list > div > div:last-child {
  display: flex;
  gap: 8px;
}

.saved-areas-list button {
  width: auto;
  height: auto;
  padding: 4px;
  font-size: 14px;
  border-radius: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc3545;
}

.saved-areas-list button:hover {
  transform: scale(1.1);
  color: #a71d2a;
}

/* Responsive adjustments for mobile */
@media only screen and (max-width: 768px) {
  .provider-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .provider-header-right {
    margin-top: 15px;
  }
  
  .configure-btn {
    width: 100%;
    justify-content: center;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .config-actions {
    flex-direction: column-reverse;
  }
  
  .config-action-button {
    width: 100%;
    justify-content: center;
  }

  .service-area-actions {
    flex-direction: column;
  }

  .service-area-btn {
    width: 100%;
    justify-content: center;
  }

  .saved-areas-list > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .saved-areas-list > div > div:last-child {
    width: 100%;
  }

  .saved-areas-list button {
    flex: 1;
  }
}

/* Multi-column checkbox layout for commodities */
.checkbox-group.multi-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  background-color: #fafafa;
}

.checkbox-group.multi-column .checkbox-label {
  margin: 0;
  white-space: nowrap;
}

/* Status dropdown styling */
.status-dropdown {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  background-color: white;
  cursor: pointer;
}

.status-dropdown:focus {
  outline: none;
  border-color: #30a5bf;
}

/* New prospect styling */
.single-row.new-prospect {
  background-color: #f8f9fa !important;
  border-left: 4px solid #30a5bf;
}

.single-row.new-prospect:hover {
  background-color: #f0f2f5 !important;
}

/* Email status styling */
.email-status {
  display: block;
  font-size: 12px;
  width: 100%;
  padding: 0 2px;
}

.email-status-btn {
  background: none;
  border: none;
  color: #30a5bf;
  cursor: pointer;
  text-decoration: underline;
  font-size: 12px;
  padding: 0;
}

.email-status-btn:hover {
  color: #2591a8;
}

.email-status-date {
  font-size: 11px;
  color: #666;
}

/* Notes styling */
.notes-btn {
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
  cursor: pointer;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.notes-btn:hover {
  background: #f9fafb;
  border-color: #30a5bf;
  color: #30a5bf;
}

/* Delete button styling */
.delete-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Small notes button styling for company actions */
.notes-btn.small-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 2px 8px !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: none;
}

.notes-btn.small-btn:hover {
  background: #e5e7eb;
  color: #6b7280;
  border-color: #9ca3af;
}

/* Company content container */
.company-content {
  display: block;
  line-height: 1.4;
  width: 100%;
  margin-top: 10px;
}

/* Company actions container */
.company-actions {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
}

/* Ensure company cell content flows properly */
.single-cell .company-name,
.single-cell .clickable-company {
  display: inline;
  margin-bottom: 0;
}

.single-cell .company-website-link {
  margin-left: 4px;
  display: inline;
}





/* Email date input styling */
.email-date-wrapper {
  margin-top: 8px;
  width: 100%;
  display: block;
}

.email-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: transparent;
  color: #374151;
  cursor: pointer;
  font-size: 12px;
  box-sizing: border-box;
  border: none;
}

.email-date-display:hover {
  color: #30a5bf;
}

.email-date-text {
  font-size: 12px;
  color: #374151;
  margin-right: 4px;
}

.email-date-display:hover .email-date-text {
  color: #30a5bf;
}

.email-date-icon {
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}

.email-date-display:hover .email-date-icon {
  color: #30a5bf;
}

.email-date-picker {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  z-index: -1;
}



/* Filter controls styling */
.filter-search-wrapper {
  margin-bottom: 8px;
}

.filter-search-wrapper input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.filter-checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
}

.filter-checkbox-list .filter-option {
  padding: 4px 0;
}

/* Modal styling for notes and email status */
.notes-scope-selector {
  margin-bottom: 16px;
}

.notes-scope-selector label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}

.notes-scope-selector input {
  margin-right: 8px;
  font-family: Nunito Sans, sans-serif;
}

.notes-actions, .email-status-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.notes-action-button, .email-status-action-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.notes-action-button.cancel-btn, .email-status-action-button.cancel-btn {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.notes-action-button.cancel-btn:hover, .email-status-action-button.cancel-btn:hover {
  background-color: #e5e7eb;
}

.notes-action-button.save-btn, .email-status-action-button.save-btn {
  background-color: #30a5bf;
  color: white;
}

.notes-action-button.save-btn:hover, .email-status-action-button.save-btn:hover {
  background-color: #2591a8;
}

#email-date-wrapper {
  margin-top: 12px;
}

#email-date {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group input[type="radio"] {
  margin-right: 8px;
}

/* Responsive adjustments for multi-column */
@media (max-width: 768px) {
  .checkbox-group.multi-column {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
  }
}

@media (max-width: 480px) {
  .checkbox-group.multi-column {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Enhanced Loader with Background Blur */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease-in-out;
}

.loader-wrapper.fade-out {
  opacity: 0;
}

/* ===================================
   SPINNER (shared by page and tab loaders)
   =================================== */
.loader,
.tab-loader-spinner {
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #30a5bf;
    width: 40px;
    height: 40px;
    animation: spin 0.5s linear infinite;
}

.loader {
  margin-bottom: 20px;
}

.loader-message {
  text-align: center;
  margin-top: 10px;
}

.loading-text {
  font-size: 16px;
  color: #30a5bf;
  font-weight: 600;
  min-height: 24px;
  animation: fadeInOut 0.5s ease-in-out;
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
  text-align: center;
  padding: 0 20px;
  max-width: 300px;
  margin-bottom: 10px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.loading-dots .dot {
  width: 6px;
  height: 6px;
  background-color: #30a5bf;
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================================
   TAB LOADER (shared across all tabs)
   =================================== */
.tab-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  width: 100%;
}

.tab-loader-text {
  display: none;
}

/* Mobile responsive for tab loader */
@media only screen and (max-width: 641px) {
  .tab-loader {
    padding: 40px 15px;
  }
  
  .tab-loader-spinner {
    width: 40px;
    height: 40px;
    border-width: 2px;
  }
}

/* Mobile responsive for loader message */
@media only screen and (max-width: 641px) {
  .loading-text {
    font-size: 14px;
    max-width: 250px;
    padding: 0 15px;
  }
  
  .loader {
    width: 40px;
    height: 40px;
    border-width: 2px;
    margin-bottom: 15px;
  }
  
  .loading-dots .dot {
    width: 5px;
    height: 5px;
  }
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Blur the page content when loading */
.loading #page-wrapper {
  filter: blur(4px);
  transition: filter 0.3s ease-in-out;
}

.loading #page-wrapper * {
  pointer-events: none;
}

/* Remove blur when loading is complete */
.loaded #page-wrapper {
  filter: none;
  transition: filter 0.3s ease-in-out;
}

.loaded #page-wrapper * {
  pointer-events: auto;
}

/* Enhanced Notes Modal Styles */
.notes-modal-content {
  width: 75% !important;
  height: 85vh;
  overflow-y: auto;
  font-family: Nunito Sans, sans-serif;
}

.notes-message {
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
  font-weight: 500;
  font-family: Nunito Sans, sans-serif;
}

.notes-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notes-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.notes-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  margin-top: 20px;
  padding: 0;
}

.notes-tab-btn {
  text-decoration: none;
  background: white;
  box-shadow: 0px 3px 10px #0000001a;
  color: #4b5563;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e4e7ee;
  transition: all 0.2s ease;
}

.notes-tab-btn:hover {
  background: #f9fafb;
  border-color: #30a5bf;
  color: #30a5bf;
}

.notes-tab-btn.active {
  background: #30a5bf;
  color: white;
  border-color: #30a5bf;
  box-shadow: 0px 3px 10px rgba(48, 165, 191, 0.3);
}

.notes-tab-btn i {
  font-size: 14px;
}

.notes-view {
  min-height: 400px;
}

.notes-tab-content {
  animation: noteFadeIn 0.3s ease-in-out;
}

@keyframes noteFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Notes List Header */
.notes-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.notes-list-header h4 {
  color: #2c3e50;
  margin: 0;
  font-size: 18px;
}

.add-note-btn {
  background: linear-gradient(135deg, #30a5bf 0%, #2d96b3 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: Nunito Sans, sans-serif;
  transition: all 0.3s ease;
}

.add-note-btn:hover {
  background: linear-gradient(135deg, #2d96b3 0%, #25829b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(45, 150, 179, 0.3);
}

.add-note-btn i {
  margin-right: 6px;
}

/* Notes Summary List */
.notes-summary-list {
  max-height: 500px;
  overflow-y: auto;
}

.note-summary-item {
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: Nunito Sans, sans-serif;
}

.note-summary-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #3498db;
}

.note-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.note-summary-title {
  font-weight: 700;
  color: #555;
  font-size: 14px;
  font-family: Nunito Sans, sans-serif;
  margin-bottom: 4px;
}

.note-summary-date {
  font-size: 12px;
  color: #7f8c8d;
  white-space: nowrap;
  font-family: Nunito Sans, sans-serif;
}

.note-summary-preview {
  color: #34495e;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-summary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #95a5a6;
  border-top: 1px solid #ecf0f1;
  padding-top: 4px;
}

.note-summary-author {
  font-weight: 500;
}

.note-summary-actions {
  display: flex;
  gap: 8px;
}

.note-summary-action-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.note-summary-action-btn.edit-btn {
  color: #3498db;
}

.note-summary-action-btn.edit-btn:hover {
  background-color: #e3f2fd;
}

.note-summary-action-btn.delete-btn {
  color: #e74c3c;
}

.note-summary-action-btn.delete-btn:hover {
  background-color: #ffebee;
}

.no-notes {
  text-align: center;
  color: #7f8c8d;
  padding: 60px 20px;
  font-style: italic;
  font-size: 16px;
}

/* Notes Form View */
.notes-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.notes-form-header h4 {
  color: #2c3e50;
  margin: 0;
  font-size: 18px;
}

.back-to-list-btn {
  background-color: #95a5a6;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.back-to-list-btn:hover {
  background-color: #7f8c8d;
}

.back-to-list-btn i {
  margin-right: 6px;
}

.add-note-section {
  padding: 0;
}

.add-note-section .form-group {
  margin-bottom: 20px;
}

.add-note-section label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #2c3e50;
}

.add-note-section input,
.add-note-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.add-note-section input:focus,
.add-note-section textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.add-note-section textarea {
  resize: vertical;
  min-height: 120px;
}

.notes-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.notes-action-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.notes-action-button.cancel-btn {
  background-color: #95a5a6;
  color: white;
}

.notes-action-button.cancel-btn:hover {
  background-color: #7f8c8d;
}

.save-note-btn {
  background: linear-gradient(135deg, #30a5bf 0%, #2d96b3 100%);
  color: white;
  font-family: Nunito Sans, sans-serif;
}

.save-note-btn:hover {
  background: linear-gradient(135deg, #2d96b3 0%, #25829b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(45, 150, 179, 0.3);
}

.save-note-btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

.notes-action-button i {
  margin-right: 6px;
}

/* Notes Modal Responsive adjustments */
@media (max-width: 768px) {
  .notes-modal-content {
    width: 98% !important;
    max-height: 95vh;
  }
  
  .notes-tabs {
    flex-direction: column;
  }
  
  .notes-tab-btn {
    text-align: left;
    border-bottom: 1px solid #ddd;
    border-right: none;
  }
  
  .notes-tab-btn.active {
    border-bottom-color: #ddd;
    border-left: 3px solid #3498db;
  }
  
  .notes-list-header,
  .notes-form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .note-summary-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .note-summary-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .notes-form-actions {
    flex-direction: column;
  }
}

/* Filter Tags Section Container */
.filter-tags-section {
  margin-bottom: 25px;
}

/* Hide section completely when both wrapper and button are hidden */
.filter-tags-section:has(#filter-tags-wrapper[style*="display: none"] + .save-preferences-btn[style*="display: none"]),
.filter-tags-section:has(#company-filter-tags-wrapper[style*="display: none"] + .save-preferences-btn[style*="display: none"]),
.filter-tags-section:has(#insights-filter-tags-wrapper[style*="display: none"] + .save-preferences-btn[style*="display: none"]),
.filter-tags-section:has(#campaigns-filter-tags-wrapper[style*="display: none"] + .save-preferences-btn[style*="display: none"]) {
  margin-bottom: 0;
}

/* Filter Tags Styles */
#filter-tags-wrapper,
#company-filter-tags-wrapper,
#insights-filter-tags-wrapper,
#campaigns-filter-tags-wrapper {
  margin-bottom: 5px;
  margin-top: 0 !important; /* Override news.css */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

#filter-tags-header,
#company-filter-tags-header,
#insights-filter-tags-header,
#campaigns-filter-tags-header {
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 16px;
  width: 100%;
}

#filter-tags-container,
#company-filter-tags-container,
#insights-filter-tags-container,
#campaigns-filter-tags-container {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
}

.save-preferences-btn {
  text-decoration: none;
  background: #30a5bf;
  box-shadow: 0px 3px 10px #0000001a;
  color: white;
  border-radius: 6px !important;
  width: auto !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  cursor: pointer !important;
  font-size: 13px;
  font-weight: 700;
  display: none; /* Hidden by default, shown when filters change */
  align-items: center;
  gap: 6px;
  border: 1px solid #e4e7ee;
  transition: opacity 0.15s ease;
  font-family: Nunito Sans, sans-serif;
  white-space: nowrap;
}

.save-preferences-btn:hover {
  opacity: 0.8;
}

.save-preferences-btn:active {
  transform: none;
}

.save-preferences-btn i {
  font-size: 14px;
}

/* Saving spinner inside the save preferences button */
.save-preferences-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed !important;
}

.save-pref-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: save-pref-spin 0.65s linear infinite;
  flex-shrink: 0;
}

@keyframes save-pref-spin {
  to { transform: rotate(360deg); }
}

.filter-tag {
  border: 1px solid #bdbdbd;
  padding: 2px 2px 2px 8px;
  display: flex;
  align-items: center;
  position: relative;
  font-size: 12px;
  text-transform: uppercase;
  border-radius: 1000px;
  margin-right: 6px;
  margin-bottom: 6px;
  background-color: #fff;
}

.filter-tag-bold {
  font-weight: 700;
  color: #192342;
}

.filter-tag-close-btn {
  position: relative;
  margin-left: 10px;
  cursor: pointer;
  opacity: 1;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
}

.filter-tag-close-btn:hover {
  color: #192342;
  font-weight: 700;
}

/* Mobile styles for filter tags */
@media only screen and (max-width: 641px) {
  #filter-tags-wrapper {
    margin-bottom: 20px;
    flex-direction: column;
  }

  #filter-tags-container {
    flex-wrap: wrap;
    width: 100%;
  }

  .filter-tag {
    margin-bottom: 6px;
  }

  .filter-tag-close-btn {
    font-size: 18px;
  }
  
  .save-preferences-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

/* Priority Badge Styles */
.clickable-priority {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.clickable-priority:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Priority Dropdown Styles */
.priority-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 4px;
  z-index: 1000;
  min-width: 100px;
  animation: fadeInScale 0.15s ease-out;
}

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

.priority-dropdown .priority-option {
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin: 2px 0;
}

.priority-dropdown .priority-option:hover {
  background-color: #f8fafc;
}

.priority-dropdown .priority-option.current {
  background-color: #e2e8f0;
  position: relative;
}

.priority-dropdown .priority-option.current::before {
  content: '✓';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #059669;
  font-weight: bold;
  font-size: 12px;
}

.priority-dropdown .priority-badge {
  margin: 0;
  font-size: 11px;
  padding: 3px 6px;
  pointer-events: none;
}

/* Mobile responsiveness for priority dropdown */
@media only screen and (max-width: 641px) {
  .priority-dropdown {
    min-width: 80px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  }
  
  .priority-dropdown .priority-option {
    padding: 8px 6px;
  }
  
  .clickable-priority:hover {
    transform: none;
  }
}

/* Email Status Custom Dropdown Styles */
.email-status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  position: relative;
  width: 80px;
  text-align: center;
}

.email-status-arrow {
  font-size: 9px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.email-status-badge.sent {
  background-color: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.email-status-badge.not_sent {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.email-status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.email-status-badge:hover .email-status-arrow {
  opacity: 1;
}

.email-status-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 4px;
  z-index: 1000;
  min-width: 120px;
  animation: fadeInScale 0.15s ease-out;
}

.email-status-dropdown .email-status-option {
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin: 2px 0;
  font-size: 12px;
  font-weight: 500;
}

.email-status-dropdown .email-status-option:hover {
  background-color: #f8fafc;
}

.email-status-dropdown .email-status-option.current {
  background-color: #e2e8f0;
  position: relative;
}

.email-status-dropdown .email-status-option.current::before {
  content: '✓';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #059669;
  font-weight: bold;
  font-size: 12px;
}

.email-status-option.sent {
  color: #059669;
}

.email-status-option.not_sent {
  color: #6b7280;
}

/* Mobile responsiveness for email status dropdown */
@media only screen and (max-width: 641px) {
  .email-status-dropdown {
    min-width: 100px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  }
  
  .email-status-dropdown .email-status-option {
    padding: 8px 6px;
  }
  
  .email-status-badge:hover {
    transform: none;
  }
}

/* Clickable company, project, and news links */
.clickable-company,
.clickable-project,
.clickable-news {
  color: #30a5bf !important;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  font-weight: 500;
}

.clickable-company:hover,
.clickable-project:hover,
.clickable-news:hover {
  color: #2890a8 !important;
  text-decoration: none;
}

.clickable-company:visited,
.clickable-project:visited,
.clickable-news:visited {
  color: #30a5bf !important;
}

/* Ensure company and project names still look good when not clickable */
.company-name,
.project-name {
  font-weight: 500;
  color: #333;
}

.prospect-title {
  color: #333;
  line-height: 1.4;
}

/* Configuration incomplete message styling */
.config-incomplete-message {
  text-align: center;
  padding: 60px 40px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 40px auto;
}

.config-incomplete-message h3 {
  color: #333;
  font-size: 24px;
  margin: 20px 0 15px 0;
  font-weight: 600;
}

.config-incomplete-message p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin: 15px 0;
}

.config-incomplete-message ul {
  color: #555;
  font-size: 15px;
  line-height: 1.8;
  list-style-type: disc;
  padding-left: 0;
}

.config-incomplete-message li {
  margin: 8px 0;
}

.config-incomplete-message .configure-btn {
  background-color: #30a5bf;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.config-incomplete-message .configure-btn:hover {
  background-color: #2890a8;
}

.config-incomplete-message .configure-btn i {
  font-size: 14px;
}

/* Company Search Go Button */
.company-search-go-btn {
  background: #2891a8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(40, 145, 168, 0.2);
}

.company-search-go-btn:hover {
  background: #237d92;
  box-shadow: 0 4px 8px rgba(40, 145, 168, 0.3);
}

.company-search-go-btn:active {
  background: #1f6d80;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(40, 145, 168, 0.2);
}

.company-search-go-btn i {
  font-size: 12px;
}

/* Enhanced Autocomplete Styling for Company Filter */
.company-autocomplete-input + #autoCompleteWrapperElement {
  position: absolute;
  background: #ffffff;
  border: 2px solid #30a5bf;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(48, 165, 191, 0.15), 
              0 4px 8px rgba(0, 0, 0, 0.08);
  z-index: 10000;
  overflow: hidden;
  max-height: 350px;
  overflow-y: auto;
  margin-top: 4px;
  animation: slideDown 0.2s ease-out;
}

#company-filter-list{
  min-width: 350px;
}

/* Config Modal Responsive Design */
@media (max-width: 768px) {
  .config-modal-content {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  .config-tabs {
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .config-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .config-tab-btn {
    padding: 12px 16px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .config-tab-btn i {
    display: none;
  }
  
  .config-tab-content {
    padding: 16px;
  }
  
  .config-modal .modal-body {
    max-height: calc(100vh - 140px);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
  position: relative;
  color: #2c3e50;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item:last-child {
  border-bottom: none;
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item::before {
  content: '🏢';
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item:hover {
  background: #e3f2f7;
  padding-left: 20px;
  color: #30a5bf;
  font-weight: 500;
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item:hover::before {
  opacity: 1;
}

.company-autocomplete-input + #autoCompleteWrapperElement .auto-complete-item:active {
  background: #d6eef5;
}

/* Add subtle scrollbar styling */
.company-autocomplete-input + #autoCompleteWrapperElement::-webkit-scrollbar {
  width: 8px;
}

.company-autocomplete-input + #autoCompleteWrapperElement::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 0 8px 8px 0;
}

.company-autocomplete-input + #autoCompleteWrapperElement::-webkit-scrollbar-thumb {
  background: #30a5bf;
  border-radius: 4px;
}

.company-autocomplete-input + #autoCompleteWrapperElement::-webkit-scrollbar-thumb:hover {
  background: #2890a8;
}

/* Add a subtle header to the autocomplete */
.company-autocomplete-input + #autoCompleteWrapperElement::before {
  content: 'Select a company';
  display: block;
  padding: 8px 16px;
  background: #30a5bf;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1;
}
/* Deal Stages Configuration Styles */
.deal-stages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.deal-stage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e4e7ee;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.deal-stage-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #30a5bf;
}

.deal-stage-item.inactive {
  opacity: 0.6;
  background: #f9fafb;
}

.deal-stage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deal-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deal-stage-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #e4e7ee;
}

.deal-stage-name {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
}

.deal-stage-badge {
  font-size: 10px;
  padding: 2px 8px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.deal-stage-badge.inactive-badge {
  background: #fee2e2;
  color: #991b1b;
}

.deal-stage-details {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #6b7280;
}

.deal-stage-order {
  font-weight: 500;
}

.deal-stage-description {
  font-style: italic;
}

.deal-stage-actions {
  display: flex;
  gap: 6px;
}

.deal-stage-action-btn {
  padding: 6px 10px;
  border: 1px solid #e4e7ee;
  background: white;
  color: #6b7280;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.deal-stage-action-btn:hover {
  background: #f9fafb;
  color: #30a5bf;
  border-color: #30a5bf;
}

.deal-stage-action-btn.delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #dc2626;
}

.deal-stage-action-btn.edit-btn:hover {
  background: #dbeafe;
  color: #2563eb;
  border-color: #2563eb;
}