/* ============================================================
   مزج — نظام التصميم الموحد (RTL، يدعم الشاشات الصغيرة والوضع الداكن)
   ============================================================ */
:root {
  --brand: #0f4c5c; --brand-2: #16697a; --brand-ink: #ffffff;
  --accent: #e36414; --accent-soft: #fbe6d8;
  --bg: #f6f3ee; --surface: #ffffff; --surface-2: #f0ece4; --line: #e3ddd2;
  --ink: #1d2327; --ink-2: #5b6268; --ink-3: #8a9097;
  --ok: #2a7d4f; --ok-soft: #e1f2e8; --warn: #a86400; --warn-soft: #fbefd9; --bad: #b3261e; --bad-soft: #fbe3e1;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(20,30,40,.06), 0 4px 16px rgba(20,30,40,.06);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4fb3bf; --brand-2: #6cc5cf; --brand-ink: #0b1f24; --accent: #f08a4b; --accent-soft: #3a2618;
    --bg: #121618; --surface: #1a2024; --surface-2: #222a2f; --line: #2e383e;
    --ink: #e8ecee; --ink-2: #aab3b8; --ink-3: #7c868c;
    --ok: #5cc28a; --ok-soft: #173326; --warn: #e5a54b; --warn-soft: #362812; --bad: #f2867d; --bad-soft: #3b1a18;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.3; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1.05rem; }
.boot { display: grid; place-items: center; height: 100vh; font-size: 2.5rem; font-weight: 700; color: var(--brand); }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: var(--brand-ink); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
        position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { font-size: 1.6rem; font-weight: 700; padding: 4px 10px 14px; letter-spacing: -.5px; }
.logo small { display: block; font-size: .75rem; font-weight: 400; opacity: .75; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: inherit;
         text-decoration: none; opacity: .88; }
.nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.nav a.active { background: rgba(255,255,255,.18); opacity: 1; font-weight: 600; }
.nav .ico { width: 20px; text-align: center; }
.side-foot { margin-top: auto; font-size: .85rem; opacity: .85; padding: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.side-foot button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.main { min-width: 0; }
.topbar { display: flex; gap: 10px; align-items: center; padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line);
          position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.topbar .grow { flex: 1; }
.topbar select { width: auto; min-width: 150px; max-width: 260px; }
.menu-btn { display: none; }
.page { padding: 22px; max-width: 1280px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; flex: 1; }

/* ---------- عناصر ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }
.page-head select { width: auto; min-width: 170px; }
.row > input, .row > select { width: auto; flex: 1 1 170px; min-width: 120px; }
a.btn { text-decoration: none; color: inherit; } a.btn.primary, a.btn.accent { color: #fff; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .88rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; }
.num { text-align: left; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; }

.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
       font-weight: 500; display: inline-flex; align-items: center; gap: 6px; justify-content: center; min-height: 38px; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--ink-3); border-top-color: transparent;
                   border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }

input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px;
                          min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
input[type=checkbox] { width: auto; min-height: auto; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field-label { font-size: .88rem; color: var(--ink-2); font-weight: 500; }
.hint { color: var(--ink-3); font-size: .8rem; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; cursor: pointer; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.brand { background: var(--brand); color: var(--brand-ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface-2); font-weight: 600; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--surface-2); }
.empty { padding: 28px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.modal-back { position: fixed; inset: 0; background: rgba(10,20,25,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(520px, 100%); max-height: 92vh; display: flex; flex-direction: column;
         box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-start; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }

#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: max-content; max-width: min(460px, 92vw); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: opacity .4s; }
.toast-error { background: var(--bad); color: #fff; } .toast-ok { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); } .alert.info { background: var(--surface-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list li:last-child { border-bottom: 0; }

/* ---------- الدخول ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--brand); color: var(--brand-ink); padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.auth-art h1 { font-size: 3rem; margin: 0; } .auth-art p { font-size: 1.1rem; opacity: .9; max-width: 420px; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form form { width: min(380px, 100%); }

/* ---------- الكاشير ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; height: 100vh; height: 100dvh; overflow: hidden; }
.pos-left { display: flex; flex-direction: column; min-width: 0; }
.pos-top { display: flex; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.pos-top input { max-width: 340px; }
.cats { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; flex-shrink: 0; }
.cat { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.cat.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.products { flex: 1; overflow-y: auto; padding: 4px 14px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-content: start; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: right;
         display: flex; flex-direction: column; gap: 6px; min-height: 92px; transition: transform .08s; }
.pcard:hover { border-color: var(--brand-2); } .pcard:active { transform: scale(.97); }
.pcard b { font-weight: 600; } .pcard .price { color: var(--brand); font-weight: 700; margin-top: auto; }
.pcard .stock { font-size: .75rem; color: var(--ink-3); } .pcard .stock.neg { color: var(--bad); }
.cart { background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; }
.cart-lines { flex: 1; overflow-y: auto; padding: 6px 14px; }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.cline .mods { font-size: .8rem; color: var(--ink-2); grid-column: 1 / -1; }
.qtyctl { display: flex; align-items: center; gap: 4px; }
.qtyctl button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.cart-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.totals div { display: flex; justify-content: space-between; } .totals .grand { font-size: 1.3rem; font-weight: 700; }
.pay-btn { min-height: 54px; font-size: 1.1rem; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--surface); padding: 7px 6px; cursor: pointer; font-size: .85rem; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.methods button { min-height: 52px; }
.offline-pill { background: var(--warn-soft); color: var(--warn); padding: 4px 10px; border-radius: 99px; font-size: .8rem; }
.online-pill { background: var(--ok-soft); color: var(--ok); padding: 4px 10px; border-radius: 99px; font-size: .8rem; }

/* ---------- الإيصال والطباعة ---------- */
.receipt { width: 72mm; font-size: 12px; color: #000; background: #fff; padding: 4mm; font-family: var(--font); }
.receipt h4 { text-align: center; margin: 0 0 2px; font-size: 15px; }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt table td, .receipt table th { padding: 2px 0; border: 0; font-size: 11px; background: none; color: #000; }
.receipt .qr { display: flex; justify-content: center; margin-top: 6px; }
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  @page { margin: 0; size: 80mm auto; }
}

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: 260px; z-index: 40; transform: translateX(100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: -8px 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page { padding: 14px; }
  .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px; } .auth-art h1 { font-size: 2.2rem; }
  .pos { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .cart { max-height: 60vh; border-inline-start: 0; border-top: 2px solid var(--brand); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .cart-lines { min-height: 96px; }
  .cart-head { padding: 8px 12px; }
  .products { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  td[data-label] { white-space: nowrap; }
}

[hidden] { display: none !important; }

/* ---------- المشتريات والمحاسبة ---------- */
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); }
.pi-lines { display: flex; flex-direction: column; gap: 8px; }
.pi-line.card { padding: 10px; box-shadow: none; background: var(--surface-2); }
.pi-line .row { margin-bottom: 6px; }
.pi-line .row > select, .pi-line .row > input { flex: 1 1 200px; }
.pi-nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; }
.pi-nums .field { margin: 0; }
.fin { width: 100%; border-collapse: collapse; }
.fin td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.fin td.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin tr.sec td { font-weight: 700; background: var(--surface-2); }
.fin tr.tot td { font-weight: 700; border-top: 2px solid var(--ink-3); }
.fin tr.grand td { font-size: 1.1rem; font-weight: 700; color: var(--brand); }
.je { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.je-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.je-head .grow { flex: 1; }
.je table { width: 100%; font-size: .88rem; margin-top: 6px; }
.je td { padding: 2px 4px; } .je td.num { text-align: left; font-variant-numeric: tabular-nums; width: 110px; }
.je.reversed { opacity: .6; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar { display: grid; grid-template-columns: 140px 1fr 90px; gap: 8px; align-items: center; font-size: .9rem; }
.bar i { display: block; height: 10px; border-radius: 5px; background: var(--accent); }
.bar .num { text-align: left; font-variant-numeric: tabular-nums; }

/* ---------- المساعد الذكي ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 120px); max-width: 860px; margin: 0 auto; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-start; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-end; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg img.att { max-width: 180px; max-height: 180px; border-radius: 8px; display: block; margin-bottom: 6px; }
.msg .att-pdf { font-size: .85rem; opacity: .85; }
.msg.typing { color: var(--ink-3); }
.prop { align-self: stretch; border: 1px solid var(--brand-2); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.prop h4 { margin: 0 0 8px; }
.prop.done { border-color: var(--ok); opacity: .8; }
.prop table { width: 100%; }
.prop td input { width: 100%; min-width: 60px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: 10px 12px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--surface); }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.2rem;
  cursor: pointer; display: grid; place-items: center; flex: none; }
.round.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.round.rec { background: var(--bad); color: #fff; border-color: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(179,38,30,.15); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .88rem; }
.chip:hover { border-color: var(--brand-2); }
.pending-att { display: flex; gap: 6px; flex-wrap: wrap; }
.pending-att span { background: var(--surface-2); border-radius: 8px; padding: 4px 8px; font-size: .82rem; }
@media (max-width: 900px) {
  .pi-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chat { height: calc(100vh - 110px); }
  .bar { grid-template-columns: 100px 1fr 80px; }
}

/* ---------- علامة سنيد ---------- */
:root[data-brand="saned"] {
  --brand: #1d4d3c; --brand-2: #2b6a52; --accent: #c8932a; --accent-soft: #f6ecd6;
  --bg: #f4f2ea; --surface-2: #ecebe1; --line: #dfdccf;
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="saned"]:not([data-theme="light"]) {
    --brand: #6fbf9a; --brand-2: #8ad0ae; --brand-ink: #0c1f17; --accent: #e3b356; --accent-soft: #3a2f16;
    --bg: #111613; --surface: #18201b; --surface-2: #202a24; --line: #2c3830;
  }
}
.auth-art ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; opacity: .92; }
.auth-art li::before { content: '✓  '; color: var(--accent); font-weight: 700; }

/* ---------- المطاعم: الصالة والمطبخ ---------- */
.chip.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.table-card { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: right; padding: 12px; min-height: 104px;
  border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.table-card b { font-size: 1.05rem; }
.table-card .amt { font-size: 1.2rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.table-card.busy { border-color: var(--warn); background: var(--warn-soft); }
.table-card.ready { border-color: var(--ok); background: var(--ok-soft); }
.table-card.paid { border-color: var(--brand-2); }
.table-card.calling { box-shadow: 0 0 0 3px var(--accent); animation: pulse 1.4s infinite; }
.table-card .call { font-size: .85rem; font-weight: 700; color: var(--accent); }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.kds-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kds-card header { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; background: var(--surface-2); }
.kds-card header b { font-size: 1.2rem; }
.kds-card.late { border-color: var(--bad); } .kds-card.late header { background: var(--bad-soft); }
.kds-card.warm { border-color: var(--warn); }
.kds-item { display: flex; gap: 8px; align-items: flex-start; width: 100%; padding: 8px 12px; border: 0; border-top: 1px solid var(--line);
  background: none; text-align: right; font: inherit; color: inherit; cursor: pointer; }
.kds-item .q { font-weight: 700; min-width: 28px; }
.kds-item.preparing { background: var(--warn-soft); } .kds-item.ready { background: var(--ok-soft); text-decoration: line-through; opacity: .75; }
.kds-item small { display: block; color: var(--ink-2); }
.kds-card footer { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); }
.kds-card footer .btn { flex: 1; }
.qr-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm; padding: 4mm; }
.qr-card { border: 1px dashed #999; border-radius: 6px; padding: 6mm 4mm; text-align: center; break-inside: avoid; color: #000; }
.qr-card .qr-name { font-size: 18pt; font-weight: 700; margin-top: 2mm; }

/* ---------- صفحة العميل (QR) ---------- */
body.guest { background: var(--bg); }
.guest-wrap { max-width: 640px; margin: 0 auto; padding: 12px 14px 96px; }
.guest-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0 12px; }
.guest-head h1 { margin: 0; font-size: 1.3rem; color: var(--brand); }
.guest-cats { position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 2; overflow-x: auto; flex-wrap: nowrap; }
.guest-cats .chip { white-space: nowrap; }
.guest-list { display: flex; flex-direction: column; gap: 8px; }
.guest-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-align: right; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.guest-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.gi-text { flex: 1; display: flex; flex-direction: column; }
.gi-price { font-weight: 700; color: var(--brand); white-space: nowrap; }
.gi-add { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.guest-foot { text-align: center; margin-top: 20px; }
.guest-cart { position: fixed; inset-inline: 14px; bottom: 14px; max-width: 612px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; padding: 14px 18px; border: 0; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font: inherit;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); cursor: pointer; }
.guest .modal textarea { width: 100%; margin-top: 8px; }
.online-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.online-card.new { border: 2px solid var(--bad); animation: pulse 1.6s infinite; }
.track { list-style: none; padding: 0; display: flex; justify-content: space-between; gap: 4px; margin: 14px 0 0; counter-reset: s; }
.track li { flex: 1; text-align: center; font-size: .82rem; color: var(--ink-3); position: relative; padding-top: 30px; }
.track li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; inset-inline: 0; margin: auto; width: 24px; height: 24px;
  border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; }
.track li.done { color: var(--ok); font-weight: 600; } .track li.done::before { background: var(--ok); color: #fff; content: '✓'; }

/* ---------- الموارد البشرية والمهام ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--ink-2); } .kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.grid2 > .card + .card { margin-top: 0; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.plain-list { list-style: none; margin: 10px 0 0; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.warn-text { color: #b45309; font-weight: 600; }
.btn.big { font-size: 1.1rem; padding: 14px 22px; width: 100%; max-width: 360px; }
.clock-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 14px; }
.clock-times { display: flex; gap: 28px; justify-content: center; }
.clock-times div { display: flex; flex-direction: column; } .clock-times small { color: var(--ink-2); } .clock-times b { font-size: 1.4rem; }
.task-card { display: flex; gap: 12px; align-items: flex-start; }
.task-card.done { opacity: .6; } .task-card.done .task-title { text-decoration: line-through; }
.task-card.overdue { border-inline-start: 4px solid #dc2626; }
.task-title { font-weight: 600; }
.insp-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.insp-item .insp-text { flex: 1 1 200px; }
.insp-item input[type=text] { flex: 1 1 160px; }

/* ---------- الولاء وبطاقات الهدايا ---------- */
.cust-info .alert { margin: 0 0 10px; }
.gift-print { text-align: center; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.gift-print h2 { margin: 4px 0; }
.gift-amount { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gift-code { font-family: ui-monospace, monospace; font-size: 1.35rem; letter-spacing: 2px; background: var(--surface-2, #f3f1ec); padding: 8px; border-radius: 8px; direction: ltr; }
.seg-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.wa-btn { background: #25d366; color: #fff !important; border-color: #25d366; }
.ledger-pos { color: var(--ok); } .ledger-neg { color: var(--bad); }

/* ---------- الحجوزات ---------- */
.res-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.res-card.new { border-inline-start: 4px solid #d97706; }
.res-card.late { border-inline-start: 4px solid var(--bad); }
.res-time { display: flex; flex-direction: column; align-items: center; min-width: 64px; background: var(--surface-2, #f3f1ec); border-radius: 10px; padding: 8px; }
.res-time b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.res-actions { flex-basis: 100%; justify-content: flex-end; }
.res-ticket .res-big { display: flex; justify-content: space-around; text-align: center; margin: 14px 0; }
.res-ticket .res-big div { display: flex; flex-direction: column; } .res-ticket .res-big b { font-size: 1.5rem; }

/* ---------- شاشات العرض ---------- */
body.display { background: #0b1f26; color: #f4f1ea; margin: 0; overflow: hidden; }
.disp-wrap { height: 100vh; display: flex; flex-direction: column; padding: 2vh 2.5vw; box-sizing: border-box; gap: 2vh; }
.disp-head { display: flex; justify-content: space-between; align-items: center; }
.disp-head h1 { margin: 0; font-size: 3.2vh; } .disp-head small { opacity: .7; font-size: 1.8vh; }
.disp-logo { height: 6vh; border-radius: 8px; margin-inline-end: 12px; }
.disp-clock { font-size: 3vh; font-variant-numeric: tabular-nums; opacity: .85; }
.disp-cols { flex: 1; display: grid; grid-template-columns: 1fr 1.3fr; gap: 2vw; min-height: 0; }
.disp-col { background: rgba(255,255,255,.05); border-radius: 18px; padding: 2vh 1.5vw; overflow: hidden; }
.disp-col h2 { margin: 0 0 2vh; font-size: 3.6vh; text-align: center; }
.disp-col.ready h2 { color: #4ade80; }
.disp-grid { display: flex; flex-wrap: wrap; gap: 1.5vh; justify-content: center; align-content: flex-start; }
.disp-no { font-size: 7vh; font-weight: 700; min-width: 13vh; text-align: center; padding: 1vh 1.5vh; border-radius: 14px; background: rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.disp-no.ok { background: #166534; color: #fff; }
.disp-no small { font-size: 3vh; margin-inline-start: 6px; }
.disp-no.flash { animation: dispflash 1s ease-in-out 4; }
@keyframes dispflash { 50% { transform: scale(1.12); background: #22c55e; } }
.disp-msg { text-align: center; font-size: 2.6vh; opacity: .85; }
.disp-sound { position: fixed; bottom: 2vh; left: 2vw; background: #f59e0b; color: #111; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; cursor: pointer; }
.disp-menu { flex: 1; column-gap: 3vw; overflow: hidden; }
.disp-cat { break-inside: avoid; margin-bottom: 2.5vh; }
.disp-cat h2 { color: #fbbf24; font-size: 3.4vh; margin: 0 0 1vh; border-bottom: 2px solid rgba(251,191,36,.35); padding-bottom: .6vh; }
.disp-item { display: flex; align-items: center; gap: 1.2vw; padding: .8vh 0; font-size: 2.6vh; }
.disp-item img { width: 7vh; height: 7vh; object-fit: cover; border-radius: 10px; }
.disp-item-t { flex: 1; display: flex; flex-direction: column; } .disp-item-t small { opacity: .6; font-size: 1.8vh; }
.disp-price { font-weight: 700; font-variant-numeric: tabular-nums; color: #fbbf24; }
.disp-center { align-items: center; justify-content: center; text-align: center; font-size: 3vh; }
.disp-welcome { font-size: 8vh; margin: 0; }
.disp-points { color: #fbbf24; }
.disp-cart { flex: 1; overflow: auto; font-size: 3.2vh; }
.disp-line { display: flex; justify-content: space-between; padding: 1.2vh 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.disp-line small { display: block; opacity: .6; font-size: 2vh; }
.disp-total { font-size: 3.4vh; } .disp-total .grand { font-size: 6vh; display: flex; justify-content: space-between; }
.disp-fail { text-align: center; padding-top: 30vh; }
@media (max-width: 700px) { .disp-cols { grid-template-columns: 1fr; } .disp-no { font-size: 5vh; } body.display { overflow: auto; } }

/* ---------- مشاريع العمل ---------- */
.wp-card { cursor: pointer; }
.wp-card:hover { border-color: var(--brand-2); }
.wp-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.wp-bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

/* ---------- الأرشيف والخزنة ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.doc-grid > .card + .card { margin-top: 0; }
.doc-card { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.doc-card.expiring { border-inline-start: 4px solid #d97706; }
.doc-card.expired { border-inline-start: 4px solid var(--bad); }
.doc-ico { font-size: 1.8rem; line-height: 1; }
.chip.small { padding: 2px 8px; font-size: .75rem; }
.acc-card { display: flex; flex-direction: column; gap: 6px; }
code.secret { direction: ltr; background: var(--surface-2, #f3f1ec); padding: 2px 8px; border-radius: 6px; font-size: .95rem; user-select: all; }

/* ---------- لوحة المنصة ---------- */
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; overflow-x: auto; }
.mini-bar { flex: 1 0 14px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.mini-bar span { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.mini-bar small { font-size: .65rem; color: var(--ink-2); }
/* واجهة API */
pre.code { background: var(--surface-2, #f4f4f5); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 13px; text-align: left; white-space: pre; }
input.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* الجداول على الجوال: كل صف بطاقة، والعمود يظهر كعنوان صغير بجانب القيمة */
@media (max-width: 640px) {
  .table-wrap:has(td[data-label]) { overflow: visible; border: 0; background: none; box-shadow: none; }
  .table-wrap:has(td[data-label]) table, .table-wrap:has(td[data-label]) tbody { display: block; width: 100%; }
  .table-wrap:has(td[data-label]) thead { display: none; }
  .table-wrap:has(td[data-label]) tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); padding: 8px 12px; margin-bottom: 8px; }
  .table-wrap:has(td[data-label]) td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; white-space: normal; text-align: start; min-height: 0; }
  .table-wrap:has(td[data-label]) td + td { border-top: 1px dashed var(--line); }
  .table-wrap:has(td[data-label]) td::before { content: attr(data-label); color: var(--ink-3); font-size: .8rem; flex-shrink: 0; }
  .table-wrap:has(td[data-label]) td[data-label=""]::before { display: none; }
  .table-wrap:has(td[data-label]) td[data-label=""] { justify-content: flex-end; }
  .table-wrap:has(td[data-label]) td:empty { display: none; }
  .table-wrap:has(td[data-label]) td > * { max-width: 70%; overflow-wrap: anywhere; }
  .table-wrap:has(td[data-label]) td[data-label=""] > * { max-width: 100%; }
  .table-wrap:has(td[data-label]) td.num { font-variant-numeric: tabular-nums; }
}
@media (max-width: 640px) {
  .table-wrap:has(td[data-label]) td:first-child { font-weight: 600; justify-content: flex-start; }
  .table-wrap:has(td[data-label]) td:first-child::before { display: none; }
  .table-wrap:has(td[data-label]) td:first-child > * { max-width: 100%; }
}
/* مساحة أسفل القائمة حتى لا تغطي شارة الاستضافة (Powered by Netlify) اسم المستخدم وزر الخروج */
.side { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
/* أقسام القائمة */
.nav-group summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; list-style: none; opacity: .88; font-weight: 600; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '‹'; margin-inline-start: auto; transition: transform .15s; opacity: .7; }
.nav-group[open] summary::after { transform: rotate(-90deg); }
.nav-group summary:hover { background: rgba(255,255,255,.1); opacity: 1; }
.nav-group.here summary { opacity: 1; }
.nav-items { padding-inline-start: 14px; border-inline-start: 1px solid rgba(255,255,255,.15); margin-inline-start: 21px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.nav-items a { padding: 7px 10px; font-size: .94rem; }
.settle-line { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .settle-line { grid-template-columns: 1fr; } }
.att-kiosk h2 { font-size: 2rem; margin: 20px 0 10px; }
.att-qr { background: #fff; padding: 18px; border-radius: 18px; display: inline-block; margin: 10px auto; }
.att-qr svg { width: min(60vh, 80vw); height: auto; display: block; }
/* البرنامج المستقل */
.app-mode { min-height: 100vh; background: var(--bg); }
.app-bar { position: sticky; top: 0; z-index: 20; }
.app-title { display: flex; flex-direction: column; line-height: 1.2; }
.app-title b { color: var(--brand); font-size: 1.1rem; } .app-title small { color: var(--ink-3); font-size: .78rem; }
.app-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.small-qr { padding: 8px; border: 1px solid var(--line); }
.small-qr svg { width: 160px; height: 160px; }
.start-here { margin-bottom: 14px; border-inline-start: 4px solid var(--brand); }
.start-here .progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.start-here .progress span { display: block; height: 100%; background: var(--brand); }
.start-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.start-list li.done { color: var(--ink-3); }
.start-list a { color: var(--brand); font-weight: 600; }
/* دخول الكاشير بالرمز */
.pin-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.pin-user { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; }
.pin-user:hover { border-color: var(--brand); }
.pin-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; }
.pin-box { text-align: center; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 10px 0 16px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); }
.pin-dots span.on { background: var(--brand); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; direction: ltr; }
.pin-pad .btn { height: 60px; font-size: 1.4rem; }
/* الاشتراك والدفع */
.billing-sum { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; display: grid; gap: 4px; }
.billing-sum .grand { font-size: 1.15rem; }
.bank-card { border: 1px dashed var(--brand); }
.bank-card .row { justify-content: space-between; margin-bottom: 6px; }
.iban { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; font-weight: 600; letter-spacing: .5px; }

/* التصنيع والإنتاج */
.mfg-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.mfg-method { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.mfg-ico { font-size: 1.5rem; line-height: 1; }
.mfg-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mfg-opt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: start; padding: 10px; border: 2px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.mfg-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.mfg-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mfg-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mfg-row > select, .mfg-row > input { width: auto; margin: 0; }
.mfg-row > select:first-child { flex: 1 1 220px; min-width: 0; }
.mfg-row > select:nth-child(3) { flex: 0 0 82px; }
.mfg-row > input { flex: 0 0 86px; }
.mfg-batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mfg-batch .mfg-ico { font-size: 1.3rem; }
@media (max-width: 640px) { .mfg-pick { grid-template-columns: 1fr; } .mfg-row { padding-bottom: 8px; border-bottom: 1px dashed var(--line); } }

/* الامتياز والشركاء */
.ok-text { color: var(--ok, #1a7f4b); } .bad-text { color: var(--bad, #b42318); }
.vis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; } .kv.big b { font-size: 1.25rem; color: var(--brand); } .kv.bad b { color: var(--bad, #b42318); }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 10px; }
.mini-bars .mb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.mini-bars .mb i { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; opacity: .8; }
.mini-bars .mb small { font-size: .7rem; color: var(--muted); }
.print-doc table { width: 100%; border-collapse: collapse; } .print-doc td { padding: 6px; border-bottom: 1px solid #ddd; }

.ai-tracks { margin: 0 0 8px; max-width: 640px; }
.ai-tracks button { font-size: .9rem; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 4px; max-width: 220px; }
.progress i { display: block; height: 100%; background: var(--brand); }

/* ---------- المنيو المصور (الطاولة، المتجر، موقع المنشأة) ---------- */
.mv-hero { position: relative; margin: -12px -14px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mv-cover { height: 190px; background: var(--surface-2) center/cover no-repeat; }
.mv-hero-body { display: flex; align-items: center; gap: 12px; padding: 14px; flex-wrap: wrap; }
.mv-hero.has-cover .mv-hero-body { margin-top: -42px; }
.mv-logo { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--surface); border: 3px solid var(--surface);
           box-shadow: var(--shadow); flex: none; }
.mv-logo-ph { display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: var(--brand-ink); background: var(--brand); }
.mv-hero-text { flex: 1; min-width: 160px; }
.mv-hero.has-cover .mv-hero-text { padding-top: 36px; }
.mv-hero-text h1 { margin: 0; font-size: 1.35rem; color: var(--ink); }
.mv-hero-text p { margin: 2px 0 0; color: var(--ink-2); }
.mv-hero-actions { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.mv-cats { position: sticky; top: 0; z-index: 3; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; background: var(--bg);
           scrollbar-width: none; }
.mv-cats::-webkit-scrollbar { display: none; }
.mv-cats .chip { white-space: nowrap; }
.mv-section { scroll-margin-top: 56px; margin-top: 10px; }
.mv-section h2 { font-size: 1.1rem; margin: 6px 2px 8px; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mv-card { display: flex; flex-direction: column; text-align: start; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
           background: var(--surface); overflow: hidden; cursor: pointer; color: inherit; transition: transform .12s, box-shadow .12s; }
div.mv-card { cursor: default; }
button.mv-card:active { transform: scale(.98); }
button.mv-card:hover { box-shadow: var(--shadow); }
.mv-card img, .mv-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); display: block; }
.mv-ph { display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; color: var(--ink-3); }
.mv-card-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; flex: 1; }
.mv-name { font-size: .98rem; line-height: 1.35; }
.mv-desc { font-size: .8rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.mv-price { font-weight: 700; color: var(--brand); }
.mv-price small { font-weight: 400; font-size: .75em; color: var(--ink-3); }
.mv-price.big { font-size: 1.3rem; margin: 4px 0 10px; }
.mv-add { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink);
          font-size: 1.2rem; font-weight: 700; }
.mv-modal .modal-body { padding-top: 0; }
.mv-sheet-img { width: calc(100% + 32px); margin: 0 -16px 10px; max-height: 300px; object-fit: cover; display: block; }
.mv-group { margin: 12px 0; }
.mv-group-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.mv-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mv-opt { display: inline-flex; gap: 6px; align-items: baseline; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
          background: var(--surface); cursor: pointer; }
.mv-opt small { color: var(--ink-3); }
.mv-opt.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.mv-opt.on small { color: inherit; opacity: .85; }
.mv-qty { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; font-size: 1.2rem; }
.mv-sheet-add { width: 100%; }
.mv-session { display: flex; gap: 8px; align-items: stretch; margin: 0 0 10px; }
.mv-session > div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; text-align: center; }
.mv-session small { display: block; color: var(--ink-3); font-size: .75rem; }
.mv-session b { font-size: 1.25rem; color: var(--brand); }
@media (min-width: 700px) { .mv-cover { height: 260px; } .mv-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* ---------- موقع المنشأة ---------- */
body.site .guest-wrap { max-width: 960px; }
.site-sec { margin: 22px 0; }
.site-sec > h2 { font-size: 1.2rem; margin-bottom: 10px; }
.site-about { white-space: pre-line; color: var(--ink-2); }
.site-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.site-info .card { margin: 0; }
.site-branch h3 { margin-bottom: 4px; }
.site-branch .row { margin-top: 8px; }
.site-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.site-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.site-social { display: flex; gap: 8px; flex-wrap: wrap; }
.site-foot { text-align: center; padding: 24px 0 8px; color: var(--ink-3); font-size: .85rem; }
.site-foot a { color: inherit; }
.img-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.img-pick img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.img-pick.round img { width: 72px; height: 72px; border-radius: 16px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; vertical-align: middle; background: var(--surface-2); }

/* ---------- الدليل المصور ---------- */
.help-group { margin: 22px 2px 8px; color: var(--brand); }
.help-lesson h3 { margin-bottom: 10px; }
.help-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.help-shots { display: flex; gap: 8px; overflow-x: auto; }
.help-shots img { width: 180px; flex: none; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; background: var(--surface-2); }
.help-shots img.zoom { position: fixed; inset: 0; margin: auto; width: auto; max-width: 96vw; max-height: 94vh; z-index: 200; cursor: zoom-out;
                       box-shadow: 0 0 0 100vmax rgba(0,0,0,.7); }
.help-text ol { padding-inline-start: 20px; margin: 0 0 10px; }
.help-text li { margin-bottom: 6px; }
@media (max-width: 700px) { .help-body { grid-template-columns: 1fr; } .help-shots { flex-wrap: wrap; overflow: visible; } .help-shots img { width: calc(50% - 4px); } }

/* ---------- اللغات وزر التحويل المؤقت ---------- */
.lang-toggle { display: inline-flex; gap: 2px; padding: 2px; flex: none; background: var(--surface, #fff); border: 1px solid var(--line, #ddd); border-radius: 999px; }
.lang-bar { display: flex; justify-content: flex-end; padding: 6px 10px 0; max-width: 900px; margin: 0 auto; }
@media print { .lang-bar { display: none !important; } }
.lang-toggle button { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 600; min-width: 30px; height: 26px;
  padding: 0 10px; border-radius: 999px; cursor: pointer; }
.lang-toggle button.on { background: var(--brand, #0f4c5c); color: #fff; }
.lang-toggle.temp { outline: 2px solid var(--accent, #c8963e); }
@media print { .lang-toggle { display: none !important; } }
.lang-pick { min-width: 0; max-width: 140px; padding: 2px 6px; font-size: .85rem; }
html[data-lang="bn"] body { font-family: 'Noto Sans Bengali', var(--font); }
html[data-lang="ur"] body { font-family: 'Noto Naskh Arabic', var(--font); }
html.lang-ltr .num, html.lang-ltr td.num { text-align: right; }

/* ---------- التوصيل والتتبع ---------- */
.track-map iframe { width: 100%; height: 260px; border: 0; border-radius: 12px; margin: 8px 0 4px; background: var(--surface-2, #f3f1ec); }
.driver-list { display: grid; gap: 12px; margin-top: 12px; }
.driver-card { display: grid; gap: 6px; }
.driver-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; }
.driver-actions .btn { justify-content: center; text-align: center; min-height: 44px; }
