/* ============================================================
   طلایار — زبان طراحی «گنجینه»
   Mobile-first (375px) · RTL · Vazirmatn
   ============================================================ */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

/* ---------- توکن‌ها ---------- */
:root {
  --bg0: #0c0a07;
  --bg1: #14110b;
  --bg2: #1a1610;
  --bg3: #221d13;
  --line: #2b2517;
  --line-2: #3b3220;
  --gold: #d7ab60;
  --gold-hi: #f2dfae;
  --gold-lo: #9a7433;
  --gold-grad: linear-gradient(115deg, #f6e8c3 0%, #e5c37c 32%, #d7ab60 55%, #bb9243 78%, #8f6c2e 100%);
  --gold-soft: rgba(215, 171, 96, .12);
  --gold-border: rgba(215, 171, 96, .28);
  --text: #f0e9db;
  --muted: #b4a88f;
  --faint: #83785f;
  --emerald: #45b183;
  --emerald-soft: rgba(69, 177, 131, .12);
  --ruby: #e0655c;
  --ruby-soft: rgba(224, 101, 92, .12);
  --r-card: 16px;
  --r-ctl: 12px;
  --pad: clamp(16px, 4.5vw, 24px);
  --ease: cubic-bezier(.22, .7, .3, 1);
  --shadow-pop: 0 18px 50px -18px rgba(0, 0, 0, .75);
}

/* ---------- ریست ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg0);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 14.5px;
  line-height: 1.75;
  min-height: 100dvh;
  overflow-x: clip; /* مهار ایمنی: سرریز افقی، صفحه موبایل را پهن نکند */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* صحنه پس‌زمینه: هاله طلایی + نویز ظریف */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% -10%, rgba(215, 171, 96, .085), transparent 62%),
    radial-gradient(70% 40% at 100% 100%, rgba(215, 171, 96, .04), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0 0.45 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: rgba(215, 171, 96, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1160px; margin: 0 auto; padding-inline: var(--pad); }
.num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }

/* عدد طلایی گرادیانی — امضای برند */
.money {
  font-weight: 900;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.money-unit { font-size: .55em; font-weight: 500; color: var(--muted); -webkit-text-fill-color: var(--muted); }

/* ---------- آیکون ---------- */
.ic { width: 22px; height: 22px; flex-shrink: 0; }
.ic-s { width: 17px; height: 17px; }
.ic-l { width: 28px; height: 28px; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--r-ctl);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s, background .18s, color .18s, filter .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn-gold, a.btn-gold {
  background: var(--gold-grad);
  color: #241a07;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 10px 26px -12px rgba(215, 171, 96, .55);
}
.btn-gold:hover { filter: brightness(1.06); color: #241a07; }
.btn-outline, a.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold);
}
.btn-outline:hover { border-color: var(--gold); background: var(--gold-soft); }
.btn-ghost, a.btn-ghost {
  background: var(--bg3);
  border: 1px solid var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold-border); color: var(--gold-hi); }
.btn-danger, a.btn-danger {
  background: var(--ruby-soft);
  border: 1px solid rgba(224, 101, 92, .4);
  color: var(--ruby);
}
.btn-danger:hover { background: rgba(224, 101, 92, .2); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ---------- کارت و قاب ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent 40%), var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--pad);
}
.card-tight { padding: 14px 16px; }

/* قاب گوشه‌براکت — موتیف امضای طلایار */
.frame {
  position: relative;
  background: linear-gradient(180deg, rgba(215, 171, 96, .055), rgba(215, 171, 96, .015) 55%), var(--bg1);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  padding: var(--pad);
}
.frame::before, .frame::after,
.frame > .fx::before, .frame > .fx::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.frame::before { top: -2px; right: -2px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.frame::after { top: -2px; left: -2px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.frame > .fx::before { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }
.frame > .fx::after { bottom: -2px; left: -2px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }

/* ---------- سرفصل بخش ---------- */
.sec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 16px;
}
.sec:first-child { margin-top: 0; }
.sec .d {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(215, 171, 96, .8);
}
.sec h2, .sec h1 { font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.sec::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, var(--gold-border), transparent);
}
.sec .sec-link {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
}
.sec .sec-link:hover { color: var(--gold); }

