/* Ya Nashmi: shared styles for the inner pages (register, scan, inbox). Same tokens as the landing page. */
:root{
  --bg:#f7f4ee; --surface:#ffffff; --ink:#15120f; --muted:#625b51; --line:#e4dccd;
  --red:#b3122a; --green:#0b6b43; --on-green:#ffffff; --bubble:#efe7d6; --band-bg:#ffffff;
  --gold:#a47a2e; --soft-green:#e3f1ea; --soft-red:#f8e3e6;
  --display:'Reem Kufi','IBM Plex Sans Arabic',system-ui,sans-serif;
  --body:'IBM Plex Sans Arabic',system-ui,sans-serif;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0b0d0c; --surface:#131715; --ink:#f2eee6; --muted:#a9a498; --line:#25302a;
  --red:#d92b45; --green:#3fd193; --on-green:#04241a; --bubble:#1c221f; --band-bg:#0b0d0c;
  --gold:#d4ab5c; --soft-green:#0f2a20; --soft-red:#2c1217; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0b0d0c; --surface:#131715; --ink:#f2eee6; --muted:#a9a498; --line:#25302a;
  --red:#d92b45; --green:#3fd193; --on-green:#04241a; --bubble:#1c221f; --band-bg:#0b0d0c;
  --gold:#d4ab5c; --soft-green:#0f2a20; --soft-red:#2c1217; color-scheme:dark}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.8;-webkit-font-smoothing:antialiased}
.wrap{max-width:560px;margin:0 auto;padding-inline:max(18px,env(safe-area-inset-right,0px)) max(18px,env(safe-area-inset-left,0px))}
h1,h2,h3{font-family:var(--display);font-weight:700;line-height:1.3;margin:0;text-wrap:balance}
h1{font-size:clamp(1.9rem,6vw,2.5rem)} h2{font-size:1.4rem}
p{margin:0} a{color:inherit}
:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.band{height:22px;background:conic-gradient(var(--red) 25%,var(--band-bg) 0 50%,var(--red) 0 75%,var(--band-bg) 0) 0 0/11px 11px;border-block:1px solid var(--red)}
.top{display:flex;align-items:center;justify-content:space-between;padding-block:18px}
.logo{display:flex;align-items:center;gap:8px;font-family:var(--display);font-weight:700;font-size:1.4rem;text-decoration:none}
.logo svg{width:22px;height:22px;color:var(--green)}
.top .back{font-size:.92rem;color:var(--muted);text-decoration:none}
main{padding-block:14px 72px}
.lead{color:var(--muted);margin:10px 0 24px}
.note{color:var(--muted);font-size:.9rem}
.cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:var(--red);color:#fff;text-decoration:none;font:inherit;font-weight:600;padding:14px 24px;border-radius:6px;border:0;cursor:pointer}
.cta.alt{background:transparent;color:var(--ink);border:1px solid var(--line)}
.cta:disabled{opacity:.6}
.stack{display:grid;gap:12px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;border:1px solid var(--line);border-radius:99px;padding:2px 12px;color:var(--muted);background:var(--surface)}
.pill svg{width:14px;height:14px;color:var(--green)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:18px}
.warn{border:1px solid var(--red);background:var(--soft-red);border-radius:10px;padding:14px 16px;font-size:.95rem}
[hidden]{display:none!important}

/* register */
.crumbs{display:flex;gap:8px;align-items:center;margin:0 0 22px;padding:0;list-style:none;font-size:.88rem;color:var(--muted)}
.crumbs li{display:flex;align-items:center;gap:8px}
.crumbs li+li::before{content:"";width:22px;height:1px;background:var(--line)}
.crumbs b{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--line);font-size:.8rem;font-weight:600}
.crumbs .on{color:var(--ink)} .crumbs .on b{background:var(--green);color:var(--on-green);border-color:var(--green)}
form{display:grid;gap:22px}
label.f{display:grid;gap:6px;font-weight:600}
label.f small{font-weight:400;color:var(--muted)}
input[type=text],input[type=tel]{width:100%;font:inherit;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
input.hp{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);opacity:0;padding:0;border:0}
.consent{display:flex;gap:12px;align-items:flex-start;font-size:.95rem;color:var(--muted)}
.consent input{margin-top:7px;width:18px;height:18px;accent-color:var(--green)}
.err{min-height:1.5em;color:var(--red);font-weight:500}

