@charset "UTF-8";
/* =====================================================================
   سامانه پخش — سیستم طراحی
   گلس‌مورفیسم تیره روی زمینه سرمه‌ای، تاکید کهربایی/طلایی، تضاد فیروزه‌ای.
   موبایل-فرست، RTL کامل، همه دارایی‌ها سلف‌هاست.
   ===================================================================== */

/* ---------- فونت سلف‌هاست (بدون هیچ CDN) ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =====================================================================
   ۱. توکن‌ها
   ===================================================================== */
:root {
  /* پس‌زمینه سرمه‌ای خیلی تیره */
  --bg:            #0B1220;
  --bg-elevated:   #0E1729;
  --bg-deep:       #070C16;

  /* سطوح شیشه‌ای */
  --glass:         rgba(255, 255, 255, 0.045);
  --glass-2:       rgba(255, 255, 255, 0.075);
  --glass-3:       rgba(255, 255, 255, 0.11);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --blur:          16px;

  /* متن — سفید گرم، نه سفید خالص */
  --text:          #F2EDE4;
  --text-muted:    #A8B2C6;
  --text-faint:    #6D7A92;

  /* تاکیدها */
  --amber:         #F5A623;
  --amber-soft:    rgba(245, 166, 35, 0.14);
  --amber-line:    rgba(245, 166, 35, 0.38);
  --gold:          #D4AF37;
  --gold-soft:     rgba(212, 175, 55, 0.14);
  --teal:          #2DD4BF;
  --teal-soft:     rgba(45, 212, 191, 0.13);
  --green:         #22C55E;
  --green-soft:    rgba(34, 197, 94, 0.15);
  --red:           #EF4444;
  --red-soft:      rgba(239, 68, 68, 0.14);

  /* شعاع و سایه */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow:    0 8px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.55);

  /* فاصله */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  --nav-h: 64px;
  --bar-h: 56px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =====================================================================
   ۲. پایه
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* جلوگیری از پرش صفحه هنگام باز شدن مودال */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  direction: rtl;
  text-align: right;
  /* هاله‌های محوِ کهربایی و فیروزه‌ای — چیزی که شیشه رویش بلر می‌خورد */
  background-image:
    radial-gradient(1100px 620px at 88% -8%,  rgba(245, 166, 35, 0.13), transparent 62%),
    radial-gradient(880px 520px at 4% 4%,     rgba(45, 212, 191, 0.09), transparent 58%),
    radial-gradient(760px 640px at 50% 108%,  rgba(212, 175, 55, 0.07), transparent 60%);
  background-attachment: fixed;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* اعداد مبلغ و تاریخ هم‌عرض بمانند تا در لیست‌ها ردیف بشوند */
.num, .money, td.num, .stat-value, .amount, time, .tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 { margin: 0 0 var(--sp-3); line-height: 1.4; font-weight: 700; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 var(--sp-3); }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

::selection { background: var(--amber-soft); color: var(--text); }

/* فوکوس کیبوردی همیشه دیده شود */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* اسکرول‌بار هماهنگ با تم */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
}
*::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =====================================================================
   ۳. چیدمان اپ‌مانند
   ===================================================================== */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

/* --- نوار بالا --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--bar-h);
  padding: var(--sp-2) var(--sp-4);
  padding-top: calc(var(--sp-2) + env(safe-area-inset-top));
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-faint);
}
.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover { background: var(--glass-2); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; }

/* --- محتوا --- */
.content {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp-4);
}
.content.narrow { max-width: 720px; }

/* --- نوار پایین ثابت (بدون منوی همبرگری تودرتو) --- */
.bottomnav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border-top: 1px solid var(--border);
}
.bottomnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--sp-2) 2px;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color 0.18s var(--ease);
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a:hover { color: var(--text-muted); text-decoration: none; }
.bottomnav a.active { color: var(--amber); }
.bottomnav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 26px; height: 2.5px;
  border-radius: 0 0 3px 3px;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(245, 166, 35, 0.6);
}

/* =====================================================================
   ۴. کارت شیشه‌ای
   ===================================================================== */
.card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
/* خط نور بالای کارت — عمق شیشه */
.card::before {
  content: '';
  position: absolute;
  inset-inline: 12%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}
