/* BDO Prime General Styles - a BDO in Uganda Utilities app */

/* Root Variables for Theming */
:root {
  /* Dark mode (default) */
  --bg-color: #121212;
  --text-color: #F5F5F5;
  --heading-color: #F5F5F5;

  --card-bg: #1E1E1E;
  --card-border: rgba(255, 255, 255, 0.05);
  --menu-hover: #323232; /* Mine Shaft */

  --system-text: #E4E4E4; /* Mercury */

  /* Brand Colors */
  --primary-color: #ED1A3B;       /* Crimson */
  --link-color: #ED1A3B;
  --link-hover-color: #F1536C;    /* Crimson hover */

  --action-icon-bg: #252525;

  /* Table specific colors */
  --table1-header-bg: #1F1F1F;
  --table1-border-color: #2A2A2A;
  --table1-border-alpha-light: rgba(237, 26, 59, 0.1);
  --table1-hover-bg: #252525;
  --table1-text: #F5F5F5;
  --table1-header-text: #B0B0B0;
  --table1-body-bg: transparent;

  /* Dropdown Specific */
  --dropdown-bg: var(--card-bg);
  --dropdown-border: var(--card-border);
  --dropdown-item-color: var(--text-color);
  --dropdown-item-hover-bg: var(--menu-hover);
  --dropdown-item-hover-color: var(--link-hover-color);

  /* Modal specific */
  --modal-bg: var(--bg-color);
  --modal-border: #2A2A2A;
  --modal-header-border: var(--card-border);
  --modal-footer-border: var(--card-border);
  --modal-title-color: var(--heading-color);
  --modal-text-color: var(--text-color);
  --modal-muted-text-color: var(--system-text);

  /* Input specific */
  --input-bg: #212121;
  --input-border: #2A2A2A;
  --input-text: var(--text-color);
  --input-placeholder: var(--system-text);

  /* Form Specific */
  --form-text-color: var(--system-text);

  --badge-bg: var(--primary-color);
  --code-bg: #212121;

  /* Status colors */
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;

  /* Specific element colors */
  --amount-color: var(--table1-text);
  --collected-color: var(--success-color);
  --balance-color: var(--warning-color);

  /* Badge Foreground/Text Colors */
  --badge-success-text-color: #FFFFFF;
  --badge-danger-text-color: #FFFFFF;
  --badge-info-text-color: #FFFFFF;
  --badge-warning-text-color: #212121;
  --badge-amount-text-color: #FFFFFF;
  --badge-collected-text-color: var(--badge-success-text-color);
  --badge-balance-text-color: var(--badge-warning-text-color);

  /* Login Page Specific Colors */
  --login-primary-color: #6200EE;
  --login-primary-color-light: #9C27B0;
  --login-accent-color: #00C853;
  --login-accent-color-light: #69F0AE;
  --login-button-primary-color: var(--primary-color);
  --login-button-primary-color-light: var(--link-hover-color);

  /* App Card Specific Colors */
  --app-card-bg: var(--card-bg);
  --app-card-shadow: 0 4px 8px rgba(0,0,0,0.4);
  --app-card-text-color: var(--text-color);
  --app-card-hover-shadow: 0 8px 16px rgba(0,0,0,0.6);
  --app-card-hover-text-color: var(--link-hover-color);
  --app-card-border-gradient-start: var(--primary-color);
  --app-card-border-gradient-end: var(--login-accent-color);
  --app-card-reflection-color: rgba(255,255,255,0.3);
  --grid-gap: 1.5rem;
  --grid-padding: 1.5rem;

  /* Select2 Specific Colors */
  --select2-bg: var(--input-bg);
  --select2-border: var(--input-border);
  --select2-text: var(--input-text);
  --select2-placeholder: var(--system-text);
  --select2-dropdown-bg: var(--dropdown-bg);
  --select2-dropdown-border: var(--dropdown-border);
  --select2-result-highlight-bg: var(--primary-color);
  --select2-result-highlight-text: #FFFFFF;
  --select2-selection-item-bg: var(--action-icon-bg);
  --select2-selection-item-border: var(--input-border);
  --select2-selection-item-text: var(--text-color);
  --select2-selection-item-close-color: var(--system-text);
  --select2-selected-option-bg: var(--menu-hover);
  --select2-selected-option-text: var(--text-color);
  --scrollbar-thumb-color: rgba(237, 26, 59, 0.35);
  --scrollbar-thumb-hover-color: rgba(237, 26, 59, 0.55);
  --scrollbar-track-color: rgba(255, 255, 255, 0.04);
}

/* Light mode */
.light-mode {
  --bg-color: #f4f5f7;
  --text-color: #323232;     /* Mine Shaft */
  --heading-color: #323232;

  --card-bg: #F9F9F9;
  --card-border: #E4E4E4;    /* Mercury */
  --menu-hover: #E4E4E4;

  --system-text: #4A4A4A;

  --primary-color: #ED1A3B;  /* Crimson */
  --link-color: var(--primary-color);
  --link-hover-color: #F1536C;

  --action-icon-bg: #F0F0F0;

  --table1-header-bg: #F5F5F5;
  --table1-border-color: #E4E4E4;
  --table1-border-alpha-light: rgba(237, 26, 59, 0.1);
  --table1-hover-bg: #EDEDED;
  --table1-text: var(--text-color);
  --table1-header-text: var(--system-text);
  --table1-body-bg: var(--card-bg);

  --dropdown-bg: var(--card-bg);
  --dropdown-border: var(--card-border);
  --dropdown-item-color: var(--text-color);
  --dropdown-item-hover-bg: var(--menu-hover);
  --dropdown-item-hover-color: var(--link-hover-color);

  --form-text-color: var(--system-text);
  --input-bg: #FFFFFF;
  --input-border: #D1D5DB;
  --input-text: #212121;
  --input-placeholder: #6B7280;

  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;

  --amount-color: var(--table1-text);
  --collected-color: var(--success-color);
  --balance-color: var(--warning-color);

  --badge-success-text-color: #FFFFFF;
  --badge-danger-text-color: #FFFFFF;
  --badge-info-text-color: #FFFFFF;
  --badge-warning-text-color: #212121;
  --badge-amount-text-color: #FFFFFF;
  --badge-collected-text-color: var(--badge-success-text-color);
  --badge-balance-text-color: var(--badge-warning-text-color);

  --login-primary-color: #6200EE;
  --login-primary-color-light: #9C27B0;
  --login-accent-color: #00C853;
  --login-accent-color-light: #69F0AE;
  --login-button-primary-color: var(--primary-color);
  --login-button-primary-color-light: var(--link-hover-color);

  --app-card-bg: var(--card-bg);
  --app-card-shadow: 0 4px 8px rgba(0,0,0,0.05);
  --app-card-text-color: #333;
  --app-card-hover-shadow: 0 8px 16px rgba(0,0,0,0.1);
  --app-card-hover-text-color: var(--link-hover-color);
  --app-card-border-gradient-start: var(--primary-color);
  --app-card-border-gradient-end: var(--login-accent-color);
  --app-card-reflection-color: rgba(0,0,0,0.2);
  --grid-gap: 1.5rem;
  --grid-padding: 1.5rem;

  --select2-bg: var(--input-bg);
  --select2-border: var(--input-border);
  --select2-text: var(--input-text);
  --select2-placeholder: var(--system-text);
  --select2-dropdown-bg: var(--dropdown-bg);
  --select2-dropdown-border: var(--dropdown-border);
  --select2-result-highlight-bg: var(--primary-color);
  --select2-result-highlight-text: #FFFFFF;
  --select2-selection-item-bg: var(--action-icon-bg);
  --select2-selection-item-border: var(--input-border);
  --select2-selection-item-text: var(--text-color);
  --select2-selection-item-close-color: var(--system-text);
  --select2-selected-option-bg: var(--menu-hover);
  --select2-selected-option-text: var(--text-color);
  --scrollbar-thumb-color: rgba(237, 26, 59, 0.35);
  --scrollbar-thumb-hover-color: rgba(237, 26, 59, 0.55);
  --scrollbar-track-color: rgba(0, 0, 0, 0.06);
}

/* Global scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 4px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border-radius: 999px;
  border: 1px solid transparent;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-color);
}

/* Base Styles */
@font-face {
  font-family: "cambria";
  src: local("cambria"), url("../fonts/cambria.ttf") format("truetype");
  font-display: swap;
}

