:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-soft: #eef5f0;
  --primary: #15803d;
  --primary-dark: #14532d;
  --primary-light: #dcfce7;
  --accent: #ea580c;
  --accent-soft: #ffedd5;
  --gold: #eab308;
  --text: #18201a;
  --muted: #647468;
  --border: #e5ebe3;
  --danger: #dc2626;
  --shadow: 0 8px 24px rgba(20, 83, 45, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
  padding-bottom: 104px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Cover Banner (App Style) */
.store-cover {
  position: relative;
  height: 175px;
  background: radial-gradient(circle at 20% 20%, #dcfce7 0%, #f0fdf4 45%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  overflow: hidden;
}

.cover-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-dark);
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cover-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-toggle-btn {
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.currency-toggle-btn.is-usd {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.cover-logo-center {
  text-align: center;
  margin: auto 0;
  z-index: 1;
}

.cover-logo-word {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.cover-logo-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

/* Store Info Block */
.store-profile {
  padding: 16px 16px 12px;
  background: var(--surface);
}

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

.store-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-cover.has-custom-cover {
  background-size: cover;
  background-position: center;
}

.store-cover.has-custom-cover .cover-logo-center {
  display: none;
}

.store-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.25);
}

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

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

.store-title-row h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.store-rating {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}

.store-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.profile-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Delivery / Pickup Segmented Toggle */
.fulfillment-toggle {
  margin: 14px 0 12px;
  background: #f1f3f1;
  border-radius: 999px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.fulfillment-toggle button {
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.fulfillment-toggle button.active {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 83, 45, 0.22);
}

/* 3-Column Metrics Strip */
.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  padding: 10px 4px 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.info-strip-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 0 6px;
  min-width: 0;
}

.info-strip-item span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.info-strip-item + .info-strip-item {
  border-right: 1px solid var(--border);
}

/* Currency & Quick Bar */
.utility-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 14px;
  background: #fafcf9;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.rate-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.currency-switch {
  display: inline-flex;
  background: var(--surface-soft);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.currency-switch button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.currency-switch button.active {
  background: var(--primary);
  color: #fff;
}

/* Search drawer bar */
.search-bar-wrap {
  padding: 10px 16px 2px;
  display: none;
}

.search-bar-wrap.open {
  display: block;
}

.search-bar-wrap input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9faf8;
  font-size: 0.92rem;
}

/* Sticky Category Bar */
.sticky-cats {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}

.categories-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.cat-pill {
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 7px 15px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
}

.cat-pill.active {
  background: var(--primary-dark);
  color: #fff;
}

/* Menu Sections & Horizontal Cards */
.menu-sections {
  padding: 8px 16px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
}

.section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  border-bottom: 2px solid var(--primary-dark);
  padding-bottom: 2px;
  display: inline-block;
}

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

.menu-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  transition: box-shadow 0.15s ease;
}

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

.menu-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.menu-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.menu-card-desc {
  margin: 3px 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.price-main {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.price-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.price-old {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.78rem;
  margin-right: 6px;
}

.menu-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.circle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #fffbeb;
  color: #92400e;
  font-size: 1.1rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.1s ease, background 0.15s ease;
}

.circle-btn.plus {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

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

.qty-count {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.menu-card-thumb {
  width: 104px;
  height: 104px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%);
  border: 1px solid #d1fae5;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}

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

.menu-card-emoji {
  font-size: 48px;
  line-height: 1;
}

.thumb-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Sticky Bottom Cart Bar */
.bottom-cart-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  padding: 10px 14px 14px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 65%, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.bottom-cart-bar {
  pointer-events: auto;
  max-width: 788px;
  margin: 0 auto;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(20, 83, 45, 0.3);
}

.bottom-cart-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.96rem;
}

.bottom-count-box {
  background: #fff;
  color: var(--primary-dark);
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0 6px;
}

.bottom-cart-total {
  font-weight: 800;
  font-size: 0.98rem;
}

/* Floating Bot Button above Bottom Cart Bar */
.bot-fab {
  position: fixed;
  bottom: 78px;
  left: 18px;
  z-index: 50;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* Generic Buttons (shared with admin & drawers) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}

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

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

.btn-primary:hover {
  background: var(--primary-dark);
}

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

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-soft);
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 9px;
}

