@font-face{font-family:"Phetsarath OT";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/phetsarath-ot/PhetsarathOT-Regular.woff2?v=4103") format("woff2")}
@font-face{font-family:"Phetsarath OT";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/phetsarath-ot/PhetsarathOT-Medium.woff2?v=4103") format("woff2")}
@font-face{font-family:"Phetsarath OT";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/phetsarath-ot/PhetsarathOT-SemiBold.woff2?v=4103") format("woff2")}
@font-face{font-family:"Phetsarath OT";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/phetsarath-ot/PhetsarathOT-Bold.woff2?v=4103") format("woff2")}
:root{--pos-primary:#17594a;--pos-accent:#e9b824;--bs-body-font-family:"Phetsarath OT","Noto Sans Lao","Segoe UI",sans-serif}body{font-family:var(--bs-body-font-family)}.navbar-pos{background:linear-gradient(120deg,#12372a,var(--pos-primary))}.app-shell{min-height:100vh}.avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#e9ecef}.avatar-lg{width:88px;height:88px}.table>:not(caption)>*>*{vertical-align:middle}.required:after{content:" *";color:#dc3545}.card-stat{border:0;box-shadow:0 .125rem .5rem rgba(0,0,0,.075)}.login-cover{min-height:100vh;background:radial-gradient(circle at top right,#dff4eb,transparent 45%),#f8f9fa}.upload-overlay{position:fixed;inset:0;background:rgba(0,0,0,.68);z-index:2000;display:none;align-items:center;justify-content:center}.upload-overlay.show{display:flex}.empty-state{padding:3rem 1rem;text-align:center;color:#6c757d}.offcanvas{--bs-offcanvas-width:280px}@media(max-width:767.98px){.table-responsive{font-size:.9rem}.page-title{font-size:1.35rem}}

/* ==========================================================================
   Dark Mode System & Component Overrides
   ========================================================================== */
[data-bs-theme="dark"] {
  --bs-body-bg: #121416;
  --bs-body-bg-rgb: 18, 20, 22;
  --bs-body-color: #e2e8f0;
  --bs-secondary-bg: #1a1d21;
  --bs-tertiary-bg: #22262b;
  --bs-border-color: #2e343b;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.12);
  --bs-card-bg: #1a1d21;
  --bs-card-color: #e2e8f0;
  --bs-modal-bg: #1a1d21;
  --bs-modal-color: #e2e8f0;
}

[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: #121416 !important;
}

[data-bs-theme="dark"] .navbar-pos {
  background: linear-gradient(120deg, #091a14, #12372a);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .card {
  background-color: #1a1d21;
  border-color: #2e343b;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #1a1d21 !important;
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-dark {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #22262b !important;
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .card-header.bg-white,
[data-bs-theme="dark"] .card-footer.bg-white {
  background-color: #1e2227 !important;
  color: #e2e8f0 !important;
  border-color: #2e343b !important;
}

[data-bs-theme="dark"] .input-group-text.bg-white {
  background-color: #22262b !important;
  color: #cbd5e1 !important;
  border-color: #2e343b !important;
}

[data-bs-theme="dark"] .list-group-item.bg-white {
  background-color: #1a1d21 !important;
  color: #e2e8f0 !important;
  border-color: #2e343b !important;
}

[data-bs-theme="dark"] .border-light-subtle {
  border-color: #2e343b !important;
}

[data-bs-theme="dark"] .modal-header.bg-light,
[data-bs-theme="dark"] .modal-footer.bg-light {
  background-color: #22262b !important;
  border-color: #2e343b !important;
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .modal-content {
  background-color: #1a1d21;
  border-color: #2e343b;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: #e2e8f0;
  --bs-table-border-color: #2e343b;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #16191c;
  border-color: #2e343b;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #16191c;
  border-color: #198754;
  color: #f8fafc;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

[data-bs-theme="dark"] .login-cover {
  background: radial-gradient(circle at top right, rgba(23, 89, 74, 0.15), transparent 45%), #121416;
}

[data-bs-theme="dark"] .avatar {
  background-color: #2e343b;
}

[data-bs-theme="dark"] .card-stat {
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, 0.4);
}

/* Customer Web Specific in Dark Mode */
[data-bs-theme="dark"] .variant-btn-block {
  background-color: #22262b;
  border-color: #2e343b;
}

[data-bs-theme="dark"] .variant-btn-block:hover {
  border-color: #20c997;
}

[data-bs-theme="dark"] .variant-btn-block.active {
  background-color: rgba(25, 135, 84, 0.2);
  border-color: #20c997;
  box-shadow: 0 0 0 2px rgba(32, 201, 151, 0.35);
}

[data-bs-theme="dark"] .variant-scroll-container {
  background-color: #16191c;
  border-top-color: #2e343b;
}

[data-bs-theme="dark"] .variant-row {
  background-color: #1e2227 !important;
  border-color: #2e343b !important;
}

/* Map tiles in Dark Mode */
[data-bs-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.7) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.75);
}

[data-bs-theme="dark"] .leaflet-container {
  background: #1a1d21 !important;
}

/* Theme toggle button styling */
.theme-toggle-btn {
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  transition: all 0.2s ease-in-out;
}
.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Collapsible Left Sidebar System
   ========================================================================== */
.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
  position: relative;
}

.app-sidebar {
  width: 240px;
  background-color: #fff;
  border-right: 1px solid #dee2e6;
  flex-shrink: 0;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s ease;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1020;
}

[data-bs-theme="dark"] .app-sidebar {
  background-color: #1a1d21;
  border-right-color: #2e343b;
}

.app-sidebar .sidebar-nav {
  padding: 0.75rem 0.5rem;
  flex: 1 1 auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: var(--bs-body-color, #333);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background-color: rgba(23, 89, 74, 0.08);
  color: var(--pos-primary, #17594a);
}

[data-bs-theme="dark"] .sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #20c997;
}

.sidebar-link.active {
  background-color: var(--pos-primary, #17594a);
  color: #fff !important;
}

[data-bs-theme="dark"] .sidebar-link.active {
  background-color: #198754;
  color: #fff !important;
}

.sidebar-icon {
  font-size: 1.15rem;
  min-width: 24px;
  text-align: center;
}

.sidebar-text {
  transition: opacity 0.2s ease, width 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed State */
.app-sidebar.collapsed {
  width: 68px;
}

.app-sidebar.collapsed .sidebar-text {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.65rem 0;
  margin-left: auto;
  margin-right: auto;
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.app-sidebar.collapsed .sidebar-icon {
  margin: 0;
  font-size: 1.25rem;
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid #dee2e6;
  margin-top: auto;
}

[data-bs-theme="dark"] .sidebar-footer {
  border-top-color: #2e343b;
}

.sidebar-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .sidebar-collapse-btn {
  border-color: #2e343b;
  color: #94a3b8;
}

[data-bs-theme="dark"] .sidebar-collapse-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.app-sidebar.collapsed .sidebar-collapse-btn .sidebar-text {
  display: none !important;
}

.sidebar-collapse-icon {
  transition: transform 0.22s ease;
}

.app-sidebar.collapsed .sidebar-collapse-icon {
  transform: rotate(180deg);
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  transition: all 0.22s ease;
}

/* Responsive on Mobile (<992px) */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-sidebar.collapsed {
    width: 240px;
  }
  .app-sidebar.collapsed .sidebar-text {
    display: inline !important;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    top: 56px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    display: none;
  }
  .sidebar-backdrop.show {
    display: block;
  }

/* Camera Barcode Scanner */
.camera-scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.camera-scan-box {
  width: min(84%, 290px);
  height: 190px;
  border: 2px dashed rgba(255, 193, 7, 0.9);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.camera-scan-box:hover {
  filter: brightness(1.08);
}
.camera-scan-box:active {
  transform: scale(0.985);
}
.camera-scan-box.state-standby {
  border: 2px dashed rgba(255, 193, 7, 0.92);
  background: rgba(0, 0, 0, 0.32);
}
.camera-scan-box.state-active {
  border: 2px solid #20c997;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 20px rgba(32, 201, 151, 0.7);
  background: transparent;
}
.camera-scan-box.state-success {
  border: 3px solid #198754;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 26px rgba(25, 135, 84, 0.9);
  background: rgba(25, 135, 84, 0.22);
}
.scan-laser-line {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #20c997;
  box-shadow: 0 0 8px #20c997, 0 0 16px #0df2c9;
  animation: scanLaserAnim 1.8s ease-in-out infinite alternate;
  display: none;
  z-index: 2;
}
.camera-scan-box.state-active .scan-laser-line {
  display: block;
}
@keyframes scanLaserAnim {
  0% { top: 4px; }
  100% { top: calc(100% - 7px); }
}
.camera-scan-center-content {
  text-align: center;
  color: #fff;
  z-index: 3;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  max-width: 90%;
  pointer-events: none;
  animation: centerPulse 2.4s ease-in-out infinite;
}
@keyframes centerPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(0,0,0,0.45); }
  50% { transform: scale(1.03); box-shadow: 0 6px 22px rgba(255,193,7,0.4); }
}
.camera-scan-center-content .scan-btn-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}
.camera-scan-center-content .scan-btn-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.camera-scan-active-indicator {
  position: absolute;
  bottom: 10px;
  z-index: 3;
  pointer-events: none;
}
#cameraScanViewport video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}

/* Not Found Barcode Dark Pop Up Modal (Right Aligned, Non-blocking cart) */
#notFoundBarcodeModal.modal {
  background-color: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
}
#notFoundBarcodeModal .modal-dialog {
  pointer-events: auto !important;
  margin-right: 1.25rem;
  margin-left: auto;
  margin-top: 1rem;
  max-width: 530px;
  width: calc(100% - 2rem);
}
@media (max-width: 991.98px) {
  #notFoundBarcodeModal .modal-dialog {
    margin-right: auto;
    margin-left: auto;
    max-width: 96%;
  }
}
#notFoundBarcodeModal .modal-content {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(220, 53, 69, 0.3) !important;
}

/* ==========================================================================
   Text-to-Speech (TTS) Voice System
   ========================================================================== */
.btn-speak-product {
  transition: transform 0.15s ease, color 0.15s ease;
  vertical-align: middle;
  line-height: 1;
}
.btn-speak-product:hover {
  transform: scale(1.15);
}
.speaking-pulse {
  animation: posSpeakPulse 0.8s infinite alternate ease-in-out;
}
@keyframes posSpeakPulse {
  0% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(1.25); opacity: 1; }
}