body {
  font-family: cambria, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Text Selection Highlight */
::selection {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

::-moz-selection {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

/* Watermark background */
body::before {
  content: "";
  background-image: url("../img/logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
  background-attachment: fixed;
  opacity: 0.05;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: normal;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
}

/* Layout */
.d-flex {
  display: flex;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  margin-left: 220px;
  padding-left: 0; /* Sidebar spacing handled by layout */
  transition: margin-left 0.3s ease, padding-left 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background-color: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 60px;
  border-bottom: 1px solid rgba(237, 26, 59, 0.2);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
}

.header .navbar-nav {
  flex-grow: 1;
  margin-right: 1rem;
}

.light-mode .header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(237, 26, 59, 0.2);
}

.breadcrumb {
  --bs-breadcrumb-divider: '';
  margin-bottom: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.light-mode .breadcrumb {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--system-text);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease;
  background: rgba(255, 255, 255, 0.04);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '';
  display: inline-flex;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
  margin-right: 0.05rem;
}

.light-mode .breadcrumb-item + .breadcrumb-item::before {
  background: rgba(237, 26, 59, 0.3);
  box-shadow: 0 0 0 2px rgba(237, 26, 59, 0.05);
}

.light-mode .breadcrumb-item {
  background: rgba(15, 23, 42, 0.04);
}

.breadcrumb-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.breadcrumb-item a:hover {
  color: var(--text-color);
  text-decoration: none;
}

.breadcrumb-item:not(.active):hover {
  background: rgba(237, 26, 59, 0.24);
  color: #ffd7d7;
  box-shadow: 0 10px 24px rgba(237, 26, 59, 0.28);
}

.light-mode .breadcrumb-item:not(.active):hover {
  background: rgba(237, 26, 59, 0.18);
  color: var(--primary-color);
  box-shadow: 0 10px 24px rgba(237, 26, 59, 0.22);
}

.breadcrumb-item.active {
  color: var(--text-color);
  font-weight: 600;
  background: rgba(237, 26, 59, 0.22);
  box-shadow: 0 12px 28px rgba(237, 26, 59, 0.28);
}

.light-mode .breadcrumb-item.active {
  background: rgba(237, 26, 59, 0.15);
  box-shadow: 0 12px 26px rgba(237, 26, 59, 0.22);
}

/* Mobile Header */
.mobile-header {
  background-color: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 60px;
  border-bottom: 1px solid rgba(237, 26, 59, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.light-mode .mobile-header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(237, 26, 59, 0.2);
}

.mobile-logo {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.mobile-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* User Actions */
.user-actions {
  gap: 15px;
  margin-left: auto;
}

.action-icon,
.user-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--action-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.action-icon:hover,
.user-icon:hover {
  background-color: var(--menu-hover);
}

/* Theme Toggle */
.mode-switch {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}

.mode-icon {
  position: absolute;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.moon-icon {
  opacity: 1;
  transform: translateY(0);
}

.sun-icon {
  opacity: 0;
  transform: translateY(100%);
}

.light-mode .moon-icon {
  opacity: 0;
  transform: translateY(-100%);
}

.light-mode .sun-icon {
  opacity: 1;
  transform: translateY(0);
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.card-header {
  border-bottom: 1px solid var(--card-border);
  color: var(--heading-color);
  padding: 15px 20px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--primary-color);
}

.card-body {
  padding: 24px; /* Increased from 0 to 24px for better spacing */
}

.card-footer {
  background-color: rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--card-border);
  padding: 12px 20px;
}

/* Content Area Styles */
.content-area {
  flex-grow: 1;
  padding: 20px;
}

/* Table1 Styles */
/* Table1 Styles - Updated for full-width rows and reduced height */
.table1 {
  width: 100%;
  min-width: 720px;
  margin: 0;
  color: var(--table1-text);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 16px; /* Increased from 15px for better readability */
  border: 1px solid var(--table1-border-alpha-light);
  border-radius: 8px;
  overflow: hidden;
  table-layout: auto;
  min-width: 600px;
}

/* Different approaches for table cards */
.card .table1 {
  border: none;
  border-radius: 0; /* Remove border radius for full extension */
  margin: 0;
  box-shadow: none; /* Remove box shadow when inside card */
}

/* Enhanced Responsive Table1 Styles - Replace existing table1 styles */

/* Make table1-responsive container fully responsive */
.table1-responsive {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
  margin: 0;
  border-radius: 8px;
}

/* Card integration - remove padding for full extension */
.card .table1-responsive {
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

/* Enhanced scrollbar styling */
.table1-responsive::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.table1-responsive::-webkit-scrollbar-track {
  background-color: var(--card-bg);
  border-radius: 4px;
}

.table1-responsive::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
  opacity: 0.7;
}

.table1-responsive::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background-color: var(--link-hover-color);
}

/* Enhanced responsive breakpoints for table1 */

/* Large screens - optimal spacing */
@media (min-width: 1200px) {
  .table1 {
    font-size: 16px;
  }
  
  .table1 thead th {
    padding: 14px 20px;
    font-size: 13px;
    height: 45px;
  }
  
  .table1 tbody td {
    padding: 12px 20px;
    font-size: 16px;
    height: 50px;
    max-width: 250px;
  }
}

/* Desktop and laptop screens */
@media (min-width: 992px) and (max-width: 1199px) {
  .table1 {
    font-size: 15px;
  }
  
  .table1 thead th {
    padding: 12px 18px;
    font-size: 12px;
    height: 42px;
  }
  
  .table1 tbody td {
    padding: 10px 18px;
    font-size: 15px;
    height: 47px;
    max-width: 220px;
  }
}

/* Mobile stack for very small screens - add .mobile-stack class */
@media (max-width: 576px) {
  .table1.mobile-stack {
    border: none;
    box-shadow: none;
    min-width: 100%;
  }
  
  .table1.mobile-stack thead {
    display: none;
  }
  
  .table1.mobile-stack tbody,
  .table1.mobile-stack tr,
  .table1.mobile-stack td {
    display: block;
    width: 100%;
  }
  
  .table1.mobile-stack tr {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .table1.mobile-stack td {
    border: none !important;
    padding: 8px 0;
    text-align: left;
    position: relative;
    padding-left: 120px;
    min-height: 32px;
    display: flex;
    align-items: center;
    max-width: none !important;
    white-space: normal;
    height: auto;
  }
  
  .table1.mobile-stack td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 110px;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--table1-header-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
  }
  
  .table1.mobile-stack td:last-child {
    border-bottom: none;
  }
  
  .table1.mobile-stack .action-buttons {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .table1.mobile-stack .action-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Responsive column utilities for table1 */
.table1 .hide-xs { display: table-cell; }
.table1 .hide-sm { display: table-cell; }
.table1 .hide-md { display: table-cell; }
.table1 .hide-lg { display: table-cell; }

/* Priority-based column hiding */
@media (max-width: 1199px) {
  .table1 .hide-lg { display: none; }
}

@media (max-width: 991px) {
  .table1 .hide-md { display: none; }
}

@media (max-width: 767px) {
  .table1 .hide-sm { display: none; }
}

@media (max-width: 575px) {
  .table1 .hide-xs { display: none; }
}

/* Responsive text utilities for table1 */
.table1 .text-responsive {
  word-break: break-word;
  hyphens: auto;
}

.table1 .text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Adjust truncation width based on screen size */
@media (max-width: 768px) {
  .table1 .text-truncate {
    max-width: 100px;
  }
}

@media (max-width: 576px) {
  .table1 .text-truncate {
    max-width: 80px;
  }
}

/* Sticky first column option for table1 */
.table1 .sticky-col {
  position: sticky;
  left: 0;
  background-color: var(--table1-body-bg);
  z-index: 5;
  border-right: 2px solid var(--table1-border-alpha-light);
}

.table1 thead .sticky-col {
  background-color: var(--table1-header-bg);
  z-index: 6;
}

/* Responsive action buttons in table1 */
@media (max-width: 576px) {
  .table1 .action-buttons {
    gap: 4px;
    justify-content: center;
  }
  
  .table1 .action-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Default responsive behavior for table1 on mobile */
@media (max-width: 576px) {
  .table1:not(.mobile-stack) {
    min-width: 500px;
    font-size: 13px;
  }
  
  .table1:not(.mobile-stack) thead th {
    padding: 8px 10px;
    font-size: 10px;
    height: 35px;
  }
  
  .table1:not(.mobile-stack) tbody td {
    padding: 6px 10px;
    font-size: 13px;
    height: 38px;
    max-width: 100px;
  }
}

/* Large screens - optimal spacing */
@media (min-width: 1200px) {
  .table1 {
    font-size: 16px;
  }
  
  .table1 thead th {
    padding: 14px 20px;
    font-size: 13px;
    height: 45px;
  }
  
  .table1 tbody td {
    padding: 12px 20px;
    font-size: 16px;
    height: 50px;
    max-width: 250px;
  }
}

/* Horizontal scroll indicator for better UX */
.table-scroll-indicator {
  position: relative;
}

.table-scroll-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to left, var(--card-bg), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-scroll-indicator.has-scroll::after {
  opacity: 1;
}

/* Enhanced scrollbar for table containers */
.table-responsive-enhanced::-webkit-scrollbar {
  height: 8px;
}

.table-responsive-enhanced::-webkit-scrollbar-track {
  background-color: var(--card-bg);
  border-radius: 4px;
}

.table-responsive-enhanced::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
  opacity: 0.7;
}

.table-responsive-enhanced::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background-color: var(--link-hover-color);
}

/* Table caption for accessibility */
.table1 caption {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 0;
  text-align: left;
  caption-side: top;
}

/* Sticky columns for important data */
.table1 .sticky-column {
  position: sticky;
  left: 0;
  background-color: var(--table1-body-bg);
  z-index: 5;
  border-right: 2px solid var(--table1-border-alpha-light);
}

.table1 thead .sticky-column {
  background-color: var(--table1-header-bg);
  z-index: 6;
}

/* Responsive text utilities */
.text-responsive {
  word-break: break-word;
  hyphens: auto;
}

.text-truncate-responsive {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .text-truncate-responsive {
    max-width: 80px;
  }
}

@media (max-width: 576px) {
  .text-truncate-responsive {
    max-width: 60px;
  }
}

/* Loading state for tables */
.table-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Empty state styling */
.table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--system-text);
  font-style: italic;
}

.table-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Print styles for tables */
@media print {
  .table1 {
    border-collapse: collapse !important;
    font-size: 10px !important;
  }
  
  .table1 thead th,
  .table1 tbody td {
    border: 1px solid #000 !important;
    padding: 4px !important;
  }
  
  .table1 .hide-print {
    display: none !important;
  }
  
  .action-buttons {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .table1 {
    border: 2px solid;
  }
  
  .table1 thead th,
  .table1 tbody td {
    border: 1px solid;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .table1,
  .table1 *,
  .table-responsive-enhanced {
    transition: none !important;
    animation: none !important;
  }
}

/* Table card with no padding for full extension */
.card.card-table {
  overflow: hidden;
}

.card.card-table .card-body {
  padding: 0; /* Remove all padding to allow full extension */
}

/* Table responsive wrapper within cards - full extension */
.card .table-responsive,
.card .table1-responsive {
  margin: 0;
  border-radius: 0; /* Remove border radius for full extension */
  overflow: hidden;
  box-shadow: none; /* Remove box shadow when inside card */
}

/* Header styles - reduced height */
.table1 thead th {
  background-color: var(--table1-header-bg);
  color: var(--table1-header-text);
  border-bottom: 1px solid var(--table1-border-alpha-light);
  padding: 10px 16px; /* Reduced from 16px 20px */
  text-align: left;
  text-transform: uppercase;
  font-size: 13px; /* Increased from 12px for better readability */
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  font-weight: 600;
  height: 40px; /* Fixed height for consistency */
  vertical-align: middle;
}

/* Simple red border separator for first column - matching row separators but darker */
.table1 thead th:first-child,
.table1 tbody td:first-child {
  border-right: 2px solid var(--table1-border-alpha-light);
  border-right-color: rgba(237, 26, 59, 0.2); /* Slightly darker than row separators */
}

.light-mode .table1 thead th:first-child,
.light-mode .table1 tbody td:first-child {
  border-right-color: rgba(237, 26, 59, 0.25); /* Slightly darker for light mode */
}

.table1 tbody tr:hover {
  background-color: var(--table1-hover-bg);
}

/* Body cell styles - reduced height */
.table1 tbody td {
  border-bottom: 1px solid var(--table1-border-alpha-light);
  padding: 8px 16px; /* Reduced from 12px 20px */
  vertical-align: middle;
  transition: background-color 0.2s ease;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  height: 45px; /* Fixed height for consistency - reduced from default */
  line-height: 1.3; /* Improved line height for better text alignment */
}

/* Remove last row border for cleaner look */
.table1 tbody tr:last-child td {
  border-bottom: none;
}

/* Allow certain columns to wrap when needed */
.table1 tbody td.wrap-content,
.table1 thead th.wrap-content {
  white-space: normal;
  word-wrap: break-word;
  max-width: none;
  height: auto; /* Allow auto height for wrapped content */
  min-height: 45px; /* Maintain minimum height */
}

/* Specific column width classes for better control */
.table1 .col-narrow {
  width: 10%;
  min-width: 80px;
}

.table1 .col-medium {
  width: 20%;
  min-width: 120px;
}

.table1 .col-wide {
  width: 30%;
  min-width: 180px;
}

.table1 .col-action {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

/* Table responsive container */
.table1-responsive {
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
  margin: 0;
  border-radius: 0; /* Remove border radius for full extension */
  box-shadow: none; /* Remove box shadow */
}

.table1-responsive::-webkit-scrollbar {
  height: 6px; /* Reduced scrollbar height */
}

.table1-responsive::-webkit-scrollbar-thumb {
  background-color: rgba(237, 26, 59, 0.4);
  border-radius: 3px; /* Reduced border radius */
}

.light-mode .table1-responsive::-webkit-scrollbar-thumb {
  background-color: rgba(237, 26, 59, 0.4);
}

.table1-responsive::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Zebra striping for better readability */
.table1 tbody tr:nth-of-type(odd) {
  background-color: rgba(237, 26, 59, 0.03);
}

.light-mode .table1 tbody tr:nth-of-type(odd) {
  background-color: rgba(237, 26, 59, 0.06); /* Slightly more visible in light mode */
}

/* Special styling for card tables with p-0 class */
.card-body.p-0 .table1 {
  border-radius: 0;
  border: none;
  margin: 0;
}

.card-body.p-0 .table-responsive,
.card-body.p-0 .table1-responsive {
  border-radius: 0;
  margin: 0;
}

/* Compact table variant for even smaller rows */
.table1.table-compact thead th {
  padding: 8px 12px;
  height: 35px;
  font-size: 10px;
}

.table1.table-compact tbody td {
  padding: 6px 12px;
  height: 38px;
  font-size: 13px;
}

/* Small table variant (as used in your template) */
.table1.table-sm thead th {
  padding: 8px 12px;
  height: 38px;
  font-size: 12px; /* Increased from 11px */
}

.table1.table-sm tbody td {
  padding: 6px 12px;
  height: 42px;
  font-size: 15px; /* Increased from 13px */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .card .table1 {
    min-width: 500px;
  }

  .table1 thead th {
    padding: 8px 12px; /* Further reduced on mobile */
    font-size: 11px; /* Kept smaller on mobile for space */
    height: 36px;
  }

  .table1 tbody td {
    padding: 6px 12px; /* Further reduced on mobile */
    font-size: 14px; /* Increased from 13px for better mobile readability */
    height: 40px;
    max-width: 120px; /* Reduced max width on mobile */
  }

  .table1-responsive {
    border-radius: 0; /* Ensure no radius on mobile */
  }
}

.light-mode .table1 tbody tr:nth-of-type(odd) {
  background-color: rgba(237, 26, 59, 0.109);
}

/* Badge Styles */
.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  min-width: 70px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.badge-success {
  background-color: var(--success-color) !important;
  color: var(--badge-success-text-color) !important;
}

.badge-danger {
  background-color: var(--danger-color) !important;
  color: var(--badge-danger-text-color) !important;
}

.badge-warning {
  background-color: var(--warning-color) !important;
  color: var(--badge-warning-text-color) !important;
}

.badge-info {
  background-color: var(--info-color) !important;
  color: var(--info-color) !important;
}

.bg-secondary,
.badge-secondary {
  background-color: var(--system-text) !important;
  color: var(--bg-color) !important;
}

.bg-primary,
.badge-primary {
  background-color: var(--primary-color) !important;
  color: #FFFFFF !important;
}

.badge-amount {
  background-color: var(--amount-color) !important;
  color: var(--badge-amount-text-color) !important;
}

.badge-collected {
  background-color: var(--collected-color) !important;
  color: var(--badge-collected-text-color) !important;
}

.badge-balance {
  background-color: var(--balance-color) !important;
  color: var(--badge-balance-text-color) !important;
}

/* Global status badge styling */
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-badge.status-admin,
.status-badge.status-won,
.status-badge.status-converted {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-staff,
.status-badge.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-user,
.status-badge.status-lost {
  background: #f8d7da;
  color: #721c24;
}

.badge-pill {
  border-radius: 50rem;
  padding-right: 0.8em;
  padding-left: 0.8em;
}

/* Code Styles */
code {
  background-color: var(--code-bg);
  color: var(--text-color);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  border: 1px solid var(--table1-border-color);
}

.light-mode code {
  background-color: #f0f0f0;
  color: #212121;
  border: 1px solid #e0e0e0;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.action-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--action-icon-bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Add padding for larger touch target on mobile */
  padding: 6px;
  /* Ensure minimum 44x44px touch target */
  min-width: 44px;
  min-height: 44px;
}

.view-icon {
  color: var(--primary-color);
}

.edit-icon {
  color: var(--warning-color);
}

.delete-icon {
  color: var(--danger-color);
}

.action-icon:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
}

/* Search Form */
.search-input {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
}

.search-input::placeholder {
  color: var(--input-placeholder);
}

.search-input:focus {
  background-color: var(--input-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
  color: var(--input-text);
  outline: none;
}

.light-mode .search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
}

.btn-search {
  background-color: var(--action-icon-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-search:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

/* Light Search Form Specific Styles */
.light-search-form .search-input {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-color);
}

.light-search-form .search-input::placeholder {
  color: var(--system-text);
}

.light-search-form .search-input:focus {
  background-color: var(--card-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
  color: var(--text-color);
}

body:not(.light-mode) .light-search-form .search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.5);
}

.light-search-form .btn-search {
  background-color: var(--action-icon-bg);
  border-color: var(--card-border);
  color: var(--text-color);
}

.light-search-form .btn-search:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

/* Login Page Specific Styles */
.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-top: 10px;
  margin-bottom: 5px;
}

.login-description {
  font-size: 1rem;
  color: var(--system-text);
  margin-bottom: 20px;
}

.login-card .form-control:focus {
  border-color: var(--login-primary-color);
  box-shadow: 0 0 0 0.25rem rgba(98, 0, 238, 0.25);
}

.light-mode .login-card .form-control:focus {
  border-color: var(--login-primary-color);
  box-shadow: 0 0 0 0.25rem rgba(98, 0, 238, 0.25);
}

.login-card .btn-primary {
  color: #FFFFFF;
  background-color: var(--login-button-primary-color);
  border-color: var(--login-button-primary-color);
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  width: 100%;
}

.login-card .btn-primary:hover {
  color: #FFFFFF;
  background-color: var(--login-button-primary-color-light);
  border-color: var(--login-button-primary-color-light);
}

.login-card .btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.5);
}

.light-mode .login-card .btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.5);
}

.social-login {
  text-align: center;
  margin: 25px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.divider {
  position: relative;
  text-align: center;
  margin: 0;
  color: var(--system-text);
  font-size: 0.95rem;
  text-transform: uppercase;
  z-index: 1;
  background-color: var(--card-bg);
  padding: 0 10px;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background-color: var(--card-border);
  z-index: -1;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.btn-outline-success-themed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 5px;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  text-decoration: none;
  text-transform: uppercase;
  background-color: transparent;
  border: 1px solid var(--login-accent-color);
  color: var(--login-accent-color);
}

.btn-outline-success-themed:hover {
  background-color: rgba(0, 200, 83, 0.1);
  border-color: var(--login-accent-color-light);
  color: var(--login-accent-color-light);
}

.btn-outline-success-themed i {
  font-size: 1.1rem;
}

.auth-links {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  display: block;
  margin-top: 20px;
}

.auth-links:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* Full-Width Layout Styles */
.main-content.full-width-layout {
  margin-left: 0;
  padding-left: 0; /* Remove padding for full-width layout */
  width: 100%;
}

.content-area.no-sidebar-content {
  /* Add specific styling for no-sidebar content as needed */
}

.full-width-layout .mobile-header .hamburger-btn {
  display: none;
}

.full-width-layout .mobile-header .mobile-logo {
  margin-left: 15px;
  margin-right: auto;
}

.full-width-layout .mobile-header .user-actions {
  margin-right: 15px;
}

/* App Grid and Card Styles */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--grid-gap);
  padding: var(--grid-padding);
}