.page-head { margin: 4px 0 20px; }
.page-head .crumb { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; display: block; }
.page-head h1 { font-size: clamp(21px, 5.5vw, 27px); font-weight: 900; line-height: 1.4; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- نشان‌ها ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: rgba(215, 171, 96, .25); }
.badge-success { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(69, 177, 131, .25); }
.badge-danger { background: var(--ruby-soft); color: var(--ruby); border-color: rgba(224, 101, 92, .25); }
.badge-muted { background: rgba(180, 168, 143, .1); color: var(--muted); border-color: rgba(180, 168, 143, .18); }

/* نقطه تپنده «زنده» */
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--emerald);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.5); opacity: 1; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- فرم‌ها ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  background: var(--bg3);
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: var(--r-ctl);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 171, 96, .16);
  background: var(--bg2);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled { opacity: .55; cursor: not-allowed; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b4a88f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 38px;
}
input[type="file"] { padding: 8px; font-size: 13px; color: var(--muted); }
input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: 9px;
  padding: 8px 14px;
  margin-inline-end: 12px;
  cursor: pointer;
}
.help-text { font-size: 11.5px; color: var(--faint); margin-top: 5px; line-height: 1.7; }
.error-text { font-size: 12px; color: var(--ruby); margin-top: 5px; }

/* ورودی با پسوند واحد */
.input-unit { position: relative; }
.input-unit input { padding-left: 62px; }
.input-unit .unit {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--faint);
  pointer-events: none;
}

/* سوئیچ */
.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0;
  min-height: 44px;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.switch .track {
  width: 46px;
  height: 26px;
  border-radius: 30px;
  background: var(--bg3);
  border: 1px solid var(--line-2);
  position: relative;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s var(--ease), background .2s;
}
.switch input:checked + .track { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + .track::after { transform: translateX(-19px); background: var(--gold); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* رمز عبور با دکمه نمایش */
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 52px; }
.pw-wrap .pw-toggle {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
}
.pw-wrap .pw-toggle:hover { color: var(--gold); }

/* ---------- گرید و چیدمان ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
/* موبایل: کارت تکِ آخر در گرید دوستونه، تمام‌عرض می‌شود تا چیدمان نامرتب نماند */
@media (max-width: 639px) {
  .grid-2 > :last-child:nth-child(odd):not(:first-child),
  .grid-3 > :last-child:nth-child(odd):not(:first-child),
  .grid-4 > :last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
}
.stack > * + * { margin-top: 14px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- جدول ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.tbl th { color: var(--faint); font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: rgba(215, 171, 96, .035); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .t-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tbl .t-empty { text-align: center; color: var(--faint); padding: 34px 12px; }

/* حالت کارت در موبایل */
@media (max-width: 760px) {
  .tbl--cards thead { display: none; }
  .tbl--cards, .tbl--cards tbody { display: block; }
  .tbl--cards tbody tr {
    display: block;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 6px 16px;
    margin-bottom: 12px;
  }
  .tbl--cards tbody tr:hover { background: var(--bg2); }
  .tbl--cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-bottom: 1px dashed var(--line);
    padding: 10px 0;
    font-size: 13.5px;
    text-align: left;
  }
  .tbl--cards td:last-child { border-bottom: none; }
  .tbl--cards td[data-th]::before {
    content: attr(data-th);
    color: var(--faint);
    font-size: 11.5px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .tbl--cards td.t-empty { display: block; text-align: center; border: none; }
  .tbl--cards .t-actions { justify-content: flex-start; padding-top: 12px; }
  .tbl--cards .t-actions::before { display: none; }
  .tbl--cards .t-actions .btn { flex: 1; }
}

/* فیلتر زنده جدول */
/* سربرگ صفحه‌های پنل: توضیح + دکمه اقدام اصلی */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.phead .pd { font-size: 12px; color: var(--faint); line-height: 1.8; flex: 1; min-width: 180px; }

.tbl-filter { position: relative; margin-bottom: 14px; }
.tbl-filter input { padding-right: 44px; min-height: 46px; }
.tbl-filter .ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }

/* ---------- هشدار و توست ---------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
  border: 1px solid;
}
.alert .ic { margin-top: 2px; }
.alert-success { background: var(--emerald-soft); border-color: rgba(69, 177, 131, .35); color: var(--emerald); }
.alert-danger { background: var(--ruby-soft); border-color: rgba(224, 101, 92, .35); color: var(--ruby); }
.alert-warning { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold); }
.alert ul { margin: 0; padding-inline-start: 16px; }

.toast {
  position: fixed;
  top: 14px;
  right: 50%;
  transform: translate(50%, -130%);
  z-index: 200;
  min-width: min(92vw, 380px);
  max-width: 92vw;
  background: var(--bg1);
  border: 1px solid rgba(69, 177, 131, .5);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  transition: transform .45s var(--ease), opacity .45s;
  opacity: 0;
}
.toast.show { transform: translate(50%, 0); opacity: 1; }
.toast .ic { color: var(--emerald); }
.toast--error { border-color: rgba(224, 101, 92, .5); }
.toast--error .ic { color: var(--ruby); }

/* ---------- هدر عمومی ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(12, 10, 7, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(215, 171, 96, .14);
}
.topbar .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: var(--pad);
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand-emblem {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 171, 96, .16), transparent 72%);
  padding: 2px;
  flex-shrink: 0;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name b { font-size: 16.5px; font-weight: 900; letter-spacing: -.01em; }
.brand-name span { font-size: 9.5px; color: var(--gold); font-weight: 500; opacity: .85; }
.topnav { display: none; }
.topbar-side { display: flex; align-items: center; gap: 8px; }

/* چیپ قیمت زنده */
.livechip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--gold-border);
  border-radius: 30px;
  padding: 7px 13px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}
