/* Layout: brand-blue header with a scrolling nav, one centered column of cards below. */
:root {
  --bg: #F2F4F9; --surface: #FFFFFF; --sunk: #F6F8FC; --text: #121A2E; --muted: #5A6480; --line: #DFE4EF;
  --brand: #0B3DA9; --brand-2: #0A3290; --brand-soft: #E7EDFB; --on-brand: #FFFFFF;
  --gold: #D9A12B; --gold-soft: #FBF1DC;
  --good: #16865A; --good-soft: #E1F3EA; --bad: #B6372C; --bad-soft: #FBE6E3;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-display: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120; --surface: #121A2E; --sunk: #0F1628; --text: #E7ECF7; --muted: #98A3BE; --line: #22304D;
    --brand: #0B3DA9; --brand-2: #08297A; --brand-soft: #16264A; --on-brand: #FFFFFF;
    --gold: #F0BC52; --gold-soft: #3A2C10;
    --good: #4CC48C; --good-soft: #12301F; --bad: #F2796B; --bad-soft: #3A1B19;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 820px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--brand); }
@media (prefers-color-scheme: dark) { a { color: #8EB0FF; } }

/* header */
.top { background: var(--brand); color: var(--on-brand); position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); }
.brand b { display: block; font: 600 17px/1.2 var(--f-display); }
.brand small { opacity: .8; font-size: 12.5px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-width: 0; }
.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.who button { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: 4px 10px; font: inherit; cursor: pointer; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 13px; border-radius: 99px; white-space: nowrap; }
.nav a.on { background: #FFFFFF; color: var(--brand); }
.nav .sep { flex: 0 0 auto; width: 1px; background: rgba(255,255,255,.3); margin: 6px 6px; }
.nav .lbl { flex: 0 0 auto; align-self: center; font-size: 11.5px; letter-spacing: .4px; opacity: .7; padding-inline: 4px; }

main { display: grid; gap: 16px; padding-block: 18px calc(48px + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.lead, .muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.card.narrow { max-width: 460px; width: 100%; justify-self: center; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stack { display: grid; gap: 6px; }

/* forms */
form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
label.f { display: grid; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
.opt { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; font: 15px var(--f-body); color: var(--text); background: var(--sunk); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[dir="ltr"] { text-align: right; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--sunk); border-radius: 10px; padding: 11px 12px; cursor: pointer; font-weight: 600; }
.choice input { width: auto; accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 12px 18px; font: 600 15px var(--f-body); cursor: pointer; background: var(--brand); color: var(--on-brand); text-decoration: none; }
.btn.gold { background: var(--gold); color: #1E1503; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.note { background: var(--gold-soft); border-radius: 10px; padding: 12px 14px; }
.okbox { background: var(--good-soft); color: var(--good); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.peek { font-size: 14px; border-radius: 10px; padding: 10px 12px; background: var(--sunk); border: 1px dashed var(--line); }
.peek.ok { border-color: var(--good); }
.peek.no { border-color: var(--bad); color: var(--bad); }

/* code + stats */
.codebox { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--brand); color: var(--on-brand); border-radius: 14px; padding: 16px 18px; flex-wrap: wrap; }
.codebox small { opacity: .8; display: block; font-size: 13px; }
.codebox .code { font: 700 34px/1.1 var(--f-display); letter-spacing: 2px; direction: ltr; }
.codebox .btn { background: #FFFFFF; color: var(--brand); }
.code-big { font: 700 46px/1 var(--f-display); letter-spacing: 3px; direction: ltr; text-align: center; color: var(--brand); background: var(--brand-soft); border: 2px dashed var(--brand); border-radius: 14px; padding: 22px 12px; }
@media (prefers-color-scheme: dark) { .code-big { color: #FFFFFF; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.stat { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat b { font: 700 21px/1.3 var(--f-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat.hl { background: var(--gold-soft); border-color: transparent; }
.level { display: grid; gap: 8px; }
.level .bar { height: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.level .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--brand)); border-radius: 99px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 3px 11px; border-radius: 99px; background: var(--gold-soft); color: var(--text); }

/* lists */
.list { display: grid; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); min-width: 0; }
.item:first-child { border-top: 0; }
.item .main { min-width: 0; display: grid; gap: 2px; }
.item .main b { overflow-wrap: anywhere; }
.item .sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.item .end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.item.click { cursor: pointer; }
.item.click:hover { background: var(--sunk); }
.item.me { background: var(--brand-soft); border-radius: 10px; padding-inline: 10px; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.ok { background: var(--good-soft); color: var(--good); }
.pill.no { background: var(--bad-soft); color: var(--bad); }
.pill.mid { background: var(--brand-soft); color: var(--text); }
.rank { width: 32px; height: 32px; border-radius: 9px; background: var(--sunk); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank.r1 { background: #F4C542; color: #2A1E00; } .rank.r2 { background: #C9D1DE; color: #1B2333; } .rank.r3 { background: #D99A5B; color: #2A1504; }
.withrank { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; }

/* segmented / chips */
.seg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 14px var(--f-body); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--brand); color: var(--on-brand); }

/* content library */
.snip { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--sunk); min-width: 0; }
.snip pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14.5px/1.75 var(--f-body); }
.snip mark { background: var(--gold-soft); color: inherit; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.snip img { max-width: 100%; border-radius: 10px; display: block; }
.kind { font-size: 12px; color: var(--muted); font-weight: 600; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.news-body { white-space: pre-wrap; overflow-wrap: anywhere; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
.foot { text-align: center; color: var(--muted); font-size: 13px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .card { animation: rise .22s ease both; } @keyframes rise { from { transform: translateY(4px); opacity: .6; } to { transform: none; opacity: 1; } } }

/* guide */
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: st; }
.steps-list li { counter-increment: st; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; row-gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps-list li:first-child { border-top: 0; }
.steps-list li::before { content: counter(st); grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font: 700 16px var(--f-display); }
.steps-list li > * { min-width: 0; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.tip { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.faq { display: grid; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 13px 2px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 18px/1 var(--f-display); color: var(--brand); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 2px 14px; color: var(--muted); }
a.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; text-decoration: none; color: inherit; border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .faq summary::after { color: #8EB0FF; } }

/* leads */
.pill.gold { background: var(--gold-soft); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--text); white-space: nowrap; }
.svc-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; font-weight: 600; }
.svc-pick label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--sunk); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.svc-pick input { width: auto; accent-color: var(--brand); }
.svc-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.tbl th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12.5px; background: var(--sunk); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .sub { color: var(--muted); font-size: 12.5px; }
.tbl tr.lrow:hover td { background: var(--sunk); }
.tbl tr.ledit td { background: var(--sunk); }
.ledit-in { display: grid; gap: 12px; max-width: 780px; }
.nbadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #1E1503; font-size: 12px; font-weight: 700; }
.seg .cnt { font-size: 12px; opacity: .8; }

.cap { min-height: 65px; display: flex; justify-content: center; }

/* رابط الإحالة */
.linkbox { background: var(--sunk); border: 1.5px dashed var(--brand); border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; text-align: left; }
.linkbox .ltr { display: block; }
.ref-hero { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.ref-hero .btn svg { flex-shrink: 0; }
.refcode { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1.5px dashed var(--brand); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.refcode b { font: 700 26px/1.1 var(--f-display); letter-spacing: 2px; color: var(--brand); }
@media (prefers-color-scheme: dark) { .refcode b { color: #8EB0FF; } }
/* التواصل مع العميل من جوه الطلب */
.lead-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lead-contact .btn svg { flex-shrink: 0; }
.btn.wa { background: #1A8F4E; color: #FFFFFF; }
.btn.wa:hover { background: #157A42; }
@media (max-width: 760px) { .lead-contact .btn { flex: 1 1 auto; } .lead-contact .btn.wa { flex-basis: 100%; } }
/* الكول سنتر */
.callbox { border: 1.5px dashed var(--line); border-radius: 12px; background: var(--sunk); }
.callbox[open] { border-style: solid; border-color: var(--gold); }
.callbox summary { cursor: pointer; list-style: none; padding: 12px 14px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.callbox summary::-webkit-details-marker { display: none; }
.callbox summary::after { content: "+"; font: 700 20px/1 var(--f-display); color: var(--brand); flex-shrink: 0; }
.callbox[open] summary::after { content: "−"; }
.callbox summary > span { display: grid; gap: 2px; }
.callbox summary small { font-size: 13px; font-weight: 400; }
.callbox form { padding: 0 14px 14px; }
/* خانة فخ للبوتات: مستخبية عن الناس */
.trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* الشروط والخصوصية */
.agree { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1.5px solid var(--line); background: var(--sunk); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1.6; }
.agree input { width: 20px; height: 20px; min-height: 0; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--brand); }
.agree:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.terms { margin: 0; padding: 0; list-style: none; counter-reset: tr; display: grid; gap: 4px; }
.terms > li { counter-increment: tr; padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.terms > li:first-child { border-top: 0; padding-top: 0; }
.terms h3::before { content: counter(tr) ". "; color: var(--brand); }
.terms ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--muted); }
.terms ul li { overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .terms h3::before { color: #8EB0FF; } }

/* show / hide password */
.pw-wrap { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.pw-wrap input { padding-left: 48px; }
.pw-eye { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; touch-action: manipulation; }
.pw-eye:hover { color: var(--text); background: var(--line); }
.pw-eye[aria-pressed="true"] { color: var(--brand); }
.pw-eye svg { width: 20px; height: 20px; }
input::-ms-reveal, input::-ms-clear { display: none; }
@media (prefers-color-scheme: dark) { .pw-eye[aria-pressed="true"] { color: #8EB0FF; } }

/* ============ موبايل ============ */
/* الشريط السفلي والقايمة مش بيظهروا على الكمبيوتر */
.tabbar, .sheet { display: none; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--sunk); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.icon-btn svg { width: 22px; height: 22px; }
html.locked, html.locked body { overflow: hidden; }

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  main { gap: 12px; padding-block: 12px calc(28px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .card { padding: 16px; gap: 12px; border-radius: 12px; }
  h1 { font-size: 20px; }

  /* الهيدر: أصغر، والأقسام اتنقلت للشريط السفلي */
  .top-in { padding-block: 10px; }
  .brand img { width: 36px; height: 36px; }
  .brand b { font-size: 16px; }
  .who span { max-width: 46vw; font-weight: 600; }
  .who button, .nav { display: none; }

  /* الشريط السفلي */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(10, 20, 45, .08);
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabbar[hidden] { display: none; }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 12px;
    background: transparent; color: var(--muted); text-decoration: none; font: 600 11.5px/1.2 var(--f-body); cursor: pointer; min-width: 0; -webkit-tap-highlight-color: transparent; }
  .tabbar .ti { position: relative; display: grid; place-items: center; width: 52px; height: 28px; border-radius: 99px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .tl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar .on { color: var(--brand); }
  .tabbar .on .ti { background: var(--brand-soft); }
  .tdot { position: absolute; top: -3px; left: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--gold); color: #1E1503; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
  .tdot.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 0; left: 12px; }

  /* القايمة الكاملة */
  .sheet { display: block; position: fixed; inset: 0; z-index: 40; }
  .sheet[hidden] { display: none; }
  .sheet-bg { position: absolute; inset: 0; background: rgba(6, 12, 28, .55); }
  .sheet-in { position: absolute; inset: auto 0 0 0; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 20px 20px 0 0;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 10px; }
  .sheet-in::before { content: ""; width: 40px; height: 4px; border-radius: 99px; background: var(--line); justify-self: center; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sheet-who { display: grid; min-width: 0; }
  .sheet-who b { font: 600 17px/1.3 var(--f-display); overflow-wrap: anywhere; }
  .sheet-lbl { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sheet-grid a { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 80px; padding: 10px 4px; border-radius: 14px;
    background: var(--sunk); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; line-height: 1.3; text-align: center; -webkit-tap-highlight-color: transparent; }
  .sheet-grid a svg { width: 24px; height: 24px; color: var(--brand); }
  .sheet-grid a.on { background: var(--brand-soft); border-color: var(--brand); }
  .sheet-grid .nbadge { position: absolute; top: 6px; left: 6px; }
  .sheet-out { width: 100%; margin-top: 4px; color: var(--bad); }
  .sheet-out svg { width: 20px; height: 20px; }

  .toast { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

  /* الخانات: 16px عشان الآيفون ما يعملش زووم لما تدوس عليها */
  input, select, textarea { font-size: 16px; min-height: 46px; }
  textarea { min-height: 96px; }
  .choice input, .svc-pick input { min-height: 0; width: 20px; height: 20px; }
  .choice label, .svc-pick label { min-height: 48px; }
  .choice { grid-template-columns: 1fr; }

  /* الزراير: مساحة لمس مريحة (44px) */
  .btn { min-height: 46px; }
  .btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; min-height: 40px; padding: 8px 12px; }
  .actions .btn { flex: 1 1 auto; }
  .faq summary { padding-block: 15px; }
  .pill, .chip, .kind, .seg .cnt { font-size: 12.5px; }

  /* القوايم: الزراير تنزل تحت الاسم لو مفيش مكان */
  .item { flex-wrap: wrap; row-gap: 8px; }
  .item .main { flex: 1 1 170px; }
  .item .end { flex-shrink: 1; max-width: 100%; }
  .codebox .code { font-size: 30px; }
  .code-big { font-size: 38px; padding: 18px 10px; }

  /* جدول الطلبات يبقى كروت */
  .tablewrap { overflow: visible; border: 0; border-radius: 0; }
  .tbl { min-width: 0; display: block; font-size: 14.5px; }
  .tbl thead { display: none; }
  .tbl tbody { display: grid; gap: 10px; }
  .tbl tr { display: block; }
  .tbl tr.lrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
  .tbl tr.lrow:hover td { background: transparent; }
  .tbl td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .tbl td[data-l]::before { content: attr(data-l); display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
  .tbl td.c-client { grid-column: 1 / -1; grid-row: 1; padding-left: 56px; font-size: 15.5px; }
  .tbl td.c-client .ltr { text-align: right; }
  .tbl td.c-id { grid-column: 2; grid-row: 1; justify-self: end; color: var(--muted); font-size: 12.5px; }
  .tbl td.c-id::before { content: "#"; }
  .tbl td[data-l="الخدمات"] { grid-column: 1 / -1; }
  .tbl td.c-open { grid-column: 1 / -1; }
  .tbl td.c-open .btn { width: 100%; }
  .tbl tr.ledit { margin-top: -10px; }
  .tbl tr.ledit td { display: block; background: var(--sunk); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; padding: 14px; }
  .ledit-in { max-width: none; }
}
@media (max-width: 360px) {
  .sheet-grid a { font-size: 12.5px; min-height: 76px; }
  .tabbar a, .tabbar button { font-size: 11px; }
  .tabbar .ti { width: 44px; }
}
