/* ==========================================================================
   Bangladeshi Restaurant Management & QR Ordering System - Design System
   Modern Dashboard Aesthetic (Matching Reference Design)
   Strict Compliance with DESIGN.md & Strict No-Emoji Rule.
   ========================================================================== */

:root {
  /* Canvas & Surfaces */
  --canvas-warm: #f4f5f8;       /* Clean neutral background */
  --canvas-ceramic: #edebe9;
  --surface-white: #ffffff;
  --surface-neutral-cool: #f8fafc;

  /* Brand Greens (DESIGN.md) */
  --brand-green: #006241;       /* Starbucks Green - Headings, Brand accents */
  --green-accent: #00754A;      /* Green Accent - Primary CTAs, Frap button */
  --house-green: #1E3932;       /* House Green - Deep bands, Dark elements */
  --green-uplift: #2b5148;      /* Secondary dark green */
  --green-light: #d4e9e2;       /* Pale mint wash for valid states & badges */

  /* Modern Accents & Gradients */
  --gold: #cba258;
  --gold-light: #dfc49d;
  --gold-lightest: #faf6ee;
  --accent-orange: #f39c12;
  --accent-orange-soft: rgba(243, 156, 18, 0.12);

  /* Semantic Colors */
  --color-red: #c82014;
  --color-red-tint: rgba(200, 32, 20, 0.08);
  --color-yellow: #fbbc05;
  --color-yellow-tint: rgba(251, 188, 5, 0.12);

  /* Neutrals & Text */
  --text-black: rgba(0, 0, 0, 0.87);
  --text-black-soft: rgba(0, 0, 0, 0.58);
  --text-white: #ffffff;
  --text-white-soft: rgba(255, 255, 255, 0.70);
  --border-light: #e2e8f0;
  --border-hairline: #f1f5f9;

  /* Geometry & Elevation */
  --radius-card: 14px;
  --radius-pill: 50px;
  --radius-circle: 50%;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --frap-shadow: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.14);
  --modal-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);

  /* Typography & Transitions */
  --font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --letter-spacing: -0.01em;
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  letter-spacing: var(--letter-spacing);
  background-color: var(--canvas-warm);
  color: var(--text-black);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Typography & Universal Elements
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  letter-spacing: var(--letter-spacing);
  line-height: 1.25;
  color: var(--text-black);
}

h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-black);
}

h2 {
  font-size: 18px;
  font-weight: 700;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

p {
  color: var(--text-black-soft);
}

a {
  color: var(--green-accent);
  text-decoration: none;
}

/* Universal 50px Full-Pill Buttons (DESIGN.md section 4.1) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary {
  background-color: var(--green-accent);
  color: var(--text-white);
  border-color: var(--green-accent);
}

.btn-primary:hover {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}

.btn-outline {
  background-color: var(--surface-white);
  color: var(--text-black);
  border-color: var(--border-light);
}

.btn-outline:hover {
  background-color: var(--surface-neutral-cool);
  border-color: #cbd5e1;
}

.btn-soft-orange {
  background-color: var(--accent-orange-soft);
  color: #b45309;
  border-color: rgba(243, 156, 18, 0.3);
}

.btn-soft-orange:hover {
  background-color: #fde68a;
}

.btn-danger {
  background-color: var(--color-red);
  color: var(--text-white);
  border-color: var(--color-red);
}

.btn-danger:hover {
  background-color: #a5180e;
}

.btn-danger-outline {
  background-color: transparent;
  color: var(--color-red);
  border-color: rgba(200, 32, 20, 0.4);
}

.btn-danger-outline:hover {
  background-color: var(--color-red-tint);
}

.btn-sm {
  font-size: 12px;
  padding: 5px 12px;
}

.btn-lg {
  font-size: 15px;
  padding: 12px 24px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
  white-space: nowrap;
}

.badge-green {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-gold {
  background-color: var(--gold-lightest);
  border: 1px solid var(--gold-light);
  color: #8c6721;
}

.badge-yellow {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-red {
  background-color: var(--color-red-tint);
  color: var(--color-red);
  border: 1px solid rgba(200, 32, 20, 0.3);
}

.badge-neutral {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-blue {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-purple {
  background-color: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

/* Cards */
.card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  padding: 20px;
  position: relative;
  transition: var(--transition-fast);
}

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

/* SVG Icon helper */
.icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Clean Top Header Bar (Uncluttered, No Messy Role Switcher Buttons)
   ========================================================================== */

.top-header-bar {
  background-color: var(--surface-white);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--nav-shadow);
}

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

