/* ثالث — واجهة المنصة */
:root {
    --ink: #16302B;
    --ink-soft: #3E5650;
    --muted: #6E7F7A;
    --sand: #F4F0E8;
    --paper: #FFFFFF;
    --line: #E2DCD0;
    --accent: #C4692A;
    --accent-ink: #FFFFFF;
    --ok-bg: #E4F1EA;
    --ok-ink: #1E5B41;
    --warn-bg: #FBEFD9;
    --warn-ink: #8A5A0B;
    --bad: #B3362B;
    --bad-bg: #FBE7E4;
    --radius: 14px;
    --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--sand);
}

h1, h2 { line-height: 1.35; margin: 0; text-wrap: balance; }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
small, .muted, .caption { color: var(--muted); }
small { font-size: .82rem; display: block; }
em { font-style: normal; color: var(--muted); font-size: .8rem; font-weight: 400; margin-inline-start: 6px; }

/* العلامة */
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--sand); font-size: 1.2rem; }

/* الأزرار */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border-radius: 11px; border: 1px solid transparent;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #AD5A21; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: #F0C9C4; }
.btn-danger:hover { border-color: var(--bad); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn-wide { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
    outline: 3px solid rgba(196, 105, 42, .4); outline-offset: 2px;
}

/* النماذج */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-weight: 500; font-size: .93rem; }
.field-short { max-width: 240px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=search], input[type=time], input[type=date], select {
    width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px;
    background: var(--paper); color: var(--ink); font: inherit;
}
input[type=color] { width: 100%; height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); cursor: pointer; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
input:focus, select:focus { border-color: var(--accent); }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.hint { margin-top: -8px; }
.form-row { align-items: end; }
.form-sections { gap: 18px; }
.savebar { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--sand) 35%); }
[hidden] { display: none !important; }