/* Drawers & Modals */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 60;
  display: none;
}

.overlay.open {
  display: block;
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -140%);
  width: min(440px, calc(100vw - 24px));
  z-index: 85;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.pwa-install-banner.open {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-card {
  background: #ffffff;
  border: 1px solid #d1e7d8;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(20, 83, 45, 0.18);
  display: flex;
  align-items: center;
  gap: 11px;
}

.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(20, 83, 45, 0.2);
}

.pwa-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pwa-install-text {
  flex: 1;
  min-width: 0;
}

.pwa-install-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.pwa-install-text p {
  margin: 2px 0 0;
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.35;
}

.pwa-install-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
}

.pwa-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
}

/* Vector UI icons */
.ui-ico {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.ui-ico-sm {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex-shrink: 0;
}

.ui-ico-xs {
  width: 15px;
  height: 15px;
  display: inline-block;
  flex-shrink: 0;
}

.ui-ico-strip {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex-shrink: 0;
}

.ui-ico-star {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
}

.profile-icon-wa {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #15803d !important;
}

.info-strip-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.fulfillment-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.bot-fab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: #f6f7f9;
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.16);
}

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

.drawer-header {
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid #eef0f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

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

.drawer-count-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.drawer-clear-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.drawer-clear-btn:hover {
  background: #fee2e2;
}

.drawer-close-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 18px;
}

.drawer-footer {
  padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid #e7ece8;
  background: var(--surface);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.cart-delivery-banner {
  background: var(--surface);
  border: 1px solid #e3efe6;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--text);
}

.cart-delivery-banner.unlocked {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.cart-progress-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.cart-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-card {
  background: var(--surface);
  border: 1px solid #eceff2;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.cart-item-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #f1f6f1;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 26px;
}

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

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

.cart-item-name {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.cart-item-line-total {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 3px;
}

.cart-item-note {
  font-size: 0.76rem;
  color: #15803d;
  background: #f0fdf4;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 4px;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f6f4;
  border: 1px solid #e2e8e4;
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.cart-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cart-step-btn.inc {
  background: var(--primary);
  color: #fff;
}

.cart-step-btn.trash {
  color: var(--danger);
  font-size: 0.82rem;
}

.cart-step-qty {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid #eceff2;
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.checkout-card h4 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  color: var(--text);
}

.checkout-card .form-group input {
  background: #f6f7f9;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.checkout-card .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.cart-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--muted);
}

.cart-summary-row strong {
  color: var(--text);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.02rem;
  font-weight: 800;
  padding-top: 7px;
  margin-top: 3px;
  border-top: 1px dashed #e2e8e4;
}

.cart-confirm-btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.22);
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  background: #fff;
}

/* Bot Window */
.bot-window {
  position: fixed;
  bottom: 84px;
  left: 16px;
  width: min(400px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 110px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  z-index: 55;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.bot-window.open {
  display: flex;
}

.bot-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f4f7f2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.msg-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

.msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.quick-replies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.quick-chip {
  border: 1px solid #bbf7d0;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.bot-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.bot-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.92rem;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c241e;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 95;
  display: none;
}

.toast.show {
  display: block;
}

/* Admin specific */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 24px;
  border: 1px solid #bbf7d0;
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.brand p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-card .value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 4px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: right;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

.tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 24px));
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  z-index: 80;
  display: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.modal-box.open {
  display: block;
}

/* Product Detail Bottom Sheet */
.menu-card {
  cursor: pointer;
}

.product-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 106%);
  width: min(560px, 100vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease;
}

.product-sheet.open {
  transform: translate(-50%, 0);
}

.sheet-body {
  padding: 16px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.sheet-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.sheet-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--primary-dark);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sheet-hero-media {
  width: 100%;
  height: 230px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%);
  border: 1px solid #d1fae5;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

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

.sheet-hero-emoji {
  font-size: 86px;
}

.sheet-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.sheet-desc {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.sheet-price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.sheet-note-input {
  width: 100%;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
}

.sheet-footer {
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.sheet-stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.sheet-stepper-row .circle-btn {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
}

.sheet-stepper-row .qty-count {
  font-size: 1.15rem;
  min-width: 32px;
}

.sheet-add-bar {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
}
