@font-face {
  font-family: "Notosan-khmer";
  /* src: url('../fonts/akbalthom-naga.ttf'); */
  src: url("../fonts/notosan-khmer.ttf");
}
@font-face {
  font-family: "toathmor";
  src: url("../fonts/KH\ ANG\ TOATHMOR\ 2.TTF");
}
/* @font-face {
    font-family: "Poppins";
    src: url('../fonts/poppins.ttf');
    font-weight: 400 !important;
} */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Notosan-khmer", sans-serif;
  /* font-weight: 400 !important; */
}

body {
  background-color: #ffffff;
  /* background-color: #e1e0e0; */
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  /* min-height: 100vh; */
}

.container {
  max-width: 95%;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
  /* box-shadow: 0 2px 7px rgba(0,0,0,0.1);
  padding: 0 0.5rem;
  border-radius: 8px; */
}

/* Header Styles */
.header {
  /* background: #2c3e50; */
  color: white;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 1px 1px 5px grey;
}
.header .container {
  margin: 0 auto;
  background: transparent;
  min-height: unset;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
table tr th {
  text-transform: uppercase !important;
  background-color: #3498db !important;
  color: white !important;
}
table tr:nth-child(odd) td {
  background-color: #3498db1f !important;
}

.cart-items table tr th,
.bill-items table tr th {
  text-transform: uppercase !important;
  background-color: #dddddd !important;
  color: rgb(17, 17, 17) !important;
}

.cart-items table tr:nth-child(odd) td,
.bill-items table tr:nth-child(odd) td {
  background-color: #ffffff1f !important;
}

.logo h1 {
  font-size: 1.3rem;
  font-family: "toathmor";
  font-weight: bold;
}

.logo i {
  color: #ffffff;
  /* color: #e74c3c; */
  margin-right: 10px;
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-pic {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ecf0f1;
  transition: transform 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.1);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  min-width: 250px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-content a {
  color: #2c3e50;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #ecf0f1;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background: #f8f9fa;
}

.dropdown-content a i {
  margin-right: 8px;
  width: 20px;
}

.profile-dropdown:hover .dropdown-content {
  display: block;
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
}

.form-group {
  margin-bottom: 1rem;
}
/* 
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
} */

/* button style  */
/* .btn {
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    width: 100%;
}

.btn:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
} */

#categoryFilter a.active {
  background-color: #3498db !important;
  color: white !important;
}
/* Dashboard */
.dashboard {
  margin: 2rem 0;
}

.stats-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
  grid-template-columns: auto auto auto auto auto;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1rem 0.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-left: 4px solid #3498db;
}

.stat-card h3 {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-card .number {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2c3e50;
}

/* POS System */
.pos-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  /* padding: 1rem; */
  /* margin-top: 2rem; */
  /* height: calc(100vh - 80px); */
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  overflow-y: auto;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}

.product-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.product-card h4 {
  margin: 0.5rem 0;
  color: #1a2229;
  font-size: 0.9rem;
}

.product-card .price {
  color: #0d9546;
  font-weight: bold;
}

.product-card .stock {
  color: #32424f;
  font-size: 0.8rem;
}

.cart-section {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ecf0f1;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ecf0f1;
}

.cart-item .quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  background: #3498db;
  color: white;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: right;
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 2px solid #ecf0f1;
}

.pos-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pos-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .header {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Search Box */
.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ecf0f1;
  border-radius: 25px;
  font-size: 16px;
  padding-left: 45px;
}

.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c8d;
}

.search-box {
  position: relative;
}

.bg-search-pos {
  background-color: #f8f9fa;
  padding: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
  border-radius: 10px;
  gap: 7px;
}
.bg-search-pos select {
  width: fit-content;
}
.bg-search-pos .input-search {
  width: 100%;
  align-items: center;
  background-color: #eaeaeac5;
  padding: 8px 1rem;
  border: 1px solid #b7b7b7;
  border-radius: 10rem;
  overflow: hidden;
}
.bg-search-pos .input-search input {
  width: 100%;
  border: unset;
  outline: unset;
  background-color: transparent;
}
/* Bill Styles */
.bill-container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 400px;
  margin: 2rem auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.bill-header {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px dashed #bdc3c7;
  padding-bottom: 1rem;
}

.bill-items {
  margin: 1.5rem 0;
}

