:root {
  /* ===== الهوية: لون أساسي دافئ واحد + محايدات ===== */
  --primary: #f04e23;       /* برتقالي/أحمر دافي يرمز للطعام */
  --primary-600: #d33e16;   /* درجة أغمق للضغط */
  --primary-050: #fff1ec;   /* درجة فاتحة جداً للخلفيات الخفيفة */
  --bg: #f5f5f3;            /* رمادي فاتح دافئ */
  --card: #ffffff;
  --text: #18181b;
  --muted: #6a7280;
  --border: #e9e9e5;
  --ok: #15803d;
  --err: #dc2626;

  /* ===== مقياس مسافات منتظم (4px base) ===== */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
}

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

html, body { overflow-x: hidden; }

/* ===== بانر المتصفح المدمج (in-app) ===== */
.inapp-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.inapp-text { flex: 1; line-height: 1.25; color: #fff; }
.inapp-open {
  flex: 0 0 auto;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.inapp-close {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
/* تعويض ارتفاع البانر (44px) حتى لا يغطّي المحتوى */
body.inapp.map-page .topbar { margin-top: 44px; }
body.inapp.map-page .map-controls { top: 96px; }
body.inapp.map-page .empty-hint { top: 248px; }
body.inapp.detail-page { padding-top: 44px; }
body.inapp.detail-page .detail-back { top: 60px; }

body {
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar {
  background: var(--primary);
  color: #fff;
  padding: var(--s-4) var(--s-5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  z-index: 1000;
}

.topbar h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }

.badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== صفحة الخريطة (ثيم داكن مينمال) ===== */
.map-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #20232a; }

#map {
  flex: 1;
  width: 100%;
  background: #20232a;
}
/* رفع الإضاءة على البلاطات الداكنة لتصير رمادي أنعم */
.map-page .leaflet-tile {
  filter: brightness(1.85) contrast(0.92);
}

/* شريط علوي داكن نحيف */
.map-page .topbar {
  background: rgba(18, 19, 23, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--s-3) var(--s-4);
}
.map-page .topbar h1 { font-size: 1.05rem; }
.topbar-login {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
/* عدّاد المفتوحة داخل زر المبدّل */
#status-toggle #truck-count { font-weight: 800; }

/* زر عائم "موقعي" */
/* زر موقعي — صغير دائري تحت يمين */
.fab {
  position: fixed;
  bottom: 92px;
  right: 14px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 24, 29, 0.95);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-size: 1.05rem;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.fab:active { transform: scale(0.93); }

/* إخفاء شريط حقوق الخريطة (Leaflet/OSM) */
.map-page .leaflet-control-attribution { display: none; }

/* تلميح فارغ — ما فيه تركات أونلاين */
.empty-hint {
  position: fixed;
  top: 204px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(22, 24, 29, 0.95);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

/* علامة التراك — إيموجي أو لوقو */
.truck-marker { background: none; border: none; }
.truck-pin,
.logo-pin {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1d22;
  border: 2px solid var(--primary);
  border-radius: 50% 50% 50% 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.truck-pin { font-size: 22px; line-height: 1; }
.logo-pin img { width: 100%; height: 100%; object-fit: cover; }

/* ===== شريط البحث + الفلترة ===== */
.map-controls {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 520px;
  z-index: 1000;
  padding: 10px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.search-wrap, .chips, .chip, .status-toggle, .st-btn { pointer-events: auto; }

.search-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 24, 29, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.search-icon { opacity: 0.6; font-size: 0.95rem; }
.search-box {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f3f4f6;
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 0;
}
.search-box::placeholder { color: #8b94a3; }

.chips {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  background: rgba(22, 24, 29, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  border-radius: 999px;
  padding: 8px 15px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* مبدّل واحد: المفتوحة الآن ⇄ جميع التركات */
.status-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(22, 24, 29, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 16px;
  color: #f3f4f6;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  white-space: nowrap;
}
.status-toggle:active { transform: scale(0.97); }
.status-toggle.all { border-color: var(--primary); color: #ffb59c; }

/* العلامة المغلقة — باهتة */
.truck-pin.closed,
.logo-pin.closed {
  filter: grayscale(1);
  opacity: 0.5;
  border-color: #6b7280;
}

/* ===== الشريط السفلي ===== */
/* الورقة السفلية — بطاقة واحدة عند الضغط على ترك */
.truck-strip {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 520px;
  z-index: 900;
  display: none;
  padding: 0 14px;
}
.ts-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22, 24, 29, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ts-go {
  margin-inline-start: auto;
  color: #ff8a5c;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.ts-card:active { transform: scale(0.98); }
.ts-card.closed { opacity: 0.6; }
.ts-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  margin-left: 6px;
  vertical-align: middle;
}
.ts-dot.open { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.ts-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  background: #0f1115;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ts-logo img { width: 100%; height: 100%; object-fit: cover; }
.ts-emoji { font-size: 22px; }
.ts-info { flex: 1; min-width: 0; overflow: hidden; }
.ts-name {
  color: #f3f4f6;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ts-cat { color: #9ca3af; font-size: 0.8rem; margin-top: 2px; }

/* النافذة المنبثقة للتراك (داكنة) — Leaflet */
.map-page .leaflet-popup-content-wrapper {
  background: #16181d;
  color: #f3f4f6;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.map-page .leaflet-popup-tip { background: #16181d; }
.map-page .leaflet-popup-close-button { color: #9ca3af; }
.truck-popup { width: 250px; text-align: right; }
.tp-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.tp-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tp-badge,
.tp-status {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.tp-status.open { background: rgba(22, 163, 74, 0.18); color: #4ade80; }
.tp-status.closed { background: rgba(255, 255, 255, 0.06); color: #9ca3af; }
.tp-name { margin: 8px 0 2px; font-size: 1.05rem; color: #f3f4f6; }
.tp-desc { color: #9ca3af; font-size: 0.85rem; margin-bottom: 8px; }
.tp-menu { list-style: none; padding: 0; margin: 0; }
.tp-menu li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}
.mi-name { color: #e5e7eb; }
.mi-price { color: #ff6b75; font-weight: 700; }
.tp-details {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #ff8a5c;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ===== صفحة تفاصيل الترك (وضع داكن) ===== */
.detail-page { background: #14161b; min-height: 100vh; color: #e5e7eb; }
.detail-back {
  position: fixed;
  top: var(--s-4);
  right: var(--s-4);
  z-index: 10;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.detail-hero {
  height: 240px;
  background: linear-gradient(135deg, #2a2e36, #16181d);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-hero-fallback { font-size: 80px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.35));
}
.detail-body {
  max-width: 560px;
  margin: -28px auto 0;
  position: relative;
  background: #14161b;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--s-6) var(--s-5) var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* أسطح ونصوص داكنة داخل صفحة التفاصيل */
.detail-page .card,
.detail-page .d-card {
  background: #1d2026;
  border-color: rgba(255, 255, 255, 0.08);
}
.detail-page .card-title { border-bottom-color: rgba(255, 255, 255, 0.08); }
.detail-page .d-desc,
.detail-page .d-rating,
.detail-page .rs-count,
.detail-page .rv-time,
.detail-page .rv-body,
.detail-page .d-empty { color: #9ca3af; }
.detail-page .d-menu .mi-name,
.detail-page .rv-name,
.detail-page .rs-avg { color: #f3f4f6; }
.detail-page .d-menu li { border-bottom-color: rgba(255, 255, 255, 0.08); }
.detail-page .d-cat { background: rgba(240, 78, 35, 0.16); color: #ff8a5c; }
.detail-page .rv-item { border-bottom-color: rgba(255, 255, 255, 0.08); }
.detail-page .review-form { border-top-color: rgba(255, 255, 255, 0.08); }
.detail-page .review-form input,
.detail-page .review-form textarea {
  background: #14161b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}
.detail-page .star-pick button { color: #4b5563; }
.detail-page .star-pick button.on { color: #f5a623; }

/* معرض صور المنتجات */
.d-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.d-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.d-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.d-head h1 { font-size: 1.6rem; font-weight: 800; }
.d-status { flex: 0 0 auto; font-size: 0.85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.d-status.open { background: #ecfdf5; color: var(--ok); }
.d-status.closed { background: #f3f4f6; color: var(--muted); }
.d-meta { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: calc(var(--s-4) * -1 + 2px); }
.d-cat {
  background: var(--primary-050);
  color: var(--primary-600);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 999px;
}
.d-rating { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.d-rating .stars { color: #f5a623; letter-spacing: 1px; }
.d-desc { color: var(--muted); line-height: 1.7; }
.d-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: 0;
  text-decoration: none;
}
.d-card { padding: var(--s-5); }
.d-menu { list-style: none; padding: 0; margin: 0; }
.d-menu li {
  display: flex;
  justify-content: space-between;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.d-menu li:last-child { border-bottom: none; }
.d-menu .mi-name { color: var(--text); }
.d-menu .mi-price { color: var(--primary); font-weight: 700; }
.d-empty { color: var(--muted); text-align: center; padding: var(--s-3) 0; }

/* التقييمات */
.d-review-summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.d-review-summary:empty { display: none; }
.rs-avg { font-size: 1.6rem; font-weight: 800; }
.rs-count { color: var(--muted); font-size: 0.9rem; }
.stars { color: #f5a623; letter-spacing: 1px; }

.d-reviews { display: flex; flex-direction: column; gap: var(--s-3); }
.rv-item { border-bottom: 1px solid var(--border); padding-bottom: var(--s-3); }
.rv-item:last-child { border-bottom: none; padding-bottom: 0; }
.rv-top { display: flex; align-items: center; gap: var(--s-2); }
.rv-name { font-weight: 700; }
.rv-time { color: var(--muted); font-size: 0.8rem; margin-inline-start: auto; }
.rv-body { color: var(--muted); margin-top: var(--s-1); line-height: 1.6; }

/* نموذج كتابة التقييم */
.review-form {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.rv-label { font-weight: 700; margin-bottom: var(--s-2); }
.star-pick { display: flex; gap: var(--s-1); margin-bottom: var(--s-3); }
.star-pick button {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #d1d5db;
  cursor: pointer;
  padding: 0 2px;
}
.star-pick button.on { color: #f5a623; }
.review-form input,
.review-form textarea {
  width: 100%;
  margin-bottom: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: #fafafa;
  color: var(--text);
}
.review-form textarea { min-height: 80px; resize: vertical; }
.review-form input:focus,
.review-form textarea:focus { outline: 2px solid var(--primary); background: #fff; }
.review-form .btn-primary { margin-top: 0; }

/* تصحيح اتجاه نص Leaflet */
.leaflet-popup-content { margin: 12px; }

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-6);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.card h2 { margin-bottom: var(--s-3); font-size: 1.2rem; font-weight: 800; }
.card p { color: var(--muted); margin-top: var(--s-2); line-height: 1.7; }

.status {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  background: #f3f4f6;
  font-weight: 600;
}
.status.ok { background: #ecfdf5; color: var(--ok); }
.status.err { background: #fef2f2; color: var(--err); }

/* ===== شاشة دخول أصحاب التركات ===== */
.auth-page {
  background: var(--bg);
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(240, 78, 35, 0.10), transparent 60%);
  min-height: 100vh;
}
.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding: var(--s-6) var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-6);
}
.auth-brand { text-align: center; }
.auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--s-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--primary);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(240, 78, 35, 0.4);
}
.auth-brand h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-tagline {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.auth-card { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 18px 40px rgba(0, 0, 0, 0.07); }
.auth-back {
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.auth-back:hover { color: var(--primary); }
.auth-note {
  margin-top: var(--s-4);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ===== نماذج الدخول/التسجيل ===== */
.tabs {
  display: flex;
  gap: var(--s-1);
  margin-bottom: var(--s-5);
  background: #f1f1f4;
  padding: var(--s-1);
  border-radius: var(--radius-sm);
}
.tab {
  flex: 1;
  padding: var(--s-3);
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

form label,
.card > label {
  display: block;
  margin: var(--s-4) 0 var(--s-2);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
form input,
form select,
.card > input:not(.file-input-hidden),
.card > select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: #fafafa;
  color: var(--text);
}
form input:focus,
form select:focus,
.card > input:focus,
.card > select:focus { outline: 2px solid var(--primary); background: #fff; }

.btn-primary, .btn-secondary {
  width: 100%;
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { transform: scale(0.99); }
.btn-secondary { background: #f1f1f4; color: var(--text); }
.btn-secondary:active { transform: scale(0.99); }

/* زر تحديث الموقع — أهدأ، تحت الزر الكبير مباشرة */
.btn-loc {
  margin-top: var(--s-3);
  background: var(--primary-050);
  color: var(--primary-600);
  font-size: 0.95rem;
}

/* ===== لوحة التحكم ===== */
.status-card { border-top: 4px solid var(--primary); }

.dash-greeting {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.dash-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--primary-050);
  border-radius: 16px;
}
.dash-hello { color: var(--muted); font-size: 0.85rem; margin: 0; }
.dash-truck { font-size: 1.35rem; font-weight: 800; margin: 2px 0 0; }

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}

/* مؤشّر الحالة */
.state-label {
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  font-size: 0.95rem;
}
.state-label.online { background: #ecfdf5; color: var(--ok); }
.state-label.offline { background: #f3f4f6; color: var(--muted); }

.big-toggle {
  width: 100%;
  padding: var(--s-7);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.05s;
}
.big-toggle:active { transform: scale(0.98); }
.big-toggle.on { background: #16a34a; }   /* اضغط لتشغيل */
.big-toggle.off { background: #6b7280; }  /* اضغط لإيقاف */

.loc-info {
  margin-top: var(--s-3);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.hint {
  margin-top: var(--s-4);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== محرر المنيو والصورة ===== */
.file-input-hidden { display: none; }
.file-drop {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-2) !important;
  padding: var(--s-5);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.file-drop:hover { border-color: var(--primary); color: var(--primary); }

.btn-add {
  width: 100%;
  margin-top: var(--s-3);
  padding: var(--s-3);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-add:hover { border-color: var(--primary); color: var(--primary); }

.btn-logout {
  display: block;
  margin: 0 auto;
  padding: var(--s-3) var(--s-5);
  border: none;
  background: transparent;
  color: var(--err);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ===== منتقي الموقع (دبوس قابل للسحب) ===== */
.loc-picker {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  background: rgba(0, 0, 0, 0.55);
}
.lp-sheet {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.lp-title { font-size: 1.2rem; font-weight: 800; }
.lp-hint { color: var(--muted); font-size: 0.88rem; margin: var(--s-2) 0 var(--s-4); line-height: 1.6; }
.lp-map {
  height: 300px;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.lp-pin { font-size: 30px; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.5)); cursor: grab; }
.lp-pin-wrap { background: none; border: none; }
.lp-actions { display: flex; gap: var(--s-3); margin-top: var(--s-4); }
.lp-actions .btn-primary,
.lp-actions .btn-secondary { margin-top: 0; flex: 1; }
.lp-cancel {
  display: block;
  width: 100%;
  margin-top: var(--s-3);
  padding: var(--s-2);
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: var(--s-3);
}

/* شبكة تعديل صور المنتجات (لوحة التحكم) */
.gallery-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.gallery-edit:empty { display: none; }
.ge-item { position: relative; }
.ge-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}
.ge-del {
  position: absolute;
  top: 4px;
  inset-inline-start: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}
.menu-row {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-2);
  align-items: center;
}
.menu-row .mi-item { flex: 2; }
.menu-row .mi-price { flex: 1; }
.menu-row input { margin: 0; }
.menu-row .mi-del {
  flex: 0 0 40px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #fef2f2;
  color: var(--err);
  font-size: 1rem;
  cursor: pointer;
}