.app-card {
  background-color: var(--app-card-bg);
  border-radius: 8px;
  box-shadow: var(--app-card-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--app-card-hover-shadow);
}

.app-card:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--app-card-border-gradient-start), var(--app-card-border-gradient-end));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.app-card:hover:after {
  transform: scaleX(1);
}

.app-card a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--app-card-text-color);
}

.reflection {
  position: relative;
  margin-bottom: 0.75rem;
}

.reflection:after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%) scaleY(-1);
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, var(--app-card-reflection-color), transparent);
  opacity: 0.4;
  filter: blur(1px);
  z-index: 1;
}

.app-icon {
  width: auto;
  height: 60px;
  max-width: 100%;
  transition: transform 0.3s ease;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.app-card:hover .app-icon {
  transform: scale(1.1);
}

.app-title {
  font-weight: 500;
  font-size: 14px;
  margin: 0;
  color: var(--app-card-text-color);
  transition: color 0.3s ease;
}

.app-card:hover .app-title {
  color: var(--app-card-hover-text-color);
  font-weight: 600;
}

/* Select2 Styles */
.select2-container--classic .select2-selection--single,
.select2-container--classic .select2-selection--multiple {
  background-color: var(--select2-bg);
  border: 1px solid var(--select2-border);
  color: var(--select2-text);
  border-radius: 6px;
  min-height: 42px;
  padding: 0.375rem 0.75rem;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.select2-container--classic .select2-selection--single .select2-selection__rendered {
  color: var(--select2-text);
  line-height: calc(1.5em + 0.75rem);
  padding: 0;
}

.select2-container--classic .select2-selection--single .select2-selection__placeholder {
  color: var(--select2-placeholder);
}

.select2-container--classic.select2-container--focus .select2-selection--single,
.select2-container--classic.select2-container--open .select2-selection--single,
.select2-container--classic.select2-container--focus .select2-selection--multiple,
.select2-container--classic.select2-container--open .select2-selection--multiple {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
  outline: 0;
}

.light-mode .select2-container--classic.select2-container--focus .select2-selection--single,
.light-mode .select2-container--classic.select2-container--open .select2-selection--single,
.light-mode .select2-container--classic.select2-container--focus .select2-selection--multiple,
.light-mode .select2-container--classic.select2-container--open .select2-selection--multiple {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
}

.select2-container--classic .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
}

.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
  box-sizing: border-box;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.select2-container--classic .select2-selection--multiple .select2-selection__rendered li {
  list-style: none;
}

.select2-container--classic .select2-dropdown {
  background-color: var(--select2-dropdown-bg);
  border: 1px solid var(--select2-dropdown-border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.select2-container--classic .select2-search--dropdown .select2-search__field {
  background-color: var(--select2-bg);
  border: 1px solid var(--select2-border);
  color: var(--select2-text);
  outline: none;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
}

.select2-container--classic .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--select2-placeholder);
}

.select2-container--classic .select2-results__option {
  color: var(--select2-text);
  padding: 8px 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--select2-result-highlight-bg) !important;
  color: var(--select2-result-highlight-text) !important;
}