/* sticker */
.sticker{width:min(290px,82%);margin:0 auto;background:#fff;color:#15120f;padding:14px;border-radius:8px;border:1px solid #e8e0d0;box-shadow:0 24px 50px -22px rgba(0,0,0,.5)}
.sticker .edge{height:12px;margin:-14px -14px 12px;background:conic-gradient(#b3122a 25%,#fff 0 50%,#b3122a 0 75%,#fff 0) 0 0/6px 6px;border-radius:8px 8px 0 0}
.sticker .qr svg{display:block;width:100%;height:auto}
.sticker b{display:block;font-family:var(--display);font-size:1.3rem;text-align:center;margin-top:10px}
.sticker small{display:block;text-align:center;color:#625b51;font-size:.82rem;line-height:1.5}
.tips{display:grid;gap:10px;margin:22px 0 0;padding:0;list-style:none}
.tips li{display:flex;gap:12px;align-items:flex-start;color:var(--muted);font-size:.95rem}
.tips svg{flex:none;width:20px;height:20px;color:var(--green);margin-top:5px}

/* scan page */
.who{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:0 0 22px}
.who .ic{flex:none;width:44px;height:44px;border-radius:50%;background:var(--soft-green);color:var(--green);display:grid;place-items:center}
.who .ic svg{width:24px;height:24px}
.who small{display:block;color:var(--muted);font-size:.85rem;line-height:1.4}
.group{margin:22px 0 10px;font-size:.85rem;font-weight:600;color:var(--muted);letter-spacing:.02em}
.opt{display:flex;gap:14px;align-items:center;width:100%;text-align:start;font:inherit;font-size:1.05rem;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;cursor:pointer;transition:border-color .15s,transform .05s}
.opt:hover{border-color:var(--green)} .opt:active{transform:scale(.99)}
.opt:disabled{opacity:.55;cursor:default}
.opt .ic{flex:none;width:42px;height:42px;border-radius:10px;background:var(--bubble);color:var(--ink);display:grid;place-items:center}
.opt .ic svg{width:24px;height:24px}
.opt.primary{border-color:var(--green);background:var(--soft-green);font-weight:600;font-size:1.15rem;padding-block:18px}
.opt.primary .ic{background:var(--green);color:var(--on-green)}
.track{display:grid;gap:0;margin:20px 0 0;padding:0;list-style:none}
.track li{display:flex;gap:14px;align-items:flex-start;padding-bottom:20px;position:relative;color:var(--muted)}
.track li::before{content:"";position:absolute;inset-inline-start:11px;top:26px;bottom:0;width:2px;background:var(--line)}
.track li:last-child{padding-bottom:0} .track li:last-child::before{display:none}
.track .dot{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);background:var(--bg);display:grid;place-items:center}
.track .done{color:var(--ink)} .track .done .dot{background:var(--green);border-color:var(--green);color:var(--on-green)}
.track .done .dot svg{width:14px;height:14px}
.track .wait .dot{border-color:var(--green)} .track .wait .dot::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--green);animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.7);opacity:.35}}
@media (prefers-reduced-motion:reduce){.track .wait .dot::after{animation:none}}
.reply{margin-top:22px;border-radius:12px;padding:18px;background:var(--soft-green);border:1px solid var(--green)}
.reply b{font-family:var(--display);font-size:1.4rem;display:block;color:var(--green)}

