/* Active Desktop Navigation */
.nav-link.active {
  background-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.nav-link:not(.active):hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* Enlarged Ergonomic Mobile Bottom Navigation */
.mob-nav-btn {
  transition: all 0.15s ease;
  border-radius: 14px;
  margin: 4px 2px;
}

.mob-nav-btn.active {
  color: #312e81;
  background-color: #eef2ff;
}

.mob-nav-btn.active i {
  color: #4f46e5;
  transform: translateY(-1px);
}

/* Sticky First Column for Wide Tables on Mobile & Desktop */
.table-sticky-first th:first-child,
.table-sticky-first td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: #ffffff;
  box-shadow: 3px 0 8px -3px rgba(15, 23, 42, 0.1);
}

.table-sticky-first thead th:first-child {
  background-color: #f8fafc;
  z-index: 15;
}

.table-sticky-first tbody tr:hover td:first-child {
  background-color: #f8fafc;
}

/* Input with Leading Icon Helper */
.field-icon-wrap {
  position: relative;
}

.field-icon-wrap > i.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.field-icon-wrap > input,
.field-icon-wrap > select {
  padding-left: 36px !important;
}

/* Safe area for mobile phones (iPhone notch / home bar) */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

.animate-slide-up {
  animation: slideUp 0.18s ease-out;
}

/* Accordion smooth transitions */
.acc-chevron {
  transition: transform 0.2s ease;
}

.acc-open .acc-chevron {
  transform: rotate(180deg);
}

/* Balanced multi-line clamping for long company names */
.line-clamp-2-balanced {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Global Sortable Table Headers */
th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

th.sortable-th:hover {
  background-color: #eef2ff !important;
  color: #1e293b;
}

th.sortable-th .sort-arrow-icon {
  display: inline-block;
  margin-left: 5px;
  font-size: 10px;
  vertical-align: middle;
  transition: color 0.12s ease;
}

/* Subtle Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
