.authentication {
  background: #f0f0f0;
}

.authentication .authentication-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url(https://images.squarespace-cdn.com/content/v1/6346993…/b5506a5a-3291-4146-a35b-7f2be5c7ae69/inacoustic-Road-Traffic-Noise-Survey-Devon.jpg)
    center center;
  background-size: cover;
}

.authentication .authentication-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #3c77baa3;
  /* Adjust the color and opacity */
  z-index: 1;
}

.authentication .authentication-cover > * {
  position: relative;
  z-index: 2;
  /* Ensures content appears above the overlay */
}

.page {
  justify-content: normal !important;
  min-height: 100% !important;
}

.table thead tr th {
  font-size: 1rem !important;
  background-color: #f6f6f6;
  color: #212529;
}

.card .card-header .card-title {
  font-size: 1.2rem;
}

.card {
  background: #ffffff !important;
  border: 1px solid #bababa !important;
  border-radius: 0px;
}

.header-background {
  background: #f6f6f6;
  border-bottom: 1px solid #bababa !important;
  border-radius: 8px 8px 0px 0px !important;
}
/* 
.header-border-top {
  border-top: 1px solid #bababa !important;
} */

.text-end-right {
  text-align: right !important;
}

.main-content {
  padding: 30px 0px !important;
  background-color: #f5f9ff !important;
}

a[href^="mailto:"] {
  color: rgb(var(--primary-rgb)) !important;
}

.card-full {
  max-width: 100rem;
  margin: auto auto !important;
}

.tab-content .tab-pane {
  border: 0px !important;
}

.swal2-container .swal2-icon.swal2-warning {
  border-color: #ffffff;
  color: #ffffff;
}

.swal2-popup.swal2-modal.swal2-icon-warning .swal2-html-container {
  color: #ffffff !important;
}

.swal2-popup.swal2-modal.swal2-icon-warning.swal2-show {
  background: #f00606;
  color: #ffffff !important;
}

.swal2-container .swal2-styled.swal2-confirm,
.swal2-container .swal2-styled.swal2-cancel,
.swal2-container .swal2-html-container {
  font-size: 1.1rem !important;
}

.swal2-container .swal2-title {
  font-size: 1.5rem !important;
}

.badge {
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  font-size: 1rem;
}

.app-header {
  z-index: 599 !important;
}

.modal {
  z-index: 899 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Ensure backdrop is below modal but not blocking the page */
/* .modal-backdrop {
  z-index: 799 !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
} */

/* Ensure body is interactive when modal is closed */
body {
  overflow: auto !important;
}

/* Prevent modal from disabling page interaction */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

/* #main-content.blurred {
  filter: blur(5px);
  transition: filter 0.3s ease;
} */

.modal-xl-custom {
  max-width: 1000px;
}

.modal-header {
  background: #3c77ba;
}

.modal-header .modal-title {
  color: #ffffff !important;
}

.modal-content {
  border: 0px !important;
}

/* Optional: improve result hover + layout */
.list-group-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

mark {
  background-color: #ffe69c;
  padding: 0 2px;
}

.list-group-item:hover {
  background: #3c77ba;
  color: #ffffff;
}

.detail-panel-header {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  background: #8e8e8e;
}

.detail-panel-body {
  padding: 1rem;
}

#search-modal-dialog {
  transition: all 0.3s ease;
  margin: auto;
}

/* Default size */
.modal-xl-custom {
  max-width: 1000px;
}

.modal.left-modal .modal-dialog {
  left: -550px !important;
}

.modal.left .modal-content {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.modal.left {
  z-index: 1050 !important;
}

/* Docked to left */
#search-modal-dialog.docked-left {
  max-width: 30vw !important;
  margin-left: 5vw;
  margin-right: auto;
}