.livechip .lbl { font-size: 9.5px; color: var(--faint); display: block; }
.livechip .val { font-size: 13px; font-weight: 900; }

/* ---------- ناوبری پایین موبایل ---------- */
.bottomnav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: rgba(15, 12, 8, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(215, 171, 96, .18);
  padding-bottom: env(safe-area-inset-bottom);
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 8px 2px 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  position: relative;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.bn-item .ic { width: 23px; height: 23px; }
.bn-item.active { color: var(--gold); }
.bn-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg) translateY(-1px);
  box-shadow: 0 0 8px rgba(215, 171, 96, .9);
}
.bn-fab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding-bottom: 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bn-fab .fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #241a07;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  border: 4px solid var(--bg0);
  box-shadow: 0 8px 22px -6px rgba(215, 171, 96, .6);
}
.bn-fab .fab .ic { width: 24px; height: 24px; }
body.has-bottomnav { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
body.has-bottomnav .footer { padding-bottom: 20px; }

/* ---------- فوتر ---------- */
.footer { margin-top: 56px; position: relative; }
.footer::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--gold-border) 30%, var(--gold-border) 70%, transparent);
}
.footer .f-diamond {
  position: absolute;
  top: -4px;
  right: 50%;
  transform: translateX(50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(215, 171, 96, .8);
}
.footer .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px var(--pad) 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer .f-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer .f-brand img { width: 52px; height: 52px; object-fit: contain; }
.footer .f-brand b { font-size: 15px; font-weight: 900; color: var(--text); }
.footer .f-brand span { font-size: 11px; color: var(--faint); }
.footer .f-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 12.5px; }
.footer .f-links a { color: var(--muted); padding: 6px 0; }
.footer .f-links a:hover { color: var(--gold); }
.footer .f-social { display: flex; gap: 10px; }
.footer .f-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}
.footer .f-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer .f-copy { font-size: 11px; color: var(--faint); }

/* ---------- هیرو صفحه اصلی ---------- */
.hero { position: relative; padding: 30px 0 6px; overflow: hidden; }
.hero .emblem-glow {
  position: absolute;
  top: -40px;
  left: -60px;
  width: 300px;
  opacity: .07;
  filter: saturate(.4);
  pointer-events: none;
  transform: rotate(-12deg);
}
.hero h1 { font-size: clamp(25px, 7vw, 40px); font-weight: 900; line-height: 1.45; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); font-size: clamp(13px, 3.6vw, 15px); margin-top: 8px; max-width: 460px; }

/* تابلو قیمت زنده */
.priceboard { margin-top: 22px; }
.priceboard .pb-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.priceboard .pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.priceboard .pb-cell .l { font-size: 11px; color: var(--faint); margin-bottom: 2px; }
.priceboard .pb-cell .v { font-size: clamp(19px, 5.6vw, 26px); }
.priceboard .pb-cell .v .money-unit { font-size: .5em; }
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1; min-width: 150px; }

