﻿
/* === CSS: style.css === */
/* =========================================================
   StarBean Café Management — Core SaaS Design System
   Visual Identity: #4DB6B5 Turquoise, #F2E8DC Beige, #172126 Dark
   ========================================================= */

:root {
  --primary: #4DB6B5;
  --primary-hover: #3FA5A4;
  --primary-dark: #308685;
  --primary-light: #EBF8F8;
  --primary-glow: rgba(77, 182, 181, 0.25);
  
  --secondary: #F2E8DC;
  --secondary-hover: #E7DCce;
  --secondary-light: #FAF6F0;
  
  --dark: #172126;
  --dark-surface: #223038;
  --text-main: #172126;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --bg-app: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-hover: #F8FAFC;
  --border: #E6ECF1;
  --border-focus: #4DB6B5;
  
  --success: #10B981;
  --success-bg: #ECFDF5;
  --success-text: #065F46;
  
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --warning-text: #92400E;
  
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-text: #991B1B;
  
  --info: #3B82F6;
  --info-bg: #EFF6FF;
  --info-text: #1E40AF;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(23, 33, 38, 0.06);
  --shadow-lg: 0 10px 25px rgba(23, 33, 38, 0.08);
  --shadow-xl: 0 20px 35px rgba(23, 33, 38, 0.12);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-arabic: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Shell Layout */
#app-root {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  position: relative;
}

/* Sidebar */
.app-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s ease;
  z-index: 40;
}

.sidebar-brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.btn-sidebar-collapse {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-sidebar-collapse:hover {
  background: var(--bg-hover);
  color: var(--dark);
  border-color: #CBD5E1;
}

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

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .user-details,
.app-sidebar.collapsed .btn-logout {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-brand {
  padding: 16px 8px;
  justify-content: center;
}

.app-sidebar.collapsed .btn-sidebar-collapse {
  position: absolute;
  bottom: -14px;
  right: 22px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  position: relative;
}

.app-sidebar.collapsed .nav-item .nav-icon {
  margin: 0;
  font-size: 20px;
}


.app-sidebar.collapsed .sidebar-bottom {
  padding: 12px 6px;
}

.app-sidebar.collapsed .user-profile-card {
  justify-content: center;
  padding: 6px 0;
  border: none;
  background: transparent;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.brand-text h1 {
  font-size: 19px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.brand-text h1 span {
  color: var(--primary);
}
.brand-text p {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--dark);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  border-color: rgba(77, 182, 181, 0.2);
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: all 0.18s ease;
}

.nav-item:hover .nav-icon {
  color: var(--primary-dark);
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.nav-item .nav-icon svg {
  transition: transform 0.18s ease;
}

.nav-item:hover .nav-icon svg {
  transform: scale(1.08);
}

.sidebar-bottom {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #FAFCFD;
}

.user-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}
.btn-logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Top Header */
.top-header {
  height: 58px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 30;
  gap: 8px;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 auto;
}

.btn-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--dark);
}

.cafe-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-app);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cafe-badge-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: var(--success);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.lang-selector {
  display: flex;
  background: var(--bg-app);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}

.lang-btn {
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: #FFFFFF;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-main);
  transition: all 0.15s;
}
.header-btn:hover {
  background: var(--bg-hover);
  border-color: #CBD5E1;
}

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

/* Page Body */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-app);
}

/* Clean UI Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

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

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

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

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-icon {
  font-size: 18px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kpi-trend.positive {
  color: var(--success);
}
.kpi-trend.neutral {
  color: var(--info);
}
.kpi-trend.negative {
  color: var(--danger);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
}

.badge-neutral {
  background: #F1F5F9;
  color: var(--text-muted);
}

/* Modern Tables & Responsive Wrappers */
.table-container,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  margin-top: 8px;
}

table,
table.data-table,
table.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  background: #fff;
}

table th,
table.data-table th,
table.table th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: #64748B;
  border-bottom: 1.5px solid var(--border);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  vertical-align: middle;
}

table td,
table.data-table td,
table.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
}

table tr:last-child td,
table.data-table tr:last-child td,
table.table tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover td,
table.data-table tbody tr:hover td,
table.table tbody tr:hover td {
  background: #F8FAFC;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--dark);
}
.btn-secondary:hover {
  background: var(--secondary-hover);
}

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: #CBD5E1;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
}
.btn-close-modal:hover {
  color: var(--dark);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #FAFCFD;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
  border-left: 4px solid var(--success);
}
.toast.error {
  border-left: 4px solid var(--danger);
}
.toast.warning {
  border-left: 4px solid var(--warning);
}
.toast.info {
  border-left: 4px solid var(--primary);
}

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

