/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CSS VARIABLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --void: #050507;
  --deep: #0d0d12;
  --surface: #13131a;
  --card: #1a1a24;
  --border: rgba(255,255,255,0.07);
  --amber: #f5a623;
  --amber-glow: rgba(245,166,35,0.15);
  --gold: #d4a843;
  --emerald: #2dd4a0;
  --rose: #f06b8a;
  --text: #e8e8f0;
  --muted: #7a7a9a;
  --dim: #4a4a6a;
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Playfair Display', serif;
  --font-mono: 'Space Mono', monospace;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 24px 60px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ar);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LANDING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.landing-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(245,166,35,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(45,212,160,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 20% 70%, rgba(240,107,138,0.06) 0%, transparent 50%);
}

.landing-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.landing-content {
  position: relative;
  text-align: center;
  z-index: 1;
  padding: 2rem;
  max-width: 700px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.75rem;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

.landing-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.landing-logo {
  font-family: var(--font-en);
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--amber) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
}

.landing-tagline {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--muted);
  margin-bottom: 3rem;
  line-height: 1.8;
}
.landing-tagline span { color: var(--amber); }

.landing-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 5rem;
  max-width: 800px;
}
@media(max-width:600px) { .landing-features { grid-template-columns: 1fr; } }

.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  text-align: right;
  transition: all 0.3s ease;
}
.feat-card:hover {
  border-color: rgba(245,166,35,0.3);
  transform: translateY(-4px);
  background: var(--surface);
}
.feat-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.feat-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feat-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.7; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn-primary {
  background: var(--amber);
  color: var(--void);
  border: none;
  padding: 14px 32px;
  border-radius: var(--r);
  font-family: var(--font-ar);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(245,166,35,0.5);
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 32px;
  border-radius: var(--r);
  font-family: var(--font-ar);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOMER MENU PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#menu-page {
  --restaurant-primary: #f5a623;
  --restaurant-secondary: #2dd4a0;
  --restaurant-dark: #0a0a0f;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--restaurant-dark);
  position: relative;
}

.menu-header {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.menu-cover-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(245,166,35,0.3) 0%, transparent 60%),
    linear-gradient(225deg, rgba(45,212,160,0.15) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5a623' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    #0f0a00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.menu-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,0.2) 0%, rgba(10,10,15,0.95) 100%);
}

.menu-header-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.lang-toggle {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 6px 4px;
  display: flex;
  gap: 2px;
  cursor: pointer;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--restaurant-primary);
  color: var(--void);
}

.menu-brand {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.menu-logo {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--restaurant-primary), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(245,166,35,0.4);
  margin-bottom: -24px;
}

.menu-brand-info { flex: 1; margin-bottom: -24px; }
.menu-restaurant-name { font-size: 1.6rem; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.menu-restaurant-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu-restaurant-desc .dot {
  width: 4px; height: 4px;
  background: var(--restaurant-primary);
  border-radius: 50%;
}

.menu-body { padding: 2rem 1rem 6rem; }

.menu-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}

.wa-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--r);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.wa-btn:hover {
  background: #20ba58;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
}
.wa-icon { font-size: 1.2rem; }

.rating-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
}
.stars { color: var(--amber); letter-spacing: -2px; font-size: 0.8rem; }

.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 72px;
}
.cat-tab:hover { border-color: rgba(245,166,35,0.3); background: var(--card); }
.cat-tab.active { background: var(--amber-glow); border-color: rgba(245,166,35,0.5); }
.cat-icon { font-size: 1.4rem; }
.cat-name { font-size: 0.7rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cat-tab.active .cat-name { color: var(--amber); }
.cat-count { font-size: 0.6rem; background: var(--card); padding: 1px 6px; border-radius: 100px; color: var(--dim); }
.cat-tab.active .cat-count { background: rgba(245,166,35,0.2); color: var(--amber); }

.cat-section { display: none; }
.cat-section.active { display: block; animation: fadeIn 0.3s ease; }

.cat-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.product-grid { display: flex; flex-direction: column; gap: 1rem; }

.product-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.product-card:hover { border-color: rgba(245,166,35,0.3); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.product-card:active { transform: scale(0.98); }

.product-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info { flex: 1; padding: 1rem 1rem 1rem 0; display: flex; flex-direction: column; }
.product-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.product-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--restaurant-primary); }