/* ---------- ردیف اسکرول افقی (موبایل) ---------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 14px;
  margin-inline: -2px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--wide { grid-auto-columns: 72%; }

/* ---------- کارت محصول ---------- */
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  color: var(--text);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
  position: relative;
}
.pcard:hover { border-color: var(--gold-border); transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.pcard .ph { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--bg3); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .ph img { transform: scale(1.05); }
.pcard .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 7, .5), transparent 38%);
}
.pcard .ph .chip {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-hi);
  background: rgba(12, 10, 7, .72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(215, 171, 96, .3);
  border-radius: 20px;
  padding: 3px 9px;
}
.pcard .pb { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard .pt { font-size: 13px; font-weight: 700; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard .ps { font-size: 11px; color: var(--faint); }
.pcard .pp { margin-top: auto; padding-top: 6px; font-size: 15.5px; }
.pcard .pp .money-unit { font-size: .62em; }

/* پلیس‌هولدر تصویر: نقش برند */
.ph-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(215, 171, 96, .3);
  background:
    radial-gradient(circle at center, rgba(215, 171, 96, .07), transparent 70%),
    var(--bg3);
}
.ph-empty .ic { width: 38%; height: 38%; }

/* ---------- کارت فروشنده ---------- */
.scard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  color: var(--text);
  overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
/* موبایل: کارت فروشنده ردیف کامل می‌گیرد تا نام و ستاره‌ها جا شوند */
@media (max-width: 639px) {
  .grid > .scard { grid-column: 1 / -1; }
}
.scard:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.scard .slogo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold-border);
  padding: 2px;
  background: var(--bg3);
  flex-shrink: 0;
}
.scard .slogo-empty {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px dashed var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--gold-soft);
}
.scard .sb { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.scard .sn { display: block; max-width: 100%; font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .sm { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.scard > .ic { color: var(--faint); }

/* ستاره امتیاز */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.stars .st { width: 14px; height: 14px; color: var(--gold); }
.stars .st.off { color: var(--line-2); }
.stars .cnt { font-size: 11px; color: var(--faint); margin-inline-start: 5px; }

/* ---------- صفحه محصول ---------- */
.gallery .gmain {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1/1;
  background: var(--bg3);
}
.gallery .gmain img { width: 100%; height: 100%; object-fit: cover; }
.gallery .gthumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.gallery .gthumbs::-webkit-scrollbar { display: none; }
.gallery .gthumbs button {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  padding: 0;
  cursor: pointer;
  background: var(--bg3);
  flex-shrink: 0;
  transition: border-color .2s;
}
.gallery .gthumbs button.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(215, 171, 96, .25); }
.gallery .gthumbs img { width: 100%; height: 100%; object-fit: cover; }

.spec-row { display: flex; flex-wrap: wrap; gap: 8px; }
.spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 13px;
  font-size: 12px;
  color: var(--muted);
}
.spec b { color: var(--text); font-weight: 700; }
.spec .ic { width: 15px; height: 15px; color: var(--gold); }

/* شفافیت قیمت */
.breakdown { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.breakdown summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  -webkit-tap-highlight-color: transparent;
}
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary .ic { transition: transform .25s var(--ease); margin-inline-start: auto; width: 17px; height: 17px; }
.breakdown[open] summary .ic { transform: rotate(180deg); }
.breakdown .rows { padding: 6px 16px; }
.breakdown .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}
.breakdown .row:last-child { border-bottom: none; }
.breakdown .row b { color: var(--text); font-weight: 700; }
.breakdown .row.total { color: var(--text); font-weight: 800; }
.breakdown .row .neg { color: var(--emerald); }