/* Slide-out panel stays the same */
.detail-panel {
  position: fixed;
  top: 0px;
  right: -100%;
  width: 60vw;
  max-width: 100%;
  height: 100vh;
  background: #f5f9ff !important;
  background-size: cover;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 699;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.detail-panel.open {
  right: 0;
}

body.noscroll {
  overflow: hidden !important;
}

/* Base styling */
.placeholder-box,
.dashboard-widget {
  background: #ffffff !important;
  border: 1px solid #bababa !important;
  border-radius: 8px;
  min-height: 150px;
  padding: 1rem;
  transition:
    background-color 0.3s ease,
    border 0.3s ease;
  position: relative;
}

/* Keep hover style subtle for whole widget */
.dashboard-widget:hover {
  /* background-color: #f1f1f1; */
}

/* Border only shows when drag button is hovered */
.drag-widget-btn:hover ~ .widget-content,
.drag-widget-btn:hover ~ *:not(.remove-widget-btn):not(.drag-widget-btn) {
  border: 2px dotted #bbb;
}

/* Controls: hidden until hover */
.drag-widget-btn,
.remove-widget-btn {
  display: none;
  z-index: 10;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Top left drag handle */
.drag-widget-btn {
  top: 0.25rem;
  left: 0.25rem;
}

/* Top right remove button */
.remove-widget-btn {
  top: 0.25rem;
  right: 0.25rem;
}

/* Show buttons only when widget is hovered */
.dashboard-widget:hover .drag-widget-btn,
.dashboard-widget:hover .remove-widget-btn {
  display: inline-block;
}

/* Optional: pointer cursor for buttons */
.drag-widget-btn:hover,
.remove-widget-btn:hover {
  cursor: pointer;
}

.revisions {
  list-style: none;
  margin: 0px 0px;
  padding: 0px;
}

.table th,
.table td {
  padding: 8px 8px !important;
}

.toast .btn {
  font-size: 0.85rem;
}
.toast .toast-header {
  font-weight: 600;
}

.toast .toast-header {
  background-color: #484848 !important;
  padding: 0.8rem 0.8rem;
  font-size: 1.2rem;
  color: #ffffff !important;
}

.toast .toast-body {
  font-size: 1rem;
}

#toast-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
}

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

.bg-secondary-transparent {
  background-color: #f5f9ff !important;
  color: #3d77bb !important;
}

div.dataTables_scrollBody {
  /* border-left: 1px solid #ddd !important; */
  border-left: none !important;
}

#chat-log::-webkit-scrollbar {
  width: 6px;
}
#chat-log::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
#project-map {
  width: 100%;
  height: 400px;
}
.bg-green-500 {
  background-color: #22c55e; /* Tailwind green-500 */
}

.bg-blue-500 {
  background-color: #3b82f6; /* Tailwind blue-500 */
}

.bg-gray-400 {
  background-color: #9ca3af; /* Tailwind gray-400 */
}

.bg-gray-300 {
  background-color: #d1d5db; /* Tailwind gray-300 */
}

.text-white {
  color: #ffffff;
}

.text-black {
  color: #000000;
}

/* Optional: consistent padding, rounded corners, etc. */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px; /* pill shape */
}

.stat-card {
  background: #3c77ba !important;
  color: #fff;
  border: 0;
  border-radius: 0.7rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
}
.stat-card .stat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
  padding: 1.25rem 1.25rem;
}
.stat-card .label {
  opacity: 0.9;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.stat-card .value {
  font-size: clamp(2.25rem, 3vw + 1rem, 4.25rem); /* bigger stat */
  line-height: 1;
  font-weight: 800;
  margin-top: 0.15rem;
}
.stat-card .icon {
  opacity: 0.95;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
  font-size: 4rem; /* bigger icon */
}
/* subtle corner sheen */
.stat-card::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.22),
    transparent 70%
  );
  transform: rotate(25deg);
  pointer-events: none;
}
/* hover lift */
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}
@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stat-card:hover {
    transition: none;
    transform: none;
  }
}
#dropzone.border-primary {
  background-color: #e9f5ff;
  border-color: #0d6efd !important;
}

.progress {
  height: 30px;
}

.bg-success,
.btn-success,
.bg-secondary {
  background-color: #3d77ba !important;
}

.text-success {
  color: #3d77ba !important;
}

