html {
    font-size: 0.9rem; /* or any value less than 1rem */
}

/* Shared card styling */
.card-hover {
    transition: box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Shared badge styling */
.type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Shared notes styling */
.notes-truncated {
    line-height: 1.4;
    max-height: 4.2rem;
    overflow: hidden;
}

/* Shared empty state styling */
.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
}

/* Shared button styling */
.btn-action {
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Specific styling that doesn't duplicate */
.interaction-date {
    font-weight: 600;
    color: #495057;
}

/* Contact list interaction column */
.last-interaction {
    min-width: 120px;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-hover {
        margin-bottom: 0.5rem !important;
    }
    
    .btn-group-sm .btn {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }
}

.common-pre-wrap {
  white-space: pre-wrap;
}
.min-height-2-4em {
  min-height: 2.4em;
}
.leads-static-field {
  min-height: 2.4em;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: transparent;
  font-size: 1rem;
  color: #212529;
  display: block;
  width: 100%;
}

/* Placeholder color for all forms */
::placeholder {
  color: #b0b0b0 !important;
  opacity: 1;
}
:-ms-input-placeholder { color: #b0b0b0 !important; }
::-ms-input-placeholder { color: #b0b0b0 !important; }

/* Prevent pagination from growing in width when active */
.card-header .pagination .page-link {
  min-width: 40px;
  text-align: center;
}

/* Mobile-responsive pagination */
@media (max-width: 768px) {
  .pagination {
    margin-bottom: 0;
    font-size: 0.875rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination .page-link {
    padding: 0.4rem 0.6rem;
    min-width: 35px;
    font-size: 0.8rem;
  }

  /* Hide page numbers on mobile, keep only prev/next and current */
  .pagination .page-item:not(.previous):not(.next):not(.active) {
    display: none;
  }

  /* Ensure prev/next buttons are visible and properly spaced */
  .pagination .page-item.previous,
  .pagination .page-item.next {
    display: block;
  }

  /* Show current page */
  .pagination .page-item.active {
    display: block;
  }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 480px) {
  .pagination {
    font-size: 0.8rem;
    justify-content: center !important;
    flex-wrap: wrap;
  }

  .pagination .page-link {
    padding: 0.3rem 0.5rem;
    min-width: 30px;
    font-size: 0.75rem;
  }

  /* Stack pagination vertically if needed */
  .pagination .page-item {
    margin: 0.1rem;
  }

  /* Simplify prev/next text on very small screens */
  .pagination .page-item.previous .page-link,
  .pagination .page-item.next .page-link {
    padding: 0.3rem 0.4rem;
  }
}
/* Mobile-first responsive table design - eliminates horizontal scrolling */
@media (max-width: 768px) {
  /* Remove forced min-width and horizontal scrolling */
  .table-responsive {
    overflow-x: visible;
    padding: 0 0.5rem;
  }

  table.table {
    min-width: auto;
    width: 100%;
  }

  /* Stack table content vertically on mobile */
  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .table tbody td {
    display: block;
    text-align: left !important;
    border: none;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 40%;
  }

  /* Add labels for each field on mobile */
  .table tbody td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0;
    width: 35%;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }

  /* Special handling for name field - make it prominent */
  .table tbody td:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    padding-left: 0;
  }

  .table tbody td:first-child:before {
    display: none;
  }

  /* Center action buttons */
  .table tbody td div[style*="text-align:center"] {
    text-align: left !important;
  }

  /* Remove nowrap from name column on mobile */
  .table tbody td[style*="white-space:nowrap"] {
    white-space: normal !important;
  }

  /* Optimize button sizing for mobile */
  .table tbody td .btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  /* Hide empty cells on mobile to save space */
  .table tbody td:empty,
  .table tbody td:has(*:empty) {
    display: none;
  }

  /* Center pagination within its container */
  nav[aria-label="Table navigation"] {
    padding: 0.5rem;
    text-align: center;
  }

}

/* Additional mobile improvements for iPhone */
@media (max-width: 480px) {
  /* Even tighter spacing for small iPhones */
  .table tbody tr {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .table tbody td {
    padding: 0.3rem 0;
    padding-left: 35%;
  }

  .table tbody td:before {
    width: 30%;
    font-size: 0.7rem;
  }

  /* Make action buttons stack vertically if multiple */
  .table tbody td .btn + .btn {
    margin-left: 0;
    margin-top: 0.25rem;
  }
}
.filter-panel {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #f8f9fa;
}
/* Stylish table headers */
.table thead th {
  background: #f1f3f6;
  color: #333;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #dee2e6;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 0.97rem;
}
.table-responsive {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-radius: 8px;
  overflow: hidden;
}
.table thead th:first-child {
  border-top-left-radius: 8px;
}
.table thead th:last-child {
  border-top-right-radius: 8px;
}
.model-view-table th {
  white-space: nowrap;
  width: 1%;
}

/* Crispy forms field spacing */
.form-control, .form-select {
    padding: 0.6rem 0.75rem !important;
}

/* Additional spacing for textarea fields */
.form-control[rows] {
    padding: 0.75rem !important;
}

/* Navigation menu styling */
.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #cdccc6 !important;
}

/* Dropdown menu styling */
.navbar-dark .dropdown-menu .dropdown-item {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

.navbar-dark .dropdown-menu .dropdown-item:hover {
    color: #cdccc6 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Navigation version display */
.navbar .version-badge {
    font-size: 0.85em;
    opacity: 0.92;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.35rem 1.2rem;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
}

.navbar .version-badge:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* HTMX indicator styling - hidden by default, shown during requests */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}


