/* ==========================================================================
   Foodiez Restaurant POS - Design System & Modern Responsive Styles
   ========================================================================== */

:root {
  --primary: #ff5722;
  --primary-hover: #f44336;
  --primary-light: #fff3e0;
  --primary-glow: rgba(255, 87, 34, 0.28);
  
  --dark: #121826;
  --dark-surface: #1e2638;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  --bg-app: #f4f6f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e5e7eb;
  --border-focus: #ff5722;
  
  --success: #10b981;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 25px -4px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-receipt: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", Helvetica, Arial, sans-serif;
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.app-header {
  height: 72px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.header-left .logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(255, 87, 34, 0.3));
}

.header-custom-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 87, 34, 0.4);
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.logo-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #f1f4f9;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  font-size: 15px;
  margin-right: 8px;
  color: var(--text-muted);
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
}

.clear-search-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}

.clear-search-btn:hover {
  color: var(--dark);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cumulative Sales Pill in Header */
.header-sales-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}

.sales-icon {
  font-size: 20px;
  line-height: 1;
}

.sales-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.sales-amount {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #92400e;
  line-height: 1.2;
}

/* Header Dashboard Badge Button */
.header-dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  color: #1e293b;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.header-dashboard-badge:hover {
  background: #f8fafc;
  border-color: #ff5722;
  color: #ff5722;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.16);
}

.header-dashboard-badge .dash-badge-icon {
  font-size: 16px;
  line-height: 1;
}

.header-dashboard-badge .dash-badge-text {
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* Button Variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-icon-only {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  background: #f1f4f9;
  border-radius: var(--radius-md);
  border: none;
}

.btn-icon-only:hover {
  background: #e2e8f0;
  transform: rotate(20deg);
}

.btn-cart-mobile {
  display: none;
  position: relative;
  background: var(--dark);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.cart-badge-count {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* ==========================================================================
   Layout: Split POS System
   ========================================================================== */
.pos-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 72px);
}

/* Left Column: Menu Display */
.menu-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 28px 40px;
  background: #f8fafc;
}

/* Category Filter Bar */
.category-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 8px 16px;
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cat-chip:hover {
  border-color: #cbd5e1;
  color: var(--dark);
}

.cat-chip.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.cat-chip-add {
  background: #fff7ed;
  color: #ea580c;
  border: 1.5px dashed #f97316;
  font-weight: 700;
}

.cat-chip-add:hover {
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.menu-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-add-cat {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.btn-text-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-text-badge:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

.btn-text-badge.active-mode {
  background: #fee2e2;
  color: var(--danger);
  border-color: var(--danger);
}

/* Category Header Bar */
.menu-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: visible;
  position: relative;
}

.menu-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: visible;
  position: relative;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.menu-title-group h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}

.item-count-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Grid Layout View Switcher (3-Dot & Toggle Capsule)
   ========================================================================== */
.grid-view-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.btn-grid-dots {
  background: #141518;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 44px;
  height: 34px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  user-select: none;
}

.btn-grid-dots .dots-icon {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
  color: #e2e8f0;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -2px;
}

.btn-grid-dots:hover {
  background: #1f2126;
  border-color: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-grid-dots.active,
.btn-grid-dots:active {
  background: #252830;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* The Popup Capsule Pill */
.grid-view-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #141518;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  animation: gridPopoverAnim 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

@keyframes gridPopoverAnim {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.grid-view-opt {
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  color: #94a3b8;
  position: relative;
}

.grid-view-opt:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  transform: scale(1.05);
}

.grid-view-opt.active {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #60a5fa;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: scale(1.02);
}

.grid-view-opt svg {
  display: block;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.grid-view-opt:hover svg {
  transform: scale(1.08);
}

/* Grid Layouts when applied to #menu-grid */
#menu-grid.view-layout-1 .category-cards-grid,
.category-cards-grid.view-layout-1 {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

#menu-grid.view-layout-2 .category-cards-grid,
.category-cards-grid.view-layout-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px;
}

@media (max-width: 600px) {
  #menu-grid.view-layout-2 .category-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  #menu-grid.view-layout-2 .food-card {
    padding: 10px 8px;
  }
  #menu-grid.view-layout-2 .food-card-thumb-wrap {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }
  #menu-grid.view-layout-2 .food-card-info {
    margin: 0 8px;
  }
  #menu-grid.view-layout-2 .food-card-title {
    font-size: 13.5px;
  }
}

/* ==========================================================================
   Food Item Cards (Pixel-matching Reference Image)
   ========================================================================== */
.menu-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

/* Category Section Blocks */
.menu-category-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: fadeInCategorySection 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.category-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 2px 0;
  user-select: none;
}

.category-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.category-section-emoji {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 75, 43, 0.08);
  border: 1px solid rgba(255, 75, 43, 0.18);
  box-shadow: 0 2px 6px rgba(255, 75, 43, 0.06);
}

.category-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.3px;
  margin: 0;
}

