/* End-user dashboard v2 (/app). Tokens and components come from the approved prototype (docs/overnight/user-prototype/index.html); colors are the admin v2 palette, do not fork them. */
:root{
  --ink:#101C30;--ink-2:#1A2942;--ink-3:#26385A;--teal:#13B8A6;--teal-d:#0A7568;--mint:#DDF8F1;--paper:#F7F9FC;
  --amber:#F5AE42;--amber-l:#FEF3DF;--amber-t:#8A5A0B;--line:#DCE3EE;--field:#7A8AA3;--muted:#5A6881;--bad:#A5281B;--bad-l:#FDE7E5;
  --slate-l:#EAEFF6;--slate-t:#3F4D66;--ring:#0A7568;
  --sh-1:0 1px 2px rgba(16,28,48,.05),0 1px 3px rgba(16,28,48,.04);--sh-2:0 8px 28px rgba(16,28,48,.14);--sh-3:0 24px 64px rgba(16,28,48,.34);
  --side:264px;--top:60px;--tab:64px;--r:16px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
body{margin:0;background:var(--paper);color:var(--ink);font-family:"Cairo","Inter",system-ui,sans-serif;line-height:1.65;font-size:15px;overflow-x:hidden}
body.lock{overflow:hidden}
h1,h2,h3,h4{margin:0;font-weight:800;line-height:1.35}
p{margin:0}
a{color:var(--teal-d)}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--ring);outline-offset:2px;border-radius:6px}
.num,.ltr{font-family:"Inter",system-ui,sans-serif;direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}
.ltr{display:inline-block}
.muted{color:var(--muted)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;inset-inline-start:8px;top:-70px;background:#fff;padding:10px 14px;border-radius:10px;z-index:3000;font-weight:700}
.skip:focus{top:8px}
svg.i{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ---------- shell ---------- */
.side{display:none}
.main{min-width:0;padding-bottom:calc(var(--tab) + 28px + env(safe-area-inset-bottom))}
.top{position:sticky;top:0;z-index:700;height:var(--top);background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:6px;padding:0 8px 0 12px}
.top .logo{display:flex;align-items:center;min-height:44px;gap:8px;text-decoration:none;color:var(--ink);direction:ltr;margin-inline-end:auto;font-family:"Inter";font-weight:800;font-size:1.15rem;letter-spacing:-.02em}
.top .logo i{font-style:normal;color:var(--teal-d)}
.mk{width:28px;height:28px;border-radius:9px;background:var(--ink);display:grid;place-items:center;color:var(--teal)}
.mk svg{width:16px;height:16px}
.top h1{display:none;font-size:1.08rem;flex:1}
.ib{width:44px;height:44px;border-radius:12px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--ink);position:relative;flex:none;text-decoration:none}
.ib:hover{background:var(--slate-l)}
.ib .dot{position:absolute;top:8px;inset-inline-start:9px;width:11px;height:11px;border-radius:50%;background:var(--amber);border:2px solid #fff}
.av{width:36px;height:36px;border-radius:50%;background:var(--teal);color:var(--ink);display:grid;place-items:center;font-weight:800;font-size:.95rem}
main:focus,.dr:focus{outline:none}
.page.narrow{max-width:880px}
.page{padding:16px 16px 24px;max-width:1120px;margin:0 auto}
.ph{margin-bottom:14px}
.ph h2{font-size:1.45rem}
.ph p{margin-top:2px;color:var(--muted);font-size:.93rem}

/* bottom tab bar */
.tabs{position:fixed;inset-inline:0;bottom:0;z-index:800;height:calc(var(--tab) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr 76px 1fr 1fr;align-items:stretch}
.tabs a.t{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:var(--tab);text-decoration:none;color:var(--muted);font-weight:700;font-size:.74rem;position:relative}
.tabs a.t svg{width:23px;height:23px}
.tabs a.t[aria-current=page]{color:var(--ink)}
.tabs a.t[aria-current=page]::before{content:"";position:absolute;top:0;width:28px;height:4px;border-radius:0 0 4px 4px;background:var(--teal)}
.tabs a.t .cnt{position:absolute;top:6px;inset-inline-start:50%;margin-inline-start:6px;min-width:18px;height:18px;border-radius:99px;background:var(--amber);color:var(--ink);font:800 .7rem/18px "Inter";text-align:center;padding:0 5px}
.tabs .plus{display:flex;flex-direction:column;align-items:center;text-decoration:none;color:var(--ink);font-weight:800;font-size:.74rem;position:relative}
.tabs .plus span.fab{position:absolute;top:-22px;width:56px;height:56px;border-radius:50%;background:var(--teal);color:var(--ink);display:grid;place-items:center;border:5px solid var(--paper);box-shadow:0 6px 16px rgba(19,184,166,.45)}
.tabs .plus svg{width:26px;height:26px;stroke-width:2.6}
.tabs .plus em{font-style:normal;margin-top:36px;line-height:1.2}
.tabs .plus:focus-visible{outline:none}
.tabs .plus:focus-visible .fab{outline:3px solid var(--ring);outline-offset:3px}

@media(min-width:1024px){
  .side{display:flex;position:fixed;inset-block:0;inset-inline-start:0;width:var(--side);background:var(--ink);color:#C9D3E4;flex-direction:column;z-index:900;overflow-y:auto}
  .brand{display:flex;align-items:center;gap:10px;padding:20px 18px 12px;color:#fff;text-decoration:none;direction:ltr;justify-content:flex-end;font-family:"Inter";font-weight:800;font-size:1.3rem;letter-spacing:-.02em}
  .brand i{font-style:normal;color:var(--teal)}
  .brand .mk{background:var(--teal);color:var(--ink);width:30px;height:30px}
  .side .newbtn{margin:10px 16px 6px;min-height:48px}
  .nav{padding:8px 12px 16px;flex:1}
  .nav a{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 12px;border-radius:12px;color:#D6DEEC;text-decoration:none;font-weight:700;position:relative}
  .nav a:hover{background:var(--ink-2)}
  .nav a[aria-current=page]{background:var(--ink-3);color:#fff}
  .nav a[aria-current=page]::before{content:"";position:absolute;inset-inline-start:-12px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:var(--teal)}
  [dir=rtl] .nav a[aria-current=page]::before{border-radius:4px 0 0 4px}
  .nav a:focus-visible{outline-color:#fff}
  .nav .cnt{margin-inline-start:auto;min-width:26px;text-align:center;padding:0 8px;border-radius:99px;background:var(--amber);color:var(--ink);font:800 .8rem/22px "Inter"}
  .side-foot{padding:14px 18px 20px;border-top:1px solid var(--ink-3);font-size:.85rem;color:#A9B7CE}
  .side-foot b{display:block;color:#fff}
  .main{margin-inline-start:var(--side);padding-bottom:40px}
  .tabs{display:none}
  .top{padding:0 24px}
  .top .logo{display:none}
  .top h1{display:block}
  .page{padding:24px 24px 64px}
  .top .newtop{display:inline-flex}
}
.top .newtop{display:none}

/* ---------- primitives ---------- */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1)}
.pad{padding:16px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:14px;border:1px solid transparent;background:var(--teal);color:var(--ink);font-weight:800;cursor:pointer;text-decoration:none;line-height:1.3;text-align:center}
.btn:hover{filter:brightness(.95)}
.btn svg{width:20px;height:20px}
.btn.ink{background:var(--ink);color:#fff}
.btn.alt{background:#fff;border-color:var(--field);color:var(--ink);font-weight:700}
.btn.bad{background:#fff;border-color:var(--bad);color:var(--bad);font-weight:700}
.btn.badf{background:var(--bad);color:#fff}
.btn.ghost{background:transparent;color:var(--teal-d);font-weight:700;padding:0 10px}
.btn.sm{min-height:44px;padding:0 14px;font-size:.92rem;border-radius:12px}
.btn.block{width:100%}
.btn:disabled,.btn[aria-disabled=true]{opacity:.45;cursor:not-allowed;filter:none}
.field{display:block;margin:14px 0 0}
.field>span{display:block;font-weight:700;margin-bottom:5px;font-size:.93rem}
.field small{display:block;color:var(--muted);margin-top:4px;font-size:.84rem}
.in{width:100%;min-height:48px;padding:10px 13px;border:1px solid var(--field);border-radius:12px;background:#fff}
textarea.in{min-height:92px;resize:vertical}
.in:focus{outline:2px solid var(--ring);outline-offset:1px;border-color:var(--ring)}
.in[aria-invalid=true]{border-color:var(--bad)}
/* PM-076: the field a refused «كمّل» points at (new.js markBlocked), red even while focused; its line under it */
.in.inv{border-color:var(--bad);outline:2px solid var(--bad);outline-offset:1px}
.field small.ferr{color:var(--bad)}
.ferr{color:var(--bad);font-weight:700;font-size:.88rem;margin-top:4px}
.pill{display:inline-flex;align-items:center;gap:6px;padding:1px 10px;border-radius:99px;font-size:.82rem;font-weight:700;line-height:1.75;white-space:nowrap;border:1px solid transparent}
.pill .d{width:7px;height:7px;border-radius:50%;background:currentColor}
.p-wait{background:var(--slate-l);color:var(--slate-t)}
.p-review{background:var(--amber-l);color:var(--amber-t);border-color:#F5D79C}
.p-held{background:var(--mint);color:#0A6B60}
.p-way{background:var(--ink);color:#fff}
.p-dispute{background:var(--bad-l);color:var(--bad);border-color:#F4BDB7}
.p-done{background:#fff;color:#0A6B60;border-color:var(--teal)}
.p-done .d{border-radius:2px}
.p-back{background:#fff;color:var(--slate-t);border-color:var(--field)}
.p-dead{background:var(--slate-l);color:var(--muted)}
.notice{background:var(--mint);border-inline-start:4px solid var(--teal);border-radius:12px;padding:10px 14px;font-size:.92rem}
.notice.amber{background:var(--amber-l);border-color:var(--amber)}
.notice.bad{background:var(--bad-l);border-color:var(--bad);color:#7E1D13}
.notice b{font-weight:800}
.opened{display:flex;align-items:center;gap:8px;margin:0 2px 12px;font-weight:700;font-size:.92rem}
.opened::before{content:"";flex:none;width:9px;height:9px;border-radius:50%;background:var(--teal)}
.opened.no::before{background:var(--amber)}
/* PM-040: «شوف الصفقة زي ما الدافع هيشوفها» (the drawer of a deal waiting on the other side, the done step of #/new) */
.pvlink .linkbtn{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;font-weight:700;color:var(--teal-d);text-decoration:underline;text-underline-offset:3px}
/* PM-029 (0034): when an unaccepted deal expires (creator only); amber under 48 h, with the one «مدّ ٧ أيام كمان» */
.exp{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:8px 0 0;color:var(--muted);font-size:.88rem}
.exp .t{display:inline-flex;align-items:center;gap:6px}
.exp.soon{color:var(--amber-t);font-weight:700}
.exp.soon .t::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--amber)}
.exp .extd{color:var(--muted);font-weight:400;font-size:.82rem}
.exp .btn{margin-inline-start:auto}
.dexp{margin:0 2px 12px}.dexp .exp{margin:0}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:thin;margin-inline:-16px;padding-inline:16px}
@media(min-width:1024px){.chips{margin-inline:0;padding-inline:0}}
.chip{flex:none;min-height:44px;display:inline-flex;align-items:center;gap:8px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:#fff;font-weight:700;color:var(--slate-t);cursor:pointer;white-space:nowrap}
/* PM-092: title chips under «العنوان» (new.js); they wrap, never scroll sideways */
.tchips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0}
.tchips[hidden]{display:none}
.tchips .chip{white-space:normal;max-width:100%;font-size:.92rem}
.chip[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.chip b{font-family:"Inter";font-size:.8rem;background:var(--slate-l);color:var(--ink);border-radius:99px;padding:0 8px;line-height:20px}
.chip[aria-pressed=true] b{background:var(--ink-3);color:#fff}
.seg{display:flex;gap:4px;background:var(--slate-l);border-radius:14px;padding:4px;margin-bottom:12px}
.seg a{flex:1;min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;text-decoration:none;color:var(--muted);font-weight:700}
.seg a[aria-current=page]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(16,28,48,.14)}
.seg a b{font-family:"Inter";font-size:.8rem;background:#fff;border-radius:99px;padding:0 8px;line-height:20px;color:var(--ink)}
.seg a[aria-current=page] b{background:var(--ink);color:#fff}
.srch{position:relative;margin-bottom:8px}
.srch svg{position:absolute;inset-inline-start:13px;top:13px;color:var(--muted);width:20px;height:20px}
.srch .in{padding-inline-start:42px}

/* ---------- home ---------- */
.greet{margin-bottom:12px}
.greet h2{font-size:1.5rem}
.greet p{color:var(--muted)}
/* the memorable element: a deal slip with a perforation, one half per direction of money */
.slip{display:grid;grid-template-columns:1fr;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--sh-2);position:relative;overflow:hidden}
.slip .half{padding:18px 18px 16px;position:relative;display:block;text-decoration:none;color:var(--ink)}
.slip .half.a{background:var(--ink);color:#fff}
.slip .half .lbl{display:flex;align-items:center;gap:8px;font-weight:700;font-size:.92rem;color:var(--muted)}
.slip .half.a .lbl{color:#B8C5DC}
.slip .big{font-family:"Inter";font-weight:800;font-size:2.15rem;letter-spacing:-.03em;line-height:1.2;direction:ltr;display:block;text-align:start;margin:4px 0 2px;font-variant-numeric:tabular-nums}
.slip .big small{font-family:"Cairo";font-size:.95rem;font-weight:700;letter-spacing:0;margin-inline-start:7px;color:var(--teal-d)}
.slip .half.a .big small{color:var(--teal)}
.slip .sub{font-size:.88rem;color:var(--muted)}
.slip .half.a .sub{color:#B8C5DC}
.slip .half .lock{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:var(--mint);color:var(--teal-d);flex:none}
.slip .half.a .lock{background:var(--ink-3);color:var(--teal)}
.slip .perf{height:0;border-top:2px dashed #C3CEDF;position:relative;margin:0}
.slip .perf::before,.slip .perf::after{content:"";position:absolute;top:-13px;width:24px;height:24px;border-radius:50%;background:var(--paper);border:1px solid var(--line)}
.slip .perf::before{inset-inline-start:-13px}.slip .perf::after{inset-inline-end:-13px}
.slip .half:focus-visible{outline-offset:-4px}
@media(min-width:768px){
  .slip{grid-template-columns:1fr 0 1fr}
  .slip .perf{height:auto;border-top:0;border-inline-start:2px dashed #C3CEDF}
  .slip .perf::before,.slip .perf::after{inset-inline-start:-13px;inset-inline-end:auto}
  .slip .perf::before{top:-13px}.slip .perf::after{top:auto;bottom:-13px}
  .slip .half{padding:24px 28px}
  .slip .big{font-size:2.8rem}
}
.stats{display:grid;gap:10px;grid-template-columns:1fr 1fr;margin-top:12px}
@media(min-width:768px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{display:block;text-decoration:none;color:var(--ink);padding:14px;position:relative;min-height:96px}
.stat:hover{box-shadow:var(--sh-2)}
.stat .n{font-family:"Inter";font-weight:800;font-size:1.65rem;letter-spacing:-.02em;line-height:1.25;font-variant-numeric:tabular-nums;direction:ltr;text-align:start}
.stat .n small{font-family:"Cairo";font-size:.8rem;color:var(--muted);font-weight:700;margin-inline-start:4px;letter-spacing:0}
.stat .t{font-weight:700;font-size:.9rem;margin-top:1px}
.stat .s{font-size:.82rem;color:var(--muted);margin-top:1px}
.stat.hot::before{content:"";position:absolute;inset-inline-start:0;top:14px;bottom:14px;width:4px;border-radius:0 4px 4px 0;background:var(--amber)}
[dir=rtl] .stat.hot::before{border-radius:4px 0 0 4px}
.hgrid{display:grid;gap:18px;margin-top:20px}
@media(min-width:1024px){.hgrid{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:start}}
.sh{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px}
.sh h3{font-size:1.08rem;display:flex;align-items:center;gap:8px}
.sh h3 .badge{font-family:"Inter";background:var(--amber);color:var(--ink);border-radius:99px;padding:0 9px;font-size:.8rem;line-height:22px}
.todo{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;padding:14px;margin-bottom:10px;border-radius:var(--r);background:#fff;border:1px solid var(--line);border-inline-start:5px solid var(--amber);box-shadow:var(--sh-1)}
.todo .ic{grid-row:1/3;width:40px;height:40px;border-radius:12px;background:var(--amber-l);color:var(--amber-t);display:grid;place-items:center}
.todo b{font-weight:800;overflow-wrap:anywhere}
.todo .why{color:var(--muted);font-size:.88rem}
.todo .go{grid-column:1/-1;margin-top:10px;display:grid;gap:8px}
/* PM-033B: a request from my pay link: teal, not the amber of a waiting step */
.todo.plreq{border-inline-start-color:var(--teal)}
.todo.plreq .ic{background:var(--mint);color:var(--teal-d)}
/* PM-047: the other side opened the link */
.todo.lopen{border-inline-start-color:var(--teal)}
.todo.lopen .ic{background:var(--mint);color:var(--teal-d)}
@media(min-width:480px){.todo .go{grid-template-columns:auto auto;justify-content:start}}
/* PM-023 A: «صفقة "..." لسه ما اتبعتتش» on Home (same shape as a to-do, its own class so the to-do list stays the server's) */
.ushare,.lcard{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;padding:14px;margin:0 0 14px;border-radius:var(--r);background:#fff;border:1px solid var(--line);border-inline-start:5px solid var(--amber);box-shadow:var(--sh-1)}
.ushare .ic,.lcard .ic{grid-row:1/3;width:40px;height:40px;border-radius:12px;background:var(--amber-l);color:var(--amber-t);display:grid;place-items:center}
.ushare b,.lcard b{font-weight:800;overflow-wrap:anywhere}
.ushare .why,.lcard .why{color:var(--muted);font-size:.88rem}
.ushare .go,.lcard .go{grid-column:1/-1;margin-top:10px;display:grid;gap:8px}
@media(min-width:480px){.ushare .go,.lcard .go{grid-template-columns:auto auto;justify-content:start}}
/* PM-051 «الدافع وافق ومدفعش لسه» / PM-052 «اللينك لسه محدش فتحه» (.lcard: the same shape, not .todo, so the to-do list stays the server's);
   PM-052 carries the post text of A.postHtml under its button, full width and without the box of a drawer section */
.lcard > .posttxt{grid-column:1/-1;margin:4px 0 0;padding:0;border:0;border-radius:0;background:none}
/* PM-098 the KYC card of Home: pending is a muted line (no button), verified teal like the opened card, rejected red */
.lcard.kycc{align-items:center}
.lcard.kycp{background:var(--paper);border-inline-start-color:var(--line);box-shadow:none}
.lcard.kycp .ic{background:#EEF2F7;color:var(--muted)}
.lcard.kycp b{font-weight:700;color:var(--muted)}
.lcard.kycv{border-inline-start-color:var(--teal)}
.lcard.kycv .ic{background:var(--mint);color:var(--teal-d)}
.lcard.kycr{border-inline-start-color:var(--bad)}
.lcard.kycr .ic{background:var(--bad-l);color:var(--bad)}
.sharehint{margin:0 0 8px;padding:8px 12px;border-radius:12px;background:var(--amber-l);color:var(--amber-t);font-weight:700;font-size:.92rem}
.btn.hl{box-shadow:0 0 0 3px var(--amber)}
.clear{display:flex;gap:14px;align-items:center;padding:16px;background:var(--mint);border-radius:var(--r);color:#0A6B60;font-weight:700}

/* ---------- deal cards ---------- */
.dcard{display:block;position:relative;padding:14px 14px 12px;margin-bottom:10px;text-decoration:none;color:var(--ink);cursor:pointer}
.dcard:hover{box-shadow:var(--sh-2)}
.dcard .l1{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.dcard .tt{display:flex;align-items:center;min-height:44px;text-decoration:none;font-weight:800;font-size:1.04rem;overflow-wrap:anywhere;color:var(--ink)}
.dcard .amt{font-family:"Inter";font-weight:800;direction:ltr;white-space:nowrap;font-variant-numeric:tabular-nums}
.dcard .amt small{font-family:"Cairo";font-weight:700;color:var(--muted);font-size:.78rem;margin-inline-start:3px}
.dcard .l2{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin-top:6px;color:var(--muted);font-size:.86rem}
.dcard .nx{margin-top:8px;font-size:.92rem;color:var(--slate-t)}
.dcard.need{border-inline-start:5px solid var(--amber)}
.dcard .go{margin-top:10px;display:flex}
.dcard .go .btn{flex:1}
.route{display:flex;gap:4px;margin-top:10px}
.route i{flex:1;height:5px;border-radius:3px;background:var(--line)}
.route i.d{background:var(--teal)}.route i.n{background:var(--amber)}
.route.bad i.n{background:var(--bad)}
@media(min-width:1024px){.dcard .go .btn{flex:none}}
.pager{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 2px;color:var(--muted);font-size:.9rem}
.group{font-size:.86rem;font-weight:800;color:var(--slate-t);margin:16px 2px 8px;display:flex;align-items:center;gap:8px}
.group::after{content:"";flex:1;height:1px;background:var(--line)}

/* ---------- states ---------- */
.sk{background:linear-gradient(90deg,#E6ECF4 25%,#F1F5FA 50%,#E6ECF4 75%);background-size:200% 100%;animation:sk 1.2s linear infinite;border-radius:10px}
@keyframes sk{to{background-position:-200% 0}}
.empty,.errbox{text-align:center;padding:36px 20px}
.empty .ic,.errbox .ic{width:68px;height:68px;border-radius:22px;background:var(--mint);color:var(--teal-d);display:grid;place-items:center;margin:0 auto 12px}
.errbox .ic{background:var(--bad-l);color:var(--bad)}
.empty .ic svg,.errbox .ic svg{width:30px;height:30px}
.empty h3,.errbox h3{font-size:1.15rem}
.empty p,.errbox p{margin:4px auto 16px;color:var(--muted);max-width:340px}
.empty .steps{list-style:none;padding:0;margin:14px auto 18px;max-width:340px;text-align:start;display:grid;gap:8px}
.empty .steps li{display:flex;gap:12px;align-items:center;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:8px 12px;font-weight:600}
.empty .steps li b{width:26px;height:26px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font:800 .8rem "Inter";flex:none}
/* PM-028 quick start: four tiles in Home's empty state, then «حاجة تانية» */
.empty .pe-alt{margin-top:6px}   /* PM-082: «طلب دفع جديد» as a text link under the empty «مدفوعاتي» button */
.empty .qsh{font-size:1rem;margin:18px 0 10px}
.qs{display:grid;grid-template-columns:1fr;gap:10px;max-width:560px;margin:0 auto;text-align:start}
@media (min-width:600px){.qs{grid-template-columns:1fr 1fr}}
.qtile{display:flex;gap:12px;align-items:center;min-height:64px;min-width:0;padding:10px 12px;border-radius:16px;border:2px solid var(--line);background:#fff;color:var(--ink);text-decoration:none}
.qtile:hover,.qtile:focus-visible{border-color:var(--teal);background:var(--mint)}
.qtile .oi{width:44px;height:44px;border-radius:14px;background:var(--slate-l);color:var(--ink);display:grid;place-items:center;flex:none}
.qtile b{display:block;font-size:1rem;line-height:1.4;overflow-wrap:anywhere}
.qtile span span{display:block;color:var(--muted);font-size:.84rem;line-height:1.45}
.qtile>span:last-child{min-width:0}
.qother{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 14px;margin-top:8px;font-weight:700}

/* ---------- sheet / drawer ---------- */
.dr-scrim{position:fixed;inset:0;background:rgba(16,28,48,.5);z-index:1000;opacity:0;pointer-events:none;transition:opacity .2s}
.dr-scrim.on{opacity:1;pointer-events:auto}
.dr{position:fixed;z-index:1010;background:var(--paper);display:flex;flex-direction:column;inset:auto 0 0 0;height:94vh;height:94dvh;border-radius:22px 22px 0 0;transform:translateY(100%);transition:transform .26s ease;visibility:hidden;box-shadow:var(--sh-3)}
.dr.open{transform:none;visibility:visible}
.dr .grab{width:44px;height:5px;border-radius:3px;background:#C3CEDF;margin:8px auto 0;flex:none}
@media(min-width:768px){.dr{inset:0 auto 0 0;width:min(520px,100vw);height:auto;border-radius:0;transform:translateX(-100%)}.dr .grab{display:none}}
.dr-h{display:flex;align-items:center;gap:8px;padding:6px 8px 8px 8px;background:var(--paper);flex:none}
.dr-h h2{font-size:1rem;flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}
.dr-b{flex:1;overflow-y:auto;padding:6px 16px 20px;overscroll-behavior:contain}
.dr-f{background:#fff;border-top:1px solid var(--line);padding:12px 16px calc(12px + env(safe-area-inset-bottom));display:grid;gap:8px;flex:none}
.dr-f:empty{display:none}
.sec{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px;margin-bottom:12px}
.sec h3{font-size:.96rem;margin-bottom:8px}
/* PM-031: the card after a finished deal (postReleaseHtml in shared.js) */
.sec.dp-post{border-color:var(--teal)}
.sec.dp-post p{margin-bottom:10px}
.sec.dp-post .row > .btn{flex:1 1 auto}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:0}
.kv dt{color:var(--muted);font-size:.88rem}
.kv dd{margin:0;font-weight:700;min-width:0;overflow-wrap:anywhere}
.amtbox{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px;margin-bottom:12px}
.hero-amt{font-family:"Inter";font-weight:800;font-size:2.2rem;letter-spacing:-.03em;direction:ltr;text-align:start;font-variant-numeric:tabular-nums;line-height:1.2}
.hero-amt small{font-family:"Cairo";font-size:.95rem;color:var(--muted);margin-inline-start:6px;letter-spacing:0}
.split{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line);font-size:.88rem}
.split span{color:var(--muted);display:block}
.split b{font-family:"Inter";direction:ltr;unicode-bidi:isolate;display:inline-block;font-variant-numeric:tabular-nums}
.tl{list-style:none;margin:0;padding:0}
.tl li{position:relative;padding:0 38px 16px 0;min-height:40px}
.tl li:last-child{padding-bottom:0}
.tl li::before{content:"";position:absolute;right:0;top:2px;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);background:#fff}
.tl li::after{content:"";position:absolute;right:11px;top:28px;bottom:-2px;width:2px;background:var(--line)}
.tl li:last-child::after{display:none}
.tl li.done::before{background:var(--teal);border-color:var(--teal)}
.tl li.done::after{background:var(--teal)}
.tl li.done .tk{display:block}
.tl li.now::before{border-color:var(--amber);box-shadow:0 0 0 4px var(--amber-l)}
.tl .tk{display:none;position:absolute;right:6px;top:8px;width:12px;height:6px;border-left:3px solid #fff;border-bottom:3px solid #fff;transform:rotate(-45deg)}
.tl b{display:block;font-size:.95rem}
.tl small{color:var(--muted)}
.tl li.pend b{color:var(--muted);font-weight:600}
.linkbox{display:flex;gap:8px;align-items:stretch;margin-top:8px}
/* PM-041 «لسه مفيش مشتري؟» (A.postHtml): a native <details>, the summary at least 44px tall, the text wraps (the link too) at 360px */
.posttxt{margin-top:12px}
.posttxt > summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;list-style:none;font-weight:700;font-size:.92rem}
.posttxt > summary::-webkit-details-marker{display:none}
.posttxt > summary::before{content:"+";flex:none;width:1.2em;text-align:center;font-weight:700;color:var(--muted)}
.posttxt[open] > summary::before{content:"−"}
.posttxt > summary:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:6px}
.posttxt-t{margin:6px 0 10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);white-space:pre-wrap;overflow-wrap:anywhere;user-select:all;line-height:1.7}
.posttxt-n{margin:8px 0 0;font-size:.84rem}
.linkbox input{flex:1;min-width:0;direction:ltr;text-align:left;font-size:.85rem}
/* PM-043 in-app browsers (Facebook / Instagram / Messenger): WhatsApp in the same tab, the link itself big and selectable under it, the copy button */
.iabshare{display:grid;gap:10px;margin-top:8px}
.iablink{margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font:600 17px/1.55 "Inter",system-ui,sans-serif;direction:ltr;text-align:left;overflow-wrap:anywhere;word-break:break-all;-webkit-user-select:all;user-select:all;cursor:text}
.btn.copied{background:var(--mint);color:var(--teal-d);border-color:var(--teal)}
.copyhint{margin:8px 2px 0;font-weight:700;font-size:.92rem;color:var(--amber-t)}
/* «افتح لوك ديل في كروم»: one tappable line, the X dismisses it (kept in this browser) */
.cstrip{display:flex;align-items:center;gap:6px;margin:12px 0;padding:6px 6px 6px 4px;border-radius:12px;background:var(--amber-l);color:var(--amber-t)}
.cstrip-a{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;gap:10px;padding:4px 10px;color:inherit;text-decoration:none}
.cstrip-a b{display:block;font-size:.95rem;line-height:1.45}
.cstrip-a small{display:block;font-size:.82rem;opacity:.9}
.cstrip .ib{color:inherit}
.cstrip-top{padding:0 16px}
.cstrip-top .cstrip{margin:10px 0 0}
.cstrip-ios{margin:10px 2px 0;font-size:.85rem}
.cstrip-top .cstrip-ios{margin:10px 0 0}
/* PM-033 the pay link name field: the fixed lockdeal.app/u/ prefix, then the name (left to right) */
.pl-in{display:flex !important;align-items:center;gap:6px;direction:ltr;font-weight:400 !important;margin:0 !important}
.pl-in>span{flex:none;font-size:.9rem}
.pl-in .in{flex:1;min-width:0}
.sepdanger{margin-top:4px;padding-top:10px;border-top:1px dashed var(--line);display:grid;gap:8px}
.sepdanger small{color:var(--muted);text-align:center}
.who{display:flex;gap:12px;align-items:center}
.who .av{background:var(--slate-l);color:var(--ink);width:42px;height:42px}
.stepper{display:flex;gap:5px;margin:2px 0 4px}
.stepper i{flex:1;height:5px;border-radius:3px;background:var(--line)}
.stepper i.d{background:var(--teal)}
.choice{display:grid;gap:10px;margin-top:12px}
.opt{color:var(--ink);display:flex;gap:14px;align-items:center;text-align:start;width:100%;min-height:76px;padding:12px 14px;border-radius:16px;border:2px solid var(--line);background:#fff;cursor:pointer}
.opt:hover{border-color:var(--field)}
.opt[aria-checked=true]{border-color:var(--teal);background:var(--mint)}
.opt .oi{width:44px;height:44px;border-radius:14px;background:var(--slate-l);color:var(--ink);display:grid;place-items:center;flex:none}
.opt[aria-checked=true] .oi{background:var(--teal)}
.opt b{display:block;font-size:1.05rem}
.opt span{color:var(--muted);font-size:.88rem}
.radios{display:grid;gap:8px;margin-top:6px}
.rad{display:flex;gap:12px;align-items:center;min-height:52px;padding:8px 12px;border:1px solid var(--field);border-radius:12px;cursor:pointer;background:#fff}
.rad input{width:22px;height:22px;accent-color:var(--ring);flex:none;margin:0}
.rad:has(input:checked){border-color:var(--teal);background:var(--mint)}
.rad:has(input:focus-visible){outline:3px solid var(--ring);outline-offset:2px}
.feebox{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px;margin-top:10px;font-size:.9rem}
.feebox .r{display:flex;justify-content:space-between;gap:10px;padding:2px 0}
.feebox .r b{font-family:"Inter";direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}
.feebox .r.tot{border-top:1px dashed var(--line);margin-top:4px;padding-top:6px;font-weight:800}
.photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}
.ph1{aspect-ratio:1;border-radius:12px;border:2px dashed var(--field);display:grid;place-items:center;color:var(--muted);font-weight:700;font-size:.82rem;background:#fff;cursor:pointer;text-align:center;padding:4px}
.ph1.has{border-style:solid;border-color:var(--teal);background:repeating-linear-gradient(135deg,#DDF8F1 0 10px,#EAFBF6 10px 20px);color:#0A6B60}
.meter{height:12px;border-radius:99px;background:var(--slate-l);overflow:hidden;margin:8px 0 6px}
.meter i{display:block;height:100%;border-radius:99px;background:var(--teal)}
.drop{border:2px dashed var(--field);border-radius:14px;padding:16px;text-align:center;color:var(--muted);font-weight:700;background:#fff;min-height:84px;display:grid;place-items:center;cursor:pointer}
.drop.has{border-style:solid;border-color:var(--teal);color:#0A6B60;background:var(--mint)}

/* ---------- auth ---------- */
.auth{min-height:100vh;display:block;padding:0;background:var(--ink);color:#fff}
.auth .hd{padding:34px 22px 30px;position:relative;overflow:hidden}
.auth .hd::after{content:"";position:absolute;inset-inline-end:-50px;top:-50px;width:200px;height:200px;border-radius:50%;border:30px solid rgba(19,184,166,.14)}
.auth .brand2{direction:ltr;display:flex;align-items:center;gap:10px;font-family:"Inter";font-weight:800;font-size:1.4rem;letter-spacing:-.02em;justify-content:flex-end}
.auth .brand2 i{font-style:normal;color:var(--teal)}
.auth .brand2 .mk{background:var(--teal);color:var(--ink)}
.auth h1{font-size:1.75rem;margin-top:22px;max-width:15ch;position:relative;z-index:1}
.auth .hd p{margin-top:8px;color:#B8C5DC;max-width:32ch;position:relative;z-index:1}
.auth .wrapper{display:flex;flex-direction:column;min-height:100vh}
.auth .box{flex:1;background:#fff;color:var(--ink);border-radius:24px 24px 0 0;padding:18px 18px 26px;margin-top:auto}
.auth .tabsw{margin-bottom:6px}
.auth .tiny{font-size:.82rem;color:var(--muted);margin-top:12px}
/* CTA_FLOW=signup: the one way back to the draft sheet, under the sign-up button */
.auth .cta-draft{text-align:center;margin-top:6px}
.auth .cta-draft a{display:inline-block;padding:10px 6px;font-weight:600}
/* PM-018: «كمّل بفيسبوك» / «كمّل بجوجل» above the e-mail form */
.auth .oauth{display:grid;gap:10px;margin:8px 0 0}
.auth .oa{display:flex;align-items:center;justify-content:center;gap:10px}
.auth .oa .oa-i,.auth .oa .i{width:20px;height:20px;flex:none}
.auth .oa-note{margin-top:0}
.auth .oauth-iab{margin-top:18px}
.auth .oa-or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.85rem;margin:4px 0 0}
.auth .oa-or::before,.auth .oa-or::after{content:"";flex:1;border-top:1px solid var(--line)}
@media(min-width:768px){
  .auth{display:grid;min-height:100vh;place-items:center;background:var(--paper)}
  .auth .wrapper{width:440px;min-height:0;border-radius:24px;overflow:hidden;box-shadow:var(--sh-3)}
}

/* ---------- dialog / toast ---------- */
.dlg-back{position:fixed;inset:0;background:rgba(16,28,48,.58);z-index:2000;display:flex;align-items:flex-end;justify-content:center}
.dlg{background:#fff;width:100%;max-height:92vh;overflow:auto;border-radius:20px 20px 0 0;padding:20px 18px calc(18px + env(safe-area-inset-bottom));box-shadow:var(--sh-3)}
@media(min-width:600px){.dlg-back{align-items:center;padding:16px}.dlg{max-width:460px;border-radius:18px}}
.dlg h3{font-size:1.15rem;margin-bottom:4px}
.dlg .lead{color:var(--muted);margin:0 0 6px}
.dlg .btns{display:grid;gap:12px;margin-top:16px}
.conseq{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:10px 0;font-size:.92rem}
.toasts{position:fixed;z-index:3000;inset-inline:12px;bottom:calc(var(--tab) + 34px + env(safe-area-inset-bottom));display:grid;gap:8px;pointer-events:none;justify-items:center}
@media(min-width:1024px){.toasts{bottom:20px}}
.toast{pointer-events:auto;background:var(--ink);color:#fff;border-radius:14px;padding:12px 16px;box-shadow:var(--sh-3);display:flex;gap:10px;align-items:center;max-width:460px;width:100%;font-weight:700;animation:ti .2s ease}
.toast svg{color:var(--teal)}
.toast.bad svg{color:var(--amber)}
@keyframes ti{from{transform:translateY(10px);opacity:0}}
.pop{position:absolute;z-index:1500;top:56px;inset-inline-end:8px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--sh-3);padding:8px;width:min(300px,calc(100vw - 16px))}
.pop .who{padding:8px}
.pop hr{border:0;border-top:1px solid var(--line);margin:6px 0}
.pop .mi{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 10px;border-radius:10px;width:100%;border:0;background:none;text-align:start;cursor:pointer;font-weight:700;text-decoration:none;color:var(--ink)}
.pop .mi:hover{background:var(--slate-l)}
.pop select{margin:2px 0 8px}
.pop small{display:block;padding:2px 10px;color:var(--muted);font-weight:700}
.dr-scrim.l2{z-index:1020}.dr.l2{z-index:1030}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* ---------- additions for the real page ---------- */
.ph1{position:relative;overflow:hidden}
.ph1 input,.drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
.ph1:focus-within,.drop:focus-within{outline:3px solid var(--ring);outline-offset:2px}
.drop{position:relative;overflow:hidden}
.drop .fn{overflow-wrap:anywhere}
.legal{margin-top:28px;padding:0 4px;color:var(--muted);font-size:.84rem;text-align:center}
.legal a{color:var(--muted)}
.fxtag{display:inline-block;background:var(--amber-l);color:var(--amber-t);border:1px solid #F5D79C;border-radius:99px;padding:0 10px;font-size:.78rem;font-weight:700}
.side-foot a{color:#A9B7CE;display:inline-flex;align-items:center;min-height:44px;margin-top:2px}
.btn.link{background:none;border:0;color:var(--teal-d);min-height:44px;padding:0 6px;font-weight:700;text-decoration:underline}
.sep{border:0;border-top:1px dashed var(--line);margin:12px 0}
.inline-err:empty{display:none}
.card.pad.plain{box-shadow:none}
@media(max-width:359px){.slip .big{font-size:1.8rem}}
/* PM-035: unread chat badge on a deal card and the «رسايل جديدة» card on Home (views/chat.js); the chat itself styles itself (deal_chat.js) */
.cbadge{display:inline-flex;align-items:center;gap:4px;background:var(--teal-d);color:#fff;border-radius:99px;padding:0 10px;font-size:.8rem;font-weight:700;line-height:22px}
.cbadge b{font-family:"Inter"}
.todo.chatn{border-inline-start-color:var(--teal)}
.todo.chatn .ic{background:var(--mint);color:var(--teal-d)}
.dr-b .ldc{margin:4px 0 16px}
/* PM-057: the who-pays card of a receive deal (views/new.js); the buttons stack and wrap their text */
.whocard{margin:4px 0 8px;border-inline-start:5px solid var(--amber)}
.whocard h3:focus,.whocard p:focus,.whocard ol:focus{outline:none}
/* PM-066: the 3 how-it-works lines «إزاي بتشتغل» opens inside the card */
.whohow{margin:0 0 12px;padding-inline-start:1.4em;list-style:arabic-indic;display:grid;gap:6px;line-height:1.6}
.whobtns{display:grid;gap:10px}
.whobtns .btn{padding:8px 14px;white-space:normal;font-size:16px}
/* PM-058: the guided terms inputs of a used_item / service deal (views/new.js): stacked, 16px so phones do not zoom */
.guided .field{margin:10px 0 0}
.guided .in{font-size:16px}
.guided + .field .in{font-size:16px}
/* PM-063 «ابعتها لنفسك وكمّل بعدين»: the WhatsApp button and the copy button side by side, a note under them */
.selflink{margin:12px 0 10px}
.selfrow{display:flex;gap:8px;align-items:stretch}
.selfrow .btn{white-space:normal;line-height:1.25;padding-block:6px}
.selfrow .btn[data-self-link="wa"]{flex:1 1 auto;min-width:0}
.selfrow .btn[data-self-link="copy"]{flex:0 0 auto}
.selflink .selfnote{margin:6px 2px 0;font-size:.82rem}
.selflink .selfurl{margin:8px 0 0;font-size:.75rem;word-break:break-all;user-select:all;-webkit-user-select:all}
.auth .box .selflink{margin-top:14px}
.linkchoice{margin:0 0 12px;line-height:1.6}
/* PM-081: the 6-digit code of the verification e-mail (email_code.js) */
.vcode{margin-top:4px}
.vcode .field span bdi{font-weight:700}
.vcode-in{font-size:1.35rem;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums}
.vcode-more{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.vcode-more .btn{flex:1 1 140px;min-height:44px}
/* PM-083: the confirmation window in days: the number, then «يوم»; a PM-076 line under the field takes a row of its own */
.winrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.winrow #nWin{order:1;width:110px;flex:0 0 auto}
.winrow .winunit{order:2;color:var(--muted)}
.winrow .ferr{order:3;flex-basis:100%}
