/**
 * Concept Cafe RMS - Pure Light / Mobile-First Responsive CSS System
 * Strict Rule: White background, light borders & accents only. No dark mode / surfaces.
 */

:root {
  --bg-body: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-muted: #F1F5F9;
  --bg-active: #E2E8F0;

  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-focus: #3B82F6;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-inverse: #FFFFFF;

  --primary: #2563EB;
  --primary-light: #EFF6FF;
  --primary-hover: #1D4ED8;

  --success: #10B981;
  --success-light: #ECFDF5;
  --success-text: #065F46;

  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --warning-text: #92400E;

  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --danger-text: #991B1B;

  --info: #06B6D4;
  --info-light: #ECFEFF;
  --info-text: #155E75;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h2 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
h3 { font-size: clamp(1.00rem, 1.7vw, 1.15rem); }
h4 { font-size: 1.00rem; }

p { margin-bottom: 0.5rem; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.95rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.3rem; }
.text-2xl { font-size: 1.6rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Layout Grid & Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}

.container-fluid {
  width: 100%;
  padding: 1rem;
}

@media (max-width: 640px) {
  .container, .container-fluid {
    padding: 0.75rem;
  }
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-body);
  width: 100%;
  overflow-x: hidden;
}

/* Sidebar for Desktop / Offcanvas Drawer for Mobile */
.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.sidebar-close-btn {
  display: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-close-btn:hover, .sidebar-close-btn:active {
  background: var(--bg-active);
  color: var(--danger);
  border-color: var(--border-medium);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-body);
  width: 100%;
}

/* Header / Navbar */
.top-navbar {
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 0.75rem;
  box-shadow: var(--shadow-xs);
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.top-navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex-shrink: 0;
}

.top-navbar-toggle-btn {
  display: none !important;
}

.top-navbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.top-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
  flex-shrink: 1;
  justify-content: flex-end;
}

.top-navbar-custom-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.pos-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.online-badge {
  display: inline-flex;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .top-navbar-toggle-btn {
    display: inline-flex !important;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 999;
  }
  .sidebar-close-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .top-navbar {
    padding: 0 0.65rem;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    gap: 0.35rem;
  }
  .top-navbar-title {
    font-size: 0.92rem;
    max-width: 130px;
  }
  .top-navbar-actions {
    gap: 0.3rem;
  }
  .top-navbar-custom-actions .btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.75rem;
    min-height: 28px;
  }
  .nav-btn-text {
    display: none;
  }
}

@media (max-width: 540px) {
  .online-badge {
    display: none !important;
  }
  .top-navbar-title {
    max-width: 95px;
    font-size: 0.85rem;
  }
}

/* Cards & Surfaces */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

@media (max-width: 640px) {
  .card {
    padding: 0.9rem;
  }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); border-color: #BFDBFE; }