.btn-outline-secondary {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.btn-check:active + .btn-outline-secondary,
.btn-check:checked + .btn-outline-secondary,
.btn-outline-secondary.active,
.btn-outline-secondary.dropdown-toggle.show,
.btn-outline-secondary:active,
.btn-check + .btn.btn-outline-secondary:hover {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[aria-selected="true"]:not(
    .select2-results__option--highlighted
  ) {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.menu-click .app-sidebar .slide.has-sub .slide-menu,
[data-nav-style="menu-click"][data-nav-layout="horizontal"]
  .app-sidebar
  .slide.has-sub
  .slide-menu,
[data-nav-style="menu-click"][data-toggled="menu-click-closed"]
  .app-sidebar
  .slide.has-sub
  .slide-menu {
  inset-inline-start: unset !important;
}

/* ==========================================
   ROOT FONT SIZE REDUCTION - This affects all rem values
   ========================================== */
html {
  /* font-size: 14px !important;  */
}

.authentication {
  background: #f0f0f0;
}

.authentication .authentication-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url(https://images.squarespace-cdn.com/content/v1/6346993…/b5506a5a-3291-4146-a35b-7f2be5c7ae69/inacoustic-Road-Traffic-Noise-Survey-Devon.jpg)
    center center;
  background-size: cover;
}

.authentication .authentication-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #3c77baa3;
  z-index: 1;
}

.authentication .authentication-cover > * {
  position: relative;
  z-index: 2;
}

.page {
  justify-content: normal !important;
  min-height: 100% !important;
}

/* ==========================================
   TABLE STYLES - Reduced
   ========================================== */
.table thead tr th {
  font-size: 0.8rem !important; /* Was 1rem */
  background-color: #f6f6f6;
  color: #212529;
}

.table tbody tr td {
  font-size: 0.8rem !important;
}

.table th,
.table td {
  padding: 5px 6px !important; /* Was 8px 8px */
}

/* ==========================================
   CARD STYLES
   ========================================== */
.card .card-header .card-title {
  font-size: 0.95rem; /* Was 1.2rem */
}

.card {
  background: #ffffff !important;
  border: 1px solid #bababa !important;
  border-radius: 0px;
}

.card-body {
  font-size: 0.85rem;
}

.header-background {
  background: #f6f6f6;
  border-bottom: 1px solid #bababa !important;
  border-radius: 8px 8px 0px 0px !important;
}

.text-end-right {
  text-align: right !important;
}

.main-content {
  padding: 30px 0px !important;
  background-color: #f5f9ff !important;
}

a[href^="mailto:"] {
  color: rgb(var(--primary-rgb)) !important;
}

.card-full {
  max-width: 100rem;
  margin: auto auto !important;
}

.tab-content .tab-pane {
  border: 0px !important;
}

/* ==========================================
   SWEETALERT STYLES - Reduced
   ========================================== */
.swal2-container .swal2-icon.swal2-warning {
  border-color: #ffffff;
  color: #ffffff;
}

.swal2-popup.swal2-modal.swal2-icon-warning .swal2-html-container {
  color: #ffffff !important;
}

.swal2-popup.swal2-modal.swal2-icon-warning.swal2-show {
  background: #f00606;
  color: #ffffff !important;
}

.swal2-container .swal2-styled.swal2-confirm,
.swal2-container .swal2-styled.swal2-cancel,
.swal2-container .swal2-html-container {
  font-size: 0.9rem !important; /* Was 1.1rem */
}

.swal2-container .swal2-title {
  font-size: 1.1rem !important; /* Was 1.5rem */
}

/* ==========================================
   BADGE STYLES - Reduced
   ========================================== */
.badge {
  padding: 0.3rem 0.5rem; /* Was 0.5rem 0.75rem */
  font-weight: 500;
  border-radius: 0.25rem;
  font-size: 0.75rem; /* Was 1rem */
}

/* ==========================================
   MODAL STYLES
   ========================================== */
.app-header {
  z-index: 599 !important;
}

.modal {
  z-index: 899 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

body {
  overflow: auto !important;
}

body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

.modal-xl-custom {
  max-width: 1000px;
}

.modal-header {
  background: #3c77ba;
  padding: 0.75rem 1rem; /* Reduced padding */
}

.modal-header .modal-title {
  color: #ffffff !important;
  font-size: 1rem; /* Explicit smaller size */
}

.modal-content {
  border: 0px !important;
}

.modal-body {
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
}

.modal-footer {
  padding: 0.5rem 1rem;
}

/* ==========================================
   LIST GROUP STYLES
   ========================================== */
.list-group-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.list-group-item {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

mark {
  background-color: #ffe69c;
  padding: 0 2px;
}

.list-group-item:hover {
  background: #3c77ba;
  color: #ffffff;
}

/* ==========================================
   DETAIL PANEL STYLES
   ========================================== */
.detail-panel-header {
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  background: #8e8e8e;
}

.detail-panel-body {
  padding: 0.75rem;
  font-size: 0.85rem;
}

#search-modal-dialog {
  transition: all 0.3s ease;
  margin: auto;
}

.modal.left-modal .modal-dialog {
  left: -550px !important;
}

.modal.left .modal-content {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.modal.left {
  z-index: 1050 !important;
}

#search-modal-dialog.docked-left {
  max-width: 30vw !important;
  margin-left: 5vw;
  margin-right: auto;
}

.detail-panel {
  position: fixed;
  top: 0px;
  right: -100%;
  width: 60vw;
  max-width: 100%;
  height: 100vh;
  background: #f5f9ff !important;
  background-size: cover;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 699;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.detail-panel.open {
  right: 0;
}

body.noscroll {
  overflow: hidden !important;
}

/* ==========================================
   DASHBOARD WIDGET STYLES
   ========================================== */
.placeholder-box,
.dashboard-widget {
  background: #ffffff !important;
  border: 1px solid #bababa !important;
  border-radius: 8px;
  min-height: 120px; /* Reduced from 150px */
  padding: 0.75rem;
  transition:
    background-color 0.3s ease,
    border 0.3s ease;
  position: relative;
}

.drag-widget-btn:hover ~ .widget-content,
.drag-widget-btn:hover ~ *:not(.remove-widget-btn):not(.drag-widget-btn) {
  border: 2px dotted #bbb;
}

.drag-widget-btn,
.remove-widget-btn {
  display: none;
  z-index: 10;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem; /* Was 0.9rem */
  line-height: 1;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.drag-widget-btn {
  top: 0.25rem;
  left: 0.25rem;
}

.remove-widget-btn {
  top: 0.25rem;
  right: 0.25rem;
}

.dashboard-widget:hover .drag-widget-btn,
.dashboard-widget:hover .remove-widget-btn {
  display: inline-block;
}

.drag-widget-btn:hover,
.remove-widget-btn:hover {
  cursor: pointer;
}

.revisions {
  list-style: none;
  margin: 0px 0px;
  padding: 0px;
}

/* ==========================================
   TOAST STYLES - Reduced
   ========================================== */
.toast .btn {
  font-size: 0.75rem; /* Was 0.85rem */
}

.toast .toast-header {
  font-weight: 600;
  background-color: #484848 !important;
  padding: 0.5rem 0.6rem; /* Was 0.8rem */
  font-size: 0.9rem; /* Was 1.2rem */
  color: #ffffff !important;
}

.toast .toast-body {
  font-size: 0.8rem; /* Was 1rem */
  padding: 0.5rem 0.6rem;
}

#toast-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
}

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

.bg-secondary-transparent {
  background-color: #f5f9ff !important;
  color: #3d77bb !important;
}

div.dataTables_scrollBody {
  border-left: none !important;
}

#chat-log::-webkit-scrollbar {
  width: 6px;
}
#chat-log::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

#project-map {
  width: 100%;
  height: 400px;
}

/* ==========================================
   UTILITY COLOR CLASSES
   ========================================== */
.bg-green-500 {
  background-color: #22c55e;
}

.bg-blue-500 {
  background-color: #3b82f6;
}

.bg-gray-400 {
  background-color: #9ca3af;
}

.bg-gray-300 {
  background-color: #d1d5db;
}

.text-white {
  color: #ffffff;
}

.text-black {
  color: #000000;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem; /* Was 0.875rem */
  font-weight: 600;
  border-radius: 9999px;
}

/* ==========================================
   STAT CARD STYLES - Reduced
   ========================================== */
.stat-card {
  background: #3c77ba !important;
  color: #fff;
  border: 0;
  border-radius: 0.7rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
}

.stat-card .stat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px; /* Was 120px */
  padding: 0.9rem 1rem; /* Was 1.25rem */
}

.stat-card .label {
  opacity: 0.9;
  font-size: 0.85rem; /* Was 1.2rem */
  letter-spacing: 0.02em;
}

.stat-card .value {
  font-size: clamp(
    1.5rem,
    2vw + 0.5rem,
    2.5rem
  ); /* Was clamp(2.25rem, 3vw + 1rem, 4.25rem) */
  line-height: 1;
  font-weight: 800;
  margin-top: 0.15rem;
}

.stat-card .icon {
  opacity: 0.95;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
  font-size: 2.5rem; /* Was 4rem */
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.22),
    transparent 70%
  );
  transform: rotate(25deg);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stat-card:hover {
    transition: none;
    transform: none;
  }
}