/* Media Queries */
@media (max-width: 1024px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
    height: 100vh;
  }
  .app-sidebar.open {
    left: 0;
  }
  .btn-menu-toggle {
    display: block;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .page-body {
    padding: 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PIN PAD & TOUCH KEYPAD SECURITY STYLES
   ========================================================================== */
.pin-pad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.pin-bullets-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 10px 0;
}

.pin-bullet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid #CBD5E1;
  background: #FFFFFF;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.pin-bullet.filled {
  border-color: #0284C7;
  background: #0284C7;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.45);
}

.pin-bullet.success {
  border-color: #10B981 !important;
  background: #10B981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

.pin-bullet.error {
  border-color: #EF4444 !important;
  background: #EF4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.pin-key-btn {
  height: 60px;
  border-radius: 14px;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.12s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.pin-key-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.pin-key-btn:active {
  background: #E2E8F0;
  transform: translateY(1px) scale(0.97);
  box-shadow: none;
}

.pin-key-btn.action-btn {
  font-size: 16px;
  font-weight: 800;
  background: #F8FAFC;
  color: #64748B;
}

.pin-key-btn.action-btn:hover {
  background: #EEF2F6;
  color: #0F172A;
}

.pin-shake {
  animation: pinShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pinShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ==========================================================================
   FULL SCREEN POS LOCK & PIN LOGIN TERMINAL
   ========================================================================== */
.pos-lock-terminal {
  min-height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 10% 20%, #F8FAFC 0%, #E2E8F0 90%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  user-select: none;
}

.lock-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #FFFFFF;
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.lock-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lock-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.lock-brand-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.lock-cafe-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.lock-clock-widget {
  text-align: center;
}

.lock-digital-time {
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.lock-digital-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: capitalize;
}

.lock-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
  font-size: 12px;
  font-weight: 800;
}

.lock-terminal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 24px 20px;
  max-width: 1050px;
  margin: 0 auto;
  width: 100%;
}

.lock-staff-container {
  flex: 1;
  max-width: 480px;
}

.lock-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
}

.lock-staff-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lock-staff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.lock-staff-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.lock-staff-card.active {
  border-color: var(--primary-dark);
  background: #F0F9FF;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
}

.lock-staff-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lock-staff-info {
  flex: 1;
  margin-left: 12px;
}

.lock-staff-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--dark);
}

.lock-staff-role {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.lock-staff-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  background: #F1F5F9;
  color: #64748B;
}

.lock-staff-card.active .lock-staff-tag {
  background: #0284C7;
  color: #FFFFFF;
}

.lock-keypad-panel {
  width: 100%;
  max-width: 360px;
  background: #FFFFFF;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lock-target-display {
  text-align: center;
  margin-bottom: 6px;
}

.lock-target-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 6px;
}

.lock-target-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--dark);
}

.lock-target-role {
  font-size: 12px;
  font-weight: 700;
}

.lock-error-alert {
  color: #DC2626;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  margin: 6px 0;
  animation: pinShake 0.4s ease;
}

/* ==============================================================================
   RESPONSIVE LAYOUT & MOBILE DRAWER (Mobile First, Tablet, POS Terminals)
   ============================================================================== */

/* Fast Tap & Touch Manipulation for All Interactive Elements */
button, .btn, .nav-item, .pos-cat-btn, .pos-product-card, .pin-key-btn, 
.pos-table-card, .badge, .lang-btn, [onclick] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

.table-responsive table {
  min-width: 580px;
}

/* Responsive Media Queries (< 900px Tablets & Phones) */
@media (max-width: 900px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 275px !important;
    z-index: 1200 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45) !important;
  }

  .app-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .sidebar-mobile-backdrop.active {
    display: block;
    opacity: 1;
  }

  .btn-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-app);
    border: 1px solid var(--border);
    font-size: 19px;
    color: var(--dark);
    cursor: pointer;
    flex-shrink: 0;
  }

  .app-main {
    width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .top-header {
    padding: 8px 12px !important;
    gap: 8px !important;
  }

  .header-left {
    gap: 6px !important;
  }

  .cafe-switcher {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
  }

  #network-status-badge span:not(:first-child) {
    display: none;
  }

  .page-body {
    padding: 10px !important;
  }

  /* Modals on Mobile & Tablets */
  .modal-overlay {
    padding: 8px;
    align-items: center;
  }

  .modal-card {
    width: 100% !important;
    max-width: 520px !important;
    max-height: 92vh !important;
    border-radius: 16px !important;
    margin: auto !important;
  }

  .modal-body {
    padding: 14px !important;
    max-height: 68vh !important;
    overflow-y: auto !important;
  }

  .modal-footer {
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    flex: 1 1 calc(50% - 6px);
  }
}