.badge-success { background: var(--success-light); color: var(--success-text); border-color: #A7F3D0; }
.badge-warning { background: var(--warning-light); color: var(--warning-text); border-color: #FDE68A; }
.badge-danger { background: var(--danger-light); color: var(--danger-text); border-color: #FECACA; }
.badge-info { background: var(--info-light); color: var(--info-text); border-color: #BAE6FD; }
.badge-muted { background: var(--bg-muted); color: var(--text-muted); border-color: var(--border-light); }
.badge-subtle { background: var(--bg-subtle); color: var(--text-main); border-color: var(--border-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  min-height: 40px;
  text-decoration: none !important;
  white-space: nowrap;
  touch-action: manipulation;
}
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  min-height: 32px;
}
.btn-lg {
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  min-height: 48px;
}
.btn-block { width: 100%; }

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

.btn-outline { background: #FFF; color: var(--text-main); border-color: var(--border-medium); }
.btn-outline:hover { background: var(--bg-subtle); border-color: var(--border-focus); }

.btn-success { background: var(--success); color: #FFF; }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: #FFF; }
.btn-danger { background: var(--danger); color: #FFF; }
.btn-danger:hover { background: #DC2626; }

.btn-subtle { background: var(--bg-muted); color: var(--text-main); border-color: var(--border-light); }
.btn-subtle:hover { background: var(--bg-active); }

/* Form Controls */
.form-group {
  margin-bottom: 0.85rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}
.form-control, .form-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  background: #FFF;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  min-height: 40px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Filter Bar Helper */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 640px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar input,
  .filter-bar select,
  .filter-bar button,
  .filter-bar a {
    width: 100% !important;
    min-width: unset !important;
  }
}

/* Grid helper */
.grid { display: grid; gap: 0.85rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-full { grid-column: 1 / -1; }

@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .col-span-2, .col-span-3, .col-span-4 {
    grid-column: span 1 / span 1 !important;
  }
}

@media (max-width: 540px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Flex helper */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  background: #FFF;
}
.table tr:hover td {
  background: var(--bg-subtle);
}

@media (max-width: 640px) {
  .table th, .table td {
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* Nav links in Sidebar */
.nav-menu {
  list-style: none;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  transition: var(--transition);
  text-decoration: none;
}
.nav-item a:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}
.nav-item.active a {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: #FFFFFF;
    border-top: 1px solid var(--border-light);
    z-index: 800;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    flex: 1;
    height: 100%;
    padding: 4px;
    transition: var(--transition);
  }
  .mobile-bottom-nav a.active {
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
  }
  body {
    padding-bottom: 65px;
  }
}

/* Modals & Backdrop Overlays */
.modal-overlay, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 0.75rem;
}
.modal-box {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.25rem;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  .modal-overlay, .modal-backdrop {
    padding: 0.5rem;
    align-items: flex-end;
  }
  .modal-box {
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    padding: 1rem;
  }
}

/* Table Card Status Indicators */
.table-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: #FFF;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
}
.table-card.free { border-top: 4px solid var(--success); }
.table-card.occupied { border-top: 4px solid var(--warning); }
.table-card.reserved { border-top: 4px solid var(--info); }
.table-card.billing { border-top: 4px solid var(--danger); }

/* QR Print Standee */
@media print {
  body { background: #FFF !important; }
  .top-navbar, .sidebar, .mobile-bottom-nav, .no-print { display: none !important; }
  .print-only { display: block !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .card { border: none !important; box-shadow: none !important; }
}

/* ==========================================================================
   High-Velocity Unified POS Terminal CSS
   Pure White/Light Theme (#FFFFFF, #F8FAFC, #E2E8F0, #2563EB, #10B981)
   ========================================================================== */

.pos-terminal-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.pos-container {
  display: grid;
  grid-template-columns: 210px 1fr 380px;
  gap: 0.75rem;
  height: calc(100vh - 85px);
  min-height: 560px;
  background: var(--bg-body);
  width: 100%;
  box-sizing: border-box;
}

.pos-mobile-nav {
  display: none;
}

.pos-mobile-cart-strip {
  display: none;
}

/* Laptop / Desktop medium screens (769px - 1280px) */
@media (max-width: 1280px) and (min-width: 769px) {
  .pos-container {
    grid-template-columns: 180px 1fr 340px;
    gap: 0.5rem;
    height: calc(100vh - 75px);
    min-height: 520px;
  }
  
  .pos-item-card {
    padding: 0.5rem;
    min-height: 95px;
  }
  
  .pos-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .pos-categories-header, .pos-cart-header {
    padding: 0.5rem 0.65rem;
  }

  .pos-action-deck {
    gap: 0.25rem;
    padding: 0.4rem;
  }

  .pos-hotkey-btn {
    min-height: 38px;
    font-size: 0.72rem;
    padding: 0.35rem 0.2rem;
  }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  .pos-container {
    display: block;
    height: auto;
    min-height: calc(100vh - 130px);
    padding-bottom: 75px;
  }

  .pos-mobile-nav {
    display: flex;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 0.65rem;
    position: sticky;
    top: 52px;
    z-index: 35;
  }

  .pos-mobile-nav-btn {
    flex: 1;
    padding: 0.5rem 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: var(--transition);
  }

  .pos-mobile-nav-btn.active {
    background: #FFFFFF;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
  }

  .pos-mobile-cart-strip {
    display: flex;
    position: fixed;
    bottom: 58px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 2px solid var(--primary);
    padding: 0.65rem 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
    z-index: 700;
    justify-content: space-between;
    align-items: center;
  }

  .pos-categories-panel, .pos-menu-panel, .pos-cart-panel {
    width: 100%;
    min-height: calc(100vh - 160px);
  }

  .hidden-on-mobile {
    display: none !important;
  }
}

/* 1. Left Panel - Categories & Filters */
.pos-categories-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.pos-categories-header {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-categories-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.pos-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.pos-cat-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.pos-cat-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.pos-cat-badge {
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.pos-cat-btn.active .pos-cat-badge {
  background: #FFFFFF;
  color: var(--primary);
}

/* Dietary Filter Chips */
.pos-diet-filter-bar {
  padding: 0.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pos-diet-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-diet-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* 2. Middle Panel - Menu Grid & Search */
.pos-menu-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.pos-menu-search-bar {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pos-menu-search-input {
  flex: 1;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  background: #FFFFFF;
  outline: none;
  transition: var(--transition);
}

.pos-menu-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.pos-items-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  align-content: start;
  -webkit-overflow-scrolling: touch;
}

.pos-item-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 105px;
  transition: var(--transition);
  position: relative;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pos-item-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.pos-item-card:active {
  transform: scale(0.98);
}

/* Dietary Dot Indicators (FSSAI standard) */
.pos-diet-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
}
.pos-diet-icon.veg { color: #10B981; }
.pos-diet-icon.nonveg { color: #EF4444; }
.pos-diet-icon.jain { color: #F59E0B; }

.pos-diet-icon::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.pos-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-top: 0.35rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pos-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.35rem;
}

.pos-variant-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  background: var(--bg-muted);
  color: var(--text-muted);
  border-radius: 3px;
  display: inline-block;
  font-weight: 600;
}

/* 3. Right Panel - Order Slip & Action Keypad */
.pos-cart-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.pos-cart-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pos-order-type-tabs {
  display: flex;
  background: var(--bg-muted);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  gap: 0.2rem;
}

.pos-order-type-btn {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  white-space: nowrap;
}

.pos-order-type-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.pos-cart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.pos-table-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--primary);
  font-size: 0.82rem;
}

.pos-customer-input-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pos-customer-input {
  flex: 1;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  outline: none;
  min-height: 32px;
}

/* Cart Items Scroll Area */
.pos-cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
  min-height: 120px;
}

.pos-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.55rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  gap: 0.5rem;
}

.pos-cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pos-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border-medium);
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pos-qty-btn:hover { background: var(--bg-muted); }

/* Cart Calculation Summary */
.pos-cart-summary {
  padding: 0.6rem 0.85rem;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.pos-summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  border-top: 1px dashed var(--border-medium);
  padding-top: 0.35rem;
  margin-top: 0.25rem;
}

/* High-Velocity Keypad Action Deck */
.pos-action-deck {
  padding: 0.5rem;
  background: var(--bg-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.pos-hotkey-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  min-height: 42px;
}

.pos-hotkey-btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

.pos-hotkey-btn .key {
  font-size: 0.65rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.pos-hotkey-btn.btn-kot {
  background: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning-text);
}
.pos-hotkey-btn.btn-settle {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #FFFFFF;
}
.pos-hotkey-btn.btn-settle .key { color: #E0E7FF; }

/* Settle Desk Keypad Denominations */
.pos-denom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.pos-denom-btn {
  padding: 0.6rem 0.35rem;
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  min-height: 38px;
}
.pos-denom-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.change-return-badge {
  background: var(--success-light);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--success-text);
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* Category horizontal scroller on customer pages */
.cat-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }

/* Sticky Cart Bar on Customer Mobile */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-medium);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  z-index: 50;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
}
