/* CSS Stylesheet for GEDA Enterprise POS & ERP System */
@import url('https://fonts.googleapis.com/css2?family=Battambang:wght@400;700&family=Kantumruy:wght@300;400;700&family=Kantumruy+Pro:ital,wght@0,300..700;1,300..700&family=Noto+Sans+Khmer:wght@400;700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* Common Design Tokens */
  --primary: #1877f2;       /* Facebook Blue */
  --primary-hover: #166fe5;
  --secondary: #65676b;     /* Facebook cool gray */
  --secondary-hover: #5a5b5e;
  --danger: #ef4444;        /* Crimson Red */
  --danger-hover: #dc2626;
  --warning: #f59e0b;       /* Amber Gold */
  --success: #10b981;       /* Emerald Green */
  --success-hover: #059669;
  --info: #06b6d4;          /* Cyan */
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-khmer: 'Kantumruy Pro', 'Kantumruy', 'Noto Sans Khmer', 'Battambang', 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-english: 'Kantumruy Pro', 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  
  /* Clean Modern Slate Dark Theme Variables */
  --bg-main: #18191a;        /* Facebook dark background */
  --bg-card: #242526;        /* Facebook dark card */
  --bg-sidebar: #242526;     /* Facebook dark sidebar */
  --border-color: #3e4042;   /* Facebook dark border */
  --border-glow: transparent;
  
  --text-primary: #e4e6eb;   /* Facebook primary text */
  --text-secondary: #b0b3b8; /* Facebook secondary text */
  --text-muted: #8a8d91;
  --card-gradient: #242526;
  --input-bg: #3a3b3c;
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Light Theme Variables Switch */
body.light-theme {
  --primary: #1877f2;
  --primary-hover: #166fe5;
  --bg-main: #f0f2f5;        /* Facebook light background */
  --bg-card: #ffffff;        /* Facebook light card */
  --bg-sidebar: #ffffff;     /* Facebook light sidebar */
  --border-color: #e4e6eb;   /* Facebook light border */
  --border-glow: transparent;
  
  --text-primary: #050505;   /* Facebook primary text */
  --text-secondary: #65676b; /* Facebook secondary text */
  --text-muted: #8a8d91;
  --card-gradient: #ffffff;
  --input-bg: #f0f2f5;
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-english);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.lang-km, [lang="km"] {
  font-family: var(--font-khmer);
}

/* Custom App Containers */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Sidebar Layout & Collapsible / Drawer Styles */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
}
body.sidebar-active .sidebar-overlay {
  display: block;
}

.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed Sidebar Mode (Desktop) */
body.sidebar-collapsed .sidebar {
  width: 70px;
  padding: 20px 8px;
}
body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .pos-cta-btn span,
body.sidebar-collapsed .user-details-wrapper,
body.sidebar-collapsed .logout-sm-btn,
body.sidebar-collapsed .sidebar-footer {
  display: none !important;
}
body.sidebar-collapsed .logo-container {
  justify-content: center;
  padding-left: 0;
  margin-bottom: 20px;
}
body.sidebar-collapsed .brand-pill-container {
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .pos-cta-btn {
  justify-content: center;
  padding: 12px;
  gap: 0;
}

/* Mobile & Tablet Slider Drawer Layout */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 9999;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  }
  body.sidebar-active .sidebar {
    transform: translateX(0);
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-left: 0; /* Align perfectly with other nav items */
}

.brand-pill-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 6px 12px 6px 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%; /* Make it fill the sidebar width perfectly! */
  animation: brand-float 5s ease-in-out infinite, brand-glow 3s ease-in-out infinite alternate;
}

@keyframes brand-float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

@keyframes brand-glow {
  0% {
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 4px rgba(99, 102, 241, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
  }
  100% {
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 12px rgba(99, 102, 241, 0.22);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.brand-pill-container:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 20px rgba(99, 102, 241, 0.35);
  animation-play-state: paused; /* Pause floating while hovering for precise hover state */
  transform: translateY(-4px) scale(1.02);
}

body.light-theme .brand-pill-container {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .brand-pill-container:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-close-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s;
  border-radius: var(--radius-sm);
}
.btn-close-sidebar:hover {
  color: var(--text-primary);
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.05);
}
.btn-close-sidebar:active {
  transform: scale(0.9);
}

@media (max-width: 1024px) {
  .btn-close-sidebar {
    display: flex;
  }
}

.sidebar-logo-wrapper {
  position: relative !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  align-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  padding: 3px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 0 10px rgba(99, 102, 241, 0.15) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
}

.logo-container:hover .sidebar-logo-wrapper {
  transform: translateY(-2px) rotate(3deg) scale(1.04);
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 18px rgba(99, 102, 241, 0.35) !important;
}

.sidebar-logo-wrapper.has-custom-logo .logo-icon,
.sidebar-logo-wrapper.has-custom-logo #sidebar-default-logo {
  display: none !important;
}

.sidebar-logo-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.logo-text {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  word-break: break-word !important;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 8px rgba(99, 102, 241, 0.25));
  transition: all 0.3s ease;
}

.logo-container:hover .logo-text {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 12px rgba(99, 102, 241, 0.45));
  letter-spacing: 1px;
}

body.light-theme .logo-text {
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item svg {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  margin-right: 4px;
  stroke: var(--text-secondary);
  fill: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Unique Facebook-style Sidebar Icon and Background Colors */
.nav-item[data-view="view-pos"] svg {
  stroke: #1877f2;
  background: rgba(24, 119, 242, 0.12);
}
.nav-item[data-view="view-dashboard"] svg {
  stroke: #1877f2;
  background: rgba(24, 119, 242, 0.12);
}
.nav-item[data-view="view-inventory"] svg {
  stroke: #36a420;
  background: rgba(54, 164, 32, 0.12);
}
.nav-item[data-view="view-branches"] svg {
  stroke: #f02849;
  background: rgba(240, 40, 73, 0.12);
}
.nav-item[data-view="view-customers"] svg {
  stroke: #18ab29;
  background: rgba(24, 171, 41, 0.12);
}
.nav-item[data-view="view-followups"] svg {
  stroke: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}
.nav-item[data-view="view-performance"] svg {
  stroke: #ec4899;
  background: rgba(236, 72, 153, 0.12);
}
.nav-item[data-view="view-finance"] svg {
  stroke: #10b981;
  background: rgba(16, 185, 129, 0.12);
}
.nav-item[data-view="view-staff"] svg {
  stroke: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
}
.nav-item[data-view="view-reports"] svg {
  stroke: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}
.nav-item[data-view="view-settings"] svg {
  stroke: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}

/* Hover overrides */
.nav-item:hover svg {
  transform: scale(1.05);
}

.nav-item.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-item.active svg {
  stroke: #ffffff !important;
  background: rgba(255, 255, 255, 0.25) !important;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: #ffffff;
  border-radius: 0 4px 4px 0;
}


.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.03), inset 0 1px 1px 0 rgba(255, 255, 255, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.user-status-card:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.08), inset 0 1px 1px 0 rgba(255, 255, 255, 0.04);
}

.user-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  overflow: hidden;
  min-width: 0;
}

.user-details-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  flex-grow: 1;
  min-width: 0;
}

.user-card-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  display: block;
}

.user-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-card-branch {
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  display: block;
}

.user-avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
}
.user-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  border: 1.5px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border: 2px solid var(--bg-sidebar);
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.role-indicator-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  vertical-align: middle;
}

.role-indicator-badge.admin-role {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.1);
}

.logout-sm-btn {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.logout-sm-btn svg {
  stroke: var(--text-secondary);
  transition: stroke 0.2s;
}
.logout-sm-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger);
  transform: rotate(-10deg) scale(1.05);
}
.logout-sm-btn:hover svg {
  stroke: var(--danger);
}

.theme-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
}

.theme-toggle-btn {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}

.lang-toggle-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.lang-btn {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 6px 0;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lang-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.lang-btn img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.lang-btn:hover img {
  transform: scale(1.05);
}

/* Main Workspace */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.app-header {
  position: relative;
  z-index: 1000;
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-card);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 18px;
  font-weight: 750;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.active-branch-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 11px;
  color: #f8fafc;
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.active-branch-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.live-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  color: #f8fafc;
  font-weight: 750;
  font-family: monospace;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-clock:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.header-action-btn {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-action-btn:hover svg {
  animation: microBounce 0.5s ease-in-out;
}

@keyframes microBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Light Theme - monochrome black/white (dark text, light background) */
body.light-theme .active-branch-pill {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
}
body.light-theme .active-branch-pill:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.25);
}

body.light-theme .live-clock {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
}
body.light-theme .live-clock:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.25);
}

body.light-theme .header-action-btn {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #475569;
}
body.light-theme .header-action-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.25);
}

.badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 850;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-card), 0 4px 8px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1;
}

/* View Panels and Layout Cards */
.view-panel {
  display: none;
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  height: calc(100vh - 60px);
}

.view-panel.active-view {
  display: block;
}

.glass-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow), inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.08), inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