/* Extra Small Screens (< 540px Smartphones) */
@media (max-width: 540px) {
  .top-header {
    flex-wrap: wrap;
    height: auto !important;
    min-height: 52px;
  }

  .header-center {
    order: 3;
    width: 100%;
    margin-top: 4px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .header-right {
    gap: 4px !important;
  }

  .header-btn span, .btn-hdr-text {
    display: none;
  }

  .header-btn {
    padding: 6px 8px !important;
  }

  .lang-btn {
    padding: 3px 6px !important;
    font-size: 11px !important;
  }

  .lock-terminal-body {
    flex-direction: column;
    padding: 12px;
    gap: 14px;
  }

  .lock-staff-container {
    max-width: 100%;
    width: 100%;
  }

  .lock-keypad-panel {
    max-width: 100%;
    padding: 16px 14px;
  }

  .pin-key-btn {
    height: 52px !important;
    font-size: 20px !important;
  }
}


/* === CSS: pos.css === */
/* =========================================================
   StarBean POS & Caisse Specific Stylesheet
   Service-Mode Header First & Spacious Salle / Floor Plan
   ========================================================= */

.pos-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  overflow: hidden;
  background: var(--bg-app);
}

/* =========================================================
   1. TOP HEADER INTEGRATED SERVICE MODES
   ========================================================= */
.pos-hdr-modes-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  justify-content: center;
  flex-shrink: 0;
}

.pos-hdr-modes {
  display: flex;
  gap: 3px;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 24px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pos-hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.pos-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--dark);
}

.pos-hdr-btn.active {
  background: #FFFFFF;
  color: #0891B2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pos-hdr-btn.active .pos-hdr-btn-icon {
  color: var(--primary);
}

.pos-hdr-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.pos-product-search-bar:focus-within {
  border-color: var(--primary-dark) !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.btn-hdr-clear, .btn-hdr-kbd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-hdr-kbd {
  background: #E2E8F0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--dark);
  font-size: 11px;
}

.btn-hdr-kbd:hover {
  background: #CBD5E1;
}

.btn-hdr-clear {
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px;
}

.btn-hdr-clear:hover {
  color: var(--danger);
}

/* =========================================================
   2. SALLE & TABLES VIEW (Floor Plan & Quick Grid)
   ========================================================= */
.pos-salle-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 10px 16px;
  gap: 8px;
  min-height: 0;
}

.salle-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: 100%;
  overflow-x: auto;
  flex-shrink: 0;
}

.salle-zone-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.salle-zone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.salle-zone-btn:hover {
  background: var(--bg-app);
  color: var(--dark);
  border-color: #CBD5E1;
}

