/* FitPass member app: HTML screens for review before React Native.
 * Tokens mirror the future RN theme (theme.ts). Logical properties only, so Arabic (RTL) and English (LTR)
 * share one layout. */
@import url("fonts.css");
@import url("tokens.css");
@import url("base.css");
@import url("ui.css");
:root{
  /* colours, type and the rest come from tokens.css (packages/design). Only what this surface changes is here. */
  --tabbar:68px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{margin:0;background:#ffffff;color:var(--ink);font:15px/1.55 var(--font)}
button,input,select{font:inherit;color:inherit}
a{color:var(--accent)}
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 60%,transparent);outline-offset:2px}
bdi{unicode-bidi:isolate}
/* Default icon size; components below override it. */
svg{width:1.15em;height:1.15em;vertical-align:-.2em;flex:none}
.num{white-space:nowrap}

/* Device: full screen on a phone, a phone-sized column on a desktop. */
.device{position:relative;width:100%;height:100dvh;background:var(--bg);overflow:hidden;display:flex;flex-direction:column}
@media (min-width:520px){
  body{display:grid;place-items:center;padding:24px}
  .device{width:390px;height:min(844px,calc(100dvh - 48px));border-radius:44px;border:10px solid #111;box-shadow:0 30px 80px rgba(0,0,0,.35)}
}
.scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:0 18px 24px}
.has-tabbar .scroll{padding-bottom:calc(var(--tabbar) + 20px)}
.statusbar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;font-weight:600;font-size:14px;flex:none}
.statusbar span:last-child{letter-spacing:1px}

/* Top bar */
.topbar{display:flex;align-items:center;gap:10px;padding:6px 14px 10px;flex:none}
.topbar h1{font-size:18px;margin:0;flex:1}
.ib{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;cursor:pointer;position:relative;flex:none;color:var(--ink);text-decoration:none}
.ib svg{width:20px;height:20px}
.ib .dot{position:absolute;top:8px;inset-inline-end:9px;width:9px;height:9px;border-radius:50%;background:var(--warm);border:2px solid var(--surface)}
[dir=rtl] .flip{transform:scaleX(-1)}

/* Type */
h1,h2,h3{line-height:1.25;margin:0 0 .4em}
.title{font-size:26px;font-weight:700;margin:4px 0 6px}
.sub{color:var(--muted);margin:0 0 18px}
.section{font-size:16px;font-weight:700;margin:22px 0 10px;display:flex;align-items:center;justify-content:space-between}
.section a{font-size:13px;font-weight:600;text-decoration:none}
.muted{color:var(--muted)}.small{font-size:13px}.center{text-align:center}
.num{font-variant-numeric:tabular-nums}

/* Buttons */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;border-radius:var(--r);border:1px solid var(--cta-line);
  background:var(--cta-bg);color:var(--cta-fg);box-shadow:var(--cta-glow);font-weight:700;font-size:16px;cursor:pointer;text-decoration:none;padding:0 18px;transition:transform .15s,box-shadow .15s}
.btn:hover{background:var(--cta-bg-hover)}.btn:active{transform:translateY(1px);box-shadow:none}
.btn.secondary{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}.btn.secondary:hover{background:var(--surface-2)}
.btn.ghost{background:transparent;color:var(--brand);min-height:44px;border-color:transparent;box-shadow:none}.btn.ghost:hover{background:var(--brand-soft)}
.btn.danger{background:var(--surface);color:var(--bad);border-color:var(--line);box-shadow:none}
.btn:disabled,.btn[aria-disabled=true]{opacity:.45;cursor:not-allowed}
.btn.sm{min-height:38px;font-size:14px;width:auto;border-radius:12px;padding:0 14px}
.footer{flex:none;padding:12px 18px calc(14px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line)}
.footer .row{display:flex;align-items:center;gap:12px}
.footer .price{flex:1}.footer .price b{font-size:20px;display:block}

/* Forms */
.field{display:block;margin-bottom:14px}
.field>span{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
.input{width:100%;height:52px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface);padding:0 14px;font-size:16px}
.err{color:var(--bad);font-size:13px;margin:-6px 0 12px}
.seg{display:flex;background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:4px;gap:4px}
.seg button{flex:1;border:0;background:transparent;border-radius:10px;min-height:42px;font-weight:600;cursor:pointer;color:var(--muted)}
.seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}