.add-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--restaurant-primary);
  border: none;
  color: var(--void);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 900;
  line-height: 1;
}
.add-btn:hover { transform: scale(1.15); box-shadow: 0 4px 16px rgba(245,166,35,0.5); }

.product-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--rose);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.order-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(13,13,18,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 1rem;
  display: none;
  z-index: 100;
}
.order-bar.visible { display: block; animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

.order-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--restaurant-primary);
  color: var(--void);
  padding: 14px 20px;
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESTAURANT LOGIN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow);
}

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-mark {
  font-family: var(--font-en);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo .logo-sub { font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); letter-spacing: 2px; }
.login-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.login-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 2rem; }
.login-hint { text-align: center; font-size: 0.75rem; color: var(--dim); margin-top: 1rem; font-family: var(--font-mono); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORMS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.5px; }
.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,166,35,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DASHBOARD LAYOUT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dash-sidebar {
  width: 240px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@media(max-width:768px) {
  .dash-sidebar { position: fixed; right: -240px; top: 0; bottom: 0; z-index: 200; transition: right 0.3s ease; }
  .dash-sidebar.open { right: 0; }
  .dash-main { margin-right: 0 !important; }
}

.sidebar-logo { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.sidebar-logo .logo-text {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo .logo-role {
  font-size: 0.7rem;
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  background: var(--amber-glow);
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 4px;
}

.sidebar-nav { flex: 1; }
.nav-section-label { font-size: 0.65rem; font-weight: 700; color: var(--dim); letter-spacing: 2px; text-transform: uppercase; padding: 0.5rem 1.5rem; margin-top: 0.5rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 1.5rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border-right: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.nav-item.active { background: var(--amber-glow); color: var(--amber); border-right-color: var(--amber); }
.nav-icon { font-size: 1.1rem; width: 20px; }

.sidebar-footer { padding: 1.5rem; border-top: 1px solid var(--border); }
.restaurant-badge { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--card); border-radius: var(--r); border: 1px solid var(--border); }
.restaurant-badge .r-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.r-name { font-size: 0.85rem; font-weight: 700; }
.r-plan { font-size: 0.7rem; color: var(--emerald); font-family: var(--font-mono); }

.dash-main { flex: 1; padding: 2rem; overflow-x: hidden; margin-right: 240px; }
@media(max-width:768px) { .dash-main { margin-right: 0; padding: 1rem; } }

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.dash-page-title { font-size: 1.6rem; font-weight: 800; }
.dash-page-sub { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
}
@media(max-width:768px) { .mobile-menu-btn { display: flex; } }

.dash-panel { display: none; }
.dash-panel.active { display: block; animation: fadeIn 0.3s ease; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  transition: all 0.3s ease;
}
.stat-card:hover { border-color: rgba(245,166,35,0.2); transform: translateY(-2px); }
.stat-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.stat-value { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; }
.stat-change { font-size: 0.75rem; color: var(--emerald); margin-top: 4px; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title { font-size: 1.1rem; font-weight: 800; }

.data-table { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.table-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  transition: background 0.2s;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: rgba(255,255,255,0.02); }
.table-row-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; overflow: hidden; }
.table-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; }
.row-name { font-weight: 700; font-size: 0.95rem; }
.row-sub { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.row-price { font-family: var(--font-mono); font-weight: 700; color: var(--amber); font-size: 0.95rem; }
.row-actions { display: flex; gap: 8px; }
.action-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.action-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.action-btn.delete:hover { background: rgba(240,107,138,0.1); border-color: rgba(240,107,138,0.3); color: var(--rose); }
.action-btn.edit:hover { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.3); color: var(--amber); }

.qr-panel { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 3rem; max-width: 400px; margin: 0 auto; }
.qr-frame { background: white; padding: 20px; border-radius: var(--r); box-shadow: 0 0 60px rgba(245,166,35,0.2); }
.qr-url { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-align: center; word-break: break-all; background: var(--surface); padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); width: 100%; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); }

