@media print {
  @page {
    size: A4;
    margin: 15mm;
  }

  body * {
    visibility: hidden;
  }

  #printArea,
  #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    width: 100%;
    margin: 15px;
  }
}

.report-header {
  margin-bottom: 1rem;
}

.modal-lg {
  max-width: 900px;
}

#tblUsers {
  width: 100% !important;
}

body {
  font-family: 'Khmer OS Battambang', 'Arial', sans-serif;
}


.kh-font {
  font-family: 'Khmer OS Battambang', 'Arial', sans-serif;
  line-height: 1.6;
}

/* Loading Spinner Styles */
.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.loading-spinner.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

.spinner-content {
  position: relative;
  z-index: 10000;
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #0d6efd;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-text {
  margin: 0;
  color: #495057;
  font-family: 'Khmer OS Battambang', 'Arial', sans-serif;
  font-size: 14px;
}

.kh-title {
  font-family: 'Khmer OS Battambang', 'Arial', sans-serif;
  font-weight: 600;
}

.form-check-input.user-select-checkbox {
  padding: 10px;
  margin: 0 auto;
  display: block;
  transform: scale(1.05);
}

#tblUsers thead th:first-child,
#tblUsers tbody td:first-child {
  text-align: center;
  vertical-align: middle;
  width: 56px;
  padding-left: 6px;
  padding-right: 6px;
}

#tblUsers th,
#tblUsers td {
  padding: 0.45rem 0.4rem;
  white-space: nowrap;
  font-size: 0.92rem;
}

.table-responsive {
  overflow-x: auto;
}

body.export-style {
  background: #f4f6f9 !important;
}

body.export-style .modal-content {
  box-shadow: none;
}

body.export-style #printArea {
  background: #ffffff;
  padding: 18px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.08);
}

body.export-style .modal-header,
body.export-style .modal-footer {
  display: none !important;
}

body.export-style .table {
  background: #ffffff;
  border: 1px solid #515151;
  border-radius: 4px;
}

@media (max-width: 1200px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #tblUsers th,
  #tblUsers td {
    padding: 0.4rem 0.35rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 992px) {
  .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  .btn-group-sm .btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .container.py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  #tblUsers th,
  #tblUsers td {
    padding: 0.3rem 0.25rem;
    font-size: 0.8rem;
  }

  .form-check-input.user-select-checkbox {
    padding: 8px;
    transform: scale(0.95);
  }

  #tblUsers thead th:first-child,
  #tblUsers tbody td:first-child {
    width: 48px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .top-toolbar,
  .toolbar-actions,
  .toolbar-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions .btn,
  .toolbar-filter {
    width: 100%;
  }

  .toolbar-filter select {
    width: 100%;
  }

  .btn-primary,
  .btn-outline-secondary,
  .btn-outline-info,
  .btn-success,
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-info {
    width: 100%;
    margin-bottom: 0.35rem;
  }

  #tblUsers th,
  #tblUsers td {
    white-space: normal;
    font-size: 0.75rem;
  }

  .table-responsive {
    margin: 0 -0.25rem;
  }
}

.print-page-a4 {
  width: 210mm;
  max-width: 100%;
  min-height: auto;
  margin: 0 auto;
  padding: 2mm;
  background: #e3fffa;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  box-sizing: border-box;
  color: #000;
}

.print-page-a4 .table {
  font-size: 12px;
}

@media print {
  body * {
    visibility: hidden;
  }

  #printSelectionModal,
  #printSelectionModal * {
    visibility: visible;
  }

  #printSelectionModal .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
  }

  #printSelectionModal .modal-content,
  #printSelectionModal .modal-body,
  #printSelectionModal .modal-dialog {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    position: static !important;
  }

  #printSelectionModal .modal-content {
    border: 0;
    box-shadow: none;
  }

  #printSelectionModal .modal-footer {
    display: none !important;
  }

  .print-page-a4 {
    width: 100%;
    min-height: 0;
    padding: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
    break-inside: avoid;
  }

  .print-page-a4:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

.table-footer-highlight {
  background-color: #e2e8f0;
  font-weight: bold;
  border-top: 2px solid #75b6fc;
}

.table-footer-highlight th {
  padding: 10px 15px;
  color: #1a202c;
}

.footer-bg {
  background-color: #e2e8f0;
}

.footer-bg th {
  background-color: inherit;
}

@media print {
  thead th {
    background-color: #87bbff !important;
    color: #070707 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    top: 0;
  }
  tablr .table{
    background-color: #f92222 !important;
  }
  .modal-header {
    display: none !important;
  }

}
.btn-paid{
  color: #030303;
  disabled: true;
}
.text-color-red{
  color: red;
}
.text-center{
  text-align: center;
}
.bs-success-bg-subtle{
  background-color: #ddfbee !important;
}