/* نوار CTA چسبان موبایل */
.stickybuy {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 95;
  background: rgba(15, 12, 8, .94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--gold-border);
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
}
.stickybuy .sp { flex: 1; min-width: 0; }
.stickybuy .sp .l { font-size: 10px; color: var(--faint); }
.stickybuy .sp .v { font-size: 17px; white-space: nowrap; }
.stickybuy .btn { flex-shrink: 0; min-width: 132px; }
body.has-stickybuy { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
body.has-stickybuy .bottomnav { display: none; }

/* ---------- کیف پول طلا ---------- */
.goldcard {
  position: relative;
  border-radius: 18px;
  padding: 24px 22px 20px;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(140% 100% at 85% -20%, rgba(215, 171, 96, .22), transparent 55%),
    linear-gradient(150deg, #26200f 0%, #171309 55%, #1d160a 100%);
  border: 1px solid rgba(215, 171, 96, .35);
  box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(246, 232, 195, .14);
}
/* گیوشه: حکاکی خطی امنیتی */
.goldcard::before {
  content: "";
  position: absolute;
  inset: -60% -20%;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 15% 120%, transparent 0 9px, rgba(215, 171, 96, .05) 9px 10px),
    repeating-radial-gradient(circle at 90% -30%, transparent 0 11px, rgba(215, 171, 96, .05) 11px 12px);
}
.goldcard::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 14px;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(246, 232, 195, .5), transparent);
}
.goldcard .gc-emblem {
  position: absolute;
  left: -34px;
  bottom: -44px;
  width: 190px;
  opacity: .1;
  pointer-events: none;
}
.goldcard .gc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.goldcard .gc-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.goldcard .gc-balance { margin-top: 14px; position: relative; line-height: 1.15; }
.goldcard .gc-balance .g { font-size: clamp(34px, 10vw, 46px); }
.goldcard .gc-balance .g .money-unit { font-size: .38em; }
.goldcard .gc-toman { font-size: 13px; color: var(--muted); margin-top: 8px; position: relative; }
.goldcard .gc-toman b { color: var(--gold-hi); font-weight: 800; }
.goldcard .gc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(215, 171, 96, .18);
  font-size: 11px;
  color: var(--faint);
  position: relative;
  flex-wrap: wrap;
}

/* سوئیچ خرید/فروش */
.segtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg3);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.segtabs button {
  min-height: 46px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .25s var(--ease), color .25s;
  -webkit-tap-highlight-color: transparent;
}
.segtabs button.active[data-seg="buy"] { background: var(--emerald-soft); color: var(--emerald); box-shadow: inset 0 0 0 1px rgba(69, 177, 131, .4); }
.segtabs button.active[data-seg="sell"] { background: var(--ruby-soft); color: var(--ruby); box-shadow: inset 0 0 0 1px rgba(224, 101, 92, .4); }

.trade-pane { display: none; }
.trade-pane.active { display: block; animation: fadeup .35s var(--ease); }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.amount-field { text-align: center; padding: 8px 0 2px; }
.amount-field label { text-align: center; }
.amount-field input {
  text-align: center;
  font-size: 27px;
  font-weight: 900;
  min-height: 64px;
  border-radius: 16px;
  caret-color: var(--gold);
  direction: ltr;
  font-feature-settings: "tnum";
}
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.chips button {
  border: 1px solid var(--line-2);
  background: var(--bg3);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 30px;
  padding: 9px 15px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.chips button:hover, .chips button:active { border-color: var(--gold); color: var(--gold); }
.convert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.convert .cv { font-size: 21px; }
.trade-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.8;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px dashed var(--line-2);
}
.trade-note .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--gold); flex-shrink: 0; }

/* تایم‌لاین تراکنش/اعلان */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: flex;
  gap: 13px;
  padding: 14px 2px;
  border-bottom: 1px dashed var(--line);
  align-items: flex-start;
}
.tl-item:last-child { border-bottom: none; }
.tl-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
}
.tl-ic.buy { color: var(--emerald); background: var(--emerald-soft); border-color: rgba(69, 177, 131, .3); }
.tl-ic.sell { color: var(--ruby); background: var(--ruby-soft); border-color: rgba(224, 101, 92, .3); }
.tl-ic.gold { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-border); }
.tl-ic .ic { width: 19px; height: 19px; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tl-meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.8; }
.tl-side { text-align: left; flex-shrink: 0; }
.tl-side .v { font-size: 14px; font-weight: 800; }
.tl-side .d { font-size: 10.5px; color: var(--faint); margin-top: 3px; }

