/* HOS Club — the customer app. Brand tokens from DESIGN.md: Performance Red,
   Ink, Poppins/Inter, Cairo for Arabic. Red is the balance and the progress
   fill, nothing else; the black card is the proof of membership. */
@font-face { font-family: 'Cairo'; src: url('/static/fonts/cairo-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('/static/fonts/cairo-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/static/fonts/poppins-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/static/fonts/poppins-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #171717; --red: #D81F26; --red-deep: #A5161C; --paper: #FFFFFF; --plate: #EEEEEB; --plate-2: #E2E2DE;
  --steel: #6B6B6B; --body: #3A3A38; --bronze: #B5713A; --silver: #9DA6B0; --gold: #D9A21B; --green: #2F6E52; --green-tint: #DDEBE3;
  --warn: #7A1116; --warn-tint: #FAE3E4; --wa: #25D366;
  --latin: 'Poppins', 'Segoe UI', system-ui, sans-serif; --text: 'Inter', 'Segoe UI', system-ui, sans-serif; --arabic: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { font-family: var(--text); font-size: 16px; line-height: 1.45; }
html[lang="ar"] body { font-family: var(--arabic); }
.num { font-family: var(--latin); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.screen { flex: 1; padding: 12px 20px calc(24px + var(--safe-b)); }
.screen.has-nav { padding-bottom: calc(92px + var(--safe-b)); }
h1 { font-size: 24px; margin: 10px 0 0; font-weight: 700; line-height: 1.25; }
html[lang="en"] h1, html[lang="en"] h2 { font-family: var(--latin); letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 22px 0 8px; font-weight: 700; }
.sub { color: var(--steel); font-size: 14px; margin: 4px 0 0; }
.label { font-size: 12.5px; color: var(--steel); }
.muted { color: var(--steel); }
.hidden { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 0; }
.topbar .back { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--plate-2); display: grid; place-items: center; font-size: 20px; }
html[dir="rtl"] .topbar .back svg { transform: scaleX(-1); }
.lang { font-size: 13px; font-weight: 700; color: var(--steel); padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--plate-2); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border-radius: 14px; font-weight: 700; font-size: 16px; padding: 0 16px; }
.btn.red { background: var(--red); color: #fff; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.line { border: 1.5px solid var(--ink); color: var(--ink); background: #fff; }
.btn.ghost { color: var(--steel); min-height: 44px; }
.btn.wa { background: var(--wa); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn + .btn { margin-top: 8px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(72px + var(--safe-b)); padding-bottom: var(--safe-b); border-top: 1px solid var(--plate-2); background: #fff; display: flex; z-index: 5; }
.nav .inner { max-width: 480px; margin: 0 auto; width: 100%; display: flex; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--steel); text-decoration: none; }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* membership card */
.card { background: var(--ink); color: #fff; border-radius: 20px; padding: 16px 18px 14px; margin-top: 8px; }
.card .head { display: flex; justify-content: space-between; align-items: center; }
.logo { font: 800 15px var(--latin); letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; }
.logo b { color: var(--red); }
.card .name { font-size: 20px; font-weight: 700; margin-top: 14px; min-height: 1.3em; }
.card .row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; gap: 10px; }
.card .meta { font-size: 12px; color: #B9B9B4; }
.card .word { font: 700 22px var(--latin); letter-spacing: .18em; }
.tier { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font: 700 12.5px var(--latin); background: #2A2A2A; color: #fff; white-space: nowrap; }
.tier i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--bronze); }
.tier.silver i { background: var(--silver); } .tier.gold i { background: var(--gold); }

.reps { margin-top: 20px; }
.reps .n { font: 800 60px/1 var(--latin); color: var(--red); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.reps .eq { font-size: 17px; margin-top: 6px; color: var(--body); }
.reps .eq b { color: var(--ink); }

.bar { margin-top: 18px; }
.bar .track { position: relative; height: 14px; background: var(--plate); border-radius: 7px; direction: ltr; }
html[dir="rtl"] .bar .track { direction: rtl; }
.bar .fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; background: var(--red); border-radius: 7px; transition: width .6s ease; }
.bar .plate { position: absolute; top: -9px; width: 10px; height: 32px; border-radius: 3px; background: var(--ink); margin-inline-start: -5px; }
.bar .plate.gold { background: var(--gold); }
.bar .ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--steel); }
.bar .msg { margin-top: 8px; font-size: 14.5px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.tile { min-height: 72px; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; font-weight: 700; font-size: 15px; text-decoration: none; text-align: start; }
.tile.red { background: var(--red); color: #fff; }
.tile.ink { background: var(--ink); color: #fff; }
.tile.line { border: 1.5px solid var(--plate-2); color: var(--ink); background: #fff; }
.tile small { display: block; font-weight: 400; font-size: 12px; opacity: .8; margin-top: 2px; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--plate); font-size: 13.5px; line-height: 1.45; }
.notice.good { background: var(--green-tint); color: #1F4D38; }
.notice.warn { background: var(--warn-tint); color: var(--warn); font-weight: 600; }
.notice a { font-weight: 700; }
.linkrow { display: block; margin-top: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--plate-2); text-decoration: none; font-weight: 700; }
.linkrow small { display: block; font-weight: 400; color: var(--steel); font-size: 12.5px; }

.field { margin-top: 18px; }
.field label { display: block; font-size: 13px; color: var(--steel); margin-bottom: 6px; }
.field input, .field select { width: 100%; height: 56px; border: 1.5px solid var(--plate-2); border-radius: 14px; padding: 0 14px; font-size: 18px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { border-color: var(--ink); outline: none; }
.field .lock { font-size: 12px; color: var(--steel); margin-top: 6px; }
.phonefield { display: flex; align-items: center; gap: 8px; direction: ltr; }
.phonefield .cc { font: 600 18px var(--latin); color: var(--steel); padding-left: 14px; }
.phonefield input { padding-left: 0; border: 0; height: 52px; font-family: var(--latin); letter-spacing: .04em; }
.phonefield { height: 56px; border: 1.5px solid var(--plate-2); border-radius: 14px; }
.phonefield:focus-within { border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13.5px; color: var(--body); line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.otp { margin-top: 10px; }
.otp input { width: 100%; height: 64px; border: 1.5px solid var(--plate-2); border-radius: 14px; text-align: center; font: 700 30px var(--latin); letter-spacing: .5em; direction: ltr; padding-inline-start: .5em; }
.otp input:focus { border-color: var(--ink); outline: none; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 48px; border: 1.5px solid var(--plate-2); border-radius: 12px; font-weight: 700; font-size: 15px; background: #fff; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.chips { display: flex; gap: 8px; margin-top: 10px; }
.chips button { flex: 1; min-height: 50px; border: 1.5px solid var(--plate-2); border-radius: 12px; font: 700 15px var(--latin); background: #fff; }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.range { width: 100%; margin: 18px 0 0; accent-color: var(--red); height: 28px; }
.amount { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.amount .big { font: 800 40px/1 var(--latin); }
.amount .r { color: var(--steel); font-size: 14px; }

.codebox { margin-top: 18px; background: var(--ink); color: #fff; border-radius: 20px; padding: 20px 16px; text-align: center; }
.codebox .l { font-size: 13px; color: #B9B9B4; }
.codebox .c { font: 800 36px/1.1 var(--latin); letter-spacing: .1em; margin-top: 10px; direction: ltr; unicode-bidi: isolate; }
.codebox .bc { background: #fff; border-radius: 12px; padding: 10px 8px 4px; margin-top: 14px; }
.codebox .bc svg { display: block; height: 96px; width: 100%; }
.codebox .t { margin-top: 10px; font-size: 14px; color: #D6D6D2; }
.codebox .t b { color: #fff; font-family: var(--latin); }
.codebox .ring { height: 6px; background: #333; border-radius: 999px; margin-top: 12px; overflow: hidden; direction: ltr; }
.codebox .ring i { display: block; height: 100%; background: var(--red); transition: width 1s linear; }
.coupon { margin-top: 18px; border: 2px dashed var(--ink); border-radius: 16px; padding: 18px 16px; text-align: center; }
.coupon .c { font: 800 28px/1.1 var(--latin); letter-spacing: .08em; direction: ltr; unicode-bidi: isolate; }
.coupon .l { font-size: 13px; color: var(--steel); margin-top: 6px; }
.steps { margin-top: 16px; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.step b { font-family: var(--latin); color: var(--red); min-width: 2ch; }

.month { font-size: 12.5px; color: var(--steel); margin-top: 18px; }
.rowi { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--plate); gap: 10px; }
.rowi .t { font-size: 15px; }
.rowi .d { font-size: 12.5px; color: var(--steel); margin-top: 3px; }
.rowi .v { font: 700 17px var(--latin); white-space: nowrap; direction: ltr; }
.rowi .v.plus { color: var(--green); } .rowi .v.minus { color: var(--red-deep); } .rowi .v.wait { color: var(--steel); }
.rowi .v.star { color: var(--gold); }

.code-line { border: 1.5px solid var(--plate-2); border-radius: 14px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-top: 18px; }
.code-line .c { font: 800 22px var(--latin); letter-spacing: .08em; direction: ltr; }
.code-line button { font-size: 13px; font-weight: 700; padding: 8px 10px; }
.bonus { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; background: var(--plate); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.bonus b { font-family: var(--latin); color: var(--red); font-size: 18px; direction: ltr; }

.member { background: var(--ink); color: #fff; margin: -12px -20px 0; padding: 14px 24px 24px; min-height: calc(100vh - 72px); }
.member .big { font-size: 28px; font-weight: 700; margin-top: 26px; }
.member .clock { font: 800 64px/1 var(--latin); margin-top: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; direction: ltr; }
.member .clock small { font-size: 28px; color: #B9B9B4; }
.member .date { font-size: 16px; color: #B9B9B4; margin-top: 6px; }
.member .word { margin-top: 26px; display: flex; align-items: baseline; gap: 14px; }
.member .word .w { font: 800 44px/1 var(--latin); letter-spacing: .2em; color: var(--red); direction: ltr; }
.member .word .l { font-size: 13px; color: #B9B9B4; max-width: 180px; line-height: 1.4; }
.member .box { margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: #2A2A2A; font-size: 14px; line-height: 1.5; }
.member .partner { padding: 12px 0; border-bottom: 1px solid #2A2A2A; }
.member .partner b { display: block; }
.member .partner span { color: #B9B9B4; font-size: 13.5px; }

.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.rate div { border-radius: 12px; padding: 10px 8px; text-align: center; background: var(--plate); }
.rate div span { display: block; font: 800 22px var(--latin); direction: ltr; }
.rate div small { font-size: 12px; color: var(--steel); }
.rate div.g { background: var(--ink); color: #fff; } .rate div.g small { color: #B9B9B4; }
.way { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--plate); font-size: 14.5px; line-height: 1.4; }
.way b { font-family: var(--latin); white-space: nowrap; color: var(--ink); direction: ltr; }

.logo-img { display: block; height: 84px; margin: 22px auto 4px; }
.center { text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 9; max-width: 90%; }
.skeleton { background: linear-gradient(90deg, var(--plate) 25%, var(--plate-2) 50%, var(--plate) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; color: transparent; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.err { color: var(--warn); font-size: 14px; margin-top: 10px; font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
