/* ============================================
   MENUORDER PARCHI - Shared Styles
   Modern, Mobile-First Design System
   ============================================ */

:root {
  /* Brand Colors - Inspired by Chai Ghati's warm aesthetic */
  --primary: #2d5a27;
  --primary-dark: #1e3d1a;
  --primary-light: #4a8b42;
  --accent: #f5c518;
  --accent-dark: #d4a90f;

  /* Neutral Colors */
  --bg-dark: #1a1a1a;
  --bg-card: #242424;
  --bg-card-hover: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #d0d0d0;
  --text-muted: #9a9a9a;

  /* Status Colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

  /* Transitions - Standardized timing */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Typography Scale - Standardized sizes */
  --text-xs: 0.6875rem;    /* 11px - badges, micro text */
  --text-sm: 0.75rem;      /* 12px - labels, secondary info */
  --text-base: 0.875rem;   /* 14px - body text, buttons */
  --text-lg: 1rem;         /* 16px - large body */
  --text-xl: 1.125rem;     /* 18px - section titles */
  --text-2xl: 1.25rem;     /* 20px - card titles */
  --text-3xl: 1.5rem;      /* 24px - page titles */

  /* Border Colors */
  --border-color: rgba(255, 255, 255, 0.1);

  /* Safe Areas for Mobile */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

/* Dark theme (default) */
[data-theme="dark"] {
  --bg-dark: #1a1a1a;
  --bg-card: #242424;
  --bg-card-hover: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #d0d0d0;
  --text-muted: #9a9a9a;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Light theme option */
/* WCAG AA compliant contrast ratios (minimum 4.5:1 for normal text, 3:1 for large text) */
[data-theme="light"] {
  --bg-dark: #f5f5f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f0;
  --text-primary: #1a1a1a;          /* Contrast: 16.1:1 on #f5f5f5 ✓ */
  --text-secondary: #4a4a4a;        /* Contrast: 7.7:1 on #f5f5f5 ✓ (was #525252 = 5.7:1) */
  --text-muted: #5c5c5c;            /* Contrast: 5.5:1 on #f5f5f5 ✓ (was #737373 = 4.0:1 ✗) */
  --border-color: rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(80px + var(--safe-bottom));
}

/* ============================================
   Typography
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

/* ============================================
   Header
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg, linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%));
  color: #ffffff;
  padding: var(--space-md) var(--space-md);
  padding-top: calc(var(--space-md) + 20px + var(--safe-top));
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

/* Header Top Awning Pattern */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: repeating-linear-gradient(90deg,
      #a8d24e,
      #a8d24e 30px,
      #ffffff 30px,
      #ffffff 60px);
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Awning Scallops */
.header::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
  background-image: radial-gradient(circle at 15px -5px, #a8d24e 15px, transparent 16px),
    radial-gradient(circle at 45px -5px, #ffffff 15px, transparent 16px);
  background-size: 60px 10px;
  z-index: 9;
}

.header-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 100%;
  flex: 1;
  text-align: left;
  position: relative;
  z-index: 2;
}

.shop-logo-img {
  height: 65px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition-normal), filter var(--transition-normal);
  color: inherit;
}

[data-theme="light"] .shop-logo-img {
  filter: brightness(0) saturate(100%) invert(18%) sepia(34%) saturate(840%) hue-rotate(63deg) brightness(97%) contrast(94%) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.shop-logo-img:hover {
  transform: scale(1.05);
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.theme-icon-light {
  color: #fbbf24;
  display: none;
}

.theme-icon-dark {
  color: #e2e8f0;
  display: block;
}

/* Show sun icon in dark mode, moon icon in light mode */
[data-theme="dark"] .theme-icon-light,
.theme-toggle[data-theme="dark"] .theme-icon-light {
  display: block;
}

[data-theme="dark"] .theme-icon-dark,
.theme-toggle[data-theme="dark"] .theme-icon-dark {
  display: none;
}

[data-theme="light"] .theme-icon-light,
.theme-toggle[data-theme="light"] .theme-icon-light {
  display: none;
}

[data-theme="light"] .theme-icon-dark,
.theme-toggle[data-theme="light"] .theme-icon-dark {
  display: block;
}

.shop-logo {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.shop-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-tagline {
  font-size: 0.85rem;
  color: inherit;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  :root {
    /* Header on mobile: padding-top (8px + 26px awning) + logo (44px) + padding-bottom (8px) ≈ 86px */
    --header-height: 78px;
  }

  .header {
    padding: var(--space-sm) var(--space-md);
    /* Account for awning pattern (16px stripe + 10px scallops) + safe area */
    padding-top: calc(var(--space-sm) + 26px + var(--safe-top));
  }

  .header::before {
    height: 12px;
  }

  .header::after {
    top: 12px;
    height: 8px;
    background-image: radial-gradient(circle at 12px -4px, #a8d24e 12px, transparent 13px),
      radial-gradient(circle at 36px -4px, #ffffff 12px, transparent 13px);
    background-size: 48px 8px;
  }

  .header-content {
    gap: var(--space-sm);
  }

  .shop-tagline {
    display: none;
  }

  .shop-logo-img {
    height: 44px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .theme-icon {
    font-size: 1rem;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  :root {
    /* Header on small mobile: padding-top (4px + 20px awning) + logo (38px) + padding-bottom (4px) ≈ 66px */
    --header-height: 62px;
  }

  .header {
    padding: var(--space-xs) var(--space-sm);
    padding-top: calc(var(--space-xs) + 20px + var(--safe-top));
  }

  .header::before {
    height: 10px;
  }

  .header::after {
    top: 10px;
    height: 6px;
    background-image: radial-gradient(circle at 10px -3px, #a8d24e 10px, transparent 11px),
      radial-gradient(circle at 30px -3px, #ffffff 10px, transparent 11px);
    background-size: 40px 6px;
  }

  .shop-logo-img {
    height: 38px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .theme-icon {
    font-size: 0.875rem;
  }
}

/* ============================================
   Category Navigation (Horizontal Scroll)
   ============================================ */

.category-nav {
  position: sticky;
  /* Header height: padding-top (16px + 20px awning + safe-top) + logo (65px) + padding-bottom (16px) ≈ 117px on desktop */
  /* Use CSS calc with custom property for flexibility */
  top: var(--header-height, 105px);
  z-index: 95;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  /* Ensure no gap by adding negative margin and padding compensation */
  margin-top: -1px;
  padding-top: 1px;
}

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

.category-list {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
}

.category-pill {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.category-pill:hover,
.category-pill:focus {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.category-pill.active {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
  font-weight: 600;
}

.category-pill .icon {
  font-size: 1rem;
}

/* ============================================
   Menu Container
   ============================================ */

.menu-container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-md);
}

/* ============================================
   Category Section
   ============================================ */

.category-section {
  margin-bottom: var(--space-xl);
  scroll-margin-top: 140px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent);
}

.category-header .icon {
  font-size: 1.5rem;
}

.category-header h2 {
  color: var(--accent);
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Menu Items
   ============================================ */

.menu-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.menu-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.menu-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

.menu-item.in-cart {
  border-color: var(--accent);
  background: rgba(245, 197, 24, 0.1);
}

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

.item-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.item-price {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
}

/* Variant Selector (for S/M/L items) */
.variant-selector {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.variant-btn {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.variant-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.variant-btn.selected {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
  font-weight: 600;
}

/* Add to Cart Button */
.add-btn {
  flex-shrink: 0;
  /* WCAG 2.5.5: Minimum touch target size 44x44px for accessibility */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.add-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

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

/* Quantity Controls */
.qty-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--primary);
  border-radius: var(--radius-full);
  padding: var(--space-xs);
}

.qty-btn {
  /* WCAG 2.5.5: Minimum touch target size 44x44px for accessibility */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  color: white;
}

/* ============================================
   Floating Cart Button
   ============================================ */

.cart-float {
  position: fixed;
  bottom: calc(var(--space-lg) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(245, 197, 24, 0.3);
  cursor: pointer;
  transition: all var(--transition-normal);
  min-width: 280px;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.cart-float.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cart-float:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 197, 24, 0.4);
}

.cart-info {
  display: flex;
  flex-direction: column;
}

.cart-items-count {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.cart-action {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--accent);
  color: var(--primary-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ============================================
   Search Bar
   ============================================ */

.search-container {
  padding: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: var(--space-md);
  padding-left: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.2);
}

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
  pointer-events: none;
}

/* ============================================
   Active Order Banner
   ============================================ */

.active-order-banner {
  position: fixed;
  top: calc(85px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
  max-width: calc(100% - 2rem);
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.active-order-banner:hover {
  transform: translateX(-50%) scale(1.02);
}

.active-order-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.active-order-icon {
  font-size: 1.25rem;
}

.active-order-text {
  font-size: 0.875rem;
  font-weight: 600;
}

.active-order-action {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* ============================================
   Cart Page Styles
   ============================================ */

.cart-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.cart-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: var(--space-md);
  padding-top: calc(var(--space-md) + var(--safe-top));
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cart-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
}

.cart-content {
  flex: 1;
  padding: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.cart-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.cart-item-variant {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-price {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

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

/* Cart Summary */
.cart-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
  border-bottom: none;
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
  border-top: 2px solid var(--accent);
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-row.total .amount {
  color: var(--accent);
}

/* ============================================
   Payment Options
   ============================================ */

.payment-section {
  margin-top: var(--space-xl);
}

.payment-title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.payment-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.payment-btn:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.payment-btn.recommended {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.payment-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.payment-btn.whatsapp .payment-icon {
  background: #25D366;
}

.payment-info {
  flex: 1;
}

.payment-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.payment-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.payment-badge {
  background: var(--success);
  color: white;
  font-size: 0.625rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   Token Page
   ============================================ */

.token-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--bg-dark) 100%);
}

.token-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 350px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.token-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  background: var(--success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
  }
}

.token-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.token-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-lg);
}

.token-message {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.token-order-summary {
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  text-align: left;
}

.token-order-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.token-order-total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
}

.new-order-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.new-order-btn:hover {
  background: var(--primary-light);
}

/* ============================================
   Owner Dashboard Styles
   ============================================ */

.dashboard {
  min-height: 100vh;
  min-height: 100dvh;
}

.dashboard-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + var(--safe-top));
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.dashboard-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: var(--space-md);
  margin-top: calc(-1 * var(--space-lg));
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card.pending .stat-value {
  color: var(--warning);
}

/* Order Tabs */
.order-tabs {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.order-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.order-tab.active {
  background: var(--accent);
  color: var(--primary-dark);
}

.order-tab .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  margin-left: var(--space-xs);
}

.order-tab.active .badge {
  background: rgba(0, 0, 0, 0.2);
}

/* Order Cards */
.orders-container {
  padding: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.order-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.order-card.pending {
  border-color: var(--warning);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
}

.order-token {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.order-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-card-body {
  padding: var(--space-md);
}

.order-items-list {
  margin-bottom: var(--space-md);
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
  font-weight: 600;
}

.complete-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--success);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
}

.complete-btn:hover {
  background: #16a34a;
  transform: scale(1.02);
}

.completed-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  color: var(--success);
  font-weight: 500;
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state-desc {
  font-size: 0.875rem;
}

/* ============================================
   Utilities
   ============================================ */

/* Display utilities */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Margin utilities */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Padding utilities */
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Gap utilities */
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

.slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (min-width: 768px) {
  .menu-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg) var(--space-md);
  margin-top: auto;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-logo {
  height: 32px;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--accent);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-copyright a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-copyright a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Mobile Footer */
@media (max-width: 480px) {
  .site-footer {
    padding: var(--space-md);
    padding-bottom: calc(var(--space-md) + var(--safe-bottom));
  }

  .footer-links {
    gap: var(--space-md);
  }
}