.card.flush { padding: 0; overflow: hidden; }
.card.accent { border-color: var(--amber-line); }

.card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card-head h2, .card-head h3 { margin: 0; flex: 1; min-width: 0; }
.card-head .spacer { flex: 1; }

.section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =====================================================================
   ۵. دکمه‌ها
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: 0 var(--sp-5);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  background: var(--glass-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: transform 0.12s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { background: var(--glass-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #F7B23F, var(--amber));
  border-color: transparent;
  color: #21160A;
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #FFC059, #F0A01D);
  box-shadow: 0 8px 26px rgba(245, 166, 35, 0.42);
}

.btn-teal {
  background: linear-gradient(180deg, #3FE0CC, var(--teal));
  border-color: transparent;
  color: #062521;
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.26);
}

.btn-danger { background: var(--red-soft); border-color: rgba(239,68,68,0.45); color: #FFB4B4; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.24); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--glass); color: var(--text); }

.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: 0.82rem; }
.btn-lg { min-height: 54px; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 130px; }

/* =====================================================================
   ۶. فرم‌ها
   ===================================================================== */
.field { margin-bottom: var(--sp-4); }
.field > label, .label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}
.field .req { color: var(--amber); margin-inline-start: 2px; }
.hint { font-size: 0.74rem; color: var(--text-faint); margin-top: var(--sp-2); }
.error-text { font-size: 0.78rem; color: #FFA5A5; margin-top: var(--sp-2); }

/* input:not([type]) لازم است: انتخابگر [type="text"] با ورودیِ بدون ویژگی
   type مطابقت نمی‌کند و آن ورودی کاملاً بی‌استایل و با عرض پیش‌فرض مرورگر
   رندر می‌شد (که چیدمان را در موبایل می‌شکست). */
.input, input:not([type]), input[type="text"], input[type="password"],
input[type="number"], input[type="tel"], input[type="search"],
input[type="date"], input[type="email"],
select, textarea {
  width: 100%;
  min-height: 46px;
  padding: var(--sp-3);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background 0.18s var(--ease);
  appearance: none;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.75; }

.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 3px var(--amber-soft);
}
::placeholder { color: var(--text-faint); opacity: 1; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8B2C6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left var(--sp-3) center;
  background-size: 18px;
  padding-inline-start: var(--sp-9, 40px);
}
select option { background: var(--bg-elevated); color: var(--text); }

/* ورودی مبلغ */
input.money-input {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

/* چک‌باکس/رادیو سفارشی */
.check {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--glass);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.check:hover { background: var(--glass-2); }
.check input { width: 20px; height: 20px; min-height: 0; flex: 0 0 20px; accent-color: var(--amber); }
.check.on { border-color: var(--amber-line); background: var(--amber-soft); }

/* گروه انتخاب تک‌گزینه‌ای به شکل چیپ */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 42px;
  padding: 0 var(--sp-4);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.chip:hover { background: var(--glass-2); color: var(--text); }
.chip.on {
  background: var(--amber-soft);
  border-color: var(--amber-line);
  color: var(--amber);
  font-weight: 600;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }

/* switch */
.switch { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 46px; height: 26px;
  flex: 0 0 46px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background 0.2s var(--ease);
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch input:checked + .track { background: var(--amber-soft); border-color: var(--amber-line); }
.switch input:checked + .track::after { transform: translateX(-20px); background: var(--amber); }
.switch input:focus-visible + .track { outline: 2px solid var(--amber); outline-offset: 2px; }

/* =====================================================================
   ۷. جدول و لیست
   ===================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th, table.data td {
  padding: var(--sp-3);
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data th {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-faint);
  background: rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 2;
}
table.data tbody tr { transition: background 0.15s var(--ease); }
table.data tbody tr:hover { background: var(--glass); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data td.wrap { white-space: normal; min-width: 160px; }

/* روی صفحه باریک، جدول اقلام باید کامل جا شود — نه اینکه ستون «جمع»
   بیرون از کادر بیفتد و کاربر مجبور به اسکرول افقی شود. */
@media (max-width: 560px) {
  table.data th, table.data td { padding: var(--sp-2) 6px; font-size: 0.8rem; }
  table.data td.wrap { min-width: 92px; }
}

/* ردیف لیست (نمای موبایل) */
.list-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s var(--ease);
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--glass); text-decoration: none; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .title {
  /* این عنصر span است؛ بدون block بریدن متن با «…» کار نمی‌کند */
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row .meta {
  display: flex;
  font-size: 0.74rem;
  color: var(--text-faint);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.list-row .trail { text-align: left; flex: 0 0 auto; }

/* آواتار حرف اول */
.avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: var(--amber);
  font-weight: 700;
  font-size: 0.94rem;
}
.avatar.teal { background: var(--teal-soft); border-color: rgba(45,212,191,0.35); color: var(--teal); }
.avatar.gold { background: var(--gold-soft); border-color: rgba(212,175,55,0.35); color: var(--gold); }

/* =====================================================================
   ۸. برچسب وضعیت
   ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px var(--sp-3);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.pending   { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.badge.shipped   { background: var(--teal-soft);  color: var(--teal);  border-color: rgba(45,212,191,0.35); }
.badge.cancelled { background: var(--red-soft);   color: #FF9B9B;      border-color: rgba(239,68,68,0.35); }
.badge.gold      { background: var(--gold-soft);  color: var(--gold);  border-color: rgba(212,175,55,0.35); }
.badge.green     { background: var(--green-soft); color: var(--green); border-color: rgba(34,197,94,0.35); }
.badge.muted     { background: var(--glass-2);    color: var(--text-faint); border-color: var(--border); }
.badge.plain::before { display: none; }

/* =====================================================================
   ۹. آمار
   ===================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.stat {
  position: relative;
  padding: var(--sp-4);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 3px; height: 100%;
  background: var(--amber);
  opacity: 0.75;
}
.stat.teal::after  { background: var(--teal); }
.stat.gold::after  { background: var(--gold); }
.stat.green::after { background: var(--green); }
.stat.red::after   { background: var(--red); }

.stat-label {
  font-size: 0.74rem;
  color: var(--text-faint);
  margin-bottom: var(--sp-1);
}
.stat-value {
  font-size: 1.32rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.stat-unit {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  margin-inline-start: 3px;
  /* «تومان» هرگز نباید وسط کلمه به خط بعد بشکند */
  white-space: nowrap;
}
.stat-sub  { font-size: 0.72rem; color: var(--text-muted); margin-top: var(--sp-1); }

/* =====================================================================
   ۱۰. گرید کالا — لحظه امضادار سیستم
   ===================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--sp-3);
}

.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.12s var(--ease);
}
.product-card.selected {
  border-color: var(--amber-line);
  background: var(--amber-soft);
}

/* ناحیه تپ — کل کارت به‌جز دکمه‌ها و فیلد تعداد */
.product-tap {
  display: block;
  width: 100%;
  flex: 1;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.product-tap:active { transform: scale(0.975); }

.product-img {
  /* حتماً block — این عنصر span است و aspect-ratio روی inline اثر ندارد */
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.24);
}
/* مرورگرهای قدیمی‌تر که aspect-ratio ندارند */
@supports not (aspect-ratio: 1 / 1) {
  .product-img { padding-top: 100%; height: 0; }
  .product-img > * { position: absolute; inset: 0; }
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* جایگزین وقتی عکس ندارد */
.product-img .noimg {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  color: rgba(255, 255, 255, 0.16);
}
.product-img .noimg svg { width: 44%; height: 44%; }

.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
  padding: var(--sp-2) 6px 0;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
}
.product-points {
  display: block;
  font-size: 0.66rem;
  color: var(--gold);
  font-weight: 600;
  padding-bottom: var(--sp-2);
}

/* دایره سبز شمارنده — بالا-راست */
.qty-bubble {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #04240F;
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.5);
  pointer-events: none;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}
.product-card.selected .qty-bubble { transform: scale(1); opacity: 1; }

/* پالس لمسی — تنها جایی که حرکت پررنگ می‌شود */
.qty-bubble.pulse { animation: qty-pulse 0.34s var(--ease); }
@keyframes qty-pulse {
  0%   { transform: scale(1);    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.5); }
  38%  { transform: scale(1.32); box-shadow: 0 0 0 9px rgba(34, 197, 94, 0.22); }
  100% { transform: scale(1);    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.5); }
}