.select2-container--classic .select2-results__option--selected {
  background-color: var(--select2-selected-option-bg);
  color: var(--select2-selected-option-text);
}

.select2-container--classic .select2-results__option--disabled {
  color: var(--system-text);
}

.select2-container--classic .select2-selection--multiple .select2-selection__choice {
  background-color: var(--select2-selection-item-bg);
  border: 1px solid var(--select2-selection-item-border);
  color: var(--select2-selection-item-text);
  border-radius: 4px;
  padding: 2px 5px;
  margin-top: 4px;
  margin-right: 5px;
}

.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--select2-selection-item-close-color);
  margin-right: 2px;
}

.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--link-hover-color);
}

.select2-dropdown {
  background-color: var(--select2-dropdown-bg);
  border: 1px solid var(--select2-dropdown-border);
  color: var(--select2-text);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.select2-results__option {
  padding: 8px 12px;
  transition: background-color 0.2s ease;
}

.select2-results__option--highlighted {
  background-color: var(--select2-result-highlight-bg) !important;
  color: var(--select2-result-highlight-text) !important;
}

.select2-results__option--selected {
  background-color: var(--select2-selected-option-bg);
  color: var(--select2-selected-option-text);
}

.select2-results__option.select2-results__option--selectable {
  background-color: var(--select2-dropdown-bg);
  color: var(--select2-text);
  padding: 8px 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--select2-result-highlight-bg) !important;
  color: var(--select2-result-highlight-text) !important;
}

.select2-results__option--disabled {
  color: var(--system-text);
  cursor: not-allowed;
  opacity: 0.5;
}

.select2-selection__choice__remove {
  color: #dc3545;
  cursor: pointer;
  font-weight: bold;
  margin-right: 4px;
}

.select2-selection__choice__remove:hover {
  color: #c82333;
}

