/* تطبيق المندوب: كحلي #29285A وذهبي #F6AE3D على أرضية فاتحة. أهداف اللمس 44px فأكثر. */
.rp{--navy:#29285A;--navy2:#3B3A73;--gold:#F6AE3D;--bg:#F4F4F8;--mute:#55547A;--line:#E6E6F0;position:fixed;inset:0;z-index:50;background:var(--bg);color:var(--navy);font-family:'Mizan Sans','Noto Sans Arabic','Noto Sans',sans-serif;display:flex;flex-direction:column;overflow:hidden}
.rp *{box-sizing:border-box}.rp h1{margin:0;font-size:22px}.rp h2{margin:0;font-size:18px}.rp p{margin:0}.rp small{font-size:12px}.rp .grow{flex:1 1 auto;min-width:0}
.rp button{font:inherit;cursor:pointer;transition:transform .18s ease,background .2s ease,box-shadow .25s ease,color .2s}.rp button:active{transform:scale(.96)}.rp button:disabled{opacity:.5;cursor:default}
.rp-mute{color:var(--mute);font-size:13px}.rp .pad{padding:16px}.rp-row{display:flex;align-items:center;gap:10px}.rp-row.between{justify-content:space-between}
.rp-btn{min-height:46px;padding:0 16px;border:0;border-radius:14px;font-weight:700;font-size:15px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--navy);background:#fff}
.rp-btn.gold{background:var(--gold)}.rp-btn.navy{background:var(--navy2);color:#fff}.rp-btn.soft{background:#EEEEF6}.rp-btn.outline{background:transparent;border:2px solid var(--gold);color:var(--gold)}
.rp-btn.sm{min-height:44px;font-size:13px;padding:0 14px;border-radius:22px;white-space:nowrap}.rp-btn.wide{width:100%}.rp-btn.xl{min-height:58px;font-size:17px;border-radius:18px}
.rp-input{width:100%;min-height:48px;border:2px solid var(--line);border-radius:14px;padding:0 14px;font:inherit;color:var(--navy);background:#fff;outline:0}.rp-input:focus{border-color:var(--navy)}
.rp-warn{background:#FFF6E5;color:#6B4300;border-radius:12px;padding:10px 12px;font-size:13px;font-weight:600}
.rp-seg{display:inline-flex;background:#EEEEF6;border-radius:22px;padding:3px}.rp-seg button{min-width:48px;height:40px;border:0;border-radius:20px;background:transparent;color:var(--navy);font-weight:700;font-size:13px;padding:0 12px}
.rp-seg button.on{background:var(--navy);color:#fff}.rp-seg.dark{background:var(--navy2)}.rp-seg.dark button{color:#fff}.rp-seg.dark button.on{background:#fff;color:var(--navy)}
.rp-sync{font-size:12px;font-weight:600;color:#1F5A32}.rp-sync.wait{color:#8A4B00}.rp-top .rp-sync{color:var(--gold)}
/* تجهيز الزيارة */
.rp-setupwrap{background:var(--navy);align-items:center;justify-content:flex-start;overflow-y:auto;padding:16px}
.rp-card{width:100%;max-width:640px;background:#fff;border-radius:28px;padding:22px;display:flex;flex-direction:column;gap:12px;box-shadow:0 30px 60px rgba(10,10,40,.45);margin:auto}
.rp-card.center{align-items:center;text-align:center}.rp-card.pop,.rp-detail,.rp-pin{animation:rpPop .35s cubic-bezier(.2,.8,.2,1)}
.rp-lab{font-size:13px;font-weight:700;margin-top:4px}.rp-grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.rp-opt{min-height:52px;border:2px solid #D5D5E2;border-radius:14px;background:#fff;color:var(--navy);font-weight:700;font-size:15px;padding:6px 10px}.rp-opt.on{background:var(--navy);border-color:var(--navy);color:#fff}
.rp-custs{display:flex;flex-direction:column;gap:6px;max-height:300px;overflow-y:auto}
.rp-cust{min-height:56px;border:2px solid var(--line);border-radius:14px;background:#fff;color:var(--navy);display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 14px;text-align:start}
.rp-cust span{display:flex;flex-direction:column;gap:2px}.rp-cust .end{align-items:flex-end;white-space:nowrap}.rp-cust small{color:var(--mute)}.rp-cust.on{border-color:var(--navy);background:#F0F0FA;box-shadow:0 0 0 2px var(--gold)}
.rp-check{width:72px;height:72px;border-radius:36px;background:#E3F1E8;color:#1F5A32;display:flex;align-items:center;justify-content:center}.rp-check.wait{background:#FFF6E5;color:#8A4B00}.rp-big{font-size:22px;font-weight:700}
/* الكتالوج */
.rp-top{flex:none;min-height:64px;background:var(--navy);color:#fff;display:flex;align-items:center;gap:10px;padding:8px 14px;flex-wrap:wrap}
.rp-title{display:flex;flex-direction:column;min-width:0}.rp-title small{color:#C9C9E3}.rp-title b{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
.rp-chips{display:flex;gap:8px;align-items:center;font-size:12px}.rp-chips span:not(.rp-sync){background:var(--navy2);border-radius:8px;padding:6px 10px}
.rp-body{flex:1 1 auto;min-height:0;display:flex}.rp-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.rp-tools{flex:none;padding:12px 14px 4px;display:flex;flex-direction:column;gap:10px}
.rp-search{display:flex;align-items:center;gap:8px;min-height:48px;background:#fff;border-radius:14px;padding:0 14px;color:var(--mute);box-shadow:0 1px 2px rgba(41,40,90,.08)}
.rp-search input{flex:1;min-width:0;border:0;outline:0;font:inherit;color:var(--navy);background:transparent}
.rp-cats{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.rp-cats button{flex:none;min-height:44px;padding:0 16px;border:0;border-radius:22px;background:#fff;color:var(--navy);font-weight:600;font-size:14px;white-space:nowrap}.rp-cats button.on{background:var(--navy);color:#fff}
.rp-grid{flex:1 1 auto;overflow-y:auto;padding:10px 14px 110px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start;perspective:1000px}
.rp-prod{background:#fff;border-radius:18px;padding:10px;display:flex;flex-direction:column;gap:6px;box-shadow:0 1px 3px rgba(41,40,90,.1);transition:transform .3s cubic-bezier(.2,.8,.2,1),box-shadow .3s;animation:rpUp .3s ease}
.rp-prod.in{transform:translateY(-5px) rotateX(4deg);box-shadow:0 18px 30px rgba(41,40,90,.22),0 0 0 2px var(--gold)}
.rp-img{border:0;padding:0;background:#fff;border-radius:12px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.rp-img img{width:100%;height:100%;object-fit:contain}
.rp-noimg{display:block;width:100%;aspect-ratio:1/1;border-radius:12px;background:repeating-linear-gradient(45deg,#EEEEF6,#EEEEF6 8px,#F7F7FB 8px,#F7F7FB 16px)}.rp-noimg.sm{width:46px;height:46px;flex:none}.rp-noimg.big{max-height:260px}
.rp-name{font-size:14px;line-height:1.35;min-height:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rp-price{font-size:17px}
.rp-av{font-weight:600;font-size:11px}.rp-av.in{color:#1F5A32}.rp-av.low{color:#8A4B00}.rp-av.out{color:#8A2C2C}
.rp-step{display:flex;align-items:center;justify-content:space-between;min-height:46px;background:var(--navy);border-radius:14px;color:#fff}.rp-step span{font-size:17px;font-weight:700}
.rp-step button{width:48px;height:46px;border:0;background:transparent;color:#fff;font-size:22px}.rp-step .plus{color:var(--gold)}.rp-step.big{min-height:54px;border-radius:16px}.rp-step.big button{width:60px;height:54px}
.rp-more{grid-column:1/-1}.rp-skel{color:transparent;animation:rpPulse 1.2s ease-in-out infinite}
/* السلة */
.rp-side{display:none}.rp-lines{display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:0}
.rp-line{display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:14px;padding:8px;animation:rpUp .25s ease}.rp-line img{width:46px;height:46px;object-fit:contain;border-radius:8px;background:#fff;flex:none}
.rp-line span.grow{display:flex;flex-direction:column;gap:2px}.rp-line b{font-size:13px;line-height:1.3}.rp-line small{color:var(--mute)}.rp-line .amt{white-space:nowrap;font-size:14px}.rp-line .rp-step{min-height:40px;border-radius:12px;flex:none}.rp-line .rp-step button{width:38px;height:40px}.rp-line .rp-step span{min-width:22px;text-align:center}
.rp-sum{display:flex;flex-direction:column;gap:10px;font-size:14px}.rp-total{font-size:26px}
.rp-meter{height:8px;border-radius:4px;background:var(--line);overflow:hidden}.rp-meter i{display:block;height:8px;background:var(--navy);transition:width .3s}.rp-meter i.over{background:#B3261E}
.rp-bar{position:absolute;inset-inline:12px;bottom:12px;min-height:60px;border:0;border-radius:20px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-weight:600;box-shadow:0 12px 26px rgba(41,40,90,.38);animation:rpUp .3s ease}.rp-bar b{color:var(--gold);font-size:18px}
.rp-veil{position:absolute;inset:0;z-index:5;background:rgba(20,20,50,.5);display:flex;flex-direction:column;justify-content:flex-end;animation:rpFade .2s ease}.rp-veil.center{align-items:center;justify-content:center;padding:14px}
.rp-sheet{background:#fff;border-radius:26px 26px 0 0;padding:10px 16px 16px;display:flex;flex-direction:column;gap:12px;max-height:88%;box-shadow:0 -12px 40px rgba(20,20,50,.3);animation:rpUp .3s cubic-bezier(.2,.8,.2,1)}
.rp-grip{width:44px;height:5px;border-radius:3px;background:#D5D5E2;align-self:center}
.rp-detail{width:100%;max-width:440px;max-height:94%;overflow-y:auto;background:#fff;border-radius:28px;padding:20px;display:flex;flex-direction:column;gap:12px;box-shadow:0 30px 60px rgba(20,20,50,.4)}.rp-detail img{width:100%;max-height:300px;object-fit:contain}
.rp-note{background:var(--bg);border-radius:10px;padding:8px 10px;color:var(--mute)}
.rp-pin{width:300px;background:#fff;border-radius:28px;padding:22px;display:flex;flex-direction:column;gap:14px;align-items:center;box-shadow:0 30px 60px rgba(20,20,50,.4)}
.rp-dots{display:flex;gap:12px}.rp-dots i{width:16px;height:16px;border-radius:8px;background:var(--line);transition:background .15s}.rp-dots i.on{background:var(--navy)}.rp-err{color:#8A2C2C;font-weight:600;font-size:13px}
.rp-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%}.rp-keys button{height:56px;border:0;border-radius:16px;background:var(--bg);color:var(--navy);font-size:22px;font-weight:700}
.rp-input.num{width:84px;min-height:44px;text-align:center}.rp-ldisc{display:flex;align-items:center;gap:2px;flex:none;background:#fff;border:2px solid var(--line);border-radius:10px;padding:0 6px;height:40px}.rp-ldisc input{width:34px;border:0;outline:0;font:inherit;color:var(--navy);text-align:center;background:transparent}.rp-ldisc i{font-style:normal;color:var(--mute);font-size:12px}
/* مستند الطلب */
.rp-doc{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 10px 24px rgba(41,40,90,.10);animation:rpUp .35s ease}
.rp-doc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--navy);color:#fff;padding:14px 16px;border-bottom:4px solid var(--gold)}.rp-doc-head img{height:40px;width:auto;background:#fff;border-radius:8px;padding:3px 6px}
.rp-doc-head div{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.rp-doc-head b{font-size:18px}.rp-doc-head small{color:var(--gold);font-weight:700}
.rp-doc-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;padding:12px 16px;background:var(--bg)}.rp-doc-meta span{display:flex;flex-direction:column;gap:2px}.rp-doc-meta small{color:var(--mute)}.rp-doc-meta b{font-size:14px}
.rp-doc-table{padding:6px 16px}.rp-doc-row{display:grid;grid-template-columns:minmax(0,2.4fr) .6fr .9fr .8fr 1fr;gap:8px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px;align-items:center}.rp-doc-row.h{font-size:11px;font-weight:700;color:var(--mute)}.rp-doc-row span:not(:first-child),.rp-doc-row b{text-align:end}
.rp-doc-sum{padding:10px 16px 14px;display:flex;flex-direction:column;gap:6px;font-size:14px}.rp-doc-sum div{display:flex;justify-content:space-between;gap:10px}.rp-doc-sum .tot{font-size:20px;border-top:2px solid var(--navy);padding-top:8px;margin-top:2px}
.rp-doc-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 16px;background:var(--bg);font-size:11px;color:var(--mute)}
.rp-doc-item{display:grid;grid-template-columns:minmax(0,1fr) 70px 80px;gap:8px;padding:4px 0 4px 0;padding-inline-start:16px;font-size:12px;color:var(--mute);border-bottom:1px dashed var(--line)}.rp-doc-item span:not(:first-child){text-align:end}
.rp-input.date{width:auto;min-height:44px;max-width:170px}.rp-detail.wide{max-width:680px}.rp-doc-row.st{grid-template-columns:.9fr minmax(0,1.8fr) .9fr .9fr 1fr}.rp-doc-row.st small{color:var(--mute);font-size:11px}
@keyframes rpUp{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}@keyframes rpFade{from{opacity:0}to{opacity:1}}
@keyframes rpPop{from{transform:perspective(900px) rotateY(-12deg) scale(.94);opacity:0}to{transform:none;opacity:1}}@keyframes rpPulse{50%{opacity:.5}}
.hide-phone{display:none}
/* تابلت 10 بوصة وما فوق: سلة ثابتة جانبية وأربعة أعمدة */
@media (min-width:640px){.rp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:900px){.hide-phone{display:flex}.rp-side{display:flex;flex-direction:column;gap:10px;width:350px;flex:none;background:#fff;box-shadow:0 0 30px rgba(41,40,90,.1);padding-bottom:14px}.rp-side .rp-lines{flex:1 1 auto;padding:0 12px}.rp-side .rp-sum{padding:12px 16px 0;border-top:1px solid var(--line)}
  .rp-bar,.rp-veil:not(.center){display:none}.rp-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding-bottom:24px}.rp-title b{max-width:30vw}}
@media (min-width:1150px){.rp-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){.rp *{animation:none!important;transition:none!important}.rp-prod.in{transform:none}}
/* لوحة تحكم المدير بتطبيق المندوب */
.rpa{--navy:#29285A;--gold:#F6AE3D;--line:#E6E6F0;--mute:#55547A;color:var(--navy);padding:20px;max-width:1280px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.rpa h1{margin:0;font-size:22px}.rpa h2{margin:0;font-size:18px}.rpa h3{margin:10px 0 0;font-size:13px;color:var(--mute)}.rpa p{margin:4px 0 0;color:var(--mute);font-size:14px}.rpa small{color:var(--mute);font-size:12px}
.rpa-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:16px}
.rpa-card{background:#fff;border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:10px;box-shadow:0 2px 0 var(--line),0 14px 30px rgba(41,40,90,.08);animation:rpUp .3s ease}
.rpa-card header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.rpa-save{display:flex;align-items:center;gap:10px}
.rpa-btn{min-height:46px;padding:0 22px;border:0;border-radius:14px;background:var(--gold);color:var(--navy);font:inherit;font-weight:700;cursor:pointer;transition:transform .15s}.rpa-btn:active{transform:scale(.96)}
.rpa-chips{display:flex;flex-wrap:wrap;gap:8px}.rpa-chips button{min-height:44px;padding:0 16px;border:2px solid #D5D5E2;border-radius:22px;background:#fff;color:var(--navy);font:inherit;font-weight:600;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.rpa-chips button.on{background:var(--navy);border-color:var(--navy);color:#fff}.rpa-chips button:not(.on){text-decoration:line-through;color:var(--mute)}
.rpa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.rpa-toggle{min-height:48px;display:flex;align-items:center;gap:10px;border:0;border-radius:14px;background:#F4F4F8;color:var(--navy);font:inherit;font-size:14px;font-weight:600;padding:0 12px;cursor:pointer;text-align:start}
.rpa-toggle i{flex:none;width:42px;height:24px;border-radius:12px;background:#C9C9D8;position:relative;transition:background .2s}.rpa-toggle i::after{content:'';position:absolute;top:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:9px;background:#fff;transition:inset-inline-start .2s}
.rpa-toggle.on i{background:var(--navy)}.rpa-toggle.on i::after{inset-inline-start:21px}.rpa-toggle:disabled,.rpa-chips button:disabled{opacity:.6;cursor:default}
.rpa-field{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;background:#F4F4F8;border-radius:14px;padding:0 12px;font-size:14px;font-weight:600}
.rpa-field select,.rpa-field input{min-height:38px;border:2px solid var(--line);border-radius:10px;background:#fff;color:var(--navy);font:inherit;padding:0 8px;max-width:55%}.rpa-field input{width:84px;text-align:center}
.rpa-note{background:#fff;border-radius:14px;padding:16px}
/* تطبيق السائق */
.dv-top{position:relative;padding-bottom:16px}.dv-cash{display:flex;flex-direction:column;align-items:flex-end}.dv-cash small{color:#C9C9E3}.dv-cash b{color:var(--gold);font-size:18px}
.dv-prog{position:absolute;inset-inline:14px;bottom:6px;display:flex;gap:4px}.dv-prog i{flex:1;height:5px;border-radius:3px;background:#4A4985;transition:background .3s}.dv-prog i.done{background:var(--gold)}.dv-prog i.cur{background:#fff}
.dv-main{flex:1 1 auto;overflow-y:auto;padding:12px 14px 24px;display:flex;flex-direction:column;gap:10px;width:100%;max-width:720px;margin:0 auto}
.dv-stop{background:#fff;border-radius:14px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:10px;animation:rpUp .3s ease}.dv-stop.done{opacity:.78}.dv-stop small{color:var(--mute);font-weight:600}
.dv-stop .st.full{color:#1F5A32}.dv-stop .st.partial{color:#8A4B00}.dv-stop .st.failed{color:#8A2C2C}
.dv-stop.cur{flex-direction:column;align-items:stretch;gap:12px;border-radius:20px;padding:16px;box-shadow:0 16px 32px rgba(41,40,90,.18),0 0 0 2px var(--gold)}
.dv-q{font-size:14px}.dv-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.dv-seg button{min-height:48px;border:2px solid #D5D5E2;border-radius:12px;background:#fff;color:var(--navy);font-weight:700;font-size:14px}.dv-seg button.on{background:var(--navy);border-color:var(--navy);color:#fff}
.dv-lines{display:flex;flex-direction:column;gap:6px}.dv-line{display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:12px;padding:8px 10px;font-size:13px}.dv-line .rp-step{min-height:40px;border-radius:12px}.dv-line .rp-step button{width:40px;height:40px}.dv-line .rp-step span{min-width:26px;text-align:center}
.dv-chips{display:flex;flex-wrap:wrap;gap:6px}.dv-chips button{min-height:44px;padding:0 14px;border:0;border-radius:22px;background:#EEEEF6;color:var(--navy);font-weight:600;font-size:13px}.dv-chips button.on{background:var(--gold)}
.dv-remain{display:flex;justify-content:space-between;background:var(--bg);border-radius:12px;padding:10px 12px;font-size:14px}
button.dv-stop.tap{border:0;font:inherit;width:100%;cursor:pointer;text-align:start;color:inherit}button.dv-stop.tap:hover{box-shadow:0 6px 16px rgba(41,40,90,.12)}button.dv-stop.tap:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.dv-remain.soft{background:transparent;border:1px dashed #C9C9D6}
.rpa-tabs{display:flex;gap:6px;margin:0 0 14px;flex-wrap:wrap}.rpa-tabs button{border:0;font:inherit;font-weight:700;padding:9px 16px;border-radius:999px;background:#fff;color:#29285A;cursor:pointer}.rpa-tabs button.on{background:#29285A;color:#fff}
.rpa-hint{display:block;color:#6B6B80;font-size:12px;margin:-4px 0 8px}
/* نقطة البيع */
.ps-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.ps-main{flex:1 1 50%;min-height:0;display:flex;flex-direction:column;gap:10px;padding:12px 14px}
.ps-scan input{font-size:17px}.ps-grid{flex:1 1 auto;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px;align-content:start;perspective:1000px}
.ps-tile{border:0;font:inherit;color:var(--navy);background:#fff;border-radius:16px;padding:8px;display:flex;flex-direction:column;gap:4px;text-align:start;cursor:pointer;box-shadow:0 1px 3px rgba(41,40,90,.1);transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s}
.ps-tile:hover,.ps-tile:focus-visible{transform:translateY(-4px) rotateX(4deg);box-shadow:0 14px 26px rgba(41,40,90,.2),0 0 0 2px var(--gold);outline:0}.ps-tile:active{transform:scale(.97)}
.ps-tile b{font-size:12px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:31px}.ps-price{font-weight:800;font-size:14px}
.ps-img{aspect-ratio:1/1;border-radius:10px;background:var(--bg);display:flex;align-items:center;justify-content:center;overflow:hidden}.ps-img img{width:100%;height:100%;object-fit:contain}
.ps-ticket{flex:1 1 50%;min-height:0;overflow-y:auto;background:#fff;padding:14px;display:flex;flex-direction:column;gap:10px;box-shadow:0 -8px 24px rgba(41,40,90,.12)}
.ps-lines{flex:1 1 auto;min-height:70px;overflow-y:auto;display:flex;flex-direction:column;gap:6px}.ps-line{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--line);animation:rpUp .25s ease}
.ps-line .grow{display:flex;flex-direction:column;min-width:0}.ps-line b{font-size:13px}.ps-line small{color:var(--mute);font-size:12px}.ps-line .rp-step{min-width:120px}.ps-line .amt{min-width:76px;text-align:end;font-size:14px}
.ps-total{display:flex;justify-content:space-between;align-items:baseline;background:var(--navy);color:#fff;border-radius:16px;padding:12px 16px}.ps-total b{font-size:28px;color:var(--gold)}
.ps-pay{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:8px;align-items:center;font-weight:700;font-size:14px}.ps-pay .rp-input{min-height:44px}
.ps-kv{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-radius:12px;background:var(--bg);font-size:14px}.ps-kv.strong{font-weight:700}.ps-kv.ok{background:#E7F5EA;color:#1F5A32}.ps-kv.bad{background:#FBEAEA;color:#8A2C2C}
.ps-seller{display:flex;flex-direction:column;font-size:11px;color:#C9C9E3}.ps-seller select{min-height:36px;border:0;border-radius:10px;padding:0 10px;font:inherit;font-weight:700;color:var(--navy);background:#fff}
.ps-rline{display:grid;grid-template-columns:minmax(0,1fr) auto 80px;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);font-size:13px}.ps-rline b{text-align:end}
@media (min-width:900px){.ps-body{flex-direction:row}.ps-main{flex:1 1 auto}.ps-ticket{flex:0 0 400px;box-shadow:-8px 0 24px rgba(41,40,90,.10)}[dir=rtl] .ps-ticket{box-shadow:8px 0 24px rgba(41,40,90,.10)}}
@media (prefers-reduced-motion:reduce){.ps-tile,.ps-line{transition:none;animation:none}}
/* فواتير المكتب */
.of-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.of-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.of-cards{display:flex;flex-direction:column;gap:8px}.of-card{border:2px solid transparent;font:inherit;color:var(--navy);background:#fff;border-radius:16px;padding:12px 14px;display:flex;justify-content:space-between;gap:12px;text-align:start;cursor:pointer;box-shadow:0 1px 3px rgba(41,40,90,.1);transition:transform .2s,box-shadow .2s;animation:rpUp .25s ease}
.of-card:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(41,40,90,.14)}.of-card.on{border-color:var(--gold);box-shadow:0 12px 24px rgba(41,40,90,.18)}.of-card:focus-visible{outline:2px solid var(--navy);outline-offset:2px}
.of-card>span{display:flex;flex-direction:column;gap:3px;min-width:0}.of-list>*{flex:none}.of-card .end{align-items:flex-end;white-space:nowrap}.of-card small{color:var(--mute);font-size:12px}.of-card small.red,.of-flags .red{color:#8A2C2C;font-weight:700}
.of-side{flex:none;background:#fff;max-height:0;overflow:hidden}.of-side.open{max-height:none;flex:1 1 60%;overflow-y:auto;box-shadow:0 -8px 24px rgba(41,40,90,.12)}.of-detail{padding:14px;display:flex;flex-direction:column;gap:12px}.of-pick{padding:24px;text-align:center}
.of-row{display:grid;grid-template-columns:minmax(0,2.2fr) .9fr .8fr .9fr;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px}.of-row.head{color:var(--mute);font-size:11px;font-weight:700}.of-row b{text-align:end}
.of-flags{display:flex;gap:8px;flex-wrap:wrap}.of-flags span{background:#FFF6E5;color:#6B4300;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:700}.of-flags .red{background:#FBEAEA}
.of-ex{display:flex;flex-direction:column;gap:8px;border:2px solid #E9B9B9;border-radius:16px;padding:12px}.of-ex .ps-kv{flex-wrap:wrap}
@media (min-width:900px){.of-body{flex-direction:row}.of-list{flex:1 1 auto}.of-side,.of-side.open{flex:0 0 46%;max-width:620px;max-height:none;overflow-y:auto;box-shadow:-8px 0 24px rgba(41,40,90,.10)}}
/* لوحة المدير */
.mg-main{flex:1 1 auto;overflow-y:auto;padding:14px}.mg-stack{display:flex;flex-direction:column;gap:14px;max-width:1200px;margin:0 auto}.rp-row.wrap{flex-wrap:wrap}
.mg-tabs button{background:var(--navy2);color:#fff}.mg-tabs button.on{background:var(--gold);color:var(--navy)}
.mg-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;perspective:1000px}
.mg-kpi{background:#fff;border-radius:18px;padding:14px 16px;display:flex;flex-direction:column;gap:4px;box-shadow:0 2px 6px rgba(41,40,90,.08);transition:transform .3s cubic-bezier(.2,.8,.2,1),box-shadow .3s;animation:rpUp .3s ease}
.mg-kpi:hover{transform:translateY(-4px) rotateX(5deg);box-shadow:0 18px 30px rgba(41,40,90,.18)}.mg-kpi small{color:var(--mute);font-weight:700;font-size:12px}.mg-kpi b{font-size:22px}.mg-kpi span{font-size:12px;color:var(--mute)}
.mg-kpi.hero{background:var(--navy);color:#fff}.mg-kpi.hero small,.mg-kpi.hero span{color:#C9C9E3}.mg-kpi.hero b{color:var(--gold);font-size:26px}.mg-kpi em{font-style:normal;font-weight:800}.mg-kpi em.up{color:#7BE0A0}.mg-kpi em.down{color:#FF9D9D}
.mg-kpi.age-g{border-bottom:4px solid #3E9E62}.mg-kpi.age-y{border-bottom:4px solid var(--gold)}.mg-kpi.age-r{border-bottom:4px solid #C24545}
.mg-panel{background:#fff;border-radius:20px;padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:0 2px 6px rgba(41,40,90,.08)}.mg-panel h2{font-size:16px;margin:0}
.mg-chips{display:flex;gap:6px;flex-wrap:wrap}.mg-chips button,.mg-toggle{border:2px solid var(--line);background:#fff;color:var(--navy);font:inherit;font-weight:700;font-size:13px;min-height:38px;padding:0 14px;border-radius:999px;cursor:pointer}
.mg-chips button.on,.mg-toggle.on{background:var(--navy);border-color:var(--navy);color:#fff}.mg-chips .k-rep.on{background:var(--navy)}.mg-chips .k-shop.on{background:var(--gold);border-color:var(--gold);color:var(--navy)}
.mg-scene{position:relative;height:300px;perspective:900px;touch-action:none;cursor:grab;border-radius:16px;background:linear-gradient(#F7F7FB,#EDEDF5);overflow:hidden;outline:0}.mg-scene:active{cursor:grabbing}.mg-scene:focus-visible{box-shadow:0 0 0 3px var(--gold)}
.mg-stage{position:absolute;inset:34px 40px 40px;transform-style:preserve-3d;transition:transform .15s ease-out}.mg-floor{position:absolute;inset:auto 0 0 0;height:90px;background:rgba(41,40,90,.07);transform-origin:bottom;transform:rotateX(90deg);border-radius:8px}
.mg-cols{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;gap:max(8px,1.4%);padding:0 3%;transform-style:preserve-3d}
.mg-col{position:relative;flex:1 1 0;max-width:46px;height:100%;transform-style:preserve-3d}
.mg-bar{position:absolute;bottom:0;inset-inline:0;display:block;min-height:2px;border-radius:5px 5px 0 0;transform-style:preserve-3d;transition:height .5s cubic-bezier(.2,.8,.2,1),filter .2s}.mg-bar:hover{filter:brightness(1.2)}
.mg-bar.back{transform:translateZ(-48px)}.mg-bar.zero{min-height:0;height:0}.mg-bar.zero::before,.mg-bar.zero::after{display:none}
.mg-bar::before{content:'';position:absolute;inset:0 auto 0 100%;width:12px;transform-origin:left;transform:rotateY(90deg);background:rgba(0,0,0,.28)}.mg-bar::after{content:'';position:absolute;inset:0 0 auto 0;height:12px;transform-origin:top;transform:rotateX(-90deg);background:rgba(255,255,255,.35)}
.mg-bar.k-rep{background:linear-gradient(#4B4A93,#29285A)}.mg-bar.k-shop{background:linear-gradient(#FFD084,#F6AE3D)}
.mg-x{position:absolute;top:100%;inset-inline:0;margin-top:6px;text-align:center;font-size:10px;color:var(--mute)}
.mg-tip{position:absolute;top:10px;inset-inline-start:12px;background:var(--navy);color:#fff;border-radius:12px;padding:8px 12px;font-size:13px;display:flex;flex-direction:column;gap:2px;pointer-events:none}
.mg-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.mg-alert{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:#FFF6E5;color:#6B4300;font-weight:700;font-size:14px;text-decoration:none}.mg-alert b{background:#fff;border-radius:999px;min-width:32px;text-align:center;padding:2px 8px}
.mg-top{position:relative;display:flex;justify-content:space-between;gap:10px;padding:8px 0 10px;font-size:13px}.mg-top i{position:absolute;inset:auto auto 0 0;height:4px;border-radius:2px;background:var(--gold)}[dir=rtl] .mg-top i{inset:auto 0 0 auto}
.mg-table{gap:0}.mg-table h2{margin-bottom:8px}.mg-tr{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line);font-size:13px;align-items:center;color:inherit;text-decoration:none}
.mg-tr.age{grid-template-columns:minmax(0,2fr) repeat(5,minmax(70px,1fr))}.mg-tr.c3{grid-template-columns:minmax(0,2fr) 1fr 1fr}.mg-tr.c4{grid-template-columns:minmax(0,1.6fr) 1fr 1.2fr 1fr}
.mg-tr.head{color:var(--mute);font-size:11px;font-weight:700}.mg-tr.total{font-weight:800;border-top:2px solid var(--navy);border-bottom:0}.mg-tr b{text-align:end;font-weight:600}.mg-tr.total b{font-weight:800}.mg-tr small{display:block;color:var(--mute);font-size:11px}.mg-tr .red,.mg-who .red{color:#8A2C2C;font-weight:800}
.mg-date{display:flex;flex-direction:column;font-size:11px;font-weight:700;color:var(--mute)}.mg-date input{min-height:40px;border:2px solid var(--line);border-radius:12px;padding:0 10px;font:inherit;color:var(--navy);background:#fff}
.mg-who{display:flex;flex-direction:column;gap:2px}.mg-who.end{align-items:flex-end}.mg-who small{color:var(--mute);font-size:12px}
@media (max-width:640px){.mg-tr.age{grid-template-columns:minmax(0,1.6fr) 1fr 1fr}.mg-tr.age>:nth-child(2),.mg-tr.age>:nth-child(3),.mg-tr.age>:nth-child(5){display:none}.mg-scene{height:240px}}
@media (prefers-reduced-motion:reduce){.mg-kpi,.mg-bar,.mg-stage{transition:none;animation:none}}
.mg-date select{min-height:40px;border:2px solid var(--line);border-radius:12px;padding:0 10px;font:inherit;color:var(--navy);background:#fff}

/* السائق: سعر السطر وآخر سعر للزبون، وزر كشف الحساب */
.dv-ln{display:flex;flex-direction:column;gap:2px;min-width:0}.dv-lp{display:flex;flex-wrap:wrap;gap:2px 12px;color:var(--mute);font-size:11.5px;line-height:1.5}.dv-lp b{font-weight:700;color:var(--navy)}.dv-lp .up b,.dv-lp .down b{color:#8A5A00}.dv-lp i{font-style:normal;opacity:.75}.dv-lp .new{color:#6B5300}.dv-stop.done .dv-stbtn{margin-top:6px;align-self:flex-start}
