:root {
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --primary-light: #f8f9fc;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fa;
    --dark: #5a5c69;
    --white: #ffffff;
    --gray: #b7b9cc;
    --gray-dark: #7b7d8a;
    --font-family: "Khmer OS Siemreap", sans-serif;
  }
  
  /* Base Styles */
  body {
    font-family: var(--font-family);
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
  }
  
  /* Sidebar Styles */
  .sidebar {
    width: 220px;
    min-width:220px;
    min-height: 100vh;
    background: #005064;
    color: var(--white);
    transition: all 0.3s;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 1000;
  }
  
  .sidebar-brand {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .sidebar-logo {
    height: 150px;
    width: auto;
  }
  
  .sidebar-nav {
    padding: 0.5rem 0;
  }
  
  .sidebar .nav-link {
      white-space: nowrap;       /* Prevent text wrapping */
      overflow: hidden;          /* Hide overflow */
      text-overflow: ellipsis;   /* Show ... if text is too long */
      padding: 0.75rem 1rem;     /* Adjust padding as needed */
      margin: 0.25rem 0;         /* Reduce margin */
      font-size: 0.875rem;       /* Slightly smaller font */
      display: flex;             /* Use flexbox for alignment */
      align-items: center;  
      color: var(--white);     /* Center items vertically */
  }
  
  .sidebar .nav-link:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .sidebar .nav-link.active {
    color: var(--primary);
    background-color: var(--white);
    font-weight: 600;
  }
  
  .sidebar .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
    min-width: 1.25rem;       /* Fixed width for icons */
    text-align: center;
  }
  
  .sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Main Content Styles */
  .main-content {
    width: calc(100% - 14rem);
    min-height: 100vh;
    transition: all 0.3s;
    background-color: #f5f7fb;
  }
  
  /* Top Navigation */
  .navbar {
    height: 4.375rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    background-color: var(--white);
  }
  
  .navbar .dropdown-menu {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  }
  
  /* Card Styles */
  .card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
  }
  
  .card-header {
    background-color: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.35rem;
    font-weight: 600;
    border-radius: 0.35rem 0.35rem 0 0 !important;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  /* Alert Styles */
  .alert {
    border-radius: 0.35rem;
    border: none;
  }
  
  /* Button Styles */
  .btn {
    border-radius: 0.35rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
  }
  
  .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
  }
  
  .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  /* Table Styles */
  .table {
    color: var(--dark);
    margin-bottom: 0;
  }
  
  .table th {
    background-color: var(--light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom-width: 1px;
  }
  
  .table > :not(:first-child) {
    border-top: none;
  }
  
  /* Form Styles */
  .form-control,
  .form-select {
    border-radius: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d3e2;
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
  }
  
  /* Badge Styles */
  .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
  }
  
  /* Custom Scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-dark);
  }
  
  /* Responsive Styles */
  @media (max-width: 768px) {
    .sidebar {
      margin-left: -14rem;
      position: fixed;
    }
  
    .sidebar.show {
      margin-left: 0;
    }
  
    .main-content {
      width: 100%;
    }
  
    .main-content.show {
      margin-left: 14rem;
    }
  
    #sidebarToggle {
      display: block;
    }
  }
  
  /* Animation Classes */
  .fade-in {
    animation: fadeIn 0.3s ease-in-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  /* Utility Classes */
  .text-khmer {
    font-family: var(--font-family);
  }
  
  .cursor-pointer {
    cursor: pointer;
  }
  
  .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
  }
  
  /* Image Styles */
  .img-thumbnail {
    padding: 0.25rem;
    background-color: var(--white);
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    max-width: 100%;
    height: auto;
    transition: all 0.2s;
  }
  
  .img-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  }
  
  /* Modal Styles */
  .modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
  
  .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
  }
  
  .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  /* Pagination Styles */
  .pagination .page-item .page-link {
    border-radius: 0.35rem;
    margin: 0 0.25rem;
    color: var(--primary);
  }
  
  .pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
  }
  
  .pagination .page-item.disabled .page-link {
    color: var(--secondary);
  }
  
  /* Custom Toggle Switch */
  .form-switch .form-check-input {
    width: 2.5em;
    height: 1.5em;
    cursor: pointer;
  }
  
  /* Custom File Upload */
  .form-control-file::-webkit-file-upload-button {
    visibility: hidden;
  }
  
  .form-control-file::before {
    content: "ជ្រើសរើសឯកសារ";
    display: inline-block;
    background: var(--light);
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    padding: 0.375rem 0.75rem;
    outline: none;
    white-space: nowrap;
    cursor: pointer;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
  }
  
  .form-control-file:hover::before {
    background: #e9ecef;
  }
  