.select2-selection__choice {
  background-color: var(--select2-selection-item-bg);
  border: 1px solid var(--select2-selection-item-border);
  color: var(--select2-selection-item-text);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  margin-right: 5px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.select2-selection--multiple {
  min-height: 48px;
  font-size: 1rem;
  padding: 6px 8px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  transition: all 0.2s ease;
}

.select2-selection__choice__display {
  color: inherit;
}

.select2-search--inline .select2-search__field {
  background-color: transparent;
  color: var(--input-text);
  font-size: 1rem;
  min-width: 8ch;
  margin: 3px 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 4px;
}

.select2-search--inline .select2-search__field::placeholder {
  color: var(--input-placeholder);
}

.select2-selection__choice__display {
  color: var(--select2-selection-item-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  padding-right: 2px;
  display: inline-block;
  transition: color 0.2s ease;
}

.select2-selection--single {
  min-height: 40px;
  font-size: 1.05rem;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: var(--select2-bg);
  border: 1px solid var(--select2-border);
  color: var(--select2-text);
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

/* Form Controls */
.form-select {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 6px;
  padding: 10px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.light-mode .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23757575' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.form-select::placeholder {
  color: var(--input-placeholder);
}

.form-select:focus {
  background-color: var(--input-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
  color: var(--input-text);
  outline: none;
}

.light-mode .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
}

.form-select option {
  background-color: var(--dropdown-bg);
  color: var(--dropdown-item-color);
}

.form-select option:checked {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

.form-select option:hover {
  background-color: var(--link-hover-color);
  color: #FFFFFF;
}

.form-control {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 6px;
  padding: 10px 12px;
}

.form-control::placeholder {
  color: var(--input-placeholder);
}

.form-control:focus {
  background-color: var(--input-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
  color: var(--input-text);
  outline: none;
}

.light-mode .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.25);
}

/* Form labels and elements */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
}

.form-label .text-danger {
  margin-left: 4px;
  font-weight: 700;
}

.form-text {
  color: var(--form-text-color);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.text-danger {
  color: var(--danger-color) !important;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: var(--danger-color);
  border-radius: 6px;
  padding: 12px 16px;
}

/* Button styles */
.btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.3);
}

.light-mode .btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(237, 26, 59, 0.3);
}

.btn-outline-secondary {
  color: var(--text-color);
  border-color: var(--input-border);
  background-color: transparent;
}

.btn-outline-secondary:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

.spinner-border {
  width: 1rem;
  height: 1rem;
  margin-right: 8px;
  border-width: 0.15em;
}

.form-control[type="file"] {
  padding: 8px;
}