/* KPI Summary Widgets */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 1300px) {
  .dashboard-kpis {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
  .capital-disabled .dashboard-kpis {
    grid-template-columns: repeat(4, 1fr);
  }
  .role-sales-staff .dashboard-kpis {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .finance-kpis {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }
  .capital-disabled .finance-kpis {
    grid-template-columns: repeat(4, 1fr);
  }
  .kpi-card {
    padding: 12px 14px;
  }
  .kpi-value {
    font-size: 20px;
  }
  .kpi-subvalue {
    font-size: 10px;
  }
  .kpi-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* Tablet / iPad Portrait & Landscape Optimization (577px to 1299px) */
@media (min-width: 577px) and (max-width: 1299px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
  .capital-disabled .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .role-sales-staff .dashboard-kpis {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .kpi-card {
    padding: 12px 16px !important;
  }
  .kpi-value {
    font-size: 18px !important;
  }
  .header-left h1 {
    font-size: 15px !important;
  }
}

/* Phone Mobile Screens Optimization (up to 576px) */
@media (max-width: 576px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .kpi-card {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-height: 85px;
  }
  .kpi-icon-wrapper {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
    opacity: 0.15 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .kpi-value {
    font-size: 15px !important;
  }
  body.lang-km .kpi-value {
    font-size: 15px !important;
  }
  .kpi-subvalue {
    font-size: 9px !important;
  }
  .kpi-details h4 {
    font-size: 9px !important;
    margin-bottom: 4px !important;
    letter-spacing: 0.2px !important;
  }
  .header-left h1 {
    font-size: 13px !important;
  }
  .app-header {
    padding: 0 10px !important;
    gap: 6px !important;
  }
}

.kpi-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--secondary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}
.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 20px var(--border-glow);
  border-color: rgba(99, 102, 241, 0.25);
}

/* Thicker border color designations */
.kpi-card.kpi-capital { border-left-color: var(--warning); }
.kpi-card.kpi-revenue { border-left-color: var(--primary); }
.kpi-card.kpi-deducted { border-left-color: #a855f7; }
.kpi-card.kpi-expense { border-left-color: var(--danger); }
.kpi-card.kpi-profit { border-left-color: #10b981; }
.kpi-card.kpi-capital-balance { border-left-color: #06b6d4; }
.kpi-card.kpi-sales { border-left-color: var(--secondary); }

.kpi-details h4 {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  font-weight: 600;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

/* Color-coding values for Dark Mode (default) */
.kpi-capital .kpi-value { color: #fbbf24; } /* Amber 400 */
.kpi-revenue .kpi-value { color: #818cf8; } /* Indigo 400 */
.kpi-deducted .kpi-value { color: #c084fc; } /* Purple 400 */
.kpi-expense .kpi-value { color: #f87171; } /* Red 400 */
.kpi-profit .kpi-value { color: #34d399; } /* Emerald 400 */
.kpi-capital-balance .kpi-value { color: #22d3ee; } /* Cyan 400 */

/* Light Theme specific contrast overrides */
body.light-theme .kpi-capital .kpi-value { color: #b45309; } /* Amber 700 */
body.light-theme .kpi-revenue .kpi-value { color: #4338ca; } /* Indigo 700 */
body.light-theme .kpi-deducted .kpi-value { color: #7e22ce; } /* Purple 700 */
body.light-theme .kpi-expense .kpi-value { color: #b91c1c; } /* Red 700 */
body.light-theme .kpi-profit .kpi-value { color: #047857; } /* Emerald 700 */
body.light-theme .kpi-capital-balance .kpi-value { color: #0e7490; } /* Cyan 700 */

.kpi-subvalue {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 500;
  opacity: 0.8;
}

.kpi-icon-wrapper {
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
body.light-theme .kpi-icon-wrapper {
  background: rgba(0, 0, 0, 0.03);
}
.kpi-card:hover .kpi-icon-wrapper {
  transform: scale(1.1);
  background: rgba(99, 102, 241, 0.12);
}

/* Split Grids */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}
.settings-split-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  align-items: stretch !important;
  width: 100% !important;
}
.settings-split-grid > .glass-card:first-of-type {
  flex: 1.2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  margin-bottom: 20px !important;
}
.settings-split-grid > .glass-card:last-of-type {
  flex: 0.8 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  margin-bottom: 20px !important;
}
.settings-split-grid > .glass-card > .table-responsive {
  flex: 1 1 auto !important;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .settings-split-grid {
    flex-direction: column !important;
  }
  .settings-split-grid > .glass-card:first-of-type,
  .settings-split-grid > .glass-card:last-of-type {
    flex: 1 !important;
    width: 100% !important;
  }
}

/* POS Screen */
.pos-workspace {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
  height: 100%;
}

@media (max-width: 1100px) {
  .pos-workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
    gap: 16px;
  }
}

.pos-catalog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.pos-search-bar {
  display: flex;
  gap: 10px;
}

.pos-categories-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
}

.category-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab.active, .category-tab:hover {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  height: calc(100vh - 200px);
  padding-right: 4px;
}

/* Product Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  min-height: 205px;
  height: auto;
  box-sizing: border-box;
}
.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.05) 0%, transparent 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
}
.product-card:hover::after {
  left: 125%;
}
.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 0 15px rgba(99, 102, 241, 0.1);
}

.product-image-container {
  width: 100%;
  height: 110px;
  min-height: 110px;
  max-height: 110px;
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
body.light-theme .product-image-container {
  border: 1px solid rgba(99, 102, 241, 0.06);
}

.product-image-container img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image-container img {
  transform: scale(1.08);
}
.product-fallback-avatar span {
  transition: transform 0.3s ease;
}
.product-card:hover .product-fallback-avatar span {
  transform: translateY(-4px) scale(1.1) rotate(5deg) !important;
}

.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(245, 158, 11, 0.9);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.product-card-badge.badge-out-of-stock {
  background: rgba(239, 68, 68, 0.9);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.product-card h4 {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 32px;
  height: auto;
  max-height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-primary);
  flex-shrink: 0;
  margin: 0;
  word-break: break-word;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 2px;
  gap: 4px;
  width: 100%;
}

.product-price {
  font-weight: 800;
  color: #10b981;
  font-size: 13.5px;
  line-height: 1.2;
  white-space: nowrap;
}
body.light-theme .product-price {
  color: #059669;
}

.product-stock-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(100, 116, 139, 0.08);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.product-stock-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* POS Cart */
.pos-billing-sidebar {
  height: 100%;
}

.cart-card {
  border-radius: var(--radius-md);
}

.cart-header {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-badge {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 460px);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 70px 60px 24px;
  gap: 8px;
  padding: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  align-items: center;
}

.cart-item h5 {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.qty-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

.cart-item-total {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.cart-summary {
  padding: 14px;
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.1);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.summary-row.total-row {
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
  color: var(--text-primary);
  font-weight: 800;
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-control {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 9px 13px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease-in-out;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
input[type="date"] {
  color-scheme: dark; /* Default dark mode date picker & icon color */
}
body.light-theme input[type="date"] {
  color-scheme: light; /* Light mode date picker & icon color */
}
.form-control::-webkit-calendar-picker-indicator,
.premium-select::-webkit-calendar-picker-indicator {
  filter: none !important; /* Let color-scheme determine the color (white in dark, black in light) */
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.form-control::-webkit-calendar-picker-indicator:hover,
.premium-select::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Form Select Options Theme Compatibility */
select {
  color-scheme: dark;
}

[data-theme="light"] select,
body.light-theme select {
  color-scheme: light;
}

select option {
  background-color: var(--bg-sidebar, #1e293b) !important;
  color: var(--text-primary, #f8fafc) !important;
}

[data-theme="light"] select option,
body.light-theme select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
}

/* Button Classes */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #2563eb);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #475569);
  color: white;
  box-shadow: 0 4px 14px rgba(100, 116, 139, 0.2);
}
.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-hover), #334155);
  box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #ef4444);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-hover), #dc2626);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #34d399);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
  background: linear-gradient(135deg, var(--success-hover), #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  background-color: var(--border-color);
  border-color: rgba(99, 102, 241, 0.2);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active-modal {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 16px 16px 52px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.modal-header::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
}

.modal-body {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Table layout styling */
.table-actions-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-header h2,
.table-header h3,
.table-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

/* Card Form Padding & Spacing */
.glass-card > form,
.card > form,
.panel-card > form,
#branch-form-card form {
  padding: 22px 26px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.pos-table th {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.pos-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.pos-table tbody tr {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.pos-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.16) !important;
  box-shadow: inset 4px 0 0 0 #818cf8 !important;
}

.pos-table tbody tr:hover td {
  color: #ffffff !important;
}

.pos-table tbody tr.selected-row,
.pos-table tbody tr.active-row {
  background: rgba(99, 102, 241, 0.28) !important;
  box-shadow: inset 5px 0 0 0 #a5b4fc !important;
}

.pos-table tbody tr.selected-row td,
.pos-table tbody tr.active-row td {
  color: #ffffff !important;
  font-weight: 750 !important;
}

/* Adjustments Table Stock Matrix colors */
.branch-cell-header {
  font-size: 10px;
  text-align: center;
}
.branch-stock-val {
  font-weight: 700;
  text-align: center;
}

/* Low Stock Alerts styles */
.low-stock-panel {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.low-stock-list h4 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}
.low-stock-list div {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Login UI structure overlay background */
.login-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20000;
  background: var(--bg-card); /* Facebook solid card background */
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
.login-overlay.active-login {
  display: flex;
}
.login-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 960px;
  gap: 60px;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}
.login-info-panel {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.login-card-wrapper {
  flex: 0.9;
  display: flex;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 390px;
  padding: 30px;
  background: var(--bg-sidebar); /* Solid background, no glass filters to prevent CPU repaints! */
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  box-sizing: border-box;
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    gap: 40px;
    padding: 10px;
  }
  .login-info-panel {
    text-align: center;
    align-items: center;
  }
  .login-info-panel h2 {
    font-size: 18px !important;
  }
  .login-info-panel p {
    font-size: 12px !important;
  }
  .login-info-panel div {
    display: none !important; /* Hide image on mobile for speed */
  }
}

.login-error-container {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

/* Badge classes */
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--primary); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Payments and checkout modals drawers styles */
.checkout-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.checkout-method-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.checkout-method-card.active, .checkout-method-card:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.04);
}

.checkout-method-card h5 {
  font-size: 10px;
  margin-top: 4px;
  color: var(--text-secondary);
}

.khqr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

/* CRM Follow-Up Kanban styles */
.followup-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.f-metric-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.f-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.f-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--secondary);
}

#f-card-today::before { background: linear-gradient(90deg, var(--danger), #f87171); }
#f-card-pending::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
#f-card-completed::before { background: linear-gradient(90deg, var(--success), #34d399); }

#f-card-today { border-color: rgba(239, 68, 68, 0.15); }
#f-card-pending { border-color: rgba(245, 158, 11, 0.15); }
#f-card-completed { border-color: rgba(16, 185, 129, 0.15); }

.f-metric-card .val {
  font-size: 26px;
  font-weight: 850;
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1;
}
#f-card-today .val { color: var(--danger); }
#f-card-pending .val { color: var(--warning); }
#f-card-completed .val { color: var(--success); }

.f-metric-card h4 {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
}

.followup-kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  height: calc(100vh - 240px);
  align-items: stretch;
}

@media (max-width: 900px) {
  .followup-kanban-board {
    grid-template-columns: 1fr;
    height: auto;
    gap: 16px;
  }
}

.kanban-col {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(8px);
}

.kanban-col .col-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
  border-left: 4px solid var(--secondary);
  padding-left: 10px;
}

.col-title h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.col-count-badge {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.kanban-cards-area {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

/* Custom scrollbar for cards area */
.kanban-cards-area::-webkit-scrollbar {
  width: 5px;
}
.kanban-cards-area::-webkit-scrollbar-track {
  background: transparent;
}
.kanban-cards-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.kanban-cards-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.light-theme .kanban-cards-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
}

.kanban-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

/* Kanban Cards Status-specific highlight left borders */
.kanban-card.card-pending {
  border-left: 3.5px solid var(--warning);
}
.kanban-card.card-completed {
  border-left: 3.5px solid var(--success);
}
/* Today or overdue cards in active action state */
.kanban-col:first-child .kanban-card.card-pending {
  border-left: 3.5px solid var(--danger);
  animation: card-alert-pulse 2s infinite alternate;
}

@keyframes card-alert-pulse {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.1); }
  100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.2); }
}

.kanban-card:hover {
  transform: translateY(-3px) scale(1.01);
}

.kanban-card.card-pending:hover {
  border-color: var(--warning);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.08);
}
.kanban-card.card-completed:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08);
}
.kanban-col:first-child .kanban-card.card-pending:hover {
  border-color: var(--danger);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.12);
}

.kanban-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.kanban-card .day-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
}
.day-badge.badge-3 { background: #3b82f6; } /* Day 3 */
.day-badge.badge-5 { background: #8b5cf6; } /* Day 5 */
.day-badge.badge-8 { background: #f59e0b; } /* Day 8 */

.kanban-card .source-badge {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.kanban-card .cust-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2px 0 0 0;
}

.kanban-card .cust-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  margin-top: -2px;
}

.kanban-card .cust-phone .phone-icon {
  opacity: 0.8;
}

.kanban-card .invoice-info {
  font-size: 10.5px;
  color: var(--text-muted);
}

.kanban-card .card-notes {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.015);
  border-left: 2px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 4px;
  font-style: italic;
  line-height: 1.4;
  margin-top: 4px;
}

.kanban-card .card-meta {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 8px;
  margin-top: 4px;
}

.kanban-card .card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.02);
  padding-top: 10px;
}

.kanban-card .action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  padding: 0;
  text-decoration: none;
}

.kanban-card .action-btn svg {
  stroke: currentColor;
}

.kanban-card .btn-card-call {
  color: #10b981;
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
}
.kanban-card .btn-card-call:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.kanban-card .btn-card-complete {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.15);
}
.kanban-card .btn-card-complete:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.kanban-card .btn-card-details:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* Enriched Glassmorphic Kanban Card Styling */
.kanban-cards-area .kanban-card {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 10px;
  gap: 5px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  display: flex;
  flex-direction: column;
}

body.light-theme .kanban-cards-area .kanban-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

/* Card status-specific glassmorphic background colors */
.kanban-cards-area .kanban-card.card-completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.15);
}
body.light-theme .kanban-cards-area .kanban-card.card-completed {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.15);
}

.kanban-cards-area .kanban-card.card-pending {
  background: rgba(245, 158, 11, 0.03);
  border-color: rgba(245, 158, 11, 0.12);
}
body.light-theme .kanban-cards-area .kanban-card.card-pending {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.12);
}

.kanban-col:first-child .kanban-cards-area .kanban-card.card-pending {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.15);
}
body.light-theme .kanban-col:first-child .kanban-cards-area .kanban-card.card-pending {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.15);
}