.bill-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.bill-total {
  border-top: 2px solid #2c3e50;
  padding-top: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.data-table th {
  /* background: #34495e; */
  background: #3498db;
  color: white;
}

.data-table tr:hover {
  background: #f8f9fa;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid #ecf0f1;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab.active {
  border-bottom-color: #3498db;
  color: #3498db;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}
/* Improved table styling for better print and display */
.table-container {
  background: white;
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.data-table th {
  background: #3498db;
  color: white;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.data-table td {
  padding: 8px 7px;
  border-bottom: 1px solid #ecf0f1;
  font-size: 12px;
  line-height: 1.2;
  vertical-align: top;
}

/* Prevent text wrapping in most columns */
.data-table td:not(:nth-child(3)) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Allow wrapping only for item/product name column (3rd column) */
.data-table td:nth-child(3) {
  white-space: normal;
  word-wrap: break-word;
  max-width: 200px;
  min-width: 150px;
}

.data-table tr:hover {
  background: #f8f9fa;
}

/* Ensure table headers don't wrap */
.data-table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.filter-section .form-group label {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}
.calendar-view {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.calendar-day {
  padding: 1rem;
  text-align: center;
  border-radius: 5px;
  background: #ecf0f1;
  position: relative;
}
.calendar-day.has-sales {
  background: #27ae60;
  color: white;
}
.report-modal .modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  /* width: 90%; */
  /* max-width: 500px; */
  position: relative;
  max-width: 90% !important;
}
.pos_report .tab-content {
  display: block !important;
}
.btn {
  text-transform: uppercase !important;
}
.bg-table {
  background-color: #f8f9fa;
  border-radius: 8px;
}
.bg-table input.form-control,
.bg-table select.form-control {
  box-shadow: 1px 2px 3px grey !important;
}

#changePhotoModal .modal-content {
  max-width: unset;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 800px;
  animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

/* Drag & Drop Area */
.drag-drop-area {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drag-drop-area:hover {
  border-color: #007bff !important;
  background-color: #e6f7ff !important;
  transform: translateY(-2px);
}

/* Range Input Styling */
.form-range::-webkit-slider-thumb {
  background: #007bff;
}

.form-range::-moz-range-thumb {
  background: #007bff;
}

/* Button Styles */
.btn-outline-primary {
  border-color: #007bff;
  color: #007bff;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

.btn-outline-success {
  border-color: #28a745;
  color: #28a745;
}

.btn-outline-success:hover {
  background-color: #28a745;
  color: white;
}

/* Preview Styles */
#cropPreview,
#finalPreview {
  transition: all 0.3s ease;
}

/* Loading Overlay */
#loadingOverlay {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
  }

  #imageToCropContainer {
    height: 250px;
  }
}

/* Custom scrollbar for adjustment panels */
.adjustment-panel,
.compression-panel,
.preview-panel {
  scrollbar-width: thin;
  scrollbar-color: #007bff #f8f9fa;
}

.adjustment-panel::-webkit-scrollbar,
.compression-panel::-webkit-scrollbar,
.preview-panel::-webkit-scrollbar {
  width: 6px;
}

.adjustment-panel::-webkit-scrollbar-track,
.compression-panel::-webkit-scrollbar-track,
.preview-panel::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.adjustment-panel::-webkit-scrollbar-thumb,
.compression-panel::-webkit-scrollbar-thumb,
.preview-panel::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 3px;
}
.user-management {
  display: grid;
  gap: 1rem;
}

.user-card {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.32);
}

.user-actions {
  display: flex;
  gap: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.active-cashiers {
  display: grid;
  gap: 1rem;
}
.cashier-card {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #27ae60;
  cursor: pointer;
  transition: transform 0.2s;
}
.cashier-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cashier-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.status.active {
  color: #27ae60;
  font-weight: bold;
}
.top-items {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.stat-item {
  text-align: center;
  padding: 0.5rem;
  background: white;
  border-radius: 5px;
}
.top-items span {
  background: #3498db;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  margin-bottom: 0.2rem;
  display: inline-block;
}
.modal-backdrop.fade.show {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

.modal-content {
  position: relative;
  min-height: 200px;
}

.modal-loading {
  opacity: 0.6;
  pointer-events: none;
}
.select2-container {
  width: 100% !important;
}
.language {
  cursor: pointer;
  color: #ffffff;
  font-weight: 400;
  background-color: #6b6cd1;
  font-size: medium;
  border-radius: 50px;
  padding: 2px 10px;
  transition: all 0.3s ease;
}
.language:hover {
  background-color: #5757c9;
  color: #ffffff;
}
.language .dropdown-content {
  width: fit-content !important;
  min-width: fit-content !important;
  background-color: red;
  display: unset !important;
}
.language .dropdown-content a {
  width: 100% !important;
  display: block !important;
}
.alert-medium,
.low-stock {
  background: #f39c12;
  padding: 2px 7px;
  color: white;
}
.alert-low,
.out-of-stock {
  background: #f31212;
  color: white;
  padding: 2px 7px;
}
.alert-out {
  background: #e74c3c;
  color: white;
  padding: 2px 7px;
}

table td small {
  font-size: 10px !important;
}
/* mobile view  */
/* @media screen and (max-width: 575px) {
  .respone-table{
    width: 100% !important;
    overflow-x: scroll !important;
  }
  .bg-table {
    width: 1000px !important;
  }
} */

/* tablete view  */
@media screen and (max-width: 768px) {
  .respone-table {
    width: 100% !important;
    overflow-x: scroll !important;
  }
  .bg-table {
    width: 1100px !important;
  }
  .tab {
    font-size: 11px !important;
  }
  .profile-pic {
    width: 45px !important;
    height: 45px !important;
  }
  #categoryFilter a {
    font-size: small !important;
  }
}

@media print {
  #button_group {
    display: none !important;
  }

  /* Optional: Hide other elements you don't want to print */
  .no-print {
    display: none !important;
  }

  /* Reset for bill container */
  .bill-container {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    max-width: 500px !important;
    border: unset !important;
    border-radius: unset !important;
  }

}
