/* بوابة الزبائن: صفحة واحدة خفيفة للجوال، من اليمين لليسار، فاتحة مع وضع داكن يتبع الجهاز. */
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }

:root {
  color-scheme: light dark;
  --bg: #faf7f5; --surface: #fff; --ink: #231c26; --muted: #6a606d; --line: #e7dfe2;
  --primary: #7a2e4d; --primary-ink: #fff; --soft: #f5e9ee; --soft-ink: #6a2743;
  --ok: #1b6e45; --ok-soft: #e3f3ea; --warn: #8a5200; --warn-soft: #fbefd9; --danger: #b3261e; --star: #d18a00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17131a; --surface: #211b25; --ink: #f1eaf0; --muted: #aba0af; --line: #372e3c;
    --primary: #e58fae; --primary-ink: #2b0f1c; --soft: #35212c; --soft-ink: #f3c2d3;
    --ok: #7fd3a6; --ok-soft: #173326; --warn: #f0c070; --warn-soft: #3a2c12; --danger: #ffb4ab; --star: #f0c070;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 'Plex Arabic', 'Segoe UI', Tahoma, sans-serif; }
h1, h2, p, ol, ul { margin: 0; padding: 0; }
h1 { font-size: 1.3rem; font-weight: 600; }
h2 { font-size: 1.02rem; font-weight: 600; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.boot { padding: 38vh 16px 0; text-align: center; color: var(--muted); }

#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.top { margin: 0 -16px; padding: calc(20px + env(safe-area-inset-top)) 16px 20px; background: var(--primary); color: var(--primary-ink); text-align: center; }
.top p { opacity: .9; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; } .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 2px; }
.wrap { overflow-wrap: anywhere; }
.center { text-align: center; justify-items: center; padding: 28px 20px; }

.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--soft-ink); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* الخط الزمني */
.steps { list-style: none; display: grid; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding-bottom: 14px; position: relative; color: var(--muted); }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; width: 14px; height: 14px; margin: 6px 6px 0; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 20px; bottom: -6px; inset-inline-start: 12px; width: 2px; background: var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.done:not(:last-child)::after { background: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--soft); }

.item { display: flex; gap: 12px; align-items: center; }
.item + .item { padding-top: 12px; border-top: 1px solid var(--line); }
.thumb { width: 64px; height: 80px; flex: none; border-radius: 10px; background: var(--soft); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.price { font-weight: 600; white-space: nowrap; }
.sum { display: grid; gap: 6px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .total { font-weight: 600; font-size: 1.1rem; padding-top: 8px; border-top: 1px solid var(--line); }
.policy { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: .92rem; font-weight: 600; }

.btn { min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 600; cursor: pointer; width: 100%; }
.btn.ghost { background: none; color: var(--primary); border-color: var(--line); }
.btn:disabled { opacity: .55; cursor: default; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
textarea.input { min-height: 96px; resize: vertical; }
.pin { text-align: center; font-size: 1.5rem; letter-spacing: .5em; direction: ltr; }
.field { display: grid; gap: 6px; } .field > label, .field > .label { font-weight: 600; font-size: .92rem; }
.error { color: var(--danger); font-size: .9rem; }

/* النجوم: أزرار اختيار، الأولى في اليمين */
.stars { display: flex; gap: 4px; border: 0; padding: 0; margin: 0; }
.stars button { width: 46px; height: 46px; border: 0; background: none; cursor: pointer; font-size: 2rem; line-height: 1; color: var(--line); padding: 0; }
.stars button[aria-checked="true"], .stars button.fill { color: var(--star); }
.stars.read button { cursor: default; width: 30px; height: 34px; font-size: 1.4rem; }
