@import url("https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");

:root {
  --primary-color: #cfa18a;
  --secondary-color: #a38772;
  --primary-custom: var(--primary-color);
  --primary-custom-rgb: 207, 161, 138;
  --bg-light: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(207, 161, 138, 0.2);
  --text-dark: #4a3e36;
  --bs-badge-font-size: 1em !important;
}

body {
  font-family: "Sarabun", sans-serif;
  background-color: var(--bg-light);
  min-height: 100vh;
  color: var(--text-dark);
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-custom);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
  background-clip: content-box;
}

/* Firefox Scrollbar Support */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-custom) rgba(0, 0, 0, 0.03);
}

/* Glassmorphism Classes */
.glass-card.dropdown-menu-navbar {
  background: rgba(255, 255, 255, 1) !important;
}

.glass-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px -10px rgba(163, 137, 114, 0.2);
}

/* Page Layout Structure */
.page-content {
  /* min-height: calc(100vh - 200px); */
  min-height: 100vh;
}

.page-header {
  background: white;
  /* padding: 1.5rem 2rem; */
  padding: 0.7rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(163, 137, 114, 0.05);
}

.glass-navbar {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.glass-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(163, 137, 114, 0.1);
}

/* Table Refinement */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: rgba(207, 161, 138, 0.1);
  color: var(--secondary-color);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(207, 161, 138, 0.2);
}

.table tbody td {
  font-size: 12px;
  padding: 8px 12px;
  vertical-align: middle;
}

/* Custom Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border: none;
  color: white;
  /* border-radius: 10px; */
  /* padding: 10px 24px; */
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(207, 161, 138, 0.3);
  color: white;
}

.btn-white {
  background-color: white;
  color: #444;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.btn-white:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Utilities */
.text-primary-custom {
  color: var(--secondary-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.border-primary-custom {
  border-color: var(--primary-color) !important;
}

/* Sidebar/Nav Hover */
.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--primary-color);
}
/* Animations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

/* DataTables Custom Style */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(207, 161, 138, 0.25);
}

.dataTables_info {
  font-size: 12px;
  color: var(--secondary-color);
  padding-top: 15px !important;
}

.pagination {
  padding-top: 10px;
}

.page-link {
  color: var(--secondary-color);
  border: none;
  background: transparent;
  font-size: 12px;
  padding: 8px 12px;
  margin: 0 2px;
  border-radius: 8px !important;
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 10px rgba(207, 161, 138, 0.3);
}

.page-link:hover {
  background-color: rgba(207, 161, 138, 0.1);
  color: var(--primary-color);
}

/* Fix DataTables Sort Icon Alignment */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  padding-right: 25px !important;
  position: relative;
}

table.dataTable thead > tr > th:before,
table.dataTable thead > tr > th:after {
  position: absolute !important;
  right: 10px !important;
  display: block !important;
  opacity: 0.2 !important;
  font-size: 0.65rem !important;
  line-height: 1 !important;
  transform: translateY(-50%) !important;
}

table.dataTable thead > tr > th:before {
  top: 30% !important;
  content: "▲" !important;
}

table.dataTable thead > tr > th:after {
  top: 60% !important;
  content: "▼" !important;
}

table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_desc:after {
  opacity: 1 !important;
  color: var(--primary-color) !important;
}

.page-header h5,
.page-header h4,
.page-header h3,
.page-header h2 {
  font-size: 16px !important;
}
.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a,
.breadcrumb-item::before {
  font-size: 14px !important;
}

.breadcrumb .breadcrumb-item.active {
  font-weight: 700 !important;
  color: var(--secondary-color) !important;
}

.badge {
  font-size: 0.9em !important;
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option {
  font-size: 14px !important;
}