/* ---------- استت‌تایل ---------- */
.stat {
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent 40%), var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 44%;
  height: 1.5px;
  background: linear-gradient(to left, var(--gold), transparent);
}
.stat .s-head { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11px; margin-bottom: 8px; }
.stat .s-head .ic { width: 16px; height: 16px; color: var(--gold); }
.stat .s-val { font-size: clamp(19px, 5vw, 24px); line-height: 1.3; }
.stat .s-sub { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* ---------- auth ---------- */
.auth-scene {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px var(--pad);
  position: relative;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; text-align: center; }
.auth-brand img { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 8px 28px rgba(215, 171, 96, .35)); }
.auth-brand b { font-size: 21px; font-weight: 900; }
.auth-brand span { font-size: 11.5px; color: var(--muted); }
.auth-card .frame { padding: 26px 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-back { position: absolute; top: 18px; right: var(--pad); font-size: 12.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; }
.auth-back:hover { color: var(--gold); }

/* ---------- پوسته پنل (ادمین/فروشنده) ---------- */
.panel { min-height: 100dvh; }
.panel-top {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding-inline: 14px var(--pad);
  background: rgba(12, 10, 7, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.panel-top .menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.panel-top .pt-title { font-size: 15px; font-weight: 800; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-top .brand-emblem { width: 36px; height: 36px; }

.side {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(300px, 86vw);
  z-index: 120;
  background: var(--bg1);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .32s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.side.open { transform: none; box-shadow: -30px 0 80px rgba(0, 0, 0, .6); }
.scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 4, 2, .6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.scrim.show { opacity: 1; pointer-events: auto; }

.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.side-brand img { width: 42px; height: 42px; object-fit: contain; }
.side-brand .t b { display: block; font-size: 15px; font-weight: 900; }
.side-brand .t span { font-size: 10px; color: var(--gold); }
.side-close {
  margin-inline-start: auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.side-nav { flex: 1; padding: 10px 12px 16px; }
.side-group { margin-top: 14px; }
.side-group > span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--faint);
  padding: 0 12px 6px;
  opacity: .8;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 45px;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  position: relative;
  transition: background .18s, color .18s;
  margin-bottom: 2px;
}
.side-nav a .ic { width: 19px; height: 19px; opacity: .8; }
.side-nav a:hover { color: var(--text); background: rgba(215, 171, 96, .06); }
.side-nav a.active { color: var(--gold); background: var(--gold-soft); }
.side-nav a.active::before {
  content: "";
  position: absolute;
  right: -12px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(215, 171, 96, .7);
}
.side-foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.side-user .u b { display: block; font-size: 13px; font-weight: 700; }
.side-user .u span { font-size: 11px; color: var(--faint); direction: ltr; unicode-bidi: embed; display: block; text-align: right; }

.panel-main { padding: var(--pad) var(--pad) 60px; max-width: 1060px; margin: 0 auto; }

/* ---------- صفحه‌بندی ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pager a:hover { border-color: var(--gold); color: var(--gold); }
.pager .cur { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.pager .dots, .pager .dis { border-color: var(--line); color: var(--faint); opacity: .55; }

/* ---------- حالت خالی ---------- */
.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--faint);
  font-size: 13px;
}
.empty .ic { width: 44px; height: 44px; color: rgba(215, 171, 96, .35); margin: 0 auto 12px; display: block; }

/* ---------- انیمیشن ورود ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   دسکتاپ (≥900px) — فقط قابل‌استفاده و تمیز؛ موبایل اولویت است
   ============================================================ */
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .rail { grid-auto-columns: 30%; }
  .rail--wide { grid-auto-columns: 42%; }
}

@media (min-width: 900px) {
  body { font-size: 15px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .rail { grid-auto-columns: 23%; }
  .rail--wide { grid-auto-columns: 31%; }
  .bottomnav { display: none; }
  body.has-bottomnav { padding-bottom: 0; }
  .topnav { display: flex; align-items: center; gap: 26px; }
  .topnav a { color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 8px 2px; position: relative; }
  .topnav a:hover { color: var(--text); }
  .topnav a.active { color: var(--gold); }
  .topnav a.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 20%;
    left: 20%;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
  }
  .topbar .inner { height: 76px; }
  .brand-emblem { width: 58px; height: 58px; }
  .stickybuy { display: none; }
  body.has-stickybuy { padding-bottom: 0; }
  .hero { padding-top: 48px; }
  .hero .emblem-glow { width: 430px; left: -40px; top: -60px; opacity: .08; }
  .footer .inner { flex-direction: row; justify-content: space-between; text-align: right; align-items: flex-start; padding-block: 40px; }
  .footer .f-brand { align-items: flex-start; }
  .footer .f-links { justify-content: flex-start; }

  /* پنل: سایدبار ثابت */
  .panel { display: flex; }
  .side {
    position: sticky;
    top: 0;
    height: 100dvh;
    transform: none;
    flex-shrink: 0;
    z-index: 40;
    box-shadow: none;
  }
  .side.open { box-shadow: none; }
  .scrim { display: none; }
  .side-close { display: none; }
  .panel-body { flex: 1; min-width: 0; }
  .panel-top .menu-btn { display: none; }
  .panel-top { padding-inline: 28px; }
  .panel-main { padding: 28px 28px 70px; }
}

@media (min-width: 1200px) {
  .rail { grid-auto-columns: 18.5%; }
}