.salle-zone-btn.active {
  background: var(--dark);
  color: #FFFFFF;
  border-color: var(--dark);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.salle-zone-btn.active svg {
  color: #FFFFFF;
}

.salle-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.salle-stats-pill {
  padding: 4px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-salle-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-salle-action:hover {
  background: var(--bg-app);
  border-color: #CBD5E1;
}

.btn-salle-action.active-edit {
  background: #F59E0B;
  color: #FFFFFF;
  border-color: #D97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.salle-view-toggle {
  display: inline-flex;
  background: #E2E8F0;
  padding: 2.5px;
  border-radius: var(--radius-sm);
  gap: 2px;
  white-space: nowrap;
}

.salle-view-toggle .toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.salle-view-toggle .toggle-btn.active {
  background: #FFFFFF;
  color: var(--dark);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Legend Bar */
.salle-legend-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.status-dot.status-free { background: var(--success); }
.status-dot.status-occupied { background: #0284C7; box-shadow: 0 0 6px rgba(2, 132, 199, 0.5); }
.status-dot.status-waiting { background: var(--warning); }
.status-dot.status-blocked { background: var(--danger); }

/* Canvas Area */
.salle-canvas-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  min-height: 0;
}

/* 2A. INTERACTIVE FLOOR PLAN CANVAS */
.floorplan-canvas {
  width: 100%;
  height: 100%;
  min-height: 520px;
  min-width: 700px;
  position: relative;
  background-color: #FAFBFD;
  background-image: radial-gradient(#E2E8F0 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  overflow: hidden;
}

.floor-zone-tag {
  position: absolute;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  pointer-events: none;
  opacity: 0.75;
}

.zone-terrasse { top: 12px; left: 16px; background: #FEF3C7; color: #92400E; }
.zone-principale { bottom: 20px; left: 16px; background: #E0F2FE; color: #0369A1; }
.zone-vip { top: 12px; left: 45%; background: #F3E8FF; color: #6B21A8; }
.zone-mezzanine { top: 12px; right: 24px; background: #DCFCE7; color: #15803D; }

/* Table Nodes in Floor Plan */
.floor-table-node {
  position: absolute;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floor-table-node:hover {
  transform: scale(1.06);
  z-index: 15;
}

/* Core Table Shape Styling */
.table-core-disc {
  background: #FFFFFF;
  border: 2.5px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  transition: all 0.18s ease;
}

.shape-round .table-core-disc {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
}

.shape-square .table-core-disc {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
}

.shape-lounge .table-core-disc {
  width: 140px;
  height: 90px;
  border-radius: var(--radius-md);
}

.table-node-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
}

.table-node-cap {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.table-live-amount {
  font-size: 12px;
  font-weight: 800;
  color: #0284C7;
  margin-top: 2px;
}

.table-items-count {
  font-size: 9.5px;
  color: #64748B;
}

.table-status-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--success-text);
  margin-top: 2px;
}

/* Status Specific Borders and Glows */
.floor-table-node.status-free .table-core-disc {
  border-color: #10B981;
}

.floor-table-node.status-occupied .table-core-disc {
  border-color: #0284C7;
  background: #F0F9FF;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.22);
}

.floor-table-node.status-waiting .table-core-disc {
  border-color: var(--warning);
  background: #FFFBEB;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.22);
}

.floor-table-node.status-blocked .table-core-disc {
  border-color: var(--danger);
  background: #FEF2F2;
  opacity: 0.7;
}

/* 2B. FAST GRID CARDS */
.salle-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 16px;
  padding-bottom: 50px;
}

.table-grid-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  box-shadow: var(--shadow-sm);
}

.table-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.table-grid-card.status-occupied {
  border-color: #0284C7;
  background: #F0F9FF;
}

.table-grid-card.status-waiting {
  border-color: var(--warning);
  background: #FFFBEB;
}

.table-grid-card.status-blocked {
  border-color: var(--danger);
  background: #FEF2F2;
  opacity: 0.75;
}

.table-grid-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.table-card-id {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}

.table-card-zone {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.table-card-total {
  font-size: 16px;
  font-weight: 800;
  color: #0284C7;
}

.table-card-items {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================================
   3. ORDER & PRODUCT CATALOGUE VIEW
   ========================================================= */
.pos-main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 16px;
  padding: 14px 20px 10px 20px;
}

/* Category Sidebar Column */
.pos-categories-col {
  width: 170px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.pos-cat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.pos-cat-btn:hover {
  background: var(--bg-hover);
  border-color: #CBD5E1;
  transform: translateX(2px);
}

.pos-cat-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.pos-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.pos-cat-icon svg {
  transition: transform 0.18s ease;
}

.pos-cat-btn:hover .pos-cat-icon svg {
  transform: scale(1.1);
}

/* Products Grid Column */
.pos-products-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.pos-order-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.active-table-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-app);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.pos-quick-table-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  background: #FFFFFF;
  color: var(--dark);
  cursor: pointer;
}

.pos-search-input {
  position: relative;
  width: 100%;
}

.pos-search-input input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13.5px;
  background: var(--bg-app);
  transition: all 0.15s;
}

.pos-search-input input:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.pos-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.pos-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 12px;
  align-content: start;
  padding-right: 4px;
}

.pos-product-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.pos-product-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pos-product-card.pos-product-unavailable {
  background: #FFF5F5;
  border-color: #FECACA;
  cursor: not-allowed;
  opacity: 0.85;
}

.pos-product-card.pos-product-unavailable:hover {
  transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  border-color: #F87171;
}

.pos-product-out-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.pos-product-out-badge {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  text-transform: uppercase;
}

.pos-product-out-reason {
  font-size: 9.5px;
  font-weight: 700;
  color: #991B1B;
  background: rgba(254, 226, 226, 0.95);
  padding: 1px 6px;
  border-radius: 6px;
  margin-top: 2px;
  border: 1px solid #FECACA;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-card-quick-toggle-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.6;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pos-product-card:hover .pos-card-quick-toggle-btn {
  opacity: 1;
  transform: scale(1.1);
}

.pos-card-quick-toggle-btn.avail:hover {
  background: #FEE2E2;
  border-color: #EF4444;
}

.pos-card-quick-toggle-btn.unavail:hover {
  background: #DCFCE7;
  border-color: #10B981;
}

.pos-product-img-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  background: #FAF5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.pos-product-img-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.pos-product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.pos-product-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* =========================================================
   4. ORDER TICKET COLUMN (RIGHT)
   ========================================================= */
.pos-order-col {
  width: 330px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pos-order-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAFAFA;
}

.pos-order-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--dark);
}

.pos-order-table-tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.btn-icon-clear {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-icon-clear:hover {
  opacity: 1;
}

.pos-order-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-order-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
}

.pos-order-empty span {
  font-size: 32px;
  opacity: 0.4;
}

.pos-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--bg-app);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  gap: 6px;
  transition: all 0.15s ease;
}

