/* ==========================================================================
   Design Tokens — Warm Hospitality Palette
   ========================================================================== */
:root {
  --bg-surface: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-subtle: #F5F2ED;
  --ink-primary: #1C1917;
  --ink-secondary: #57534E;
  --ink-muted: #78716C;
  --border-subtle: #E7E5E4;
  --border-strong: #D6D3D1;

  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-soft: #FFF7ED;
  --accent-border: #FED7AA;

  --veg-green: #15803D;
  --veg-soft: #F0FDF4;
  --nonveg-red: #DC2626;
  --nonveg-soft: #FEF2F2;
  --warning-amber: #B45309;
  --warning-soft: #FFFBEB;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.06);
  --shadow-sheet: 0 -8px 30px rgba(28, 25, 23, 0.12);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 600px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

button:active:not(:disabled) {
  transform: scale(0.96);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.btn-lg {
  min-height: 50px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.btn-outline {
  background-color: var(--bg-card);
  color: var(--ink-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-subtle);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--bg-subtle);
}

.btn-upi {
  background-color: var(--veg-green);
  color: #FFFFFF;
}

.btn-upi:hover:not(:disabled) {
  background-color: #166534;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  background-color: var(--bg-subtle);
}

/* ==========================================================================
   Missing Params Screen
   ========================================================================== */
.missing-view {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.missing-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.missing-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background-color: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-border);
}

.missing-card h1 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.missing-card p {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   App Shell & Sticky Header
   ========================================================================== */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: 104px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 16px 10px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.restaurant-brand {
  min-width: 0;
}

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

.restaurant-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background-color: var(--warning-soft);
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
  flex-shrink: 0;
}

.restaurant-tagline {
  margin: 3px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.table-badge svg {
  color: var(--accent);
}

.closed-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background-color: var(--nonveg-soft);
  border: 1px solid #FECACA;
  color: var(--nonveg-red);
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search & Pure Veg Row */
.controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  border-color: var(--accent);
}

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

.clear-search-btn {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}

/* Pure Veg Toggle */
.veg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.veg-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.veg-switch-track {
  width: 34px;
  height: 20px;
  border-radius: var(--radius-pill);
  background-color: #D6D3D1;
  position: relative;
  transition: background-color 0.18s ease;
}

.veg-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #FFFFFF;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease;
}

.veg-toggle input:checked + .veg-switch-track {
  background-color: var(--veg-green);
}

.veg-toggle input:checked + .veg-switch-track .veg-switch-thumb {
  transform: translateX(14px);
}

.veg-toggle-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-primary);
}

/* Category Pills */
.category-bar {
  margin-top: 10px;
  margin-left: -16px;
  margin-right: -16px;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-pill.active {
  background-color: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Active Order Banner
   ========================================================================== */
.active-order-banner {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background-color: var(--veg-soft);
  border: 1px solid #BBF7D0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.active-order-banner-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.active-order-banner-info strong {
  display: block;
  font-size: 0.875rem;
  color: var(--veg-green);
}

.active-order-banner-info span {
  display: block;
  font-size: 0.775rem;
  color: var(--ink-secondary);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--veg-green);
  flex-shrink: 0;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* ==========================================================================
   Menu List & Dish Cards
   ========================================================================== */
.menu-main {
  padding: 14px 16px 24px;
}

.menu-section-title {
  margin: 18px 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-section-title:first-child {
  margin-top: 4px;
}

.menu-section-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dish-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow-xs);
  transition: opacity 0.2s ease;
}

.dish-card.is-unavailable {
  opacity: 0.58;
  background-color: #FAF9F7;
}

.dish-card.is-unavailable .dish-thumb img {
  filter: grayscale(85%);
}

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

.dish-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* Authentic Indian Veg / Non-Veg Dietary Marks */
.diet-badge {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diet-badge.veg {
  border: 1.5px solid var(--veg-green);
}

.diet-badge.veg::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--veg-green);
}

.diet-badge.nonveg {
  border: 1.5px solid var(--nonveg-red);
}