/* ضربدر قرمز — بالا-چپ */
.qty-clear {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.94);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}
.product-card.selected .qty-clear { transform: scale(1); opacity: 1; }
.qty-clear:hover { background: #DC2626; }
.qty-clear svg { width: 15px; height: 15px; }

/* فیلد متنی تعداد — برای عددهای بزرگ ۱۰ / ۵۰ / ۲۰۰ */
.qty-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0 6px 6px;
}
.qty-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 2px 4px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.qty-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft);
  background: rgba(0, 0, 0, 0.42);
}
/* حذف فلش‌های عدد */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ورودی قیمت واحد زیر کارت انتخاب‌شده */
.price-row { padding: 0 6px 6px; display: none; }
.product-card.selected .price-row { display: block; }
.price-input {
  width: 100%;
  min-height: 36px;
  padding: 2px 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: var(--r-sm);
}
.price-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.price-input.missing { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }

/* =====================================================================
   ۱۱. سبد / خلاصه چسبیده پایین
   ===================================================================== */
.sticky-summary {
  position: sticky;
  bottom: var(--sp-3);
  z-index: 50;
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(14, 23, 41, 0.9);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.sticky-summary .sum-main { flex: 1; min-width: 0; }
.sticky-summary .sum-label { font-size: 0.72rem; color: var(--text-faint); }
.sticky-summary .sum-value {
  font-size: 1.16rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

/* =====================================================================
   ۱۲. مراحل (stepper)
   ===================================================================== */
.steps {
  display: flex;
  gap: 5px;
  margin-bottom: var(--sp-4);
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--glass-3);
  transition: background 0.25s var(--ease);
}
.steps li.done   { background: rgba(245, 166, 35, 0.45); }
.steps li.active { background: var(--amber); box-shadow: 0 0 12px rgba(245,166,35,0.55); }

.step-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.step-head .n {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: var(--r-pill);
  padding: 1px 9px;
}
.step-head h2 { margin: 0; font-size: 1.04rem; }

/* =====================================================================
   ۱۳. مودال
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(4, 8, 16, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.22s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes modal-in {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; flex: 1; font-size: 1rem; }
.modal-body { padding: var(--sp-4); overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
}
.modal-foot .btn { flex: 1; }

/* دستگیره کشیدن */
.modal-grip {
  width: 38px; height: 4px;
  margin: var(--sp-2) auto 0;
  border-radius: var(--r-pill);
  background: var(--glass-3);
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: var(--sp-4); }
  .modal { border-radius: var(--r-lg); max-height: 86dvh; }
  .modal-grip { display: none; }
}