.form-control[type="file"]::file-selector-button {
  background-color: var(--action-icon-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 6px 12px;
  margin-right: 12px;
  transition: all 0.2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

.form-check-input {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.select2-container-wrapper {
  width: 100%;
}

/* Misc utility classes */
.text-muted {
  color: var(--system-text) !important;
}

.light-mode .text-muted {
  color: #757575 !important;
}

.table-secondary {
  background-color: var(--table1-header-bg) !important;
  color: var(--table1-header-text) !important;
}

.light-mode .table-secondary {
  background-color: var(--table1-header-bg) !important;
  color: var(--table1-header-text) !important;
}

/* Input Group Text */
.input-group-text {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.light-mode .input-group-text {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}

/* Pagination Theme */
.themed-pagination .page-link {
  background-color: var(--card-bg);
  color: var(--link-color);
  border: 1px solid var(--card-border);
  font-weight: 500;
  transition: all 0.2s ease;
}

.themed-pagination .page-link:hover,
.themed-pagination .page-link:focus {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

.themed-pagination .page-item.disabled .page-link,
.themed-pagination .current-page {
  background-color: transparent;
  color: var(--system-text);
  border: none;
  font-style: italic;
  cursor: default;
}

.light-mode .themed-pagination .page-link {
  background-color: #ffffff;
  color: var(--link-color);
  border: 1px solid #ddd;
}

.light-mode .themed-pagination .page-link:hover,
.light-mode .themed-pagination .page-link:focus {
  background-color: #f5f5f5;
  color: var(--link-hover-color);
  border-color: var(--link-hover-color);
}

/* Modal Theme */
.themed-modal-content {
  background-color: var(--modal-bg) !important;
  color: var(--modal-text-color) !important;
  border: 1px solid var(--modal-border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  border-radius: 10px !important;
}

.themed-modal-header,
.themed-modal-footer {
  background-color: var(--modal-bg) !important;
  border-color: var(--modal-border) !important;
}

.themed-modal-title {
  color: var(--modal-title-color) !important;
  font-weight: 600 !important;
}

.themed-modal-body {
  color: var(--modal-text-color) !important;
  background-color: var(--modal-bg) !important;
}

.themed-close {
  filter: invert(1) brightness(200%) !important;
  opacity: 0.8 !important;
}

.themed-close:hover {
  opacity: 1 !important;
}

.themed-modal-body .form-control,
.themed-modal-body .form-select,
.themed-modal-body .form-check-input {
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
  border: 1px solid var(--input-border) !important;
}

.themed-modal-body .form-control::placeholder,
.themed-modal-body .form-select::placeholder {
  color: var(--input-placeholder) !important;
}

.themed-modal-body .form-control:focus,
.themed-modal-body .form-select:focus,
.themed-modal-body .form-check-input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(237, 26, 59, 0.25) !important;
  outline: none;
}

.themed-modal-body .form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.light-mode .themed-modal-content {
  background-color: #ffffff !important;
  color: #212121 !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.light-mode .themed-modal-header,
.light-mode .themed-modal-footer {
  background-color: #f9f9f9 !important;
  border-color: #e0e0e0 !important;
}

.light-mode .themed-modal-title {
  color: #212121 !important;
}

.light-mode .themed-modal-body {
  background-color: #ffffff !important;
  color: #212121 !important;
}

.light-mode .themed-modal-body .form-control,
.light-mode .themed-modal-body .form-select,
.light-mode .themed-modal-body .form-check-input {
  background-color: #ffffff !important;
  color: #212121 !important;
  border: 1px solid #ced4da !important;
}

.light-mode .themed-modal-body .form-control::placeholder {
  color: #757575 !important;
}

.light-mode .themed-modal-body .form-control:focus,
.light-mode .themed-modal-body .form-select:focus,
.light-mode .themed-modal-body .form-check-input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(237, 26, 59, 0.25) !important;
}

#deleteModal .modal-body i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#deleteModal .modal-body p {
  color: var(--modal-text-color);
}

#deleteModal .modal-footer .btn-danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: #fff;
}

#deleteModal .modal-footer .btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.light-mode #deleteModal .modal-body p {
  color: #212121;
}

/* Summary card theme */
.themed-summary-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.themed-summary-card .card-title {
  color: var(--heading-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.themed-summary-card p {
  color: var(--text-color);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.themed-summary-card p strong {
  color: var(--link-color);
}

.light-mode .themed-summary-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #212121;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.light-mode .themed-summary-card .card-title {
  color: #212121;
}

.light-mode .themed-summary-card p strong {
  color: var(--primary-color);
}

/* Scrollbar Styling */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
  border: 1px solid transparent;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(237, 26, 59, 0.7);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background-color: transparent;
}

.light-mode html::-webkit-scrollbar-thumb,
.light-mode body::-webkit-scrollbar-thumb {
  background-color: transparent;
}

.light-mode html::-webkit-scrollbar-thumb:hover,
.light-mode body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(237, 26, 59, 0.7);
}

html, body {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html:hover, body:hover {
  scrollbar-color: var(--primary-color) transparent;
}

.light-mode html:hover,
.light-mode body:hover {
  scrollbar-color: var(--primary-color) transparent;
}

body {
  overflow-y: auto;
}

/* Highcharts Theme Integration */
.highcharts-container {
  width: 100% !important;
  height: 100% !important;
}

.highcharts-root {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.highcharts-axis-labels text,
.highcharts-legend-item text,
.highcharts-data-label text {
  fill: var(--text-color) !important;
}

.highcharts-axis-title,
.highcharts-title {
  fill: var(--heading-color) !important;
}

.highcharts-grid-line {
  stroke: var(--card-border) !important;
  stroke-width: 1px !important;
}

.highcharts-tooltip text {
  fill: var(--text-color) !important;
}

.highcharts-yaxis-labels text,
.highcharts-xaxis-labels text {
  fill: var(--text-color) !important;
}

.highcharts-legend-item-hidden text {
  fill: var(--system-text) !important;
}

.highcharts-pie-series .highcharts-data-label text {
  fill: var(--text-color) !important;
}

.highcharts-subtitle {
  fill: var(--text-color) !important;
}

.highcharts-tooltip-box {
  fill: var(--card-bg) !important;
  stroke: var(--card-border) !important;
}

.highcharts-label text,
.highcharts-button text {
  fill: var(--text-color) !important;
}

/* Animation Classes */
.animate__animated {
  animation-duration: 0.5s;
}

.animate__fadeInUp {
  animation-name: fadeInUp;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-form {
  animation: formFadeIn 0.5s ease-out;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
  .main-content {
    margin-left: 0;
    padding-left: 0; /* Remove padding on mobile since sidebar is hidden */
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .card-header form {
    margin-top: 1rem;
    max-width: 100% !important;
    width: 100%;
  }

  .divider::before,
  .divider::after {
    width: calc(50% - 15px);
  }
  
  .divider {
    padding: 0 8px;
  }
}

@media (max-width: 768px) {
  :root {
    --grid-gap: 1rem;
    --grid-padding: 1rem;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .app-icon {
    height: 50px;
  }

  .app-title {
    font-size: 12px;
  }

  .card-body {
    padding: 16px;
  }

  .card.card-table .card-body {
    padding: 12px; /* Reduced padding on mobile for table cards */
  }

  .card .table1 {
    min-width: 500px;
  }

  .table1 thead th {
    padding: 12px 16px;
    font-size: 12px;
  }

  .table1 tbody td {
    padding: 10px 16px;
    font-size: 14px;
    max-width: 150px;
  }

  .table1-responsive {
    border-radius: 6px; /* Slightly less rounded on mobile */
  }

  .form-control,
  .form-select,
  .select2-container--classic .select2-selection--single {
    font-size: 14px;
  }

  .btn {
    width: 100%;
    margin-bottom: 8px;
  }

  .d-flex.justify-content-between {
    flex-direction: column-reverse;
  }

  .d-flex.justify-content-between .btn {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  :root {
    --grid-gap: 0.8rem;
    --grid-padding: 0.8rem;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .app-icon {
    height: 40px;
  }
}


/* Enhanced Responsive Table1 Styles - Replace existing table1 styles */

/* Make table1-responsive container fully responsive */
.table1-responsive {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
  margin: 0;
  border-radius: 8px;
}

/* Card integration - remove padding for full extension */
.card .table1-responsive {
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

/* Enhanced scrollbar styling */
.table1-responsive::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.table1-responsive::-webkit-scrollbar-track {
  background-color: var(--card-bg);
  border-radius: 4px;
}

.table1-responsive::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
  opacity: 0.7;
}

.table1-responsive::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background-color: var(--link-hover-color);
}

/* Enhanced responsive breakpoints for table1 */

/* Large screens - optimal spacing */
@media (min-width: 1200px) {
  .table1 {
    font-size: 16px;
  }
  
  .table1 thead th {
    padding: 14px 20px;
    font-size: 13px;
    height: 45px;
  }
  
  .table1 tbody td {
    padding: 12px 20px;
    font-size: 16px;
    height: 50px;
    max-width: 250px;
  }
}

/* Desktop and laptop screens */
@media (min-width: 992px) and (max-width: 1199px) {
  .table1 {
    font-size: 15px;
  }
  
  .table1 thead th {
    padding: 12px 18px;
    font-size: 12px;
    height: 42px;
  }
  
  .table1 tbody td {
    padding: 10px 18px;
    font-size: 15px;
    height: 47px;
    max-width: 220px;
  }
}

/* Mobile stack for very small screens - add .mobile-stack class */
@media (max-width: 576px) {
  .table1.mobile-stack {
    border: none;
    box-shadow: none;
    min-width: 100%;
  }
  
  .table1.mobile-stack thead {
    display: none;
  }
  
  .table1.mobile-stack tbody,
  .table1.mobile-stack tr,
  .table1.mobile-stack td {
    display: block;
    width: 100%;
  }
  
  .table1.mobile-stack tr {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .table1.mobile-stack td {
    border: none !important;
    padding: 8px 0;
    text-align: left;
    position: relative;
    padding-left: 120px;
    min-height: 32px;
    display: flex;
    align-items: center;
    max-width: none !important;
    white-space: normal;
    height: auto;
  }
  
  .table1.mobile-stack td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 110px;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--table1-header-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
  }
  
  .table1.mobile-stack td:last-child {
    border-bottom: none;
  }
  
  .table1.mobile-stack .action-buttons {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .table1.mobile-stack .action-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Responsive column utilities for table1 */
.table1 .hide-xs { display: table-cell; }
.table1 .hide-sm { display: table-cell; }
.table1 .hide-md { display: table-cell; }
.table1 .hide-lg { display: table-cell; }

/* Priority-based column hiding */
@media (max-width: 1199px) {
  .table1 .hide-lg { display: none; }
}

@media (max-width: 991px) {
  .table1 .hide-md { display: none; }
}

@media (max-width: 767px) {
  .table1 .hide-sm { display: none; }
}

@media (max-width: 575px) {
  .table1 .hide-xs { display: none; }
}

/* Responsive text utilities for table1 */
.table1 .text-responsive {
  word-break: break-word;
  hyphens: auto;
}

.table1 .text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Adjust truncation width based on screen size */
@media (max-width: 768px) {
  .table1 .text-truncate {
    max-width: 100px;
  }
}

@media (max-width: 576px) {
  .table1 .text-truncate {
    max-width: 80px;
  }
}

/* Sticky first column option for table1 */
.table1 .sticky-col {
  position: sticky;
  left: 0;
  background-color: var(--table1-body-bg);
  z-index: 5;
  border-right: 2px solid var(--table1-border-alpha-light);
}

.table1 thead .sticky-col {
  background-color: var(--table1-header-bg);
  z-index: 6;
}

/* Responsive action buttons in table1 */
@media (max-width: 576px) {
  .table1 .action-buttons {
    gap: 4px;
    justify-content: center;
  }
  
  .table1 .action-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Default responsive behavior for table1 on mobile */
@media (max-width: 576px) {
  .table1:not(.mobile-stack) {
    min-width: 500px;
    font-size: 13px;
  }
  
  .table1:not(.mobile-stack) thead th {
    padding: 8px 10px;
    font-size: 10px;
    height: 35px;
  }
  
  .table1:not(.mobile-stack) tbody td {
    padding: 6px 10px;
    font-size: 13px;
    height: 38px;
    max-width: 100px;
  }
}

/* Large screens - optimal spacing */
@media (min-width: 1200px) {
  .table1 {
    font-size: 16px;
  }
  
  .table1 thead th {
    padding: 14px 20px;
    font-size: 13px;
    height: 45px;
  }
  
  .table1 tbody td {
    padding: 12px 20px;
    font-size: 16px;
    height: 50px;
    max-width: 250px;
  }
}

/* Horizontal scroll indicator for better UX */
.table-scroll-indicator {
  position: relative;
}

.table-scroll-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to left, var(--card-bg), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-scroll-indicator.has-scroll::after {
  opacity: 1;
}

/* Enhanced scrollbar for table containers */
.table-responsive-enhanced::-webkit-scrollbar {
  height: 8px;
}

.table-responsive-enhanced::-webkit-scrollbar-track {
  background-color: var(--card-bg);
  border-radius: 4px;
}

.table-responsive-enhanced::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
  opacity: 0.7;
}

.table-responsive-enhanced::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background-color: var(--link-hover-color);
}

/* Table caption for accessibility */
.table1 caption {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 0;
  text-align: left;
  caption-side: top;
}

/* Sticky columns for important data */
.table1 .sticky-column {
  position: sticky;
  left: 0;
  background-color: var(--table1-body-bg);
  z-index: 5;
  border-right: 2px solid var(--table1-border-alpha-light);
}

.table1 thead .sticky-column {
  background-color: var(--table1-header-bg);
  z-index: 6;
}

/* Responsive text utilities */
.text-responsive {
  word-break: break-word;
  hyphens: auto;
}

.text-truncate-responsive {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .text-truncate-responsive {
    max-width: 80px;
  }
}

@media (max-width: 576px) {
  .text-truncate-responsive {
    max-width: 60px;
  }
}

/* Loading state for tables */
.table-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Empty state styling */
.table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--system-text);
  font-style: italic;
}

.table-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Print styles for tables */
@media print {
  .table1 {
    border-collapse: collapse !important;
    font-size: 10px !important;
  }
  
  .table1 thead th,
  .table1 tbody td {
    border: 1px solid #000 !important;
    padding: 4px !important;
  }
  
  .table1 .hide-print {
    display: none !important;
  }
  
  .action-buttons {
    display: none !important;
  }
}

/* Enhanced Bootstrap Modal Close Button Styling */
.modal .btn-close,
.modal-header .btn-close {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  opacity: 0.8;
}

/* Close button icon using CSS */
.modal .btn-close::before,
.modal-header .btn-close::before {
  content: "×";
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-color);
  transition: color 0.2s ease;
}

/* Hover effects */
.modal .btn-close:hover,
.modal-header .btn-close:hover {
  background-color: var(--action-icon-bg);
  opacity: 1;
  transform: scale(1.1);
}

.modal .btn-close:hover::before,
.modal-header .btn-close:hover::before {
  color: var(--link-hover-color);
}

/* Focus styles for accessibility */
.modal .btn-close:focus,
.modal-header .btn-close:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(237, 26, 59, 0.25);
}

.light-mode .modal .btn-close:focus,
.light-mode .modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(237, 26, 59, 0.25);
}

/* Remove default Bootstrap close button styles */
.modal .btn-close:not(:disabled):not(.disabled),
.modal-header .btn-close:not(:disabled):not(.disabled) {
  filter: none;
  background-image: none;
}

/* Alternative close button with icon (if using Font Awesome) */
.modal .btn-close.btn-close-icon,
.modal-header .btn-close.btn-close-icon {
  font-family: "Font Awesome 6 Free", sans-serif;
}

.modal .btn-close.btn-close-icon::before,
.modal-header .btn-close.btn-close-icon::before {
  content: "\f00d"; /* Font Awesome times icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 16px;
}

/* Themed modal close button variant */
.modal .btn-close-themed,
.modal-header .btn-close-themed {
  background-color: var(--action-icon-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  opacity: 1;
}

.modal .btn-close-themed::before,
.modal-header .btn-close-themed::before {
  color: var(--text-color);
  font-size: 18px;
}

.modal .btn-close-themed:hover,
.modal-header .btn-close-themed:hover {
  background-color: var(--menu-hover);
  border-color: var(--link-hover-color);
  transform: none;
}

.modal .btn-close-themed:hover::before,
.modal-header .btn-close-themed:hover::before {
  color: var(--link-hover-color);
}

/* Danger close button variant */
.modal .btn-close-danger,
.modal-header .btn-close-danger {
  background-color: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}

.modal .btn-close-danger::before,
.modal-header .btn-close-danger::before {
  color: var(--danger-color);
}

.modal .btn-close-danger:hover,
.modal-header .btn-close-danger:hover {
  background-color: var(--danger-color);
}

.modal .btn-close-danger:hover::before,
.modal-header .btn-close-danger:hover::before {
  color: white;
}

/* Small close button variant */
.modal .btn-close-sm,
.modal-header .btn-close-sm {
  width: 24px;
  height: 24px;
}

.modal .btn-close-sm::before,
.modal-header .btn-close-sm::before {
  font-size: 18px;
}

/* Large close button variant */
.modal .btn-close-lg,
.modal-header .btn-close-lg {
  width: 40px;
  height: 40px;
}

.modal .btn-close-lg::before,
.modal-header .btn-close-lg::before {
  font-size: 28px;
}

/* Close button in different modal contexts */
.modal.modal-dark .btn-close::before,
.modal-dark .modal-header .btn-close::before {
  color: var(--text-color);
}

.modal.modal-light .btn-close::before,
.modal-light .modal-header .btn-close::before {
  color: #212121;
}

/* Animation for close button */
@keyframes closeButtonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.modal .btn-close.animate-close,
.modal-header .btn-close.animate-close {
  animation: closeButtonPulse 0.3s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .table1 {
    border: 2px solid;
  }
  
  .table1 thead th,
  .table1 tbody td {
    border: 1px solid;
  }
  
  .modal .btn-close,
  .modal-header .btn-close {
    border: 2px solid var(--text-color);
  }
}

/* Table1 Styles */
.table1 {
  width: 100%;
  margin: 0;
  color: var(--table1-text);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  border: 1px solid var(--table1-border-alpha-light);
  border-radius: 0;
  overflow: hidden;
}

.card .table1 {
    border: none;
    border-radius: 0;
}

.table1 thead th {
  background-color: var(--table1-header-bg);
  color: var(--table1-header-text);
  border-bottom: 1px solid var(--table1-border-alpha-light);
  padding: 12px 16px;
  text-align: left;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Border after the first column header */
.table1 thead th:first-child {
  border-right: 1px solid var(--table1-border-alpha-light);
}

.table1 tbody tr:hover {
  background-color: var(--table1-hover-bg);
}

.table1 tbody td {
  border-bottom: 1px solid var(--table1-border-alpha-light);
  padding: 4px 16px;
  vertical-align: middle;
  transition: background-color 0.2s ease;
  color: inherit;
}

/* Border after the first column data cell */
.table1 tbody td:first-child {
  border-right: 1px solid var(--table1-border-alpha-light);
}

.table1 tbody tr:last-child td {
  border-bottom: none;
}

.table1-responsive {
   overflow-x: auto;
   scrollbar-width: thin;
   scrollbar-color: rgba(237, 26, 59, 0.4) transparent;
}

.table1-responsive::-webkit-scrollbar {
  height: 6px;
}

.table1-responsive::-webkit-scrollbar-thumb {
  background-color: rgba(237, 26, 59, 0.4);
  border-radius: 3px;
}

.light-mode .table1-responsive::-webkit-scrollbar-thumb {
  background-color: rgba(237, 26, 59, 0.4);
}

.table1-responsive::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Alternating row colors */
.table1 tbody tr:nth-of-type(odd) {
  background-color: rgba(237, 26, 59, 0.03); /* Subtle red for dark mode */
}

.light-mode .table1 tbody tr:nth-of-type(odd) {
  background-color: rgba(237, 26, 59, 0.109); /* Even more subtle red for light mode */
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.action-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--action-icon-bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Add padding for larger touch target on mobile */
  padding: 6px;
  /* Ensure minimum 44x44px touch target */
  min-width: 44px;
  min-height: 44px;
}

.action-icon1 {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--action-icon-bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.view-icon {
  color: var(--primary-color);
}

.edit-icon {
  color: var(--warning-color);
}

.delete-icon {
  color: var(--danger-color);
}

.success-icon {
  color: var(--success-color);
}

.action-icon:hover,
.action-icon1:hover {
  background-color: var(--menu-hover);
  color: var(--link-hover-color);
}

.action-icon1.success-icon {
  color: #28a745;
}

.action-icon1.success-icon:hover {
  color: #1e7e34;
  background-color: rgba(40, 167, 69, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary-color, #ED1A3B);
}

.action-icon.success-icon,
.action-icon1.success-icon {
  color: var(--primary-color, #ED1A3B);
  background-color: rgba(237, 26, 59, 0.12);
  border-color: rgba(237, 26, 59, 0.3);
}

.action-icon.success-icon:hover,
.action-icon1.success-icon:hover,
.action-icon.success-icon:focus,
.action-icon1.success-icon:focus {
  color: #FFFFFF;
  background-color: var(--primary-color, #ED1A3B);
  border-color: var(--primary-color, #ED1A3B);
}

.action-icon1.view-icon {
  color: #17a2b8;
}

.action-icon1.view-icon:hover {
  color: #117a8b;
  background-color: rgba(23, 162, 184, 0.1);
}

.action-icon1.edit-icon {
  color: #ffc107;
}

.action-icon1.edit-icon:hover {
  color: #d39e00;
  background-color: rgba(255, 193, 7, 0.1);
}

/* Mobile Card Styles */
.mobile-card {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-card:hover {
  background-color: var(--menu-hover, rgba(0,0,0,0.02));
  border-left-color: var(--primary-color, #dc3545);
}

.mobile-info-item {
  margin-bottom: 0.5rem;
}

.mobile-info-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-info-item div {
  font-size: 0.9rem;
  line-height: 1.3;
}

/* Better mobile button styling */
@media (max-width: 991.98px) {
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  
  .mobile-card {
    border-radius: 0;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card-body {
    padding: 0 !important;
  }
}

/* Enhanced table responsiveness */
.table-responsive {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
  border: 1px solid var(--table1-border-color);
  border-radius: 8px;
  display: block;
}

/* Webkit scrollbar for .table-responsive */
.table-responsive::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.table-responsive::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 6px;
  min-height: 40px;
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background-color: var(--link-hover-color);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.table-responsive .table1 {
  margin-bottom: 0;
  border: none;
}

/* Responsive table improvements */
@media (min-width: 992px) {
  .table1 th:nth-child(1) { width: 12%; }
  .table1 th:nth-child(2) { width: 18%; }
  .table1 th:nth-child(3) { width: 12%; }
  .table1 th:nth-child(4) { width: 12%; }
  .table1 th:nth-child(5) { width: 8%; }
  .table1 th:nth-child(6) { width: 10%; }
  .table1 th:nth-child(7) { width: 10%; }
  .table1 th:nth-child(8) { width: 15%; }
  .table1 th:nth-child(9) { width: 13%; }
}

/* Improve table cell content for larger screens */
@media (min-width: 992px) {
  .table1 td {
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
  }
}

/* Mobile table improvements */
@media (max-width: 991.98px) {
  .table1 {
    font-size: 0.875rem;
  }

  .table1 th,
  .table1 td {
    padding: 0.5rem 0.75rem;
    white-space: normal !important;
    word-break: break-word;
    hyphens: auto;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .table1 td {
    border-right: 1px solid var(--table1-border-color);
  }

  .table1 td:last-child {
    border-right: none;
  }

  /* Allow horizontal scrolling on mobile */
  .table-responsive {
    overflow-x: auto;
    scroll-behavior: smooth;
  }

  /* Add scrollbar styling for mobile */
  .table-responsive::-webkit-scrollbar {
    height: 8px;
  }

  .table-responsive::-webkit-scrollbar-track {
    background: var(--table1-border-color);
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--link-hover-color);
  }
}

.table1 th,
.table1 td {
  white-space: normal !important;
  word-break: break-word;
  hyphens: auto;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

@media (max-width: 768px) {
  .table-responsive, .table1-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table1 td,
  .table1 th {
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
  }
}

.table1 td > div {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-saccoforce-responsive::-webkit-scrollbar-track {
  background: var(--card-bg);
}

/* Card integration for BDO Prime tables */
.card .table-bdoprime {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
}

.card .table-bdoprime thead th:first-child {
  border-top-left-radius: 0;
}

.card .table-bdoprime thead th:last-child {
  border-top-right-radius: 0;
}

  .table-bdoprime thead th,
  .table-bdoprime tbody td {
    padding: 0.5rem 0.25rem;
  }
  
  .table-bdoprime .btn-sm {
    padding: 0.125rem 0.25rem;
    font-size: 0.6875rem;
  }
}

/* Better spacing for mobile */
@media (max-width: 576px) {
  .mobile-card .row.g-2 {
    --bs-gutter-x: 0.5rem;
  }
  
  .mobile-card .col-6 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

/* Card table styles */
.card-table {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}

.card-table .card-body {
  padding: 0;
}

/* Dropdown improvements for table actions */
.dropdown-menu {
  z-index: 1050 !important;
  background-color: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
}

.dropdown-item {
  color: var(--dropdown-item-color);
}

.dropdown-item:hover {
  background-color: var(--dropdown-item-hover-bg);
  color: var(--dropdown-item-hover-color);
}


.table-responsive,
.table-responsive-enhanced,
.table1-responsive {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::before,
.table-responsive::after,
.table-responsive-enhanced::before,
.table-responsive-enhanced::after,
.table1-responsive::before,
.table1-responsive::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.table-responsive::before,
.table-responsive-enhanced::before,
.table1-responsive::before {
  left: 0;
  background: linear-gradient(to right, var(--card-bg, #121212), rgba(18, 18, 18, 0));
}

.table-responsive::after,
.table-responsive-enhanced::after,
.table1-responsive::after {
  right: 0;
  background: linear-gradient(to left, var(--card-bg, #121212), rgba(18, 18, 18, 0));
}

.light-mode .table-responsive::before,
.light-mode .table-responsive-enhanced::before,
.light-mode .table1-responsive::before {
  background: linear-gradient(to right, var(--card-bg, #fff), rgba(255, 255, 255, 0));
}

.light-mode .table-responsive::after,
.light-mode .table-responsive-enhanced::after,
.light-mode .table1-responsive::after {
  background: linear-gradient(to left, var(--card-bg, #fff), rgba(255, 255, 255, 0));
}

.table-responsive.has-horizontal-scroll::after,
.table-responsive-enhanced.has-horizontal-scroll::after,
.table1-responsive.has-horizontal-scroll::after {
  opacity: 1;
}

.table-responsive.is-scrolled::before,
.table-responsive-enhanced.is-scrolled::before,
.table1-responsive.is-scrolled::before {
  opacity: 1;
}

.table-responsive.is-scroll-end::after,
.table-responsive-enhanced.is-scroll-end::after,
.table1-responsive.is-scroll-end::after {
  opacity: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .table1,
  .table1 *,
  .table-responsive-enhanced,
  .modal .btn-close,
  .modal-header .btn-close,
  .mobile-card,
  .action-icon,
  .action-icon1 {
    transition: none !important;
    animation: none !important;
  }
}
/* ===== RESPONSIVE TABLE STYLES ===== */
.table-responsive table,
.table-responsive-enhanced table,
.table1-responsive table {
  width: 100%;
  display: table;
  table-layout: auto !important;
  min-width: 600px !important; /* Ensures scrolling on small screens */
}

/* Table cell base styles - Allow wrapping, not forced nowrap */
.table-responsive table th,
.table-responsive table td,
.table-responsive-enhanced table th,
.table-responsive-enhanced table td,
.table1-responsive table th,
.table1-responsive table td,
.table1 th,
.table1 td {
  padding: 12px 16px;
  vertical-align: middle;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: initial !important;
}

/* Utility classes for table text handling */
.table-text-wrap {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.table-text-nowrap {
  white-space: nowrap !important;
}

.table-text-ellipsis {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block;
  max-width: 100%;
}

/* Headers - Prevent excessive wrapping */
.table-responsive table thead th,
.table-responsive-enhanced table thead th,
.table1-responsive table thead th,
.table1 thead th {
  white-space: normal;
  font-weight: 600;
}

/* Body cells - Allow natural wrapping */
.table-responsive table tbody td,
.table-responsive-enhanced table tbody td,
.table1-responsive table tbody td,
.table1 tbody td {
  white-space: normal;
}

/* Row hover effects */
.table-responsive table tbody tr:hover,
.table-responsive-enhanced table tbody tr:hover,
.table1-responsive table tbody tr:hover {
  background-color: var(--table1-hover-bg);
}

.table-responsive table tbody tr:hover td,
.table-responsive-enhanced table tbody tr:hover td,
.table1-responsive table tbody tr:hover td {
  color: var(--table1-text);
}

/* Scroll indicator for horizontal scrolling */
.scroll-indicator {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  animation: pulse-arrow 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes pulse-arrow {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) translateX(4px);
  }
}

.table-responsive.is-scrolled-to-end .scroll-indicator,
.table1-responsive.is-scrolled-to-end .scroll-indicator,
.table-responsive-enhanced.is-scrolled-to-end .scroll-indicator {
  display: none;
}

/* ===== ENHANCED SCROLLBAR STYLING FOR ALL TABLE CONTAINERS ===== */

/* .table-responsive-enhanced scrollbar */
.table-responsive-enhanced {
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
}

.table-responsive-enhanced::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.table-responsive-enhanced::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.table-responsive-enhanced::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 6px;
  min-height: 40px;
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.table-responsive-enhanced::-webkit-scrollbar-thumb:hover {
  background-color: var(--link-hover-color);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Firefox scrollbar (visible) */
* {
  scrollbar-width: auto !important;
}

/* Light mode scrollbar adjustments */
.light-mode .table-responsive::-webkit-scrollbar-track,
.light-mode .table1-responsive::-webkit-scrollbar-track,
.light-mode .table-responsive-enhanced::-webkit-scrollbar-track {
  background-color: #f5f5f5;
}

.light-mode .table-responsive::-webkit-scrollbar-thumb,
.light-mode .table1-responsive::-webkit-scrollbar-thumb,
.light-mode .table-responsive-enhanced::-webkit-scrollbar-thumb {
  background-color: #0d6efd;
}

/* Ensure scrollbars are never hidden by parent containers */
.card-body.p-0 .table-responsive,
.card-body.p-0 .table1-responsive,
.card-body.p-0 .table-responsive-enhanced {
  margin: 0 !important;
  border-radius: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* Force display block for proper scrollbar rendering */
.table-responsive,
.table1-responsive,
.table-responsive-enhanced {
  display: block !important;
  overflow-x: auto !important;
}

/* ===== UNIVERSAL SCROLLBAR STYLING FOR ALL TABLE CONTAINERS ===== */
/* This ensures consistent scrollbar appearance across all tables */

/* Standard scrollbar for all responsive table containers */
.table-responsive,
.table1-responsive,
.table-responsive-enhanced {
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
}

/* Webkit scrollbar for .table-responsive */
.table-responsive::-webkit-scrollbar,
.table1-responsive::-webkit-scrollbar,
.table-responsive-enhanced::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.table-responsive::-webkit-scrollbar-track,
.table1-responsive::-webkit-scrollbar-track,
.table-responsive-enhanced::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.table1-responsive::-webkit-scrollbar-thumb,
.table-responsive-enhanced::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 6px;
  min-height: 40px;
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.table1-responsive::-webkit-scrollbar-thumb:hover,
.table-responsive-enhanced::-webkit-scrollbar-thumb:hover {
  background-color: var(--link-hover-color);
  border: 2px solid rgba(0, 0, 0, 0.1);
}
