/* =====================================================================
   مخزون — نظام التصميم
   الألوان كلها من brand.css (المكان الوحيد لتعريف الهوية). هنا فقط نربط كل دور بلون منها.
   الهوية: بنفسجي #261A66 (أساسي) + برتقالي #EF5F18 (التفاعل) + أبيض (الأساس). الواجهة فاتحة دائمًا.
   ===================================================================== */
:root {
  color-scheme: light;
  --font: "IBM Plex Sans Arabic", "Nunito Sans", "Rubik", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "IBM Plex Sans Arabic", "Rubik", -apple-system, "Segoe UI", system-ui, sans-serif;

  --bg: var(--mkz-white);
  --surface: var(--mkz-white);
  --surface-2: var(--mkz-purple-25);
  --elevated: var(--mkz-white);
  --fill: var(--mkz-purple-50);
  --fill-2: var(--mkz-purple-25);
  --bar: rgba(255, 255, 255, .94);
  --text: var(--mkz-ink);
  --heading: var(--mkz-purple);
  --label: var(--mkz-purple);
  --muted: var(--mkz-ink-2);
  --tertiary: var(--mkz-ink-3);
  --border: var(--mkz-line);
  --primary: var(--mkz-purple);          /* هوية: روابط، أيقونات، عناصر أساسية */
  --primary-600: var(--mkz-purple-900);
  --primary-50: var(--mkz-purple-50);
  --primary-border: var(--mkz-purple-200);
  --on-primary: var(--mkz-on-dark);
  --cta: var(--mkz-orange);              /* تفاعل: الأزرار الرئيسية */
  --cta-600: var(--mkz-orange-600);
  --cta-50: var(--mkz-orange-50);
  --on-cta: var(--mkz-on-dark);
  --secondary: var(--mkz-orange-300);
  --brand-dark: var(--mkz-purple);
  --accent: var(--mkz-orange);
  --orange: var(--mkz-orange);
  --accent-50: var(--mkz-warning-50);
  --amber-text: var(--mkz-warning);
  --danger: var(--mkz-danger);
  --danger-50: var(--mkz-danger-50);
  --success: var(--mkz-success);
  --success-50: var(--mkz-success-50);
  --info: var(--mkz-info);
  --info-50: var(--mkz-info-50);
  --purple: var(--mkz-purple);
  --purple-50: var(--mkz-purple-50);
  --switch-on: var(--mkz-orange);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: var(--mkz-shadow-sm);
  --shadow-md: var(--mkz-shadow-md);
  --shadow-lg: var(--mkz-shadow-lg);
  --shadow-xl: 0 20px 40px rgba(38, 26, 102, .2);
  --nav-h: 64px;
  /* منحنيات حركة: ease-out قوي للواجهة، ease-in-out للحركة على الشاشة، ومنحنى الأدراج */
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --press: 140ms;
  --spring: cubic-bezier(.32, .72, 0, 1);
  --fast: 150ms;
}* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--mkz-purple-25);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-feature-settings: "kern";
}
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { body { background: #0b0b0c; } }
html[lang="en"] body { letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.lg { width: 28px; height: 28px; }
[dir="ltr"] .flip { transform: scaleX(-1); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--primary-50); }

/* ---------- App shell ---------- */
.app { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 520px) { .app { box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(0, 0, 0, .08); } }
.app.has-nav { padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); }
.page { padding: 8px 16px 16px; }

/* شريط علوي شفاف مع عنوان كبير بأسلوب iOS */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--border);
}
.appbar h1 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
/* بدون زر رجوع: عنوان كبير */
.appbar:not(:has(> a.icon-btn:first-child)):not(:has(> button.icon-btn:first-child)) h1 { font-size: 30px; font-weight: 600; text-align: start; }
html[lang="en"] .appbar h1 { letter-spacing: -.02em; }
.appbar:has(> a.icon-btn:first-child) h1, .appbar:has(> button.icon-btn:first-child) h1 { padding-inline-end: 44px; }
.appbar:has(> a.icon-btn:first-child):has(> a.icon-btn:last-child:not(:first-child)) h1 { padding-inline-end: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--primary); display: inline-grid; place-items: center; flex-shrink: 0;
  transition: opacity .15s var(--ease), background .15s;
}
.icon-btn:active { opacity: .55; }
.icon-btn.ghost { background: transparent; }
.appbar .icon-btn:first-child { background: transparent; width: 44px; margin-inline-start: -10px; }
.appbar .icon-btn:first-child svg { width: 26px; height: 26px; stroke-width: 2.2; }

/* شريط التبويبات */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%); z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--tertiary); position: relative; transition: color .2s; }
.bottom-nav a svg { width: 26px; height: 26px; stroke-width: 1.7; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active svg { stroke-width: 2.1; }
.bottom-nav a:active { opacity: .6; }
.nav-badge {
  position: absolute; top: 6px; inset-inline-start: calc(50% + 4px);
  background: var(--mkz-orange); color: #fff; font-size: 11px; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 5px; font-weight: 600;
  box-shadow: 0 0 0 2px var(--bar);
}

/* ---------- Generic UI ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card, .section + .section { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 4px 10px; }
.section-title h2 { font-family: var(--font-display); font-size: 21px; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; }
html[lang="en"] .section-title h2 { letter-spacing: -.015em; }
.section-title a, .link { color: var(--primary); font-weight: 500; font-size: 15px; background: none; border: 0; padding: 0; }
.section-title a:active, .link:active { opacity: .5; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.xs { font-size: 13px; }
.bold { font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.hr { height: .5px; background: var(--border); margin: 14px 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 12px; border: 0;
  font-weight: 600; font-size: 17px; background: var(--primary); color: var(--on-primary);
  transition: opacity .15s var(--ease), transform .15s var(--ease), background .15s;
}
.btn:active { opacity: .75; transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.outline { background: var(--fill); color: var(--primary); }
.btn.soft { background: var(--primary-50); color: var(--primary); }
.btn.danger { background: var(--danger-50); color: var(--danger); }
.btn.accent { background: var(--accent); color: #1d1300; }
.btn.plain { background: transparent; color: var(--primary); min-height: 44px; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 999px; font-weight: 600; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

.field { display: block; }
.field + .field { margin-top: 16px; }
.field > span.label { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin: 0 4px 6px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin: 6px 4px 0; }
.field .err, .err { display: block; font-size: 13px; color: var(--danger); margin: 6px 4px 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 0;
  background: var(--surface); outline: none; font-size: 17px;
  box-shadow: inset 0 0 0 .5px var(--border);
  transition: box-shadow .2s var(--ease);
}
.card .input, .card select.input, .card textarea.input { background: var(--fill-2); box-shadow: none; }
textarea.input { min-height: 100px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--tertiary); }
.input:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.input.invalid { box-shadow: inset 0 0 0 2px var(--danger); }
select.input { appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; }
[dir="ltr"] select.input { background-position: right 14px center; }
.input-wrap { position: relative; }
.input-wrap .i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--tertiary); pointer-events: none; width: 20px; height: 20px; }
.input-wrap .input { padding-inline-start: 44px; }
.input[dir="ltr"] { text-align: right; }
[dir="ltr"] .input[dir="ltr"] { text-align: left; }
[dir="rtl"] .input-wrap .input[dir="ltr"] { padding-left: 16px; padding-right: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .field + .field { margin-top: 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; border: 0; background: var(--fill); padding: 0 14px; height: 34px; border-radius: 999px;
  font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text);
  transition: background .2s var(--ease), color .2s;
}
.chip:active { opacity: .6; }
.chip.active { background: var(--text); color: var(--bg); }
.chip .count { background: var(--fill); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; line-height: 20px; }
.chip.active .count { background: rgba(127, 127, 127, .3); }

/* التحكم المقسّم بأسلوب iOS */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: transparent; border-radius: 8px; height: 32px; font-weight: 500; color: var(--text); font-size: 14px; transition: background .2s var(--ease), box-shadow .2s; }
.segmented button.active { background: var(--elevated); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.badge svg { width: 13px; height: 13px; stroke-width: 2.2; }
.badge.green { background: var(--success-50); color: var(--success); }
.badge.teal { background: var(--primary-50); color: var(--primary); }
.badge.amber { background: var(--accent-50); color: var(--amber-text); }
.badge.blue { background: var(--info-50); color: var(--info); }
.badge.purple { background: var(--purple-50); color: var(--purple); }
.badge.red { background: var(--danger-50); color: var(--danger); }
.badge.gray { background: var(--fill); color: var(--muted); }

/* مفتاح التبديل بأسلوب iOS */
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--fill); border-radius: 999px; transition: background .25s var(--ease); }
@media all { .switch span { background: #e9e9ea; } }
.switch span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; background: #fff; border-radius: 50%; transition: transform .3s var(--spring); box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); }
.switch input:checked + span { background: var(--switch-on); }
.switch input:checked + span::after { transform: translateX(-20px); }
[dir="ltr"] .switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }

/* قوائم مجمّعة (Inset Grouped) */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 52px; width: 100%; border: 0; background: none; text-align: start; position: relative; font-size: 17px; color: var(--text); }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; inset-inline-start: 60px; inset-inline-end: 0; height: .5px; background: var(--border); }
button.list-item:active, a.list-item:active { background: var(--fill-2); }
.list-item .bold.small { font-weight: 400; font-size: 17px; }
.list-item > svg.i.sm { color: var(--tertiary); width: 16px; height: 16px; stroke-width: 2.4; }
.list-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary); color: #fff; flex-shrink: 0; }
.list-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.list-icon.red { background: var(--mkz-orange); color: #fff; }
.list-icon.amber { background: #ff9500; color: #fff; }
.list-icon.blue { background: #007aff; color: #fff; }
.list-icon.purple { background: #af52de; color: #fff; }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .list-icon { color: #fff; } .list-icon:not(.red):not(.amber):not(.blue):not(.purple) { background: var(--mkz-purple); } }
.list-item .badge.gray { background: transparent; color: var(--muted); font-weight: 400; font-size: 15px; padding: 0; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .i { width: 52px; height: 52px; color: var(--tertiary); margin: 0 auto 12px; display: block; stroke-width: 1.4; }
.empty b { display: block; color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 4px; }

/* ---------- Auth / Onboarding ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.onb { flex: 1; display: flex; flex-direction: column; padding: calc(56px + env(safe-area-inset-top)) 28px 24px; position: relative; }
.onb .lang-toggle { position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 16px; }
.app-icon {
  width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px;
  background: linear-gradient(160deg, #19b48c 0%, #0a7d61 55%, #075a46 100%);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 18px 40px rgba(10, 125, 97, .35);
}
.app-icon svg { width: 54px; height: 54px; stroke-width: 1.6; }
.onb h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; margin: 0; text-align: center; line-height: 1.15; }
html[lang="en"] .onb h1 { letter-spacing: -.025em; }
.onb .lead { text-align: center; color: var(--muted); font-size: 17px; margin: 8px auto 0; max-width: 320px; }
.features { margin: 40px auto 0; display: grid; gap: 26px; max-width: 360px; width: 100%; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .f-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.feature .f-ic svg { width: 24px; height: 24px; stroke-width: 1.9; }
.feature b { display: block; font-size: 17px; font-weight: 600; }
.feature span { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.welcome-actions { padding: 16px 24px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.lang-toggle { background: var(--fill); color: var(--primary); border: 0; border-radius: 999px; height: 32px; padding: 0 14px; font-weight: 600; font-size: 14px; z-index: 2; }
.lang-toggle:active { opacity: .55; }

.auth-page { padding: 8px 20px 32px; }
.auth-head { margin: 4px 4px 24px; }
.auth-head h2 { font-family: var(--font-display); font-size: 30px; margin: 0 0 4px; font-weight: 600; }
html[lang="en"] .auth-head h2 { letter-spacing: -.02em; }
.auth-head p { margin: 0; font-size: 17px; }
.steps { display: flex; gap: 6px; margin: 4px 4px 22px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--fill); transition: background .3s; }
.steps span.on { background: var(--primary); }
.role-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); border: 0;
  background: var(--surface); width: 100%; text-align: start; box-shadow: inset 0 0 0 1px var(--border);
  transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.role-card:active { transform: scale(.985); }
.role-card + .role-card { margin-top: 12px; }
.role-card.active { box-shadow: inset 0 0 0 2px var(--primary); }
.role-card .list-icon { width: 48px; height: 48px; border-radius: 12px; }
.role-card .list-icon svg { width: 26px; height: 26px; }
.role-card h3 { margin: 0 0 2px; font-size: 17px; font-weight: 600; }
.role-card ul { margin: 8px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.upload-box {
  border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--border); position: relative; transition: box-shadow .2s, background .2s; color: var(--primary);
}
.upload-box .muted, .upload-box .xs { color: var(--muted); }
.upload-box .bold { color: var(--text); }
.upload-box:active { background: var(--fill-2); }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box.done { box-shadow: inset 0 0 0 2px var(--success); color: var(--success); background: var(--success-50); }
.otp { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.otp input { width: 58px; height: 64px; text-align: center; font-size: 28px; font-weight: 600; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.otp input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.demo-box { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; font-size: 15px; box-shadow: inset 0 0 0 1px var(--border); }
.spinner { width: 44px; height: 44px; border: 3.5px solid var(--fill); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.verify-steps { text-align: start; margin: 28px auto 0; max-width: 300px; background: var(--surface); border-radius: var(--radius); padding: 6px 16px; }
.verify-steps div { display: flex; align-items: center; gap: 12px; min-height: 46px; color: var(--muted); font-weight: 500; }
.verify-steps div + div { border-top: .5px solid var(--border); }
.verify-steps div.done { color: var(--text); }
.verify-steps .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); }
.verify-steps div.done .dot { background: var(--switch-on); color: #fff; }

/* ---------- Profile header (cover + photo) ---------- */
.phead { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.phead-cover { position: relative; aspect-ratio: 3 / 1; background-size: cover; background-position: center; }
.phead-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18)); pointer-events: none; }
.phead-cover-actions { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; gap: 8px; z-index: 1; }
.phead-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; }
.phead-btn.icon-only { width: 34px; padding: 0; justify-content: center; }
.phead-btn:active { opacity: .6; }
.phead-btn input, .phead-cam input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.phead-body { position: relative; padding: 0 16px 16px; }
.phead-avatar { position: relative; width: 88px; margin-top: -44px; }
.avatar.xl { width: 88px; height: 88px; font-size: 34px; box-shadow: 0 0 0 4px var(--surface); }
.phead-cam { position: absolute; bottom: 0; inset-inline-end: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface); cursor: pointer; }
.phead-cam:active { opacity: .7; }
.phead-cam svg { width: 16px; height: 16px; stroke-width: 2.2; }
.phead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.phead-action { padding-bottom: 4px; }
.phead-info { margin-top: 10px; }
.phead-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.25; }
html[lang="en"] .phead-name { letter-spacing: -.015em; }

