:root {
  --bs-primary: #2a5fd6;
  --bs-primary-rgb: 42, 95, 214;
  --bs-link-color: #2a5fd6;
  --bs-link-color-rgb: 42, 95, 214;
  --bs-link-hover-color: #1f49ab;
  --bs-link-hover-color-rgb: 31, 73, 171;
  --smr-sidebar-width: 240px;
}

body {
  background-color: var(--bs-tertiary-bg);
}

/* ---------- Login ---------- */
.smr-login-wrap {
  min-height: 100vh;
}

/* ---------- App shell ---------- */
.smr-sidebar {
  width: var(--smr-sidebar-width);
  flex-shrink: 0;
}

.smr-sidebar .nav-link {
  color: var(--bs-body-color);
  border-radius: 0.375rem;
  font-size: 0.925rem;
}

.smr-sidebar .nav-link.active {
  background-color: var(--bs-primary);
  color: #fff;
}

.smr-sidebar .nav-link:hover:not(.active) {
  background-color: var(--bs-tertiary-bg);
}

.smr-main {
  min-width: 0;
}

.smr-view {
  display: none;
}

.smr-view.active {
  display: block;
}

/* ---------- Leads table ---------- */
/* Fill the viewport instead of growing the page — filters/pagination stay
   put, only the row list scrolls. Offset accounts for the topbar above it. */
#view-leads.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 8.75rem);
}

#view-leads .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#view-leads .table-responsive {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#view-leads thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-body-bg);
}

.smr-clickable-row {
  cursor: pointer;
}

.smr-truncate {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smr-filter-spinner {
  visibility: hidden;
}

.smr-filter-spinner.active {
  visibility: visible;
}

/* ---------- Detail offcanvas ---------- */
.smr-detail-row {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.smr-detail-row:last-child {
  border-bottom: none;
}

.smr-detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color);
}