/* inbox: the reception switch */
.reception{display:flex;align-items:center;justify-content:space-between;gap:16px;border-radius:14px;padding:18px;margin-bottom:22px;border:1px solid var(--green);background:var(--soft-green)}
.reception.off{border-color:var(--red);background:var(--soft-red)}
.reception .txt b{display:flex;align-items:center;gap:10px;font-weight:600;font-size:1.15rem}
.reception .txt b i{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 0 0 var(--green);animation:ring 2s infinite}
.reception.off .txt b i{background:var(--red);animation:none}
@keyframes ring{70%{box-shadow:0 0 0 9px transparent}100%{box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){.reception .txt b i{animation:none}}
.reception .txt span{display:block;color:var(--muted);font-size:.92rem;line-height:1.55;margin-top:4px}
.switch{flex:none;position:relative;width:64px;height:36px;border-radius:99px;border:0;background:var(--green);cursor:pointer;transition:background .2s;padding:0}
.switch::after{content:"";position:absolute;top:4px;inset-inline-start:4px;width:28px;height:28px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch[aria-checked="true"]::after{transform:translateX(28px)}
html[dir="rtl"] .switch[aria-checked="true"]::after{transform:translateX(-28px)}
.switch[aria-checked="false"]{background:#9a928a}
.switch:disabled{opacity:.6}
.inbox-h{display:flex;align-items:baseline;justify-content:space-between;margin:6px 0 12px}
.msgcard{display:grid;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
.msgcard.new{border-color:var(--green);box-shadow:0 0 0 3px var(--soft-green)}
.msgcard .head{display:flex;gap:12px;align-items:center}
.msgcard .ic{flex:none;width:40px;height:40px;border-radius:10px;background:var(--bubble);display:grid;place-items:center}
.msgcard .ic svg{width:22px;height:22px}
.msgcard .head b{display:block;line-height:1.5}
.msgcard .head small{color:var(--muted)}
.badge-new{margin-inline-start:auto;background:var(--green);color:var(--on-green);font-size:.75rem;border-radius:99px;padding:1px 10px;font-weight:600}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{font:inherit;font-size:.95rem;border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:99px;padding:9px 16px;cursor:pointer}
.chip:hover{border-color:var(--green)}
.chip:disabled{opacity:.5}
.replied{display:flex;align-items:center;gap:8px;color:var(--green);font-weight:500}
.replied svg{width:18px;height:18px}
.empty{text-align:center;padding:36px 16px;color:var(--muted);border:1px dashed var(--line);border-radius:14px}
.empty svg{width:40px;height:40px;color:var(--green);margin-bottom:8px}

@media print{
  body *{visibility:hidden} #print-area,#print-area *{visibility:visible}
  #print-area{position:absolute;inset:0;margin:20mm auto;width:90mm}
  .band{display:none}
}

/* notifications onboarding */
.notif{border:1px solid var(--gold);background:var(--surface);border-radius:16px;padding:18px;margin-bottom:22px}
.notif.enabled{border-color:var(--green);background:var(--soft-green)}
.notif.denied{border-color:var(--red);background:var(--soft-red)}
.n-head{display:flex;gap:14px;align-items:flex-start}
.n-ic{flex:none;width:46px;height:46px;border-radius:12px;background:var(--bubble);color:var(--ink);display:grid;place-items:center}
.n-ic svg{width:26px;height:26px}
.notif.enabled .n-ic{background:var(--green);color:var(--on-green)}
.notif.denied .n-ic{background:var(--red);color:#fff}
.n-head b{display:block;font-weight:600;font-size:1.15rem;line-height:1.55}
.n-head small{display:block;color:var(--muted);font-size:.95rem;line-height:1.6;margin-top:2px}
.n-body{margin-top:16px;display:grid;gap:14px}
.perm{border:1px solid var(--line);background:var(--bg);border-radius:14px;padding:14px 16px;box-shadow:0 12px 28px -18px rgba(0,0,0,.5)}
.perm .t{font-size:.92rem;color:var(--ink);line-height:1.6;direction:rtl}
.perm .t i{font-style:normal;direction:ltr;unicode-bidi:isolate;color:var(--muted)}
.perm .b{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.perm .b span{font-size:.9rem;padding:6px 18px;border-radius:99px;border:1px solid var(--line);color:var(--muted)}
.perm .b span.allow{background:var(--green);color:var(--on-green);border-color:var(--green);font-weight:600;position:relative}
.perm .b span.allow::after{content:"";position:absolute;inset:-5px;border-radius:99px;border:2px solid var(--green);animation:ping 1.8s ease-out infinite}
@keyframes ping{0%{opacity:.9;transform:scale(.92)}100%{opacity:0;transform:scale(1.25)}}
@media (prefers-reduced-motion:reduce){.perm .b span.allow::after{animation:none;opacity:.6}}
.perm-cap{font-size:.88rem;color:var(--muted);text-align:center}
.btn-big{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;background:var(--red);color:#fff;border:0;border-radius:12px;font:inherit;font-weight:600;font-size:1.1rem;padding:16px;cursor:pointer}
.btn-big svg{width:22px;height:22px}
.btn-big:disabled{opacity:.6}
.btn-row{display:flex;gap:10px;flex-wrap:wrap}
.btn-row .cta{flex:1;min-width:140px;padding:12px 16px}
.how{display:grid;gap:0;margin:0;padding:0;list-style:none;counter-reset:h}
.how li{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:start;padding:13px 0;border-top:1px solid var(--line)}
.how li:first-child{border-top:0}
.how .num{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--bubble);color:var(--ink);font-weight:600;font-size:.95rem}
.how .tx{line-height:1.65}
.how .tx b{font-weight:600}
.how .tx .ico{display:inline-grid;place-items:center;vertical-align:middle;width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--bg);margin-inline:4px;color:var(--ink)}
.how .tx .ico svg{width:18px;height:18px}
.n-note{font-size:.9rem;color:var(--muted);line-height:1.65}
.n-msg{font-size:.95rem;min-height:1.4em}
.n-msg.ok{color:var(--green)} .n-msg.bad{color:var(--red)}
.pc-warn{display:flex;gap:10px;align-items:flex-start;background:var(--bubble);border-radius:10px;padding:12px 14px;font-size:.92rem;line-height:1.6}
.pc-warn svg{flex:none;width:20px;height:20px;margin-top:3px;color:var(--gold)}

/* ===== chat-style inbox ===== */
.chat-page{max-width:560px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column}
.chat-head{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;
  padding:12px max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));
  background:color-mix(in srgb,var(--bg) 90%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.chat-head .back{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:var(--muted);text-decoration:none;flex:none}
.av{flex:none;width:46px;height:46px;border-radius:50%;background:linear-gradient(145deg,var(--green),#0a4d33);color:#fff;display:grid;place-items:center;box-shadow:0 0 0 3px var(--soft-green)}
.av svg{width:26px;height:26px}
.chat-head .meta{min-width:0;flex:1}
.chat-head .meta b{display:block;font-weight:600;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head .meta small{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.82rem;line-height:1.4}
.dot{width:8px;height:8px;border-radius:50%;background:var(--green);flex:none}
.dot.off{background:var(--red)}
.sw-wrap{display:grid;justify-items:center;gap:3px;font-size:.7rem;color:var(--muted);flex:none}
.switch.sm{width:50px;height:28px}
.switch.sm::after{top:4px;width:20px;height:20px}
.switch.sm[aria-checked="true"]::after{transform:translateX(22px)}
html[dir="rtl"] .switch.sm[aria-checked="true"]::after{transform:translateX(-22px)}
.chat-top{padding:12px max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))}
.strip{border:1px solid var(--green);background:var(--soft-green);border-radius:14px;overflow:hidden}
.strip-b{display:flex;align-items:center;gap:12px;width:100%;background:none;border:0;font:inherit;color:var(--ink);text-align:start;padding:11px 14px;cursor:pointer}
.strip-b .ic{flex:none;width:32px;height:32px;border-radius:9px;background:var(--green);color:var(--on-green);display:grid;place-items:center}
.strip-b .ic svg{width:18px;height:18px}
.strip-b b{font-weight:600;font-size:.98rem}
.strip-b small{color:var(--muted);margin-inline-start:auto;font-size:.82rem}
.strip-b .chev{transition:transform .2s;color:var(--muted)}
.strip-b[aria-expanded="true"] .chev{transform:rotate(90deg)}
.panel{padding:4px 14px 16px;display:grid;gap:12px;border-top:1px solid var(--line)}
.sound-opt{display:flex;gap:10px;align-items:center;font-size:.95rem}
.sound-opt input{width:18px;height:18px;accent-color:var(--green)}
details.help{border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:0 14px}
details.help summary{cursor:pointer;padding:12px 0;font-weight:600;font-size:.97rem;list-style:none;display:flex;justify-content:space-between}
details.help summary::-webkit-details-marker{display:none}
details.help summary::after{content:"+";color:var(--green);font-size:1.3rem;line-height:1}
details.help[open] summary::after{content:"–"}
details.help .how{padding-bottom:6px}
.chat-body{flex:1;display:flex;flex-direction:column;gap:10px;padding:16px max(16px,env(safe-area-inset-right,0px)) 40px max(16px,env(safe-area-inset-left,0px));
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23a47a2e' stroke-width='1' opacity='.09'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3C/g%3E%3C/svg%3E")}
.day{align-self:center;font-size:.78rem;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:99px;padding:2px 14px;margin:8px 0 2px}
.sys{align-self:center;max-width:92%;text-align:center;font-size:.86rem;background:var(--soft-red);border:1px solid var(--red);border-radius:12px;padding:8px 14px;line-height:1.6}
.thread{display:flex;flex-direction:column;gap:7px}
.bub{max-width:88%;padding:9px 14px 7px;border-radius:18px;line-height:1.6;box-shadow:0 1px 0 rgba(0,0,0,.05)}
.bub.in{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-start-start-radius:5px}
.bub.in.new{border-color:var(--green);box-shadow:0 0 0 3px var(--soft-green)}
.bub.out{align-self:flex-end;background:var(--green);color:var(--on-green);border-start-end-radius:5px}
.bub .who{display:flex;align-items:center;gap:8px;font-size:.74rem;color:var(--muted);margin:0 0 3px;padding:0;background:none;border:0;border-radius:0}
.bub .who .badge-new{margin-inline-start:6px}
.bub .line{display:flex;gap:10px;align-items:flex-start}
.bub .mic{flex:none;width:30px;height:30px;border-radius:9px;background:var(--bubble);display:grid;place-items:center;margin-top:2px}
.bub .mic svg{width:18px;height:18px}
.bub .tx{font-size:1.02rem}
.bub .meta{display:flex;justify-content:flex-end;align-items:center;gap:5px;font-size:.72rem;opacity:.72;margin-top:3px}
.bub .meta svg{width:15px;height:15px}
.qr-hint{align-self:flex-start;font-size:.78rem;color:var(--muted);margin-top:2px}
.qr-row{align-self:flex-start;display:flex;flex-wrap:wrap;gap:8px;max-width:96%}
.thread .chip{border-color:var(--green);color:var(--green);background:var(--surface);font-weight:500;padding:10px 18px}
.thread .chip:hover{background:var(--soft-green)}
.empty-chat{margin:auto;text-align:center;max-width:300px;color:var(--muted);padding:30px 10px}
.empty-chat .art{width:84px;height:84px;margin:0 auto 14px;border-radius:50%;background:var(--soft-green);color:var(--green);display:grid;place-items:center}
.empty-chat .art svg{width:42px;height:42px}
.empty-chat b{display:block;color:var(--ink);font-size:1.1rem;margin-bottom:4px}

/* register: two-part name */
fieldset.f2{border:0;padding:0;margin:0;display:grid;gap:6px;min-width:0}
fieldset.f2 legend{font-weight:600;padding:0;margin-bottom:6px}
fieldset.f2 small{color:var(--muted);line-height:1.6}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:4px}
input[aria-invalid="true"]{border-color:var(--red)!important;box-shadow:0 0 0 3px var(--soft-red)}

/* compact notifications card (overrides the larger first version above) */
.notif{padding:14px;margin-bottom:12px;border-radius:18px}
.notif.ready{border-color:var(--green);background:linear-gradient(145deg,var(--soft-green),var(--surface) 70%)}
.n-ic{width:40px;height:40px;border-radius:12px}
.n-ic svg{width:22px;height:22px}
.notif.ready .n-ic{background:var(--green);color:var(--on-green)}
.n-head{align-items:center;gap:12px}
.n-head b{font-size:1.08rem;line-height:1.4}
.n-head small{font-size:.9rem;line-height:1.5;margin-top:1px}
.notif .btn-big{margin-top:12px;padding:13px;font-size:1.02rem;border-radius:12px}
.n-hint{margin:8px 0 0;text-align:center;font-size:.86rem;color:var(--muted)}
.mini-allow{display:inline-block;background:var(--green);color:var(--on-green);border-radius:99px;padding:0 11px;font-weight:600;font-size:.82rem;line-height:1.7}
.n-msg:empty{display:none}
.how.compact{margin-top:8px}
.how.compact li{padding:9px 0;gap:12px}
.how.compact .num{width:28px;height:28px;font-size:.85rem}
.how.compact .tx{font-size:.95rem;line-height:1.6}
.pc-warn{margin-top:10px;padding:10px 12px;font-size:.88rem}