.category-section-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #ff4b2b;
  background: rgba(255, 75, 43, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid rgba(255, 75, 43, 0.2);
}

.category-section-divider {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 75, 43, 0.25) 0%, rgba(226, 232, 240, 0.7) 45%, rgba(226, 232, 240, 0.05) 100%);
  border-radius: 2px;
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

@media (max-width: 1200px) {
  .category-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .category-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .category-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* The Card Container */
.food-card {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.food-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: rgba(255, 87, 34, 0.2);
}

/* Left: Rounded Food Thumbnail (Clickable to Add) */
.food-card-thumb-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f4f9;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.18s ease;
}

.food-card-thumb-wrap:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.28);
}

.food-card-thumb-wrap:active {
  transform: scale(0.92);
}

.food-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.food-card-thumb-wrap:hover .food-card-thumb {
  transform: scale(1.1);
}

/* Subtle Add Overlay on Image Hover */
.food-card-thumb-wrap::after {
  content: "+";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 26px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  border-radius: 14px;
  pointer-events: none;
}

.food-card-thumb-wrap:hover::after {
  opacity: 1;
}

/* Center: Food Details */
.food-card-info {
  flex: 1;
  margin: 0 14px;
  min-width: 0; /* text truncation safety */
}

.food-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-card-desc {
  font-size: 12.5px;
  color: #718096;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.food-card-price {
  font-size: 15px;
  font-weight: 800;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 2px;
}

.food-card-price .currency-tag {
  font-weight: 700;
}

/* Food Card Variants Selector (Sizes & Portions) */
.food-card-variants {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.card-variant-pill {
  background: #f1f4f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.card-variant-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.card-variant-pill.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Cart Variant Badge */
.cart-variant-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Right: Circular Add Button */
.food-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-add-food {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  border: none;
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 87, 34, 0.35);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-add-food:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 14px rgba(255, 87, 34, 0.45);
}

.btn-add-food:active {
  transform: scale(0.92);
}

/* Added in Cart Badge indicator */
.card-cart-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--dark);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Delete / Remove Item Button (Displayed during Manage Mode) */
.btn-delete-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: none; /* revealed when manage mode active */
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 4px;
}

.btn-delete-item:hover {
  background: var(--danger);
  color: #ffffff;
  transform: scale(1.1);
}

.manage-active .btn-delete-item {
  display: flex;
}

/* Edit Item Button */
.btn-edit-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 4px;
}

.btn-edit-item:hover {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.manage-active .btn-edit-item {
  display: flex;
}

.food-card:hover .btn-edit-item {
  display: flex;
}

/* No results state */
.no-items-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.no-items-found p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   Right Column: POS Order Terminal & Bill Calculation
   ========================================================================== */
.order-terminal {
  width: 380px;
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.02);
}

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

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-title h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
}

.terminal-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-clear-order {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-clear-order:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* Order Meta Settings */
.order-meta-card {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.order-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.input-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.input-field input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
}

.input-field input:focus {
  border-color: var(--primary);
}

/* Order Items Container (Scrollable) */
.order-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.empty-cart-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
}

.empty-cart-icon {
  font-size: 42px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.empty-cart-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.empty-cart-state p {
  font-size: 13px;
  line-height: 1.4;
  max-width: 220px;
}

/* Cart Item Row */
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f4f9;
  animation: fadeIn 0.2s ease;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

.cart-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-pill {
  display: flex;
  align-items: center;
  background: #f1f4f9;
  border-radius: var(--radius-full);
  padding: 2px 4px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

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

.qty-val {
  font-size: 13px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}

.cart-item-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  min-width: 60px;
  text-align: right;
}

.btn-remove-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.18s ease;
  margin-left: 6px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
}

.btn-remove-cart:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.12);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
}

.btn-remove-cart:active {
  transform: scale(0.92);
}

/* Bill Calculation Card */
.order-calc-card {
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.calc-value {
  font-weight: 600;
  color: var(--dark);
}

.discount-text {
  color: var(--success);
}

.calc-label-with-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-percent-input {
  width: 44px;
  padding: 2px 4px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  outline: none;
}

.btn-tiny {
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  background: #f1f4f9;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

.calc-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.total-row {
  margin-bottom: 12px;
}

.total-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  display: block;
}

.total-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.total-grand-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

/* Customer Cash Received & Return/Change Calculator */
.cash-calc-box {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  padding: 12px 20px;
  margin: 10px -20px 14px -20px;
}

.cash-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.cash-label-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  flex: 1;
}

.quick-cash-shortcuts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-exact-pill {
  background: #fff7ed;
  border: 1.5px solid #fb923c;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ea580c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.15);
  user-select: none;
  font-family: inherit;
}

.btn-exact-pill:hover {
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(255, 87, 34, 0.35);
  transform: translateY(-1px);
}

.btn-exact-pill:active {
  transform: scale(0.95);
}

.cash-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cash-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.currency-tag-prefix {
  padding: 8px 10px;
  background: #f1f4f9;
  font-weight: 800;
  color: var(--text-muted);
  font-size: 13.5px;
  border-right: 1px solid #e2e8f0;
}