.pos-item-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.pos-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.pos-item-unit-price {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.pos-item-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.pos-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  transition: all 0.15s ease;
}

.pos-qty-btn:hover {
  background: var(--bg-hover);
  border-color: #CBD5E1;
}

.pos-qty-btn.sent-locked {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
  font-size: 11px;
}

.pos-qty-btn.sent-locked:hover {
  background: #FEE2E2;
  border-color: #F87171;
  transform: scale(1.08);
}

.pos-qty-display {
  font-size: 12.5px;
  font-weight: 800;
  min-width: 16px;
  text-align: center;
  color: var(--dark);
}

.pos-item-total {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  min-width: 58px;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.pos-order-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: #FAFAFA;
}

.pos-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pos-total-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.pos-total-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.pos-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.pos-pay-btn {
  padding: 8px 4px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.pos-pay-btn span {
  font-size: 16px;
}

.pos-pay-btn div {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.pos-pay-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pos-pay-btn.active div {
  color: var(--primary-dark);
}

.btn-pos-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.18s ease;
}

.btn-pos-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-pos-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Mobile & Tablet Adjustments */
@media (max-width: 1024px) {
  .pos-main-container {
    flex-direction: column;
    overflow-y: auto;
  }
  .pos-order-col {
    width: 100%;
  }
  .pos-categories-col {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
}

/* =========================================================
   ESC/POS THERMAL PRINTER & RECEIPT STYLING (80mm / 58mm)
   ========================================================= */
.receipt-preview-container {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.receipt-card {
  background: #FFFFFF;
  padding: 18px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #000000;
  line-height: 1.35;
  margin: 0 auto;
}

.receipt-card.format-80mm {
  width: 100%;
  max-width: 320px;
  font-size: 13px;
}

.receipt-card.format-58mm {
  width: 100%;
  max-width: 230px;
  font-size: 11.5px;
}

.receipt-header {
  text-align: center;
  margin-bottom: 8px;
}

.receipt-logo {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #000000;
}

.receipt-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000000;
}

.receipt-divider {
  border: none;
  border-top: 1.5px dashed #000000;
  margin: 8px 0;
}

.receipt-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #000000;
  margin: 3px 0;
}

.receipt-items-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
}

.receipt-item-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 800;
  color: #000000;
}

.receipt-item-name {
  flex: 1;
  font-weight: 800;
  color: #000000;
}

.receipt-item-price {
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
  color: #000000;
}

.receipt-total-section {
  margin-top: 6px;
}

.receipt-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 900;
  color: #000000;
  padding-top: 6px;
  border-top: 2px solid #000000;
  margin-top: 4px;
}

.receipt-footer {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #000000;
  margin-top: 12px;
  line-height: 1.4;
}

.receipt-barcode {
  letter-spacing: 4px;
  font-weight: 900;
  font-size: 15px;
  margin-top: 6px;
  color: #000000;
}

/* =========================================================
   ZERO-MARGIN ESC/POS THERMAL PRINTER DRIVER OVERRIDES
   ========================================================= */
#pos-print-zone {
  display: none;
}

@media print {
  @page {
    margin: 0mm !important;
    padding: 0mm !important;
    size: auto;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Hide entire application shell and backdrop when printing */
  #app-root,
  .modal-overlay,
  .top-header,
  .app-sidebar,
  .toast-container,
  #pos-touch-keyboard-dock {
    display: none !important;
  }

  /* Direct thermal print stream */
  #pos-print-zone {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 2mm 1mm 10mm 1mm !important;
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  #pos-print-zone.format-58mm {
    max-width: 52mm !important;
  }

  /* Pure Solid Black (No Halftone Dithering / Crisp Thermal Heads) */
  #pos-print-zone * {
    color: #000000 !important;
    border-color: #000000 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Also support if printed directly from visible element fallback */
  #printable-thermal-receipt,
  #printable-kitchen-ticket {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* =========================================================
   POS VIRTUAL TOUCH KEYBOARD
   ========================================================= */
#pos-touch-keyboard-dock {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
}

.pos-keyboard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.pos-keyboard-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 840px;
  background: #1E293B;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
  padding: 16px 20px 22px 20px;
  pointer-events: auto;
  animation: slideUpKeyboard 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1.5px solid #334155;
  border-bottom: none;
}

@keyframes slideUpKeyboard {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.pos-keyboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0F172A;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #334155;
  margin-bottom: 12px;
}