.header-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-black);
  margin: 0;
}

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

.live-feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-dot-green {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.role-pill-badge {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-lang-btn {
  background-color: var(--surface-white);
  border: 1px solid var(--border-light);
  color: var(--text-black);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-lang-btn:hover {
  background-color: var(--surface-neutral-cool);
  border-color: #cbd5e1;
}

/* ==========================================================================
   Modern Left Sidebar Navigation
   ========================================================================== */

.app-container {
  display: flex;
  flex: 1;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  width: 260px;
  background-color: var(--surface-white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition-normal);
  z-index: 90;
}

/* Top Profile Header inside Sidebar */
.sidebar-profile-box {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-circle);
  background: linear-gradient(135deg, var(--green-accent) 0%, var(--brand-green) 100%);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 117, 74, 0.25);
}

.sidebar-profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-role {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-accent);
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-profile-id {
  font-size: 11px;
  color: var(--text-black-soft);
  margin-top: 2px;
}

/* Navigation Links */
.sidebar-nav {
  padding: 16px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

.nav-link:hover {
  background-color: var(--surface-neutral-cool);
  color: var(--text-black);
}

/* Modern Soft Tinted Active Highlight Pill */
.nav-link.active {
  background-color: var(--accent-orange-soft);
  color: #b45309;
  font-weight: 700;
}

.nav-link.active svg {
  stroke: #b45309;
}

.nav-link-badge {
  margin-left: auto;
  background-color: var(--color-red);
  color: var(--text-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

/* Nested Settings Submenu inside Sidebar */
.nav-subgroup {
  margin-left: 20px;
  padding-left: 10px;
  border-left: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 6px;
}

.nav-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-sublink:hover {
  background-color: var(--surface-neutral-cool);
  color: var(--text-black);
}

.nav-sublink.active {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

/* Bottom Pinned Actions in Sidebar */
.sidebar-bottom-actions {
  padding: 16px 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--surface-white);
}

/* Main Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--canvas-warm);
}

.main-content {
  flex: 1;
  padding: 24px 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   Modern Dashboard Components (Matching Reference Design)
   ========================================================================== */

/* 1. Greeting Banner Card */
.greeting-banner-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.greeting-text h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 4px;
}

.greeting-text p {
  font-size: 13px;
  color: var(--text-black-soft);
}

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

.kpi-card {
  border-radius: var(--radius-card);
  padding: 22px;
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Distinct Vibrant Color Gradients */
.kpi-card.blue {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.kpi-card.green {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.kpi-card.orange {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.kpi-card.purple {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

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

.kpi-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.kpi-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.kpi-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
}

.kpi-subtext {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

/* 3. Quick Actions Strip */
.quick-actions-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.quick-actions-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-black-soft);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.quick-actions-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-action-pill {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-white);
  border: 1px solid var(--border-light);
  color: var(--text-black);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-action-pill:hover {
  background-color: var(--surface-neutral-cool);
  border-color: #cbd5e1;
  color: var(--brand-green);
}

.quick-action-pill:active {
  transform: scale(0.96);
}

/* 4. Structured 3-Column Analytics & Live Feed Grid */
.dashboard-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.analytics-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.analytics-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 12px;
}

.analytics-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
}

/* Revenue Gateway Breakdown Progress Bars */
.gateway-row {
  margin-bottom: 14px;
}

.gateway-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-track {
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Live Activity Feed List */
.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-hairline);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-content strong {
  color: var(--text-black);
}

.activity-time {
  font-size: 11px;
  color: var(--text-black-soft);
  margin-top: 2px;
}

/* ==========================================================================
   Customer Mobile View & Floating Frap Button
   ========================================================================== */

.customer-container {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
  background-color: var(--canvas-warm);
  min-height: 100vh;
  position: relative;
  padding-bottom: 90px;
  box-shadow: 0 0 20px rgba(0,0,0,0.06);
}

.customer-header {
  background-color: var(--house-green);
  color: var(--text-white);
  padding: 18px 20px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  box-shadow: var(--nav-shadow);
}

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

.table-tag {
  background-color: var(--green-accent);
  color: var(--text-white);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.table-selector-dropdown {
  background: var(--surface-white);
  color: var(--text-black);
  border-radius: var(--radius-card);
  padding: 12px;
  box-shadow: var(--modal-shadow);
  position: absolute;
  top: 60px;
  right: 20px;
  z-index: 50;
  display: none;
  width: 220px;
}

.table-selector-dropdown.show {
  display: block;
}

.customer-search-box {
  position: relative;
  margin-top: 10px;
}

.customer-search-input {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  padding: 9px 18px 9px 40px;
  color: var(--text-white);
  font-size: 14px;
  outline: none;
  font-family: var(--font-family);
  transition: var(--transition-fast);
}

.customer-search-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.customer-search-input:focus {
  background-color: var(--surface-white);
  color: var(--text-black);
  border-color: var(--surface-white);
}

.customer-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

/* Category Pills Bar */
.category-scroll-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

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

.category-pill {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background-color: var(--surface-white);
  color: var(--text-black-soft);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.category-pill:hover {
  background-color: var(--canvas-ceramic);
}

.category-pill.active {
  background-color: var(--green-accent);
  color: var(--text-white);
  border-color: var(--green-accent);
  box-shadow: 0 2px 6px rgba(0, 117, 74, 0.25);
}

/* Menu Items List */
.menu-container {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.food-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  gap: 14px;
  padding: 14px;
  transition: var(--transition-fast);
  position: relative;
}

.food-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 117, 74, 0.25);
}

.food-card.sold-out {
  opacity: 0.65;
  filter: grayscale(0.7);
}

.food-card-img-wrap {
  width: 105px;
  height: 105px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--canvas-ceramic);
  position: relative;
}

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

.food-card:hover .food-card-img {
  transform: scale(1.05);
}

.sold-out-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.food-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.food-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-black);
  line-height: 1.25;
}

.food-card-desc {
  font-size: 12px;
  color: var(--text-black-soft);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.food-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
}

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

.food-card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-green);
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  border-radius: var(--radius-pill);
  padding: 3px 6px;
}

