/* ===== v1.13.0 — نظام تصميم نقطة البيع (POS design system) =====
   سطح داكن للإطار + بطاقات فاتحة للمحتوى. كل الألوان من متغيرات التطبيق. */
/* v1.55.1: متغيرات نقطة البيع على مستوى الصفحة — نوافذ نقطة البيع (الإلغاء، المرتجع، الموافقة…) تُفتح خارج #posView */
:root{ --s:#FFFFFF; --s2:#F6F1EA; --ln:#E6DED1; --ink2:#24211B; --soft:#6F6957; --dk:#26221F; --dk2:#332E2A; --dk3:#3D3733; }
#posView{ display:none; padding:12px 14px 40px; --s:#FFFFFF; --s2:#F6F1EA; --ln:#E6DED1; --ink2:#24211B; --soft:#6F6957; --dk:#26221F; --dk2:#332E2A; --dk3:#3D3733; color:var(--ink2); }
#posView .ic{ flex:none; display:block; }
#posView button{ font-family:inherit; }
html[dir=rtl] #posView .flip{ transform:scaleX(-1); }

/* ---------- الشريط العلوي ---------- */
.pos-top{ display:flex; align-items:center; gap:6px; background:var(--dk); border:1px solid var(--dk3); border-radius:16px; padding:6px; margin-bottom:14px; flex-wrap:wrap; }
.pos-tabs{ display:flex; gap:4px; flex-wrap:wrap; min-width:0; }
.pos-tab{ display:flex; align-items:center; gap:8px; height:46px; padding:0 16px; border-radius:11px; border:0; background:transparent; color:#CFC7B1; font:600 14.5px inherit; cursor:pointer; position:relative; white-space:nowrap; }
.pos-tab:hover{ background:var(--dk2); }
.pos-tab.on{ background:var(--rust); color:#fff; }
.pos-tab .pos-n{ min-width:21px; height:21px; border-radius:11px; background:var(--mustard); color:#241D0A; font:700 12.5px/21px inherit; text-align:center; padding:0 6px; box-sizing:border-box; }
.pos-spacer{ flex:1; }
.pos-tools{ display:flex; align-items:center; gap:6px; margin-inline-start:auto; }
.pos-user{ display:flex; align-items:center; gap:8px; color:#E4DDC8; font-size:13.5px; padding:0 8px; max-width:190px; }
.pos-user span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pos-ibtn{ min-width:46px; height:46px; padding:0 12px; border-radius:11px; border:0; background:var(--dk2); color:#E9E2CE; display:flex; align-items:center; justify-content:center; gap:6px; font:600 13px inherit; cursor:pointer; }
.pos-ibtn:hover{ background:var(--dk3); }
.pos-ibtn.off{ color:#948D79; }

/* ---------- أزرار وعناصر عامة ---------- */
.pos-btn{ height:46px; padding:0 18px; border-radius:11px; border:1px solid var(--ln); background:#fff; color:var(--ink2); font:600 14.5px inherit; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.pos-btn:hover{ border-color:var(--mustard); }
.pos-btn.pri{ background:var(--rust); border-color:var(--rust); color:#fff; }
.pos-btn.ok{ background:var(--sage); border-color:var(--sage); color:#fff; }
.pos-btn.dng{ border-color:var(--danger); color:var(--danger); background:#fff; }
.pos-btn.ghost{ background:transparent; border-color:var(--dk3); color:#E4DDC8; }
.pos-btn.sm{ height:38px; padding:0 12px; font-size:13.5px; }
.pos-btn[disabled]{ opacity:.45; cursor:not-allowed; }
.pos-btn.lg{ height:56px; font-size:16.5px; }
.pos-chip{ height:42px; padding:0 18px; border-radius:21px; border:1.5px solid var(--ln); background:var(--s); font:600 14px inherit; color:var(--ink2); cursor:pointer; white-space:nowrap; flex:none; }
.pos-chip.on{ background:var(--rust); border-color:var(--rust); color:#fff; }
.pos-card{ background:var(--s); border:1px solid var(--ln); border-radius:16px; padding:16px 18px; color:var(--ink2); }
.pos-card h3{ margin:0 0 10px; font-size:16px; }
.pos-hint{ font-size:12.5px; color:#CFC7B1; }
.pos-field{ display:flex; flex-direction:column; gap:5px; font-size:13.5px; color:var(--soft); margin-bottom:10px; }
.pos-field input,.pos-field select,.pos-field textarea{ height:46px; border:1px solid var(--ln); border-radius:10px; padding:0 12px; font-family:inherit; font-size:15px; background:#fff; color:var(--ink2); }
.pos-field textarea{ height:auto; padding:10px 12px; }
.pos-st{ display:inline-block; font-size:11.5px; font-weight:700; padding:2px 9px; border-radius:10px; background:#F1ECE4; color:var(--ink2); }
.pos-st.new{ background:var(--mustard); } .pos-st.prep{ background:#E0A15C; } .pos-st.ready{ background:var(--sage); color:#fff; } .pos-st.served{ background:#D9D0B8; color:var(--soft); }
.pos-tot{ display:flex; justify-content:space-between; font-size:14px; color:var(--soft); }
.pos-tot.big{ color:var(--ink2); font-size:17px; font-weight:700; align-items:baseline; }
.pos-tot.big b{ font-family:'IBM Plex Mono',monospace; font-size:26px; color:var(--rust-dark); }
.pos-pill{ position:fixed; inset-inline-start:14px; bottom:14px; z-index:1150; display:none; align-items:center; gap:8px; background:#3F4D34; color:#fff; border:0; border-radius:24px; padding:12px 20px; font:700 15px inherit; font-family:inherit; box-shadow:0 8px 24px rgba(0,0,0,.4); cursor:pointer; }
.pos-pill.show{ display:flex; animation:posPulse 1.6s ease-in-out infinite; }
@keyframes posPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.05); } }

/* ---------- صفحة الطاولات ---------- */
.pos-ready{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:#3F4D34; color:#fff; border-radius:12px; padding:10px 14px; font-weight:600; font-size:14.5px; margin-bottom:12px; flex-wrap:wrap; }
.pos-ready button{ background:#fff; color:#3F4D34; border:0; border-radius:16px; padding:8px 16px; font:700 13.5px inherit; cursor:pointer; }
.pos-wrap{ display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:14px; align-items:start; }
.pos-fl-head{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:10px; }
.pos-areas{ display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; max-width:100%; }
.pos-stats{ display:flex; gap:8px; flex-wrap:wrap; }
.pos-stat{ display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:16px; background:var(--dk2); color:#E9E2CE; font-size:13px; }
.pos-stat i{ width:11px; height:11px; border-radius:4px; display:inline-block; }
.pos-stat b{ font-family:'IBM Plex Mono',monospace; }
.pos-seg{ display:inline-flex; background:var(--dk2); border-radius:11px; padding:3px; gap:2px; }
.pos-seg button{ width:42px; height:38px; border:0; border-radius:8px; background:transparent; color:#B9B19B; cursor:pointer; display:grid; place-items:center; }
.pos-seg button.on{ background:var(--s); color:var(--ink2); }
.pos-plan-box{ direction:ltr; background:var(--s); border:1px solid var(--ln); border-radius:16px; background-image:radial-gradient(#D9CDAA 1.2px,transparent 1.2px); background-size:24px 24px; overflow:hidden; position:relative; }
.pos-plan{ direction:ltr; position:absolute; left:0; top:0; transform-origin:top left; }
.pos-tbl{ position:absolute; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:6px; cursor:pointer; text-align:center; font-family:inherit; line-height:1.25; }
html[dir=rtl] .pos-tbl{ direction:rtl; }
.pos-tbl b{ font-size:20px; line-height:1.1; }
.pos-tbl small{ font-size:12px; }
.pos-tbl .tm{ font-size:12px; font-weight:700; }
.pos-tbl.free{ background:var(--s); border:2.5px solid var(--sage); color:var(--ink2); }
.pos-tbl.busy{ background:var(--rust); border:2.5px solid var(--rust); color:#fff; }
.pos-tbl.bill{ background:#26221F; border:2.5px solid var(--mustard); color:#fff; }
.pos-tbl.sel{ outline:4px solid var(--mustard); outline-offset:3px; }
.pos-tbl .rdy{ position:absolute; top:-11px; inset-inline-end:-8px; background:var(--sage); color:#fff; border-radius:12px; padding:2px 9px; font-size:12px; font-weight:700; border:2px solid #fff; }
.pos-tgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.pos-tcard{ position:relative; min-height:112px; border-radius:14px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px; text-align:center; cursor:pointer; padding:8px; }
.pos-tcard.free{ background:var(--s); border:2.5px solid var(--sage); color:var(--ink2); }
.pos-tcard.busy{ background:var(--rust); border:2.5px solid var(--rust); color:#fff; }
.pos-tcard.bill{ background:#26221F; border:2.5px solid var(--mustard); color:#fff; }
.pos-tcard.sel{ outline:4px solid var(--mustard); outline-offset:2px; }
.pos-tcard b{ font-size:21px; } .pos-tcard small{ font-size:12.5px; } .pos-tcard .tm{ font-size:12.5px; font-weight:700; }
.pos-tcard .rdy{ position:absolute; top:-9px; inset-inline-end:-6px; background:var(--sage); color:#fff; border-radius:12px; padding:2px 9px; font-size:12px; font-weight:700; border:2px solid #fff; }
.pos-side{ background:var(--s); border:1px solid var(--ln); border-radius:16px; padding:16px; position:sticky; top:calc(var(--nav-h,0px) + 8px); display:flex; flex-direction:column; gap:10px; }
.pos-side .pos-tname{ font-size:28px; font-weight:700; line-height:1.1; }
.pos-side-l{ display:flex; justify-content:space-between; gap:8px; font-size:14px; padding:6px 0; border-bottom:1px dashed var(--ln); }
.pos-sub-h{ font-size:13px; color:var(--soft); margin-top:6px; }

/* ---------- شاشة الطلب ---------- */
.pos-ohead{ display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.pos-ohead .pos-title{ color:#FAF7F2; font-size:21px; font-weight:700; }
.pos-ohead .pos-no{ color:#CFC7B1; font-family:'IBM Plex Mono',monospace; }
.pos-ord{ display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:12px; height:var(--ord-h,640px); min-height:420px; }
.pos-pick{ display:flex; flex-direction:column; min-height:0; min-width:0; background:var(--s); border:1px solid var(--ln); border-radius:16px; overflow:hidden; }
.pos-pick-top{ padding:12px; border-bottom:1px solid var(--ln); background:var(--s); }
.pos-searchbox{ position:relative; }
.pos-searchbox .ic{ position:absolute; inset-inline-start:14px; top:15px; color:var(--soft); }
.pos-search{ width:100%; height:52px; border:1.5px solid var(--ln); border-radius:12px; padding:0 46px; font-family:inherit; font-size:16.5px; box-sizing:border-box; background:#fff; color:var(--ink2); }
.pos-search:focus{ outline:3px solid var(--mustard); border-color:var(--mustard); }
.pos-searchbox .clr{ position:absolute; inset-inline-end:7px; top:7px; width:38px; height:38px; border:0; border-radius:9px; background:var(--s2); color:var(--soft); display:none; place-items:center; cursor:pointer; }
.pos-searchbox.has .clr{ display:grid; }
.pos-pick-body{ display:grid; grid-template-columns:136px minmax(0,1fr); flex:1; min-height:0; }
.pos-rail{ overflow-y:auto; border-inline-end:1px solid var(--ln); padding:8px; display:flex; flex-direction:column; gap:4px; background:var(--s2); }
.pos-rail button{ min-height:48px; padding:8px 11px; border-radius:11px; border:0; background:transparent; font:600 14px inherit; color:var(--ink2); display:flex; align-items:center; justify-content:space-between; gap:6px; text-align:start; cursor:pointer; line-height:1.3; }
.pos-rail button:hover{ background:#E9DFC4; }
.pos-rail button.on{ background:var(--rust); color:#fff; }
.pos-rail small{ font:600 11.5px 'IBM Plex Mono',monospace; opacity:.7; flex:none; }
.pos-menu{ overflow-y:auto; padding:12px; display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); grid-auto-rows:min-content; gap:10px; align-content:start; min-height:0; -webkit-overflow-scrolling:touch; }
.pos-menu-h{ grid-column:1/-1; font-size:13px; color:var(--soft); display:flex; justify-content:space-between; }
.pos-item{ position:relative; text-align:start; background:#fff; border:1.5px solid var(--ln); border-radius:14px; padding:12px; min-height:98px; display:flex; flex-direction:column; justify-content:space-between; gap:8px; color:var(--ink2); cursor:pointer; touch-action:manipulation; }
.pos-item:active{ transform:scale(.97); border-color:var(--rust); }
.pos-item.has{ border-color:var(--rust); background:#FBEFE6; }
.pos-item .nm{ font-size:15.5px; font-weight:700; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pos-item .pr{ font-family:'IBM Plex Mono',monospace; font-weight:700; font-size:14.5px; color:var(--rust-dark); }
.pos-item .q{ position:absolute; top:8px; inset-inline-end:8px; min-width:26px; height:26px; border-radius:13px; background:var(--rust); color:#fff; font:700 13.5px/26px 'IBM Plex Mono',monospace; text-align:center; padding:0 7px; box-sizing:border-box; }
.pos-item .st{ position:absolute; bottom:10px; inset-inline-end:10px; color:var(--soft); }
.pos-cart{ display:flex; flex-direction:column; min-height:0; background:var(--s); border:1px solid var(--ln); border-radius:16px; overflow:hidden; }
.pos-cart-h{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--ln); font-size:17px; font-weight:700; }
.pos-cart-h .cnt{ font:700 13px 'IBM Plex Mono',monospace; background:var(--s2); border-radius:12px; padding:3px 10px; color:var(--soft); }
.pos-cart-lines{ flex:1; overflow-y:auto; min-height:0; padding:4px 16px 8px; }
.pos-cart-foot{ border-top:1px solid var(--ln); padding:12px 16px 16px; display:flex; flex-direction:column; gap:7px; background:var(--s2); }
.pos-sec{ font-size:12.5px; font-weight:700; color:var(--soft); margin:12px 0 2px; text-transform:none; }
.pos-line{ display:flex; align-items:center; gap:8px; padding:10px 0; border-bottom:1px dashed var(--ln); }
.pos-line .nm{ flex:1; min-width:0; font-weight:600; font-size:14.5px; }
.pos-line .nt{ font-size:12.5px; color:var(--soft); font-weight:400; }
.pos-qty{ display:flex; align-items:center; gap:4px; }
.pos-qty button{ width:38px; height:38px; border-radius:10px; border:1px solid var(--ln); background:#fff; color:var(--ink2); display:grid; place-items:center; cursor:pointer; }
.pos-qty span{ min-width:24px; text-align:center; font:700 15px 'IBM Plex Mono',monospace; }
.pos-notebtn{ margin-top:3px; background:none; border:0; padding:5px 0; color:var(--rust-dark); font:600 13px inherit; cursor:pointer; display:inline-flex; gap:5px; align-items:center; }
.pos-cartbar{ display:none; }
.pos-cart-bd{ display:none; }
.pos-cart-x{ display:none; }

/* ---------- شاشة المطبخ والبار ---------- */
.kds-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.kds-head .pos-title{ color:#FAF7F2; font-size:21px; font-weight:700; display:flex; gap:10px; align-items:center; }
.kds{ background:#1F231F; border-radius:16px; padding:10px; color:#FAF7F2; display:flex; min-height:380px; }
.kds-cols{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; flex:1; min-height:0; min-width:0; }
.kds-col{ background:var(--dk); border-radius:12px; overflow:hidden; min-height:0; display:flex; flex-direction:column; min-width:0; }
.kds-h{ padding:10px 12px; display:flex; justify-content:space-between; align-items:center; font-weight:700; font-size:15px; border-bottom:3px solid var(--c); flex:none; }
.kds-h span{ min-width:26px; height:26px; border-radius:13px; background:var(--c); color:#24211B; display:flex; align-items:center; justify-content:center; padding:0 8px; box-sizing:border-box; font-size:13.5px; }
.kds-body{ padding:8px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; flex:1; min-height:0; -webkit-overflow-scrolling:touch; }
.kds-card{ background:#FAF7F2; color:#24211B; border-radius:11px; overflow:hidden; border:2.5px solid transparent; flex:none; }
.kds-card.late{ border-color:var(--danger); }
.kds-peek{ cursor:pointer; }
.kds-ch{ display:flex; justify-content:space-between; align-items:center; gap:6px; padding:6px 10px; background:#F1ECE4; font-weight:700; }
.kds-card.late .kds-ch{ background:#F1C9BE; }
.kds-ch b{ font-size:17px; }
.kds-age{ font-size:12.5px; }
.kds-items{ padding:4px 10px 6px; }
.kds-ci{ padding:2px 0; font-size:14.5px; line-height:1.45; }
.kds-ci em{ display:block; font-style:normal; font-size:12.5px; color:var(--rust-dark); font-weight:600; }
.kds-act{ width:100%; height:38px; border:0; font:700 14px inherit; color:#24211B; background:var(--c); cursor:pointer; }
.kds-empty{ padding:24px 8px; text-align:center; color:#9a937f; font-size:14px; }
.pos-peek{ width:min(440px,100%); max-height:90vh; overflow-y:auto; background:#FFFFFF; color:var(--ink); border-radius:18px; padding:20px 22px; box-shadow:0 20px 60px rgba(0,0,0,.5); display:flex; flex-direction:column; gap:10px; cursor:pointer; }
.pk-h{ display:flex; align-items:baseline; gap:12px; } .pk-h b{ font-size:30px; } .pk-h .mono{ color:var(--ink-soft); }
.pk-age{ margin-inline-start:auto; font:700 16px 'IBM Plex Mono',monospace; padding:3px 12px; border-radius:14px; background:#F1ECE4; } .pk-age.late{ background:#F1C9BE; color:#8A2F1E; }
.pk-meta{ font-size:14px; color:var(--ink-soft); }
.pk-items{ display:flex; flex-direction:column; gap:8px; border-top:1px solid var(--line); padding-top:10px; }
.pk-i{ font-size:21px; line-height:1.4; } .pk-i em{ display:block; font-style:normal; font-size:15px; color:var(--rust-dark); font-weight:600; }
.pk-sub{ font-size:13px; color:var(--ink-soft); margin-top:6px; }
.pk-rest{ display:flex; flex-direction:column; gap:6px; font-size:14.5px; } .pk-rest div{ display:flex; justify-content:space-between; gap:8px; align-items:center; }
.pk-x{ text-align:center; font-size:12.5px; color:var(--ink-soft); margin-top:4px; }

/* ---------- الكاشير ---------- */
.pos-kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin-bottom:12px; }
.pos-kpi{ background:var(--s); border:1px solid var(--ln); border-radius:14px; padding:12px 16px; display:flex; flex-direction:column; gap:2px; }
.pos-kpi span{ font-size:13px; color:var(--soft); }
.pos-kpi b{ font:700 24px 'IBM Plex Mono',monospace; color:var(--rust-dark); }
.pos-tbl2{ width:100%; border-collapse:collapse; font-size:14.5px; }
.pos-tbl2 th{ text-align:start; font-size:12.5px; color:var(--soft); font-weight:700; padding:8px 10px; border-bottom:2px solid var(--ln); white-space:nowrap; }
.pos-tbl2 td{ padding:10px; border-bottom:1px solid var(--ln); vertical-align:middle; }
.pos-tbl2 tr:last-child td{ border-bottom:0; }
.pos-tbl2 .num{ font-family:'IBM Plex Mono',monospace; text-align:end; }

/* ---------- التعريف ---------- */
.pos-setup{ display:grid; grid-template-columns:260px minmax(0,1fr) 290px; gap:14px; align-items:start; }
.pos-setup .pos-side{ position:static; }
.pos-area-btn{ height:46px; padding:0 14px; border-radius:11px; border:1.5px solid var(--ln); background:#fff; color:var(--ink2); font:600 14.5px inherit; display:flex; justify-content:space-between; align-items:center; cursor:pointer; }
.pos-area-btn.on{ background:var(--rust); border-color:var(--rust); color:#fff; }
.pos-hr{ border:0; border-top:1px solid var(--ln); width:100%; margin:4px 0; }

/* ---------- النوافذ ---------- */
.pos-dlg-ov{ position:fixed; inset:0; z-index:1300; background:rgba(20,18,14,.62); display:flex; align-items:center; justify-content:center; padding:16px; }
.pos-dlg{ width:min(460px,100%); max-height:92vh; overflow-y:auto; background:#FFFFFF; color:var(--ink); border-radius:18px; padding:22px; box-shadow:0 20px 60px rgba(0,0,0,.5); display:flex; flex-direction:column; gap:12px; }
.pos-dlg h3{ margin:0; font-size:20px; }
.pos-dlg-l{ font-size:14px; color:var(--ink-soft); }
.pos-dlg input{ height:52px; border:1.5px solid var(--line); border-radius:10px; padding:0 14px; font-family:inherit; font-size:17px; background:#fff; color:var(--ink); }
.pos-dlg input:focus{ outline:3px solid var(--mustard); border-color:var(--mustard); }
.pos-dlg-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.pos-dlg-act{ display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }
.pos-dlg-act .pos-btn{ height:50px; min-width:92px; }
.pos-guest-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.pos-guest{ height:60px; border-radius:12px; border:1.5px solid var(--line); background:#fff; font:700 22px 'IBM Plex Mono',monospace; color:var(--ink); cursor:pointer; }
.pos-guest.on{ background:var(--rust); border-color:var(--rust); color:#fff; }
.pos-dlg-stepper{ display:flex; align-items:center; justify-content:center; gap:18px; }
.pos-dlg-stepper b{ font-size:28px; min-width:48px; text-align:center; }
.pos-dlg-stepper .pos-btn{ width:56px; height:50px; font-size:22px; padding:0; }
#loginLangBtn,.lang-link{ float:inline-end; background:none; border:1px solid var(--line); border-radius:14px; padding:4px 12px; font:600 13px inherit; font-family:inherit; color:var(--rust-dark); cursor:pointer; margin-bottom:6px; }

/* ---------- التقارير ---------- */
.rp{ display:flex; flex-direction:column; gap:14px; max-width:1180px; margin-inline:auto; }
.rp-bar-top{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.rp-title{ color:#FAF7F2; }
.rp-title h2{ margin:0; font-size:22px; }
.rp-title small{ color:#CFC7B1; font-size:13px; }
.rp-seg{ display:inline-flex; background:var(--dk2); border-radius:12px; padding:3px; gap:2px; flex-wrap:wrap; }
.rp-seg button{ height:40px; padding:0 16px; border:0; border-radius:9px; background:transparent; color:#CFC7B1; font:600 13.5px inherit; cursor:pointer; white-space:nowrap; }
.rp-seg button.on{ background:var(--s); color:var(--ink2); }
.rp-dates{ display:flex; gap:8px; align-items:center; color:#CFC7B1; font-size:14px; flex-wrap:wrap; }
.rp-dates input{ height:42px; border:1px solid var(--ln); border-radius:9px; padding:0 10px; font-family:inherit; background:var(--s); color:var(--ink2); }
.rp-kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; }
.rp-kpis.k8{ grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:900px){ .rp-kpis.k8{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.rp-kpi{ background:var(--s); border:1px solid var(--ln); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:4px; min-width:0; }
.rp-kpi span{ font-size:13px; color:var(--soft); }
.rp-kpi b{ font:700 24px 'IBM Plex Mono',monospace; color:var(--ink2); white-space:nowrap; }
.rp-kpi b i{ font-style:normal; font-size:13px; color:var(--soft); margin-inline-start:5px; font-weight:500; }
.rp-kpi small{ font-size:12.5px; color:var(--soft); line-height:1.5; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.rp-kpi.hero{ background:#2F3A2C; border-color:#3F4D34; } .rp-kpi.hero span,.rp-kpi.hero small{ color:#CBD6BC; } .rp-kpi.hero b{ color:#fff; font-size:28px; }
.rp-d{ display:inline-flex; align-items:center; gap:3px; font:700 12px 'IBM Plex Mono',monospace; padding:1px 8px; border-radius:10px; background:#F1ECE4; color:var(--soft); }
.rp-d.up{ background:#DCE7CF; color:#3F5A2B; } .rp-d.dn{ background:#F1C9BE; color:#8A2F1E; }
.rp-kpi.hero .rp-d{ background:rgba(255,255,255,.15); color:#fff; } .rp-kpi.hero .rp-d.up{ background:#9FB38A; color:#1F2A18; } .rp-kpi.hero .rp-d.dn{ background:#E7A593; color:#4A150A; }
.rp-card{ background:var(--s); border:1px solid var(--ln); border-radius:16px; padding:16px 18px; color:var(--ink2); min-width:0; }
.rp-card h3{ margin:0; font-size:16px; }
.rp-cardhead{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; }
.rp-cardhead small{ display:block; color:var(--soft); font-size:12.5px; margin-top:2px; font-weight:400; }
.rp-grid2{ display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:14px; }
.rp-grid3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.rp-chart{ width:100%; height:auto; max-height:230px; display:block; direction:ltr; }
.rp-chart text{ font-family:'IBM Plex Mono',monospace; font-size:11px; fill:#7A735F; }
.rp-chart .bar{ fill:var(--rust); } .rp-chart .bar.pk{ fill:var(--mustard); } .rp-chart .bar.lo{ fill:#D9B9A6; } .rp-chart .grid{ stroke:#E4DABF; stroke-width:1; } .rp-chart .prev{ fill:none; stroke:#8F8872; stroke-width:1.6; stroke-dasharray:4 3; }
.rp-split{ display:flex; height:14px; border-radius:7px; overflow:hidden; background:#F1ECE4; margin:6px 0 12px; }
.rp-split i{ display:block; height:100%; }
.rp-leg{ display:flex; flex-direction:column; gap:7px; }
.rp-leg div{ display:flex; align-items:center; gap:9px; font-size:14px; }
.rp-leg i{ width:11px; height:11px; border-radius:3px; flex:none; }
.rp-leg span{ flex:1; } .rp-leg b{ font-family:'IBM Plex Mono',monospace; font-size:13.5px; } .rp-leg small{ color:var(--soft); font-family:'IBM Plex Mono',monospace; min-width:46px; text-align:end; }
.rp-row{ display:grid; grid-template-columns:minmax(80px,1.2fr) minmax(60px,2fr) 84px; gap:10px; align-items:center; padding:5px 0; font-size:14px; }
.rp-row b{ font-family:'IBM Plex Mono',monospace; text-align:end; font-size:13.5px; }
.prp-bar{ height:9px; background:#F1ECE4; border-radius:5px; overflow:hidden; min-width:40px; } .prp-bar i{ display:block; height:100%; background:var(--rust); border-radius:5px; }
.rp-tbl{ width:100%; border-collapse:collapse; font-size:14px; }
.rp-tbl th{ text-align:start; font-size:12.5px; color:var(--soft); font-weight:700; padding:9px 10px; border-bottom:2px solid var(--ln); white-space:nowrap; background:var(--s); position:sticky; top:0; }
.rp-tbl td{ padding:10px; border-bottom:1px solid #EDE4CB; white-space:nowrap; }
.rp-tbl td:first-child{ white-space:normal; min-width:130px; font-weight:600; }
.rp-tbl tr:last-child td{ border-bottom:0; }
.rp-tbl .n{ font-family:'IBM Plex Mono',monospace; text-align:end; } .rp-tbl th.n{ text-align:end; }
.rp-tbl tfoot td{ border-top:2px solid var(--ln); font-weight:700; background:var(--s2); }
.rp-scroll{ overflow-x:auto; max-height:560px; overflow-y:auto; border-radius:10px; }
.rp-rank{ display:inline-grid; place-items:center; width:24px; height:24px; border-radius:12px; background:var(--s2); font:700 12px 'IBM Plex Mono',monospace; margin-inline-end:8px; color:var(--soft); }
.rp-rank.r1{ background:var(--mustard); color:#241D0A; }
.rp-note{ margin-top:12px; font-size:12.5px; color:var(--soft); line-height:1.9; }
.rp-ins{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
.rp-in{ display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-radius:12px; background:var(--s2); font-size:14px; line-height:1.7; }
.rp-in .ic{ margin-top:3px; color:var(--rust); }
.rp-in.warn .ic{ color:var(--danger); }
.rp-cls{ display:inline-block; padding:2px 10px; border-radius:12px; font-size:12.5px; font-weight:700; background:#F1ECE4; }
.rp-cls.star{ background:#DCE7CF; } .rp-cls.horse{ background:#F2DFB6; } .rp-cls.puzzle{ background:#D9E3F0; } .rp-cls.dog{ background:#F1C9BE; }
.rp-heat{ display:grid; gap:3px; direction:ltr; font-family:'IBM Plex Mono',monospace; font-size:11px; }
.rp-heat .c{ height:26px; border-radius:5px; display:grid; place-items:center; color:#fff; font-size:10.5px; }
.rp-heat .l{ color:var(--soft); display:flex; align-items:center; justify-content:flex-end; padding-inline-end:6px; font-size:11.5px; white-space:nowrap; }
.rp-heat .h{ text-align:center; color:var(--soft); }
.rp-empty{ text-align:center; padding:44px 16px; color:var(--soft); }
.rp-empty .ic{ margin:0 auto 10px; color:#B9AF8E; }
.rp-load{ height:120px; border-radius:16px; background:linear-gradient(100deg,#EFE7D0 30%,#F8F3E5 50%,#EFE7D0 70%); background-size:200% 100%; animation:rpSh 1.2s linear infinite; }
@keyframes rpSh{ to{ background-position:-200% 0; } }

/* ---------- تابلت عمودي وجوال ---------- */
@media (max-width:1100px){
  .pos-user{ display:none; }
  .pos-ibtn .lb{ display:none; }
  .pos-ibtn[onclick^="i18nToggle"] .lb{ display:inline; }
  .pos-setup{ grid-template-columns:minmax(0,1fr); }
  .pos-ord{ grid-template-columns:minmax(0,1fr) 330px; }
  .rp-grid2,.rp-grid3{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:900px){
  .pos-wrap{ grid-template-columns:minmax(0,1fr); }
  .pos-side{ position:static; }
  .pos-top{ flex-wrap:nowrap; }
  .pos-tabs{ flex:1; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .pos-tabs::-webkit-scrollbar{ display:none; }
  .pos-tools{ flex:none; }
  .pos-ord{ grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; }
  .pos-pick-body{ grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
  .pos-rail{ flex-direction:row; overflow-x:auto; overflow-y:hidden; border-inline-end:0; border-bottom:1px solid var(--ln); padding:8px 10px; }
  .pos-rail button{ flex:none; min-height:42px; padding:0 16px; border-radius:21px; background:#fff; border:1.5px solid var(--ln); }
  .pos-rail button.on{ border-color:var(--rust); }
  .pos-cartbar{ display:flex; align-items:center; gap:10px; background:var(--dk); border-radius:14px; padding:8px 8px 8px 14px; color:#FAF7F2; }
  [dir=rtl] .pos-cartbar{ padding:8px 14px 8px 8px; }
  .pos-cartbar .tt{ flex:1; display:flex; flex-direction:column; line-height:1.3; font-size:13px; color:#CFC7B1; }
  .pos-cartbar .tt b{ font:700 19px 'IBM Plex Mono',monospace; color:#fff; }
  .pos-cart{ position:fixed; inset-inline:0; bottom:0; z-index:1210; max-height:82vh; border-radius:20px 20px 0 0; transform:translateY(105%); transition:transform .22s ease; box-shadow:0 -12px 40px rgba(0,0,0,.45); }
  .pos-cart.open{ transform:none; }
  .pos-cart-bd{ position:fixed; inset:0; z-index:1205; background:rgba(20,18,14,.55); }
  .pos-cart-bd.open{ display:block; }
  .pos-cart-x{ display:grid; place-items:center; width:40px; height:40px; border:0; border-radius:10px; background:var(--s2); color:var(--soft); cursor:pointer; }
  .pos-tab{ padding:0 13px; } .pos-tab .lb{ display:none; } .pos-tab.on .lb{ display:inline; }
}
@media (max-width:560px){
  .kds{ height:auto !important; } .kds-cols{ grid-template-columns:minmax(0,1fr); } .kds-col{ min-height:200px; }
  #posView{ padding:10px 10px 40px; }
  .pos-menu{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pos-ibtn .lb{ display:none !important; }
}
@media print{
  body *{ visibility:hidden !important; }
  #rpPrint, #rpPrint *{ visibility:visible !important; }
  #rpPrint{ position:absolute; inset:0; background:#fff; color:#000; padding:0; }
  .rp-no-print{ display:none !important; }
}

/* ---------- الإيصال ---------- */
.pos-rcpt{ background:#E4DABF; border-radius:12px; padding:10px; display:flex; justify-content:center; }
.pos-rcpt iframe{ width:340px; max-width:100%; height:min(62vh,560px); border:0; background:#fff; border-radius:6px; }
.grp-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; vertical-align:middle; margin-inline-end:4px; }
.modal-box .rp-seg{ background:#2F3B2E; } .modal-box .rp-seg button.on{ background:#FAF7F2; color:#2F3B2E; }

/* ---------- الولاء ---------- */
.pos-sec{ font-size:12.5px; font-weight:700; color:var(--ink-soft,#6b6450); margin:12px 0 6px; }
.pos-loyrow{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.pos-loyrow small{ color:var(--ink-soft,#6b6450); }
.pos-loymsg{ background:#F6E3DD; color:#8B2F1B; border-radius:8px; padding:8px 10px; margin-top:8px; font-size:13.5px; }
.pos-loycard{ display:flex; justify-content:space-between; align-items:center; gap:10px; background:#2F3B2E; color:#FAF7F2; border-radius:12px; padding:12px 14px; margin-top:12px; }
.pos-loycard small{ display:block; opacity:.8; font-size:12px; }
.pos-loycard .pt{ text-align:end; } .pos-loycard .pt b{ font-size:24px; }
.pos-rw{ display:flex; align-items:center; gap:8px; margin:6px 0; } .pos-rw span,.pos-rw select{ flex:1; min-width:0; } .pos-rw input{ width:88px; }
.pos-loypay{ display:flex; align-items:center; justify-content:space-between; gap:8px; background:#FFFFFF; border:1px solid var(--line,#E4DABF); border-radius:10px; padding:8px 12px; margin-bottom:10px; font-size:14px; }
.pos-qrbox{ text-align:center; } .pos-qrurl{ font-size:12px; color:var(--ink-soft,#6b6450); word-break:break-all; margin-top:8px; }
a.pos-btn{ text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.pos-actcode{ font-size:42px; font-weight:800; letter-spacing:6px; margin:8px 0; color:var(--rust,#B4532F); } .pos-ad{ border:1px solid var(--line,#E4DABF); border-radius:12px; padding:10px; margin:8px 0; background:#FFFFFF; }

/* v1.23 — وضوح الولاء + الدفع بالنقاط + سلوك السكرول */
.loy-wrap{ color:#2B2A24; font-size:15px; }
.loy-wrap .pos-sec{ color:#4A4636; font-size:14px; margin:16px 0 6px; padding-bottom:4px; border-bottom:1px solid #E4DABF; }
.loy-wrap .sub-label{ font-size:13px; color:#5A5644; line-height:1.6; margin:4px 2px 8px; }
.loy-wrap .pos-field{ color:#2B2A24; font-size:14px; }
.loy-note{ background:#EEF3E6; border:1px solid #CFDDBA; color:#2F4A22; border-radius:10px; padding:9px 12px; margin-top:10px; font-size:13.5px; line-height:1.65; }
.loy-note.warn{ background:#FFF1D6; border-color:#EBCB86; color:#6B4A00; }
.loy-wrap .loy-ghost{ background:#fff; border:1px solid #B9AE8C; color:#3B3626; font-weight:600; }
.loy-wrap .pos-rw.rd{ background:#fff; border:1px solid #E4DABF; border-radius:10px; padding:8px 10px; color:#2B2A24; }
.loy-wrap .pos-rw.rd b{ color:#8A4B12; }
.loy-rw{ background:#fff; border:1px solid #D9CEAB; border-radius:12px; padding:10px; margin:8px 0; }
.loy-rw .top{ display:flex; align-items:center; gap:8px; } .loy-rw .top select{ flex:1; min-width:0; height:44px; }
.loy-rw .n{ width:26px; height:26px; border-radius:50%; background:#2F3B2E; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:13px; flex:none; }
.loy-rw .del{ width:38px; height:38px; border-radius:8px; border:1px solid #E1B4A8; background:#FBEAE5; color:#9B2C14; font-size:16px; cursor:pointer; }
.loy-rw .bot{ display:flex; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap; }
.loy-rw .bot label{ display:flex; align-items:center; gap:6px; font-size:13.5px; color:#3B3626; } .loy-rw .bot input{ width:110px; height:40px; }
.loy-rw .eq{ font-size:13px; color:#5A5644; }
.pos-addrw{ width:100%; height:46px; font-size:15px; border-style:dashed; }
.pos-loyuse{ background:#FFF8E1; border:1px solid #E8D28A; border-radius:10px; padding:10px 12px; margin-bottom:12px; color:#3B3626; }
.pos-loyuse .hd{ display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; font-size:14px; } .pos-loyuse .hd span{ font-size:13px; color:#5A5644; }
.pos-loyuse .row{ display:flex; gap:8px; margin-top:8px; } .pos-loyuse .row input{ flex:1; min-width:0; height:46px; font-size:17px; }
.pos-loyuse .res{ margin-top:8px; font-size:14px; color:#2F4A22; } .pos-loyuse .res.muted{ color:#6B6450; }
.pos-loyfull{ background:#E4F1DC; border:1px solid #B9D8A5; color:#25501A; border-radius:10px; padding:12px; margin-bottom:12px; font-weight:700; text-align:center; }
.rp-scroll{ max-height:none; overflow-y:visible; }
/* v1.23.1 — طاولة بانتظار تقديم الطلب: لون مميّز حتى يُقدَّم كل شيء ثم تعود للون المشغولة */
.pos-tbl.busy.wait,.pos-tcard.busy.wait{ background:#E8B93E; border-color:#B8860B; color:#2B2100; }
.pos-tbl.busy.wait .tm,.pos-tcard.busy.wait .tm{ color:#2B2100; }
.pos-tbl.busy.wait::after,.pos-tcard.busy.wait::after{ content:'⏳ بانتظار التقديم'; font-size:11px; font-weight:700; }
html[lang=en] .pos-tbl.busy.wait::after,html[lang=en] .pos-tcard.busy.wait::after{ content:'⏳ Waiting to be served'; }

/* ===== v1.32.0 — شاشة الطلب بأسلوب التابلت ===== */
.pos-menu{ grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); }
.pos-item.pi2{ padding:6px; min-height:0; gap:6px; cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.pos-item.pi2 .th{ position:relative; height:104px; border-radius:10px; background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pos-item.pi2 .th .lt{ font:800 40px/1 'Tajawal',sans-serif; color:rgba(255,255,255,.85); } .pos-item.pi2 .th.img .lt{ display:none; }
.pos-item.pi2 .th .q{ position:absolute; top:6px; inset-inline-start:6px; inset-inline-end:auto; }
.pos-item.pi2 .bd{ padding:0 4px 3px; display:flex; flex-direction:column; gap:4px; }
.pos-item.pi2 .nm{ font-size:15px; min-height:2.6em; }
.pos-item.pi2 .rw{ display:flex; justify-content:space-between; align-items:center; }
.pos-item.pi2 .add{ width:40px; height:40px; border-radius:12px; border:0; background:var(--mustard); color:#fff; font:800 24px/1 sans-serif; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.pos-item.pi2 .add:active{ transform:scale(.92); background:var(--rust); }
#posSheet{ position:fixed; inset:0; z-index:1250; display:none; } #posSheet.open{ display:block; }
.ps-bd{ position:absolute; inset:0; background:rgba(36,33,27,.55); }
.ps-box{ position:absolute; bottom:0; inset-inline:0; margin-inline:auto; width:min(860px,100%); background:#fff; border-radius:24px 24px 0 0; padding:22px 24px 20px; display:flex; gap:22px; max-height:88vh; overflow:auto; box-shadow:0 -10px 34px rgba(0,0,0,.35); }
.ps-x{ position:absolute; top:10px; inset-inline-start:12px; width:38px; height:38px; border-radius:50%; border:0; background:#EFE7D0; font-size:17px; cursor:pointer; z-index:2; }
.ps-l{ width:260px; flex:none; } .ps-img{ height:210px; border-radius:16px; background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; } .ps-img .lt{ font:800 70px/1 'Tajawal',sans-serif; color:rgba(255,255,255,.85); } .ps-img.img .lt{ display:none; }
.ps-nm{ font-size:22px; font-weight:800; margin-top:10px; } .ps-pr{ font:800 22px 'IBM Plex Mono',monospace; color:var(--rust-dark); }
.ps-r{ flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; } .ps-h{ font-weight:800; margin-top:6px; } .ps-h small{ font-weight:400; color:var(--soft); }
.ps-chips{ display:flex; gap:8px; flex-wrap:wrap; } .ps-chips.c{ justify-content:center; }
.ps-chip{ padding:12px 16px; border-radius:24px; border:0; background:#EFE7D0; color:var(--ink); font:inherit; font-size:14.5px; cursor:pointer; min-height:44px; } .ps-chip.on{ background:var(--rust); color:#fff; font-weight:700; }
.ps-in{ width:100%; box-sizing:border-box; padding:13px 14px; border-radius:12px; border:1px solid var(--ln); background:#F6F0DF; font:inherit; font-size:15px; }
.ps-foot{ display:flex; align-items:center; gap:12px; margin-top:12px; } .ps-qty{ display:flex; align-items:center; gap:10px; } .ps-qty b{ font-size:24px; min-width:28px; text-align:center; }
.ps-qty button{ width:54px; height:54px; border-radius:16px; border:0; background:#EFE7D0; font:800 28px/1 sans-serif; cursor:pointer; } .ps-qty button.p{ background:var(--rust); color:#fff; }
.ps-ok{ flex:1; padding:17px; border-radius:16px; border:0; background:var(--rust); color:#fff; font:800 18px 'Tajawal',sans-serif; cursor:pointer; }
@media (max-width:700px){ .ps-box{ flex-direction:column; padding:18px 16px; } .ps-l{ width:auto; display:flex; gap:12px; align-items:center; flex-wrap:wrap; } .ps-img{ width:96px; height:96px; } }
#posRate{ position:fixed; inset:0; z-index:1260; background:rgba(36,33,27,.6); display:none; align-items:center; justify-content:center; padding:14px; } #posRate.open{ display:flex; }
.pr-box{ width:min(980px,100%); max-height:94vh; overflow:auto; background:#FAF7F2; border-radius:22px; padding:22px; display:flex; gap:20px; } .pr-l{ flex:1.3; min-width:0; display:flex; flex-direction:column; gap:10px; } .pr-r{ flex:1; background:#fff; border:1px solid var(--ln); border-radius:18px; padding:18px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.pr-t{ font-size:24px; font-weight:800; } .pr-s{ color:var(--soft); font-size:14px; }
.pr-row{ background:#fff; border:1px solid var(--ln); border-radius:14px; padding:10px 14px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; } .pr-nm{ flex:1; min-width:120px; display:flex; flex-direction:column; } .pr-nm small{ color:var(--soft); }
.pr-stars{ display:flex; gap:2px; } .pr-stars.c{ justify-content:center; } .pr-st{ border:0; background:none; color:#D8CFB4; cursor:pointer; padding:2px 4px; line-height:1; min-width:44px; min-height:44px; } .pr-st.on{ color:var(--mustard); }
.pr-foot{ display:flex; gap:10px; margin-top:auto; } .pr-skip{ flex:1; padding:17px; border-radius:16px; border:0; background:#EFE7D0; font:800 17px 'Tajawal',sans-serif; cursor:pointer; } .pr-foot .ps-ok{ flex:1.6; }
@media (max-width:760px){ .pr-box{ flex-direction:column; } }

.pos-snd-h{font-weight:700;margin:10px 0 6px}.pos-snd-l{display:flex;flex-wrap:wrap;gap:6px}
.pos-snd-b{padding:9px 12px;border-radius:10px;border:1px solid rgba(128,128,128,.4);background:transparent;color:inherit;font:inherit;cursor:pointer}
.pos-snd-b.on{background:#16a34a;color:#fff;border-color:#16a34a}

/* v1.53 — طلبات المنيو (menuorders.ts) */
.mo-card{border:1px solid var(--ln,#ECE6DC);border-radius:14px;padding:12px;margin:0 0 10px;background:#fff}
.mo-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mo-items{margin:8px 0;line-height:1.9}
.mo-nt{color:#9E4527;font-weight:600}
.mo-note{background:#fbf5e6;border-radius:8px;padding:6px 10px;font-size:13px;margin-bottom:8px}
.mo-act,.mo-rej{display:flex;gap:8px;flex-wrap:wrap}
.mo-rej{margin-top:8px}
.pos-ibtn.mo-btn{background:#fff4e2;border-color:#e8c88a}

.pos-clk{background:#A8402C;color:#fff;font-weight:700;font-size:14px;padding:8px 12px;border-radius:10px;margin-bottom:8px;text-align:center}
/* v1.55.1 جداول الاستثناءات: كل عمود في منتصفه تحت عنوانه (الأول بمحاذاة البداية)، والعدد وتحته القيمة */
.pv-tbl th, .pv-tbl td, .pv-tbl .num{ text-align:center; }
.pv-tbl th:first-child, .pv-tbl td:first-child{ text-align:start; }
.pv-tbl td.num b{ display:block; font-size:15px; }
.pv-tbl td.num small{ display:block; color:var(--soft); font-size:12px; }

/* v1.57.0 عدّ الدرج بالفئات */
.sh-dens{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px;margin:6px 0}
.sh-den{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;border:1px solid var(--ln,#ddd);border-radius:10px;padding:5px 8px;font-weight:700}
.sh-den input{width:100%;min-width:0;font-size:16px;text-align:center;padding:6px}
.sh-den b{font-size:12px;color:var(--ink-soft);min-width:44px;text-align:end}

/* v1.57.1 جدول عدّ الفئات (عمودي، خانات صغيرة، المجموع في الأسفل) */
.sh-dtab{width:100%;max-width:360px;border-collapse:collapse;margin:6px 0;font-size:14px}
.sh-dtab th{font-size:12px;font-weight:600;color:var(--ink-soft);text-align:start;padding:4px 6px;border-bottom:1px solid var(--ln,#ddd)}
.sh-dtab td{padding:3px 6px;border-bottom:1px solid var(--ln,#eee);font-weight:700}
.sh-dtab td:nth-child(2){width:80px}
.sh-dtab td:nth-child(3),.sh-dtab th:nth-child(3){text-align:end;font-weight:600;color:var(--ink-soft);min-width:70px}
.sh-dtab input{width:70px;padding:3px 6px;font-size:15px;text-align:center;border-radius:6px}
.sh-dtab tfoot td{border-bottom:0;border-top:2px solid var(--ink,#222);padding-top:6px;font-size:15px;color:var(--ink,#222)!important}

/* v1.57.2 الأوراق والفكة جنبًا إلى جنب */
.sh-dwrap{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}
.sh-dwrap .sh-dtab{flex:1 1 220px;max-width:300px;margin:6px 0 0}
.sh-dtot{display:flex;justify-content:space-between;max-width:616px;border-top:2px solid var(--ink,#222);margin-top:6px;padding:6px 6px 0;font-weight:700;font-size:15px}

/* v1.63.0 — شريط نقطة البيع: حبة الشفت + قائمتا «السجلات» والمستخدم */
.pos-dd{ position:relative; }
.pos-dd .dd-car{ font-size:10px; opacity:.7; margin-inline-start:-2px; }
.pos-dd.on > .pos-ibtn{ background:var(--dk3); }
.pos-dd > .pos-ibtn .lb{ max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pos-pop{ position:absolute; top:calc(100% + 6px); inset-inline-end:0; z-index:60; min-width:240px; background:#fff; color:var(--ink2); border:1px solid var(--ln); border-radius:14px; box-shadow:0 14px 34px rgba(30,24,16,.18); padding:6px; display:flex; flex-direction:column; gap:2px; }
.pos-pop[hidden]{ display:none; }
.pos-pi{ display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:8px 12px; border:0; border-radius:10px; background:transparent; color:var(--ink2); cursor:pointer; text-align:start; font:inherit; }
.pos-pi:hover, .pos-pi:focus-visible{ background:var(--s2); outline:none; }
.pos-pi .ic{ color:var(--rust); flex:none; }
.pos-pi span{ display:flex; flex-direction:column; line-height:1.35; } .pos-pi b{ font-size:14px; font-weight:600; } .pos-pi small{ font-size:12px; color:var(--soft); }
.pos-ibtn.sh-pill{ border-radius:999px; padding:0 8px 0 14px; gap:8px; font-weight:600; }
[dir=rtl] .pos-ibtn.sh-pill{ padding:0 14px 0 8px; }
.sh-pill .sh-dot{ width:10px; height:10px; border-radius:50%; background:#9A927E; flex:none; }
.sh-pill.on .sh-dot{ background:#3FA45B; box-shadow:0 0 0 3px rgba(63,164,91,.22); }
.sh-pill.late .sh-dot{ background:#E39B1B; } .sh-pill.over .sh-dot{ background:#C8382B; }
.sh-pill .sh-x{ background:rgba(255,255,255,.12); border-radius:999px; padding:5px 11px; font-size:12.5px; }
.sh-pill.off{ padding:0 16px; } .sh-pill.off .sh-t{ font-weight:700; }
.pos-ibtn.sh-pill.late{ background:#FFF3D6 !important; color:#8A5A00 !important; animation:none; } .sh-pill.late .sh-x{ background:#E39B1B; color:#fff; }
.pos-ibtn.sh-pill.over{ background:#FDE7E4 !important; color:#9E2A1E !important; animation:shPulse 1.6s ease-in-out infinite; } .sh-pill.over .sh-x{ background:#C8382B; color:#fff; }
@media (max-width:1100px){ .sh-pill .sh-t{ max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }
@media (max-width:560px){ .sh-pill.on .sh-t{ display:none; } .pos-pop{ position:fixed; top:auto; bottom:10px; inset-inline:10px; min-width:0; } .pos-dd .dd-car{ display:none; } }
.pos-ibtn.sh-pill.off{ color:#F3C9B5; box-shadow:inset 0 0 0 1.5px var(--rust); }

/* v1.65.2 — تقارير نقطة البيع */
.rp-kpi b i{ font-family:'IBM Plex Sans Arabic', sans-serif; letter-spacing:0; }
.rp-kpis.k4{ grid-template-columns:1.25fr repeat(3, 1fr); } .rp-kpis.k2{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
@media (max-width:900px){ .rp-kpis.k4{ grid-template-columns:1fr 1fr; } }
.rp-kpi.warn b{ color:#B26A00; } .rp-kpi.warn small{ color:#8A5A00; line-height:1.5; }
.rp-excl{ display:flex; align-items:center; gap:12px; width:100%; text-align:start; border:1px solid #F0D58A; background:#FFFBF0; border-radius:14px; padding:10px 14px; margin:0 0 12px; cursor:pointer; font-family:inherit; color:inherit; }
.rp-excl i{ font-style:normal; font-size:20px; } .rp-excl span{ flex:1; display:flex; flex-direction:column; min-width:0; } .rp-excl b{ font-size:14.5px; } .rp-excl small{ color:var(--soft); font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-excl em{ font-style:normal; font-weight:700; color:var(--rust); white-space:nowrap; } .rp-excl:hover{ box-shadow:0 4px 14px rgba(40,30,10,.08); }
.rp-ins.top{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:8px; margin-bottom:14px; } .rp-ins.top .rp-in{ background:#fff; border:1px solid var(--ln); border-radius:12px; margin:0; }
.rp-tabs{ flex-wrap:wrap; align-items:center; } .rp-sep{ width:1px; align-self:stretch; background:rgba(255,255,255,.18); margin:6px 4px; }
.rp-tabs button.dim{ opacity:.5; }
.rp-q{ height:36px; border-radius:10px; border:1px solid var(--ln); padding:0 12px; min-width:160px; font-family:inherit; }
.rp-wt:not(.full) th:nth-child(n+7), .rp-wt:not(.full) td:nth-child(n+7){ display:none; }
.rp-note.warn{ background:#FFF3D6; border-color:#F0D58A; color:#6B4700; }
.rp-help{ text-align:start; display:flex; gap:16px; align-items:flex-start; } .rp-help p{ margin:6px 0 0; color:var(--soft); font-size:13.5px; line-height:1.7; max-width:620px; } .rp-help .ic{ flex:none; color:#B9AF8E; margin:0; }

/* v1.74.0 — تبويبات الفواتير المفتوحة */
.pos-itabs{ display:flex; gap:8px; align-items:stretch; overflow-x:auto; padding:2px 2px 8px; scrollbar-width:thin; }
.pos-itab{ position:relative; display:flex; align-items:stretch; flex:0 0 auto; border:1.5px solid var(--line, #E4DCC8); border-radius:14px; background:#fff; min-width:130px; }
.pos-itab-b{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:8px 14px; background:none; border:0; cursor:pointer; text-align:start; font:inherit; color:inherit; min-height:52px; }
.pos-itab-b b{ font-size:14px; white-space:nowrap; } .pos-itab-b small{ font-size:12px; color:var(--soft, #7A6F58); white-space:nowrap; font-variant-numeric:tabular-nums; }
.pos-itab.on{ border-color:var(--rust, #B5532F); background:#FFF6F0; box-shadow:0 0 0 2px rgba(181,83,47,.12); } .pos-itab.on .pos-itab-b{ cursor:default; }
.pos-itab.park{ border-style:dashed; }
.pos-itab-x{ border:0; background:none; color:var(--soft, #7A6F58); font-size:18px; padding:0 10px; cursor:pointer; border-inline-start:1px solid var(--line, #E4DCC8); }
.pos-itab-x:hover{ color:#B3261E; }
.pos-itab-new{ flex:0 0 auto; border:1.5px dashed var(--rust, #B5532F); color:var(--rust, #B5532F); background:transparent; border-radius:14px; padding:0 16px; font:700 14px/1 inherit; cursor:pointer; min-height:52px; white-space:nowrap; }
.pos-itab-new:hover{ background:#FFF6F0; }

/* v1.75.0 — تلميح العهدة المنسية في تفاصيل الشفت */
.sh-hint{ background:#FFF6E0; border:1px solid #F0D9A0; color:#7A5600; border-radius:10px; padding:9px 12px; font-size:13px; line-height:1.7; margin-top:8px; }

/* v1.97.0 بطاقة الأختام */
.st-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:6px 0 10px}.st-row small{color:var(--soft,#6B6455);font-size:12px}
.st-dots{display:inline-flex;gap:6px;flex-wrap:wrap}.st-dots i{width:24px;height:24px;border-radius:50%;border:2px dashed #C8B98F;display:inline-flex;align-items:center;justify-content:center;font-style:normal;font-size:12px;color:#fff}.st-dots i.on{background:#C89B3C;border:2px solid #C89B3C}

/* v1.97.2 سؤال الولاء عند الدفع */
.loy-ask{background:#FFF6D8;border:1px solid #E6CD7A;border-radius:10px;padding:10px 12px;margin-bottom:10px;font-weight:700;font-size:14px}

/* v1.97.3 هدية البطاقة كخصم مباشر */
.st-rw{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#FFF6D8;border:1.5px solid #E6CD7A;border-radius:12px;padding:10px 12px;margin-bottom:8px;font-size:14px}.st-rw span{flex:1;min-width:180px}.st-rw input{width:110px;height:36px;text-align:center;border:1px solid #E4DABF;border-radius:8px}.st-rw.on{background:#EEF4E8;border-color:#9DB58A}

/* v1.98.0 تصاميم صفحة الزبون */
.lt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px;margin-top:6px}.lt-sw{border:2px solid transparent;border-radius:12px;padding:8px;cursor:pointer;display:flex;flex-direction:column;gap:6px;align-items:stretch;font-family:inherit;box-shadow:0 0 0 1px rgba(0,0,0,.08)}.lt-sw.on{border-color:#8B4226;box-shadow:0 0 0 3px rgba(139,66,38,.18)}.lt-sw b{font-size:12px;color:#2B2A24;text-align:center;background:rgba(255,255,255,.85);border-radius:6px;padding:2px 4px}.lt-c{display:flex;gap:4px;justify-content:center;padding:8px 4px;border-radius:9px}.lt-c i{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-style:normal;font-size:11px}.lt-c i.e{border:1.5px dashed currentColor;opacity:.6}

/* v1.99.0 البحث عن فاتورة */
.pf-q{display:flex;gap:8px;margin-bottom:10px}.pf-q input{flex:1;height:46px;border:1px solid #E4DABF;border-radius:12px;padding:0 14px;font:inherit;font-size:15px}
.pf-f{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}.pf-f select{height:38px;border:1px solid #E4DABF;border-radius:10px;padding:0 10px;font:inherit;background:#fff}
.pf-list{display:flex;flex-direction:column;gap:6px;max-height:56vh;overflow:auto}
.pf-r{display:flex;align-items:center;gap:10px;text-align:start;background:#fff;border:1px solid #E4DABF;border-radius:12px;padding:10px 12px;cursor:pointer;font:inherit;color:inherit}.pf-r:hover{border-color:#C9B26E;background:#FFFBF1}
.pf-no{font-weight:700;font-variant-numeric:tabular-nums;min-width:84px}.pf-m{flex:1;min-width:0}.pf-m b{display:block;font-size:14px}.pf-m small{color:#6B6455;font-size:12px}
.pf-t{font-weight:700;font-variant-numeric:tabular-nums;min-width:70px;text-align:end}.pf-t.neg,.pf-tot.neg,b.neg{color:#B3261E}
.pf-b{font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;background:#EFE7D0;color:#5B4A20;white-space:nowrap}.pf-b.dng{background:#F6E3DD;color:#8B2F1B}.pf-b.warn{background:#FFF0C8;color:#7A5200}.pf-b.ok{background:#E4ECD9;color:#3F5233}
.pf-hd{display:flex;justify-content:space-between;align-items:center;margin:10px 0;padding:12px 14px;background:#FBF7EC;border:1px solid #E4DABF;border-radius:12px}.pf-hd b{font-size:20px}.pf-hd small{display:block;color:#6B6455}.pf-tot{font-size:22px;font-weight:800}
.pf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 16px;margin-bottom:10px}.pf-kv{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px dashed #EFE8D8;font-size:13.5px}.pf-kv span{color:#6B6455}
.pf-it{width:100%;margin:8px 0}.pf-it small{color:#6B6455}.pf-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
@media (max-width:640px){.pf-no{min-width:0}.pf-r{flex-wrap:wrap}}

/* v1.99.3 تفاصيل الفاتورة: عرض مرتب */
.pf-d .pf-hd .pf-tot{white-space:nowrap}.pf-d .pf-hd .pf-tot small{display:inline;font-size:14px;font-weight:600;color:#6B6455}
.pf-info{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;background:#fff;border:1px solid #E4DABF;border-radius:12px;padding:6px 14px;margin-bottom:12px}
.pf-info table{width:100%;border-collapse:collapse}.pf-info th,.pf-info td{padding:8px 0;border-bottom:1px dashed #EFE8D8;font-size:13.5px;vertical-align:top;text-align:start}.pf-info tr:last-child th,.pf-info tr:last-child td{border-bottom:0}
.pf-info th{color:#6B6455;font-weight:500;width:96px;white-space:nowrap;padding-inline-end:10px}.pf-info td{font-weight:600}
.pf-info .pfnum{font-variant-numeric:tabular-nums;white-space:nowrap;background:none;color:inherit;width:auto;height:auto;border-radius:0;display:inline}
.pf-it{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #E4DABF;border-radius:12px;overflow:hidden;margin-bottom:12px}
.pf-it th{background:#F6F1E6;font-size:12.5px;font-weight:600;color:#5B5242;padding:9px 12px;text-align:start}.pf-it td{padding:9px 12px;border-top:1px solid #F1EADB;font-size:14px}
.pf-it .c{text-align:center;width:70px}.pf-it .n{text-align:end;width:100px;font-variant-numeric:tabular-nums;white-space:nowrap}.pf-it td small{display:block;color:#6B6455;font-size:12px}
.pf-it tfoot td{background:#FBF7EC;font-size:13.5px;padding:7px 12px}.pf-it tfoot tr.tot td{font-weight:800;font-size:15px;border-top:1.5px solid #E4DABF}.pf-it .neg,.pf-log .neg{color:#B3261E}
.pf-log{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #E4DABF;border-radius:12px;margin-bottom:12px}.pf-log td{padding:8px 12px;border-top:1px solid #F1EADB;font-size:13px;vertical-align:top}.pf-log tr:first-child td{border-top:0}
.pf-log .t{color:#6B6455;white-space:nowrap;width:130px;font-variant-numeric:tabular-nums}.pf-log td small{display:block;color:#6B6455;font-size:12px}.pf-log .n{text-align:end;white-space:nowrap;font-variant-numeric:tabular-nums}
@media (max-width:640px){.pf-info{grid-template-columns:1fr}.pf-it .n{width:auto}}

/* v2.3.0 أقسام المطبخ والتنبيهات */
.kds-secs{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0 0 8px}.kds-secs button{border:1px solid var(--ln,#E4DABF);background:#fff;border-radius:999px;padding:6px 14px;font:inherit;font-weight:600;cursor:pointer}.kds-secs button.on{background:#2F3B2E;color:#fff;border-color:#2F3B2E}.kds-secs small{color:var(--soft,#6B6450);margin-inline-start:6px}
.kds-sec{display:inline-block;font-size:11px;font-weight:700;background:#F3E9CF;color:#6B4A12;border-radius:6px;padding:1px 6px;margin-inline-start:6px;vertical-align:middle}
.psec-list{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.psec-chip{display:inline-flex;align-items:center;border:1px solid var(--ln,#E4DABF);border-radius:999px;background:#fff;padding:2px 4px 2px 10px}.psec-chip input{border:0;background:none;font:inherit;width:110px;padding:4px}.psec-chip button{border:0;background:none;color:#B3261E;cursor:pointer;font-size:14px}
.ntf-box .ntf-r{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--ln,#E4DABF);border-radius:10px;margin-bottom:6px;font-size:14px;cursor:pointer}