.btn-vk-ctrl {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-vk-clear {
  background: #334155;
  color: #F1F5F9;
}
.btn-vk-clear:hover {
  background: #475569;
}

.btn-vk-close {
  background: #EF4444;
  color: #FFFFFF;
}
.btn-vk-close:hover {
  background: #DC2626;
}

.pos-keyboard-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.vk-chip-btn {
  padding: 6px 14px;
  background: #334155;
  color: #F8FAFC;
  border: 1px solid #475569;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vk-chip-btn:hover, .vk-chip-btn:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.pos-keyboard-keys {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vk-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.vk-key {
  flex: 1;
  max-width: 70px;
  height: 46px;
  background: #334155;
  color: #FFFFFF;
  border: 1px solid #475569;
  border-radius: 8px;
  font-size: 16.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 3px 0 #0F172A;
  transition: all 0.08s ease;
}

.vk-key:hover {
  background: #475569;
}

.vk-key:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0F172A;
  background: var(--primary);
}

.vk-key.num-key {
  background: #1E293B;
  color: #38BDF8;
  font-size: 17.5px;
}

.vk-key-backspace {
  flex: 2;
  max-width: 130px;
  background: #475569;
  font-size: 13.5px;
  color: #FCA5A5;
}

.vk-key-space {
  flex: 4;
  max-width: 420px;
  background: #334155;
  font-size: 13.5px;
  letter-spacing: 1px;
}

.vk-key-done {
  flex: 3;
  max-width: 280px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13.5px;
  box-shadow: 0 3px 0 #0f766e;
}
.vk-key-done:hover {
  background: var(--primary-dark);
}

/* ==============================================================================
   RESPONSIVE POS LAYOUT (Mobile < 768px, Tablet 768px-1024px, Desktop > 1024px)
   ============================================================================== */

@media (max-width: 1024px) {
  .pos-main-container {
    gap: 10px !important;
    padding: 10px !important;
  }

  .pos-categories-col {
    width: 135px !important;
  }

  .pos-cat-btn {
    padding: 9px 10px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  .pos-cart-panel {
    width: 320px !important;
  }
}

@media (max-width: 768px) {
  .pos-main-container {
    flex-direction: column !important;
    overflow-y: auto !important;
    padding: 6px !important;
    gap: 8px !important;
    height: auto !important;
  }

  /* Horizontal Swipeable Category Bar on Mobile */
  .pos-categories-col {
    width: 100% !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-shrink: 0 !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
    scrollbar-width: none;
  }

  .pos-categories-col::-webkit-scrollbar {
    display: none;
  }

  .pos-cat-btn {
    flex-shrink: 0 !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }

  .pos-products-col {
    width: 100% !important;
    padding: 10px !important;
    overflow: visible !important;
    min-height: 280px !important;
  }

  .pos-order-context-header {
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
  }

  .pos-product-search-bar {
    min-width: 100% !important;
    max-width: 100% !important;
    margin-top: 6px !important;
  }

  .pos-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
    gap: 8px !important;
    overflow-y: visible !important;
  }

  .pos-product-card {
    padding: 8px 6px !important;
  }

  .pos-product-name {
    font-size: 12px !important;
  }

  .pos-product-price {
    font-size: 12.5px !important;
  }

  /* Mobile Full-Width Cart */
  .pos-cart-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
  }

  .pos-cart-items-list {
    max-height: 250px !important;
  }

  .pos-pay-btn {
    padding: 12px 14px !important;
    font-size: 14.5px !important;
  }

  /* Salle & Tables Mobile */
  .pos-salle-container {
    padding: 6px !important;
    gap: 6px !important;
  }

  .salle-controls-bar {
    padding-bottom: 4px !important;
  }

  .salle-zone-btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
  }

  #pos-floorplan-canvas {
    min-height: 380px !important;
    max-height: 55vh !important;
  }

  .salle-quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 8px !important;
  }
}


/* === CSS: kds.css === */
/* =========================================================
   StarBean Kitchen & Barista Display System (KDS) Stylesheet
   Touch-optimized high-contrast interface for Bar & Kitchen
   ========================================================= */

.kds-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  background: #0F172A;
  color: #F8FAFC;
  overflow: hidden;
  font-family: var(--font-family);
}

/* KDS Top Bar */
.kds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #1E293B;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.kds-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kds-title-group h2 {
  font-size: 20px;
  font-weight: 800;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kds-live-clock {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: #38BDF8;
  background: #0F172A;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
}

.kds-stats-pills {
  display: flex;
  gap: 10px;
}

