/* ============ علي الغربي - التصميم المشترك ============ */
:root {
  --ink: #14211f;
  --ink-2: #4a5a57;
  --ink-3: #8a9794;
  --bg: #f7f3ec;
  --surface: #ffffff;
  --line: #e7e0d4;
  --brand: #0e5a54;        /* أخضر الأهوار */
  --brand-2: #0a4440;
  --brand-soft: #e2efec;
  --accent: #e8992c;       /* زعفراني */
  --accent-soft: #fcefd9;
  --ok: #1f8a4c;  --ok-soft: #e1f3e8;
  --warn: #b7791f; --warn-soft: #fbf0d9;
  --bad: #c0392b;  --bad-soft: #fbe5e2;
  --info: #2a6fb0; --info-soft: #e3eef9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,33,31,.06), 0 6px 20px rgba(20,33,31,.06);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.55; min-height: 100vh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
body.no-nav { padding-bottom: 24px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.hidden { display: none !important; }

/* ---------- الهيكل ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--brand); color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  display: flex; align-items: center; gap: 12px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 10px; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { color: #fff; background: rgba(255,255,255,.12); }
.wrap { max-width: 620px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1180px; }
.section { margin: 18px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink-3); font-size: 12px; padding: 6px 0; border-radius: 12px; position: relative;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.on { color: var(--brand); font-weight: 600; }
.bottom-nav .dot {
  position: absolute; top: 2px; inset-inline-start: calc(50% + 6px);
  background: var(--bad); color: #fff; font-size: 11px; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}

/* ---------- عناصر ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap-row { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; min-height: 46px; transition: transform .08s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.accent { background: var(--accent); color: #241703; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.line { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: 10px; }
.btn.lg { min-height: 56px; font-size: 17px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); cursor: pointer; flex: none;
}
.icon-btn svg { width: 22px; height: 22px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 14px; min-height: 48px; outline: none; transition: border-color .15s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--brand); }
.input[dir=ltr] { text-align: right; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.b-pending { background: var(--warn-soft); color: var(--warn); }
.b-accepted, .b-ready { background: var(--info-soft); color: var(--info); }
.b-picked_up { background: var(--accent-soft); color: #8a5300; }
.b-delivered, .b-active { background: var(--ok-soft); color: var(--ok); }
.b-cancelled, .b-rejected, .b-suspended, .b-banned { background: var(--bad-soft); color: var(--bad); }
.b-muted { background: #efeae1; color: var(--ink-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px;
  white-space: nowrap; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat .k { font-size: 13px; color: var(--ink-2); }
.stat .v { font-size: 21px; font-weight: 700; margin-top: 4px; }
.stat.hl { background: var(--brand); color: #fff; } .stat.hl .k { color: rgba(255,255,255,.75); }
.stat.warn { background: var(--accent-soft); }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }
.empty svg { width: 56px; height: 56px; margin: 0 auto 10px; opacity: .5; }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #d9d2c5; border-radius: 30px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff; top: 3px; right: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { right: 25px; }

/* ---------- المتاجر والمنتجات ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  border-radius: 20px; padding: 18px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset-inline-start: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(232,153,44,.25); }
.hero h1 { font-size: 20px; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.cat {
  background: var(--surface); border-radius: var(--radius); padding: 14px 8px; text-align: center; cursor: pointer;
  box-shadow: var(--shadow); border: 2px solid transparent; font-weight: 600;
}
.cat .ic { width: 48px; height: 48px; margin: 0 auto 6px; border-radius: 14px; display: grid; place-items: center; }
.cat .ic svg { width: 28px; height: 28px; }
.cat.on { border-color: var(--brand); }
.ic-restaurant { background: #fde8d7; color: #c2571a; }
.ic-pharmacy { background: #dff1ea; color: #1b7a55; }
.ic-market { background: #e6eefb; color: #2f5fa8; }

.store-card { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.logo {
  width: 64px; height: 64px; border-radius: 14px; flex: none; object-fit: cover;
  background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); font-weight: 700; font-size: 22px;
}
.store-card.closed { opacity: .6; }
.product { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product:last-child { border-bottom: 0; }
.product .pimg { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex: none; background: #f0ebe2; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); border-radius: 12px; padding: 3px; }
.qty button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff; color: var(--brand); font-weight: 700; font-size: 18px; cursor: pointer; }
.qty b { min-width: 22px; text-align: center; }
.cartbar {
  position: fixed; inset-inline: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 35;
  max-width: 596px; margin: 0 auto; background: var(--accent); color: #241703; border-radius: 16px;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; box-shadow: 0 10px 30px rgba(232,153,44,.4); cursor: pointer; border: 0; width: calc(100% - 24px);
}

/* ---------- تتبع الطلب ---------- */
.track { list-style: none; padding: 0; margin: 8px 0 0; }
.track li { position: relative; padding: 0 30px 18px 0; color: var(--ink-3); }
.track li::before { content: ""; position: absolute; right: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.track li::after { content: ""; position: absolute; right: 12px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child::after { display: none; }
.track li.done { color: var(--ink); } .track li.done::before { background: var(--ok); }
.track li.now { color: var(--ink); font-weight: 700; } .track li.now::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.code-box { display: flex; gap: 8px; justify-content: center; direction: ltr; margin: 10px 0; }
.code-box b { width: 52px; height: 62px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 30px; }
.code-input { letter-spacing: 14px; text-align: center !important; font-size: 28px; font-weight: 700; direction: ltr; }

.order-card { border-inline-start: 5px solid var(--line); }
.order-card.s-pending { border-inline-start-color: var(--warn); }
.order-card.s-accepted, .order-card.s-ready { border-inline-start-color: var(--info); }
.order-card.s-picked_up { border-inline-start-color: var(--accent); }
.order-card.urgent { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,153,44,.6); } 50% { box-shadow: 0 0 0 8px rgba(232,153,44,0); } }
.lines { list-style: none; padding: 0; margin: 8px 0; }
.lines li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 700; font-size: 17px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }

/* ---------- النوافذ والتنبيهات ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,25,24,.5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s;
}
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 22px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); inset-inline: 12px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; max-width: 520px; width: 100%; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: up .2s; pointer-events: auto; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
.toast b { display: block; }
.banner { background: var(--accent-soft); color: #6b4300; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- شاشة الدخول ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 18px; max-width: 460px; margin: 0 auto; }
.auth .mark { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 24px; box-shadow: var(--shadow); }
.auth h1 { text-align: center; font-size: 26px; }
.auth .sub { text-align: center; color: var(--ink-2); margin: 4px 0 22px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; background: #ece5d8; border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tabs2 button { border: 0; background: transparent; padding: 10px; border-radius: 11px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.tabs2 button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- الأدمن ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: right; font-weight: 600; color: var(--ink-2); background: #faf7f1; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover { background: #fbf8f2; }
.admin-shell { display: block; }
.side { display: none; }
@media (min-width: 980px) {
  body.admin { padding-bottom: 0; }
  body.admin .bottom-nav { display: none; }
  .admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 60px); }
  .admin-shell > .wrap { width: 100%; }
  .side { display: block; background: var(--surface); border-inline-end: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; margin-bottom: 2px; position: relative; }
  .side a svg { width: 20px; height: 20px; }
  .side a.on { background: var(--brand-soft); color: var(--brand); }
  .side .dot { margin-inline-start: auto; background: var(--bad); color: #fff; font-size: 11px; border-radius: 9px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
  .stats.four { grid-template-columns: repeat(4, 1fr); }
}
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--ink-3); }
.bars .bar i { display: block; width: 100%; max-width: 36px; background: var(--brand); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.bars .bar span.v { color: var(--ink); font-weight: 600; font-size: 12px; }
.idimg { border-radius: 12px; border: 1px solid var(--line); max-height: 260px; object-fit: contain; background: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; }

/* أحجام الأيقونات داخل العناصر */
svg { flex: none; }
.btn svg, .banner svg, .chip svg, label svg, h3 svg, span svg, a.btn svg { width: 19px; height: 19px; }
.logo svg { width: 26px; height: 26px; }
.empty svg { width: 56px; height: 56px; }

/* ---------- خريطة المندوب ---------- */
.mapview { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; }
.map-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
#map-canvas { flex: 1; min-height: 200px; background: #e8e4dc; }
.map-sheet { background: var(--surface); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.08); margin-top: -14px; position: relative; z-index: 500; }
.map-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-legs > div { background: var(--bg); border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-legs b { margin-inline-start: auto; }
.mdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mdot.s { background: var(--accent); } .mdot.c { background: var(--ok); }
.mpin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.mpin.s { background: var(--accent); } .mpin.c { background: var(--ok); } .mpin.done { opacity: .5; }
.mpin.me { background: var(--info); animation: pulse-me 1.6s infinite; }
@keyframes pulse-me { 0% { box-shadow: 0 0 0 0 rgba(42,111,176,.6); } 70% { box-shadow: 0 0 0 14px rgba(42,111,176,0); } 100% { box-shadow: 0 0 0 0 rgba(42,111,176,0); } }
.leaflet-container { font-family: var(--font); }

/* ---------- عدّاد عرض الطلب للمندوب ---------- */
.offer-timer { background: var(--accent-soft); color: #6b4300; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.offer-timer .bar { height: 8px; background: rgba(0,0,0,.08); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.offer-timer .bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width 1s linear; }
.offer-timer.low { background: var(--bad-soft); color: var(--bad); }
.offer-timer.low .bar i { background: var(--bad); }
.nodriver { text-align: center; border: 2px solid var(--accent); background: var(--accent-soft); }

/* ---------- مركز الإشعارات ---------- */
.bell { position: relative; }
.bell-dot { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--brand); }
.notif { padding: 12px 14px; margin-bottom: 8px; }
.notif.unread { border-inline-start: 4px solid var(--accent); background: #fffaf1; }
.notif.click { cursor: pointer; }

/* ---------- نجوم التقييم ---------- */
.stars { display: inline-flex; align-items: center; gap: 2px; direction: ltr; }
.stars label { cursor: pointer; font-size: 30px; line-height: 1; padding: 0 1px; }
.stars span { color: #d9d2c5; transition: color .1s, transform .1s; display: inline-block; }
.stars span.on { color: var(--accent); transform: scale(1.08); }
.stars small { direction: rtl; margin-inline-start: 8px; min-width: 52px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.admin-only { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* ---------- مراحل التوصيل ---------- */
.msteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 12px 0 6px; position: relative; }
.msteps > div { text-align: center; font-size: 12px; color: var(--ink-3); position: relative; }
.msteps i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--line); margin: 0 auto 4px; position: relative; z-index: 1; }
.msteps > div::before { content: ""; position: absolute; top: 6px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line); }
.msteps > div:last-child::before { display: none; }
.msteps > div.on { color: var(--ink); font-weight: 600; }
.msteps > div.on i { background: var(--ok); }
.msteps > div.on::before { background: var(--ok); }
.msteps small { display: block; color: var(--ink-3); font-weight: 400; min-height: 16px; }
.eta-line { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin: 6px 0; }
.eta-card { text-align: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.eta-card .big { font-size: 34px; font-weight: 700; line-height: 1.1; margin: 6px 0; }
.eta-card .sub { opacity: .85; }
.track-map { height: 240px; border-radius: 14px; overflow: hidden; margin-top: 12px; background: #e8e4dc; }
.mpin.dm-free { background: var(--ok); } .mpin.dm-busy { background: var(--accent); } .mpin.dm-bad { background: var(--bad); } .mpin.dm-stale, .mpin.dm-off { background: #9aa5a3; }

/* ---------- التقرير الشهري ---------- */
.month-card { display: block; color: inherit; }
.mstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mstats > div { background: var(--bg); border-radius: 10px; padding: 8px; }
.mstats span { display: block; font-size: 12px; color: var(--ink-2); }
.mstats b { font-size: 15px; }
.mstats .hl { background: var(--brand-soft); } .mstats .hl b { color: var(--brand); }
.mbars { height: 120px; gap: 2px; } .mbars .bar i { max-width: 16px; border-radius: 4px 4px 2px 2px; } .mbars .bar span { font-size: 9px; }
.print-only { display: none; }
@media (min-width: 700px) { .stats.five { grid-template-columns: repeat(5, 1fr); } }
@media print {
  .topbar, .bottom-nav, .side, .no-print, .toasts, #sound-banner { display: none !important; }
  .print-only { display: block; margin-bottom: 12px; }
  body { background: #fff; padding: 0; } .wrap { max-width: none; } .card, .stat, .table-wrap { box-shadow: none; border: 1px solid #ddd; }
  .admin-shell { display: block; }
}

/* ---------- دليل المندوبين ---------- */
.drv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.drv-card { margin: 0; }
.drv-photo { width: 76px; height: 96px; border-radius: 14px; object-fit: cover; background: var(--brand-soft); flex: none; display: grid; place-items: center; color: var(--brand); }
.drv-photo svg { width: 34px; height: 34px; }
.drv-id { width: 150px; height: 94px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f0ebe2; }
.code-shown { font-size: 18px; letter-spacing: 2px; background: var(--accent-soft); padding: 2px 8px; border-radius: 8px; }

/* بعد استلام الطلب من المطعم: بطاقة التوجه للزبون */
.to-cust { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: #e6f2ef; border: 1.5px solid #0e5a54; }
.to-cust .tc-name { font-size: 19px; font-weight: 700; margin: 4px 0 2px; color: #0e5a54; }

/* الأقسام المتوقفة مؤقتاً */
.cat.soon { position: relative; opacity: .55; filter: grayscale(.7); cursor: not-allowed; }
.cat.soon .soon-tag { position: absolute; top: 6px; inset-inline-start: 6px; background: #e8992c; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; filter: none; }

/* شريط الأعلى: ما ينكسر سطرين على الموبايل */
.topbar { gap: 8px; }
.topbar .brand { min-width: 0; flex: 1 1 auto; }
.topbar .brand .bt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 0 0 0; }
.topbar label span { white-space: nowrap; }
@media (max-width: 380px) { .topbar .brand .bt { display: none; } }
