/* =========================================================================
   INSIDER PERFUME — نظام التصميم
   ذهب المفتاح على حبر دافئ، وأسطح بيضاء هادئة للمحتوى.
   الخطوط: Amiri للعناوين وأسماء العطور، IBM Plex Sans Arabic للواجهة.
   ========================================================================= */

:root {
  --ink: #1b1814;
  --ink-2: #26221c;
  --ink-3: #3a342b;
  --gold: #e2b23a;
  --gold-2: #f3cf6b;
  --gold-deep: #8c6a12;
  --gold-wash: #fbf3dc;
  --paper: #f5f4f0;
  --surface: #ffffff;
  --line: #e6e1d6;
  --line-2: #d6cfbf;
  --text: #221f1a;
  --muted: #6d675d;
  --faint: #9a9387;
  --ok: #2f7a4f;
  --ok-wash: #e7f3eb;
  --bad: #b23b3b;
  --bad-wash: #fbeaea;
  --info: #2f5d8a;
  --info-wash: #e8f0f8;
  --warn: #9a6a00;
  --warn-wash: #fdf3d8;

  --display: "Amiri", "Times New Roman", serif;
  --body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow: 0 1px 2px rgba(27, 24, 20, .05), 0 8px 24px -12px rgba(27, 24, 20, .18);
  --wrap: 1200px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
h1, h2, .display { font-family: var(--display); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--gold); color: var(--ink); padding: 8px 16px; border-radius: var(--r-s); }
.skip-link:focus { top: 12px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-fill { fill: currentColor; stroke: none; }

.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.gold-text { color: var(--gold-deep); }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ الأزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid transparent; background: transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }
.btn-line { border-color: var(--line-2); color: var(--text); background: var(--surface); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: rgba(27, 24, 20, .06); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #9a2f2f; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: .8rem; gap: 6px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.on-dark .btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.on-dark .btn-line:hover { border-color: var(--gold); color: var(--gold-2); }
.link { color: var(--gold-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { color: var(--ink); }

/* ------------------------------------------------------------------ النماذج */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 16px; }
.label { font-weight: 600; font-size: .9rem; }
.label .opt { font-weight: 400; color: var(--faint); font-size: .8rem; }
.hint { font-size: .8rem; color: var(--muted); }
.error { font-size: .82rem; color: var(--bad); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(226, 178, 58, .25); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.input-ltr { direction: ltr; text-align: end; }
[dir="ltr"] .input-ltr { text-align: start; }
.input-group { position: relative; }
.input-group .input { padding-inline-end: 48px; }
.input-group .input-addon { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--ink); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid .field + .field { margin-top: 0; }
.file-drop {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-m); background: var(--paper); cursor: pointer;
}
.file-drop:hover { border-color: var(--gold-deep); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop .file-name { font-weight: 600; }
.choice-grid { display: grid; gap: 10px; }
.choice {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-m); background: #fff; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); margin-top: 3px; flex: none; }
.choice:has(input:checked) .dot { border: 5px solid var(--ink); }

/* ------------------------------------------------------------------ البطاقات والأسطح */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.card-tight { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 700; }
.card-flush { padding: 0; overflow: hidden; }
.divider { height: 1px; background: var(--line); margin-block: 20px; border: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.5; background: var(--paper); color: var(--muted); white-space: nowrap;
}
.badge-ok { background: var(--ok-wash); color: var(--ok); }
.badge-bad { background: var(--bad-wash); color: var(--bad); }
.badge-info { background: var(--info-wash); color: var(--info); }
.badge-warn { background: var(--warn-wash); color: var(--warn); }
.badge-gold { background: var(--gold-wash); color: var(--gold-deep); }
.badge-ink { background: var(--ink); color: var(--gold-2); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); font-weight: 500; }
.alert .icon { margin-top: 3px; }
.alert-ok { background: var(--ok-wash); color: var(--ok); }
.alert-bad { background: var(--bad-wash); color: var(--bad); }
.alert-info { background: var(--info-wash); color: var(--info); }
.alert-gold { background: var(--gold-wash); color: #5e4708; }
.flash-stack { display: grid; gap: 10px; margin-top: 20px; }

.avatar {
  --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--ink); color: var(--gold-2); font-weight: 700; font-size: calc(var(--size) * .38);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --size: 32px; }
.avatar-lg { --size: 64px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; color: var(--line-2); margin: 0 auto 12px; }
.empty h3 { color: var(--text); font-size: 1.1rem; margin-bottom: 6px; font-family: var(--body); }
.empty .btn { margin-top: 18px; }

/* ------------------------------------------------------------------ الجداول */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; font-weight: 600; color: var(--muted); background: #fbfaf7; white-space: nowrap; }
.table tbody tr:hover { background: #fcfbf8; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { white-space: nowrap; text-align: end; }
.amount-in { color: var(--ok); font-weight: 700; }
.amount-out { color: var(--bad); font-weight: 700; }

/* ------------------------------------------------------------------ الترويسة */
.announce { background: var(--gold); color: var(--ink); font-size: .88rem; font-weight: 600; text-align: center; padding: 8px 16px; }
.announce a { text-decoration: underline; text-underline-offset: 3px; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #f1ece2; border-bottom: 1px solid rgba(226, 178, 58, .18); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 60px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-end: auto; }
.main-nav > a, .main-nav > .dropdown > button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  color: #d8d1c3; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.main-nav > a:hover, .main-nav > .dropdown > button:hover, .main-nav > a.is-active { color: #fff; background: rgba(255, 255, 255, .07); }
.main-nav > a.is-active { color: var(--gold-2); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-icon {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: #e9e3d6; background: none; border: 0; cursor: pointer;
}
.header-icon:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.count-dot {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding-inline: 5px;
  border-radius: 999px; background: var(--gold); color: var(--ink); font-size: .7rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1; border: 2px solid var(--ink);
}
.points-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(226, 178, 58, .45); color: var(--gold-2); font-weight: 600; font-size: .85rem;
}
.points-chip:hover { background: rgba(226, 178, 58, .12); }
.menu-toggle { display: none; }

.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; min-width: 260px;
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 18px 50px -12px rgba(27, 24, 20, .35); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.main-nav .dropdown-panel { inset-inline-end: auto; inset-inline-start: 0; }
.dropdown.is-open .dropdown-panel { opacity: 1; visibility: visible; transform: none; }
.dropdown-label { padding: 10px 12px 4px; font-size: .75rem; font-weight: 600; color: var(--faint); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-s);
  background: none; border: 0; cursor: pointer; text-align: start; font-size: .93rem;
}
.dropdown-item:hover { background: var(--paper); }
.dropdown-item .icon { color: var(--muted); }
.dropdown-item .lock { margin-inline-start: auto; color: var(--faint); width: 15px; height: 15px; }
.dropdown-item small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.dropdown-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.mega { min-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.notif-head { position: sticky; top: -8px; z-index: 2; background: #fff; padding: 6px 4px 8px 8px; margin: -8px -8px 4px; padding-top: 12px; padding-inline: 14px 8px; border-bottom: 1px solid var(--line); }
.notif-close { width: 36px; height: 36px; color: var(--text); }
.notif-panel { width: 360px; max-height: min(70vh, 560px); overflow-y: auto; }
.notif-item span { min-width: 0; overflow-wrap: break-word; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); }
.notif-item:hover { background: var(--paper); }
.notif-item.is-unread { background: var(--gold-wash); }
.notif-item .icon { color: var(--gold-deep); margin-top: 4px; }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: var(--ink); color: #bdb5a6; margin-top: 96px; padding-top: 64px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h3 { color: #fff; font-family: var(--body); font-size: .95rem; margin-bottom: 14px; }
.footer-grid a { display: block; padding-block: 4px; }
.footer-grid a:hover { color: var(--gold-2); }
.footer-brand img { height: 64px; width: auto; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 48px; padding-block: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }

/* ------------------------------------------------------------------ عناوين الصفحات */
.page-head { padding-block: 40px 28px; }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 60ch; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 14px; height: 14px; transform: scaleX(-1); }
.section { padding-block: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-head p { color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------------ الواجهة الرئيسية */
.hero { background: var(--ink); color: #efe9dc; overflow: hidden; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 64px 80px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.4; color: #fff; }
.hero h1 span { color: var(--gold-2); display: block; }
.hero-lead { margin-top: 20px; max-width: 46ch; font-size: 1.12rem; color: #cdc5b5; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-perks { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero-perks div { display: flex; gap: 10px; align-items: center; font-size: .92rem; color: #cdc5b5; }
.hero-perks strong { display: block; color: #fff; font-weight: 600; }
.hero-perks .icon { color: var(--gold); }
.hero-stage { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-ring {
  position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(243, 207, 107, .55);
  box-shadow: 0 0 60px rgba(226, 178, 58, .25), inset 0 0 60px rgba(226, 178, 58, .12);
}
.hero-product { position: relative; width: min(330px, 75%); aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden; background: var(--ink-2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.hero-product img { width: 100%; height: 100%; object-fit: cover; }
.hero-tag {
  position: absolute; bottom: 18px; inset-inline-start: 0; z-index: 2; background: #fff; color: var(--text);
  border-radius: var(--r-m); padding: 12px 16px; box-shadow: var(--shadow); min-width: 200px;
}
.hero-tag strong { display: block; font-family: var(--display); font-size: 1.2rem; }

.cats { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .92rem;
}
.cat-chip:hover, .cat-chip.is-active { border-color: var(--ink); }
.cat-chip.is-active { background: var(--ink); color: #fff; }
.cat-chip small { color: var(--faint); font-weight: 500; }
.cat-chip.is-active small { color: var(--gold-2); }

/* بطاقة العطر */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 22px; }
.product-card { display: flex; flex-direction: column; }
.product-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden; background: #ebe7de; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-flags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; }
.like-btn {
  position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); border: 0; cursor: pointer; color: var(--text);
}
.like-btn:hover { color: var(--bad); }
.like-btn.is-liked { color: var(--bad); }
.like-btn.is-liked .icon { fill: currentColor; }
.product-body { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-meta { font-size: .8rem; color: var(--muted); }
.product-name { font-family: var(--display); font-size: 1.28rem; font-weight: 700; line-height: 1.35; }
.product-name a:hover { color: var(--gold-deep); }
.product-notes { font-size: .85rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font-weight: 700; font-size: 1.08rem; }
.price del { color: var(--faint); font-weight: 400; font-size: .85rem; margin-inline-start: 6px; }
.add-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; display: grid; place-items: center; cursor: pointer; }
.add-btn:hover { background: var(--ink); color: var(--gold-2); }
.add-btn[disabled] { opacity: .35; cursor: not-allowed; }

.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; }
.stars .icon.is-on { fill: currentColor; }
.stars .icon.is-off { color: var(--line-2); }
.stars-label { font-size: .8rem; color: var(--muted); margin-inline-start: 6px; }

/* شريط الميزات */
.band { background: #fff; border-block: 1px solid var(--line); }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.band-item { display: flex; gap: 14px; padding: 28px 24px; }
.band-item + .band-item { border-inline-start: 1px solid var(--line); }
.band-item .icon { color: var(--gold-deep); width: 28px; height: 28px; }
.band-item strong { display: block; font-size: 1rem; }
.band-item p { font-size: .88rem; color: var(--muted); }

/* المفتاح: بطاقة العضوية والإحالة */
.key-card {
  position: relative; overflow: hidden; border-radius: var(--r-l); padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, #3a3122 0%, var(--ink) 55%);
  color: #ece4d2; border: 1px solid rgba(226, 178, 58, .35);
}
.key-card::after {
  content: ""; position: absolute; inset-inline-end: -30px; bottom: -50px; width: 200px; height: 200px;
  background: url("../images/logo-mark.svg") center / contain no-repeat; opacity: .08; transform: rotate(-12deg);
}
.key-card .label-gold { color: var(--gold); font-size: .82rem; font-weight: 600; }
.key-code { font-family: var(--body); font-weight: 700; font-size: 2rem; letter-spacing: .14em; color: #fff; direction: ltr; display: inline-block; }
.key-card .copy-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.key-link { flex: 1; min-width: 200px; direction: ltr; text-align: left; font-size: .82rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #e6dfcf; border-radius: 999px; padding: 10px 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.feature-dark { background: var(--ink); color: #e6dfcf; border-radius: var(--r-l); padding: 36px; position: relative; overflow: hidden; }
.feature-dark h2 { color: #fff; font-size: 2rem; }
.feature-dark p { color: #c9c1b1; }
.feature-light { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 36px; }

.steps { display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-wash); color: var(--gold-deep); font-weight: 700; font-size: 1.1rem;
}
.feature-dark .step::before { background: rgba(226, 178, 58, .14); color: var(--gold-2); }
.step strong { display: block; }
.step p { font-size: .92rem; }

/* آراء */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; font-size: 1rem; line-height: 1.85; }
.quote footer { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: .88rem; }

/* ------------------------------------------------------------------ صفحة العطر */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden; background: #ebe7de; position: sticky; top: calc(var(--header-h) + 20px); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.p-title { font-size: clamp(2rem, 4vw, 2.8rem); }
.p-price { font-size: 1.7rem; font-weight: 700; }
.p-price del { font-size: 1rem; color: var(--faint); font-weight: 400; margin-inline-start: 8px; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; }
.pyramid { display: grid; gap: 8px; }
.pyramid-row { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); }
.pyramid-row strong { color: var(--gold-deep); font-family: var(--display); font-size: 1.1rem; }
.pyramid-row:nth-child(1) { margin-inline: 14%; }
.pyramid-row:nth-child(2) { margin-inline: 7%; }
.notes-list { display: flex; gap: 6px; flex-wrap: wrap; }
.notes-list span { background: var(--paper); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.buy-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.qty input { width: 44px; text-align: center; border: 0; background: none; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rating-summary { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center; }
.rating-big { text-align: center; }
.rating-big .num { font-size: 3rem; font-weight: 700; line-height: 1; font-family: var(--body); }
.bar-row { display: grid; grid-template-columns: 40px 1fr 36px; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { cursor: pointer; color: var(--line-2); }
.star-input label .icon { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--gold); border-radius: 4px; }
.guest-cta { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: var(--r-m); background: var(--gold-wash); border: 1px solid #f0dfa6; }
.guest-cta .icon { color: var(--gold-deep); width: 34px; height: 34px; }

/* ------------------------------------------------------------------ قائمة العطور */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 22px; }
.filters h3 { font-family: var(--body); font-size: .85rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.filter-list { display: grid; gap: 2px; }
.filter-list a { padding: 7px 12px; border-radius: var(--r-s); display: flex; justify-content: space-between; }
.filter-list a:hover { background: #fff; }
.filter-list a.is-active { background: var(--ink); color: #fff; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-box .input { padding-inline-start: 44px; border-radius: 999px; }

/* ------------------------------------------------------------------ المسابقة */
.contest-hero { background: var(--ink); color: #e9e2d2; padding-block: 48px 40px; }
.contest-hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.2rem); }
.contest-hero .prizes { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.prize { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-m); background: rgba(255, 255, 255, .05); border: 1px solid rgba(226, 178, 58, .3); }
.prize .icon { color: var(--gold); width: 26px; height: 26px; }
.prize small { display: block; color: #a9a091; font-size: .78rem; }
.contenders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -1px; }
.contender {
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-l); overflow: hidden; background: #fff;
  border: 2px solid var(--line); text-align: start; cursor: pointer; padding: 0;
}
.contender:hover { border-color: var(--line-2); }
.contender.is-selected { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-2); }
.contender .media { aspect-ratio: 1; background: #ebe7de; position: relative; }
.contender .media img { width: 100%; height: 100%; object-fit: cover; }
.contender .info { padding: 14px 16px; display: grid; gap: 6px; }
.contender .info strong { font-family: var(--display); font-size: 1.3rem; }
.vote-bar { height: 6px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.vote-bar span { display: block; height: 100%; background: var(--ink); }
.contender.is-winner { border-color: var(--gold); }
.winner-ribbon { position: absolute; top: 12px; inset-inline-start: 12px; }
.comment { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-body { line-height: 1.85; }
.react { display: inline-flex; gap: 6px; margin-top: 8px; }
.react button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-size: .85rem; }
.react button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.react button[disabled] { cursor: default; opacity: .65; }
.results-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ------------------------------------------------------------------ التعليم */
.lesson-path { display: grid; gap: 12px; }
.lesson-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
.lesson-row:hover { border-color: var(--line-2); }
.lesson-num { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--paper); font-size: 1.1rem; }
.lesson-row.is-open .lesson-num { background: var(--ink); color: var(--gold-2); }
.lesson-row h3 { font-family: var(--body); font-size: 1.02rem; }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; display: flex; flex-direction: column; }
.video-thumb { aspect-ratio: 16 / 9; background: var(--ink); display: grid; place-items: center; color: var(--gold); position: relative; }
.video-thumb .icon { width: 48px; height: 48px; }
.video-card .body { padding: 16px; display: grid; gap: 8px; flex: 1; }
.player { aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; background: #000; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; }
.prose { font-size: 1.05rem; line-height: 2; max-width: 70ch; }
.prose p + p { margin-top: 1em; }
.locked {
  border-radius: var(--r-l); padding: 48px 28px; text-align: center; color: #e6dfcf;
  background: radial-gradient(100% 120% at 50% 0%, #3a3122 0%, var(--ink) 60%);
}
.locked .icon { width: 48px; height: 48px; color: var(--gold); margin: 0 auto 14px; }
.locked h2 { color: #fff; font-size: 1.8rem; }
.locked p { margin: 8px auto 0; max-width: 46ch; color: #c9c1b1; }

/* ------------------------------------------------------------------ السلة والدفع */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-thumb { width: 96px; height: 110px; border-radius: var(--r-m); overflow: hidden; background: #ebe7de; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-row { display: flex; justify-content: space-between; padding-block: 6px; }
.summary-total { font-size: 1.25rem; font-weight: 700; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; }
.pay-instructions { white-space: pre-line; background: var(--paper); border-radius: var(--r-m); padding: 14px 16px; font-size: .92rem; }

/* ------------------------------------------------------------------ صفحات الدخول */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background: radial-gradient(90% 90% at 80% 10%, #3a3122 0%, var(--ink) 60%); color: #d9d1c1;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side img.logo { width: 280px; height: auto; }
.auth-side h2 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.8rem); margin-top: 32px; }
.auth-side .steps { margin-top: 28px; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; background: var(--paper); }
.auth-card { width: min(100%, 440px); }
.auth-card h1 { font-size: 2.1rem; }
.auth-card .sub { color: var(--muted); margin-top: 6px; }
.auth-mobile-logo { display: none; }
.sponsor { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); background: var(--gold-wash); border: 1px solid #efdfa8; font-size: .92rem; }

/* ------------------------------------------------------------------ منطقة العضو */
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: start; padding-top: 32px; }
.side-nav { position: sticky; top: calc(var(--header-h) + 20px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-user strong { display: block; line-height: 1.3; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-s); color: var(--muted); font-weight: 500; }
.side-nav a:hover { background: var(--paper); color: var(--text); }
.side-nav a.is-active { background: var(--ink); color: #fff; }
.side-nav a.is-active .icon { color: var(--gold-2); }
.side-nav .pill { margin-inline-start: auto; background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 7px; }
.account-main { min-width: 0; }
.account-main > .page-head { padding-top: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; }
.stat .k { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.stat .k .icon { width: 17px; height: 17px; color: var(--gold-deep); }
.stat .v { font-size: 1.7rem; font-weight: 700; margin-top: 4px; line-height: 1.2; }
.stat .s { font-size: .8rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.tx-list { display: grid; }
.tx { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); }
.tx-icon.in { background: var(--ok-wash); color: var(--ok); }
.tx-icon.out { background: var(--bad-wash); color: var(--bad); }
.tx .desc { font-weight: 600; font-size: .93rem; line-height: 1.45; }
.tx .meta { font-size: .78rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tabs a.is-active { color: var(--text); border-color: var(--ink); }
.tabs .badge { padding: 0 8px; }
.tabs.tabs-wrap { flex-wrap: wrap; overflow: visible; }
.tabs.tabs-wrap a { padding: 8px 12px; }
.package-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.package { position: relative; display: grid; gap: 2px; padding: 14px; border-radius: var(--r-m); border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; text-align: center; }
.package input { position: absolute; opacity: 0; }
.package strong { font-size: 1.2rem; }
.package:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--gold-wash); }
.quote-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-m); background: var(--ink); color: #fff; flex-wrap: wrap; }
.quote-box .num { font-size: 1.5rem; font-weight: 700; color: var(--gold-2); }

/* شجرة الفريق */
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0; padding-inline-start: 28px; border-inline-start: 1.5px dashed var(--line-2); margin-inline-start: 20px; }
.tree li { position: relative; padding-top: 10px; }
.tree ul > li::before { content: ""; position: absolute; inset-inline-start: -28px; top: 32px; width: 22px; border-top: 1.5px dashed var(--line-2); }
.node { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.node.is-root { background: var(--ink); color: #fff; border-color: var(--ink); }
.node .gen { font-size: .72rem; color: var(--muted); }
.node.is-root .gen { color: var(--gold-2); }
.tree details > summary { list-style: none; cursor: pointer; }
.tree details > summary::-webkit-details-marker { display: none; }

/* المحادثات */
.chat { display: grid; grid-template-columns: 300px 1fr; height: min(72vh, 720px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.chat-list { border-inline-end: 1px solid var(--line); overflow-y: auto; }
.chat-list a { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-list a:hover { background: var(--paper); }
.chat-list a.is-active { background: var(--gold-wash); }
.chat-list .preview { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pane { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-body { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: #faf9f6; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .time { display: block; font-size: .7rem; opacity: .65; margin-top: 4px; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-end-end-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form .textarea { min-height: 46px; height: 46px; resize: none; border-radius: 23px; padding-block: 11px; }
.chat-body { min-height: 0; overscroll-behavior: contain; }
.bubble { position: relative; }
.bubble.is-deleted { background: transparent !important; color: var(--muted) !important; border: 1px dashed var(--line) !important; font-style: italic; }
.bubble.is-deleted .deleted-note { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.bubble-menu { position: absolute; top: 4px; inset-inline-start: -30px; }
.bubble-menu summary { list-style: none; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: #fff; border: 1px solid var(--line); font-weight: 700; line-height: 1; }
.bubble-menu summary::-webkit-details-marker { display: none; }
.bubble-menu[open] summary { background: var(--ink); color: #fff; border-color: var(--ink); }
.bubble-menu-panel { position: absolute; top: 32px; inset-inline-start: 0; z-index: 5; width: min(300px, 78vw); display: grid; gap: 8px; padding: 12px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(20,18,15,.14); font-style: normal; white-space: normal; }
.bubble-edit { display: grid; gap: 8px; }
.bubble-edit .textarea { min-height: 70px; font-size: .92rem; }
.bubble-menu-panel .text-bad { color: var(--bad); }
.bubble-menu-panel form:not(.bubble-edit) .btn { width: 100%; justify-content: center; }
.day-sep { align-self: center; font-size: .75rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; margin-block: 8px; }

.person-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------ لوحة الإدارة */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #c9c1b1; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand img { height: 86px; width: auto; max-width: 100%; }
.admin-side nav { margin-top: 22px; display: grid; gap: 2px; }
.admin-side .group { font-size: .72rem; color: #8b8273; padding: 16px 12px 6px; font-weight: 600; }
.admin-side a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-s); font-size: .93rem; }
.admin-side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side a.is-active { background: rgba(226, 178, 58, .14); color: var(--gold-2); }
.admin-side .pill { margin-inline-start: auto; background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 7px; }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: rgba(245, 244, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-content { padding: 28px; }
.admin-content .page-head { padding-top: 0; padding-bottom: 22px; }
.admin-content .page-head h1 { font-family: var(--body); font-size: 1.6rem; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filter-bar .input, .filter-bar .select { min-height: 40px; width: auto; min-width: 160px; padding-block: 6px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .col span { width: 100%; max-width: 28px; background: var(--gold); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.chart .col:hover span { background: var(--ink); }
.chart .col small { font-size: .65rem; color: var(--faint); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.receipt-preview { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.receipt-preview img { width: 100%; max-height: 520px; object-fit: contain; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; }
.pick { position: relative; border: 1.5px solid var(--line-2); border-radius: var(--r-m); overflow: hidden; cursor: pointer; background: #fff; }
.pick input { position: absolute; top: 8px; inset-inline-start: 8px; width: 18px; height: 18px; accent-color: var(--ink); z-index: 1; }
.pick img { aspect-ratio: 1; width: 100%; object-fit: cover; background: #ebe7de; }
.pick span { display: block; padding: 8px 10px; font-size: .82rem; font-weight: 600; }
.pick:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--gold-2); }
.thumb { width: 48px; height: 48px; border-radius: var(--r-s); object-fit: cover; background: #ebe7de; }

dialog.confirm { border: 0; border-radius: var(--r-l); padding: 24px; width: min(92vw, 420px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
dialog.confirm::backdrop { background: rgba(27, 24, 20, .5); }
dialog.confirm h3 { font-family: var(--body); font-size: 1.1rem; }
.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 300; transform: translate(-50%, 160%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .5); transition: transform .3s ease; max-width: calc(100vw - 32px);
}
.toast.is-shown { transform: translate(-50%, 0); }
.toast .icon { color: var(--gold-2); }

/* ترقيم الصفحات */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding-inline: 12px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; }
.pagination a:hover { border-color: var(--ink); }
.pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .is-disabled { opacity: .4; }

/* صفحات الخطأ */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.error-page .code { font-family: var(--display); font-size: 6rem; line-height: 1; color: var(--gold-deep); }

/* أعمدة بديلة تحترم الشاشات الصغيرة */
.product-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-aside { grid-template-columns: minmax(0, 1fr) 360px; }
.layout-main-side { grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr); }
.layout-side-main { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }

/* ------------------------------------------------------------------ الاستجابة للشاشات */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 220px 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: absolute; top: 100%; inset-inline: 0; height: calc(100dvh - var(--header-h)); z-index: 70; background: var(--ink);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 16px; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease; margin: 0;
  }
  .main-nav.is-open { transform: none; }
  .main-nav > a, .main-nav > .dropdown > button { padding: 14px 12px; border-radius: var(--r-s); font-size: 1.05rem; width: 100%; justify-content: space-between; }
  .main-nav .dropdown-panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; margin-top: 4px; min-width: 0; }
  .main-nav .dropdown.is-open .dropdown-panel { display: grid; }
  .mega { grid-template-columns: 1fr; }
  .header-points { display: none; }
  .hero-grid, .product-layout, .split, .cart-layout, .dash-grid, .account-layout,
  .layout-aside, .layout-main-side, .layout-side-main { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { min-height: 340px; order: -1; }
  .gallery-main, .summary, .side-nav { position: static; }
  .account-layout { gap: 20px; padding-top: 20px; }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .side-nav .side-user { display: none; }
  .side-nav a { white-space: nowrap; padding: 8px 12px; }
  .band-grid { grid-template-columns: 1fr; }
  .band-item + .band-item { border-inline-start: 0; border-top: 1px solid var(--line); }
  .quote-grid, .video-grid, .contenders, .results-podium { grid-template-columns: 1fr; }
  .contenders { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .contender .info { padding: 10px; }
  .contender .info strong { font-size: 1rem; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-logo { display: block; background: var(--ink); padding: 14px; border-radius: var(--r-m); width: fit-content; margin-bottom: 24px; }
  .auth-mobile-logo img { height: 46px; width: auto; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 240px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .chat-body { height: 58vh; height: 58dvh; min-height: 280px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 80; transform: translateX(100%); transition: transform .25s; }
  .admin-side.is-open { transform: none; }
  .admin-content { padding: 18px 16px; }
  .admin-top { padding: 10px 16px; }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: .97rem; }
  .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .stat-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .choice-grid.cols-3 { grid-template-columns: 1fr; }
  .product-name { font-size: 1.08rem; }
  .product-notes { display: none; }
  .filters { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 1.35rem; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card { padding: 18px; border-radius: var(--r-m); }
  .section { padding-block: 44px; }
  .hero-grid { padding-block: 32px 48px; gap: 24px; }
  .hero-stage { min-height: 280px; }
  .hero-tag { min-width: 0; }
  .rating-summary { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-thumb { width: 72px; height: 84px; }
  .cart-item > :last-child { grid-column: 1 / -1; }
  .lesson-row { grid-template-columns: 40px 1fr; }
  .lesson-row > :last-child { grid-column: 1 / -1; }
  .lesson-num { width: 40px; height: 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .key-code { font-size: 1.6rem; }
  .header-inner { gap: 10px; }
  .brand img { height: 46px; }
  .table th, .table td { padding: 10px 12px; }
  .bubble { max-width: 88%; }
  .dropdown-panel { min-width: 240px; }
}

/* قوائم الترويسة على الهاتف والتابلت (التنبيهات وقائمة الحساب):
   تُثبَّت داخل حدود الشاشة بدل أن تمتد من مكان الأيقونة فتخرج نصفها خارج الشاشة، بالطول وبالعرض */
@media (max-width: 900px) {
  .header-actions .dropdown-panel {
    position: fixed; top: calc(var(--header-h) + 8px); left: 12px; right: auto;
    width: min(340px, calc(100vw - 24px)); min-width: 0;
    max-height: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  }
  .header-actions .notif-panel { width: min(420px, calc(100vw - 24px)); }
}
.like-btn-inline.is-liked { color: var(--bad); border-color: var(--bad); }
.like-btn-inline.is-liked .icon { fill: currentColor; }
@media (max-width: 900px) { .admin-top .menu-toggle { display: inline-grid !important; } }
@media (min-width: 901px) {
  .admin-shell { background: linear-gradient(to left, var(--ink) 260px, var(--paper) 260px); }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .admin-shell { background: linear-gradient(to left, var(--ink) 220px, var(--paper) 220px); }
}
@media (min-width: 901px) {
  [dir="ltr"] .admin-shell { background: linear-gradient(to right, var(--ink) 260px, var(--paper) 260px); }
}
@media (min-width: 901px) and (max-width: 1100px) {
  [dir="ltr"] .admin-shell { background: linear-gradient(to right, var(--ink) 220px, var(--paper) 220px); }
}
.table .num { white-space: nowrap; }

/* ------------------------------------------------------------------ الطلبات الجديدة وما يحتاج إجراءً من الإدارة */
.table tr.row-new td { background: #fff4d6; }
.table tr.row-new td:first-child { box-shadow: inset -4px 0 0 var(--gold); }
.table tr.row-new:hover td { background: #ffedbf; }
.badge-new {
  display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--ink);
  font-weight: 700; padding: 2px 9px; border-radius: 999px; font-size: .74rem; vertical-align: middle;
}
.badge-new::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink);
  animation: new-pulse 1.4s ease-in-out infinite;
}
@keyframes new-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .badge-new::before { animation: none; } }
.stat.stat-new { border-color: var(--gold); background: linear-gradient(180deg, #fff6dc, #fff); box-shadow: 0 0 0 3px rgba(226, 178, 58, .18); }
.stat.stat-new .v { color: var(--gold-deep); }

/* ------------------------------------------------------------------ التنقل بين المتجر ولوحة الإدارة */
.staff-bar { background: linear-gradient(90deg, #8c6a12, #e2b23a 45%, #f3cf6b 75%, #e2b23a); color: var(--ink); font-size: .86rem; font-weight: 600; }
.staff-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.staff-bar-text { display: inline-flex; align-items: center; gap: 8px; }
.staff-bar-role { background: rgba(27, 24, 20, .12); border-radius: 999px; padding: 1px 10px; font-size: .78rem; }
.staff-bar-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--gold-2); border-radius: 999px; padding: 6px 14px; font-size: .82rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(27, 24, 20, .25); }
.staff-bar-btn:hover { background: #000; color: #fff; }
.shop-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; white-space: nowrap;
  background: linear-gradient(135deg, #f3cf6b, #e2b23a 55%, #c9971f); color: var(--ink); box-shadow: 0 4px 14px -6px rgba(140, 106, 18, .7); }
.shop-btn:hover { filter: brightness(1.06); color: var(--ink); }
@media (max-width: 640px) {
  .staff-bar { font-size: .8rem; }
  .staff-bar-inner { min-height: 36px; }
  .admin-top .admin-name { display: none; }
  .admin-top > .muted { display: none; }
}

/* ------------------------------------------------------------------ سوق P2P */
.btn-buy { background: #2f9e5f; color: #fff; border-color: #2f9e5f; }
.btn-buy:hover { background: #27864f; color: #fff; }
.btn-sell { background: #d0484f; color: #fff; border-color: #d0484f; }
.btn-sell:hover { background: #b53b42; color: #fff; }
.p2p-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.side-switch { display: inline-flex; background: var(--paper); border-radius: 999px; padding: 4px; gap: 4px; }
.side-switch a, .side-switch label { position: relative; padding: 8px 22px; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; }
.side-switch a.buy.is-active, .side-switch label.buy:has(input:checked) { background: #2f9e5f; color: #fff; }
.side-switch a.sell.is-active, .side-switch label.sell:has(input:checked) { background: #d0484f; color: #fff; }
.side-switch input { position: absolute; opacity: 0; }
.side-switch.big { width: 100%; }
.side-switch.big label { flex: 1; text-align: center; padding: 12px; font-size: 1.02rem; }
.p2p-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p2p-head, .p2p-row { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.4fr auto; gap: 14px; align-items: center; padding: 14px 20px; }
.p2p-head { font-size: .78rem; color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line); padding-block: 10px; }
.p2p-row { border-bottom: 1px solid var(--line); }
.p2p-row:last-child { border-bottom: 0; }
.p2p-row:hover { background: #fdfbf6; }
.trader { display: inline-flex; align-items: center; gap: 10px; }
.p2p-price { font-weight: 700; font-size: 1.25rem; color: var(--text); }
.p2p-price small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.method-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.method-chip { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: .76rem; background: var(--gold-wash); color: var(--gold-deep); border-inline-start: 3px solid var(--gold); }
.p2p-action { justify-self: end; }
.timer-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--r-m);
  background: linear-gradient(90deg, #fff4d6, #fbf3dc); border: 1px solid #f0d996; font-weight: 600; }
.timer-box strong { font-size: 1.6rem; color: var(--gold-deep); letter-spacing: .04em; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 380px; min-height: 160px; overflow-y: auto; padding: 4px; }
.chat-log .bubble { max-width: 88%; font-size: .9rem; white-space: normal; }
.chat-log .bubble-body { white-space: pre-wrap; }
.kv dd.num { text-align: start; }
.chat-log .bubble:not(.mine) { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.chat-log .bubble.staff { align-self: center; background: var(--info-wash); border-color: #c9dbee; color: var(--info); }
.chat-system { align-self: center; text-align: center; font-size: .78rem; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 6px 12px; max-width: 95%; }
.chat-system .num { display: block; font-size: .7rem; opacity: .7; }
.chat-input { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.chat-input .input { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .p2p-head { display: none; }
  .p2p-row { grid-template-columns: 1fr auto; grid-template-areas: "trader price" "limits limits" "methods action"; gap: 8px 12px; padding: 16px; }
  .p2p-row > :nth-child(1) { grid-area: trader; }
  .p2p-row > :nth-child(2) { grid-area: price; justify-self: end; }
  .p2p-row > :nth-child(3) { grid-area: limits; }
  .p2p-row > :nth-child(4) { grid-area: methods; }
  .p2p-row > :nth-child(5) { grid-area: action; }
  .p2p-toolbar { padding: 14px 16px; }
  .p2p-filters .input { width: 120px !important; }
}

/* ------------------------------------------------------------------ عبوات التعبئة (2.1) */
.gallery-main img.is-pack { object-fit: contain; padding: 0; background: radial-gradient(circle at 50% 40%, #fff, #ebe7de 75%); }
.pack-picker { border: 0; padding: 0; margin-inline: 0; margin-bottom: 0; min-width: 0; }
.pack-picker legend { float: inline-start; width: 100%; font-weight: 700; margin-bottom: 10px; padding: 0; }
.pack-picker legend + * { clear: both; }
.pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pack-grid-3, .pack-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pack-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pack-option { position: relative; display: grid; gap: 6px; align-content: start; text-align: center; padding: 8px 8px 10px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pack-option:hover { border-color: #d8c68f; transform: translateY(-1px); }
.pack-option input { position: absolute; opacity: 0; pointer-events: none; }
.pack-option:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 178, 58, .22); }
.pack-option:has(input:checked)::after { content: "✓"; position: absolute; top: 6px; inset-inline-start: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.pack-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pack-media { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #fff, #f1ede4 75%); display: grid; place-items: center; }
.pack-media img { width: 100%; height: 100%; object-fit: contain; }
.pack-name { font-size: .82rem; font-weight: 600; line-height: 1.35; }
.pack-price { font-size: .9rem; font-weight: 700; color: var(--ink); }
@media (max-width: 560px) {
  .pack-grid-3, .pack-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* محرر البنود في لوحة الإدارة */
.clause-list { display: grid; gap: 14px; }
.clause { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; display: grid; gap: 10px; }
.clause-head { display: flex; gap: 8px; align-items: center; }
.clause-head .clause-no { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--gold-wash, #fbf3dc); color: #8a6a12; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.clause-head input { flex: 1; }
.clause textarea { min-height: 120px; }
.clause-tools { display: flex; gap: 4px; }
.legal-page .legal-clause { padding: 18px 0; border-top: 1px solid var(--line); }
.legal-page .legal-clause:first-of-type { border-top: 0; padding-top: 4px; }
.legal-page h2 { font-size: 1.2rem; display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.legal-page h2 .num { color: #a8851f; font-size: 1rem; }
.legal-page ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; }
.legal-page p + p, .legal-page ul + p, .legal-page p + ul { margin-top: 8px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.legal-toc a { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.legal-toc a:hover { border-color: var(--gold); }
.pack-rows { display: grid; gap: 12px; }
.pack-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.pack-row .pack-thumb { width: 72px; height: 72px; border-radius: 10px; background: #f1ede4; overflow: hidden; display: grid; place-items: center; color: var(--faint); font-weight: 700; }
.pack-row .pack-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pack-row .form-grid { gap: 10px; }

/* 2.2: رصيد كل عبوة */
.pack-sold { min-height: 44px; display: flex; align-items: center; gap: 6px; padding-inline: 4px; }
.pack-stock { font-size: .72rem; color: var(--muted); line-height: 1.4; }
.pack-stock .num { font-weight: 700; color: var(--ink); }
.pack-option.is-out { opacity: .55; cursor: not-allowed; }
.pack-option.is-out .pack-media img { filter: grayscale(1); }
.pack-option .pack-out { position: absolute; top: 8px; inset-inline-end: 8px; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bad-wash, #fbe9ea); color: var(--bad, #c0392b); }
.station-dot { width: 14px; height: 14px; border-radius: 50%; background: #c9c3b6; box-shadow: 0 0 0 4px rgba(0,0,0,.05); flex: none; }
.station-dot.is-on { background: #2f9e5f; box-shadow: 0 0 0 4px rgba(47,158,95,.18); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 8px rgba(47,158,95,.06); } }
/* 2.2: التوصيل والاعتراض */
.courier-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--gold-wash); }
.claim-card.is-open { border-color: #e7b4b4; box-shadow: 0 0 0 3px rgba(178, 59, 59, .08); }
.claim-quote { padding: 12px 14px; border-radius: 12px; background: var(--bad-wash); border-inline-start: 3px solid var(--bad); }
.claim-quote.is-ok { background: #eaf6ef; border-color: #2f9e5f; }
.claim-quote p { margin: 6px 0 0; white-space: pre-line; }
.decision-option { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.decision-option:has(input:checked) { border-color: var(--gold); background: var(--gold-wash); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .82rem; color: var(--muted); }
.chip .num { font-weight: 700; }
.chip-warn { border-color: #ecd28a; background: var(--gold-wash); color: #7a5c0e; }
.chip-bad { border-color: #e7b4b4; background: var(--bad-wash); color: var(--bad); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.bulk-bar { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.bulk-bar[hidden] { display: none; }
.bulk-bar .btn-line { color: #fff; border-color: rgba(255,255,255,.4); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.deposit-review { border-color: #ecd28a; background: linear-gradient(0deg, #fff, var(--gold-wash)); }
/* 2.2: لوحة المندوب */
.courier-order { display: block; color: inherit; transition: border-color .15s, transform .15s; }
.courier-order:hover { border-color: var(--gold); transform: translateY(-1px); }
.courier-order.is-failed { border-color: #e7b4b4; background: linear-gradient(0deg, #fff, var(--bad-wash)); }
.collect-pill { flex: none; min-width: 84px; text-align: center; padding: 8px 10px; border-radius: 12px; background: var(--ink); color: #fff; }
.collect-pill small { display: block; font-size: .7rem; opacity: .8; }
.collect-pill strong { font-size: 1.15rem; color: var(--gold); }
.collect-pill.is-paid { background: #eaf6ef; color: #2f7a4f; }
.collect-pill.is-paid strong { color: #2f7a4f; font-size: .95rem; }
.collect-banner { display: grid; justify-items: center; gap: 2px; padding: 22px; border-radius: var(--r-l); background: var(--ink); color: #fff; text-align: center; }
.collect-banner small { opacity: .8; }
.collect-banner strong { font-size: 2.4rem; color: var(--gold); line-height: 1.1; }
.collect-banner.is-paid { background: #eaf6ef; color: #2f7a4f; }
.collect-banner.is-paid strong { font-size: 1.5rem; color: #2f7a4f; }
.fail-box summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.fail-box summary::-webkit-details-marker { display: none; }
.deposit-line { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.deposit-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--gold-wash); }
.deposit-total strong { font-size: 1.3rem; }
@media (max-width: 640px) { .courier-stats { grid-template-columns: 1fr 1fr; } .courier-stats .stat:first-child { grid-column: 1 / -1; } .check-grid { grid-template-columns: 1fr 1fr; } }
.callout { padding: 12px 14px; border-radius: 12px; background: var(--gold-wash); border-inline-start: 3px solid var(--gold); }
.respond-card { border-color: #ecd28a; }
.respond-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.respond-option { position: relative; display: grid; place-items: center; text-align: center; min-height: 52px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.respond-option input { position: absolute; opacity: 0; pointer-events: none; }
.respond-option.is-received:has(input:checked) { border-color: #2f9e5f; background: #eaf6ef; color: #23714a; }
.respond-option.is-not_received:has(input:checked), .respond-option.is-refused:has(input:checked) { border-color: var(--bad); background: var(--bad-wash); color: var(--bad); }
.respond-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 560px) { .respond-options { grid-template-columns: 1fr; } }

/* 2.3: تبويبا البيع والشراء في سوق P2P */
.side-switch .tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 999px; font-size: .72rem; background: rgba(0,0,0,.08); }
.side-switch a.is-active .tab-count { background: rgba(255,255,255,.25); }
.p2p-legend { margin: 0 0 10px; }

/* 3.0: كود المرشد بعد التسجيل */
.sponsor-card { margin-bottom: 20px; border-color: #ecd28a; background: linear-gradient(0deg, #fff, var(--gold-wash)); }
.treasury-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px; background: var(--gold-wash); border: 1px solid #ecd28a; }
.ad-tips { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 4px; }
/* 3.0: خانة الفيديوهات الترويجية */
.promo-section { padding-block: 48px 8px; }
.promo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin;
  width: max-content; max-width: 100%; margin-inline: auto; box-sizing: border-box; }
.promo-card { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111; scroll-snap-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.promo-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-badge { position: absolute; top: 10px; inset-inline-start: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; backdrop-filter: blur(4px); }
.promo-sound { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.promo-sound.is-on { background: var(--gold); color: var(--ink); }
.promo-caption { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; display: grid; gap: 8px; justify-items: start; }
.promo-caption strong { font-size: .95rem; line-height: 1.4; }
@media (max-width: 640px) {
  /* كل فيديو في منتصف الشاشة تماماً، والتمرير يتوقف عند منتصف كل فيديو */
  .promo-strip { grid-auto-columns: min(72vw, 300px); gap: 12px; padding-inline: calc(50% - min(36vw, 150px)); scroll-padding-inline: calc(50% - min(36vw, 150px)); }
}
.promo-thumb { width: 64px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #111; flex: none; }
.promo-thumb video { width: 100%; height: 100%; object-fit: cover; }
.promo-admin { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.promo-admin-video { width: 150px; aspect-ratio: 9 / 16; border-radius: 12px; background: #111; object-fit: cover; }
@media (max-width: 560px) { .promo-admin { grid-template-columns: 1fr; } .promo-admin-video { width: 100%; max-width: 220px; } }

/* 3.0: زر اللغة */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(226,178,58,.45); color: var(--gold-2, #e2b23a); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.lang-switch:hover { background: rgba(226,178,58,.12); }
.lang-switch[lang="ar"] span { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-switch[lang="en"] span { font-family: Inter, "Segoe UI", sans-serif; letter-spacing: .01em; }
.admin-top .lang-switch { color: var(--ink); border-color: var(--line); background: #fff; }
.auth-main { position: relative; }
.auth-lang { position: absolute; top: 16px; inset-inline-end: 16px; color: var(--ink); border-color: var(--line); background: #fff; }
@media (max-width: 760px) { .header-lang span { display: none; } .header-lang { padding: 6px 8px; } }

/* نصوص الموقع والترجمة */
.texts-editor { display: grid; gap: 12px; }
.text-row { padding: 14px 16px; display: grid; gap: 10px; border-inline-start: 3px solid transparent; }
.text-row.is-edited { border-inline-start-color: var(--gold); }
.text-row.is-dirty { border-inline-start-color: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; }
.text-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.text-vars code { background: var(--gold-wash); border-radius: 6px; padding: 0 6px; margin-inline-start: 4px; font-size: .78rem; }
.text-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.text-cols .field + .field { margin-top: 0; }
.text-cols .textarea { min-height: 0; }
.text-cols .textarea[lang="en"] { font-family: var(--font-en, system-ui), system-ui, sans-serif; }
.text-row > .btn { justify-self: start; }
.texts-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
@media (max-width: 760px) { .text-cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ English (LTR) */
/* الأسهم الاتجاهية تنقلب مع اتجاه الصفحة */
[dir="ltr"] .icon-flip { transform: scaleX(-1); }
[dir="ltr"] .crumbs .icon { transform: none; }
html[lang="en"] {
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-en: "Inter";
}
html[lang="en"] body { letter-spacing: 0; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -.01em; }
/* النصوص العربية التي يكتبها المستخدمون (أسماء، آراء) تبقى بخط عربي واضح */
html[lang="en"] :lang(ar) { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.en-fields { border: 1px dashed var(--line-2); border-radius: var(--r-m); padding: 12px 16px; margin-top: 16px; }
.en-fields > summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.en-fields[open] > summary { margin-bottom: 12px; }
.en-fields .form-grid { text-align: left; }
.clause-en { margin-top: 8px; }
.clause-en > summary { cursor: pointer; color: var(--muted); }
.clause-en[open] > summary { margin-bottom: 8px; }
/* القوائم الجانبية على الهاتف تخرج من جهة بداية الصفحة: اليمين بالعربية، واليسار بالإنجليزية */
@media (max-width: 900px) {
  [dir="ltr"] .main-nav { transform: translateX(-100%); }
  [dir="ltr"] .main-nav.is-open { transform: none; }
}
@media (max-width: 900px) {
  [dir="ltr"] .admin-side { transform: translateX(-100%); }
  [dir="ltr"] .admin-side.is-open { transform: none; }
  html { overflow-x: clip; }
}
/* شاشات الهاتف الضيقة: أزرار الترويسة أصغر حتى لا تخرج عن الشاشة (خصوصاً بالإنجليزية) */
@media (max-width: 480px) {
  .header-actions { gap: 4px; }
  .header-actions .btn-sm { padding-inline: 10px; font-size: .82rem; }
  .header-actions .lang-switch { padding-inline: 8px; }
  .header-inner .brand img { height: 42px; }
}
@media (max-width: 360px) {
  .header-actions .btn-ghost.btn-sm { display: none; }
}

/* 3.1: شريط الإدارة على الهاتف: قائمة التنبيهات تُثبَّت داخل الشاشة بدل أن تخرج عن طرفها، والأزرار تتسع للعرض */
@media (max-width: 900px) {
  .admin-top .dropdown-panel {
    position: fixed; top: 64px; left: 12px; right: 12px; inset-inline: 12px;
    width: auto; min-width: 0; max-width: none;
    max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain;
  }
}
@media (max-width: 640px) {
  .admin-top { gap: 8px; padding-inline: 12px; }
  .admin-top-actions { gap: 6px !important; margin-inline-start: auto; }
  .admin-top .shop-btn { padding: 7px 10px; }
  .admin-top .shop-btn span, .admin-top .admin-logout span { display: none; }
  .admin-top .admin-logout { width: 34px; height: 34px; padding: 0; justify-content: center; }
  .admin-top .lang-switch { padding-inline: 8px; }
}
.admin-top .header-icon { color: var(--ink); }
.admin-top .header-icon:hover { background: rgba(27, 24, 20, .06); color: var(--ink); }
.contest-target { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.contest-target .field { margin: 0; }
.contest-progress { margin-top: 22px; max-width: 520px; color: #c9c1b1; font-size: .9rem; }
.contest-progress .vote-bar { height: 8px; background: rgba(255,255,255,.12); margin: 8px 0; }
.contest-progress .vote-bar span { background: var(--gold); }
.upload-note { align-items: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(140, 106, 18, .25); border-top-color: var(--gold-deep, #8c6a12); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 3.1: الطلبات حسب المنطقة */
.zone-card { margin-bottom: 18px; }
.zone-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 18px 20px 14px; }
.zone-head h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 6px; }
.zone-head h2 .icon { color: var(--gold-deep); }
.zone-assign { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 var(--r-m) var(--r-m); }
.zone-assign .select { width: auto; min-width: 200px; }
@media (max-width: 640px) { .zone-assign .select { flex: 1 1 100%; } }

/* 3.2: مستويات الأعضاء */
.level-chip { --lv: var(--gold-deep); display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  color: var(--lv); background: color-mix(in srgb, var(--lv) 12%, #fff); border: 1px solid color-mix(in srgb, var(--lv) 35%, #fff); }
.level-strip { --lv: var(--gold-deep); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; color: var(--text);
  border-inline-start: 4px solid var(--lv); }
.level-strip:hover { box-shadow: var(--shadow); }
.level-strip .grow { flex: 1 1 220px; }
.level-hero { --lv: var(--gold-deep); border-top: 4px solid var(--lv); }
.level-name { font-family: var(--display); font-size: 1.9rem; display: flex; align-items: center; gap: 8px; color: var(--lv); margin-top: 2px; }
.level-name .icon { width: 26px; height: 26px; }
.level-stats { display: grid; grid-template-columns: repeat(2, minmax(120px, auto)); gap: 10px 20px; }
.level-stats div { display: grid; gap: 2px; }
.level-stats strong { font-size: 1.35rem; }
.level-progress { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.progress-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; }
.progress-row .bar { height: 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.progress-row .bar i { display: block; height: 100%; background: var(--lv); border-radius: inherit; min-width: 2px; }
@media (max-width: 560px) { .progress-row { grid-template-columns: 1fr auto; } .progress-row .bar { grid-column: 1 / -1; grid-row: 2; } .level-stats { grid-template-columns: 1fr 1fr; width: 100%; } }
tr.is-current td { background: var(--gold-wash); }
.level-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input.input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }

/* 3.2: مراقبة المحادثات */
.chat-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px; }
.chat-filters .input { flex: 1 1 220px; width: auto; }
.chat-filters .chip a { display: inline-flex; color: inherit; }
.chat-admin { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.chat-transcript { display: flex; flex-direction: column; gap: 8px; background: var(--paper); max-height: 72vh; overflow-y: auto; }
.chat-transcript .bubble .who { display: block; font-weight: 600; opacity: .75; margin-bottom: 2px; }
.ban-box { display: grid; gap: 8px; }
.ban-box.is-banned { padding: 12px; border-radius: var(--r-s); background: var(--bad-wash); color: var(--bad); }
.ban-box .field { margin: 0; }
@media (max-width: 900px) { .chat-admin { grid-template-columns: 1fr; } .chat-transcript { max-height: none; } }

/* 3.2: إشعارات الهاتف */
.phone-alerts { display: grid; gap: 16px; }
.phone-alerts .device-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phone-alerts .cats { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.push-state { font-size: .85rem; }
.push-state.is-on { color: var(--ok); }
.push-state.is-bad { color: var(--bad); }
.push-prompt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--gold-wash); font-size: .82rem; }
.phone-alerts fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.welcome-gift { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: var(--gold-wash); color: var(--gold-deep); font-size: .85rem; font-weight: 600; }
.level-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.level-card { --lv: var(--gold-deep); display: grid; gap: 10px; align-content: start; border-top: 3px solid var(--lv); }
.level-card.is-current { background: var(--gold-wash); }
.level-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.level-terms dt { font-size: .75rem; color: var(--muted); }
.level-terms dd { margin: 0; font-weight: 700; }
.special-offer { display: inline-flex; align-items: center; gap: 4px; }
.level-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.level-reqs { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.level-reqs li { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.level-reqs li.is-met strong { color: var(--ok); }
.progress-row.is-met .bar i { background: var(--ok); }
.progress-row.is-met > span:first-child { color: var(--ok); }
.progress-row { grid-template-columns: minmax(150px, 220px) 1fr auto; }
.special-card { color: var(--text); border-top-color: var(--gold); }
.special-card:hover { box-shadow: var(--shadow); }
.audience-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; font-size: .9rem; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--ink); background: var(--gold-wash); }
.radio-card input { margin-top: 3px; }
/* 3.5.1: الأرباح المعلّقة وشروطها */
.pending-conditions { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.pending-conditions li { display: flex; gap: 6px; align-items: flex-start; }
.pending-conditions li .icon { flex: none; margin-top: 2px; opacity: .7; }
.pending-conditions li.done { color: var(--ok); }
.pending-conditions li.done .icon { opacity: 1; }
.balance-held { color: var(--gold-2); }
@media (max-width: 640px) { #pending .stat-grid.cols-3 { grid-template-columns: 1fr; } }
.choice-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 3.6: أقسام الإعدادات */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.settings-tile { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.settings-tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.settings-tile.is-warn { border-color: var(--bad); }
.settings-tile.is-warn .tiny { color: var(--bad); }
/* 3.6: لوحة الالتزامات */
.mint-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mint-chart .bar { flex: 1; min-width: 4px; height: max(2px, var(--h)); background: var(--gold); border-radius: 3px 3px 0 0; opacity: .85; }
.mint-chart .bar:last-child { background: var(--ink, #1b1814); }
.stat-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* 3.6: عضو موثوق */
.trust-card { display: flex; gap: 14px; align-items: flex-start; }
.trust-card.is-trusted { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,.08), transparent 60%); }
.trust-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.trust-bar span { display: block; height: 100%; width: var(--w); background: var(--gold); border-radius: 99px; }

/* ---------- المحادثات في الإدارة: المحذوف والمعدّل وإجراءات الرسالة */
.chat-transcript .bubble { position: relative; padding-inline-end: 38px; }
.chat-transcript .bubble.is-trashed { opacity: .72; border: 1px dashed var(--bad) !important; }
.msg-original { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.06); font-size: .8rem; white-space: pre-wrap; }
.bubble.mine .msg-original { background: rgba(255,255,255,.12); }
.msg-flag { display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bad-wash); color: var(--bad); }
.msg-actions { position: absolute; top: 6px; inset-inline-end: 6px; }
.msg-actions summary { list-style: none; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 700; }
.msg-actions summary::-webkit-details-marker { display: none; }
.msg-actions-panel { position: absolute; top: 32px; inset-inline-end: 0; z-index: 6; width: min(320px, 80vw); padding: 12px; display: grid; gap: 10px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(20,18,15,.16); white-space: normal; text-align: start; }
.del-modes { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.radio-card.is-danger:has(input:checked) { border-color: var(--bad); background: var(--bad-wash); }
.radio-card small { display: block; color: var(--muted); font-size: .78rem; }
.danger-zone { border-color: #e7c4c4; }
.danger-zone > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; color: var(--bad); }
.text-bad { color: var(--bad); }

/* ---------- مصدر فيديو الدرس، والمشغّل المحمي باسم المشاهد */
.video-source { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.radio-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.player { position: relative; }
.player.is-fs { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.player-mark { position: absolute; z-index: 3; pointer-events: none; user-select: none; color: rgba(255,255,255,.42); font-size: clamp(.7rem, 1.6vw, .95rem); font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.55); white-space: nowrap; animation: markmove 46s linear infinite; }
@keyframes markmove { 0% { top: 8%; left: 6%; } 24% { top: 70%; left: 58%; } 49% { top: 22%; left: 64%; } 74% { top: 78%; left: 10%; } 100% { top: 8%; left: 6%; } }
.player-fs { position: absolute; z-index: 4; bottom: 10px; inset-inline-start: 10px; width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(20,18,15,.6); color: #fff; }
.player-fs:hover { background: rgba(20,18,15,.85); }
.player-fs svg { width: 18px; height: 18px; }
.player:has(video) .player-fs { bottom: 54px; }

/* ---------- الشكوى الطارئة في سوق النقاط */
.complaint-card { border-color: #ecd0d0; }
.complaint-card .card-head h2 { display: flex; gap: 8px; align-items: center; color: var(--bad); }
.complaint-item { padding: 12px 14px; border-radius: var(--r-s); background: var(--paper); margin-bottom: 10px; }
.complaint-item.is-active { background: var(--bad-wash); }
.complaint-card details > summary { list-style: none; display: inline-flex; }
.complaint-card details > summary::-webkit-details-marker { display: none; }
.table tr.row-alert td { background: var(--bad-wash); }
/* الفقاعة متعددة الأسطر في القالب: المسافات تُحفظ في نص الرسالة وحده */
.chat-body .bubble, .chat-transcript .bubble { white-space: normal; }
.bubble-text, .msg-body { white-space: pre-wrap; }
/* الرسائل القابلة للتعديل هي الأحدث (أسفل المحادثة)، فتفتح القائمة للأعلى كي لا تُقصّ */
.bubble-menu-panel { top: auto; bottom: 32px; }
/* قوائم الفقاعة تتموضع نسبةً إلى الفقاعة نفسها فلا تخرج عن حدود المحادثة */
.bubble-menu, .msg-actions { position: static; }
.bubble-menu summary { position: absolute; top: 4px; inset-inline-start: -30px; }
.bubble-menu-panel { inset-inline-start: auto; inset-inline-end: 0; top: auto; bottom: calc(100% + 6px); }
.msg-actions summary { position: absolute; top: 6px; inset-inline-end: 6px; }
.msg-actions-panel { top: calc(100% + 4px); inset-inline-end: auto; inset-inline-start: auto; }
.chat-transcript .bubble.mine .msg-actions-panel { inset-inline-end: 0; }
.chat-transcript .bubble.theirs .msg-actions-panel { inset-inline-start: 0; }
.chat-transcript .bubble:nth-last-of-type(-n+3) .msg-actions-panel { top: auto; bottom: calc(100% + 4px); }

/* ==========================================================================
   المحادثة بين الأعضاء (3.7.3): خط أصغر، رد على رسالة، قائمة عائمة لا تُقص،
   وعلى الهاتف تملأ المحادثة المفتوحة الشاشة وخانة الكتابة ظاهرة دائماً
   ========================================================================== */
.chat { --chat-fs: 12px; height: clamp(460px, calc(100vh - var(--header-h) - 230px), 760px); font-size: var(--chat-fs); }
.chat-list a { padding: 10px 14px; grid-template-columns: 34px 1fr auto; }
.chat-list .avatar { width: 34px; height: 34px; font-size: .72rem; }
.chat-list strong.small { font-size: 12.5px; }
.chat-list .preview, .chat-list .tiny { font-size: 11px; }
.chat-pane { position: relative; min-height: 0; }
.chat-head { padding: 10px 14px; gap: 10px; }
.chat-head strong { font-size: 13px; }
.chat-head .tiny { font-size: 10.5px; }
.chat-head .avatar { width: 34px; height: 34px; font-size: .72rem; }
.chat-back { display: none; width: 34px; height: 34px; border-radius: 50%; place-items: center; color: var(--ink); margin-inline-end: -4px; }
.chat-back .icon { width: 20px; height: 20px; }
.chat-body { position: relative; padding: 14px 14px 18px; gap: 3px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: #f7f5f0; scroll-padding-bottom: 12px; }
.chat-body .day-sep { font-size: 10.5px; padding: 1px 10px; margin-block: 10px 6px; }
.chat-body .bubble { position: relative; max-width: min(78%, 560px); padding: 6px 10px 4px; border-radius: 14px; font-size: var(--chat-fs); line-height: 1.6; margin-block: 2px;
  white-space: normal; transition: box-shadow .2s, outline-color .2s; }
.chat-body .bubble .bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-body .bubble .time { display: block; font-size: 10px; line-height: 1.2; opacity: .6; margin-top: 2px; text-align: end; }
.chat-body .bubble.mine .time { color: #e8e2d6; opacity: .75; }
.chat-body .tick { display: inline-block; width: 15px; height: 10px; vertical-align: -1px; margin-inline-start: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-body .tick.is-read { color: var(--gold-2); opacity: 1; }
.chat-body .bubble.is-deleted { padding: 6px 10px; font-size: 11.5px; }
.chat-body .bubble.is-deleted .deleted-note { font-size: 11.5px; }
.chat-body .bubble.is-picked { outline: 2px solid var(--gold); outline-offset: 2px; }
.chat-body .bubble.is-flash { animation: msgflash 1.6s ease; }
@keyframes msgflash { 0%, 40% { box-shadow: 0 0 0 4px rgba(226,178,58,.55); } 100% { box-shadow: 0 0 0 0 rgba(226,178,58,0); } }

/* الاقتباس داخل الرد */
.reply-quote { display: block; margin: 0 -2px 4px; padding: 4px 8px; border-radius: 8px; border-inline-start: 3px solid var(--gold); background: rgba(0,0,0,.05);
  font-size: 11px; line-height: 1.45; color: inherit; text-decoration: none; max-width: 100%; }
.bubble.mine .reply-quote { background: rgba(255,255,255,.1); }
.reply-quote strong { display: block; font-size: 10.5px; color: #9a6f12; }
.bubble.mine .reply-quote strong { color: var(--gold-2); }
.reply-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .85; }

/* زر الخيارات بجانب الفقاعة: يظهر عند المرور على الحاسوب، وخافتاً على الهاتف (والضغطة المطوّلة تفتح القائمة) */
.bubble-more { position: absolute; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0; }
.bubble-more svg { width: 14px; height: 14px; fill: currentColor; }
.bubble.mine .bubble-more { inset-inline-start: -30px; }
.bubble.theirs .bubble-more { inset-inline-end: -30px; }
.bubble:hover .bubble-more, .bubble-more:focus-visible, .bubble.is-picked .bubble-more { opacity: 1; }
@media (pointer: coarse) { .bubble-more { opacity: .35; width: 22px; height: 22px; } }

/* القائمة العائمة واللوحة السفلية */
.msg-menu { position: fixed; z-index: 130; min-width: 168px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(20,18,15,.18); display: grid; gap: 2px; }
.msg-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: start; }
.msg-menu button span { width: 18px; text-align: center; opacity: .75; }
.msg-menu button:hover, .msg-menu button:focus-visible { background: var(--paper); outline: none; }
.msg-menu button.is-danger { color: var(--bad); }
.msg-menu.is-sheet { inset: auto 0 0 0; min-width: 0; border-radius: 18px 18px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); animation: sheetup .18s ease; }
.msg-menu.is-sheet::before { content: ""; justify-self: center; width: 38px; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 6px; }
.msg-menu.is-sheet button { padding: 13px 14px; font-size: 15px; }
@keyframes sheetup { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.msg-menu-backdrop { position: fixed; inset: 0; z-index: 129; background: rgba(20,18,15,.35); }

/* خانة الكتابة وشريط الرد أو التعديل */
.chat-form { display: grid; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-form .textarea { flex: 1; min-height: 40px; height: 40px; max-height: 132px; resize: none; border-radius: 20px; padding: 9px 14px; font-size: 13px; line-height: 1.5; }
@supports (-webkit-touch-callout: none) { .chat-form .textarea { font-size: 16px; } } /* آيفون يكبّر الصفحة إن كان الخط أصغر من 16 */
.chat-send { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-send:disabled { opacity: .5; }
.chat-send .icon { width: 18px; height: 18px; }
.chat-form.is-editing .chat-send { background: var(--gold); color: var(--ink); }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--paper); border-inline-start: 3px solid var(--gold); }
.composer-bar[hidden] { display: none; }
.composer-bar-icon { font-size: 14px; color: #9a6f12; }
.composer-bar-text { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.45; }
.composer-bar-text strong { display: block; font-size: 11px; color: #9a6f12; }
.composer-bar-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.composer-bar-close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.chat-pane > .chat-form p { font-size: 12px; }

/* النزول لآخر رسالة */
.chat-jump { position: absolute; inset-inline-start: 14px; bottom: 76px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  box-shadow: 0 6px 16px rgba(20,18,15,.14); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.chat-jump[hidden] { display: none; }
.chat-jump svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .chat { height: auto; }
  .chat:not(.has-active) .chat-pane { display: none; }
  .chat:not(.has-active) .chat-list { max-height: none; border-bottom: 0; }
  .chat .chat-body { height: auto; min-height: 0; }
  .chat-back { display: inline-grid; }
  .chat-body .bubble { max-width: 84%; }
  .bubble.mine .bubble-more { inset-inline-start: -27px; }
  .bubble.theirs .bubble-more { inset-inline-end: -27px; }
  .chat-body { padding-inline: 34px; }

  /* محادثة مفتوحة على الهاتف: تملأ الشاشة تحت الترويسة، والصفحة خلفها لا تتحرك */
  html:has(body.chat-open), body.chat-open { overflow: hidden; overscroll-behavior: none; }
  body.chat-open .side-nav, body.chat-open .messages-head, body.chat-open .site-footer { display: none; }
  body.chat-open .chat.has-active { position: fixed; z-index: 40; top: calc(var(--header-h) + 1px); inset-inline: 0; bottom: var(--kb, 0px);
    height: auto; border: 0; border-radius: 0; grid-template-columns: 1fr; }
  body.chat-open .chat.has-active .chat-list { display: none; }
  body.chat-open .chat.has-active .chat-pane { height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
  body.chat-open .chat-form { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* الرئيسية: زر واضح للانتقال إلى كل العطور */
.more-products { display: grid; justify-items: center; gap: 8px; margin-top: 30px; text-align: center; }
.more-products .btn { min-width: 260px; justify-content: center; }

/* الإدارة: انتماء العضو لشجرة يظهر بلون اسمه وعلامته */
.member-name { display: inline-flex; align-items: center; gap: 5px; }
.member-name .icon { width: 14px; height: 14px; flex: none; }
.member-name.is-root { color: #8a5a00; }
.member-name.is-root .icon { color: var(--gold); }
.member-name.is-team { color: #1f6b4f; }
.member-name.is-solo { color: #7d776c; font-weight: 500; }
.tree-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -6px 0 12px; }
.tree-legend .member-name { font-weight: 600; }

/* ---------- 3.7.4: حكم الشكوى — ملخص صريح لاتجاه النقاط */
.decide-summary { padding: 10px 12px; border-radius: 10px; background: var(--gold-wash); color: var(--ink); font-weight: 600; border: 1px solid var(--gold); }
.card-alert { border: 1.5px solid var(--bad); box-shadow: 0 0 0 3px var(--bad-wash); }

/* ==========================================================================
   3.7.4: مراقبة المحادثات في الإدارة — بنفس تصميم المحادثة بين الأعضاء
   (خط 12px، فقاعات وتوقيت وعلامات قراءة ورد بالمقاس نفسه)، مع اسم المرسل أول كل دفعة،
   والمحذوف بإطار متقطع، والنص قبل التعديل، وإجراءات الرسالة في لوحة عائمة لا تُقص
   ========================================================================== */
.chat.chat-monitor { grid-template-columns: 1fr; height: clamp(480px, calc(100vh - var(--header-h) - 190px), 820px); }
.chat-monitor .chat-head { justify-content: space-between; }
.monitor-party { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.monitor-party strong { font-size: 13px; }
.monitor-party.is-mine { text-align: end; }
.monitor-sep { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #faf9f6; white-space: nowrap; }
.chat-monitor .chat-body { padding-inline: 40px; }
.chat-monitor .bubble .who { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.3; margin-bottom: 1px; color: #9a6f12; }
.chat-monitor .bubble.mine .who { color: var(--gold-2); }
.chat-monitor .bubble:not(.is-run) { margin-top: 6px; }
.chat-monitor .bubble.is-trashed { opacity: .78; background: #fff !important; color: var(--ink) !important; border: 1px dashed var(--bad) !important; }
.chat-monitor .bubble.is-trashed .time { color: var(--muted); }
.chat-monitor .msg-original { margin-top: 4px; padding: 4px 8px; font-size: 11px; line-height: 1.5; border-radius: 8px; }
.chat-monitor .msg-flag { margin-top: 4px; font-size: 10px; padding: 1px 8px; }
.chat-monitor .monitor-more { color: var(--ink); text-decoration: none; font-weight: 600; }
.chat-monitor .monitor-more:hover { border-color: var(--gold); }
.chat-monitor .monitor-foot { display: block; }
.chat-monitor .monitor-foot p { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; }
/* زر الإجراءات بشكل زر خيارات رسالة العضو، خارج الفقاعة */
.chat-monitor .msg-actions { position: static; }
.chat-monitor .msg-actions > summary.bubble-more { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: auto; display: grid; place-items: center; padding: 0; font-weight: 400; }
.chat-monitor .bubble.mine .msg-actions > summary.bubble-more { inset-inline-start: -30px; }
.chat-monitor .bubble.theirs .msg-actions > summary.bubble-more { inset-inline-end: -30px; inset-inline-start: auto; }
.chat-monitor .msg-actions[open] > summary.bubble-more { opacity: 1; background: var(--ink); color: #fff; border-color: var(--ink); }
/* اللوحة عائمة فوق الصفحة (لا تقصّها حدود المحادثة) */
.chat-monitor .msg-actions[open] > .msg-actions-panel { position: fixed; z-index: 80; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow-y: auto; font-size: 13px; }
.chat-monitor .msg-actions[open]::before { content: ''; position: fixed; inset: 0; z-index: 79; background: rgba(20, 18, 15, .32); }
.msg-actions-title { margin: 0; font-size: 12px; color: var(--muted); }
.msg-actions-title strong { color: var(--ink); }
@media (hover: none) { .chat-monitor .bubble-more { opacity: .9; } }
@media (max-width: 900px) {
  .chat.chat-monitor { height: calc(100svh - var(--header-h) - 120px); min-height: 420px; }
  .chat-monitor .chat-body { padding-inline: 34px; }
  .chat-monitor .chat-head { padding: 8px 10px; }
  .chat-monitor .chat-head .avatar { width: 28px; height: 28px; }
  .chat-monitor .monitor-party .tiny { display: none !important; }
}
.decide-summary.is-move { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }

/* ---------- 3.8: سوق النقاط — تحذير المشتري وانتهاء مدة الصفقة */
.p2p-warn { margin: 0; }
.timer-box.is-over { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }
.rating-chip { font-weight: 700; color: var(--ok); }
.rating-chip.is-low { color: var(--bad); }
.rating-card .rating-big { font-size: 2rem; color: var(--ok); }
.rating-card.is-low { border-color: var(--bad); }
.rating-card.is-low .rating-big { color: var(--bad); }
/* ---------- 3.8: مفتاح خيارين (بالدينار / بالنقاط) */
.seg { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 999px; background: #faf9f6; width: fit-content; }
.seg label { position: relative; padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--gold); }
/* ---------- 3.8: عروض الفاتورة في صفحة الدفع */
.promo-row { color: var(--ok); }
.promo-code { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.promo-code .input { height: 38px; text-transform: uppercase; }
/* ---------- 3.8: إدارة عروض الفاتورة */
.preset-row { display: flex; flex-wrap: wrap; gap: 10px; }
.preset { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); max-width: 240px; }
.preset:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.preset strong { font-size: 13px; }
.teaser-chip { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold-wash); color: #5e4708; font-size: 11px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.pick-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; }
.pick-fieldset legend, .pick-fieldset summary { font-weight: 600; font-size: 13px; padding: 0 4px; cursor: pointer; }

/* ==========================================================================
   3.8: صندوق الكنز — زر عائم يغري بالفتح، ونص قصير من عروض الفاتورة
   ========================================================================== */
.treasure { position: fixed; z-index: 60; left: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); }
.treasure-btn { position: relative; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #2a1f12, #120c06); box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 3px rgba(255,214,106,.45);
  animation: treasure-bob 3.2s ease-in-out infinite; transition: transform .2s; }
.treasure-btn:hover, .treasure-btn:focus-visible { transform: scale(1.08) rotate(-4deg); animation-play-state: paused; outline: none; box-shadow: 0 10px 28px rgba(0,0,0,.32), 0 0 0 4px rgba(255,214,106,.8); }
.treasure-svg { width: 50px; height: 50px; margin-top: 4px; }
.treasure-glow { animation: treasure-glow 2.4s ease-in-out infinite; transform-origin: 32px 28px; }
.treasure-sparkles { animation: treasure-twinkle 1.8s ease-in-out infinite; }
.treasure-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #e0393e; border: 2px solid #fff; }
.treasure-pop { position: absolute; left: 0; bottom: 74px; width: max-content; max-width: min(300px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(160deg, #1f1710, #0f0b07); color: #ffe7a8; box-shadow: 0 14px 40px rgba(0,0,0,.35); border: 1px solid rgba(255,214,106,.4);
  animation: treasure-pop .22s ease-out; }
.treasure-pop::after { content: ''; position: absolute; left: 24px; bottom: -7px; width: 14px; height: 14px; background: #0f0b07; border-right: 1px solid rgba(255,214,106,.4); border-bottom: 1px solid rgba(255,214,106,.4); transform: rotate(45deg); }
.treasure-pop p { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.55; }
.treasure-pop p + p { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,214,106,.25); }
body.chat-open .treasure { display: none; }
@keyframes treasure-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes treasure-glow { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes treasure-twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes treasure-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .treasure-btn, .treasure-glow, .treasure-sparkles, .treasure-pop { animation: none; } }
@media (max-width: 640px) { .treasure { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); } .treasure-btn { width: 54px; height: 54px; } .treasure-svg { width: 44px; height: 44px; } }
/* ---------- 3.8: إضافات العطر (البخاخ، التغليف، الحقيبة، التركيز) */
.addon-picker { display: grid; gap: 12px; margin: 4px 0 14px; }
.addon-group { border: 0; padding: 0; margin: 0; }
.addon-group legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.addon-options { display: flex; flex-wrap: wrap; gap: 8px; }
.addon-option { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-size: 13.5px; }
.addon-option input { position: absolute; opacity: 0; pointer-events: none; }
.addon-option:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(0,0,0,.06); background: #fbf8f1; }
.addon-option:has(input:focus-visible) { outline: 2px solid var(--gold); }
.addon-price { color: var(--muted); font-size: 12px; }
.addon-option:has(input:checked) .addon-price { color: var(--gold-deep, #9a6f12); font-weight: 700; }
.item-options { display: block; font-size: 12px; color: var(--muted); }
/* ---------- 3.8: المستودع والإنتاج */
.inv-tabs { flex-wrap: wrap; }
.mat-cell { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.mat-cell img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.table tr.is-low td { background: var(--bad-wash); }
.addon-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) 90px minmax(160px, 1.6fr) 80px 80px 44px 44px auto; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.addon-row .input { height: 36px; }
.addon-row.is-new { background: #faf9f6; }
.is-off { opacity: .7; }
.calc-out .table td { font-size: 13px; }
@media (max-width: 900px) { .addon-row { grid-template-columns: 1fr 1fr; } }
.addon-head { font-size: 12px; color: var(--muted); font-weight: 600; background: #faf9f6; }
@media (max-width: 900px) { .addon-head { display: none; } }
.pack-components { margin-top: 4px; }
.pack-components summary { cursor: pointer; }
.comp-rows { display: grid; gap: 6px; margin-top: 8px; }
.comp-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; margin-top: 8px; }
.comp-row .input { height: 38px; }
.cost-pack { border-top: 1px solid var(--line); padding: 8px 0; }
.cost-pack summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-size: 14px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.export-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.export-item:has(input:checked) { border-color: var(--ink); background: #fbf8f1; }

/* ---------- 3.10: صفحة الإنتاج — صفوف العبوات */
.prod-packs { display: grid; gap: 12px; }
.prod-pack { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; background: #fcfbf8; }
.prod-pack .chip input { margin: 0 0 0 4px; }
.prod-pack [data-row-cost] { font-weight: 600; }
@media (min-width: 1100px) { .prod-grid { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); } }
.prod-grid > aside { position: sticky; top: calc(var(--header-h, 64px) + 12px); }

/* ==========================================================================
   3.12: شريط الأخبار — أسفل رأس الموقع، ناعم ومتناسق على كل الشاشات.
   الحركة بـ JS (requestAnimationFrame): بالعربية من اليسار إلى اليمين، وبالإنجليزية العكس.
   ========================================================================== */
.news-ticker { background: linear-gradient(180deg, #1d1a15, #17140f); color: #efe6d2; border-bottom: 1px solid rgba(226, 178, 58, .22); position: relative; z-index: 40; }
.news-ticker-inner { display: flex; align-items: center; gap: 12px; height: 40px; }
.news-ticker-label { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px; border-radius: 999px;
  background: linear-gradient(135deg, #f3d27a, #c99a2e); color: #1b160d; font-size: 12px; font-weight: 800; letter-spacing: .2px; box-shadow: 0 2px 8px rgba(201, 154, 46, .25); }
.news-ticker-pulse { width: 7px; height: 7px; border-radius: 50%; background: #8a1c12; box-shadow: 0 0 0 0 rgba(138, 28, 18, .5); animation: tickerPulse 1.8s ease-out infinite; }
@keyframes tickerPulse { 0% { box-shadow: 0 0 0 0 rgba(138, 28, 18, .55); } 70% { box-shadow: 0 0 0 7px rgba(138, 28, 18, 0); } 100% { box-shadow: 0 0 0 0 rgba(138, 28, 18, 0); } }
.news-ticker-view { flex: 1; min-width: 0; overflow: hidden; position: relative; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.news-ticker-track { display: flex; width: max-content; height: 100%; align-items: center; will-change: transform; }
.news-ticker-list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; flex: none; }
.news-ticker-list li { display: inline-flex; align-items: center; white-space: nowrap; font-size: 13.5px; line-height: 1; padding-inline-end: 44px; }
.news-ticker-list li::after { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: #c99a2e; border-radius: 1px; margin-inline-start: 44px; opacity: .85; }
.news-ticker-list a, .news-ticker-list span { color: inherit; text-decoration: none; }
.news-ticker-list a:hover, .news-ticker-list a:focus-visible { color: #f3d27a; text-decoration: underline; text-underline-offset: 3px; }
.news-ticker-pause { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(239, 230, 210, .22); background: transparent; color: #efe6d2; cursor: pointer; padding: 0; opacity: .7; transition: opacity .2s, background .2s; }
.news-ticker-pause:hover, .news-ticker-pause:focus-visible { opacity: 1; background: rgba(255, 255, 255, .08); }
.news-ticker-pause svg { width: 12px; height: 12px; fill: currentColor; }
.news-ticker-pause .i-play, .news-ticker.is-paused .news-ticker-pause .i-pause { display: none; }
.news-ticker.is-paused .news-ticker-pause .i-play { display: block; }
/* قبل تشغيل JS أو لمن يفضّل تقليل الحركة: الأخبار ثابتة وتُمرَّر باليد */
.news-ticker.is-static .news-ticker-view { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
.news-ticker.is-static .news-ticker-view::-webkit-scrollbar { display: none; }
.news-ticker.is-static .news-ticker-pause { display: none; }
@media (max-width: 760px) {
  .news-ticker-inner { height: 34px; gap: 8px; }
  .news-ticker-label { height: 22px; padding: 0 9px; font-size: 11px; }
  .news-ticker-list li { font-size: 12.5px; padding-inline-end: 32px; }
  .news-ticker-list li::after { margin-inline-start: 32px; width: 5px; height: 5px; }
  .news-ticker-pause { width: 24px; height: 24px; }
}
body.chat-open .news-ticker { display: none; }
@media print { .news-ticker { display: none; } }

/* 3.12 استيراد المواد الخام من Excel */
.import-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.import-rules { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: .88rem; color: var(--ink-2, #4a4a4a); }
.import-confirm { border-color: #ecd28a; background: linear-gradient(180deg, var(--gold-wash), #fff 70%); }
.import-confirm-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.import-confirm-form .field { flex: 1 1 180px; margin: 0; }
.import-confirm-form .btn { flex: 0 0 auto; }
.import-table td { vertical-align: top; }
.import-notes { min-width: 220px; }
.import-notes p + p { margin-top: 2px !important; }
.import-notes .icon-sm { vertical-align: -2px; color: var(--ok); }
@media (max-width: 860px) {
  .import-grid { grid-template-columns: 1fr; }
  .import-confirm-form .btn { flex: 1 1 100%; }
}

/* 3.13 المسابقات */
.crumbs-dark { color: #a9a091; }
.crumbs-dark a:hover { color: #fff; }
.comp-hero { padding-block: 32px 36px; }
.comp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.comp-desc { margin-top: 10px; color: #c9c1b1; max-width: 640px; line-height: 1.8; }
.comp-prize-card {
  display: grid; justify-items: center; text-align: center; gap: 2px; min-width: 200px; padding: 18px 26px; border-radius: 20px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(243, 207, 107, .22), rgba(226, 178, 58, .06) 60%), rgba(255, 255, 255, .03);
  border: 1px solid rgba(226, 178, 58, .45); box-shadow: 0 10px 40px -18px rgba(226, 178, 58, .6);
}
.comp-prize-card .icon { width: 34px; height: 34px; color: var(--gold); }
.comp-prize-card small { color: #a9a091; font-size: .8rem; }
.comp-prize-card strong { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--gold-2); line-height: 1.15; }
.comp-prize-card span { color: #c9c1b1; font-size: .8rem; max-width: 220px; }
.comp-body { padding-block: 24px 48px; display: grid; gap: 16px; }
.comp-body > .alert { margin: 0; }
.comp-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.comp-h { font-size: 1.15rem; margin: 0; }
.comp-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.comp-rules li { display: flex; gap: 10px; align-items: flex-start; }
.comp-rules .icon { flex: none; width: 18px; height: 18px; color: var(--gold-deep); margin-top: 3px; }
.comp-metric { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: .88rem; }
.comp-metric p { margin: 4px 0 0; color: var(--muted); line-height: 1.7; }
.comp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.comp-checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #fbeeee; color: #7a2b2b; font-size: .88rem; }
.comp-checks li.ok { background: #ecf5ef; color: var(--ok); }
.comp-checks .icon { width: 18px; height: 18px; }
.comp-me { display: flex; gap: 12px; align-items: center; }
.comp-me > .icon { width: 30px; height: 30px; color: var(--ok); flex: none; }
.comp-me strong { display: block; }
.comp-me span { color: var(--muted); font-size: .88rem; }
.comp-board { list-style: none; margin: 0; padding: 6px 10px 12px; }
.comp-entry { display: grid; grid-template-columns: 34px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; }
.comp-entry + .comp-entry { border-top: 1px solid var(--line); }
.comp-entry.is-me { background: var(--gold-wash); border-color: transparent; }
.comp-entry.is-me + .comp-entry { border-top-color: transparent; }
.comp-rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; color: var(--muted); background: var(--paper); font-size: .88rem; }
.comp-entry.top-1 .comp-rank { background: linear-gradient(135deg, #f3cf6b, #c9962a); color: #2a1f05; }
.comp-entry.top-2 .comp-rank { background: linear-gradient(135deg, #e7e7e7, #a9a9a9); color: #222; }
.comp-entry.top-3 .comp-rank { background: linear-gradient(135deg, #e3b38a, #a66a3c); color: #2a1405; }
.comp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.comp-score { white-space: nowrap; }
.comp-score strong { font-size: 1.05rem; }
.comp-score small { color: var(--muted); }
.comp-winner { display: flex; gap: 16px; align-items: center; position: relative; overflow: hidden; border-color: #ecd28a; background: linear-gradient(120deg, var(--gold-wash), #fff 70%); }
.comp-winner-icon { position: absolute; inset-inline-end: 18px; width: 72px; height: 72px; color: rgba(201, 150, 42, .22); }
.comp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.comp-card { display: grid; gap: 8px; padding: 18px; border-radius: var(--r-l, 18px); background: #fff; border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.comp-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.comp-card.is-live { border-color: #ecd28a; box-shadow: 0 8px 30px -20px rgba(201, 150, 42, .7); }
.comp-card-title { font-size: 1.1rem; }
.comp-card-prize { color: var(--gold-deep); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.comp-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border-radius: 20px;
  background: radial-gradient(140% 160% at 100% 0%, rgba(226, 178, 58, .25), transparent 55%), var(--ink); color: #e9e2d2;
  border: 1px solid rgba(226, 178, 58, .35); transition: transform .2s, box-shadow .2s;
}
.comp-banner:hover { transform: translateY(-1px); box-shadow: 0 14px 40px -22px rgba(226, 178, 58, .8); }
.comp-banner-gap { margin-bottom: 20px; }
.comp-banner-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(226, 178, 58, .15); color: var(--gold); }
.comp-banner-icon .icon { width: 28px; height: 28px; }
.comp-banner-text { display: grid; gap: 2px; min-width: 0; }
.comp-banner-text small { color: var(--gold-2); font-weight: 600; font-size: .8rem; }
.comp-banner-text strong { color: #fff; font-size: 1.1rem; }
.comp-banner-text span { color: #bfb6a5; font-size: .85rem; }
.nav-live { position: relative; }
.nav-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(226, 178, 58, .25); }
.comp-admin-next { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.comp-admin-next.is-awaiting { border-color: #ecd28a; background: var(--gold-wash); }
.comp-dq[open] summary { margin-bottom: 0; }
.comp-dq .input-sm { min-height: 32px; padding: 4px 10px; font-size: .85rem; width: 160px; }
@media (max-width: 900px) {
  .comp-grid { grid-template-columns: 1fr; }
  .comp-hero-grid { grid-template-columns: 1fr; }
  .comp-prize-card { justify-self: start; }
}
@media (max-width: 560px) {
  .comp-banner { grid-template-columns: auto minmax(0, 1fr); }
  .comp-banner-btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .comp-entry { grid-template-columns: 30px 32px minmax(0, 1fr) auto; gap: 8px; padding: 9px 6px; }
}

/* 3.13 ترويسة الهاتف: «دخول» يصير أيقونة، فلا يخرج «حساب جديد» عن الشاشة بالإنجليزية */
.header-login-icon { display: none; }
@media (max-width: 560px) {
  .header-inner { gap: 8px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand img { max-width: 100%; }
  .header-actions { margin-inline-start: auto; min-width: 0; }
  .header-actions .header-login-text { display: none; }
  .header-actions .header-login-icon { display: inline-grid; }
  .header-actions .header-register { padding-inline: 12px; white-space: nowrap; }
}
@media (max-width: 380px) {
  .header-inner .brand img { height: 36px; }
  .header-actions .header-icon { width: 38px; height: 38px; }
}
@media (max-width: 350px) {
  .header-inner { gap: 4px; }
  .header-actions { gap: 2px; }
  .header-actions .header-register { padding-inline: 9px; font-size: .76rem; }
  .header-actions .lang-switch { padding-inline: 6px; }
  .header-inner .brand img { height: 32px; }
}
/* روابط القائمة لا تنكسر على سطرين (بالإنجليزية خصوصاً مع رابط المسابقات وشارة النقاط) */
.main-nav > a, .main-nav > .dropdown > button { white-space: nowrap; }
@media (max-width: 1440px) {
  .header-inner { gap: 16px; }
  .main-nav > a, .main-nav > .dropdown > button { padding-inline: 9px; }
}
@media (max-width: 1240px) { .main-nav > .nav-live { display: none; } }
/* الشاشات المتوسطة: الروابط الثانوية تبقى في «كل الصفحات» حتى لا تخرج الترويسة عن عرض الشاشة */
@media (min-width: 901px) and (max-width: 1200px) { .main-nav > .nav-opt-1 { display: none; } }
@media (min-width: 901px) and (max-width: 1040px) { .main-nav > .nav-opt-2 { display: none; } }

/* 3.14 رسالة «هل دعاك أحد؟»: زر × للإغلاق النهائي */
.sponsor-card { position: relative; }
.sponsor-close { position: absolute; top: 10px; inset-inline-end: 10px; margin: 0; }
.sponsor-close-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.sponsor-close-btn:hover, .sponsor-close-btn:focus-visible { background: #fff; border-color: var(--line); color: var(--ink); }
.sponsor-close-btn .icon { width: 16px; height: 16px; }
.sponsor-card .grow > h2 { padding-inline-end: 34px; }
.comp-goal { display: block; margin-top: 4px; font-size: .82rem; color: var(--ink); }
.comp-me .vote-bar { display: block; margin-top: 6px; max-width: 220px; }
.comp-goal-ok { width: 15px; height: 15px; color: var(--ok); vertical-align: -2px; margin-inline-end: 4px; }
.comp-me > div { flex: 1; min-width: 0; }

/* 3.14 الاشتراكات */
.sub-hero { padding-block: 34px; }
.sub-hero p { color: #c9c1b1; max-width: 640px; margin-top: 8px; }
.sub-status { display: inline-flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.sub-status.is-on { border-color: rgba(226, 178, 58, .5); background: rgba(226, 178, 58, .1); }
.sub-status > .icon { width: 24px; height: 24px; color: var(--gold); flex: none; }
.sub-status strong { display: block; color: #fff; }
.sub-status span { color: #c9c1b1; font-size: .88rem; }
.sub-body { padding-block: 24px 48px; display: grid; gap: 18px; }
.sub-body > .alert { margin: 0; }
.sub-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.sub-plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.sub-plan.is-featured { border: 2px solid var(--gold); box-shadow: 0 18px 50px -30px rgba(201, 150, 42, .9); }
.sub-flag { position: absolute; top: -12px; inset-inline-start: 18px; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: #2a1f05; font-size: .75rem; font-weight: 700; }
.sub-plan h2 { font-size: 1.1rem; margin: 0; }
.sub-duration { margin: 0; color: var(--muted); font-size: .9rem; }
.sub-price { margin: 8px 0 0; }
.sub-price strong { font-size: 2rem; line-height: 1.1; }
.sub-price span { color: var(--muted); }
.sub-per { margin: 0; font-size: .82rem; color: var(--gold-deep); }
.sub-features { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.sub-features li { display: flex; gap: 8px; align-items: flex-start; }
.sub-features .icon { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 3px; }
.sub-cta { margin-top: auto; padding-top: 14px; }
.sub-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 20px; padding: 14px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: border-color .2s; }
.sub-card:hover { border-color: var(--gold); }
.sub-card.is-on { border-color: #bfe0c9; background: linear-gradient(0deg, #fff, #f1f8f3); }
.sub-card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gold-wash); color: var(--gold-deep); }
.sub-card.is-on .sub-card-icon { background: #e3f1e7; color: var(--ok); }
.sub-card-text strong { display: block; }
.sub-card-text span { color: var(--muted); font-size: .88rem; }
.sub-switch { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sub-switch.is-on { border-color: #bfe0c9; background: #f4faf6; }
.sub-search .input { width: 220px; min-height: 36px; padding-block: 6px; }
.sub-search .btn { flex: none; }
.input-sm { min-height: 34px; padding-block: 5px; font-size: .88rem; }
.sub-benefits { padding: 20px 22px; border-radius: 20px; background: var(--gold-wash); border: 1px solid #ecd28a; display: grid; gap: 12px; justify-items: start; }
.sub-benefits h2 { font-size: 1.1rem; margin: 0; }
.sub-benefits ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); width: 100%; }
.sub-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.sub-benefit-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--gold-deep); flex: none; }
.sub-benefit-icon .icon { width: 18px; height: 18px; }

/* 3.16 حارس الربح */
.profit-alert { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: #fdf1ee; border: 1px solid #f0c4b8; color: #6b2a1d; }
.profit-alert-title { margin: 0; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.profit-alert-title .icon { width: 18px; height: 18px; }
.profit-alert ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: .86rem; }
.profit-accept { background: #fff; padding: 8px 10px; border-radius: 10px; border: 1px solid #f0c4b8; }
.profit-ok { color: var(--ok); }
.profit-bad { color: var(--bad); }
.profit-table td { vertical-align: top; }
.profit-assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.profit-assume div { padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.profit-assume dt { font-size: .78rem; color: var(--muted); }
.profit-assume dd { margin: 2px 0 0; font-weight: 600; }

/* 3.17 تصحيح سعر بند في فاتورة مشتريات */
.correct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .correct-stats { grid-template-columns: minmax(0, 1fr); } }

/* 3.18 مكافأة الدخول اليومي، وأشرطة التقدم، والمهام الأسبوعية */
.daily-card { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #3a2f17 0%, var(--ink) 55%); color: #fff; border-radius: var(--r-l); padding: 20px 22px; }
.daily-card::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 178, 58, .22), transparent 70%); pointer-events: none; }
.daily-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.daily-head .grow { flex: 1 1 240px; min-width: 0; }
.daily-flame { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, var(--gold-2), var(--gold)); color: var(--ink); flex: none; }
.daily-flame .icon { width: 26px; height: 26px; }
.daily-title { font-family: var(--display); font-size: 1.5rem; margin: 2px 0; color: #fff; }
.daily-sub { color: #cfc6b4; margin: 0; }
.daily-btn { box-shadow: 0 0 0 0 rgba(226, 178, 58, .5); animation: daily-pulse 2.4s ease-out infinite; }
@keyframes daily-pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 178, 58, .45); } 70% { box-shadow: 0 0 0 12px rgba(226, 178, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 178, 58, 0); } }
@media (prefers-reduced-motion: reduce) { .daily-btn { animation: none; } }
.daily-done { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(47, 122, 79, .22); color: #bfe8cd; font-weight: 600; font-size: .9rem; }
.daily-days { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; position: relative; z-index: 1; }
.daily-day { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #cfc6b4; text-align: center; }
.daily-day .d { font-size: .72rem; }
.daily-day .p { font-weight: 700; color: #fff; font-size: 1rem; }
.daily-day.is-done { background: rgba(226, 178, 58, .16); border-color: rgba(226, 178, 58, .45); color: var(--gold-2); }
.daily-day.is-done .p { color: var(--gold-2); }
.daily-day.is-today, .daily-day.is-tomorrow { border-color: var(--gold); background: rgba(226, 178, 58, .1); }
.daily-day.is-today { box-shadow: 0 0 0 2px rgba(226, 178, 58, .35); }
.daily-day:last-child .p::after { content: " ★"; color: var(--gold-2); }

.nudges { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.nudge { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--text); text-decoration: none; transition: box-shadow .15s; }
.nudge:hover { box-shadow: var(--shadow); }
.nudge-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-wash); color: var(--gold-deep); flex: none; }
.nudge-competition .nudge-icon { background: #fde9df; color: #b0472a; }
.nudge-missions .nudge-icon { background: var(--info-wash); color: var(--info); }
.nudge-body { display: grid; gap: 5px; flex: 1; min-width: 0; }
.nudge-body strong { font-size: .92rem; }
.nudge-bar { display: block; height: 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.nudge-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .6s ease; }
.nudge-pct { font-weight: 700; color: var(--gold-deep); font-size: .9rem; flex: none; }

.missions { display: grid; gap: 10px; }
.mission { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.mission.is-done:not(.is-claimed) { border-color: var(--gold); background: var(--gold-wash); }
.mission.is-claimed { opacity: .75; }
.mission.is-claimed .nudge-bar i, .mission.is-done .nudge-bar i { background: var(--ok); }
.mission-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--gold-deep); flex: none; }
.mission-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.mission-progress { display: flex; align-items: center; gap: 10px; }
.mission-progress .nudge-bar { flex: 1; }
.mission-side { display: grid; justify-items: center; gap: 6px; flex: none; min-width: 72px; }
.mission-reward { font-weight: 700; color: var(--gold-deep); font-size: 1.05rem; }
@media (max-width: 560px) { .mission { flex-wrap: wrap; } .mission-side { grid-auto-flow: column; align-items: center; width: 100%; justify-content: space-between; } }

.perk-bar { display: block; height: 6px; border-radius: 999px; background: rgba(140, 106, 18, .15); overflow: hidden; margin-top: 6px; }
.perk-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold-deep); }
.daily-card .label-gold { color: var(--gold); font-size: .82rem; font-weight: 600; margin: 0; }
.daily-card + .nudges { margin-top: 12px; }
a.daily-teaser { display: block; text-decoration: none; }
a.daily-teaser:hover { box-shadow: var(--shadow); }
.mission.is-broken { opacity: .8; }
.mission.is-broken .nudge-bar i { background: var(--line-strong, #c9c2b4); }
.mission-broken { display: flex; align-items: center; gap: 6px; color: var(--bad, #b0472a); }

/* ---------- محرر موضع صورة العطر (لوحة الإدارة) */
dialog.framer { border: 0; border-radius: var(--r-l); padding: 0; width: min(96vw, 460px); max-height: 96vh; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
dialog.framer::backdrop { background: rgba(27, 24, 20, .6); }
.framer-box { padding: 18px; display: grid; gap: 12px; }
.framer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.framer-head h3 { font-family: var(--body); font-size: 1.1rem; }
.framer-help { margin: 0; }
.framer-stage { position: relative; width: min(100%, 300px, calc((96vh - 330px) * .8)); aspect-ratio: 4 / 5; margin-inline: auto; overflow: hidden; border-radius: var(--r-m);
  background: #fff; touch-action: none; cursor: grab; outline-offset: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.framer-stage:active { cursor: grabbing; }
.framer-stage img { position: absolute; max-width: none; height: auto; user-select: none; pointer-events: none; }
.framer-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.framer-guide rect { fill: none; stroke: rgba(27, 24, 20, .35); stroke-width: .4; stroke-dasharray: 1.5 1.5; vector-effect: non-scaling-stroke; }
.framer-guide circle { fill: none; stroke: #c9962b; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.framer-warn { margin: 0; font-size: .88rem; color: #2f7a4b; text-align: center; min-height: 1.4em; }
.framer-warn.is-bad { color: var(--danger, #b3261e); font-weight: 600; }
.framer-zoom { display: flex; align-items: center; gap: 10px; }
.framer-zoom input { flex: 1; accent-color: var(--gold, #c9962b); }
.framer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; }
.framer-bg { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.framer-bg input { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line, #ddd); border-radius: 6px; background: none; }
.framer-foot { display: flex; gap: 10px; justify-content: flex-end; }
.framer-edit { margin-top: 8px; }

/* ---------- 3.23: ورشة العطر */
.ws-still .daily-flame { background: linear-gradient(160deg, #e9d7a8, var(--gold)); }
.ws-still.is-brewing .daily-flame .icon { animation: ws-bubble 2.2s ease-in-out infinite; }
@keyframes ws-bubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
.ws-still.is-late .daily-title { color: #f3c9a8; }
.ws-still.is-done .daily-flame { background: rgba(255, 255, 255, .12); color: var(--gold-2); }
.ws-still-bar { position: relative; z-index: 1; height: 10px; margin-top: 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ws-still-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 1s linear; }
@media (prefers-reduced-motion: reduce) { .ws-still.is-brewing .daily-flame .icon { animation: none; } }

.card-head h2 .icon { width: 20px; height: 20px; vertical-align: -3px; color: var(--gold-deep); }
.ws-ship { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-m); background: var(--gold-wash); border: 1px solid var(--gold); margin-bottom: 14px; }
.ws-ship .grow { display: grid; gap: 3px; flex: 1; min-width: 0; }
.ws-ship-bonus { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--gold-deep); flex: none; }
.ws-ship.is-sailed { background: #e7f3ea; border-color: var(--ok); }
.ws-ship.is-sailed .ws-ship-bonus { color: var(--ok); }
.ws-ship.is-sailed .nudge-bar i { background: var(--ok); }
.ws-crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ws-crate { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-m); background: var(--surface); }
.ws-crate.is-done:not(.is-claimed) { border: 1px solid var(--gold); background: var(--gold-wash); }
.ws-crate.is-claimed { border-style: solid; border-color: var(--ok); background: #f3faf5; }
.ws-crate.is-claimed .nudge-bar i, .ws-crate.is-done .nudge-bar i { background: var(--ok); }
.ws-crate-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ws-team { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ws-team h3 { font-size: 1rem; display: flex; align-items: center; gap: 6px; }

.ws-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ws-card { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); position: relative; }
.ws-card::before { content: ""; position: absolute; top: -5px; inset-inline-start: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.ws-card-top { display: flex; align-items: center; justify-content: space-between; }
.ws-card-prize { font-weight: 700; color: var(--gold-deep); font-size: 1.1rem; }
.ws-card.is-coupon { background: repeating-linear-gradient(135deg, var(--surface) 0 12px, var(--gold-wash) 12px 24px); }
.ws-card.is-running { border-color: var(--info, #2f5f8a); }
.ws-card.is-ready { border-color: var(--gold); background: var(--gold-wash); box-shadow: 0 0 0 2px rgba(226, 178, 58, .3); }
.ws-card.is-completed, .ws-card.is-used { opacity: .75; }
.ws-card.is-expired { opacity: .55; }
.ws-card form, .ws-card .btn { justify-self: start; }
.ws-code { display: inline-block; justify-self: start; padding: 6px 12px; border: 2px dashed var(--gold-deep); border-radius: 8px; font-weight: 700; letter-spacing: .08em; background: var(--surface); }
.nudge-workshop { margin-top: 12px; }
.nudge-workshop .nudge-icon { background: linear-gradient(160deg, #f3e6c4, var(--gold-wash)); color: var(--gold-deep); }
@media (max-width: 560px) {
    .ws-crates, .ws-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ws-crate, .ws-card { padding: 12px 10px; }
    .ws-crate-foot { flex-wrap: wrap; }
    .ws-ship-bonus { font-size: 1.3rem; }
}

/* ---------- 3.24: تبويبات الورشة، والساعات المضاعفة، والمخزن، والكتالوج، والموسم، والدوري */
.ws-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 16px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.ws-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.ws-tabs a.is-active { background: var(--ink); color: #fff; }
.ws-tabs a:not(.is-active):hover { background: var(--paper); }
.boost-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r-m); color: #fff; text-decoration: none;
    background: linear-gradient(100deg, #b0472a, #d27a2c 55%, var(--gold)); box-shadow: 0 8px 24px -12px rgba(176, 71, 42, .7); }
.boost-banner .grow { display: grid; gap: 2px; flex: 1; min-width: 0; }
.boost-x { font-family: var(--display); font-size: 1.6rem; font-weight: 800; background: rgba(255, 255, 255, .18); border-radius: 12px; padding: 4px 12px; flex: none; }
.storage-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.storage-bar .grow { flex: 1; min-width: 0; display: grid; }
.storage-bar.is-full { border-color: var(--bad, #b0472a); background: #fdf1ec; }
.storage-bar.is-full .nudge-bar i { background: var(--bad, #b0472a); }
.ws-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ws-stamp { display: grid; justify-items: center; gap: 8px; padding: 16px 10px; border: 1px dashed var(--line); border-radius: var(--r-m); text-align: center; background: var(--surface); }
.ws-stamp-seal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.5rem; font-weight: 700;
    color: var(--line-strong, #c9c2b4); border: 2px dashed var(--line-strong, #c9c2b4); transform: rotate(-8deg); }
.ws-stamp.is-stamped .ws-stamp-seal { color: #fff; border: 3px double rgba(255, 255, 255, .7); background: radial-gradient(circle at 35% 30%, #c25a3a, #8f2f1d); box-shadow: 0 2px 6px rgba(143, 47, 29, .35); }
.ws-stamp.is-stamped:not(.is-claimed) { border: 1px solid var(--gold); background: var(--gold-wash); }
.spray-box { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border-radius: var(--r-m); background: var(--gold-wash); border: 1px solid var(--gold); flex-wrap: wrap; }
.spray-box .grow { flex: 1; min-width: 180px; }
.daily-shield { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--gold-2); font-size: .8rem; position: relative; z-index: 1; }

.season-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.season-tier-now { font-family: var(--display); font-size: 2.4rem; font-weight: 800; color: var(--gold-2); line-height: 1; }
.season-track { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.season-col { display: grid; grid-template-rows: auto 1fr auto 1fr; gap: 6px; scroll-snap-align: center; }
.season-num { text-align: center; font-weight: 700; font-size: .82rem; color: var(--muted, #8a8174); padding: 4px 0; border-radius: 999px; background: var(--paper); }
.season-col.is-reached .season-num { background: var(--gold); color: var(--ink); }
.season-col.is-next .season-num { background: var(--ink); color: #fff; }
.season-cell { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 10px 6px; min-height: 104px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; font-size: .85rem; }
.season-cell.gold { background: linear-gradient(170deg, #fff8e6, #f6e7bd); border-color: #e7cf8c; }
.season-cell.is-locked { opacity: .55; }
.season-cell.is-ready { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(226, 178, 58, .35); }
.season-cell.is-claimed { opacity: .6; }
.season-cell .amt { font-weight: 800; color: var(--gold-deep); font-size: 1rem; }
.season-lane { font-size: .72rem; font-weight: 700; color: var(--muted, #8a8174); align-self: end; }
.league-div { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.league-div.bronze { background: #f3e2d3; color: #8a4b22; }
.league-div.silver { background: #e9ecef; color: #4a5560; }
.league-div.gold { background: #fbefc9; color: #8a6712; }
.league-table td, .league-table th { padding: 8px 10px; }
.league-table tr.is-mine { background: var(--gold-wash); font-weight: 700; }
.league-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
@media (max-width: 560px) { .league-tasks, .ws-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ws-tabs a { padding: 7px 12px; } }
.ws-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.alert:not([class*="alert-"]) { background: var(--surface); border: 1px solid var(--line); }

/* ---------- 3.26: دورة المال */
.cash-cycle { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin: 4px 0 6px; }
.cash-box { padding: 18px; border-radius: var(--r-m); background: var(--ink); color: #fff; }
.cash-box .k { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--gold-2); margin: 0 0 6px; }
.cash-box .v { font-family: var(--display); font-size: 1.7rem; font-weight: 700; margin: 0; }
.cash-box .v small { font-size: .8rem; color: #cfc6b4; }
.cash-box .s { margin: 4px 0 0; font-size: .8rem; color: #cfc6b4; }
.cash-box.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.cash-box.ghost .k { color: var(--muted, #8a8174); }
.cash-box.is-bad { background: #7a2a1a; }
.cash-arrow { display: grid; justify-items: center; gap: 2px; font-size: .78rem; color: var(--muted, #8a8174); }
.cash-arrow b { font-size: .95rem; color: var(--text); }
.cash-arrow i { font-style: normal; font-size: 1.4rem; color: var(--gold-deep); line-height: 1; }
.cash-return { display: flex; align-items: center; gap: 6px; margin: 0 0 18px; }
.cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.table tr.is-total td { border-top: 2px solid var(--line); }
@media (max-width: 760px) { .cash-cycle { grid-template-columns: 1fr; } .cash-arrow i { transform: rotate(-90deg); } }
/* 3.27: توسعة المخزن */
.storage-expand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -8px 0 16px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r-m); background: var(--surface); }
.storage-expand > span { flex: 1; min-width: 200px; }
.storage-expand select { width: auto; }

/* 3.28: زهراء، خبيرة العطور */
.zahraa { position: relative; display: flex; align-items: flex-end; gap: 18px; margin: 0 0 22px; padding: 14px 20px 0; border: 1px solid var(--line); border-radius: var(--r-l, 18px); background: linear-gradient(135deg, #eef4ea, #f7efe2); overflow: hidden; }
.zahraa-pic img { display: block; height: 170px; width: auto; animation: zahraa-bob 3.2s ease-in-out infinite; }
.zahraa-body { flex: 1; padding-bottom: 16px; }
.zahraa-body h2 { font-size: 1.1rem; margin: 0 0 4px; }
.zahraa-body p { margin: 0 0 10px; line-height: 1.7; }
.zahraa.is-away .zahraa-pic img { opacity: .25; filter: grayscale(1); animation: zahraa-away 1.2s ease-in both; }
.zahraa.is-back .zahraa-pic img { animation: zahraa-back .9s ease-out both, zahraa-bob 3.2s 1s ease-in-out infinite; }
.zahraa-code { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 12px; border: 1.5px dashed #c9a65a; border-radius: 10px; background: #fff8e6; }
.zahraa-code strong { font-size: 1.15rem; letter-spacing: 1px; color: #6b3f2a; }
@keyframes zahraa-bob { 50% { transform: translateY(-4px); } }
@keyframes zahraa-away { from { opacity: 1; filter: none; transform: none; } to { opacity: .25; transform: translateX(-12px); } }
@keyframes zahraa-back { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
    .zahraa { gap: 12px; padding: 10px 12px 0; }
    .zahraa-pic img { height: 120px; }
    .zahraa-body h2 { font-size: 1rem; }
    .zahraa-body p { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .zahraa-pic img { animation: none !important; } }
.spend-row.is-paused td { background: #fff7e6; }
.spend-times { font-weight: 700; }
.spend-times.is-high { color: var(--bad); }