.store-logo { border-radius: 24px; }
.store-logo img { object-fit: cover; }

/* ---------- Focus card (one big number) + mini stats — patterns from open-design mobile-app ---------- */
.num { font-variant-numeric: tabular-nums; }
.focus { display: block; position: relative; overflow: hidden; background: #1d1d1f; color: #f5f5f7; border-radius: 22px; padding: 18px 18px 14px; transition: transform .2s var(--ease); }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .focus { background: #2a2a2c; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.08); } }
.focus:active { transform: scale(.98); }
.focus-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.focus-label { font-size: 14px; font-weight: 500; color: rgba(245, 245, 247, .72); }
.focus-delta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 20px; }
.focus-delta.up { background: rgba(48, 209, 88, .18); color: #30d158; }
.focus-delta.down { background: rgba(255, 69, 58, .2); color: #ff6961; }
.focus-num { font-family: var(--font-display); font-size: clamp(32px, 10.5vw, 44px); font-weight: 600; line-height: 1.08; margin-top: 8px; white-space: nowrap; }
html[lang="en"] .focus-num { letter-spacing: -.025em; }
.focus-sub { font-size: 12px; color: rgba(245, 245, 247, .55); margin-top: 4px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; margin-top: 14px; }
.spark i { flex: 1; border-radius: 3px; background: rgba(245, 245, 247, .2); transition: height 300ms var(--ease-out); }
.spark i.today { background: #3dd6a5; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.mini { display: block; background: var(--surface); border-radius: 16px; padding: 12px 12px 10px; box-shadow: var(--shadow); min-height: 64px; min-width: 0; transition: transform .15s var(--ease); }
a.mini:active { transform: scale(.96); }
.mini-num { font-family: var(--font-display); font-size: clamp(15px, 4.6vw, 19px); font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-num small { font-size: 12px; color: var(--muted); font-weight: 500; }
.mini-label { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mkz-orange); margin-inline-start: 6px; vertical-align: middle; }
.mini-grid.in-head { margin-top: 14px; }
.mini-grid.in-head .mini { background: var(--fill-2); box-shadow: none; text-align: center; min-height: 0; padding: 10px 6px; }
.page > .focus:first-child { margin-top: 4px; }
.mini-grid + .quick { margin-top: 10px; }

[hidden] { display: none !important; }

/* ---------- خانة المنتجات المعروضة (أسماء فقط) ---------- */
.shown-list { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.shown-list::-webkit-scrollbar { display: none; }
.shown-item { flex: 0 0 auto; width: 132px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.shown-item:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .shown-item:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-border); } }
.shown-item .thumb { width: 100%; aspect-ratio: 1; border-radius: 12px; }
.shown-item .thumb .emoji { font-size: 2.2rem; }
.shown-name { font-size: 13px; font-weight: 600; color: var(--heading); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.shown-price { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--primary); }

/* ---------- شريط الإعلانات (carousel) ---------- */
.ad-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); overscroll-behavior-x: contain; }
.ad-track::-webkit-scrollbar { display: none; }
.ad-track > .ad-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.ad-img { background: var(--fill); }
.ad-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.ad-sponsored { position: absolute; bottom: 10px; inset-inline-end: 10px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ad-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.ad-dot { width: 7px; height: 7px; border-radius: 4px; border: 0; padding: 0; background: var(--primary-border); transition: width 200ms var(--ease-out), background-color 200ms var(--ease-out); position: relative; }
.ad-dot::after { content: ""; position: absolute; inset: -10px -4px; } /* مساحة لمس أكبر */
.ad-dot.on { width: 20px; background: var(--primary); }
/* صفحة إدارة الإعلانات */
.ad-pick { position: relative; aspect-ratio: 2048 / 768; border-radius: 14px; overflow: hidden; border: 2px dashed var(--primary-border); background: var(--fill-2); display: grid; place-items: center; }
.ad-pick img { width: 100%; height: 100%; object-fit: cover; }
.ad-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ad-pick-empty { display: grid; justify-items: center; gap: 4px; color: var(--primary); text-align: center; }
.ad-pick-empty b { color: var(--heading); }
.ad-row { min-height: 72px; }
.ad-row::before { inset-inline-start: 96px !important; }
.ad-thumb { width: 72px; height: 38px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--fill); }