.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.25rem;
}
.image-upload-area:hover { border-color: rgba(245,166,35,0.4); background: rgba(245,166,35,0.03); }
.upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-text { font-size: 0.8rem; color: var(--muted); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-logo {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-nav { display: flex; gap: 4px; }
.admin-nav-btn {
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ar);
  transition: all 0.2s;
}
.admin-nav-btn:hover { color: var(--text); background: var(--card); }
.admin-nav-btn.active { background: var(--amber-glow); color: var(--amber); }

.admin-body { padding: 2rem; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media(max-width:768px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:400px) { .admin-stats { grid-template-columns: 1fr; } }

.admin-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.25rem; }
.admin-stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.admin-stat-value { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.admin-stat-label { font-size: 0.75rem; color: var(--muted); }

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

.restaurant-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: all 0.3s ease; }
.restaurant-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); box-shadow: var(--shadow); }
.restaurant-card-header { height: 120px; position: relative; background: linear-gradient(135deg, var(--surface), var(--card)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.restaurant-card-body { padding: 1.25rem; }
.r-card-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.r-card-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; display: flex; gap: 8px; flex-wrap: wrap; }
.r-tag { padding: 2px 8px; border-radius: 100px; font-size: 0.7rem; font-weight: 600; }
.r-tag.active-tag { background: rgba(45,212,160,0.1); color: var(--emerald); border: 1px solid rgba(45,212,160,0.2); }
.r-tag.inactive-tag { background: rgba(240,107,138,0.1); color: var(--rose); border: 1px solid rgba(240,107,138,0.2); }
.r-tag.plan-tag { background: rgba(245,166,35,0.1); color: var(--amber); border: 1px solid rgba(245,166,35,0.2); }
.r-card-actions { display: flex; gap: 8px; }
.r-action {
  flex: 1;
  padding: 8px;
  border-radius: var(--r);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-ar);
  transition: all 0.2s;
}
.r-action:hover { color: var(--text); background: var(--card); }

/* Toggle switch */
.toggle-switch { position: relative; width: 44px; height: 24px; cursor: pointer; display: inline-block; }
.toggle-switch input { display: none; }
.toggle-track { position: absolute; inset: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; transition: all 0.3s; }
.toggle-switch input:checked + .toggle-track { background: var(--emerald); border-color: var(--emerald); }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: white; border-radius: 50%; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); z-index: 1; }
.toggle-switch input:checked ~ .toggle-thumb { left: 23px; }

/* Progress bar */
.progress-bar { height: 4px; background: var(--surface); border-radius: 100px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--amber), var(--gold)); transition: width 1s ease; }

/* Chart */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; padding: 8px 0; }
.chart-bar { flex: 1; background: linear-gradient(to top, var(--amber), rgba(245,166,35,0.3)); border-radius: 4px 4px 0 0; min-height: 8px; transition: all 0.5s ease; cursor: pointer; }
.chart-bar:hover { filter: brightness(1.3); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOAST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9000;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(45,212,160,0.4); color: var(--emerald); }
.toast.error { border-color: rgba(240,107,138,0.4); color: var(--rose); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.badge-dot.green { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.badge-dot.red { background: var(--rose); }

.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s;
  font-family: var(--font-ar);
  text-decoration: none;
}
.nav-back:hover { color: var(--text); background: var(--card); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DEMO SWITCHER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.demo-switcher {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: rgba(13,13,18,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}
.demo-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ar);
  white-space: nowrap;
  transition: all 0.2s;
  text-align: right;
  display: block;
}
.demo-btn:hover { color: var(--text); background: var(--card); }
.demo-btn.active { background: var(--amber-glow); color: var(--amber); }

[dir="ltr"] { direction: ltr; text-align: left; }
[dir="rtl"] { direction: rtl; text-align: right; }