.diet-badge.nonveg::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-bottom: 8px solid var(--nonveg-red);
}

.dish-category-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dish-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.3;
}

.dish-price {
  margin: 4px 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.dish-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dish Media + Action Column */
.dish-media-col {
  width: 108px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dish-thumb {
  width: 108px;
  height: 92px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

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

.dish-action-wrap {
  margin-top: -16px;
  position: relative;
  z-index: 2;
  width: 92px;
}

.dish-media-col.no-image .dish-action-wrap {
  margin-top: 8px;
}

.add-btn {
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.825rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.add-btn:hover:not(:disabled) {
  background-color: var(--accent-soft);
}

.qty-stepper {
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.qty-stepper button {
  width: 30px;
  height: 36px;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-stepper span {
  font-size: 0.85rem;
  font-weight: 800;
}

.oos-badge {
  width: 100%;
  min-height: 34px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ==========================================================================
   Skeleton Loader
   ========================================================================== */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line,
.skeleton-thumb {
  background: linear-gradient(90deg, #F0EDE8 25%, #E7E3DC 50%, #F0EDE8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 6px;
}

.skeleton-line {
  height: 13px;
}

.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-90 { width: 90%; }

.skeleton-thumb {
  width: 108px;
  height: 92px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.menu-empty {
  text-align: center;
  padding: 44px 16px;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1rem;
}

.empty-sub {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Sticky Bottom Floating Cart Bar
   ========================================================================== */
.floating-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.floating-cart-btn {
  pointer-events: auto;
  width: 100%;
  max-width: calc(var(--max-width) - 32px);
  min-height: 54px;
  padding: 0 18px;
  border-radius: var(--radius-lg);
  background-color: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.floating-cart-btn:hover {
  background-color: var(--accent-hover);
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-count-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.2);
}

.cart-bar-total {
  font-size: 1.02rem;
  font-weight: 800;
}

.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9375rem;
  font-weight: 700;
}

/* ==========================================================================
   Slide-Up Bottom Sheet Cart Drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(28, 25, 23, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.drawer-backdrop.open {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  max-width: var(--max-width);
  margin: 0 auto;
  max-height: 88dvh;
  background-color: var(--bg-card);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-sheet);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom);
}

.cart-drawer.open {
  transform: translateY(0);
}

.drawer-handle {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
}

.drawer-handle span {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--border-strong);
}

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

.drawer-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.drawer-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}

.cart-items-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.cart-item-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cart-item-info .diet-badge {
  margin-top: 3px;
}

.cart-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.cart-item-unit {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

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

.cart-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  height: 36px;
  background-color: var(--bg-surface);
}

.cart-stepper button {
  width: 32px;
  height: 34px;
  font-weight: 800;
  color: var(--accent);
  font-size: 1rem;
}

.cart-stepper span {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-item-line-total {
  min-width: 54px;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Checkout Form */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

@media (max-width: 420px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.optional-tag {
  font-weight: 500;
  color: var(--ink-muted);
}

.required-star {
  color: var(--nonveg-red);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  font-size: 0.9rem;
  outline: none;
  resize: none;
}

.form-group input {
  min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background-color: var(--bg-card);
}

.form-group input.invalid {
  border-color: var(--nonveg-red);
}

.field-error {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nonveg-red);
}

.bill-breakdown {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.bill-total {
  padding-top: 6px;
  border-top: 1px dashed var(--border-strong);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.drawer-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}

.drawer-footer .btn-primary {
  justify-content: space-between;
  padding: 0 20px;
}

/* ==========================================================================
   Live Order Tracker View
   ========================================================================== */
.tracker-view {
  padding: 16px;
}

.tracker-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  box-shadow: var(--shadow-xs);
}

.tracker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.tracker-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.tracker-title {
  margin: 3px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.status-pill {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-pending {
  background-color: var(--warning-soft);
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
}

.status-preparing {
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.status-served {
  background-color: var(--veg-soft);
  color: var(--veg-green);
  border: 1px solid #BBF7D0;
}

.status-cancelled {
  background-color: var(--nonveg-soft);
  color: var(--nonveg-red);
  border: 1px solid #FECACA;
}

/* Order Stepper */
.order-stepper {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-stepper .step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  opacity: 0.45;
}

.order-stepper .step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: -14px;
  width: 2px;
  background-color: var(--border-subtle);
}

.order-stepper .step.completed,
.order-stepper .step.active {
  opacity: 1;
}

.order-stepper .step.completed::after {
  background-color: var(--veg-green);
}

.step-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.order-stepper .step.active .step-marker {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent);
}

.order-stepper .step.completed .step-marker {
  border-color: var(--veg-green);
  background-color: var(--veg-green);
  color: #FFFFFF;
}

.step-body strong {
  display: block;
  font-size: 0.9375rem;
}

.step-body span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.cancelled-box {
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--nonveg-soft);
  border: 1px solid #FECACA;
  color: var(--nonveg-red);
}

.cancelled-box p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

/* Tracker Summary */
.tracker-summary {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.tracker-summary-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.tracker-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracker-items-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.tracker-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-notes {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.tracker-total-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 800;
}

.tracker-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tracker-secondary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background-color: var(--ink-primary);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* ==========================================================================
   Web Admin & Counter Portal (/admin.html)
   ========================================================================== */
.admin-gate-card {
  text-align: left;
}

.admin-gate-card .missing-icon,
.admin-gate-card h1,
.admin-gate-card > p {
  text-align: center;
}

.admin-shell {
  padding-bottom: 40px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.admin-tab {
  min-height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.admin-tab.active {
  background-color: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFFFF;
}

.admin-tab-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  color: #FFFFFF;
}

.admin-section {
  padding: 14px 16px 24px;
}

.order-filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.order-filter-btn {
  min-height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.order-filter-btn.active {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-order-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table-pill {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-order-items {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-order-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.admin-notes-box {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background-color: var(--warning-soft);
  border: 1px solid #FDE68A;
  color: var(--warning-amber);
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-order-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.admin-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  font-size: 0.9rem;
}

/* ==========================================================================
   Payment Pills, On-Screen UPI QR & Printable Digital Invoice
   ========================================================================== */
.tracker-pills-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.payment-pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
}

.payment-pill.paid {
  background-color: var(--veg-soft);
  color: var(--veg-green);
  border: 1px solid #BBF7D0;
}

.payment-pill.unpaid {
  background-color: var(--warning-soft);
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
}

.tracker-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.upi-qr-panel {
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.upi-qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: left;
}

.upi-qr-img {
  width: 190px;
  height: 190px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  padding: 8px;
}

.upi-id-label {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
}

/* Digital Invoice Modal */
.invoice-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.invoice-sheet {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  max-height: 78dvh;
  overflow-y: auto;
  background-color: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sheet);
}

.invoice-actions {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  margin-top: 10px;
}

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

.invoice-modal-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.invoice-brand {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-strong);
}

.invoice-brand h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.invoice-brand p {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.inv-upi-text {
  font-weight: 700;
  color: var(--ink-primary) !important;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 12px 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.invoice-meta-grid strong {
  color: var(--ink-primary);
}

.inv-payment-stamp {
  text-align: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.inv-payment-stamp.paid {
  background-color: var(--veg-soft);
  color: var(--veg-green);
  border: 1px solid #BBF7D0;
}

.inv-payment-stamp.unpaid {
  background-color: var(--warning-soft);
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.invoice-table th {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-strong);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.invoice-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.invoice-table .num {
  text-align: right;
  white-space: nowrap;
}

.invoice-totals {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.invoice-footer-note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

@media print {
  body * {
    visibility: hidden;
  }
  #invoice-print-area,
  #invoice-print-area * {
    visibility: visible;
  }
  #invoice-print-area {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
    border: none;
    box-shadow: none;
  }
  .no-print {
    display: none !important;
  }
}