/* ---------- Ad banner (retro room) ---------- */.ad { position: relative; margin: 4px 0 18px; container-type: inline-size; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.ad.ad-out { opacity: 0; transform: scale(.96); }
.ad-card { position: relative; display: block; aspect-ratio: 2048 / 768; border-radius: 28px; overflow: hidden; color: #fff; isolation: isolate;
  box-shadow: 0 14px 30px -14px rgba(23, 79, 73, .55); transition: transform .2s var(--ease); }
.ad-card:active { transform: scale(.98); }
.ad-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
.ad-stitch { position: absolute; inset: 7px; border: 2px dashed rgba(246, 239, 225, .55); border-radius: 22px; pointer-events: none; }
.ad-text { position: absolute; top: 0; bottom: 0; right: 4cqw; width: 54%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; text-align: center; }
.ad-tag { display: inline-block; font-weight: 700; font-size: clamp(9px, 3.3cqw, 15px); padding: .5cqw 2.6cqw; border-radius: 6px; line-height: 1.6; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.ad-tag-1 { background: var(--mkz-purple); color: #fff; transform: rotate(-5deg); border: 1.5px solid rgba(246, 239, 225, .5); }
.ad-tag-2 { background: var(--mkz-orange); color: #fff; transform: rotate(3deg); }
.ad-title { font-family: "Lalezar", var(--font-display); font-weight: 400; font-size: clamp(15px, 7.2cqw, 36px); line-height: 1.25;
  background: linear-gradient(180deg, #f39a4a, #e0661f); color: #fff; padding: 1.2cqw 3.6cqw 1.6cqw; border-radius: 12px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .55), 0 6px 0 #a8461a, 0 10px 18px rgba(0, 0, 0, .25); text-shadow: 0 2px 0 rgba(120, 45, 10, .45); white-space: nowrap; }
html[lang="en"] .ad-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.ad-cta { margin-top: .8cqw; font-weight: 700; font-size: clamp(11px, 3.4cqw, 15px); background: #fff; color: var(--mkz-purple); padding: .9cqw 3.4cqw; border-radius: 999px; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); }
.ad-brand { position: absolute; bottom: 4.5cqw; left: 4.5cqw; height: max(24px, 7.5cqw); line-height: max(24px, 7.5cqw); padding: 0 2.4cqw; border-radius: 2.4cqw; background: rgba(255, 255, 255, .94); color: var(--mkz-purple); display: block; white-space: nowrap; font-family: "Noto Kufi Arabic", "Rubik", Tahoma, sans-serif; font-weight: 900; font-size: max(11px, 3.4cqw); direction: rtl; }
.ad-brand b { color: var(--mkz-orange); font-weight: 900; }
.ad-close { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 2; }
.ad-close::after { content: ""; position: absolute; inset: -8px; } /* مساحة لمس أكبر */
.ad-close:active { opacity: .6; }
/* لا حركة مستمرة في شاشة تُفتح عشرات المرات يوميًا (قاعدة التكرار) */
.ad-box { transform-box: fill-box; }

@keyframes adBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes adGlow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

/* ---------- Home ---------- */
.hello { padding: 6px 4px 4px; }
.hello .eyebrow-date { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.hello h2 { font-family: var(--font-display); margin: 2px 0 2px; font-size: 30px; font-weight: 700; line-height: 1.2; }
html[lang="en"] .hello h2 { letter-spacing: -.022em; }
.hello p { margin: 0; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hello .badge { background: var(--primary-50); color: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; transition: transform .15s var(--ease); }
a.stat:active { transform: scale(.97); }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .label svg { width: 16px; height: 16px; color: var(--tertiary); }
.stat .value { font-family: var(--font-display); font-size: clamp(19px, 5.6vw, 26px); font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="en"] .stat .value { letter-spacing: -.02em; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat.hl { background: var(--surface); }
.stat.hl .label svg { color: var(--tertiary); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.quick a, .quick button { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; text-align: center; transition: transform .15s var(--ease); }
.quick a:active, .quick button:active { transform: scale(.96); }
.quick .list-icon { width: 44px; height: 44px; border-radius: 12px; }
.quick .list-icon svg { width: 24px; height: 24px; }

.search-bar { position: relative; margin-top: 14px; }
.search-bar .i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 10px; color: var(--muted); width: 18px; height: 18px; stroke-width: 2.2; }
.search-bar input { width: 100%; height: 38px; border-radius: 11px; border: 0; background: var(--fill); padding-inline-start: 36px; padding-inline-end: 12px; font-size: 17px; outline: none; }
.search-bar input::placeholder { color: var(--muted); }
.search-bar input:focus { box-shadow: 0 0 0 2px var(--primary-50); }

.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .2s var(--ease); }
.pcard:active { transform: scale(.97); }
.pcard .thumb { aspect-ratio: 1 / 1; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pcard .name { font-weight: 500; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard .price { font-weight: 600; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.pcard .tag { position: absolute; top: 10px; inset-inline-start: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pcard .tag.badge.green { background: rgba(255, 255, 255, .85); color: var(--success); }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .pcard .tag.badge.green { background: rgba(0, 0, 0, .55); } }
.thumb { background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .emoji { font-size: 3.4rem; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .14)); }

.prow { display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s var(--ease); }
.prow:active { transform: scale(.985); }
.prow + .prow { margin-top: 10px; }
.prow .thumb { width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0; }
.prow .thumb .emoji { font-size: 2rem; }
.prow > svg.i.sm { color: var(--tertiary); width: 16px; height: 16px; stroke-width: 2.4; }

.supplier-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s var(--ease); }
.supplier-card:active { transform: scale(.985); }
.supplier-card + .supplier-card { margin-top: 10px; }
.supplier-card > svg.i.sm { color: var(--tertiary); width: 16px; height: 16px; stroke-width: 2.4; }
.avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 20px; color: #fff; flex-shrink: 0; overflow: hidden; background-image: linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, .12)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stars { color: var(--amber-text); display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 13px; }
.stars svg { width: 13px; height: 13px; fill: #ff9f0a; stroke: none; }

/* ---------- Product detail ---------- */
.hero-img { aspect-ratio: 4 / 3; max-height: 420px; width: 100%; border-radius: 0; }
.hero-img .emoji { font-size: 7rem; }
.price-big { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--fill-2); border-radius: 14px; overflow: hidden; }
.kv div { padding: 12px 8px; text-align: center; position: relative; }
.kv div + div::before { content: ""; position: absolute; top: 14px; bottom: 14px; inset-inline-start: 0; width: .5px; background: var(--border); }
.kv b { display: block; font-size: 17px; font-weight: 600; }
.kv span { font-size: 12px; color: var(--muted); }
.profit-box { background: var(--success-50); color: var(--success); border-radius: 12px; padding: 12px 16px; display: flex; justify-content: space-between; font-weight: 600; margin-top: 12px; font-size: 15px; }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--border); z-index: 5; margin-top: 16px; }
.has-nav .sticky-cta { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: 12px; }
.img-picker { display: flex; gap: 14px; align-items: center; }
.img-picker .thumb { width: 96px; height: 96px; border-radius: 20px; position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 1.5px var(--border); color: var(--primary); }
.img-picker .thumb input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Store builder ---------- */
.store-preview { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.sp-head { padding: 18px; color: #fff; display: flex; gap: 12px; align-items: center; }
.sp-logo { width: 54px; height: 54px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; overflow: hidden; flex-shrink: 0; }
.sp-logo img { width: 100%; height: 100%; object-fit: cover; }
.sp-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.sp-items .thumb { aspect-ratio: 1; border-radius: 12px; }
.sp-items .thumb .emoji { font-size: 1.6rem; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; background: var(--fill-2); border-radius: 12px; margin: 0 12px 12px; direction: ltr; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tpl { border: 0; border-radius: 16px; padding: 8px 8px 10px; background: var(--surface); text-align: center; font-weight: 500; font-size: 13px; box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .2s var(--ease), transform .15s var(--ease); color: var(--text); }
.tpl:active { transform: scale(.96); }
.tpl.active { box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary); font-weight: 600; }
.tpl .mini { height: 78px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; padding: 6px; display: grid; gap: 4px; overflow: hidden; }
.tpl .mini i { display: block; border-radius: 4px; background: var(--fill); }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s var(--ease); }
.swatch:active { transform: scale(.9); }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch-custom { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; overflow: hidden; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); }
.order-item { display: flex; gap: 10px; align-items: center; padding: 8px 4px; }
.order-item + .order-item { border-top: .5px solid var(--border); }
.order-item .thumb { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.order-item .thumb .emoji { font-size: 1.4rem; }
.mini-btn { width: 34px; height: 34px; border-radius: 999px; border: 0; background: var(--fill); display: grid; place-items: center; color: var(--primary); transition: opacity .15s; }
.mini-btn:active { opacity: .5; }
.mini-btn:disabled { opacity: .3; }
.mini-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; }
.toggle-row + .toggle-row { border-top: .5px solid var(--border); }
.toggle-row .bold.small { font-weight: 400; font-size: 17px; }

/* ---------- Orders ---------- */
.ocard { display: block; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; transition: transform .15s var(--ease); }
.ocard:active { transform: scale(.985); }
.ocard + .ocard { margin-top: 12px; }
.ocard .thumb { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.ocard .thumb .emoji { font-size: 1.5rem; }
.ocard .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 12px; font-size: 14px; }
.ocard .meta div { display: flex; align-items: center; gap: 6px; color: var(--muted); min-width: 0; }
.ocard .meta div span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ocard .meta svg { width: 15px; height: 15px; color: var(--tertiary); }
.ocard .foot { display: flex; justify-content: space-between; align-items: center; border-top: .5px solid var(--border); margin-top: 12px; padding-top: 10px; }
.timeline { position: relative; }
.tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ""; position: absolute; top: 30px; bottom: 2px; inset-inline-start: 13px; width: 2px; border-radius: 2px; background: var(--fill); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--primary); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--fill); color: var(--tertiary); display: grid; place-items: center; flex-shrink: 0; z-index: 1; }
.tl-dot svg { width: 15px; height: 15px; stroke-width: 2.2; }
.tl-step.done .tl-dot { background: var(--primary); color: var(--on-primary); }
.tl-step.current .tl-dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-50); }
.tl-step.cancel .tl-dot { background: var(--mkz-orange); color: #fff; }
.tl-step b { display: block; font-size: 15px; font-weight: 600; }
.tl-step .xs { color: var(--muted); }
.items-table .it { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.items-table .it + .it { border-top: .5px solid var(--border); }
.items-table .thumb { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.items-table .thumb .emoji { font-size: 1.4rem; }
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; }
.sum-row.total { font-weight: 700; font-size: 17px; border-top: .5px solid var(--border); margin-top: 6px; padding-top: 12px; }

/* ---------- Profits ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 18px; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 30px; border-radius: 7px; background: var(--primary); opacity: .35; min-height: 4px; position: relative; transition: height 300ms var(--ease-out); }
.chart .bar.today { opacity: 1; }
.chart .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-bottom: 4px; }
.chart .day { font-size: 12px; color: var(--muted); font-weight: 500; }
.best .rank { width: 26px; height: 26px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; color: var(--muted); }
.best .rank.r1 { background: #ff9f0a; color: #fff; }
.best .thumb { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.best .thumb .emoji { font-size: 1.3rem; }
.progress { height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }


/* =====================================================================
   ثيم Bento Marketplace (ui-ux-pro-max): بطاقات Bento بزوايا 20px وظل خفيف،
   مكوّنات Flat بألوان صلبة، حالات إشارة مرور، وتفاعلات 150ms
   ===================================================================== */
body { font-weight: 400; color: var(--text); }
.bold, b, strong { font-weight: 600; }
.num, .price, .price-big, .stat .value, .focus-num, .mini-num, .kv b, .sum-row, .pcard .price { font-variant-numeric: tabular-nums; }
.appbar h1, .section-title h2, .phead-name, .auth-head h2, .onb h1, .hello h2, .sf-sec, .focus-num, .mini-num, .stat .value, .price-big, .role-card h3, .feature b { font-family: var(--font-display); color: var(--heading); }
.appbar h1 { font-weight: 600; }
.appbar:not(:has(> a.icon-btn:first-child)):not(:has(> button.icon-btn:first-child)) h1 { font-size: 28px; font-weight: 700; }
.section-title h2 { font-size: 20px; font-weight: 600; }
.onb h1 { font-weight: 700; }
.field > span.label { color: var(--label); font-weight: 600; font-size: 13px; }

/* بطاقات Bento */
.card, .list, .pcard, .prow, .ocard, .stat, .mini, .supplier-card, .phead, .store-preview, .quick a, .quick button, .demo-box, .verify-steps, .tpl { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.role-card { border-radius: var(--radius); border: 2px solid var(--border); box-shadow: none; }
.role-card.active { border-color: var(--primary); background: var(--primary-50); }
.upload-box { border-radius: var(--radius); border: 2px dashed var(--primary-border); box-shadow: none; }
.upload-box.done { border: 2px solid var(--success); }
/* تفاعل: رفع البطاقة 1.02 خلال 150–200ms */
.pcard, .prow, .ocard, .supplier-card, a.stat, a.mini, .quick a, .tpl, .focus { transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color var(--fast); }
@media (hover: hover) and (pointer: fine) { .pcard:hover, .prow:hover, .ocard:hover, .supplier-card:hover, a.mini:hover, .quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-border); } }
.pcard:active, .prow:active, .ocard:active, .supplier-card:active, a.mini:active, .quick a:active, .focus:active { transform: scale(.98); }

/* أزرار Flat: ألوان صلبة بدون ظل، وتغيّر اللون عند الضغط */
.btn { border-radius: 14px; font-weight: 600; font-family: var(--font-display); box-shadow: none; transition: background var(--fast), transform var(--fast); }
.btn:active { transform: scale(.98); opacity: 1; background: var(--primary-600); }
.btn.outline { background: var(--surface); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary-border); }
.btn.soft { background: var(--primary-50); color: var(--primary); }
.btn.danger { background: var(--danger-50); color: var(--danger); box-shadow: none; }
.btn.accent, .btn.success { background: var(--accent); color: #fff; }
.btn.sm { border-radius: 10px; font-weight: 600; }
.icon-btn, .mini-btn { border-radius: 12px; background: var(--primary-50); color: var(--primary); box-shadow: none; }
.appbar .icon-btn:first-child { background: transparent; }
.lang-toggle { border-radius: 10px; background: var(--primary-50); color: var(--primary); box-shadow: none; font-weight: 600; }

/* حقول */
.input, select.input, textarea.input, .card .input, .card select.input, .card textarea.input { border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
.input:focus { box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 4px var(--primary-50); }
.search-bar input { border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); height: 46px; }
.search-bar input:focus { box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 4px var(--primary-50); }
.otp input { border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--border); }

/* شرائح وتحكم مقسّم */
.chip { border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); font-weight: 600; height: 36px; color: var(--heading); }
.chip.active { background: var(--primary); color: #fff; box-shadow: none; }
.segmented { background: var(--fill); border-radius: 14px; padding: 4px; }
.segmented button { border-radius: 10px; font-weight: 600; height: 40px; color: var(--muted); }
.segmented button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-md); }

/* شارات: إشارة مرور للحالات */
.badge { border-radius: 999px; font-weight: 700; font-size: 12px; padding: 2px 10px; box-shadow: none; }
.badge.green { background: var(--success-50); color: var(--success); }
.badge.amber { background: var(--accent-50); color: var(--amber-text); }
.badge.red { background: var(--danger-50); color: var(--danger); }
.badge.teal, .badge.purple { background: var(--primary-50); color: var(--primary); }
.badge.blue { background: var(--info-50); color: var(--info); }
.badge.gray { background: var(--fill); color: var(--muted); box-shadow: none; }

/* قوائم وأيقونات بألوان التصنيفات */
.list-icon, .list-icon:not(.red):not(.amber):not(.blue):not(.purple) { border-radius: 10px; background: var(--primary-50); color: var(--primary); }
.list-icon.red { background: var(--danger-50); color: var(--danger); }
.list-icon.amber { background: var(--accent-50); color: var(--amber-text); }
.list-icon.blue { background: var(--info-50); color: var(--info); }
.list-icon.purple { background: var(--purple-50); color: var(--purple); }
.list-item .bold.small, .toggle-row .bold.small { font-weight: 500; }
.switch span { background: var(--fill) !important; }
.switch input:checked + span { background: var(--switch-on) !important; }

/* أشرطة */
.bottom-nav { border-top: 1px solid var(--border); }
.bottom-nav a { color: var(--tertiary); font-weight: 600; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active::after { content: ""; position: absolute; bottom: calc(6px + env(safe-area-inset-bottom)); width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.appbar { border-bottom: 1px solid var(--border); }

/* بلاطة Bento الكبيرة (مبيعات الشهر): بنفسجي داكن صلب */
.focus { background: var(--brand-dark); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 0; }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .focus { background: #15233a; } }
.focus-label { color: rgba(255, 255, 255, .78); font-weight: 600; }
.focus-delta { border-radius: 999px; font-weight: 700; box-shadow: none; }
.focus-delta.up { background: rgba(74, 222, 128, .2); color: #86efac; }
.focus-delta.down { background: rgba(248, 113, 113, .22); color: #fca5a5; }
.focus-num { color: #fff; font-weight: 700; }
.spark i { border-radius: 4px; background: rgba(196, 181, 253, .35); }
.spark i.today { background: #4ade80; }
/* بلاطات صغيرة بألوان التصنيفات */
.mini-grid { gap: 12px; margin-top: 12px; }
.mini { border-radius: 18px; padding: 14px 12px 12px; }
.mini-num { font-weight: 700; color: var(--heading); font-size: clamp(13px, 4vw, 19px); }
.mini-grid:not(.in-head) .mini:nth-child(1) { background: var(--success-50); border-color: transparent; }
.mini-grid:not(.in-head) .mini:nth-child(1) .mini-num { color: var(--success); }
.mini-grid:not(.in-head) .mini:nth-child(2) { background: var(--primary-50); border-color: transparent; }
.mini-grid:not(.in-head) .mini:nth-child(2) .mini-num { color: var(--primary); }
.mini-grid:not(.in-head) .mini:nth-child(3) { background: var(--accent-50); border-color: transparent; }
.mini-grid:not(.in-head) .mini:nth-child(3) .mini-num { color: var(--amber-text); }
.mini-dot { background: var(--danger); }
.quick { gap: 12px; margin-top: 12px; }
.quick a, .quick button { border-radius: 18px; }
.quick .list-icon { border-radius: 14px; }

/* أخرى */
.phead { border-radius: var(--radius); }
.phead-btn { border-radius: 10px; }
.phead-cam { border-radius: 50%; background: var(--primary); }
.avatar.xl { border-radius: 24px; }
.ad-card { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.ad-stitch { border-radius: 14px; }
.ad-close { border-radius: 10px; }
.tpl.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.tpl .mini { border: 0; box-shadow: none; border-radius: 10px; }
.thumb, .prow .thumb, .order-item .thumb, .items-table .thumb, .ocard .thumb, .best .thumb, .sp-items .thumb, .img-picker .thumb { border-radius: 14px; }
.pcard .thumb { border-radius: 0; }
.pcard .price { color: var(--primary); font-family: var(--font-display); font-weight: 700; }
.kv { border-radius: 16px; background: var(--fill-2); box-shadow: none; }
.profit-box { border-radius: 14px; background: var(--success-50); color: var(--success); box-shadow: none; font-weight: 700; }
.toast { border-radius: 14px; background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-xl); font-weight: 600; }
.sheet { border-radius: 24px 24px 0 0; box-shadow: var(--shadow-xl); }
.chart .bar { border-radius: 8px 8px 4px 4px; background: var(--secondary); opacity: .55; }
.chart .bar.today { background: var(--primary); opacity: 1; }
.tl-step.done .tl-dot { background: var(--accent); color: #fff; }
.tl-step.done::before { background: var(--accent); }
.tl-step.current .tl-dot { background: var(--primary); box-shadow: 0 0 0 5px var(--primary-50); }
.best .rank { border-radius: 10px; }
.best .rank.r1 { background: var(--primary); color: #fff; }
.progress i { background: var(--primary); }
.empty .i { color: var(--secondary); }
/* علامات الثقة للموردين (من قواعد Marketplace) */
.badge.teal svg, .badge.green svg { stroke-width: 2.6; }

/* الترحيب */
.app-icon { border-radius: 24px; background: var(--primary); box-shadow: var(--shadow-lg); }
.app-icon::after { content: none; }
.feature .f-ic { border-radius: 14px; }
.steps span { border-radius: 4px; }
.store-preview .link-box { margin-top: 12px; }
html.embed body { background: #fff; }
html.embed .toast { top: auto; bottom: 16px; }
.success-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--success-50); color: var(--success); display: grid; place-items: center; margin: 10px auto 16px; }
.success-icon svg { width: 44px; height: 44px; stroke-width: 2.5; }

/* ---------- Toast & sheet ---------- */
.toast {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -16px) scale(.96);
  background: var(--elevated); color: var(--text); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16), 0 0 0 .5px var(--border);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .35s var(--spring); z-index: 100; max-width: min(90vw, 420px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s var(--ease); }
.modal[hidden] { display: none; }
.sheet { background: var(--elevated); width: min(480px, 100%); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); animation: up 400ms var(--ease-drawer); max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; }
.sheet::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; text-align: center; }
.sheet p { text-align: center; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* تقليل الحركة: نُبقي الشفافية والألوان، ونلغي الحركة والتكبير (الأقل والألطف، لا الصفر) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, box-shadow !important; }
  .route-enter, .route-enter > * { transform: none !important; }
}

/* =====================================================================
   إحساس التطبيق الأصلي على الجوال (mobile-native) + قواعد الحركة (emil-design-eng)
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; }
/* لا تكبير تلقائي في iOS عند لمس الحقول */
input, textarea, select { font-size: max(16px, 1em); }
/* إزالة تأخير اللمس، ومنع تحديد النص وقائمة الضغط المطوّل على عناصر التحكم فقط */
a, button, label, summary, [role="button"], [data-act], input[type="checkbox"], input[type="radio"], input[type="file"] { touch-action: manipulation; }
button, .btn, .chip, .bottom-nav, .segmented, .icon-btn, .mini-btn, .tpl, .swatch, .phead-btn, .phead-cam, .ad-close, .lang-toggle, .rail-item, .coll-card, .quick a { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* المتمرّرات الداخلية تحتفظ بحركتها ولا تحرّك الصفحة خلفها */
.chips, .rail-items, .sf-nav, .sheet { overscroll-behavior: contain; }

/* ضغط الأزرار: 0.97 خلال 140ms بمنحنى ease-out، ويظهر لحظة الضغط */
.btn, .icon-btn, .mini-btn, .chip, .phead-btn, .lang-toggle, .segmented button, .ad-close, .swatch, .qty button {
  transition-property: transform, background-color, color, box-shadow, opacity; transition-duration: var(--press); transition-timing-function: var(--ease-out); }
.btn:active, .icon-btn:active, .mini-btn:active, .chip:active, .phead-btn:active, .lang-toggle:active, .ad-close:active, .qty button:active { transform: scale(.97); }
.pcard, .prow, .ocard, .supplier-card, a.stat, a.mini, .quick a, .tpl, .focus, .role-card, .coll-card, .ad-card {
  transition-property: transform, box-shadow, border-color; transition-duration: 200ms; transition-timing-function: var(--ease-out); }
.pcard:active, .prow:active, .ocard:active, .supplier-card:active, a.mini:active, .quick a:active, .focus:active, .ad-card:active, .role-card:active { transform: scale(.98); transition-duration: var(--press); }
.list-item { transition: background-color var(--press) var(--ease-out); }

/* دخول الشاشة عند تغيير الصفحة فقط: شفافية + إزاحة 6px خلال 220ms، وتتابع 40ms للعناصر */
@keyframes routeIn { from { opacity: 0; transform: translateY(6px); } }
.route-enter > .page > *, .route-enter > header + * > * { animation: routeIn 220ms var(--ease-out) both; }
.route-enter > .page > *:nth-child(2) { animation-delay: 40ms; }
.route-enter > .page > *:nth-child(3) { animation-delay: 80ms; }
.route-enter > .page > *:nth-child(4) { animation-delay: 120ms; }
.route-enter > .page > *:nth-child(n+5) { animation-delay: 160ms; }

/* النوافذ السفلية: دخول 400ms بمنحنى الأدراج، وخروج أسرع 200ms */
.modal.closing { animation: fadeOut 200ms var(--ease-out) forwards; }
.modal.closing .sheet { animation: down 200ms var(--ease-out) forwards; }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fadeOut { to { opacity: 0; } }
/* التنبيه: انتقالات (لا keyframes) لتكون قابلة للمقاطعة */
.toast { transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }

/* بلاطة "مبيعات الشهر" بحجم مدمج (طلب المستخدم: أصغر) */
.focus { padding: 12px 14px 10px; border-radius: 18px; }
.focus-top { gap: 6px; }
.focus-label { font-size: 12px; }
.focus-delta { font-size: 11px; padding: 1px 7px; line-height: 18px; }
.focus-num { font-size: clamp(22px, 6.6vw, 28px); margin-top: 4px; line-height: 1.1; }
.focus-sub { font-size: 11px; margin-top: 2px; }
.spark { height: 22px; margin-top: 8px; gap: 3px; }

.dc-list { display: grid; gap: 8px; margin-bottom: 10px; }
.dc-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; }
.dc-fee { width: 92px; flex: 0 0 92px; text-align: center; }
.dc-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dc-add .input.grow { flex: 1 1 140px; min-width: 0; }

/* ===== صور المنتج المتعددة ===== */
.pimg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pimg { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg, #faf5ff); box-shadow: inset 0 0 0 1.5px var(--border); }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg.main { box-shadow: 0 0 0 2px var(--primary); }
.pimg-badge { position: absolute; bottom: 6px; inset-inline-start: 6px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pimg-main { position: absolute; bottom: 6px; inset-inline: 6px; border: 0; border-radius: 8px; padding: 4px 2px; font: inherit; font-size: .68rem; font-weight: 600; background: rgba(15,10,30,.62); color: #fff; cursor: pointer; }
.pimg-rm { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(15,10,30,.62); color: #fff; cursor: pointer; }
.pimg-rm .i { width: 14px; height: 14px; }
.pimg.add { display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--primary); cursor: pointer; border: 1.5px dashed var(--primary-border, var(--border)); box-shadow: none; text-align: center; padding: 6px; }
.pimg.add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gal { position: relative; min-width: 0; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 20px; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; }
.gal-track .hero-img { border-radius: 0; }
.gal-count { position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(15,10,30,.6); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; direction: ltr; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-th { flex: 0 0 60px; height: 60px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; opacity: .55; box-shadow: inset 0 0 0 1.5px var(--border); transition: opacity 160ms ease, box-shadow 160ms ease; }
.gal-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-th.on { opacity: 1; box-shadow: 0 0 0 2px var(--brand, var(--primary)); }
.app .gal-thumbs { padding: 2px 16px; }
.gal-track:has(.hero-img) { border-radius: 0; }



/* ===== منتجات متجر التاجر: من الموردين + منتجاته الخاصة ===== */
.sp-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .sp-add { grid-template-columns: 1fr; } }
.sp-add-btn { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform 140ms cubic-bezier(.23,1,.32,1); }
.sp-add-btn:active { transform: scale(.97); }
.sp-add-btn > span:last-child { display: grid; gap: 2px; min-width: 0; }
.sp-add-btn b { font-size: .92rem; }
.sp-row { align-items: center; }
.sp-actions { display: grid; grid-template-columns: repeat(2, 32px); gap: 4px; flex-shrink: 0; }
.sp-actions .mini-btn { width: 32px; height: 32px; }
.mini-btn.danger { color: var(--danger); }

/* ===== الاشتراك الشهري ===== */
.sub-page .appbar { justify-content: space-between; }
.sub-hero { text-align: center; padding: 22px 16px; border-radius: 22px; background: var(--primary-50, #f5f3ff); color: var(--text); display: grid; justify-items: center; gap: 6px; }
.sub-hero h2 { margin: 6px 0 0; font-size: 1.25rem; }
.sub-hero p { margin: 0; color: var(--muted); max-width: 40ch; line-height: 1.7; }
.sub-hero-icon { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--primary); color: #fff; }
.sub-hero.amber .sub-hero-icon { background: #d97706; } .sub-hero.amber { background: #fffbeb; }
.sub-hero.red .sub-hero-icon { background: var(--danger); } .sub-hero.red { background: var(--danger-50, #fef2f2); }
.sub-hero.green .sub-hero-icon { background: var(--accent, #16a34a); } .sub-hero.green { background: #f0fdf4; }
.sub-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed var(--primary-border, var(--border)); background: var(--surface, #fff); }
.sub-code b { font-size: 1.15rem; letter-spacing: .5px; }
.sub-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.sub-amount { font-size: 2.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.sub-feats { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 6px; }
.sub-feats li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.sub-feats .i { color: var(--accent, #16a34a); }
.sub-step { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.sub-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.bank { box-shadow: none; border: 1px solid var(--border); padding: 14px; }
.bank-name { font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.bank-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.bank-row b { font-size: 1rem; letter-spacing: .3px; }
.receipt-pick { position: relative; display: grid; place-items: center; min-height: 150px; border-radius: 18px; border: 2px dashed var(--primary-border, var(--border)); background: var(--surface, #fff); cursor: pointer; overflow: hidden; text-align: center; }
.receipt-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.receipt-empty { display: grid; justify-items: center; gap: 4px; color: var(--primary); padding: 16px; }
.receipt-pick.has { border-style: solid; }
.receipt-pick img { width: 100%; max-height: 320px; object-fit: contain; background: #f8fafc; }
.sub-resend summary { cursor: pointer; padding: 4px 0; }
.sub-card { display: block; text-decoration: none; color: inherit; margin-top: 14px; }
.sub-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sub-card-grid > div { display: grid; gap: 2px; }
.seg-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; }
.subu { margin-bottom: 12px; }
.subu-code { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; padding: 8px 12px; border-radius: 12px; background: var(--primary-50, #f5f3ff); }
.subu-code b { letter-spacing: .5px; color: var(--primary); }
.subu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.subu-grid > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.subu-grid a { color: inherit; }
.subu-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.subu-actions > .btn { flex: 1 1 120px; }
.subu-extend { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; }
.subu-extend .input { width: 74px; height: 36px; text-align: center; }
.receipt-sheet { max-height: 90dvh; overflow: auto; }
.receipt-full { width: 100%; border-radius: 12px; background: #f8fafc; }
.bank-row .grow { min-width: 0; }
.bank-row b { word-break: break-all; text-align: start; }


/* الشهر المجاني والتذكير */
.sub-hero.purple .sub-hero-icon { background: var(--primary); } .sub-hero.purple { background: var(--primary-50, #f5f3ff); }
.trial-gift { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 8px 14px; border-radius: 999px; background: var(--primary-50, #f5f3ff); color: var(--primary); font-weight: 700; font-size: .9rem; }
.sub-remind { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; text-decoration: none; font-size: .88rem; line-height: 1.5; }
.sub-remind b { white-space: nowrap; color: #b45309; }

/* الهوية: شعار الميم + اسم مخزون بالخط الكوفي */
.app-icon .logo-mark { width: 62px; height: 62px; }
.onb h1 { font-family: "Noto Kufi Arabic", "Rubik", Tahoma, sans-serif; font-weight: 900; letter-spacing: -.5px; }

/* إعلانات بين المنتجات (بوست إنستغرام 1080×1080) */
.ad-pick.square { aspect-ratio: 1 / 1; max-width: 340px; margin-inline: auto; }
.ad-thumb.square { aspect-ratio: 1 / 1; width: 56px; object-fit: cover; }
.feed-ad { position: relative; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--primary) 30%, transparent), var(--shadow, 0 4px 14px rgba(0,0,0,.06)); }
.feed-ad .feed-img { aspect-ratio: 1 / 1; overflow: hidden; background: var(--fill, #f5f3ff); }
.feed-ad .feed-img img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.feed-ad .feed-badge { position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(15,10,30,.62); color: #fff; }
.feed-ad .feed-cta { margin-top: auto; color: var(--primary); font-weight: 700; }

/* مراقبة المتاجر (لوحة المالك) + شريط معاينة المالك */
.ast { margin-bottom: 12px; }
.ast-head { display: block; position: relative; text-decoration: none; margin-bottom: 22px; }
.ast-cover { display: block; height: 84px; border-radius: 14px; overflow: hidden; background: var(--primary-50, #f5f3ff); }
.ast-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ast-logo { position: absolute; bottom: -20px; inset-inline-start: 12px; width: 48px; height: 48px; border-radius: 14px; border: 3px solid #fff; color: #fff; font-weight: 700; overflow: hidden; display: grid; place-items: center; }
.ast-logo img { width: 100%; height: 100%; object-fit: cover; }
.ast-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 6px; margin-top: 10px; }
.ast-stat { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--bg-soft, #f8fafc); text-align: center; }
.ast-stat b { font-size: 1.05rem; }
.ast-stat span { line-height: 1.2; }

/* =====================================================================
   واجهة المتجر للعملاء (تصميم موحّد): أبيض + أزرق ملكي، خط IBM Plex Sans Arabic
   كل شيء تحت .ns حتى ما يتداخل مع أنماط التطبيق
   ===================================================================== */
.ns {
  --royal: var(--mkz-purple); --royal-2: var(--mkz-purple-600); --royal-50: var(--mkz-purple-50); --royal-100: var(--mkz-purple-100);
  --ink: var(--mkz-ink); --ink-2: var(--mkz-ink-2); --mut: var(--mkz-ink-3); --line: var(--mkz-line); --soft: var(--mkz-purple-25);
  --ok: #059669; --ok-50: #ecfdf5; --warn: #b45309; --warn-50: #fffbeb; --bad: #dc2626; --bad-50: #fef2f2;
  --r-lg: 22px; --r: 16px;
  --sh: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --sh-lg: 0 20px 50px rgba(38,26,102,.14);
  /* ألوان التطبيق داخل الواجهة (الحقول والملخصات) */
  --primary: var(--royal); --brand: var(--royal); --border: var(--line); --text: var(--ink); --muted: var(--mut);
  color-scheme: light; min-height: 100vh; background: #fff; color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Rubik", system-ui, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.ns a { color: inherit; text-decoration: none; }
.ns h1, .ns h2, .ns h3, .ns h4 { font-family: inherit; color: var(--ink); margin: 0; letter-spacing: -.2px; }
.ns p { margin: 0; }
.ns .num { font-variant-numeric: tabular-nums; }
.ns .i { width: 20px; height: 20px; }
.ns .i.sm { width: 16px; height: 16px; }
.ns :focus-visible { outline: 2px solid var(--royal-2); outline-offset: 2px; border-radius: 8px; }
.ns-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.ns-narrow { max-width: 640px; }
.ns-center { text-align: center; }
.ns-muted { color: var(--mut); }

/* شرائط علوية */
.ns-announce { background: var(--royal); color: var(--mkz-purple-100); font-size: .8rem; text-align: center; padding: 8px 16px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.ns-announce b { color: #fff; font-weight: 600; }
.ns-appbar { background: var(--mkz-purple-900); color: var(--mkz-purple-100); font-size: .8rem; padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ns-appbar a { color: var(--mkz-orange-300); font-weight: 600; white-space: nowrap; }
.ns-adminbar { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto; z-index: 60;
  background: #3b0764; color: #fff; font-size: .82rem; padding: 10px 14px; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(59,7,100,.35); }
.ns-adminbar span { display: inline-flex; align-items: center; gap: 6px; }
.ns-adminbar a { color: var(--mkz-orange-300); font-weight: 700; white-space: nowrap; }
.ns:has(.ns-adminbar) { padding-bottom: 76px; }

/* الرأس الثابت */
.ns-hdr { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.ns-hdr-in { display: flex; align-items: center; gap: 12px; height: 64px; }
.ns-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ns-brand-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--royal); color: #fff; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.ns-brand-logo img, .ns-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.ns-brand-name { font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-hdr-search { flex: 1; max-width: 460px; margin-inline: auto; display: none; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--soft); border: 1px solid transparent; color: var(--mut); transition: background .2s, border-color .2s, box-shadow .2s; }
.ns-hdr-search:focus-within, .ns-search:focus-within { background: #fff; border-color: var(--royal-100); box-shadow: 0 0 0 4px var(--royal-50); }
.ns-hdr-search input, .ns-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--ink); font-size: .95rem; }
.ns-hdr-actions { display: flex; gap: 4px; margin-inline-start: auto; }
.ns-ibtn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; position: relative; border: 0; background: none; color: var(--ink); cursor: pointer; transition: background .2s; padding: 0; font: inherit; }
.ns-ibtn:hover { background: var(--soft); }
.ns-lang { width: auto; padding: 0 12px; font-size: .8rem; font-weight: 600; }
.ns-dot { position: absolute; top: 5px; inset-inline-end: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--royal-2); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.ns-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.ns-nav::-webkit-scrollbar { display: none; }
.ns-nav a { padding: 12px 14px; font-size: .88rem; color: var(--mut); white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 500; }
.ns-nav a.on { color: var(--royal); border-color: var(--royal); }

/* الغلاف وبطاقة المتجر */
.ns-cover { height: 180px; background-color: var(--royal); background-size: cover; background-position: center; position: relative; overflow: hidden;
  background-image: radial-gradient(1200px 300px at 85% -20%, rgba(255,255,255,.18), transparent 60%), radial-gradient(500px 220px at 10% 120%, rgba(239,95,24,.28), transparent 70%), var(--mkz-hero); }
.ns-cover:not([style])::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.ns-store { position: relative; margin-top: -56px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 0 18px 18px; }
.ns-store-logo { width: 88px; height: 88px; border-radius: 24px; background: var(--royal); color: #fff; font-size: 1.9rem; font-weight: 700; display: grid; place-items: center; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(38,26,102,.25); margin-top: -44px; overflow: hidden; }
.ns-store-name { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-top: 12px; }
.ns-store-tag { color: var(--royal-2); font-weight: 500; font-size: .95rem; margin-top: 2px; }
.ns-store-about { color: var(--ink-2); font-size: .92rem; margin-top: 8px; max-width: 640px; white-space: pre-line; }
.ns-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; color: var(--mut); font-size: .84rem; }
.ns-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ns-cta { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* الأزرار */
.ns-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; border: 0; white-space: nowrap; transition: transform .15s, background .2s, box-shadow .2s, border-color .2s; }
.ns-btn:active { transform: scale(.98); }
.ns-btn.primary { background: var(--mkz-orange); color: #fff; box-shadow: 0 6px 16px rgba(38,26,102,.25); }
.ns-btn.primary:hover { background: var(--mkz-orange-600); }
.ns-btn.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.ns-btn.ghost:hover { border-color: var(--royal-100); background: var(--royal-50); }
.ns-btn.sm { min-height: 42px; padding: 0 16px; font-size: .88rem; border-radius: 12px; }
.ns-btn.icon { padding: 0; width: 42px; }
.ns-btn.block { width: 100%; }
.ns-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* المزايا */
.ns-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.ns-trust > div { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 8px; border-radius: var(--r); background: var(--soft); font-size: .78rem; color: var(--ink-2); font-weight: 500; line-height: 1.35; }
.ns-ti { width: 36px; height: 36px; border-radius: 12px; background: #fff; color: var(--royal); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(15,23,42,.06); flex: none; }

/* قسم المنتجات */
.ns-sec { margin-top: 32px; }
.ns-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ns-sec-head h2 { font-size: 1.25rem; font-weight: 700; }
.ns-sec-head small { color: var(--mut); font-size: .85rem; }
.ns-search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 14px; background: var(--soft); border: 1px solid transparent; color: var(--mut); transition: background .2s, border-color .2s, box-shadow .2s; }
.ns-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ns-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding-bottom: 2px; overscroll-behavior: contain; }
.ns-chips::-webkit-scrollbar { display: none; }
.ns-chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: .86rem; font-weight: 500; white-space: nowrap; color: var(--ink-2); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.ns-chip:hover { border-color: var(--royal-100); }
.ns-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ns-chip .c { opacity: .6; margin-inline-start: 5px; font-size: .78rem; }
.ns-sort { height: 38px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; padding: 0 12px; font: inherit; font-size: .84rem; color: var(--ink-2); flex: none; max-width: 46%; }
.ns-instock { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); margin-top: 12px; cursor: pointer; }
.ns-instock input { width: 18px; height: 18px; accent-color: var(--royal); margin: 0; }

/* بطاقة المنتج */
.ns-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.ns-card { position: relative; display: flex; flex-direction: column; min-width: 0; transition: transform .25s; }
.ns-card:hover { transform: translateY(-3px); }
.ns-media { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--soft); display: grid; place-items: center; transition: box-shadow .25s; }
.ns-card:hover .ns-media { box-shadow: var(--sh-lg); }
.ns-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ns-card:hover .ns-media img, .ns-card:hover .ns-em { transform: scale(1.05); }
.ns-em { font-size: clamp(3rem, 12vw, 4.4rem); filter: drop-shadow(0 14px 18px rgba(15,23,42,.18)); transition: transform .35s; line-height: 1; }
.ns-em.sm { font-size: 2rem; }
.ns-badge { position: absolute; top: 10px; inset-inline-start: 10px; font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.ns-badge.low { color: var(--warn); }
.ns-badge.new { background: var(--royal); color: #fff; }
.ns-media.out::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }
.ns-out { position: absolute; bottom: 10px; inset-inline: 10px; z-index: 1; text-align: center; font-size: .78rem; font-weight: 700; color: var(--bad); background: #fff; border-radius: 10px; padding: 6px; }
.ns-mwrap { position: relative; }
.ns-add { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--royal); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(15,23,42,.12); border: 0; cursor: pointer; transition: background .2s, color .2s; z-index: 2; padding: 0; }
.ns-add:hover { background: var(--royal); color: #fff; }
.ns-card > .ns-info { flex: 1 0 auto; }
.ns-cardbuy { margin-top: 10px; min-height: 40px; box-shadow: none; }
.ns-cardbuy .i { width: 18px; height: 18px; }
.ns-info { display: flex; flex-direction: column; padding: 10px 2px 4px; }
.ns-cat { font-size: .74rem; color: var(--mut); font-weight: 500; }
.ns-pname { font-size: .92rem; font-weight: 600; line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.ns-price { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; color: var(--royal); font-weight: 700; font-size: 1.06rem; }
.ns-price small, .ns-pd-price small { font-size: .74rem; font-weight: 600; color: var(--mut); }
.ns-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 16px; color: var(--mut); }
.ns-empty .i { width: 36px; height: 36px; opacity: .6; }
.ns-empty.big { padding: 80px 16px; }

/* الفوتر */
.ns-foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--soft); }
.ns-foot-in { display: grid; gap: 24px; padding: 32px 16px; }
.ns-foot h4 { font-size: .95rem; margin-bottom: 10px; }
.ns-foot p, .ns-foot li a { font-size: .86rem; color: var(--mut); }
.ns-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ns-flinks { display: grid; gap: 8px; }
.ns-flink { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--mut); }
.ns-flink:hover { color: var(--royal); }
.ns-foot-bottom { border-top: 1px solid var(--line); padding: 16px; text-align: center; font-size: .8rem; color: var(--mut); }

/* صفحة المنتج */
.ns-crumbs { display: flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--mut); padding: 14px 0; flex-wrap: wrap; }
.ns-crumbs a:hover { color: var(--royal); }
html[dir="rtl"] .ns-crumbs .i { transform: none; }
html[dir="ltr"] .ns-crumbs .i { transform: scaleX(-1); }
.ns-pd { display: grid; gap: 20px; }
.ns-pd-gallery { border-radius: var(--r-lg); background: var(--soft); min-width: 0; }
.ns-pd-gallery > .thumb, .ns-pd-gallery .gal-slide { aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; }
.ns-pd-gallery .thumb { background: transparent !important; display: grid; place-items: center; }
.ns-pd-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ns-pd-gallery .thumb .emoji { font-size: clamp(7rem, 30vw, 11rem); filter: drop-shadow(0 30px 30px rgba(15,23,42,.2)); }
.ns-pd-gallery .gal { background: #fff; }
.ns-pd-gallery .gal-track { border-radius: var(--r-lg); background: var(--soft); }
.ns-pd-gallery .gal-th { flex-basis: 72px; height: 72px; border-radius: 14px; }
.ns-pd-gallery .gal-th.on { box-shadow: 0 0 0 2px var(--royal); }
.ns-pd-cat { font-size: .82rem; color: var(--royal-2); font-weight: 600; }
.ns-pd-name { font-size: 1.6rem; line-height: 1.35; margin-top: 4px; font-weight: 700; }
.ns-pd-price { font-size: 2rem; font-weight: 700; color: var(--royal); margin-top: 10px; display: flex; align-items: baseline; gap: 6px; }
.ns-pd-price small { font-size: .95rem; }
.ns-stock { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; margin-top: 10px; }
.ns-stock.ok { background: var(--ok-50); color: var(--ok); }
.ns-stock.low { background: var(--warn-50); color: var(--warn); }
.ns-stock.out { background: var(--bad-50); color: var(--bad); }
.ns-stock i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ns-pd-desc { color: var(--ink-2); margin-top: 14px; font-size: .95rem; white-space: pre-line; }
/* مميزات المنتج (قائمة نقاط بعلامة صح) */
.ns-feats { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--royal-50); }
.ns-feats > b { display: block; font-size: .92rem; color: var(--ink); margin-bottom: 8px; }
.ns-feats ul, .feat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ns-feats li, .feat-list li { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; line-height: 1.5; }
.ns-feats li .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--royal); }
.feat-list { margin-top: 8px; }
.feat-list li { color: var(--text); font-size: .88rem; }
.feat-list li .i { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.ns-qty-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: .88rem; font-weight: 600; }
.ns-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; height: 48px; overflow: hidden; background: #fff; }
.ns-qty button { width: 46px; height: 100%; display: grid; place-items: center; color: var(--ink-2); border: 0; background: none; cursor: pointer; padding: 0; }
.ns-qty button:hover { background: var(--soft); }
.ns-qty span { min-width: 40px; text-align: center; font-weight: 700; }
.ns-qty.sm { height: 38px; border-radius: 12px; }
.ns-qty.sm button { width: 38px; }
.ns-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ns-panel { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 20px; background: #fff; }
.ns-panel h3 { font-size: .98rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; }
.ns-panel h3 .i { color: var(--royal); }
.ns-muted-panel { text-align: center; color: var(--mut); background: var(--soft); border-style: dashed; }
.ns-note { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--soft); color: var(--mut); text-align: center; font-size: .9rem; }
.ns-buyform { border: 2px solid var(--royal); animation: nsIn .3s ease-out; }
@keyframes nsIn { from { opacity: 0; transform: translateY(8px); } }
.ns .field .label { color: var(--mut); font-weight: 500; }
.ns .input { border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-family: inherit; }
.ns .input:focus { border-color: var(--royal-2); box-shadow: 0 0 0 4px var(--royal-50); outline: none; }
.ns .dsum { border: 0 !important; padding: 0 !important; margin-top: 14px !important; background: none !important; }
.ns .sum-row { color: var(--ink-2); font-size: .9rem; }
.ns .sum-row.total { color: var(--ink); border-top: 1px dashed var(--line); font-size: 1.05rem; }
.ns .sum-row.total span:last-child { color: var(--royal); }
.ns-perks { display: grid; gap: 10px; margin-top: 16px; }
.ns-perks > div { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--ink-2); }
.ns-pi { width: 34px; height: 34px; border-radius: 10px; background: var(--royal-50); color: var(--royal); display: grid; place-items: center; flex: none; }
.ns-sticky { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.ns-sticky-p { display: grid; line-height: 1.25; }
.ns-sticky-p b { color: var(--royal); font-size: 1.1rem; }
.ns-sticky-p small { font-size: .72rem; color: var(--mut); }
.ns-sticky .ns-btn { flex: 1; }
.ns.has-sticky { padding-bottom: 80px; }

/* السلة والدفع والصفحات */
.ns-title { font-size: 1.5rem; font-weight: 700; margin: 24px 0 8px; }
.ns-lines { display: grid; gap: 12px; margin-top: 12px; }
.ns-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.ns-line-img { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--soft); display: grid; place-items: center; flex: none; }
.ns-line-img img { width: 100%; height: 100%; object-fit: cover; }
.ns-line-body { flex: 1; min-width: 0; }
.ns-line-name { font-weight: 600; font-size: .92rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-line-price { color: var(--royal); font-weight: 700; font-size: .92rem; margin-top: 2px; }
.ns-line-price small { color: var(--mut); font-size: .72rem; }
.ns-line-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ns-line-total { font-size: .92rem; white-space: nowrap; }
.ns-2col { display: grid; gap: 0 12px; }
.ns-pay { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 14px; border: 2px solid var(--royal); background: var(--royal-50); }
.ns-pay > div { flex: 1; }
.ns-pay > .i { color: var(--royal); }
.ns-success { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; margin: 32px auto 0; }
.ns-success .i { width: 42px; height: 42px; stroke-width: 2.5; }
.ns-prose { color: var(--ink-2); font-size: .98rem; line-height: 1.9; white-space: pre-line; }
.ns-crows { display: grid; gap: 4px; padding: 8px; }
.ns-crow { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; font-size: .95rem; color: var(--ink); }
a.ns-crow:hover { background: var(--soft); }
.ns-crow .i { color: var(--royal); }
.ns-cities { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ns-cities li { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: .9rem; }
.ns-cities b { color: var(--royal); }
.ns-faq summary { font-weight: 600; cursor: pointer; }
.ns-faq p { margin-top: 10px; }

/* تابلت وكمبيوتر */
@media (min-width: 640px) {
  .ns-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .ns-cover { height: 240px; }
  .ns-trust { gap: 12px; }
  .ns-trust > div { flex-direction: row; justify-content: center; font-size: .85rem; }
  .ns-2col { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .ns-hdr-search { display: flex; }
  .ns-search-btn { display: none; }
  .ns-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  .ns-cover { height: 300px; border-radius: 0 0 28px 28px; max-width: 1200px; margin: 0 auto; }
  .ns-store { margin-top: -80px; padding: 0 28px 24px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
  .ns-store .ns-cta { margin-top: 0; }
  .ns-store-name { font-size: 1.9rem; }
  .ns-pd { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
  .ns-pd-gallery { position: sticky; top: 130px; }
  .ns-pd-name { font-size: 2rem; }
  .ns-sticky { display: none; }
  .ns.has-sticky { padding-bottom: 0; }
  .ns-foot-in { grid-template-columns: 2fr 1fr 1fr; padding: 40px 16px; }
}
@media (prefers-reduced-motion: reduce) { .ns *, .ns-buyform { transition: none !important; animation: none !important; } }

/* إيقاف المتجر من إدارة المنصة */
.btn.danger-outline { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.subu-actions > .btn.danger-outline, .subu-actions > .btn[data-act="storeSusp"] { flex: 1 1 100%; }
.susp-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--danger-50); color: var(--danger); font-size: .85rem; font-weight: 700; }
.susp-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--danger-50); color: var(--danger); margin-bottom: 16px; }
.susp-banner .i { flex: none; margin-top: 2px; }
.susp-banner.warn { background: var(--mkz-orange-50); color: var(--mkz-orange-700); flex-wrap: wrap; }
.susp-banner.warn .grow { flex: 1 1 0; min-width: 0; }
.susp-banner.warn .btn { flex: 1 1 100%; background: var(--mkz-orange); color: #fff; }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .susp-banner.warn { background: rgba(239, 95, 24, .14); color: var(--mkz-orange-300); } }

/* شعار مخزون (الاسم بالخط الكوفي: كحلي + «ن» برتقالية) */
.wm { display: inline-flex; flex-direction: column; align-items: center; direction: rtl; line-height: 1; }
.wm-ar { font-family: "Noto Kufi Arabic", "Rubik", Tahoma, sans-serif; font-weight: 900; font-size: var(--wm, 44px); line-height: 1.15; color: var(--heading); }
.wm-ar b { color: var(--mkz-orange); font-weight: 900; }
.wm-lat { font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: calc(var(--wm, 44px) * .2); letter-spacing: .4em; margin-right: -.4em; color: var(--heading); margin-top: calc(var(--wm, 44px) * .1); }
.wm.lg { --wm: 58px; }
.onb .wm-h1 { margin: 0 0 4px; display: flex; justify-content: center; }

/* شعار مخزون فوق نوافذ الدخول والتسجيل */
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 8px 0 22px; }
.auth-logo { --wm: 46px; animation: authIn 600ms cubic-bezier(.23,1,.32,1) both; }
.auth-hello { margin-top: 12px; font-family: "Noto Kufi Arabic", var(--font-display); font-weight: 800; font-size: 22px; color: var(--heading); animation: authIn 600ms cubic-bezier(.23,1,.32,1) 120ms both; }
@keyframes authIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .auth-logo, .auth-hello { animation: none; } }

/* «نفدت الكمية» فوق صورة المنتج */
.pcard.is-out .thumb img, .pcard.is-out .thumb .emoji { filter: grayscale(.85); opacity: .55; }
.soldout { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: #dc2626; color: #fff; font-size: .74rem; font-weight: 800; box-shadow: 0 4px 12px rgba(220, 38, 38, .35); }
.soldout .i { width: 14px; height: 14px; stroke: #fff; }
.pcard.is-out .tag.badge.green { top: 42px; }
.badge .i.sm { width: 13px; height: 13px; vertical-align: -2px; }

/* عارض الصور بكامل الشاشة */
.zoomable { position: relative; cursor: zoom-in; }
.zoom-hint { position: absolute; bottom: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(38, 26, 102, .6); color: #fff; pointer-events: none; z-index: 3; }
.zoom-hint .i { width: 18px; height: 18px; stroke: #fff; }
.gal-thumbs + .zoom-hint, .zoomable:has(.gal-thumbs) .zoom-hint { bottom: 76px; }
html.lb-open, html.lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 2000; background: #04090f; opacity: 0; transition: opacity .2s ease; touch-action: pan-x pinch-zoom; }
.lb.on { opacity: 1; }
.lb-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; display: grid; place-items: center; padding: 56px 12px calc(56px + env(safe-area-inset-bottom, 0px)); }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-btn { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-btn .i { stroke: #fff; width: 22px; height: 22px; }
.lb-x { top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-end: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { inset-inline-start: 12px; }
.lb-next { inset-inline-end: 12px; }
html[dir="rtl"] .lb-prev .i { transform: scaleX(-1); }
.lb-count { position: absolute; z-index: 2; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; background: rgba(255, 255, 255, .12); padding: 4px 12px; border-radius: 999px; direction: ltr; }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }
@media (prefers-reduced-motion: reduce) { .lb { transition: none; } }
/* سعر بيع محدد من مخزون (التاجر يلتزم به) */
.fixed-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--mkz-orange-50); color: var(--mkz-orange-700); }
.fixed-note .i { flex: none; margin-top: 3px; width: 16px; height: 16px; }
.fixed-note b { font-size: .9rem; }
#sellPrice[readonly] { background: var(--fill); color: var(--muted); cursor: not-allowed; }
.fixed-chip { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .74rem; color: var(--mkz-orange-700); }
.fixed-chip .i { width: 12px; height: 12px; }
.fixed-chip b { color: var(--mkz-orange-700); }
@media not all /* الوضع الداكن معطّل: هوية مخزون فاتحة */ { .fixed-note { background: rgba(239, 95, 24, .14); color: var(--mkz-orange-300); } .fixed-chip, .fixed-chip b { color: var(--mkz-orange-300); } }
/* الأرباح المحققة مقابل المتوقعة (حساب التاجر) */
.realized-note { margin-top: 10px; display: grid; gap: 6px; }
.realized-note > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--fill); font-size: .88rem; }
.realized-note > div span { display: inline-flex; align-items: center; gap: 6px; }
.realized-note > div.bad { background: var(--danger-50); color: var(--danger); }
.realized-note p { margin: 2px 4px 0; }
/* =====================================================================
   طبقة الهوية (بنفسجي + برتقالي + أبيض) — فوق كل الأنماط السابقة
   ===================================================================== */
body { color: var(--text); }
/* الأزرار الرئيسية = البرتقالي (التفاعل) */
.btn { background: var(--cta); color: var(--on-cta); box-shadow: none; }
.btn:hover { background: var(--cta-600); }
.btn:not(.sm):not(.plain):not(.soft):not(.outline):not(.danger):not(.danger-outline) { box-shadow: var(--mkz-shadow-cta); }
.btn.outline { background: var(--surface); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary-border); }
.btn.outline:hover, .btn.soft:hover { background: var(--primary-50); }
.btn.soft { background: var(--primary-50); color: var(--primary); }
.btn.plain { background: transparent; color: var(--primary); box-shadow: none; }
.btn.plain:hover { background: var(--primary-50); }
.btn.danger { background: var(--danger-50); color: var(--danger); }
.btn.danger:hover { background: var(--mkz-danger-50); }
.btn.accent, .btn.success { background: var(--cta); color: #fff; }
.link, .section-title a { color: var(--cta); font-weight: 600; }
/* الهيدر = البنفسجي (هوية مخزون) */
.appbar { background: var(--mkz-purple); color: #fff; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.appbar h1 { color: #fff; }
.appbar .icon-btn, .appbar .icon-btn:first-child { background: rgba(255, 255, 255, .12); color: #fff; }
.appbar .icon-btn:first-child { background: transparent; }
.appbar .icon-btn:hover { background: rgba(255, 255, 255, .2); }
.appbar .lang-toggle, .appbar .chip { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
/* شريط التنقل السفلي = البنفسجي، والعنصر النشط بالبرتقالي */
.bottom-nav { background: var(--mkz-purple); border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -8px 24px rgba(38, 26, 102, .18); }
.bottom-nav a { color: rgba(255, 255, 255, .62); }
.bottom-nav a.active { color: #fff; }
.bottom-nav a.active svg { color: var(--mkz-orange); }
.bottom-nav a.active::after { background: var(--mkz-orange); }
.nav-badge { background: var(--mkz-orange); box-shadow: 0 0 0 2px var(--mkz-purple); }
/* الشرائح والفلاتر */
.chip { color: var(--heading); }
.chip.active { background: var(--mkz-purple); color: #fff; }
/* البحث */
.search-bar input:focus { box-shadow: inset 0 0 0 2px var(--mkz-purple), 0 0 0 4px var(--mkz-purple-50); }
/* البطاقات والعناوين */
.section-title h2 { color: var(--heading); font-weight: 700; }
.card { border: 1px solid var(--border); box-shadow: var(--mkz-shadow-sm); }
.badge.purple, .badge.teal { background: var(--mkz-purple-50); color: var(--mkz-purple); }
.focus { background: var(--mkz-hero); }
.toast { background: var(--mkz-purple); }
.modal .sheet, .sheet { background: var(--surface); }
.switch input:checked + span { background: var(--mkz-orange) !important; }
.profit-box { background: var(--mkz-orange-50); color: var(--mkz-orange-700); }
.wm-ar { color: var(--mkz-purple); }
.wm-ar b, .ad-brand b { color: var(--mkz-orange); }
.ad-brand { color: var(--mkz-purple); }
/* =====================================================================
   الرئيسية الجديدة (التاجر): هيدر بنفسجي + بحث، شبكة الأقسام، المميزة، الأحدث
   ===================================================================== */
.home-hero { background: var(--mkz-hero); color: #fff; padding: calc(18px + env(safe-area-inset-top)) 18px 22px; border-radius: 0 0 28px 28px; position: relative; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(239, 95, 24, .35), rgba(239, 95, 24, 0) 70%); top: -90px; inset-inline-end: -70px; pointer-events: none; }
.hero-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hero-hi { font-size: 22px; font-weight: 700; line-height: 1.3; }
.hero-sub { font-size: 13.5px; color: rgba(255, 255, 255, .78); margin-top: 2px; }
.hero-btn { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; color: #fff; flex: none; transition: background .2s; }
.hero-btn:hover { background: rgba(255, 255, 255, .22); }
.hero-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 16px; height: 52px; padding: 0 14px; border-radius: 16px; background: #fff; color: var(--mkz-ink-3); box-shadow: 0 10px 28px rgba(16, 8, 48, .28); }
.hero-search .i { color: var(--mkz-purple); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--mkz-ink); height: 100%; }
.hero-search input::placeholder { color: var(--mkz-ink-3); }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--mkz-orange), 0 10px 28px rgba(16, 8, 48, .28); }
.hero-clear { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--mkz-purple-50); color: var(--mkz-purple); display: grid; place-items: center; padding: 0; cursor: pointer; }
.home-page { padding-top: 14px; }
.home-sec { margin-top: 22px; }
.home-sec:first-child { margin-top: 6px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.sec-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--mkz-purple); margin: 0; }
.sec-ic { width: 28px; height: 28px; border-radius: 9px; background: var(--mkz-orange-50); color: var(--mkz-orange); display: grid; place-items: center; }
.sec-ic .i { width: 16px; height: 16px; }
.sec-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; color: var(--mkz-orange); }
.sec-head a .i { width: 16px; height: 16px; }
/* شريط الأقسام: سطر أفقي واحد يُسحب بالإصبع، ويظهر جزء من القسم التالي (عرض البلاطة = المساحة ÷ 4.4) */
.cat-row {
  --cat-gap: 12px;
  display: grid; grid-auto-flow: column; grid-template-rows: auto;
  grid-auto-columns: clamp(68px, calc((100% + 16px - 4 * var(--cat-gap)) / 4.4), 92px);
  gap: var(--cat-gap);
  margin: 0 -16px; padding: 4px 16px 8px; scroll-padding-inline: 16px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; cursor: grab;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.cat-row.dragging .cat-tile { pointer-events: none; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.cat-row .cat-nm { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.cat-ic { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(160deg, var(--mkz-purple-50), var(--mkz-purple-100)); color: var(--mkz-purple); display: grid; place-items: center; border: 1px solid var(--mkz-purple-100); transition: transform .18s var(--ease), background .2s, color .2s, box-shadow .2s; }
.cat-ic .cat-svg { width: 30px; height: 30px; stroke-width: 1.7; }
.cat-nm { font-size: 12.5px; font-weight: 600; color: var(--mkz-purple); line-height: 1.3; max-width: 86px; }
@media (hover: hover) { .cat-tile:hover .cat-ic { background: var(--mkz-purple); color: #fff; box-shadow: var(--mkz-shadow-md); } }
.cat-tile:active .cat-ic { transform: scale(.92); background: var(--mkz-orange); color: #fff; border-color: var(--mkz-orange); }
/* شريط المنتجات المميزة الأفقي */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
/* بطاقة المنتج */
.pcard { border: 1px solid var(--mkz-line); border-radius: 18px; box-shadow: var(--mkz-shadow-sm); background: #fff; transition: transform .2s var(--ease), box-shadow .2s; }
@media (hover: hover) { .pcard:hover { transform: translateY(-3px); box-shadow: var(--mkz-shadow-md); } }
.pcard:active { transform: scale(.98); }
.pc-media { position: relative; }
.pc-media .thumb { aspect-ratio: 1 / 1; border-radius: 0; }
.pc-in { position: absolute; top: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--mkz-success); font-size: .72rem; font-weight: 700; }
.pc-in .i { width: 13px; height: 13px; }
.pc-feat { position: absolute; top: 10px; inset-inline-start: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--mkz-orange); color: #fff; display: grid; place-items: center; box-shadow: var(--mkz-shadow-cta); }
.pc-feat .i { width: 15px; height: 15px; fill: currentColor; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pc-cat { font-size: 11.5px; font-weight: 600; color: var(--mkz-purple-400); }
.pcard .name { font-size: 14px; font-weight: 700; color: var(--mkz-purple); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.pc-price { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
.pc-price b { font-size: 16px; font-weight: 800; color: var(--mkz-orange); }
.pc-price span { font-size: 11px; color: var(--mkz-ink-3); }
.pcard.is-out .tag.badge.green, .pcard.is-out .pc-in { top: 42px; }
/* صفحة القسم */
.cat-head { display: flex; align-items: center; gap: 12px; margin: 14px 16px 4px; padding: 14px; border-radius: 18px; background: var(--mkz-purple-50); border: 1px solid var(--mkz-purple-100); }
.cat-head-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--mkz-purple); color: #fff; display: grid; place-items: center; flex: none; }
.cat-head-ic .i { width: 26px; height: 26px; }
.cat-head b { display: block; font-size: 17px; color: var(--mkz-purple); }
.cat-head span { font-size: 13px; color: var(--mkz-ink-2); }
.cat-chips { padding: 10px 16px 2px; margin: 0; }
.cat-chips .chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cat-chips .chip .i { width: 16px; height: 16px; }
@media (min-width: 420px) { .cat-ic { width: 70px; height: 70px; } }
@media (min-width: 600px) { .hscroll { grid-auto-columns: 30%; } }
@media (prefers-reduced-motion: reduce) { .cat-ic, .pcard { transition: none; } }
/* الأجهزة اللوحية: مساحة أعرض وشبكات أكثر أعمدة */
@media (min-width: 768px) {
  .app { max-width: 760px; }
  .bottom-nav { width: min(760px, 100%); }
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cat-row { --cat-gap: 16px; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
  .hscroll { grid-auto-columns: 30%; }
  .home-hero { padding-inline: 28px; }
  .page { padding-inline: 24px; }
}
@media (min-width: 1024px) { .app { max-width: 920px; } .bottom-nav { width: min(920px, 100%); } .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hscroll { grid-auto-columns: 23%; } }
.home-hero.preview { border-radius: 22px; padding: 4px 14px 16px; margin-bottom: 4px; }
.home-hero.preview .hero-search { margin-top: 12px; }

/* =====================================================================
   واجهة الترحيب (أول شاشة): شعار، رسم تراثي ليبي، ترحيب، زرّا الدخول وإنشاء الحساب
   ===================================================================== */
.app.welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 22px 0; background: #fff; position: relative; overflow: hidden; text-align: center; }
/* نقش هندسي خفيف في الخلفية (نجمة ثمانية من الزخارف التقليدية) */
.wl-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23E6E3F4' stroke-width='1.2'%3E%3Crect x='20' y='20' width='16' height='16'/%3E%3Crect x='20' y='20' width='16' height='16' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(#000, transparent 38%, transparent 70%, #000); mask-image: linear-gradient(#000, transparent 38%, transparent 70%, #000); }
.wl-top { width: 100%; display: flex; justify-content: flex-end; position: relative; z-index: 1; }
.wl-lang { background: var(--mkz-purple-50); color: var(--mkz-purple); border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.wl-logo { position: relative; z-index: 1; margin-top: 2px; animation: wlDown .6s var(--ease) both; }
.wl-logo .wm { --wm: 46px; }
.wl-art { position: relative; z-index: 1; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; margin: 6px 0 4px; animation: wlArt .8s var(--ease) .12s both; }
.wl-svg { width: auto; height: min(42vh, 360px); max-width: 100%; filter: drop-shadow(0 18px 28px rgba(38, 26, 102, .18)); }
.wl-text { position: relative; z-index: 1; animation: wlUp .6s var(--ease) .3s both; }
.wl-text h2 { margin: 0; font-family: "Noto Kufi Arabic", var(--font-display); font-size: 25px; font-weight: 800; color: var(--mkz-purple); line-height: 1.4; }
.wl-text p { margin: 6px auto 0; max-width: 300px; font-size: 15px; color: var(--mkz-ink-2); line-height: 1.6; }
.wl-actions { position: relative; z-index: 1; width: 100%; max-width: 380px; display: grid; gap: 10px; margin: 18px 0 18px; animation: wlUp .6s var(--ease) .45s both; }
.wl-actions .btn { min-height: 54px; font-size: 17px; border-radius: 16px; }
.wl-band { position: relative; z-index: 1; display: block; width: calc(100% + 44px); height: 18px; margin: auto -22px 0; flex: none; padding-bottom: env(safe-area-inset-bottom); }
/* حركات الرسم */
.wl-route { animation: wlDash 1.6s linear infinite; }
.wl-float { animation: wlBob 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.wl-float.d2 { animation-delay: -1.8s; }
.wl-sun { animation: wlGlow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wlDown { from { opacity: 0; transform: translateY(-12px); } }
@keyframes wlUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes wlArt { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes wlDash { to { stroke-dashoffset: -20; } }
@keyframes wlBob { 50% { transform: translateY(-5px); } }
@keyframes wlGlow { 50% { transform: scale(1.06); opacity: .85; } }
@media (max-height: 700px) { .wl-svg { height: 34vh; } .wl-text h2 { font-size: 22px; } .wl-actions { margin: 12px 0; } .wl-logo .wm { --wm: 38px; } }
@media (min-width: 768px) { .wl-svg { height: min(46vh, 420px); } }
@media (prefers-reduced-motion: reduce) { .wl-logo, .wl-art, .wl-text, .wl-actions, .wl-route, .wl-float, .wl-sun { animation: none; } .wl-dot { display: none; } }
.mail-ico{background:var(--primary-50);color:var(--primary)}
.mail-addr{display:inline-block;margin:8px 0 0;padding:6px 14px;border-radius:999px;background:var(--primary-50);color:var(--primary);font-weight:700;font-size:.9rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.otp{display:flex;justify-content:center;gap:10px}
.otp.six{gap:8px}
.otp.six .otp-in{width:46px;height:56px;font-size:1.4rem;padding:0;text-align:center}
@media (max-width:360px){.otp.six{gap:6px}.otp.six .otp-in{width:40px;height:50px}}
.link[disabled]{opacity:.55;cursor:default;text-decoration:none}