.stepper-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-circle);
  background-color: var(--surface-white);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-black);
  user-select: none;
}

.stepper-btn:hover {
  background-color: var(--green-light);
  color: var(--brand-green);
}

.stepper-value {
  font-size: 13px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Floating "Frap" Circular Order Button (DESIGN.md section 4.1.8) */
.frap-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-circle);
  background-color: var(--green-accent);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--frap-shadow);
  border: none;
  cursor: pointer;
  z-index: 150;
  transition: var(--transition-fast);
}

.frap-btn:hover {
  background-color: var(--brand-green);
  transform: scale(1.05);
}

.frap-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.frap-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-red);
  color: var(--text-white);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface-white);
}

/* ==========================================================================
   Order Tracking & Waiting Mini-Game
   ========================================================================== */

.tracker-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  padding: 20px;
  margin-bottom: 20px;
}

.tracker-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 24px 0 20px;
}

.tracker-timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 20px;
  right: 20px;
  height: 3px;
  background-color: var(--border-light);
  z-index: 1;
}

.tracker-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 20%;
}

.tracker-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-circle);
  background-color: var(--surface-white);
  border: 3px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-black-soft);
  transition: var(--transition-fast);
}

.tracker-step.completed .tracker-dot {
  background-color: var(--green-accent);
  border-color: var(--green-accent);
  color: var(--text-white);
}

.tracker-step.active .tracker-dot {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--text-white);
  box-shadow: 0 0 0 4px var(--green-light);
  animation: pulseDot 2s infinite ease-in-out;
}

.tracker-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--text-black-soft);
}

.tracker-step.active .tracker-label,
.tracker-step.completed .tracker-label {
  color: var(--brand-green);
  font-weight: 700;
}

.countdown-box {
  background-color: var(--gold-lightest);
  border: 1px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 16px;
  text-align: center;
  margin-top: 16px;
}

.countdown-digits {
  font-size: 32px;
  font-weight: 800;
  color: #8c6721;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* Waiting Mini-Game Widget */
.mini-game-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  padding: 18px;
  margin-top: 20px;
  border-top: 3px solid var(--green-accent);
}

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

.game-tab-buttons {
  display: flex;
  gap: 6px;
}

/* Tic-Tac-Toe Board */
.tictactoe-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 240px;
  margin: 12px auto;
}

.tictactoe-cell {
  aspect-ratio: 1;
  background-color: var(--canvas-warm);
  border: 2px solid var(--border-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  cursor: pointer;
  color: var(--brand-green);
  transition: var(--transition-fast);
  user-select: none;
}

.tictactoe-cell:hover {
  background-color: var(--green-light);
  border-color: var(--green-accent);
}

.tictactoe-cell.o-cell {
  color: var(--gold);
}

/* Snake Game */
.snake-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#snakeCanvas {
  background-color: var(--house-green);
  border-radius: 8px;
  display: block;
}

.snake-controls {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 6px;
  margin-top: 8px;
}

.snake-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background-color: var(--canvas-ceramic);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}