/* =====================================================================
   ۱۴. پیام‌ها
   ===================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--glass);
  font-size: 0.88rem;
}
.alert svg { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 3px; }
.alert.success { background: var(--green-soft); border-color: rgba(34,197,94,0.32);  color: #9DF0BC; }
.alert.error   { background: var(--red-soft);   border-color: rgba(239,68,68,0.32);  color: #FFB4B4; }
.alert.warning { background: var(--amber-soft); border-color: var(--amber-line);     color: #FFD79A; }
.alert.info    { background: var(--teal-soft);  border-color: rgba(45,212,191,0.3);  color: #96EFE2; }

/* توست شناور */
.toast-host {
  position: fixed;
  inset-inline: 0;
  bottom: calc(var(--nav-h) + var(--sp-4) + env(safe-area-inset-bottom));
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  pointer-events: none;
}
.toast {
  max-width: 460px;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(14, 23, 41, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  animation: toast-in 0.24s var(--ease);
  pointer-events: auto;
}
.toast.success { border-color: rgba(34, 197, 94, 0.45); }
.toast.error   { border-color: rgba(239, 68, 68, 0.45); }
.toast.leaving { animation: toast-out 0.2s var(--ease) forwards; }
@keyframes toast-in  { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-out { to   { transform: translateY(8px);  opacity: 0; } }

/* حالت خالی */
.empty {
  padding: var(--sp-10) var(--sp-4);
  text-align: center;
  color: var(--text-faint);
}
.empty svg { width: 52px; height: 52px; opacity: 0.35; margin-bottom: var(--sp-3); }
.empty p { margin: 0 0 var(--sp-2); }

/* =====================================================================
   ۱۵. صفحه‌بندی
   ===================================================================== */
.pager {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-4) 0 0;
}
.pager ul {
  display: flex;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.pager a, .pager .current, .pager .gap {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-muted);
  font-size: 0.84rem;
  text-decoration: none;
}
.pager a:hover { background: var(--glass-2); color: var(--text); text-decoration: none; }
.pager .current {
  background: var(--amber-soft);
  border-color: var(--amber-line);
  color: var(--amber);
  font-weight: 700;
}
.pager .gap { border-color: transparent; background: none; }
.pager-info { font-size: 0.76rem; color: var(--text-faint); margin-inline-start: auto; }

/* =====================================================================
   ۱۶. جست‌وجو
   ===================================================================== */
.search-box { position: relative; }
.search-box input { padding-inline-start: 42px; }
.search-box .ico {
  position: absolute;
  inset-inline-start: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.search-box .ico svg { width: 19px; height: 19px; }

.search-results {
  margin-top: var(--sp-2);
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.26);
}
.search-results:empty { display: none; }

/* =====================================================================
   ۱۷. فیلترها
   ===================================================================== */
.filters {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: var(--sp-4);
}
.filters .field { margin-bottom: 0; flex: 1; min-width: 140px; }
.filters .btn { flex: 0 0 auto; }

.tabbar {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-4);
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a {
  flex: 0 0 auto;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.tabbar a:hover { background: var(--glass-2); color: var(--text); text-decoration: none; }
.tabbar a.active {
  background: var(--amber-soft);
  border-color: var(--amber-line);
  color: var(--amber);
  font-weight: 600;
}

/* =====================================================================
   ۱۸. منوی کارها (صفحه اصلی کارمند)
   ===================================================================== */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
}
.task-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  min-height: 116px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.12s var(--ease);
}
.task-tile:hover {
  background: var(--glass-2);
  border-color: var(--amber-line);
  text-decoration: none;
}
.task-tile:active { transform: scale(0.985); }
.task-tile .ico {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: var(--amber);
}
.task-tile .ico svg { width: 21px; height: 21px; }
.task-tile .t { font-weight: 600; font-size: 0.92rem; line-height: 1.45; }
.task-tile .d { font-size: 0.72rem; color: var(--text-faint); margin-top: auto; }