/* صفحات الزوار */
.guest-wrap { max-width: 440px; margin: 0 auto; padding: 40px 16px 60px; display: grid; gap: 20px; }
.guest-wrap.is-mid { max-width: 560px; }
.guest-wrap.is-wide { max-width: 640px; padding-top: 12vh; }
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; display: grid; gap: 16px; }
.sheet-center { text-align: center; justify-items: center; }
.below { text-align: center; margin: 0; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 600; font-size: .9rem; }
.hero { font-size: clamp(1.7rem, 6vw, 2.3rem); }
.lead { font-size: 1.05rem; color: var(--ink-soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* التنبيه */
.flash { background: var(--ok-bg); color: var(--ok-ink); border-radius: 11px; padding: 12px 16px; font-weight: 500; }
.panel .flash { margin: 0 16px 4px; }

/* اللوحة */
.side { background: var(--ink); color: #DCE5E1; padding: 18px 16px; display: none; flex-direction: column; gap: 14px; }
.side.is-open { display: flex; }
.brand-waves { width: 18px; height: 36px; flex: none; color: var(--accent); }
.brand-name { margin-inline-start: 3px; }
.side .brand { color: #fff; }
.side .brand-mark { background: var(--accent); color: #fff; }
.side-context { margin: 0; font-size: .88rem; color: #A9BBB5; overflow-wrap: anywhere; }
.nav { display: grid; gap: 4px; }
.nav-link { display: block; width: 100%; padding: 11px 14px; border-radius: 10px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; text-align: start; cursor: pointer; }
.nav-link:hover { background: rgba(255,255,255,.07); }
.nav-link.is-on { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; }
.nav-out { color: #A9BBB5; }
.top { display: flex; align-items: center; gap: 12px; padding: 16px; flex-wrap: wrap; }
.top h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.menu-btn { width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.content { padding: 4px 16px 60px; display: grid; gap: 18px; max-width: 1040px; }
.block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; min-width: 0; }
.block-narrow { max-width: 560px; }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
.cols { display: grid; gap: 18px; }

/* الأرقام */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); display: grid; }
.stat b { font-size: 1.9rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
.stat.is-alert { border-color: var(--accent); background: #FDF5EC; }

/* القوائم */
.line { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.line:first-of-type { border-top: 0; }
h2 + .line { border-top: 0; padding-top: 0; }
.line > div:first-child { flex: 1; min-width: 180px; }
.line-title { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow-wrap: anywhere; }
a.line-title:hover { color: var(--accent); }
.empty { color: var(--muted); margin: 0; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.tag-active { background: var(--ok-bg); color: var(--ok-ink); }
.tag-pending { background: var(--warn-bg); color: var(--warn-ink); }
.tag-suspended { background: var(--bad-bg); color: var(--bad); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 14px; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 180px; }
.filters select { width: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.more { flex-basis: 100%; }
.more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; width: fit-content; padding: 4px 0; }
.more-body { display: grid; gap: 16px; padding: 14px; margin-top: 8px; background: var(--sand); border-radius: 11px; }
.inline-form { display: inline; }

/* معاينة البطاقة */
.pass { background: #16302B; color: #fff; border-radius: 20px; padding: 20px; max-width: 340px; display: grid; gap: 18px; box-shadow: 0 14px 30px -18px rgba(22,48,43,.6); }
.pass-head { display: flex; align-items: center; gap: 12px; }
.pass-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; flex: none; }
.pass-logo-empty { display: grid; place-items: center; background: rgba(255,255,255,.16); font-weight: 700; font-size: 1.2rem; }
.pass-name { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.pass-stamps { display: flex; flex-wrap: wrap; gap: 8px; }
.stamp { width: 34px; height: 34px; object-fit: contain; flex: none; }
.pass-stamps.is-dense .stamp { width: 24px; height: 24px; }
.is-faded { opacity: .3; }
.pass-meta { display: flex; justify-content: space-between; gap: 12px; }
.pass-meta small { color: inherit; opacity: .7; }
.pass-meta b { overflow-wrap: anywhere; }
.pass-reward b { display: inline-flex; align-items: center; gap: 6px; }
.reward-ico { width: 24px; height: 24px; object-fit: contain; flex: none; }
.pass-code { width: 96px; height: 96px; margin: 0 auto; border-radius: 10px; background:
    repeating-conic-gradient(#16302B 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 8px solid #fff; }
.caption { font-size: .85rem; margin-top: 10px; }

/* النوافذ */
.modal { border: 0; border-radius: 20px; padding: 28px 24px; width: min(480px, calc(100vw - 32px)); color: var(--ink); font-family: var(--font); text-align: center; }
.modal::backdrop { background: rgba(22, 48, 43, .6); }
.modal h2 { font-size: 1.3rem; margin-bottom: 12px; }
.modal-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bad-bg); color: var(--bad); font-size: 2rem; font-weight: 700; display: grid; place-items: center; margin: 0 auto 14px; }
.modal-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: 1.05rem; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .form-row { grid-template-columns: 1fr auto auto; }
    .more-body .form-row { grid-template-columns: minmax(0, 320px) auto; justify-content: start; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .sheet { padding: 34px 32px; }
}

@media (min-width: 900px) {
    .shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
    .side { display: flex; position: sticky; top: 0; height: 100vh; padding: 24px 18px; }
    .menu-btn { display: none; }
    .top { padding: 26px 32px 14px; }
    .content { padding: 4px 32px 70px; }
    .panel .flash { margin: 0 32px 4px; }
    .cols { grid-template-columns: 1fr 1fr; }
    .cols-card { grid-template-columns: 340px 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* محاذاة الحقول المتجاورة */
.field { align-content: start; }
.grid-2, .grid-3 { align-items: start; }
.form-sections .block { display: grid; gap: 16px; }
.form-sections .block h2, .form-sections .block p { margin-bottom: 0; }

/* الأيقونات الجاهزة: شكل الأيقونة قناع، ولونها لون النص المحيط */
.ico { display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-circle { --m: url(../icons/circle.png); }
.ico-star { --m: url(../icons/star.png); }
.ico-heart { --m: url(../icons/heart.png); }
.ico-cup { --m: url(../icons/cup.png); }
.ico-burger { --m: url(../icons/burger.png); }
.ico-car { --m: url(../icons/car.png); }
.ico-drop { --m: url(../icons/drop.png); }
.ico-shirt { --m: url(../icons/shirt.png); }
.ico-scissors { --m: url(../icons/scissors.png); }
.ico-gift { --m: url(../icons/gift.png); }
.ico-crown { --m: url(../icons/crown.png); }

/* اختيار الأيقونة */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.pick { display: grid; justify-items: center; gap: 4px; cursor: pointer; text-align: center; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-box { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--paper); }
.pick-box .ico { width: 30px; height: 30px; color: var(--ink); }
.pick-upload { font-size: 1.5rem; color: var(--muted); border-style: dashed; }
.pick input:checked + .pick-box { border-color: var(--accent); background: #FDF5EC; }
.pick input:focus-visible + .pick-box { outline: 3px solid rgba(196, 105, 42, .4); outline-offset: 2px; }
.pick small { font-size: .75rem; }
.choice { display: grid; gap: 10px; }
.stack-sm { display: grid; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.thumb-row { display: flex; align-items: center; gap: 12px; }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#e9e4da 0 25%, #fff 0 50%) 0 0 / 12px 12px; border: 1px solid var(--line); }
@media (min-width: 900px) { .sticky-col { position: sticky; top: 24px; align-self: start; } }

/* ---------- صفحات العميل ---------- */
.cust-wrap { max-width: 440px; margin: 0 auto; padding: 22px 16px 40px; display: grid; gap: 16px; }
.cust-head { display: flex; align-items: center; gap: 12px; }
.cust-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; flex: none; }
.cust-logo-empty { display: grid; place-items: center; background: var(--ink); color: var(--sand); font-weight: 700; font-size: 1.2rem; }
.cust-name { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.cust-foot { text-align: center; color: var(--muted); font-size: .8rem; padding-top: 8px; }
.customer .pass { max-width: none; }
.customer .stamp { width: 38px; height: 38px; }
.customer .pass-stamps.is-dense .stamp { width: 26px; height: 26px; }
.hello { margin: 0; font-size: 1.1rem; font-weight: 600; }
.sheet-tight { padding: 20px 18px; gap: 8px; }
.sheet-tight h2 { margin-bottom: 0; }
.sheet-tight p { margin: 0; }
.code-input { text-align: center; font-size: 1.7rem !important; letter-spacing: .35em; font-variant-numeric: tabular-nums; min-height: 60px !important; }
.test-box { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; text-align: center; display: grid; gap: 2px; }
.test-box small { color: inherit; }
.test-box b { font-size: 1.8rem; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.pass-qr { width: 190px; height: 190px; margin: 0 auto; padding: 10px; background: #fff; border-radius: 14px; display: grid; place-items: center; }
.pass-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.pass-qr.is-stale { opacity: .25; }
.pass-qr-note { margin: -8px 0 0; text-align: center; font-size: .85rem; opacity: .8; }
.prose h2 { margin: 14px 0 6px; }
.prose ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

/* ---------- رابط الانضمام ولوحة الكاونتر ---------- */
.copy-row { display: flex; gap: 10px; margin-bottom: 14px; }
.copy-row input { flex: 1; min-width: 0; font-size: .9rem; }
.poster { background: #16302B; color: #fff; border-radius: 22px; padding: 34px 24px; max-width: 420px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.poster-head { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.4rem; }
.poster-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.poster-title { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.4; text-wrap: balance; }
.poster-rule { margin: 0; font-size: 1.05rem; opacity: .9; }
.poster-qr { width: 230px; height: 230px; padding: 12px; background: #fff; border-radius: 16px; }
.poster-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.poster-hint { margin: 0; opacity: .85; }

@media print {
    @page { size: A5; margin: 0; }
    body { background: #fff; }
    .side, .top, .flash, .no-print, .modal { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; max-width: none; }
    .poster { max-width: none; width: 100vw; height: 100vh; border-radius: 0; align-content: center; gap: 22px;
        -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .poster-qr { width: 340px; height: 340px; }
    .poster-head { font-size: 1.9rem; }
    .poster-logo { width: 76px; height: 76px; }
    .poster-title { font-size: 2.3rem; }
    .poster-rule { font-size: 1.5rem; }
    .poster-hint { font-size: 1.3rem; }
}

/* ---------- صفحات الموظف ---------- */
.staff { background: #EFEAE0; }
.staff-bar { background: var(--ink); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-who { display: grid; min-width: 0; }
.staff-who b { overflow-wrap: anywhere; }
.staff-who small { color: #A9BBB5; }
.staff-out { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 9px; min-height: 40px; padding: 0 16px; font: inherit; cursor: pointer; }
.staff-wrap { max-width: 460px; margin: 0 auto; padding: 16px 16px 40px; display: grid; gap: 14px; }
.btn-big { min-height: 60px; font-size: 1.15rem; }
.btn-reward { background: var(--ok-ink); color: #fff; }
.btn-reward:hover { background: #17482F; }
.big-input { min-height: 56px !important; font-size: 1.3rem !important; text-align: center; font-variant-numeric: tabular-nums; }
.center { text-align: center; margin: 0; }

.scanner { position: relative; background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; pointer-events: none; }
.scanner.is-found .scan-frame { border-color: #4ADE80; }
.scan-note { position: absolute; inset-inline: 12px; bottom: 12px; margin: 0; text-align: center; color: #fff; font-weight: 500; text-shadow: 0 1px 3px #000; }
.scanner .btn { position: absolute; }
.scan-hint { margin: 0; text-align: center; color: var(--muted); }

.cust-card { background: var(--ink); color: #fff; border-radius: 18px; padding: 20px; display: grid; gap: 4px; text-align: center; }
.cust-card-name { margin: 0; font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; }
.cust-card-phone { margin: 0; color: #A9BBB5; }
.cust-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cust-card-stats div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px; display: grid; }
.cust-card-stats b { font-size: 1.9rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cust-card-stats b small { display: inline; font-size: .95rem; font-weight: 400; color: #A9BBB5; }
.cust-card-stats span { color: #A9BBB5; font-size: .85rem; }
.cust-card-via { margin: 10px 0 0; background: var(--warn-bg); color: var(--warn-ink); border-radius: 9px; padding: 6px 10px; font-size: .88rem; }

.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.step-btn { height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-size: 2rem; line-height: 1; color: var(--ink); cursor: pointer; }
.step-btn:active { background: var(--sand); }
.stepper input { min-height: 64px !important; text-align: center; font-size: 2rem !important; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.done { background: var(--ok-bg); color: var(--ok-ink); border-radius: 20px; padding: 30px 20px; text-align: center; display: grid; gap: 6px; }
.done-reward { background: #FDF0DC; color: #7A4A08; }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-ink); color: #fff; margin: 0 auto 8px; display: grid; place-items: center; font-size: 2.2rem; }
.done-reward .done-mark { background: #B8730F; }
.done h1 { font-size: 1.5rem; }
.done-main { margin: 0; font-size: 1.3rem; font-weight: 600; }
.done-earned { margin: 6px 0 0; font-size: 1.15rem; font-weight: 700; }
.done-sub { margin: 4px 0 0; opacity: .85; }

/* حدود التاجر والسجل */
.limit { display: grid; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.limit:first-of-type { border-top: 0; padding-top: 0; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
div.stat { cursor: default; }

/* دخول الموظفين: الرمز والاسم المختصر والدعوة */
.cols-qr { align-items: start; }
.qr-box { width: 180px; height: 180px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; justify-self: center; }
.qr-box canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.block-invite { border-color: var(--accent); background: #FDF5EC; display: grid; gap: 12px; justify-items: start; }
.block-invite h2, .block-invite p { margin: 0; }
.block-invite .copy-row { margin: 0; width: 100%; }
.note-warn { margin: 0; background: var(--warn-bg); color: var(--warn-ink); border-radius: 9px; padding: 8px 12px; font-size: .9rem; }
.choice-title { font-weight: 500; font-size: .93rem; }
.check.is-off { opacity: .55; cursor: not-allowed; }
@media (min-width: 900px) { .cols-qr { grid-template-columns: 1fr 180px; } }

/* سجل الإصدارات */
.release { padding: 12px 0; border-top: 1px solid var(--line); width: 100%; }
.release:first-of-type { border-top: 0; padding-top: 0; }
h2 + .release { border-top: 0; padding-top: 0; }
.release-head { margin: 0 0 6px; }
.release-head small { display: inline; margin-inline-start: 8px; }
.release ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.handle-fixed { display: flex; align-items: center; gap: 12px; background: var(--sand); border-radius: 11px; padding: 12px 14px; }
.handle-fixed span { color: var(--muted); font-size: .9rem; }
.handle-fixed b { font-size: 1.15rem; }

/* زر إضافة البطاقة للمحفظة */
.btn-wallet { display: flex; justify-content: center; align-items: center; background: #1f1f1f; color: #fff; margin: 14px 0; }
.btn-wallet:hover { background: #000; }

/* صفحة العميل: بوابة المحفظة */
.wallet-box .btn-wallet { margin: 6px 0 10px; }
.wallet-soon { margin: 0; text-align: center; color: var(--muted); font-size: .9rem; }
.tag-used { background: #ECEAE4; color: var(--ink-soft); }
.line small { display: block; }

/* زر قوقل الرسمي: الحجم بنسبته الأصلية، وحوله مساحة فارغة */
.gw-button { display: block; width: fit-content; max-width: 100%; margin: 6px auto 4px; padding: 8px; }
.gw-button img { display: block; width: 312px; max-width: 100%; height: auto; min-height: 48px; }

/* المشاركة العائلية */
.member-note { margin: -6px 0 12px; color: var(--muted); font-size: .92rem; }
.line-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.invite-box { background: var(--ok-bg); border-radius: 14px; padding: 14px; margin: 10px 0 14px; }
.invite-box p { margin: 0 0 10px; }
.invite-qr { width: 190px; height: 190px; margin: 0 auto 12px; background: #fff; padding: 8px; border-radius: 10px; }
.invite-qr canvas, .invite-qr svg, .invite-qr img { width: 100%; height: 100%; display: block; }
.invite-link { width: 100%; margin-top: 10px; font-size: .8rem; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* رقم الصرف السري */
.pin-warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; }
.pin-off { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* شرح الخانات: علامة استفهام بجانب العنوان */
.field.has-hint { position: relative; }
.hint-btn { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-inline-start: 6px; padding: 0; border: 1px solid var(--muted); border-radius: 50%; background: transparent; color: var(--ink-soft); font: inherit; font-size: .72rem; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; }
.hint-btn:hover, .hint-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.hint-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint-pop { position: absolute; z-index: 20; inset-inline-start: 0; top: 26px; max-width: min(320px, 86vw); background: var(--ink); color: #fff; font-size: .84rem; font-weight: 400; line-height: 1.7; padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.hint-pop[hidden] { display: none; }
.hint-pop b { color: #fff; }

/* الحماية: التنبيهات والتقرير اليومي */
.nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }
.line.is-unread .line-title { color: var(--bad); }
.report-pick { align-items: end; gap: 10px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 10px 8px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; font-size: .85rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.report-pick { display: flex; }

/* البطاقات البلاستيكية */
.tag-serial { font-size: 2rem; font-weight: 700; letter-spacing: .12em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.tag-reward { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.tag-url { word-break: break-all; user-select: all; }

/* الباقات */
.pkg-form { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pkg-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pkg-use + .pkg-use { border-top: 1px solid var(--line); padding-top: 14px; }
.pkg-line { display: flex; justify-content: space-between; gap: 12px; margin: 0; }

/* قائمة الإصدارات: كل إصدار زر يُفتح */
.release-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--card, #fff); }
.release-item summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; list-style: none; }
.release-item summary::-webkit-details-marker { display: none; }
.release-item summary::after { content: '+'; margin-inline-start: auto; font-weight: 700; color: var(--muted); }
.release-item[open] summary::after { content: '−'; }
.release-item summary b { white-space: nowrap; }
.release-item summary small { color: var(--muted); }
.release-item ul { margin: 0; padding: 0 34px 14px 14px; display: grid; gap: 4px; }

/* شاشة الاستعلام */
.kiosk-url { font-size: .95rem; background: var(--warn-bg); padding: 10px 12px; border-radius: 10px; }
.plain-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
body.kiosk { --kiosk-bg: #16302B; --kiosk-fg: #ffffff; margin: 0; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--kiosk-bg); color: var(--kiosk-fg); text-align: center; }
.kiosk-head { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; font-weight: 700; font-size: 1.4rem; }
.kiosk-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; }
.kiosk-main { display: grid; place-items: center; padding: 0 20px; }
.kiosk-idle h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0 0 8px; }
.kiosk-idle p { font-size: clamp(1.05rem, 2.6vw, 1.5rem); opacity: .85; margin: 0 0 22px; }
.kiosk-scanner { width: min(44vh, 80vw); margin: 0 auto; }
.kiosk-result { width: min(720px, 100%); display: grid; gap: 18px; }
.kiosk-hello { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 700; margin: 0; }
.kiosk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kiosk-stats div { background: rgba(255,255,255,.12); border-radius: 18px; padding: 22px 12px; display: grid; gap: 4px; }
.kiosk-stats b { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1.1; }
.kiosk-stats span { opacity: .8; }
.kiosk-reward { font-size: clamp(1.1rem, 2.8vw, 1.6rem); margin: 0; }
.kiosk-packages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kiosk-packages li { display: flex; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.12); border-radius: 14px; padding: 14px 18px; font-size: clamp(1.05rem, 2.6vw, 1.5rem); }
.kiosk-timer { opacity: .7; margin: 0; }
.kiosk-foot { padding: 16px 20px 20px; display: grid; gap: 10px; }
.kiosk-message { margin: 0; font-size: clamp(1.1rem, 2.8vw, 1.6rem); font-weight: 600; }
.kiosk-offers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.kiosk-offers span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 14px; }
.kiosk-foot small { opacity: .6; color: inherit; }

/* أكواد الكاشير */
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
.pos-code { display: grid; gap: 8px; justify-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.pos-code:first-of-type { border-top: 0; }
.pos-code b { font-size: clamp(1.6rem, 7vw, 2.4rem); letter-spacing: .08em; font-variant-numeric: tabular-nums; word-break: break-all; user-select: all; text-align: center; }

/* ثالث: شعار الحرف، وزر تبديل اللغة */
.lang-switch { position: fixed; top: 10px; inset-inline-end: 12px; z-index: 60; display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { background: transparent; color: var(--ink-soft); border: 0; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.lang-switch button.is-on { background: var(--ink); color: #fff; }