.snake-ctrl-btn:active {
  background-color: var(--green-accent);
  color: var(--text-white);
}

/* ==========================================================================
   Kitchen Chef Panel (KDS) & Waiter Panel
   ========================================================================== */

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.kds-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-fast);
}

.kds-card.status-pending {
  border-top: 4px solid var(--color-yellow);
}

.kds-card.status-preparing {
  border-top: 4px solid var(--green-accent);
}

.kds-card.status-ready {
  border-top: 4px solid var(--brand-green);
}

.kds-header {
  padding: 14px 18px;
  background-color: var(--surface-neutral-cool);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.kds-table-badge {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-green);
}

.kds-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-black-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}

.kds-body {
  padding: 16px 18px;
  flex: 1;
}

.kds-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-hairline);
  font-size: 14px;
}

.kds-item-qty {
  font-weight: 700;
  color: var(--green-accent);
  margin-right: 8px;
}

.kds-notes {
  background-color: var(--gold-lightest);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  font-size: 12px;
  color: #79571b;
  margin-top: 12px;
  border-radius: 4px;
}

.kds-footer {
  padding: 14px 18px;
  background-color: var(--surface-neutral-cool);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.time-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.time-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background-color: var(--surface-white);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.time-pill:hover, .time-pill.selected {
  background-color: var(--green-accent);
  color: var(--text-white);
  border-color: var(--green-accent);
}

/* Table Grid for Waiter View */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.table-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.table-card.free {
  border-top: 4px solid #10b981;
}

.table-card.occupied {
  border-top: 4px solid var(--color-yellow);
}

.table-card.food_ready {
  border-top: 4px solid var(--green-accent);
  background-color: #f0fdf4;
}

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

.table-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-black);
}

/* ==========================================================================
   Manager Escalation Alert Banner
   ========================================================================== */

.escalation-banner {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid var(--color-red);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.escalation-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.escalation-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle);
  background-color: var(--color-red);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.escalation-text h3 {
  color: var(--color-red);
  font-size: 15px;
  margin-bottom: 2px;
}

.escalation-text p {
  color: #7f1d1d;
  font-size: 13px;
}

/* Data Table */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  background-color: var(--surface-white);
}

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

.data-table th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-black);
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* ==========================================================================
   Modals, Floating Labels, Keypad & Forms
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-card);
  box-shadow: var(--modal-shadow);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.25s ease-out;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-black);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-black-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-circle);
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-black);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

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

.form-group {
  margin-bottom: 16px;
  position: relative;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-black);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  background-color: var(--surface-white);
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green-accent);
  box-shadow: 0 0 0 3px var(--green-light);
}

/* Dual Login Tabs & Keypad */
.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.login-tab-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-black-soft);
  border-bottom: 3px solid transparent;
  transition: var(--transition-fast);
}

.login-tab-btn.active {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
}

.pin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--border-light);
  background-color: var(--canvas-ceramic);
  transition: var(--transition-fast);
}

.pin-dot.filled {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  box-shadow: 0 0 6px var(--green-light);
}

.numeric-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}

.keypad-btn {
  aspect-ratio: 1.25;
  border-radius: var(--radius-pill);
  background-color: var(--canvas-warm);
  border: 1px solid var(--border-light);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  user-select: none;
}

.keypad-btn:hover {
  background-color: var(--green-light);
  color: var(--brand-green);
}

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

.demo-credentials-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  margin-top: 18px;
  font-size: 12px;
}

.demo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.demo-cred-chip {
  padding: 5px 10px;
  background-color: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
  transition: var(--transition-fast);
}

.demo-cred-chip:hover {
  background-color: var(--green-accent);
  color: var(--text-white);
  border-color: var(--green-accent);
}

/* Payment Gateway Simulated Modals */
.bkash-header {
  background-color: #e2136e;
  color: #ffffff;
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
}

.nagad-header {
  background-color: #f7941d;
  color: #ffffff;
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
}

.ssl-header {
  background-color: #1976d2;
  color: #ffffff;
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
}

/* Invoice Printing Layout */
.invoice-sheet {
  background-color: var(--surface-white);
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  font-family: var(--font-family);
  color: var(--text-black);
}

.invoice-header {
  text-align: center;
  border-bottom: 2px dashed var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.invoice-row.total-row {
  border-top: 2px solid var(--brand-green);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-green);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid-3col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 12px;
  }
  .nav-link {
    white-space: nowrap;
  }
  .nav-subgroup {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .top-header-bar {
    padding: 12px 16px;
  }
  .main-content {
    padding: 16px;
  }
}