.kds-stat-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kds-stat-badge.pending { background: #FEF08A; color: #854D0E; }
.kds-stat-badge.preparing { background: #BAE6FD; color: #0369A1; }
.kds-stat-badge.ready { background: #BBF7D0; color: #166534; }

/* KDS Columns Grid */
.kds-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 20px;
  flex: 1;
  overflow: hidden;
}

.kds-column {
  display: flex;
  flex-direction: column;
  background: #1E293B;
  border-radius: var(--radius-lg);
  border: 1px solid #334155;
  overflow: hidden;
}

.kds-column-header {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid;
}

.kds-col-pending .kds-column-header {
  border-color: #EAB308;
  background: rgba(234, 179, 8, 0.1);
  color: #FDE047;
}

.kds-col-preparing .kds-column-header {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.1);
  color: #7DD3FC;
}

.kds-col-ready .kds-column-header {
  border-color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
  color: #86EFAC;
}

.kds-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual KDS Order Ticket */
.kds-ticket-card {
  background: #0F172A;
  border: 1.5px solid #334155;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kds-ticket-card:hover {
  border-color: #64748B;
  transform: translateY(-2px);
}

.kds-ticket-card.urgent {
  border-color: #EF4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: #EF4444; }
  50% { border-color: #F87171; }
}

.kds-ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1E293B;
  padding-bottom: 8px;
}

.kds-ticket-table {
  font-size: 17px;
  font-weight: 900;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kds-ticket-timer {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.kds-ticket-timer.normal { background: #14532D; color: #86EFAC; }
.kds-ticket-timer.warning { background: #713F12; color: #FDE047; }
.kds-ticket-timer.danger { background: #7F1D1D; color: #FCA5A5; }

.kds-ticket-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kds-ticket-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #1E293B;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
}

.kds-item-name {
  font-weight: 700;
  color: #F8FAFC;
}

.kds-item-qty {
  font-weight: 900;
  font-size: 15px;
  color: #38BDF8;
  background: #0F172A;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Action Buttons */
.kds-ticket-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-kds-action {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-kds-prep {
  background: #0284C7;
  color: #FFFFFF;
}
.btn-kds-prep:hover { background: #0369A1; }

.btn-kds-ready {
  background: #16A34A;
  color: #FFFFFF;
}
.btn-kds-ready:hover { background: #15803D; }

.btn-kds-serve {
  background: #475569;
  color: #FFFFFF;
}
.btn-kds-serve:hover { background: #334155; }


/* === CSS: receipt.css === */
/* =========================================================
   StarBean Thermal Receipt & Print Stylesheet
   Standard 80mm / 58mm POS thermal receipt format
   ========================================================= */

.receipt-preview-container {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.receipt-card {
  width: 320px;
  background: #FFFFFF;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace, var(--font-family);
  color: #172126;
  font-size: 12.5px;
  line-height: 1.4;
  border: 1px dashed #CBD5E1;
}

.receipt-header {
  text-align: center;
  margin-bottom: 16px;
}

.receipt-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #172126;
  margin-bottom: 2px;
}

.receipt-sub {
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-divider {
  border: none;
  border-top: 1px dashed #94A3B8;
  margin: 12px 0;
}

.receipt-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}

.receipt-items-table {
  width: 100%;
  margin: 12px 0;
}

.receipt-item-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.receipt-item-name {
  font-weight: 600;
}

.receipt-item-price {
  font-weight: 700;
  text-align: right;
}

.receipt-total-section {
  margin: 14px 0;
}

.receipt-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: #172126;
  padding-top: 6px;
  border-top: 2px solid #172126;
}

.receipt-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11.5px;
  color: #64748B;
}

.receipt-barcode {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 14px;
}

/* Print Rules */
@media print {
  body * {
    visibility: hidden;
  }
  .receipt-card, .receipt-card * {
    visibility: visible;
  }
  .receipt-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
  }
  .no-print {
    display: none !important;
  }
}


/* === CSS: rtl.css === */
/* =========================================================
   StarBean RTL (Arabic) Stylesheet
   ========================================================= */

html[dir="rtl"] {
  font-family: var(--font-arabic), var(--font-family);
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .app-sidebar {
  border-right: none;
  border-left: 1px solid var(--border);
}

html[dir="rtl"] .kpi-card::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .pos-search-input input {
  padding: 10px 38px 10px 14px;
}

html[dir="rtl"] .pos-search-icon {
  left: auto;
  right: 12px;
}

html[dir="rtl"] table.data-table th,
html[dir="rtl"] table.data-table td {
  text-align: right;
}

html[dir="rtl"] .pos-item-total {
  text-align: left;
}

html[dir="rtl"] .toast {
  border-left: 1px solid var(--border);
}

html[dir="rtl"] .toast.success {
  border-right: 4px solid var(--success);
}
html[dir="rtl"] .toast.error {
  border-right: 4px solid var(--danger);
}
html[dir="rtl"] .toast.warning {
  border-right: 4px solid var(--warning);
}
html[dir="rtl"] .toast.info {
  border-right: 4px solid var(--primary);
}


/* === CSS: customerMenu.css === */
/* ==========================================================================
   StarBean Public QR Customer Menu — Mobile-First Styling
   Visual Identity: #4DB6B5 Turquoise, #F2E8DC Warm Beige, #172126 Dark
   ========================================================================== */

.qr-menu-app {
  min-height: 100vh;
  background-color: #F8FAFC;
  color: #1E293B;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px; /* Space for sticky bottom cart */
}

/* Header & Café Brand Hero */
.qr-menu-header {
  background: linear-gradient(135deg, #172126 0%, #223038 100%);
  color: #FFFFFF;
  padding: 16px 20px 20px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.qr-menu-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.qr-menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-menu-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
}

.qr-menu-cafe-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.qr-menu-cafe-sub {
  font-size: 12px;
  color: #94A3B8;
}

.qr-menu-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-menu-mode-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.qr-menu-mode-badge.mode-view {
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.qr-menu-mode-badge.mode-order {
  background: #10B981;
  color: #FFFFFF;
  border: 1px solid #34D399;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.qr-menu-table-badge {
  background: #4DB6B5;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(77, 182, 181, 0.35);
}

.qr-menu-lang-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Category Navigation Pills Bar (Sticky) */
.qr-menu-categories-bar {
  background: #FFFFFF;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 72px;
  z-index: 40;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.qr-menu-categories-bar::-webkit-scrollbar {
  display: none;
}

.qr-cat-pill {
  background: #F1F5F9;
  color: #475569;
  border: 1.5px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 24px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.qr-cat-pill:hover {
  background: #E2E8F0;
}

.qr-cat-pill.active {
  background: #172126;
  color: #FFFFFF;
  border-color: #172126;
  box-shadow: 0 2px 8px rgba(23, 33, 38, 0.25);
}

/* Search and Filters */
.qr-menu-search-bar {
  padding: 12px 16px 4px 16px;
}

.qr-menu-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: #FFFFFF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%2394A3B8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 14px center;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  font-size: 14px;
  color: #1E293B;
  outline: none;
  transition: border-color 0.2s ease;
}

.qr-menu-search-input:focus {
  border-color: #4DB6B5;
  box-shadow: 0 0 0 3px rgba(77, 182, 181, 0.15);
}

/* Products Grid */
.qr-menu-container {
  padding: 12px 16px 24px 16px;
}

.qr-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  margin: 16px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .qr-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .qr-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Product Card */
.qr-product-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.qr-product-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qr-product-card.unavailable {
  opacity: 0.65;
  background: #F8FAFC;
  border-style: dashed;
}

.qr-product-img-wrap {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  background: #F1F5F9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.qr-product-img-wrap img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.qr-product-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-product-name {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
  margin: 0;
}

.qr-product-ar-name {
  font-size: 12px;
  color: #64748B;
  direction: rtl;
  text-align: left;
}

.qr-product-price {
  font-size: 15px;
  font-weight: 900;
  color: #308685;
}

.qr-badge-unavailable {
  display: inline-block;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 2px;
  align-self: flex-start;
}

/* Add / Stepper Controls */
.qr-add-btn {
  background: #4DB6B5;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
  align-self: flex-end;
}

.qr-add-btn:hover {
  background: #3FA5A4;
}

.qr-add-btn:active {
  transform: scale(0.96);
}

.qr-stepper {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 2px;
  align-self: flex-end;
}

.qr-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qr-step-qty {
  min-width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
}

/* Floating Bottom Sticky Cart Bar */
.qr-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1.5px solid #E2E8F0;
  padding: 12px 16px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-cart-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-cart-badge {
  background: #172126;
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  position: relative;
}

.qr-cart-totals {
  display: flex;
  flex-direction: column;
}

.qr-cart-totals-label {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 600;
}

.qr-cart-totals-amount {
  font-size: 16px;
  font-weight: 900;
  color: #0F172A;
}

.qr-cart-submit-btn {
  background: linear-gradient(135deg, #4DB6B5 0%, #308685 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(77, 182, 181, 0.35);
  transition: transform 0.15s ease;
}

.qr-cart-submit-btn:active {
  transform: scale(0.98);
}

/* Modal and Cart Drawer */
.qr-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .qr-drawer-overlay {
    align-items: center;
    padding: 20px;
  }
}

.qr-drawer-content {
  background: #FFFFFF;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  border-radius: 24px 24px 0 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.25s ease-out;
}

@media (min-width: 640px) {
  .qr-drawer-content {
    border-radius: 20px;
    animation: fadeInScale 0.2s ease-out;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.qr-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 14px;
}

.qr-drawer-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

.qr-drawer-close {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
}

.qr-drawer-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  margin-bottom: 16px;
}

.qr-drawer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

/* RTL Support */
[dir="rtl"] .qr-menu-search-input {
  padding: 12px 42px 12px 16px;
  background-position: right 14px center;
}

[dir="rtl"] .qr-product-ar-name {
  text-align: right;
}