.cash-input-wrap input {
  width: 100%;
  border: none;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  outline: none;
  color: var(--dark);
}

.change-return-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.change-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--dark);
  display: block;
}

.change-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.change-amount-display {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--dark);
}

/* Green state when full amount paid & change due to return */
.change-return-card.is-change-positive {
  background: #dcfce7;
  border-color: #86efac;
}

.change-return-card.is-change-positive .change-title {
  color: #166534;
}

.change-return-card.is-change-positive .change-sub {
  color: #15803d;
}

.change-return-card.is-change-positive .change-amount-display {
  color: #15803d;
}

/* Red/Amber state when customer gave less than total */
.change-return-card.is-change-due {
  background: #fee2e2;
  border-color: #fca5a5;
}

.change-return-card.is-change-due .change-title {
  color: #991b1b;
}

.change-return-card.is-change-due .change-sub {
  color: #b91c1c;
}

.change-return-card.is-change-due .change-amount-display {
  color: #dc2626;
}

/* Big Confirm & Print CTA */
.btn-confirm-print {
  width: 100%;
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-confirm-print:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-confirm-print:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.confirm-icon {
  font-size: 22px;
}

.confirm-text-group {
  text-align: left;
  flex: 1;
  margin-left: 12px;
}

.confirm-main {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.confirm-sub {
  display: block;
  font-size: 11px;
  opacity: 0.9;
  font-weight: 500;
}

.confirm-price {
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-window {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-title-group h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}

.modal-title-group p {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-close-btn {
  background: #f1f4f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

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

.modal-form {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Modal Variants & Portions Manager */
.variants-section-box {
  background: #fffbf7;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(255, 107, 53, 0.06);
}

.variants-section-box:hover {
  border-color: #fb923c;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.12);
}

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

.custom-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-text strong {
  display: block;
  font-size: 13px;
  color: var(--dark);
}

.checkbox-text small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.variants-container {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.preset-variant-shortcuts {
  margin-bottom: 12px;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.preset-var-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-preset-var {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-preset-var:hover {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

.variant-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.variant-row-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.2s ease;
}

.variant-row-item .var-name-input {
  flex: 2;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
}

.variant-row-item .var-price-input {
  flex: 1.2;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
}

.variant-row-item .var-name-input:focus,
.variant-row-item .var-price-input:focus {
  border-color: var(--primary);
}

.btn-del-var-row {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #fee2e2;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-del-var-row:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-add-variant-row {
  width: 100%;
  padding: 9px;
  background: #ffffff;
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-add-variant-row:hover {
  background: var(--primary-light);
}

.image-input-options {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.file-upload-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #f1f4f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.file-upload-btn:hover {
  background: #e2e8f0;
}

.or-separator {
  font-size: 12px;
  color: var(--text-muted);
}

.url-input {
  flex: 1;
}

.preset-images-picker {
  margin-top: 8px;
}

.preset-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.preset-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.preset-img-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-img-btn:hover,
.preset-img-btn.selected {
  border-color: var(--primary);
  transform: scale(1.08);
}

.image-preview-container {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.image-preview-container img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.preview-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Logo Settings Box in Settings Modal */
.logo-setting-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1.5px dashed var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.logo-circle-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.18);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-circle-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(255, 87, 34, 0.35);
  border-color: #ff3d00;
}

.logo-circle-avatar:active {
  transform: scale(0.96);
}

.logo-circle-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-placeholder-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
  line-height: 1.25;
}

/* ==========================================================================
   Interactive Circle Logo Adjuster / Cropper Modal
   ========================================================================== */
.logo-crop-window {
  max-width: 420px;
}

.crop-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #f8fafc;
}

.crop-stage-container {
  width: 260px;
  height: 260px;
  background: #0f172a;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.crop-circle-frame {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid #ff5722;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
  cursor: grab;
  z-index: 2;
}

.crop-circle-frame:active {
  cursor: grabbing;
}

#crop-stage-img {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: 0 0;
  max-width: none;
  max-height: none;
}

.crop-circle-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 3;
}

.crop-instructions-bar {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.crop-control-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.crop-zoom-row input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.btn-zoom-step {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--dark);
  transition: all 0.15s;
}

.btn-zoom-step:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.crop-quick-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-crop-tool {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-crop-tool:hover {
  background: #f1f5f9;
  color: var(--dark);
  border-color: #94a3b8;
}

.logo-actions-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-hint-text {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

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

/* ==========================================================================
   Receipt Modal & Thermal Paper Simulation
   ========================================================================== */
.receipt-modal-window {
  max-width: 440px;
}

.receipt-modal-body {
  background: #f1f4f9;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.thermal-receipt-paper {
  background: #ffffff;
  width: 100%;
  max-width: 320px;
  padding: 20px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  font-family: var(--font-receipt);
  font-size: 11.5px;
  line-height: 1.35;
  color: #111;
  position: relative;
  border-radius: 4px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Jagged cut paper bottom edge effect */
.thermal-receipt-paper::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(circle, transparent, transparent 50%, #ffffff 50%, #ffffff 100%);
  background-size: 12px 12px;
}

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

.receipt-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.receipt-circle-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  margin: 0 auto;
}

.receipt-circle-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.receipt-rest-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.receipt-rest-sub {
  font-size: 11px;
  color: #444;
  margin-top: 2px;
}

.receipt-divider {
  border-bottom: 1px dashed #777;
  margin: 10px 0;
}

.receipt-divider-double {
  border-bottom: 2px solid #222;
  margin: 10px 0;
}

.receipt-meta-grid {
  font-size: 11.5px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.receipt-meta-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 6px !important;
  padding: 1.5px 0 !important;
}

.receipt-meta-row .meta-label {
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
}

.receipt-meta-row .meta-val {
  white-space: nowrap;
  text-align: right;
  margin-left: auto;
  font-size: 11px;
}

.receipt-row-label {
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  font-size: 11px !important;
}

.receipt-row-amount {
  white-space: nowrap !important;
  text-align: right !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

.receipt-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  margin: 10px 0 !important;
}

.receipt-table th,
.receipt-table td {
  box-sizing: border-box !important;
  vertical-align: top !important;
}

.receipt-table th {
  padding: 5px 0 !important;
  border-bottom: 1px dashed #444 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: #111 !important;
}

.receipt-table td {
  padding: 4px 0 !important;
  color: #111 !important;
}

/* 1. Item Name column (42% width) */
.receipt-table .col-item,
.receipt-table th:nth-child(1),
.receipt-table td:nth-child(1) {
  width: 42% !important;
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 6px !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* 2. Quantity column (14% width) */
.receipt-table .col-qty,
.receipt-table th:nth-child(2),
.receipt-table td:nth-child(2) {
  width: 14% !important;
  text-align: center !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  white-space: nowrap !important;
}

/* 3. Unit Price column (22% width) */
.receipt-table .col-price,
.receipt-table th:nth-child(3),
.receipt-table td:nth-child(3) {
  width: 22% !important;
  text-align: right !important;
  padding-left: 2px !important;
  padding-right: 8px !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

/* 4. Total Amount column (22% width) */
.receipt-table .col-total,
.receipt-table th:nth-child(4),
.receipt-table td:nth-child(4) {
  width: 22% !important;
  text-align: right !important;
  padding-left: 4px !important;
  padding-right: 0 !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

.receipt-item-title {
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.25;
}

.receipt-item-variant {
  font-size: 10px;
  font-weight: normal;
  opacity: 0.8;
  margin-top: 1px;
  word-break: break-word;
}

.receipt-totals {
  font-size: 12px;
  line-height: 1.6;
}

.receipt-grand-total {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
  margin: 4px 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.receipt-grand-total .receipt-row-label {
  font-weight: 800 !important;
  font-size: 12.5px !important;
  white-space: nowrap !important;
}

.receipt-grand-total .receipt-row-amount {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  text-align: right !important;
  margin-left: auto !important;
}

.receipt-barcode {
  text-align: center;
  margin-top: 14px;
}

.barcode-stripes {
  height: 36px;
  background: repeating-linear-gradient(
    90deg,
    #111,
    #111 2px,
    transparent 2px,
    transparent 4px,
    #111 4px,
    #111 7px,
    transparent 7px,
    transparent 9px
  );
  width: 80%;
  margin: 8px auto 4px;
}

.barcode-number {
  font-size: 10px;
  letter-spacing: 2px;
}

.receipt-footer-msg {
  text-align: center;
  font-size: 11px;
  margin-top: 10px;
  color: #444;
}

/* History Modal */
.history-modal-window {
  max-width: 600px;
}

.history-stats-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.stat-card {
  flex: 1;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}

.stat-title {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-small-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.history-order-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.history-order-card:hover {
  border-color: #cbd5e1;
}

.history-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.history-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.history-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-right: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--dark);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideInLeft 0.25s ease;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   PRINT SPECIFICATION - Thermal Receipt Printer (@media print)
   ========================================================================== */
.print-only {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

@media print {
  /* Hide all interactive UI elements */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .no-print,
  .app-header,
  .pos-layout,
  .modal-backdrop,
  .toast-container {
    display: none !important;
  }

  /* Show solely the receipt area */
  .print-only {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: auto !important;
    display: block !important;
  }

  #print-area {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .thermal-receipt-printable {
    width: 76mm !important; /* Standard 80mm POS slip */
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 2mm !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", Helvetica, Arial, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #000000 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .thermal-receipt-printable * {
    color: #000000 !important;
    box-sizing: border-box !important;
  }

  .receipt-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    text-align: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .receipt-circle-logo {
    width: 22mm !important;
    height: 22mm !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 1.5px solid #000000 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .receipt-circle-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .receipt-rest-name {
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
  }

  .receipt-divider {
    border-bottom: 1px dashed #000 !important;
    margin: 6px 0 !important;
  }

  .receipt-divider-double {
    border-bottom: 2px solid #000 !important;
    margin: 6px 0 !important;
  }

  .receipt-meta-grid {
    margin: 5px 0 !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  .receipt-meta-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1px 0 !important;
  }

  .receipt-meta-row .meta-label {
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    color: #000000 !important;
    font-size: 10px !important;
  }

  .receipt-meta-row .meta-val {
    white-space: nowrap !important;
    text-align: right !important;
    margin-left: auto !important;
    color: #000000 !important;
    font-size: 10px !important;
  }

  .receipt-row-label {
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    font-size: 10px !important;
  }

  .receipt-row-amount {
    white-space: nowrap !important;
    text-align: right !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    font-size: 10px !important;
  }

  .receipt-grand-total {
    font-size: 12.5px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 3px 0 !important;
  }

  .receipt-grand-total .receipt-row-label {
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .receipt-grand-total .receipt-row-amount {
    font-size: 13px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    text-align: right !important;
    margin-left: auto !important;
  }

  .receipt-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    margin: 6px 0 !important;
  }

  .receipt-table th,
  .receipt-table td {
    box-sizing: border-box !important;
    vertical-align: top !important;
    color: #000000 !important;
  }

  .receipt-table th {
    padding: 4px 0 !important;
    border-bottom: 1px dashed #000000 !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
  }

  .receipt-table td {
    padding: 3px 0 !important;
  }

  .receipt-table .col-item,
  .receipt-table th:nth-child(1),
  .receipt-table td:nth-child(1) {
    width: 42% !important;
    text-align: left !important;
    padding-left: 0 !important;
    padding-right: 6px !important;
    word-break: break-word !important;
  }

  .receipt-table .col-qty,
  .receipt-table th:nth-child(2),
  .receipt-table td:nth-child(2) {
    width: 14% !important;
    text-align: center !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    white-space: nowrap !important;
  }

  .receipt-table .col-price,
  .receipt-table th:nth-child(3),
  .receipt-table td:nth-child(3) {
    width: 22% !important;
    text-align: right !important;
    padding-left: 2px !important;
    padding-right: 8px !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
  }

  .receipt-table .col-total,
  .receipt-table th:nth-child(4),
  .receipt-table td:nth-child(4) {
    width: 22% !important;
    text-align: right !important;
    padding-left: 4px !important;
    padding-right: 0 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
  }

  .receipt-item-title {
    font-weight: 600 !important;
    color: #000000 !important;
  }

  .receipt-item-variant {
    font-size: 9px !important;
    font-weight: normal !important;
    color: #222222 !important;
    margin-top: 1px !important;
  }

  @page {
    margin: 0;
    size: auto;
  }
}

/* Mobile Search & Floating Cart Base Rules */
.mobile-search-wrap {
  display: none;
}

.mobile-floating-cart-bar {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 95;
  align-items: center;
  justify-content: space-between;
  animation: slideUpFloat 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

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

.floating-cart-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-cart-badge-icon {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.floating-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
}

.floating-cart-text {
  display: flex;
  flex-direction: column;
}

.floating-cart-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.floating-cart-price {
  font-size: 16.5px;
  font-weight: 800;
  color: #fed7aa;
  letter-spacing: -0.2px;
}

.floating-cart-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.4);
  transition: transform 0.15s ease;
  font-family: inherit;
}

.floating-cart-btn:active {
  transform: scale(0.95);
}

.floating-arrow {
  font-size: 15px;
  transition: transform 0.2s ease;
}

.floating-cart-btn:hover .floating-arrow {
  transform: translateX(3px);
}

.drawer-backdrop {
  display: none;
}

.btn-close-drawer {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-close-drawer:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

body.drawer-active-body {
  overflow: hidden !important;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .order-terminal {
    width: 340px;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 10px 14px;
    height: auto;
    min-height: 58px;
  }

  .header-left .logo-icon {
    font-size: 26px;
  }

  .header-left .logo-text h1 {
    font-size: 16px;
  }

  .header-left .logo-sub {
    display: none;
  }

  .header-sales-pill {
    padding: 4px 10px;
  }

  .header-sales-pill .sales-label {
    display: none;
  }

  .header-sales-pill .sales-amount {
    font-size: 14px;
  }

  .header-sales-pill .sales-icon {
    font-size: 16px;
  }

  .header-right {
    gap: 8px;
  }

  .header-dashboard-badge {
    padding: 6px 10px;
  }

  .header-dashboard-badge .dash-badge-text {
    display: none;
  }

  .header-center {
    display: none;
  }

  .pos-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .menu-section {
    overflow-y: visible;
    padding: 14px;
    padding-bottom: 96px; /* Space for mobile floating cart bar */
  }

  /* Mobile Search Input */
  .mobile-search-wrap {
    display: block;
    margin-bottom: 12px;
  }

  .mobile-search-wrap .search-bar {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 10px 16px;
  }

  /* Mobile Category Bar */
  .category-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .category-scroll {
    width: 100%;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .cat-chip {
    padding: 8px 14px;
    font-size: 13px;
  }

  .menu-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .menu-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .menu-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Food Cards Grid on Mobile */
  .menu-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .food-card {
    padding: 10px 12px;
    border-radius: 16px;
  }

  .food-card-thumb-wrap {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .food-card-info {
    margin: 0 10px;
  }

  .food-card-title {
    font-size: 15px;
    line-height: 1.25;
  }

  .food-card-desc {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .food-card-variants {
    margin-top: 6px;
    gap: 4px;
  }

  .card-variant-pill {
    padding: 3px 8px;
    font-size: 11px;
  }

  .food-card-price {
    margin-top: 6px;
    font-size: 14.5px;
  }

  .btn-add-food {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .btn-cart-mobile {
    display: inline-flex;
  }

  /* Order Terminal Drawer on Mobile */
  .order-terminal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    height: 100dvh;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.28);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .order-terminal.drawer-open {
    transform: translateX(0);
  }

  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .btn-close-drawer {
    display: inline-flex;
  }

  .terminal-header {
    padding: 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
  }

  .terminal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .order-items-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    max-height: none;
  }

  .order-calc-card {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .order-actions {
    padding: 12px 14px 16px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-window {
    max-height: calc(100dvh - 20px);
    border-radius: 20px 20px 10px 10px;
    width: 100%;
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-form {
    padding: 14px 18px;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .variant-row-item {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }

  .variant-row-item .var-name-input {
    flex: 1 1 54%;
    font-size: 13.5px;
  }

  .variant-row-item .var-price-input {
    flex: 1 1 30%;
    font-size: 13.5px;
  }

  .logo-setting-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .logo-actions-col {
    width: 100%;
  }

  .form-row-compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Extra Small Smartphones (iPhone SE, Galaxy A series, <= 480px) */
@media (max-width: 480px) {
  .app-header {
    padding: 8px 10px;
  }

  .header-left .logo-icon {
    font-size: 22px;
  }

  .header-left .logo-text h1 {
    font-size: 14px;
  }

  .btn-text-label {
    display: none;
  }

  .header-right {
    gap: 5px;
  }

  .btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .btn-icon-only {
    width: 34px;
    height: 34px;
  }

  .header-sales-pill {
    padding: 4px 6px;
    gap: 4px;
  }

  .header-sales-pill .sales-amount {
    font-size: 13px;
  }

  .btn-exact-pill {
    padding: 4px 10px;
    font-size: 11.5px;
  }

  .modal-window {
    border-radius: 16px 16px 0 0;
  }
}


/* ==========================================================================
   Modern Login Screen Overlay
   ========================================================================== */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  padding: 44px 36px;
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff5722, #ff9800, #4285F4);
}

.login-brand-icon {
  font-size: 56px;
  margin-bottom: 12px;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(255, 87, 34, 0.3));
}

.login-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.login-subtitle {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Auth Alert Box */
.auth-alert-box {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.4;
  animation: slideDown 0.2s ease;
}

.auth-alert-box.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-alert-box.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* Auth Form Fields */
.auth-form {
  text-align: left;
}

.auth-field-group {
  margin-bottom: 14px;
}

.auth-field-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.auth-forgot-link {
  background: none;
  border: none;
  font-size: 12px;
  color: #ff5722;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  opacity: 0.6;
  pointer-events: none;
}

.auth-input-wrap input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-input-wrap input:focus {
  border-color: #ff5722;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.auth-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.55;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-pwd:hover {
  opacity: 1;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-signup-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.auth-signup-btn:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 18px 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.auth-guest-link {
  background: none;
  border: none;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s;
  padding: 4px;
}

.auth-guest-link:hover {
  color: #0f172a;
}

.login-action-box {
  margin-bottom: 14px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.google-btn:active {
  transform: translateY(0);
}

.google-icon-svg {
  flex-shrink: 0;
}

.login-footer-badge {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 12px;
}

/* ==========================================================================
   Settings Dropdown Menu
   ========================================================================== */
.settings-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.settings-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 6px;
  animation: scaleUp 0.15s ease-out;
}

.dropdown-item {
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 6px;
}

.dropdown-item.text-danger {
  color: #dc2626 !important;
}

.dropdown-item.text-danger:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

/* ==========================================================================
   Dashboard Modal Enhancements
   ========================================================================== */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-title {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.dashboard-table th {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }
  .stat-card {
    padding: 12px 10px !important;
    border-radius: 12px !important;
    gap: 10px !important;
  }
  .stat-icon-wrap {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }
  .stat-title {
    font-size: 10px !important;
  }
  .stat-value {
    font-size: 17px !important;
  }
  .dashboard-modal-window {
    width: 98% !important;
    max-height: 94vh !important;
    border-radius: 14px !important;
  }
  .dashboard-body {
    padding: 14px 10px !important;
  }
}

@media (max-width: 380px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================================
   Product Stock Management Styles
   ========================================================================== */
.food-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  width: fit-content;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.food-stock-badge:hover {
  transform: scale(1.05);
}

.food-stock-badge.in-stock {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.food-stock-badge.low-stock {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.food-stock-badge.out-of-stock {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 800;
}

.food-card.is-out-of-stock {
  opacity: 0.72;
}

.food-card.is-out-of-stock .food-card-thumb-wrap {
  position: relative;
}

.food-card.is-out-of-stock .food-card-thumb-wrap::after {
  content: "OUT OF STOCK";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: inherit;
  text-align: center;
  padding: 2px;
}

.food-card.is-out-of-stock .btn-add-food {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.btn-quick-stock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 10.5px;
  color: #475569;
  cursor: pointer;
  margin-top: 4px;
}
.btn-quick-stock:hover {
  background: #e2e8f0;
  color: #0f172a;
}


/* ==========================================================================
   Foodpanda-Style Product Detail Bottom Sheet / Modal
   ========================================================================== */
.product-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: pdsFadeIn 0.25s ease-out;
}

@keyframes pdsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.product-detail-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.35);
  animation: pdsSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@media (min-width: 641px) {
  .product-detail-backdrop {
    align-items: center;
    padding: 20px;
  }
  .product-detail-sheet {
    border-radius: 28px;
    max-height: 88vh;
    animation: pdsScalePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

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

@keyframes pdsScalePop {
  from { transform: scale(0.92) translateY(24px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.pds-media-header {
  position: relative;
  width: 100%;
  height: 240px;
  background: #0f172a;
  overflow: hidden;
  flex-shrink: 0;
}

.pds-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pds-close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transition: transform 0.15s ease, background 0.15s ease;
}

.pds-close-btn:hover {
  transform: scale(1.1);
  background: #ffffff;
}

.pds-reference-badge {
  position: absolute;
  bottom: 10px;
  left: 14px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.pds-status-banner {
  background: #e0f2fe;
  color: #0369a1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #bae6fd;
}

.pds-status-banner.is-out {
  background: #e2f1fc;
  color: #0f172a;
}

.pds-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.pds-main-info {
  margin-bottom: 18px;
}

.pds-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.pds-price {
  font-size: 16.5px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.pds-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.pds-section {
  padding: 18px 0;
  border-top: 1px solid #f1f5f9;
}

.pds-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pds-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px;
}

.pds-section-sub {
  font-size: 12.5px;
  color: #64748b;
  display: block;
  line-height: 1.4;
}

.pds-required-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pds-variants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pds-variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pds-variant-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pds-variant-row.selected {
  background: #fff7ed;
  border-color: #ff5722;
}

.pds-var-left {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.pds-var-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pds-var-price {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.pds-custom-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #ffffff;
}

.pds-variant-row.selected .pds-custom-radio {
  border-color: #ff5722;
}

.pds-variant-row.selected .pds-custom-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5722;
}

.pds-instructions-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
  background: #f8fafc;
}

.pds-instructions-input:focus {
  background: #ffffff;
  border-color: #ff5722;
}

.pds-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.pds-qty-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pds-qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.pds-qty-btn:hover:not(:disabled) {
  border-color: #ff5722;
  color: #ff5722;
  background: #fff5f2;
}

.pds-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.pds-qty-num {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  min-width: 22px;
  text-align: center;
}

.pds-submit-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(255, 87, 34, 0.35);
}

.pds-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.45);
}

.pds-submit-btn:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.food-card-thumb-wrap, .food-card-title, .food-card-desc {
  cursor: pointer;
}
.food-card-title:hover {
  color: #ff5722;
}


/* ==========================================================================
   Header, Tablet & View Fixes
   ========================================================================== */
.header-sales-pill {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  padding: 6px 12px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  height: 44px !important;
  box-sizing: border-box !important;
}

.header-sales-pill .sales-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.header-sales-pill .sales-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #b45309 !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.header-sales-pill .sales-amount {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #92400e !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.header-center {
  flex: 1 !important;
  max-width: 400px !important;
  min-width: 140px !important;
  margin: 0 14px !important;
}

.search-bar {
  width: 100% !important;
  min-width: 130px !important;
}

/* Prevent food card title truncation with ugly dots */
.food-card-title {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 3px !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
}

.food-card-desc {
  font-size: 12px !important;
  color: #64748b !important;
  margin-bottom: 6px !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.food-card-variants {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin: 4px 0 !important;
}

.card-variant-pill {
  padding: 2px 7px !important;
  font-size: 10.5px !important;
  white-space: nowrap !important;
}

/* Customer Cash Received & Return/Change Calculator (Full Width & Perfectly Aligned with Amount Column) */
.cash-calc-box {
  background: #f8fafc !important;
  border-top: 1.5px solid var(--border-color) !important;
  border-bottom: 1.5px solid var(--border-color) !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 12px 20px !important;
  margin: 12px -20px 14px -20px !important;
  box-sizing: border-box !important;
  width: calc(100% + 40px) !important;
}

@media (max-width: 768px) {
  .cash-calc-box {
    padding: 10px 14px !important;
    margin: 10px -14px 12px -14px !important;
    width: calc(100% + 28px) !important;
  }
}

.cash-label-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  width: 100% !important;
  padding: 0 !important;
}

.cash-label-row label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--dark) !important;
  white-space: nowrap !important;
  flex: 0 1 auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
}

.quick-cash-shortcuts {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  padding: 0 !important;
}

.btn-exact-pill {
  background: #fff7ed !important;
  border: 1.5px solid #fb923c !important;
  border-radius: var(--radius-full) !important;
  padding: 4px 11px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #ea580c !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.12) !important;
  user-select: none !important;
}

.btn-exact-pill:hover {
  background: linear-gradient(135deg, #ff6b35 0%, #ff5722 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 8px rgba(255, 87, 34, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* Tablet & Intermediate Screen Adaptations (850px to 1180px) */
@media (max-width: 1180px) {
  .header-left .logo-sub {
    display: none !important;
  }
  .header-sales-pill .sales-label {
    display: none !important;
  }
  .header-sales-pill {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .header-center {
    margin: 0 10px !important;
    max-width: 260px !important;
  }
  .header-right {
    gap: 8px !important;
  }
}

@media (max-width: 980px) {
  .btn-text-label {
    display: none !important;
  }
  .btn {
    padding: 8px 10px !important;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .menu-cards-grid, .category-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 12px !important;
  }
  .food-card {
    padding: 10px 12px !important;
  }
  .food-card-thumb-wrap {
    width: 64px !important;
    height: 64px !important;
  }
  .order-terminal {
    width: 370px !important;
    min-width: 360px !important;
  }
}

@media (min-width: 769px) and (max-width: 850px) {
  .menu-cards-grid, .category-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 10px !important;
  }
  .order-terminal {
    width: 360px !important;
    min-width: 350px !important;
  }
}

/* ==========================================
   POS Calculator Styling & Responsive Scaling
   ========================================== */
.pos-calculator-wrap {
  width: 100%;
  max-width: 380px;
  margin: 12px auto 24px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 16px;
  border: 1px solid #f1f5f9;
  animation: calcFadeIn 0.25s ease;
  box-sizing: border-box;
}

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

.calc-display-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 72px;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
}

.calc-display-box:focus-within,
.calc-display-box.is-active {
  border-color: #ff5722;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03), 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.calc-expression {
  font-size: 13px;
  font-weight: 600;
  color: #ea580c;
  min-height: 18px;
  text-align: right;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  scrollbar-width: none;
}

.calc-expression::-webkit-scrollbar {
  display: none;
}

.calc-main-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  overflow: hidden;
}

.calc-currency-badge {
  font-size: 22px;
  font-weight: 700;
  color: #94a3b8;
  user-select: none;
  flex-shrink: 0;
}

.calc-display {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 0;
  padding: 0;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #334155;
  padding: 11px 0;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.calc-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.calc-btn:active {
  transform: translateY(1px);
  background: #e2e8f0;
  box-shadow: none;
}

.calc-op {
  background: #fff7ed;
  color: #ea580c;
  font-size: 22px;
  border-color: #fed7aa;
}

.calc-op:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

.calc-clear {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fee2e2;
  font-size: 19px;
}

.calc-clear:hover {
  background: #fee2e2;
}

.calc-backspace {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
  font-size: 18px;
}

.calc-backspace:hover {
  background: #fef3c7;
  color: #b45309;
}

.calc-enter {
  background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
  color: white;
  border-color: #ea580c;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.calc-enter:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.4);
}

.calc-tall {
  grid-row: span 2;
}

.calc-wide {
  grid-column: span 2;
}

.calc-op.active-op {
  background: #ea580c !important;
  color: #ffffff !important;
  border-color: #c2410c !important;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.45);
  transform: scale(0.96);
}

/* Responsive scaling on screen resize */
@media (max-height: 800px) {
  .pos-calculator-wrap {
    max-width: 350px;
    margin: 6px auto 14px;
    padding: 12px;
  }
  .calc-display-box {
    min-height: 58px;
    padding: 8px 12px;
    margin-bottom: 8px;
  }
  .calc-display {
    font-size: 26px;
  }
  .calc-currency-badge {
    font-size: 18px;
  }
  .calc-keys {
    gap: 6px;
  }
  .calc-btn {
    padding: 8px 0;
    font-size: 18px;
  }
  .calc-op {
    font-size: 20px;
  }
  .calc-enter {
    font-size: 22px;
  }
}

@media (max-height: 650px) {
  .pos-calculator-wrap {
    max-width: 310px;
    margin: 4px auto 10px;
    padding: 10px;
  }
  .calc-display-box {
    min-height: 50px;
    padding: 6px 10px;
    margin-bottom: 6px;
  }
  .calc-display {
    font-size: 22px;
  }
  .calc-btn {
    padding: 6px 0;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .pos-calculator-wrap {
    max-width: 100%;
    margin: 8px auto 20px;
  }
}