/* Chips and badges */
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;margin:0 -18px;padding-inline:18px;scrollbar-width:none}
.chip{flex:none;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:8px 14px;font-weight:600;font-size:14px;cursor:pointer;white-space:nowrap}
.chip[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.badge{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.b-brand{background:var(--brand-soft);color:var(--brand)}.b-warm{background:var(--warm-soft);color:var(--warm)}
.b-info{background:var(--info-soft);color:var(--info)}.b-bad{background:var(--bad-soft);color:var(--bad)}.b-ok{background:var(--ok-soft);color:var(--ok)}
.b-dark{background:rgba(0,0,0,.6);color:#fff;backdrop-filter:blur(6px)}

/* Cards */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:12px}
.card.flat{box-shadow:none}
.list{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-bottom:14px}
.li{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);background:none;border-inline:0;border-top:0;width:100%;text-align:start;cursor:pointer}
.li:last-child{border-bottom:0}
.li .grow{flex:1;min-width:0}.li small{display:block;color:var(--muted);font-size:13px}
.li .ico{width:38px;height:38px;border-radius:12px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex:none}
.li .ico svg{width:19px;height:19px}.li>svg{width:18px;height:18px;color:var(--muted);flex:none}

/* Photos (real images go in /img; a calm block shows until the file exists) */
.photo{position:relative;background:linear-gradient(135deg,#2b3140,#566077);overflow:hidden}
.photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.photo.missing img{display:none}
.photo .ph{position:absolute;inset:0;display:none;place-items:center;color:rgba(255,255,255,.85);font-size:12px;text-align:center;padding:12px}
.photo.missing .ph{display:grid}
.photo .ph b{display:block;font-size:30px;margin-bottom:4px}

/* Gym card */
.gcard{display:block;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;margin-bottom:14px;text-decoration:none;color:var(--ink)}
.gcard .photo{height:170px}
.gcard .tags{position:absolute;top:10px;inset-inline-start:10px;display:flex;gap:6px;flex-wrap:wrap}
.gcard .body{padding:12px 14px 14px}
.gcard h3{font-size:17px;margin:0 0 2px;display:flex;justify-content:space-between;gap:8px}
.gcard .meta{display:flex;gap:10px;color:var(--muted);font-size:13px;flex-wrap:wrap}
.gcard .meta span{display:inline-flex;align-items:center;gap:3px}.gcard .meta svg{width:14px;height:14px}
.gcard .price{margin-top:8px;display:flex;align-items:baseline;gap:6px}
.gcard .price b{font-size:17px}.gcard .price s{color:var(--muted);font-size:13px}
.star{color:#e2a400}

/* Home header */
.hello{display:flex;align-items:center;gap:12px;padding:4px 18px 12px;flex:none}
.hello .who{flex:1}.hello .who small{color:var(--muted);display:block}.hello .who b{font-size:19px}
.search{display:flex;align-items:center;gap:10px;height:50px;border-radius:14px;border:1px solid var(--line);background:var(--surface);padding:0 14px;margin-bottom:12px}
.search input{border:0;background:transparent;flex:1;font-size:15px;outline:none;min-width:0}
.search svg{width:19px;height:19px;color:var(--muted)}
.wallet-pill{display:flex;align-items:center;gap:8px;background:var(--brand);color:var(--on-brand);border-radius:var(--r);padding:14px 16px;margin-bottom:6px;text-decoration:none}
.wallet-pill .grow{flex:1}.wallet-pill small{opacity:.8;display:block;font-size:12px}.wallet-pill b{font-size:20px}
.wallet-pill .btn{background:rgba(255,255,255,.18);color:inherit;width:auto;min-height:36px;font-size:14px;border-radius:10px}
.company-strip{display:flex;gap:10px;align-items:center;background:var(--info-soft);color:var(--info);border-radius:var(--r);padding:12px 14px;margin-bottom:6px;font-size:14px}
.company-strip svg{width:20px;height:20px;flex:none}

/* Gym page */
.gallery{position:relative;height:300px;flex:none}
.gallery .track{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.gallery .track .photo{flex:0 0 100%;scroll-snap-align:start}
.gallery .top{position:absolute;top:12px;inset-inline:14px;display:flex;justify-content:space-between;z-index:2}
.gallery .top .ib{background:rgba(255,255,255,.92);border:0;color:#111}
.gallery .count{position:absolute;bottom:26px;inset-inline-end:14px;z-index:2}
.sheet{background:var(--bg);border-radius:24px 24px 0 0;margin-top:-18px;position:relative;padding-top:18px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;font-size:14px}
.kv dt{color:var(--muted)}.kv dd{margin:0;font-weight:600}
.facs{display:flex;flex-wrap:wrap;gap:8px}
.fac{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:7px 11px;font-size:13px;font-weight:600}
.offer{display:flex;gap:12px;align-items:center;background:var(--warm-soft);color:var(--warm);border-radius:var(--r);padding:12px 14px;margin-bottom:10px}
.offer svg{width:22px;height:22px;flex:none}
.loyal{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;margin-bottom:10px}
.dots{display:flex;gap:6px;margin-top:8px}.dots i{flex:1;height:8px;border-radius:99px;background:var(--line)}.dots i.on{background:var(--brand)}
.mapcard{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink)}
.mapthumb{width:84px;height:64px;border-radius:12px;flex:none;background:
  linear-gradient(90deg,transparent 46%,var(--line) 46% 54%,transparent 54%),linear-gradient(0deg,transparent 40%,var(--line) 40% 48%,transparent 48%),var(--brand-soft);position:relative}
.mapthumb::after{content:"";position:absolute;width:14px;height:14px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--bad);top:20px;left:34px}
.week{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;font-size:14px}
.week .today{font-weight:700;color:var(--brand)}

/* Booking */
.days{display:flex;gap:10px;margin-bottom:6px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:6px;-webkit-overflow-scrolling:touch}.days::-webkit-scrollbar{display:none}
.day{flex:0 0 auto;min-width:112px;scroll-snap-align:start;border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:12px;text-align:start;cursor:pointer}
.day b{display:block}.day small{color:var(--muted)}
.day[aria-pressed=true]{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft);}
.slots{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.slot{min-height:46px;border:1px solid var(--line);background:var(--surface);border-radius:12px;font-weight:700;cursor:pointer;position:relative;direction:ltr}
.slot small{display:block;font-size:10px;font-weight:600;color:var(--warm)}
.slot[aria-pressed=true]{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.slot[aria-pressed=true] small{color:inherit}
.slot:disabled{background:var(--surface-2);color:var(--muted);text-decoration:line-through;cursor:not-allowed;opacity:.7}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:8px}
.stepper{display:flex;align-items:center;gap:14px}
.stepper button{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-size:20px;cursor:pointer}
.stepper b{min-width:70px;text-align:center}
.sum{font-size:14px}.sum div{display:flex;justify-content:space-between;padding:6px 0}
.sum .tot{border-top:1px dashed var(--line);margin-top:6px;padding-top:12px;font-size:17px;font-weight:700}
.sum .neg{color:var(--ok)}
.pay-opt{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:14px;margin-bottom:10px;cursor:pointer;width:100%;text-align:start}
.pay-opt[aria-pressed=true]{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.pay-opt .grow{flex:1}.pay-opt small{display:block;color:var(--muted)}
.radio{width:20px;height:20px;border-radius:50%;border:2px solid var(--line);flex:none}
[aria-pressed=true] .radio{border:6px solid var(--brand)}
.logo-pay{width:40px;height:28px;border-radius:6px;display:grid;place-items:center;font-size:10px;font-weight:800;color:#fff;flex:none}

/* Ticket */
.ticket{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;margin-bottom:14px}
.ticket .photo{height:120px}
.ticket .tb{padding:16px}
.qrbox{background:#fff;border-radius:18px;padding:18px;width:min(280px,78vw);margin:6px auto 8px;border:1px solid var(--line)}
.qrbox svg{display:block;width:100%;height:auto}
.wallet-pill>svg{width:26px;height:26px}.pay-opt>svg{width:22px;height:22px;color:var(--muted)}
.timer{display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;color:var(--muted)}
.ring{width:18px;height:18px}
.perf{border-top:2px dashed var(--line);margin:14px -16px;position:relative}

/* Wallet */
.balance{background:linear-gradient(135deg,#0e1116,#2c3342);color:#fff;border-radius:var(--r-lg);padding:20px;margin-bottom:14px}
.balance small{opacity:.85}.balance b{display:block;font-size:34px;margin:4px 0 14px}
.balance .acts{display:flex;gap:10px}.balance .btn{background:#fff;color:#0e1116;min-height:44px;font-size:15px}
.balance .btn.secondary{background:rgba(255,255,255,.15);color:#fff;border:0}
.tx .amt{font-weight:700}.tx .amt.plus{color:var(--ok)}
.amounts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
.amounts button{min-height:52px;border-radius:14px;border:1px solid var(--line);background:var(--surface);font-weight:700;cursor:pointer}
.amounts button[aria-pressed=true]{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}

/* Plans */
.plan{position:relative;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-lg);padding:18px;margin-bottom:12px}
.plan.hot{border:2px solid var(--brand)}
.plan .badge{position:absolute;top:-11px;inset-inline-start:16px}
.plan h3{margin:0;font-size:18px}.plan .p{font-size:26px;font-weight:800;margin:8px 0 2px}
.plan ul{margin:10px 0 14px;padding-inline-start:18px;color:var(--muted);font-size:14px}

/* Empty / success states */
.empty{text-align:center;padding:40px 20px;color:var(--muted)}
.empty svg{width:48px;height:48px;color:var(--brand);margin-bottom:10px}
.done-hero{text-align:center;padding:10px 0 8px}
.done-hero .tick{width:72px;height:72px;border-radius:50%;background:var(--ok-soft);color:var(--ok);display:grid;place-items:center;margin:0 auto 12px}
.done-hero .tick svg{width:36px;height:36px}

/* Tab bar */
.tabbar{position:absolute;bottom:0;inset-inline:0;height:var(--tabbar);background:var(--surface);border-top:1px solid var(--line);display:flex;padding-bottom:env(safe-area-inset-bottom);z-index:5}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:600;color:var(--muted);text-decoration:none}
.tab svg{width:23px;height:23px}.tab[aria-current=page]{color:var(--brand)}

/* Welcome */
.welcome{position:relative;flex:1;display:flex;flex-direction:column;color:#fff}
.welcome .photo{position:absolute;inset:0}
.welcome::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.15) 20%,rgba(0,0,0,.85) 72%)}
.welcome .in{position:relative;z-index:2;margin-top:auto;padding:24px 22px 30px}
.welcome h1{font-size:32px;margin:0 0 8px}.welcome p{opacity:.9;margin:0 0 22px}
.welcome .btn.secondary{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.35)}
.welcome .topw{position:absolute;top:52px;inset-inline:20px;display:flex;justify-content:space-between;align-items:center;z-index:2}
.logo{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:20px}
.logo i{width:30px;height:30px;border-radius:9px;background:var(--brand);display:grid;place-items:center;font-style:normal;color:#fff;font-size:15px}
.welcome .langbtn{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.35)}

/* Email client mock (invite) */
.mail{background:var(--surface);border-radius:var(--r);border:1px solid var(--line);overflow:hidden}
.mail .hd{padding:14px 16px;border-bottom:1px solid var(--line);font-size:13px}
.mail .bd{padding:20px 18px}
.code{font:700 26px ui-monospace,Menlo,monospace;letter-spacing:3px;background:var(--brand-soft);color:var(--brand);border-radius:12px;padding:12px;text-align:center;direction:ltr;margin:12px 0}

/* Toast and dialog */
.toast{position:absolute;bottom:calc(var(--tabbar) + 16px);inset-inline:16px;background:var(--ink);color:var(--bg);border-radius:14px;padding:12px 16px;font-size:14px;z-index:20;box-shadow:var(--shadow);animation:up .2s}
.no-tabbar .toast{bottom:96px}
@keyframes up{from{transform:translateY(10px);opacity:0}}
.scrim{position:absolute;inset:0;background:rgba(0,0,0,.45);z-index:30;display:flex;align-items:flex-end}
.dialog{background:var(--bg);width:100%;border-radius:24px 24px 0 0;padding:22px 18px 26px}
.dialog h2{font-size:19px}
.spinner{width:42px;height:42px;border-radius:50%;border:4px solid var(--brand-soft);border-top-color:var(--brand);animation:spin 1s linear infinite;margin:30px auto 14px}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