.task-tile.t-teal .ico { background: var(--teal-soft); border-color: rgba(45,212,191,0.35); color: var(--teal); }
.task-tile.t-gold .ico { background: var(--gold-soft); border-color: rgba(212,175,55,0.35); color: var(--gold); }
.task-tile.t-green .ico { background: var(--green-soft); border-color: rgba(34,197,94,0.35); color: var(--green); }

/* =====================================================================
   ۱۹. نمودار (سلف‌هاست، بدون کتابخانه خارجی)
   ===================================================================== */
.chart-wrap { position: relative; width: 100%; overflow-x: auto; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i {
  width: 10px; height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* میله افقی برای رتبه‌بندی */
.rank-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row .pos {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: var(--glass-2);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}
.rank-row:nth-child(1) .pos { background: var(--gold-soft); color: var(--gold); }
.rank-row:nth-child(2) .pos { background: var(--glass-3); color: var(--text); }
.rank-row:nth-child(3) .pos { background: var(--amber-soft); color: var(--amber); }
.rank-row .body { flex: 1; min-width: 0; }
.rank-row .nm {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 5px;
}
.rank-bar {
  /* حتماً block — روی span ارتفاع اعمال نمی‌شود و میله ناپدید می‌شد */
  display: block;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--amber), var(--gold));
}
.rank-row .val {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

/* =====================================================================
   ۲۰. صفحه ورود
   ===================================================================== */
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: var(--sp-8) var(--sp-6);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.login-logo {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto var(--sp-4);
  border-radius: 20px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: var(--amber);
}
.login-logo svg { width: 32px; height: 32px; }
.login-card h1 { text-align: center; font-size: 1.16rem; margin-bottom: var(--sp-1); }
.login-card .sub {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-bottom: var(--sp-6);
}

/* =====================================================================
   ۲۱. وضعیت شبکه / آفلاین
   ===================================================================== */
.net-banner {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-4);
  padding-top: calc(6px + env(safe-area-inset-top));
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--amber);
  color: #21160A;
}
.net-banner.show { display: flex; }
.net-banner.syncing { background: var(--teal); color: #062521; }
.net-banner svg { width: 15px; height: 15px; }

.queue-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 700;
}