/* ==========================================
   FORM & BUTTON STYLES
   ========================================== */
#dropzone.border-primary {
  background-color: #e9f5ff;
  border-color: #0d6efd !important;
}

.progress {
  height: 20px; /* Was 30px */
}

.bg-success,
.btn-success,
.bg-secondary {
  background-color: #3d77ba !important;
}

.text-success {
  color: #3d77ba !important;
}

.btn-outline-secondary {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.btn-check:active + .btn-outline-secondary,
.btn-check:checked + .btn-outline-secondary,
.btn-outline-secondary.active,
.btn-outline-secondary.dropdown-toggle.show,
.btn-outline-secondary:active,
.btn-check + .btn.btn-outline-secondary:hover {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[aria-selected="true"]:not(
    .select2-results__option--highlighted
  ) {
  background-color: #ffffff !important;
  color: #3d77ba !important;
  border-color: #3d77ba !important;
}

.menu-click .app-sidebar .slide.has-sub .slide-menu,
[data-nav-style="menu-click"][data-nav-layout="horizontal"]
  .app-sidebar
  .slide.has-sub
  .slide-menu,
[data-nav-style="menu-click"][data-toggled="menu-click-closed"]
  .app-sidebar
  .slide.has-sub
  .slide-menu {
  inset-inline-start: unset !important;
}

/* ==========================================
   FORM ELEMENTS - Compact sizing
   ========================================== */
label,
.form-label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.main-content .form-control,
.main-content .form-select,
.main-content input[type="text"],
.main-content input[type="email"],
.main-content input[type="password"],
.main-content input[type="number"],
.main-content input[type="date"],
.main-content input[type="tel"],
.main-content textarea,
.main-content select {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

.form-control-sm {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.4rem !important;
}

/* Buttons */
.btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

.btn-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.btn-lg {
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
}

/* Select2 */
.select2-container--bootstrap-5 .select2-selection {
  font-size: 0.8rem !important;
  min-height: 32px !important;
}

.select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered {
  padding: 0.3rem 0.5rem !important;
  line-height: 1.4 !important;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

/* ── DataTables ───────────────────────────────────────────── */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* Info text */
.dataTables_wrapper .dataTables_info {
  color: var(--muted);
}

/* Pagination container */
.dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* Every paginate button */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--text) !important;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--primary-light, #ede9fe) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Active / current page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
/* Force white on every descendant of an active pagination button — covers DataTables anchors, Bootstrap .page-link, inner spans, etc. */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current *,
.dataTables_wrapper .dataTables_paginate .page-item.active,
.dataTables_wrapper .dataTables_paginate .page-item.active *,
.pagination .page-item.active .page-link,
.pagination .page-item.active .page-link * {
  color: #fff !important;
}

/* Disabled Previous / Next */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: #f8fafc !important;
  border-color: var(--border) !important;
  color: #bbb !important;
  cursor: default;
}

/* Nav tabs */
.nav-tabs .nav-link,
.nav-pills .nav-link {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
}

/* Headings */
h1,
.h1 {
  font-size: 1.5rem;
}
h2,
.h2 {
  font-size: 1.3rem;
}
h3,
.h3 {
  font-size: 1.1rem;
}
h4,
.h4 {
  font-size: 0.95rem;
}
h5,
.h5 {
  font-size: 0.875rem;
}
h6,
.h6 {
  font-size: 0.8rem;
}

/* Dropdown menus */
.dropdown-menu {
  font-size: 0.8rem;
}

.dropdown-item {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 1rem;
}

.breadcrumb-item {
  font-size: 1rem;
}

/* Alerts */
.alert {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

/* Pagination */
.pagination .page-link {
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
}

/* Small text utilities */
.small,
small {
  font-size: 0.75rem;
}

.text-muted {
  font-size: 0.8rem;
}

/* ==========================================
   RESPONSIVE - Even smaller on small screens
   ========================================== */
@media (max-width: 1400px) {
  html {
    /* font-size: 13px !important; */
  }
}

@media (max-width: 1200px) {
  html {
    /* font-size: 12.5px !important; */
  }

  .detail-panel {
    width: 70vw;
  }
}

@media (max-width: 992px) {
  html {
    /* font-size: 12px !important; */
  }

  .stat-card .stat-body {
    min-height: 70px;
    padding: 0.6rem 0.75rem;
  }

  .detail-panel {
    width: 80vw;
  }
}

@media (max-width: 768px) {
  html {
    /* font-size: 11.5px !important; */
  }

  .stat-card .stat-body {
    min-height: 60px;
    padding: 0.5rem;
  }

  .stat-card .icon {
    font-size: 1.75rem;
  }

  .detail-panel {
    width: 90vw;
  }

  .table th,
  .table td {
    padding: 3px 4px !important;
  }
}

.nav-tabs .nav-link.active {
  background-color: #cbcbcb !important;
}
