/* CROWD — customer sign-in (WhatsApp code) + My account. NEW FILE (web-login). Builds on style.css: same tokens
   (--ink, --paper, --mist, --line, --kraft, --muted, --r), .drawer sheet, form.co, .fld, .phone, .btn, .me-av. RTL-safe. */
.wl-form{padding:18px 0 8px}
.wl-head h3{margin:0 0 6px;font-size:22px;font-weight:800;line-height:1.08}
html[lang="ar"] .wl-head h3{font-weight:700;line-height:1.35}
.wl-head p{margin:0 0 4px;color:var(--muted);font-size:14px}
.wl-head .back{font-size:13px;margin-inline-start:6px}
.wl-help{font-size:12px;color:var(--muted)}
.wl-go{justify-content:center;width:100%}
.wl-go[disabled]{opacity:.6;cursor:progress}
.wl-go svg{width:18px;height:18px}
.wl-code{font-family:var(--f-mono)!important;font-size:22px!important;letter-spacing:.42em;text-align:center;direction:ltr}
.wl-err{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;line-height:1.4;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,#c0392b 9%,var(--paper));border:1px solid color-mix(in srgb,#c0392b 35%,transparent)}
.wl-info{font-size:13px;color:var(--ok);margin:0}
.wl-test{margin:0;font-size:13px;line-height:1.45;padding:10px 12px;border-radius:12px;background:var(--kraft);color:#1b150b}
.wl-fine{margin:0;font-size:12px;color:var(--muted)}
/* Continue with Apple / Google (social sign-in change). v3 (web-v3): both EXACTLY the same size — Google draws its button at
   the width web-account.js asks for (--wl-sw) × 40 px; the Apple button takes the same --wl-sw × 40 px, pill. Both white:
   Google "outline", Apple "white with outline" on light / white on dark (Apple's and Google's own rules). .is-icons: narrow
   screens get two round 40 px logo buttons side by side (Google's own "G" icon button + Apple's logo-only button). */
.wl-or{display:flex;align-items:center;gap:12px;margin:2px 0;font-size:12.5px;color:var(--muted)}
.wl-or::before,.wl-or::after{content:"";flex:1;height:1px;background:var(--line)}
.wl-social{--wl-sw:100%;display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;min-width:0}
.wl-social.is-icons{flex-direction:row;justify-content:center;gap:16px}
.wl-apple{display:block;width:var(--wl-sw);max-width:100%;height:40px;min-height:40px;margin:0;overflow:hidden;border-radius:20px}   /* review S5: Apple's own button (Sign in with Apple JS) is drawn inside */
.wl-apple.is-icon{width:40px;border-radius:50%}
.wl-apple>div,.wl-apple>iframe{max-width:100%}
.wl-off{visibility:hidden;pointer-events:none}   /* a script that couldn't load: its slot keeps its place until the next screen (review S4b) */
.wl-google{display:flex;justify-content:center;align-items:center;width:var(--wl-sw);max-width:100%;height:40px;min-height:40px}
.wl-google[hidden]{display:none}
.wl-social.is-icons .wl-google{width:40px}
@media (max-width:400px){   /* phones: the compact row from the first paint, before the scripts measure (review S4: nothing jumps) */
  .wl-social{flex-direction:row;justify-content:center;gap:16px}
  .wl-social .wl-google,.wl-social .wl-apple{width:40px;border-radius:50%}
}
/* v3: New here? Create account · Already have an account? Sign in */
.wl-mode-p{margin:2px 0 0;text-align:center;font-size:14px;color:var(--muted)}
.wl-mode-p .back{font-size:14px;color:var(--ink);font-weight:600}
.wl-unlink{justify-self:center;font-size:13px}
.wl-resend{justify-self:center}
.wl-resend[disabled]{text-decoration:none;cursor:default;opacity:.8}
.wl-df{padding-block:14px calc(14px + env(safe-area-inset-bottom,0px))}
.wl-staff{font-size:12.5px;color:var(--muted);text-underline-offset:3px}
/* checkout */
.wl-co{margin:0;font-size:13px;line-height:1.5;color:var(--muted);padding:10px 12px;border-radius:12px;background:var(--mist)}
.wl-co .back{font-size:13px;color:var(--ink);font-weight:600}
.wl-co-in{display:flex;gap:10px;align-items:center;color:var(--ink)}
.fld input.wl-locked{color:var(--muted);cursor:default}
/* my-account.html */
.wa-main{padding-block:clamp(24px,4vw,48px) clamp(48px,7vw,96px)}
.wa-loading{color:var(--muted);padding:40px 0}
.wa-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(16px,3vw,32px);align-items:start}
.wa-grid.wa-out{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
@media(max-width:820px){.wa-grid,.wa-grid.wa-out{grid-template-columns:minmax(0,1fr)}}
.wa-card{border:1px solid var(--line);border-radius:calc(var(--r) + 6px);padding:clamp(18px,2.6vw,28px);background:var(--paper);box-shadow:var(--shadow);min-width:0}
.wa-card .wl-form{padding:0}
.wa-intro h2{margin:10px 0 10px;font-size:clamp(24px,3vw,34px);line-height:1;font-weight:800}
html[lang="ar"] .wa-intro h2{line-height:1.3;font-weight:700}
.wa-intro p{color:var(--muted);margin:0 0 18px;max-width:44ch}
.wa-me-top{display:flex;gap:14px;align-items:center;margin-bottom:18px}
.wa-av{width:56px;height:56px;font-size:22px}
.wa-name{margin:0;font-size:22px;font-weight:800;line-height:1.1;overflow-wrap:anywhere}
html[lang="ar"] .wa-name{font-weight:700;line-height:1.35}
.wa-phone{margin:4px 0 0;color:var(--muted);font-size:13px;text-align:start}
html[dir="rtl"] .wa-phone{text-align:end}
.wa-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.wa-row .btn{height:44px;padding:0 18px;font-size:13.5px}
.wa-edit{padding:0}
.wa-list-h h2{margin:0;font-size:22px;font-weight:800}
.wa-list-h p{margin:4px 0 14px;color:var(--muted);font-size:13.5px}
.wa-orders{list-style:none;margin:0;padding:0;display:grid}
.wa-order{display:grid;gap:6px;padding:14px 0;border-top:1px solid var(--line)}
.wa-o-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.wa-o-top b{font-size:14px;font-weight:500}
.wa-o-items{font-size:14px;overflow-wrap:anywhere}
.wa-o-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12.5px;color:var(--muted);align-items:baseline}
.wa-o-meta span:empty{display:none}
.wa-o-meta b{margin-inline-start:auto;color:var(--ink);font-size:13.5px;font-weight:500}
.wa-st{font-size:12px;padding:3px 10px;border-radius:99px;border:1px solid var(--line);white-space:nowrap}
.wa-st.st-confirmed{border-color:var(--ink)}
.wa-st.st-ready{background:var(--kraft);border-color:var(--kraft);color:#1b150b;font-weight:600}
.wa-st.st-collected{background:var(--mist);color:var(--muted)}
.wa-st.st-cancelled{color:var(--muted);text-decoration:line-through}
.wa-empty{padding:28px 0 8px;display:grid;gap:8px;justify-items:start;color:var(--muted)}
.wa-empty b{color:var(--ink);font-size:17px}
.wa-empty p{margin:0 0 6px}
/* ---- v1.2 (web-v2): staff password step, checkout choices + guest code, My account tabs, profile, support, theme switch ---- */
.wl-pwbox{position:relative}
.wl-pwbox input{padding-inline-end:52px}
.wl-eye{position:absolute;inset-block:1px;inset-inline-end:1px;width:46px;border:0;border-radius:11px;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer}
.wl-eye svg{width:20px;height:20px}
.wl-eye[aria-pressed="true"]{color:var(--ink)}
.wl-eye:focus-visible{outline:2px solid var(--ink);outline-offset:-3px}
/* checkout: Sign in · Create account · Checkout as guest */
.co-how{display:grid;gap:10px;padding:14px;border-radius:14px;background:var(--mist);border:1px solid var(--line)}
.co-how-t{margin:0;font-weight:700;font-size:14px}
.co-how-b{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.co-how-b .btn{height:auto;min-height:44px;padding:8px 10px;justify-content:center;text-align:center;font-size:13px;line-height:1.2;white-space:normal}
.co-how-p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.45}
@media(max-width:400px){.co-how-b{grid-template-columns:1fr}}
.gv{display:grid;gap:12px;padding:16px;border-radius:14px;border:1.5px solid var(--ink);background:var(--paper)}
.gv h3{margin:0;font-size:18px;font-weight:800;line-height:1.1}
html[lang="ar"] .gv h3{font-weight:700;line-height:1.35}
.gv p{margin:0;font-size:14px;color:var(--muted)}
.gv .back{font-size:13px;margin-inline-start:6px}
.gv .wl-resend{justify-self:center}
/* My account: tabs */
.wa-tabs{display:flex;gap:6px;overflow-x:auto;margin:0 0 20px;padding:3px;scrollbar-width:none}
.wa-tabs::-webkit-scrollbar{display:none}
.wa-tabs button{flex:none;min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:99px;background:transparent;color:var(--ink);font-size:13.5px;font-weight:600;white-space:nowrap}
.wa-tabs button:hover{background:var(--mist)}
.wa-tabs button[aria-selected="true"]{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.wa-tabs button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.wa-o-acts{display:flex;flex-wrap:wrap;gap:4px 18px}
.wa-link{background:none;border:0;padding:0;min-height:44px;color:var(--ink);font-size:13.5px;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.wa-link[disabled]{opacity:.65;cursor:progress}
.wa-pf,.wa-sp{padding:0}
.wa-pf label small,.wa-sp label small{color:var(--muted)}
.wa-age{min-height:1.2em}
.fld select{appearance:auto}
.wa-sub{margin:28px 0 8px;font-size:17px;font-weight:800}
html[lang="ar"] .wa-sub{font-weight:700}
.wa-muted{color:var(--muted);margin:0}
.sp-list{list-style:none;margin:0;padding:0;display:grid}
.sp-req{display:grid;gap:8px;padding:16px 0;border-top:1px solid var(--line)}
.sp-thread{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.sp-msg{max-width:92%;padding:10px 12px;border-radius:14px;background:var(--mist);overflow-wrap:anywhere}
.sp-msg.st{margin-inline-start:auto;background:var(--paper);border:1px solid var(--ink)}
.sp-msg small{font-size:12px;color:var(--muted)}
.sp-msg p{margin:2px 0 0;font-size:14px;white-space:pre-line}
.sp-rep{display:flex;gap:8px;align-items:flex-end}
.sp-rep textarea{flex:1;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--mist);padding:10px 12px;font:inherit;color:var(--ink);resize:vertical}
.sp-rep textarea:focus{outline:none;border-color:var(--ink);background:var(--paper)}
.sp-rep .btn{height:44px;padding:0 16px;font-size:13px}
.wa-st.sp-open{border-color:var(--ink)}
.wa-st.sp-answered{background:var(--kraft);border-color:var(--kraft);color:#1b150b;font-weight:600}
.wa-st.sp-closed{background:var(--mist);color:var(--muted)}
/* theme switch (footer, mobile menu, sign-in sheet, My account → Settings) */
.th-seg{display:inline-flex;gap:2px;padding:3px;border-radius:99px;border:1px solid var(--line)}
.th-seg button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border:0;border-radius:99px;background:transparent;color:var(--muted);font-size:12.5px;font-weight:600}
.th-seg button svg{width:16px;height:16px;flex:none}
.th-seg button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.th-seg button:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.th-big button{min-height:44px;padding:0 16px;font-size:14px}
.foot .th-foot{border-color:rgba(243,242,238,.18)}
.foot .th-foot button{color:#c9c5bd}
.foot .th-foot button[aria-pressed="true"]{background:#f3f2ee;color:#0c0c0b}
.foot .th-foot button:focus-visible{outline-color:#f3f2ee}
.mmenu .th-menu{margin-top:14px;justify-self:start}
.wl-df .th-seg{justify-self:start}
@media(max-width:520px){.th-foot button span,.wl-th-sheet button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.th-foot button,.wl-th-sheet button{padding:0 10px;min-width:40px;justify-content:center}}
.wa-legal{margin:0;font-size:14px}.wa-legal a{color:var(--ink);text-underline-offset:3px}
/* v3 (web-v3): ONE sign-in UI — Phone (WhatsApp) | Username tabs at the top; smooth on phones */
.wl-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--mist)}
.wl-tabs [role=tab]{display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 10px;border:0;border-radius:999px;background:transparent;
  color:var(--muted);font:600 14px/1.15 var(--f-body);cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
html[lang="ar"] .wl-tabs [role=tab]{font-family:var(--f-ar)}
.wl-tabs [role=tab] svg{width:16px;height:16px;flex:none}
.wl-tabs [role=tab][aria-selected="true"]{background:var(--paper);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08),0 0 0 1px var(--line)}
.wl-tabs [role=tab]:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
:root[data-theme="dark"] .wl-tabs{background:#262624}
:root[data-theme="dark"] .wl-tabs [role=tab][aria-selected="true"]{background:var(--raised,#1d1d1b)}
.wl-panel{display:grid;gap:14px}
.wl-form input{font-size:16px}                      /* iOS Safari zooms the page (it jumps) on inputs under 16 px */
.wl-form .wl-code{font-size:22px!important}
.wl-go,.wl-tabs [role=tab],.wl-mode,.wl-change,.wl-resend{touch-action:manipulation}   /* no double-tap zoom / 300 ms delay */
.wl-go[aria-busy="true"]{cursor:progress}
.wl-err:empty{display:none}
.wl-msg{display:grid;gap:8px}
.wl-msg:has(> :not([hidden])){margin-top:2px}
.wl-owner{justify-self:center;font-size:13px;text-align:center}
.wl-panel .wl-resend{justify-self:center}
.wl-sheet .db{overscroll-behavior:contain}
@supports (height:100dvh){.wl-sheet{height:100dvh}}
/* short phones (iPhone SE): the sheet's theme switch gives its room to the form ("Create account" stays in view); the same
   switch is in the page footer and the menu */
@media (max-height:740px){.wl-sheet .wl-df{display:none}}
.wl-tabs [role=tab] span{white-space:nowrap}
@media(max-width:380px){.wl-tabs [role=tab] svg{display:none}.wl-tabs [role=tab]{font-size:13.5px;padding:0 6px}}
/* auth-v4 (docs/CONTRACT-auth-v4.md): minimal sign-in — icon tabs, no explanations, auto-advance, a clean Google button.
   Scoped to .wl-v4 (the new form), so a browser that still runs the cached v3 script keeps its v3 look. */
.wl-v4 .wl-tabs{width:max-content;justify-self:center;margin-inline:auto;grid-template-columns:repeat(2,56px)}
.wl-v4 .wl-tabs [role=tab]{min-height:40px;padding:0}
.wl-v4 .wl-tabs [role=tab] svg{display:block;width:20px;height:20px}
.wl-v4 .wl-head p:empty{display:none}
.wl-sr{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0!important;padding:0!important;margin:-1px!important}
.wl-v4 .wl-ic{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;margin:-8px 0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.wl-v4 .wl-ic svg{width:18px;height:18px}
.wl-v4 .wl-ic:hover{background:var(--mist)}
.wl-v4 .wl-ic:focus-visible{outline:2px solid var(--ink);outline-offset:-4px}
.wl-v4 .wl-sent,.wl-v4 .wl-who{display:flex;align-items:center;gap:6px;margin:0;color:var(--ink);font-size:15px;min-height:44px}
.wl-v4 .wl-who-ic{display:inline-grid;color:var(--muted)}
.wl-v4 .wl-who-ic svg{width:18px;height:18px}
.wl-v4 input[type=date]{font-size:16px;min-height:44px}
.wl-google,.wl-google iframe{color-scheme:light}   /* W3: the frame's colour scheme matches its own page: no opaque white box in dark mode */
.wa-intro p:empty{display:none}