/* =====================================================================
   ۲۲. رسید چاپی
   ===================================================================== */
.receipt {
  max-width: 400px;
  margin: 0 auto;
  font-variant-numeric: tabular-nums;
}
.receipt .r-head { text-align: center; margin-bottom: var(--sp-4); }
.receipt .r-line {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.86rem;
}
.receipt .r-line.total {
  border-bottom: 0;
  border-top: 2px solid var(--border-strong);
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold);
}
.receipt .r-line .lbl { color: var(--text-muted); }

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    background-image: none !important;
  }
  .topbar, .bottomnav, .no-print, .btn, .net-banner, .toast-host { display: none !important; }
  .card, .receipt {
    box-shadow: none !important;
    border: 1px solid #999 !important;
    background: #fff !important;
    backdrop-filter: none !important;
  }
  .card::before { display: none !important; }
  .receipt .r-line.total { color: #000 !important; }
  .app-shell { padding-bottom: 0 !important; }
  a { color: #000 !important; }
}

/* =====================================================================
   ۲۳. کمکی‌ها
   ===================================================================== */
.row      { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.row > *  { min-width: 0; }
.col      { flex: 1; min-width: 140px; }
.between  { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.center   { text-align: center; }
.left     { text-align: left; }
.muted    { color: var(--text-muted); }
.faint    { color: var(--text-faint); }
.small    { font-size: 0.78rem; }
.xsmall   { font-size: 0.7rem; }
.bold     { font-weight: 700; }
.amber    { color: var(--amber); }
.gold     { color: var(--gold); }
.teal     { color: var(--teal); }
.green    { color: var(--green); }
.red      { color: #FF9B9B; }
.nowrap   { white-space: nowrap; }
.hidden   { display: none !important; }
.mt-0 { margin-top: 0; }      .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mb-0 { margin-bottom: 0; }   .mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.gap-2 { gap: var(--sp-2); }  .gap-3 { gap: var(--sp-3); }
.flex-1 { flex: 1; }

/* =====================================================================
   ۲۴. واکنش‌گرایی
   ===================================================================== */
@media (min-width: 768px) {
  body { font-size: 15.5px; }
  .content { padding: var(--sp-6); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .task-grid    { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (min-width: 1024px) {
  .app-shell { padding-bottom: var(--sp-6); }
  .bottomnav {
    position: sticky;
    top: var(--bar-h);
    bottom: auto;
    height: auto;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-2);
    border-top: 0;
    border-bottom: 1px solid var(--border);
  }
  .bottomnav a {
    flex: 0 0 auto;
    flex-direction: row;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--r-pill);
    font-size: 0.84rem;
  }
  .bottomnav a.active { background: var(--amber-soft); }
  .bottomnav a.active::before { display: none; }
  .toast-host { bottom: var(--sp-6); }
  .two-col {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--sp-4);
    align-items: start;
  }
}

/* =====================================================================
   ۲۵. احترام به کاهش حرکت
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .product-tap:active { transform: none; }
  /* شمارنده همچنان باید دیده شود، فقط بدون پرش */
  .qty-bubble, .product-card.selected .qty-bubble { transform: scale(1); opacity: 1; }
  .qty-bubble { transform: scale(0); }
  .product-card.selected .qty-bubble { transform: scale(1); }
}

/* کنتراست بالا */
@media (prefers-contrast: more) {
  :root {
    --border: rgba(255, 255, 255, 0.26);
    --border-strong: rgba(255, 255, 255, 0.42);
    --text-muted: #C6CEDC;
    --text-faint: #96A2B8;
  }
}