/* Hover updates to match status colors */
.kanban-cards-area .kanban-card.card-completed:hover {
  background: rgba(16, 185, 129, 0.08);
}
body.light-theme .kanban-cards-area .kanban-card.card-completed:hover {
  background: rgba(16, 185, 129, 0.1);
}
.kanban-cards-area .kanban-card.card-pending:hover {
  background: rgba(245, 158, 11, 0.06);
}
body.light-theme .kanban-cards-area .kanban-card.card-pending:hover {
  background: rgba(245, 158, 11, 0.08);
}
.kanban-col:first-child .kanban-cards-area .kanban-card.card-pending:hover {
  background: rgba(239, 68, 68, 0.08);
}
body.light-theme .kanban-col:first-child .kanban-cards-area .kanban-card.card-pending:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Card Hover glow animations */
.kanban-cards-area .kanban-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: rgba(30, 41, 59, 0.6);
}
body.light-theme .kanban-cards-area .kanban-card:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Hover border and glow shadows for specific columns */
.kanban-cards-area .kanban-card.card-pending:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}
.kanban-cards-area .kanban-card.card-completed:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}
.kanban-col:first-child .kanban-cards-area .kanban-card.card-pending:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.16);
}

/* Day Badges custom styles for premium visual look */
.day-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
}
.day-badge.badge-3 { background: rgba(59, 130, 246, 0.15) !important; color: #60a5fa !important; border: 1px solid rgba(59, 130, 246, 0.25); }
.day-badge.badge-5 { background: rgba(139, 92, 246, 0.15) !important; color: #a78bfa !important; border: 1px solid rgba(139, 92, 246, 0.25); }
.day-badge.badge-7 { background: rgba(6, 182, 212, 0.15) !important; color: #22d3ee !important; border: 1px solid rgba(6, 182, 212, 0.25); }
.day-badge.badge-8 { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(245, 158, 11, 0.25); }
.day-badge.badge-22 { background: rgba(236, 72, 153, 0.15) !important; color: #f472b6 !important; border: 1px solid rgba(236, 72, 153, 0.25); }
.day-badge.badge-37 { background: rgba(16, 185, 129, 0.15) !important; color: #34d399 !important; border: 1px solid rgba(16, 185, 129, 0.25); }
.day-badge.badge-52 { background: rgba(99, 102, 241, 0.15) !important; color: #818cf8 !important; border: 1px solid rgba(99, 102, 241, 0.25); }
.day-badge.badge-82 { background: rgba(20, 184, 166, 0.15) !important; color: #2dd4bf !important; border: 1px solid rgba(20, 184, 166, 0.25); }
.day-badge.badge-112 { background: rgba(244, 63, 94, 0.15) !important; color: #fb7185 !important; border: 1px solid rgba(244, 63, 94, 0.25); }
.day-badge.badge-142 { background: rgba(168, 85, 247, 0.15) !important; color: #c084fc !important; border: 1px solid rgba(168, 85, 247, 0.25); }

/* In Light Theme override colors for better contrast */
body.light-theme .day-badge.badge-3 { background: rgba(59, 130, 246, 0.1) !important; color: #1d4ed8 !important; border-color: rgba(59, 130, 246, 0.15); }
body.light-theme .day-badge.badge-5 { background: rgba(139, 92, 246, 0.1) !important; color: #6d28d9 !important; border-color: rgba(139, 92, 246, 0.15); }
body.light-theme .day-badge.badge-7 { background: rgba(6, 182, 212, 0.1) !important; color: #0e7490 !important; border-color: rgba(6, 182, 212, 0.15); }
body.light-theme .day-badge.badge-8 { background: rgba(245, 158, 11, 0.1) !important; color: #b45309 !important; border-color: rgba(245, 158, 11, 0.15); }
body.light-theme .day-badge.badge-22 { background: rgba(236, 72, 153, 0.1) !important; color: #be185d !important; border-color: rgba(236, 72, 153, 0.15); }
body.light-theme .day-badge.badge-37 { background: rgba(16, 185, 129, 0.1) !important; color: #047857 !important; border-color: rgba(16, 185, 129, 0.15); }
body.light-theme .day-badge.badge-52 { background: rgba(99, 102, 241, 0.1) !important; color: #4338ca !important; border-color: rgba(99, 102, 241, 0.15); }
body.light-theme .day-badge.badge-82 { background: rgba(20, 184, 166, 0.1) !important; color: #0f766e !important; border-color: rgba(20, 184, 166, 0.15); }
body.light-theme .day-badge.badge-112 { background: rgba(244, 63, 94, 0.1) !important; color: #be123c !important; border-color: rgba(244, 63, 94, 0.15); }
body.light-theme .day-badge.badge-142 { background: rgba(168, 85, 247, 0.1) !important; color: #7e22ce !important; border-color: rgba(168, 85, 247, 0.15); }

/* Status Badge styles for Follow-up Cards */
.kanban-card .status-badge {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.kanban-card .status-badge.status-completed {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.kanban-card .status-badge.status-today {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.kanban-card .status-badge.status-overdue {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.kanban-card .status-badge.status-future {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

body.light-theme .kanban-card .status-badge.status-completed {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.15);
}
body.light-theme .kanban-card .status-badge.status-today {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.15);
}
body.light-theme .kanban-card .status-badge.status-overdue {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.15);
}
body.light-theme .kanban-card .status-badge.status-future {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.15);
}

/* Card Layout structures */
.kanban-card .card-profile-section {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kanban-card .cust-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
body.light-theme .kanban-card .cust-avatar {
  border-color: #fff;
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.1);
}
.kanban-card .cust-info-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-grow: 1;
}
.kanban-card .cust-name {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.1px;
}
.kanban-card .cust-contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 1px;
}
.kanban-card .fb-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.kanban-card .fb-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}
body.light-theme .kanban-card .fb-link {
  color: #2563eb;
}
body.light-theme .kanban-card .fb-link:hover {
  color: #1d4ed8;
}

/* Compact metadata row styling */
.kanban-card .cust-metadata-line {
  font-size: 10.5px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 3px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
body.light-theme .kanban-card .cust-metadata-line {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.03);
}

/* Purchased products item block with premium pill design */
.kanban-card .card-products-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}
.kanban-card .prod-pill {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
  line-height: 1.2;
  white-space: nowrap;
}
.kanban-card .prod-pill .prod-qty {
  margin-left: 3px;
  color: var(--primary);
  font-weight: 700;
}
body.light-theme .kanban-card .prod-pill {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.1);
}

/* Kanban Columns Beautiful Design Enhancements */
.followup-kanban-board .kanban-col {
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.followup-kanban-board .kanban-col:nth-child(1) {
  border-top: 3px solid var(--danger) !important;
  background: rgba(239, 68, 68, 0.01) !important;
}
.followup-kanban-board .kanban-col:nth-child(2) {
  border-top: 3px solid var(--warning) !important;
  background: rgba(245, 158, 11, 0.005) !important;
}
.followup-kanban-board .kanban-col:nth-child(3) {
  border-top: 3px solid var(--success) !important;
  background: rgba(16, 185, 129, 0.01) !important;
}

.followup-kanban-board .kanban-col:nth-child(1) .col-title {
  border-left: 4px solid var(--danger) !important;
}
.followup-kanban-board .kanban-col:nth-child(2) .col-title {
  border-left: 4px solid var(--warning) !important;
}
.followup-kanban-board .kanban-col:nth-child(3) .col-title {
  border-left: 4px solid var(--success) !important;
}

.followup-kanban-board .kanban-col:nth-child(1) .col-count-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}
.followup-kanban-board .kanban-col:nth-child(2) .col-count-badge {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
}
.followup-kanban-board .kanban-col:nth-child(3) .col-count-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

/* Empty column state */
.kanban-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
  text-align: center;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.005);
}

.kanban-empty-state .empty-icon {
  font-size: 26px;
  margin-bottom: 6px;
  opacity: 0.6;
}

.kanban-empty-state p {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Quick Note Chips Layout inside Modal */
.quick-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.quick-note-chip {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  user-select: none;
}

.quick-note-chip:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}


/* Leaderboard podiums details styles */
.podium-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  height: 160px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 2px;
  margin-top: 10px;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 80px;
  background: linear-gradient(to top, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.05));
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  transition: height 0.3s;
}

.podium-step .avatar {
  font-size: 24px;
  margin-bottom: 4px;
}

.podium-step .name {
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 70px;
}

.podium-step .val {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.podium-step .rank-badge {
  color: white;
  font-size: 11px;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -10px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.podium-1st { height: 130px; border-color: var(--warning); }
.podium-1st .rank-badge { background: #f59e0b; }
.podium-2nd { height: 100px; border-color: var(--text-secondary); }
.podium-2nd .rank-badge { background: #94a3b8; }
.podium-3rd { height: 80px; border-color: #b45309; }
.podium-3rd .rank-badge { background: #b45309; }

/* Thermal print receipts styling */
.receipt-paper {
  background: white;
  color: black;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.receipt-divider {
  border-bottom: 1.5px dashed #000;
  margin: 6px 0;
}

.receipt-paper h3 {
  font-family: inherit;
  font-weight: bold;
  text-align: center;
  font-size: 14px;
  margin-bottom: 4px;
}

/* Image input styling zones */
.image-upload-wrapper {
  width: 100%;
}
.image-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--input-bg);
}
.image-upload-zone:hover {
  border-color: var(--secondary);
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}
.upload-placeholder .upload-icon {
  font-size: 22px;
}
.remove-image-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--danger);
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
}

.image-upload-zone img {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Developer Docs Styles */
.dev-doc-wrapper {
  padding: 10px;
}
.dev-doc-wrapper h4 {
  font-weight: 750;
  margin-top: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.api-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
}

.api-card pre {
  margin-top: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.2);
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
}

/* Print Overrides CSS media */
@media print {
  /* Default: receipt printing */
  body * {
    visibility: hidden;
  }
  #receipt-print-area, #receipt-print-area * {
    visibility: visible;
  }
  #receipt-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  /* If printing report */
  body.printing-report-active * {
    visibility: hidden;
  }
  body.printing-report-active #report-content-area,
  body.printing-report-active #report-content-area * {
    visibility: visible;
  }
  body.printing-report-active #report-content-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
  }
  /* In print mode, force tables to have visible black text and light background */
  body.printing-report-active #report-content-area table,
  body.printing-report-active #report-content-area table * {
    color: #000000 !important;
    background: transparent !important;
    border-color: #cccccc !important;
  }
  body.printing-report-active #report-content-area th {
    background: #f0f0f0 !important;
    font-weight: bold !important;
  }
}

/* Dashboard closing summary card styles */
.closing-summary-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  padding: 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}
.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* PDF layout overrides */
.pdf-header-only {
  display: none !important;
}

.pdf-generation-active .pdf-header-only {
  display: block !important;
}

/* Hide interactive controls, buttons, inputs, and search bars in PDF */
.pdf-generation-active .inner-report-filters,
.pdf-generation-active .btn,
.pdf-generation-active button,
.pdf-generation-active .no-pdf,
.pdf-generation-active .btn-void-tx,
.pdf-generation-active .no-print,
.pdf-generation-active input,
.pdf-generation-active select {
  display: none !important;
}

/* Container styling during PDF generation */
.pdf-generation-active {
  box-shadow: none !important;
  border: none !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  padding: 16px !important;
  font-family: 'Kantumruy Pro', sans-serif !important;
}

/* All cards in PDF mode: crisp solid white background with clean subtle border */
.pdf-generation-active .glass-card,
.pdf-generation-active .card,
.pdf-generation-active .panel-card,
.pdf-generation-active .dashboard-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
  margin-bottom: 16px !important;
}

/* Typography in PDF mode */
.pdf-generation-active h1,
.pdf-generation-active h2,
.pdf-generation-active h3,
.pdf-generation-active h4,
.pdf-generation-active h5,
.pdf-generation-active h6 {
  color: #0f172a !important;
  font-weight: 750 !important;
}

.pdf-generation-active p,
.pdf-generation-active span,
.pdf-generation-active div,
.pdf-generation-active td {
  text-shadow: none !important;
  box-shadow: none !important;
}

/* Closing Summary Dashboard Grid in PDF */
.pdf-generation-active .closing-summary-dashboard {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

.pdf-generation-active .closing-summary-dashboard .summary-card {
  border-radius: 8px !important;
  padding: 12px 14px !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Summary Card 1: Total Sales (Blue) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(1) {
  background: #eff6ff !important;
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  border-left: 5px solid #2563eb !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(1) div:nth-child(2) {
  color: #1e40af !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(1) div:nth-child(3) {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}

/* Summary Card 2: Paid Collected (Green) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(2) {
  background: #f0fdf4 !important;
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-left: 5px solid #16a34a !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(2) div:nth-child(2) {
  color: #166534 !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(2) div:nth-child(3) {
  color: #15803d !important;
  font-weight: 800 !important;
}

/* Summary Card 3: Total Debt (Amber) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(3) {
  background: #fffbeb !important;
  background-color: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-left: 5px solid #d97706 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(3) div:nth-child(2) {
  color: #92400e !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(3) div:nth-child(3) {
  color: #b45309 !important;
  font-weight: 800 !important;
}

/* Summary Card 4: Total Expenses (Red) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(4) {
  background: #fef2f2 !important;
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-left: 5px solid #dc2626 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(4) div:nth-child(2) {
  color: #991b1b !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(4) div:nth-child(3) {
  color: #b91c1c !important;
  font-weight: 800 !important;
}

/* Summary Card 5: Net Cash Position (Teal) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(5) {
  background: #f0fdfa !important;
  background-color: #f0fdfa !important;
  border: 1px solid #99f6e4 !important;
  border-left: 5px solid #0d9488 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(5) div:nth-child(2) {
  color: #115e59 !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(5) div:nth-child(3) {
  color: #0f766e !important;
  font-weight: 800 !important;
}

/* Summary Card 6: Net Profit (Purple) */
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(6) {
  background: #f5f3ff !important;
  background-color: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  border-left: 5px solid #7c3aed !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(6) div:nth-child(2) {
  color: #5b21b6 !important;
  font-weight: 700 !important;
}
.pdf-generation-active .closing-summary-dashboard .summary-card:nth-child(6) div:nth-child(3) {
  color: #6d28d9 !important;
  font-weight: 800 !important;
}

/* Subtitle and count details in summary cards */
.pdf-generation-active .closing-summary-dashboard .summary-card div:nth-child(4),
.pdf-generation-active .closing-summary-dashboard .summary-card div:nth-child(5) {
  color: #64748b !important;
}

/* KPI Grid cards in other reports (Inventory Valuation, etc.) */
.pdf-generation-active .kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}
.pdf-generation-active .kpi-grid .glass-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  margin-bottom: 0 !important;
}

/* Professional Clean Tables in PDF */
.pdf-generation-active table,
.pdf-generation-active .pos-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 6px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.pdf-generation-active th {
  background: #f1f5f9 !important;
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 750 !important;
  border: 1px solid #cbd5e1 !important;
  border-bottom: 2px solid #94a3b8 !important;
  padding: 7px 9px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.2px !important;
}

.pdf-generation-active td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  padding: 6px 9px !important;
  font-size: 10.5px !important;
}

.pdf-generation-active tbody tr:nth-child(even) td {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
}

.pdf-generation-active tr {
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

/* Clear Colored Financial Indicators inside Table Cells */
.pdf-generation-active td strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.pdf-generation-active td[style*="danger"],
.pdf-generation-active td span[style*="danger"],
.pdf-generation-active td[style*="#ef4444"],
.pdf-generation-active td span[style*="#ef4444"],
.pdf-generation-active .text-danger {
  color: #dc2626 !important;
  font-weight: 750 !important;
}

.pdf-generation-active td[style*="success"],
.pdf-generation-active td span[style*="success"],
.pdf-generation-active td[style*="#10b981"],
.pdf-generation-active td span[style*="#10b981"],
.pdf-generation-active .text-success {
  color: #16a34a !important;
  font-weight: 750 !important;
}

.pdf-generation-active td[style*="primary"],
.pdf-generation-active td span[style*="primary"],
.pdf-generation-active td[style*="#3b82f6"],
.pdf-generation-active td span[style*="#3b82f6"],
.pdf-generation-active .text-primary {
  color: #2563eb !important;
  font-weight: 750 !important;
}

.pdf-generation-active td[style*="warning"],
.pdf-generation-active td span[style*="warning"],
.pdf-generation-active td[style*="#f59e0b"],
.pdf-generation-active td span[style*="#f59e0b"] {
  color: #d97706 !important;
  font-weight: 750 !important;
}

.pdf-generation-active td[style*="--text-muted"],
.pdf-generation-active td span[style*="--text-muted"] {
  color: #64748b !important;
}

/* Badges in PDF */
.pdf-generation-active .badge,
.pdf-generation-active .status-badge {
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

.pdf-generation-active .badge-success,
.pdf-generation-active .badge-ontime {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}

.pdf-generation-active .badge-danger,
.pdf-generation-active .badge-late {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

.pdf-generation-active .badge-warning {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.pdf-generation-active .badge-info,
.pdf-generation-active .badge-primary {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd !important;
}

/* GEDA Advanced Updates Styling (Khmer Font Scale, VIP Badges, Cart Enhancements, Audit Logs) */

/* Khmer Typography & Spacing Optimization (Clean Non-Compounding Sizing & Layout) */
body.lang-km {
  font-size: 14px;
  line-height: 1.6;
}

/* Base element scaling rules (terminal or container level only, no compounding) */
body.lang-km h1 { font-size: 24px; }
body.lang-km h2 { font-size: 20px; }
body.lang-km h3 { font-size: 16px; }
body.lang-km h4 { font-size: 14px; }
body.lang-km h5 { font-size: 12.5px; }
body.lang-km h6 { font-size: 11px; }
body.lang-km label {
  font-size: 12px;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

/* Input boxes, selectors, and textareas - added padding to prevent vertical clipping */
body.lang-km .form-control {
  font-size: 13.5px;
  padding: 10px 14px;
  min-height: 42px;
  line-height: 1.5;
}
body.lang-km .form-group {
  margin-bottom: 14px;
}

/* Buttons and interaction controls */
body.lang-km .btn {
  font-size: 14px;
  padding: 11px 22px;
  min-height: 44px;
  line-height: 1.4;
}
body.lang-km .btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  min-height: 32px;
}

/* Sidebar navigation and metadata */
body.lang-km .logo-text { font-size: 18px; }
body.lang-km .nav-item {
  font-size: 14px;
  padding: 12px 14px;
}
body.lang-km .role-indicator-badge {
  font-size: 9px;
  padding: 2px 7px;
}
body.lang-km .theme-toggle-btn {
  font-size: 12px;
  padding: 5px 10px;
}
body.lang-km .sidebar-footer {
  font-size: 11.5px;
}

/* Header widgets */
body.lang-km .active-branch-pill {
  font-size: 12px;
  padding: 5px 12px;
}
body.lang-km .live-clock {
  font-size: 13px;
}

/* KPI Dashboard summary widgets */
body.lang-km .kpi-details h4 { font-size: 12px; }
body.lang-km .kpi-value { font-size: 22px; }
body.lang-km .kpi-subvalue { font-size: 11.5px; }

/* Table contents - prevents text truncation and overlapping */
body.lang-km .pos-table { font-size: 13.5px; }
body.lang-km .pos-table th {
  font-size: 13px;
  padding: 14px 16px;
}
body.lang-km .pos-table td {
  font-size: 13.5px;
  padding: 14px 16px;
  line-height: 1.5;
}

/* Category Selection tab slider */
body.lang-km .category-tab {
  font-size: 13px;
  padding: 8px 16px;
}

/* Product Catalog Cards */
body.lang-km .product-card h4 {
  font-size: 12px;
  min-height: 34px;
  height: auto;
  max-height: 42px;
  line-height: 1.4;
  word-break: break-word;
}
body.lang-km .product-price { font-size: 13.5px; }
body.lang-km .product-stock-text { font-size: 11px; }
body.lang-km .product-card-badge { font-size: 9px; }

/* Shopping Cart */
body.lang-km .cart-header h3 { font-size: 15px; }
body.lang-km .cart-badge { font-size: 11px; }
body.lang-km .cart-item h5 {
  font-size: 12.5px;
  line-height: 1.4;
}
body.lang-km .cart-item-price { font-size: 11.5px; }
body.lang-km .cart-item-total { font-size: 13px; }
body.lang-km .summary-row { font-size: 11.5px; }
body.lang-km .summary-row.total-row { font-size: 13px; }
body.lang-km #cart-discount-percent,
body.lang-km #cart-discount-fixed,
body.lang-km #cart-shipping-fee {
  font-size: 10px;
}

/* CRM Follow-up Kanban & Pipelines */
body.lang-km .kanban-card h5 { font-size: 13.5px; }
body.lang-km .kanban-card .meta { font-size: 11px; }
body.lang-km .col-title h4 { font-size: 13px; }
body.lang-km .col-count-badge { font-size: 10px; }
body.lang-km .f-metric-card .val { font-size: 24px; }
body.lang-km .f-metric-card h4 { font-size: 12px; }

/* Checkout methods & receipt spacing adjustments */
body.lang-km .checkout-method-card h5 { font-size: 11px; }
body.lang-km .receipt-paper {
  font-size: 12px;
  line-height: 1.5;
}
body.lang-km .receipt-paper h3 { font-size: 15px; }

/* System badges */
body.lang-km .badge {
  font-size: 10px;
  padding: 3px 7px;
}
body.lang-km .vip-badge { font-size: 10px; }
body.lang-km .audit-log-badge {
  font-size: 9px;
  padding: 3px 7px;
}

/* Suggest Dropdown search options */
body.lang-km .cart-suggest-item { font-size: 12px; }
body.lang-km .cart-fast-chip {
  font-size: 10.5px;
  padding: 4px 10px;
}

/* Closing reports */
body.lang-km .closing-metric h5 { font-size: 11px; }
body.lang-km .closing-metric div { font-size: 16px; }

/* VIP badge */
.vip-badge {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0b0f19;
  font-weight: 800;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
  margin-left: 6px;
}

/* Customer Retention & Engagement Score */
.engagement-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.engagement-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  flex-grow: 1;
  overflow: hidden;
}
.engagement-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Cart Search & Suggest & Fast Panel styles */
.cart-search-container {
  position: relative;
  margin-bottom: 6px;
}
.cart-search-wrapper {
  display: flex;
  gap: 4px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.cart-search-wrapper input {
  border: none;
  background: transparent;
  flex-grow: 1;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 11px;
}
.cart-search-wrapper input:focus {
  outline: none;
}
.cart-search-wrapper button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 10px;
}
.cart-suggest-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  z-index: 100;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: var(--glass-shadow);
}
.cart-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}
.cart-suggest-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.cart-fast-select {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}
.cart-fast-chip {
  font-size: 9px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.cart-fast-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Sales Closings layout */
.closing-report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}
.closing-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.closing-metric {
  background: rgba(0, 0, 0, 0.15);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.closing-metric h5 {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.closing-metric div {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Security Audit log rows */
.audit-log-badge {
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.badge-login { background: rgba(37, 99, 235, 0.12); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.2); }
.badge-sale { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-stock { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-vat { background: rgba(139, 92, 246, 0.12); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-feature { background: rgba(236, 72, 153, 0.12); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.2); }
.badge-permission { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-closing { background: rgba(6, 182, 212, 0.12); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.2); }

/* Premium Light Theme Overrides & Aesthetics */
body.light-theme .app-header {
  background: var(--bg-card);
  border-bottom-color: var(--border-color);
}

body.light-theme .nav-item {
  color: #334155 !important;
  font-weight: 600;
}

body.light-theme .nav-item svg {
  stroke: #475569 !important;
}

body.light-theme .nav-item.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .nav-item.active svg {
  stroke: #ffffff !important;
}

body.light-theme .nav-item.active::before {
  background: #ffffff !important;
}

body.light-theme .nav-item:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-theme .nav-item:hover svg {
  stroke: #0f172a !important;
}

body.light-theme select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Form Labels & Group Titles in Light Mode */
body.light-theme .form-group label {
  color: #1e293b !important;
  font-weight: 750 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.4px !important;
}

/* Form Controls & Inputs in Light Mode */
body.light-theme .form-control {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .form-control:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
  background-color: #ffffff !important;
}

body.light-theme .form-control::placeholder {
  color: #64748b !important;
  opacity: 0.85;
}

/* Cards & Form Panels in Light Mode */
body.light-theme .glass-card,
body.light-theme .card,
body.light-theme .panel-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
  overflow: hidden !important;
}

body.light-theme .table-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 18px 24px !important;
}

body.light-theme .table-header h2,
body.light-theme .table-header h3,
body.light-theme .table-header h4 {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 16px !important;
}

body.light-theme .glass-card > form,
body.light-theme .card > form,
body.light-theme .panel-card > form,
body.light-theme #branch-form-card form {
  padding: 24px 28px !important;
}

body.light-theme .form-group {
  margin-bottom: 18px !important;
}

body.light-theme .checkout-method-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  margin-bottom: 0 !important;
}

/* Card Titles / Form Headers in Light Mode */
body.light-theme h1, 
body.light-theme h2, 
body.light-theme h3, 
body.light-theme h4,
body.light-theme .card-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* Table Headers & Rows in Light Mode */
body.light-theme .pos-table th {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 750 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

body.light-theme .pos-table td {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .pos-table tbody tr {
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
}

body.light-theme .pos-table tbody tr:hover {
  background-color: #e0e7ff !important; /* Rich Indigo-100 highlight */
  box-shadow: inset 4px 0 0 0 #4f46e5 !important; /* Bold Solid Indigo left accent bar */
}

body.light-theme .pos-table tbody tr:hover td {
  color: #1e1b4b !important; /* Deep Indigo text */
  font-weight: 650 !important;
}

body.light-theme .pos-table tbody tr.selected-row,
body.light-theme .pos-table tbody tr.active-row {
  background-color: #c7d2fe !important; /* Deep Indigo-200 highlight */
  box-shadow: inset 5px 0 0 0 #4338ca !important;
}

body.light-theme .pos-table tbody tr.selected-row td,
body.light-theme .pos-table tbody tr.active-row td {
  color: #1e1b4b !important;
  font-weight: 800 !important;
}

/* Primary Action Buttons in Light Mode */
body.light-theme .btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 750 !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
  border-radius: 10px !important;
  padding: 11px 20px !important;
}

body.light-theme .btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
  transform: translateY(-1px);
}

body.light-theme .user-status-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.04) 0%, rgba(99, 102, 241, 0.02) 100%);
  border-color: rgba(14, 165, 233, 0.08);
}
body.light-theme .role-indicator-badge.admin-role {
  background: rgba(14, 165, 233, 0.06);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.15);
  box-shadow: none;
}

body.light-theme .pos-table tr:hover {
  background: rgba(99, 102, 241, 0.02);
}

body.light-theme .cart-suggest-dropdown {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body.light-theme .cart-suggest-item {
  color: var(--text-secondary);
  border-bottom-color: rgba(99, 102, 241, 0.04);
}

body.light-theme .cart-suggest-item:hover {
  background: rgba(99, 102, 241, 0.04);
  color: var(--primary);
}

body.light-theme .cart-fast-chip {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.1);
  color: var(--text-secondary);
}

body.light-theme .cart-fast-chip:hover {
  background: var(--primary);
  color: #ffffff;
}

body.light-theme .api-card pre {
  background: #f8fafc;
  border: 1px solid rgba(99, 102, 241, 0.06);
  color: #0f172a;
}

body.light-theme .pos-search-bar .btn {
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

body.light-theme .low-stock-panel {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.15);
}

body.light-theme .checkout-method-card {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

body.light-theme .f-metric-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-theme .kanban-col {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.light-theme .kanban-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

body.light-theme .kanban-card .card-notes {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .kanban-card .action-btn {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .quick-note-chip {
  background: #f1f5f9;
}

body.light-theme .quick-note-chip:hover {
  background: rgba(99, 102, 241, 0.08);
}

body.light-theme .closing-metric {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.05);
}

body.light-theme .audit-log-badge {
  border-width: 1px;
}

/* Standalone Billing POS Sidebar CTA Button */
.pos-cta-container {
  margin: 0 4px 22px 4px;
}

.pos-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.pos-cta-btn::after {
  display: none !important;
}

.pos-cta-btn.active::after {
  animation: auto-shine 5s infinite ease-in-out;
}

@keyframes auto-shine {
  0% { left: -150%; opacity: 0; }
  12% { left: 150%; opacity: 1; }
  100% { left: 150%; opacity: 0; }
}

.pos-cta-btn:hover,
body.light-theme .nav-item.pos-cta-btn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #db2777) !important;
  background-size: 300% 300% !important;
  color: #ffffff !important;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35), 0 8px 30px rgba(236, 72, 153, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  animation: liquid-gradient 4s ease infinite !important;
}

.pos-cta-btn:hover::after {
  animation: auto-shine-hover 0.8s ease-out;
}

@keyframes auto-shine-hover {
  0% { left: -150%; opacity: 0; }
  100% { left: 150%; opacity: 1; }
}

.pos-cta-btn:active,
body.light-theme .nav-item.pos-cta-btn:active {
  transform: translateY(1px) scale(0.97) !important;
}

body.light-theme .nav-item.pos-cta-btn.active:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%) !important;
  color: #ffffff !important;
}

.pos-cta-btn svg,
body.light-theme .nav-item.pos-cta-btn svg,
body.light-theme .nav-item.pos-cta-btn.active svg {
  stroke: #ffffff !important;
  fill: rgba(255, 255, 255, 0.05) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-cta-btn:hover svg {
  transform: scale(1.15) rotate(8deg);
}

.btn-shine-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 8px;
  margin-left: auto;
  animation: badge-pulse 2s infinite alternate ease-in-out;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes badge-pulse {
  0% { transform: scale(1); opacity: 0.85; box-shadow: 0 0 0 rgba(255,255,255,0); }
  100% { transform: scale(1.12); opacity: 1; box-shadow: 0 0 8px rgba(255, 255, 255, 0.2); }
}

/* Ensure active/selected styling matches and overrides the light theme general nav rules */
.pos-cta-btn.active,
body.light-theme .nav-item.pos-cta-btn.active {
  background: linear-gradient(-45deg, #4f46e5, #7c3aed, #ec4899, #db2777) !important;
  background-size: 300% 300% !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  animation: liquid-gradient 6s ease infinite, active-neon-pulse 2.5s infinite alternate ease-in-out !important;
}

@keyframes active-neon-pulse {
  0% { box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35), 0 4px 20px rgba(236, 72, 153, 0.25) !important; }
  100% { box-shadow: 0 12px 35px rgba(124, 58, 237, 0.65), 0 12px 40px rgba(236, 72, 153, 0.5) !important; }
}

body.light-theme .pos-cta-btn {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18), 0 4px 16px rgba(236, 72, 153, 0.12);
  border-color: transparent;
}
body.light-theme .nav-item.pos-cta-btn.active {
  box-shadow: 0 0 0 2px var(--primary), 0 6px 16px rgba(99, 102, 241, 0.25) !important;
}

/* Out of Stock product card overlay */
.product-card.out-of-stock {
  opacity: 0.75;
  filter: grayscale(0.3);
}

.product-card.out-of-stock:hover {
  transform: none !important; /* Disable lift animation */
  box-shadow: none !important;
}

.out-of-stock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.82); /* Dark semi-transparent overlay */
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  z-index: 2;
  transition: all 0.25s ease;
}

.out-of-stock-overlay span {
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
}

.product-card-badge.badge-out-of-stock {
  background: linear-gradient(135deg, var(--danger), #f87171);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  z-index: 10;
}

body.light-theme .out-of-stock-overlay {
  background: rgba(255, 255, 255, 0.82); /* Light semi-transparent overlay */
}

/* Premium Redesigned Discount Panel */
.cart-discount-box {
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  margin: 6px 0;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.light-theme .cart-discount-box {
  background: rgba(99, 102, 241, 0.03);
  box-shadow: inset 0 1px 2px rgba(99, 102, 241, 0.02);
}

.cart-discount-box:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.discount-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.discount-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.discount-title span {
  font-size: 11px;
}

.discount-val-badge {
  background: rgba(245, 158, 11, 0.15); /* amber tint */
  color: #f59e0b; /* amber text */
  padding: 2px 6px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.08);
  transition: all 0.2s ease;
}

.light-theme .discount-val-badge {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.15);
}

.discount-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.discount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.discount-input-wrapper input {
  padding: 4px 24px 4px 8px !important;
  font-size: 11px !important;
  height: 30px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-card) !important;
  text-align: right !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  width: 100% !important;
  transition: all 0.2s ease-in-out !important;
  box-sizing: border-box !important;
}

.discount-input-wrapper input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.discount-unit-addon {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.discount-input-wrapper input:focus + .discount-unit-addon {
  color: var(--primary);
}

/* Preset buttons styling */
.discount-presets-container {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}

.discount-presets-list {
  display: flex;
  gap: 4px;
  flex-grow: 1;
}

.discount-preset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.discount-preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.discount-preset-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.discount-clear-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.discount-clear-btn:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

/* Custom starting capital input inside KPI Card */
.kpi-input {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px dashed var(--border-color) !important;
  color: var(--text-primary) !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  width: 100% !important;
  outline: none !important;
  padding: 0 4px !important;
  box-sizing: border-box !important;
  transition: all 0.2s !important;
  margin: 0 !important;
  height: auto !important;
}

.kpi-input::-webkit-outer-spin-button,
.kpi-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.kpi-input[type=number] {
  -moz-appearance: textfield;
}

.kpi-input:hover {
  border-bottom-color: var(--text-muted) !important;
}

.kpi-input:focus {
  border-bottom-color: var(--primary) !important;
}

/* Premium Designed Shopping Cart Summary Card */
.checkout-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.light-theme .checkout-summary-card {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
}

body.lang-km .item-label {
  font-size: 11.5px;
}

.item-icon {
  font-size: 12px;
  opacity: 0.9;
}

.item-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Shipping Input Styling */
.item-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 70px;
}

.item-input-wrapper input {
  width: 100% !important;
  height: 24px !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-align: right !important;
  padding: 2px 6px 2px 14px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.item-input-wrapper input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

.input-currency {
  position: absolute;
  left: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.item-input-wrapper input:focus ~ .input-currency {
  color: var(--primary);
}

.cart-total-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .cart-total-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-color: rgba(99, 102, 241, 0.12);
}

.total-label {
  font-size: 11px;
  font-weight: 850;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-values {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.total-usd {
  font-size: 18px;
  font-weight: 850;
  color: #10b981; /* Premium Emerald green for cash due display */
  letter-spacing: -0.5px;
}

body.light-theme .total-usd {
  color: #059669;
}

.total-riel {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 700;
}

/* CRM Auto Follow-Up Journey Roadmap Visualizer Styles */
.roadmap-timeline-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

@media (max-width: 1400px) {
  .roadmap-timeline-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

.timeline-node {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .timeline-node {
  background: rgba(99, 102, 241, 0.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.timeline-node:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.15);
}

body.light-theme .timeline-node:hover {
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.15);
}

.node-day {
  font-size: 14px;
  font-weight: 850;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  letter-spacing: -0.3px;
}

body.light-theme .node-day {
  background: rgba(0, 0, 0, 0.05);
}

.node-level {
  font-size: 11px;
  font-weight: 750;
  color: var(--text-primary);
  line-height: 1.3;
}

.node-action-list {
  font-size: 9.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.4;
  margin-top: 2px;
}

.node-badge {
  font-size: 9px;
  font-weight: 750;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: auto;
}

.badge-new { background: rgba(99, 102, 241, 0.12); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
.badge-active { background: rgba(139, 92, 246, 0.12); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-repeat { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-loyal { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-lifetime { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }

body.light-theme .badge-new { background: rgba(99, 102, 241, 0.06); color: #4f46e5; border-color: rgba(99, 102, 241, 0.15); }
body.light-theme .badge-active { background: rgba(139, 92, 246, 0.06); color: #7c3aed; border-color: rgba(139, 92, 246, 0.15); }
body.light-theme .badge-repeat { background: rgba(217, 119, 6, 0.06); color: #d97706; border-color: rgba(217, 119, 6, 0.15); }
body.light-theme .badge-loyal { background: rgba(5, 150, 105, 0.06); color: #059669; border-color: rgba(5, 150, 105, 0.15); }
body.light-theme .badge-lifetime { background: rgba(220, 38, 38, 0.06); color: #dc2626; border-color: rgba(220, 38, 38, 0.15); }

/* Flowchart Footer Layout */
.roadmap-footer-flowcharts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px dashed var(--border-color);
  padding-top: 16px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .roadmap-footer-flowcharts {
    grid-template-columns: 1fr;
  }
}

.flow-section {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

body.light-theme .flow-section {
  background: rgba(0, 0, 0, 0.005);
}

.alert-flow-path {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  font-size: 10px;
  font-weight: 750;
}

.flow-step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--text-primary);
}

body.light-theme .flow-step {
  background: #ffffff;
}

.flow-step span {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 9px;
  display: block;
}

.flow-arrow {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11px;
}

.journey-flow-path {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
}

.journey-status {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
}

.status-new { background: rgba(99, 102, 241, 0.08); color: #818cf8; border-color: rgba(99, 102, 241, 0.15); }
.status-active { background: rgba(139, 92, 246, 0.08); color: #a78bfa; border-color: rgba(139, 92, 246, 0.15); }
.status-engaged { background: rgba(236, 72, 153, 0.08); color: #f472b6; border-color: rgba(236, 72, 153, 0.15); }
.status-repeat { background: rgba(245, 158, 11, 0.08); color: #fbbf24; border-color: rgba(245, 158, 11, 0.15); }
.status-loyal { background: rgba(16, 185, 129, 0.08); color: #34d399; border-color: rgba(16, 185, 129, 0.15); }
.status-lifetime { background: rgba(239, 68, 68, 0.08); color: #fca5a5; border-color: rgba(239, 68, 68, 0.15); }

body.light-theme .status-new { background: rgba(99, 102, 241, 0.05); color: #4f46e5; border-color: rgba(99, 102, 241, 0.12); }
body.light-theme .status-active { background: rgba(139, 92, 246, 0.05); color: #7c3aed; border-color: rgba(139, 92, 246, 0.12); }
body.light-theme .status-engaged { background: rgba(236, 72, 153, 0.05); color: #db2777; border-color: rgba(236, 72, 153, 0.12); }
body.light-theme .status-repeat { background: rgba(217, 119, 6, 0.05); color: #d97706; border-color: rgba(217, 119, 6, 0.12); }
body.light-theme .status-loyal { background: rgba(5, 150, 105, 0.05); color: #059669; border-color: rgba(5, 150, 105, 0.12); }
body.light-theme .status-lifetime { background: rgba(220, 38, 38, 0.05); color: #dc2626; border-color: rgba(220, 38, 38, 0.12); }

.journey-arrow {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11px;
}

/* CRM Timeline & Tabs styling */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 16px;
  gap: 12px;
}
.modal-tab {
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}
.modal-tab:hover {
  color: var(--primary);
}
.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.modal-tab-content {
  display: none;
}
.modal-tab-content.active {
  display: block;
}

/* Vertical Timeline */
.crm-timeline {
  position: relative;
  padding: 10px 0;
  margin-left: 20px;
}
.crm-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-left: 30px;
}
.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.timeline-dot.purchase {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.timeline-dot.contact {
  border-color: var(--success);
}
.timeline-dot.due_today {
  border-color: var(--warning);
}
.timeline-dot.overdue {
  border-color: var(--danger);
}
.timeline-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
body.light-theme .timeline-card {
  background: rgba(0,0,0,0.01);
}
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.timeline-title {
  font-weight: 750;
  font-size: 12.5px;
  color: var(--secondary);
}
.timeline-date {
  font-size: 10px;
  color: var(--text-secondary);
}
.timeline-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.timeline-feedback {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  padding: 6px 10px;
  font-style: italic;
  font-size: 11.5px;
  margin-top: 4px;
  border-left: 3px solid var(--primary);
}
body.light-theme .timeline-feedback {
  background: rgba(0,0,0,0.03);
}

/* CRM Notifications Drawer */
.crm-notifications-dropdown {
  position: fixed;
  top: 55px;
  right: 24px;
  width: 360px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
  z-index: 2500;
  display: none;
  overflow: hidden;
  max-height: calc(100vh - 80px);
}
body.light-theme .crm-notifications-dropdown {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 15px rgba(99, 102, 241, 0.05);
}
.crm-notifications-dropdown.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.noti-header {
  padding: 14px 18px;
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 13.5px;
  flex-shrink: 0;
}
.noti-body {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.noti-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  gap: 12px;
  font-size: 12.5px;
}
.noti-item:hover {
  background: rgba(99, 102, 241, 0.04);
}
body.light-theme .noti-item:hover {
  background: rgba(99, 102, 241, 0.03);
}
.noti-item-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
}
.noti-item-details {
  flex-grow: 1;
}
.noti-item-title {
  font-weight: 700;
  margin-bottom: 2px;
}
.noti-item-desc {
  color: var(--text-secondary);
  font-size: 11px;
}
.noti-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}
.noti-item.unread {
  background: rgba(99, 102, 241, 0.06) !important;
}
body.light-theme .noti-item.unread {
  background: rgba(99, 102, 241, 0.04) !important;
}
.noti-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  align-self: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--primary);
  margin-left: 8px;
}
.employee-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s;
  background: #1e293b;
}
.employee-avatar-img:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
body.light-theme .employee-avatar-img {
  border: 1.5px solid rgba(15, 23, 42, 0.15);
}

/* Beautiful color-coded borders for different notification types */
.noti-item.type-birthday {
  border-left: 4px solid #ec4899;
  background: rgba(236, 72, 153, 0.02);
}
.noti-item.type-birthday:hover {
  background: rgba(236, 72, 153, 0.06);
}

.noti-item.type-due_today {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.02);
}
.noti-item.type-due_today:hover {
  background: rgba(245, 158, 11, 0.06);
}

.noti-item.type-overdue {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.02);
}
.noti-item.type-overdue:hover {
  background: rgba(239, 68, 68, 0.06);
}

/* iOS Grouped Input Fields Style */
.ios-input-group {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  text-align: left;
}

.ios-input-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  position: relative;
  transition: background-color 0.2s ease;
}

.ios-input-row:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ios-input-row:focus-within {
  background: rgba(255, 255, 255, 0.07);
}

.ios-input-icon-wrapper {
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0.85;
}

.ios-input-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.ios-input-field-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ios-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.7px;
  margin-bottom: 3px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.ios-input-row:focus-within .ios-label {
  color: var(--primary);
}

.ios-input-field-container input {
  border: none;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--text-primary) !important;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  padding: 0;
  margin: 0;
  width: 100%;
  caret-color: var(--primary);
}

/* Override browser autofill default white/yellow background and color */
.ios-input-field-container input:-webkit-autofill,
.ios-input-field-container input:-webkit-autofill:hover, 
.ios-input-field-container input:-webkit-autofill:focus, 
.ios-input-field-container input:-webkit-autofill:active {
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s !important;
  box-shadow: inset 0 0 20px 20px transparent !important;
  background: transparent !important;
  background-color: transparent !important;
}

.ios-input-field-container input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

/* Password Toggle Style */
.ios-toggle-password {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
  outline: none;
}

.ios-toggle-password:hover {
  opacity: 0.9;
  color: var(--text-primary);
}

.ios-toggle-password svg {
  width: 18px;
  height: 18px;
}

/* HR & Attendance Custom Styles */
.hr-tab-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  overflow-x: auto;
}

.hr-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hr-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.hr-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hr-view-panel {
  display: none;
}

.hr-view-panel.active-panel {
  display: block;
  animation: fadeIn 0.3s ease;
}

.hr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.hr-kpi-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hr-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hr-kpi-data {
  text-align: left;
}

.hr-kpi-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hr-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.employee-avatar-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.selfie-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.selfie-thumb:hover {
  transform: scale(1.1);
}

/* Modal photo previews */
.photo-upload-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto 10px auto;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.photo-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* GPS map links */
.gps-map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
}

.gps-map-link:hover {
  text-decoration: underline;
  color: var(--secondary);
}

/* Leave & Attendance Status Badges */
.badge-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-approved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-late {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-ontime {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Customer Profile Details Modal Styles */
.customer-profile-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

.profile-avatar-glow {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
  border: 2px solid rgba(255,255,255,0.1);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.profile-meta-item strong {
  color: var(--text-primary);
}

.profile-notes-box {
  margin-top: 14px;
  background: rgba(99, 102, 241, 0.04);
  border-left: 4px solid var(--primary);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Sticky Notes Drawer Styles */
.notes-drawer {
  position: fixed;
  top: 0;
  right: -360px; /* Slide-out position */
  width: 330px;
  height: 100vh;
  background: rgba(26, 26, 36, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.notes-drawer.open {
  right: 0;
}

.notes-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.notes-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notes-drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.notes-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-right: 5px;
}

/* Individual Sticky Note */
.sticky-note-card {
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.sticky-note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.sticky-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-note-date {
  font-size: 9.5px;
  opacity: 0.65;
}

.sticky-note-delete {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 2px;
}

.sticky-note-delete:hover {
  opacity: 1;
}

.sticky-note-textarea {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}

.sticky-note-textarea:focus {
  outline: none;
}

/* Note Color Options Container */
.note-color-picker {
  display: flex;
  gap: 6px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.2);
}

/* Active Color Dot border */
.color-dot.active {
  border: 2px solid #fff;
  transform: scale(1.1);
}

.btn-add-note {
  background: var(--warning);
  color: #1a1a24;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.btn-add-note:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Custom styling for representative dropdown */
.rep-select-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  transition: all 0.2s ease-in-out;
}

.rep-select-container:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.rep-select-label {
  font-size: 9.5px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tx-staff-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 0 16px 0 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.custom-select-arrow {
  position: absolute;
  right: 0;
  font-size: 8px;
  color: var(--primary);
  pointer-events: none;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.tx-staff-select:focus + .custom-select-arrow {
  transform: rotate(180deg);
}

/* Toggle Switch Styles */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-toggle-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.05);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}
.slider-toggle-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}
.switch-toggle input:checked + .slider-toggle-round {
  background-color: #f59e0b; /* Amber */
}
.switch-toggle input:checked + .slider-toggle-round:before {
  transform: translateX(16px);
  background-color: #fff;
}

/* ==================== HEADER MARQUEE & ALERT SYSTEM ==================== */
.header-middle {
  flex-grow: 1;
  max-width: 45%;
  margin: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 16px;
  height: 38px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-middle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.marquee-text {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  display: inline-block;
  padding-left: 100%;
  animation: marquee-running 20s linear infinite;
  transition: color 0.3s ease;
}

/* When marquee is static */
.marquee-text.static-mode {
  animation: none !important;
  padding-left: 0 !important;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes marquee-running {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* Edit Button style */
.btn-edit-marquee {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  position: absolute;
  right: 8px;
  z-index: 5;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-middle:hover .btn-edit-marquee {
  opacity: 1;
}

.btn-edit-marquee:hover {
  color: #fff;
  background: var(--primary, #7c3aed);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Themes & Glow Effects */
.alert-gold-glow {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #fff, #fbbf24, #f59e0b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-name: marquee-running, text-shimmer;
  animation-duration: 20s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.alert-gold-glow.static-mode {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s ease-in-out infinite !important;
}

.alert-danger-glow {
  color: #f87171;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
  font-weight: 800;
  animation-name: marquee-running, text-pulse;
  animation-duration: 20s, 1.5s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.alert-danger-glow.static-mode {
  animation: text-pulse 1.5s ease-in-out infinite !important;
}

.alert-emerald-glow {
  color: #34d399;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  background: linear-gradient(90deg, #10b981, #34d399, #a7f3d0, #34d399, #10b981);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-name: marquee-running, text-shimmer;
  animation-duration: 20s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.alert-emerald-glow.static-mode {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s ease-in-out infinite !important;
}

.alert-ocean-glow {
  color: #22d3ee;
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
  background: linear-gradient(90deg, #06b6d4, #22d3ee, #e0f2fe, #22d3ee, #06b6d4);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-name: marquee-running, text-shimmer;
  animation-duration: 20s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.alert-ocean-glow.static-mode {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s ease-in-out infinite !important;
}

.alert-purple-glow {
  color: #c084fc;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  background: linear-gradient(90deg, #a855f7, #c084fc, #f3e8ff, #c084fc, #a855f7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-name: marquee-running, text-shimmer;
  animation-duration: 20s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

.alert-purple-glow.static-mode {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s ease-in-out infinite !important;
}

@keyframes text-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes text-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
  50% { opacity: 0.85; text-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
}

/* KPI Scorecard & CRM Testimonials Styles */
.crm-tab-row {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  overflow-x: auto;
}

.crm-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.crm-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.crm-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-light);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

#kpi-breakdown-list > div {
  transition: all 0.2s ease;
}

#kpi-breakdown-list > div:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Premium Select Dropdown Selector styling (Requirement: organize beautifully) */
.premium-select {
  width: 220px;
  font-size: 12px;
  height: 32px;
  padding: 4px 28px 4px 12px;
  background: rgba(255, 255, 255, 0.06) url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23cbd5e1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') no-repeat right 10px center/10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.premium-select:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.premium-select option {
  background: #1e293b;
  color: #f8fafc;
}

/* Light theme overrides for premium select */
body.light-theme .premium-select {
  background: rgba(15, 23, 42, 0.04) url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') no-repeat right 10px center/10px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-theme .premium-select:hover {
  background-color: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.25);
}

body.light-theme .premium-select option {
  background: #ffffff;
  color: #0f172a;
}

/* Modern App-wide Animations (Requirement: Animation បែបទាន់សម័យ) */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply smooth slide up and fade in to active views */
.view-panel.active-view {
  animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Smooth transitions for finance tabs */
.finance-tab-content {
  animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Smooth transition for active reports, lists, and cards */
.glass-card, .inner-report-filters, #report-content-area, .crm-view-panel.active-panel, .hr-view-panel.active-panel {
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle scaling animation on hover for interactive cards */
.glass-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow), 0 8px 30px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .glass-card:hover {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.2);
}

/* Facebook-style profile dropdown classes */
.fb-profile-dropdown {
  display: none;
}
.fb-profile-dropdown.active {
  display: block !important;
}

/* ==================== SPLASH SCREEN STYLES ==================== */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
}
.splash-overlay.active-splash {
  opacity: 1;
  visibility: visible;
}
.splash-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.splash-logo {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(99,102,241,0.25);
  animation: splashPulse 2s infinite ease-in-out;
}
.splash-logo img {
  width: 75%;
  height: 75%;
  object-fit: contain;
}
.splash-logo span {
  font-size: 44px;
}
.splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
@keyframes splashPulse {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(99,102,241,0.25); }
  50% { transform: scale(1.06); box-shadow: 0 16px 40px rgba(99,102,241,0.45); }
  100% { transform: scale(1); box-shadow: 0 10px 30px rgba(99,102,241,0.25); }
}

/* ==========================================================================
   Comprehensive Responsive POS Catalog for All Screens:
   Windows Laptops (1366x768, 125%/150% scaling), Mac, iPad/Tablet, Mobile
   ========================================================================== */

/* 1. Staff Smaller Laptops, Tablets Landscape, & High-DPI Windows Scaling (<= 1250px) */
@media (max-width: 1250px) {
  .pos-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 12px;
  }
  .product-card {
    padding: 9px 10px;
    min-height: 195px;
    gap: 6px;
    border-radius: 12px;
  }
  .product-image-container {
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    border-radius: 8px;
  }
  .product-card h4 {
    font-size: 11.5px;
    min-height: 30px;
    max-height: 36px;
    line-height: 1.35;
  }
  body.lang-km .product-card h4 {
    font-size: 11.5px;
    min-height: 32px;
    max-height: 38px;
    line-height: 1.4;
  }
  .product-price {
    font-size: 13px;
  }
  .product-stock-badge {
    font-size: 9.5px;
    padding: 1px 6px;
  }
}

/* 2. Tablet Portrait & Smaller Compact Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .pos-workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
    gap: 16px;
  }
  .pos-products-grid {
    height: auto;
    max-height: 520px;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
  }
}

/* 3. Tablets & Phablets (<= 768px) */
@media (max-width: 768px) {
  .pos-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    max-height: 480px;
  }
  .product-card {
    padding: 8px;
    min-height: 185px;
    border-radius: 10px;
    gap: 6px;
  }
  .product-image-container {
    height: 95px;
    min-height: 95px;
    max-height: 95px;
    border-radius: 8px;
  }
  .product-card h4 {
    font-size: 11px;
    min-height: 28px;
    max-height: 34px;
  }
  body.lang-km .product-card h4 {
    font-size: 11px;
    min-height: 30px;
    max-height: 36px;
  }
  .product-price {
    font-size: 12.5px;
  }
  .product-stock-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
}

/* 4. Mobile Phones (iPhone, Samsung, Android <= 540px) */
@media (max-width: 540px) {
  .pos-workspace {
    gap: 12px;
  }
  .pos-catalog {
    gap: 8px;
  }
  .pos-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    height: auto;
    max-height: 55vh;
    padding-right: 2px;
  }
  .product-card {
    padding: 8px;
    min-height: 175px;
    border-radius: 10px;
    gap: 5px;
  }
  .product-image-container {
    height: 88px;
    min-height: 88px;
    max-height: 88px;
    border-radius: 8px;
  }
  .product-card h4 {
    font-size: 11px;
    line-height: 1.3;
    min-height: 28px;
    max-height: 34px;
  }
  body.lang-km .product-card h4 {
    font-size: 11px;
    min-height: 28px;
    max-height: 34px;
  }
  .product-price {
    font-size: 12px;
  }
  .product-stock-badge {
    font-size: 8.5px;
    padding: 1px 5px;
  }
  .product-card-badge {
    top: 5px;
    left: 5px;
    font-size: 8px;
    padding: 1px 5px;
  }
}

/* 5. Extra Small Mobile Screens (<= 380px) */
@media (max-width: 380px) {
  .pos-products-grid {
    gap: 6px;
  }
  .product-card {
    padding: 6px;
    min-height: 165px;
  }
  .product-image-container {
    height: 78px;
    min-height: 78px;
    max-height: 78px;
  }
  .product-card h4 {
    font-size: 10px;
    min-height: 24px;
    max-height: 30px;
  }
  body.lang-km .product-card h4 {
    font-size: 10px;
    min-height: 26px;
    max-height: 30px;
  }
  .product-price {
    font-size: 11.5px;
  }
}


