:root {
  --spc-primary: #2d2e7d;
  --spc-primary-dark: #22235f;
  --spc-primary-soft: #eef0f8;
  --spc-bg: #f4f5f8;
  --spc-card: #ffffff;
  --spc-border: #e4e6ef;
  --spc-text: #1f2430;
  --spc-muted: #6b7280;
  --spc-up: #16a34a;
  --spc-up-bg: #e8f8ee;
  --spc-down: #dc2626;
  --spc-down-bg: #fdecec;
  --spc-usd: #0d9488;
  --spc-radius: 12px;
  --spc-shadow: 0 4px 18px rgba(45, 46, 125, 0.08);
  /* تایپوگرافی */
  --spc-fs-xs: 0.72rem;
  --spc-fs-sm: 0.8rem;
  --spc-fs-md: 0.875rem;
  --spc-fs-base: 0.9375rem;
  --spc-fs-lg: 1.05rem;
  --spc-fs-xl: 1.15rem;
  /* فاصله‌ها */
  --spc-space-1: 4px;
  --spc-space-2: 8px;
  --spc-space-3: 12px;
  --spc-space-4: 16px;
  --spc-space-5: 20px;
  --spc-space-6: 24px;
}

.spc-wrap {
  /* فونت سایت (Elementor / IranSansX) — نه فونت پیش‌فرض مرورگر */
  font-family: var(--e-global-typography-primary-font-family, iransansx), iransansx, IranSansx, Tahoma, sans-serif;
  color: var(--spc-text);
  font-size: var(--spc-fs-base);
  line-height: 1.65;
  margin: 0 0 var(--spc-space-6);
  box-sizing: border-box;
  text-align: right;
}

.spc-wrap *,
.spc-wrap *::before,
.spc-wrap *::after {
  box-sizing: border-box;
}

.spc-wrap button,
.spc-wrap input,
.spc-wrap select,
.spc-wrap textarea,
.spc-wrap table,
.spc-wrap th,
.spc-wrap td {
  font-family: inherit;
}

/* ---- Page hero (عنوان + خلاصه بازار) ---- */
.spc-page-hero {
  position: relative;
  margin: 0 0 var(--spc-space-4);
  padding: 22px 22px 20px;
  border-radius: calc(var(--spc-radius) + 4px);
  border: 1px solid rgba(45, 46, 125, 0.12);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(45, 46, 125, 0.12), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(13, 148, 136, 0.08), transparent 50%),
    linear-gradient(165deg, #ffffff 0%, #f6f7fc 100%);
  box-shadow: var(--spc-shadow);
  overflow: hidden;
}

.spc-page-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--spc-primary) 0%, #0d9488 100%);
  border-radius: 4px 0 0 4px;
}

.spc-page-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 12px;
}

.spc-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--spc-primary);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.spc-page-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(45, 46, 125, 0.06);
  border: 1px solid rgba(45, 46, 125, 0.1);
  color: var(--spc-muted);
  font-size: var(--spc-fs-xs);
  line-height: 1.35;
  white-space: nowrap;
  width: max-content;
  max-width: none;
}

.spc-page-meta strong {
  color: var(--spc-primary-dark);
  font-weight: 700;
}

.spc-page-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spc-up);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  flex-shrink: 0;
}

.spc-page-summary {
  margin: 0;
  max-width: 58rem;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  line-height: 1.95;
  color: #3a4150;
}

.spc-hl {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 7px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.spc-hl-total {
  color: var(--spc-primary);
  background: rgba(45, 46, 125, 0.1);
}

.spc-hl-up {
  color: #15803d;
  background: var(--spc-up-bg);
}

.spc-hl-down {
  color: #b91c1c;
  background: var(--spc-down-bg);
}

/* ---- Stats ---- */
.spc-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--spc-space-3);
}

.spc-stat-card {
  background: var(--spc-card);
  border: 1px solid var(--spc-border);
  border-radius: var(--spc-radius);
  box-shadow: var(--spc-shadow);
  padding: var(--spc-space-4);
  display: flex;
  align-items: center;
  gap: var(--spc-space-3);
  min-height: 92px;
}

.spc-stat-body {
  min-width: 0;
  flex: 1;
  text-align: right;
}

.spc-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f3f4f8;
  color: var(--spc-primary);
  border: 1px solid rgba(45, 46, 125, 0.08);
}

.spc-stat-icon svg {
  display: block;
}

.spc-icon-car {
  color: var(--spc-primary);
  background: #eef0f8;
}

.spc-icon-up {
  color: var(--spc-up);
  background: #f0faf3;
  border-color: rgba(22, 163, 74, 0.12);
}

.spc-icon-down {
  color: var(--spc-down);
  background: #fdf4f4;
  border-color: rgba(220, 38, 38, 0.12);
}

.spc-icon-diff {
  color: #0369a1;
  background: #f0f7fc;
  border-color: rgba(3, 105, 161, 0.12);
}

.spc-icon-chart {
  color: #0f766e;
  background: #f0fafa;
  border-color: rgba(15, 118, 110, 0.12);
}

.spc-stat-value {
  font-size: var(--spc-fs-lg);
  font-weight: 800;
  color: var(--spc-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.spc-stat-label {
  font-size: var(--spc-fs-xs);
  color: var(--spc-muted);
  margin-top: var(--spc-space-1);
  line-height: 1.5;
}

.spc-stat-sub {
  display: inline;
  color: var(--spc-text);
  font-size: var(--spc-fs-xs);
  font-weight: 600;
}

/* Tooltip خلاقانه برای نام خودرو */
.spc-stat-tip {
  position: relative;
  overflow: visible;
  cursor: default;
  transition: transform .25s ease, box-shadow .25s ease;
}

.spc-stat-tip.has-tip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(45, 46, 125, 0.16);
  border-color: rgba(45, 46, 125, 0.35);
  z-index: 5;
}

.spc-tip {
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: calc(100% + 10px);
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--spc-primary) 0%, #3d3f9a 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(45, 46, 125, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  pointer-events: none;
  text-align: center;
}

.spc-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #3d3f9a;
}

.spc-stat-tip.has-tip:hover .spc-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.spc-tip-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.spc-tip-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  animation: spc-tip-shine 1.2s ease both;
}

.spc-stat-tip.has-tip:hover .spc-tip-name {
  animation: spc-tip-shine 0.7s ease both;
}

@keyframes spc-tip-shine {
  0% {
    opacity: 0;
    letter-spacing: 0.12em;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    letter-spacing: normal;
    filter: blur(0);
  }
}

.spc-update-bar {
  margin-top: var(--spc-space-3);
  padding: 10px var(--spc-space-4);
  background: var(--spc-primary-soft);
  border-radius: 8px;
  font-size: var(--spc-fs-sm);
  color: var(--spc-primary-dark);
  text-align: right;
  line-height: 1.5;
}

/* ---- Panels / Tables ---- */
.spc-panel {
  background: var(--spc-card);
  border: 1px solid var(--spc-border);
  border-radius: var(--spc-radius);
  box-shadow: var(--spc-shadow);
  overflow: visible;
}

.spc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spc-space-3);
  padding: 14px var(--spc-space-4);
  border-bottom: 1px solid var(--spc-border);
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.spc-panel-title,
.spc-wrap h1.spc-panel-title,
.spc-wrap h2.spc-panel-title {
  margin: 0;
  padding: 0;
  font-size: var(--spc-fs-lg);
  font-weight: 800;
  color: var(--spc-primary);
  line-height: 1.4;
  text-align: right;
}

.spc-btn-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--spc-primary);
  color: #fff !important;
  text-decoration: none !important;
  font-size: var(--spc-fs-sm);
  font-weight: 600;
  line-height: 1.3;
  transition: background .2s ease;
  white-space: nowrap;
}

.spc-btn-all:hover {
  background: var(--spc-primary-dark);
  color: #fff !important;
}

.spc-count-badge {
  font-size: var(--spc-fs-xs);
  color: var(--spc-primary);
  background: var(--spc-primary-soft);
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.3;
}

.spc-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.spc-table th,
.spc-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--spc-border);
  font-size: var(--spc-fs-md);
  line-height: 1.5;
  vertical-align: middle;
}

.spc-table thead th {
  background: var(--spc-primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--spc-fs-sm);
  white-space: nowrap;
  letter-spacing: 0;
  padding: 13px 14px;
}

/* ستون‌های عددی: وسط‌چین */
.spc-table th.spc-num,
.spc-table td.spc-num,
.spc-table .spc-usd-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* درصد/مبلغ تغییر: RTL تا علامت +/− پشت عدد بماند
   (تم سایت روی th,td جهت ltr !important گذاشته) */
.spc-table td.spc-num.spc-up,
.spc-table td.spc-num.spc-down,
.spc-table td.spc-num.spc-flat {
  direction: rtl !important;
  unicode-bidi: isolate;
}

/* تب‌های افزایش/کاهش/اختلاف: نام = بلندترین اسم؛ باقی عرض بین ستون‌های عددی */
.spc-tabs .spc-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}

.spc-tabs .spc-table th.spc-name-col,
.spc-tabs .spc-table td.spc-name-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.spc-tabs .spc-table th.spc-num,
.spc-tabs .spc-table td.spc-num {
  width: auto;
  white-space: nowrap;
}

.spc-tabs .spc-table .spc-car-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.spc-tabs .spc-table .spc-car-main {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.spc-tabs .spc-table .spc-car-name,
.spc-tabs .spc-table .spc-car-brand {
  white-space: nowrap;
  text-align: right;
}

/* نمای کلی بازار — پایه */
.spc-overview-panel .spc-table {
  max-width: 100%;
  min-width: 0;
}

.spc-table tbody tr:nth-child(even) {
  background: #f8f9fc;
}

.spc-table tbody tr:hover {
  background: #eef1fa;
}

.spc-row-total td {
  font-weight: 700;
  background: var(--spc-primary-soft) !important;
  color: var(--spc-primary-dark);
}

.spc-car-name {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0;
  font-weight: 700;
  font-size: var(--spc-fs-md);
  color: var(--spc-text);
  unicode-bidi: normal;
  direction: rtl;
  text-align: right;
  max-width: 100%;
  line-height: 1.45;
}

.spc-table td .spc-car-name {
  direction: rtl !important;
}

.spc-usd-cell,
.spc-usd-text {
  color: var(--spc-usd);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
}

.spc-car-name .spc-rtl,
.spc-tip-name .spc-rtl,
.spc-stat-sub .spc-rtl {
  unicode-bidi: isolate;
  direction: rtl;
}

.spc-ltr {
  display: inline-block;
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
}

.spc-tip-name,
.spc-stat-sub {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  direction: rtl;
  unicode-bidi: normal;
}

.spc-car-brand {
  display: block;
  font-size: var(--spc-fs-xs);
  color: var(--spc-muted);
  margin-top: 3px;
  line-height: 1.4;
  text-align: right;
}

.spc-up {
  color: var(--spc-up) !important;
  font-weight: 700;
}

.spc-down {
  color: var(--spc-down) !important;
  font-weight: 700;
}

.spc-flat {
  color: var(--spc-muted);
}

.spc-empty,
.spc-empty-cell {
  text-align: center;
  color: var(--spc-muted);
  padding: var(--spc-space-6) var(--spc-space-3);
  font-size: var(--spc-fs-md);
}

.spc-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--spc-space-5);
  min-height: 220px;
  background:
    radial-gradient(circle at top, rgba(45, 46, 125, 0.06), transparent 55%),
    linear-gradient(180deg, #fbfcff 0%, #f5f6fb 100%);
}

.spc-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spc-space-4);
  background: var(--spc-primary-soft);
  color: var(--spc-primary);
  box-shadow: inset 0 0 0 1px rgba(45, 46, 125, 0.08);
}

.spc-empty-up .spc-empty-icon {
  background: var(--spc-up-bg);
  color: var(--spc-up);
}

.spc-empty-down .spc-empty-icon {
  background: var(--spc-down-bg);
  color: var(--spc-down);
}

.spc-empty-title {
  font-size: var(--spc-fs-base);
  font-weight: 800;
  color: var(--spc-primary-dark);
  margin-bottom: var(--spc-space-2);
  line-height: 1.4;
}

.spc-empty-text {
  max-width: 280px;
  font-size: var(--spc-fs-sm);
  line-height: 1.65;
  color: var(--spc-muted);
}

/* ---- Mid board: tabs + overview 50/50 (در RTL: تب‌ها راست، نمای کلی چپ) ---- */
.spc-mid-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spc-space-4);
  align-items: stretch;
}

.spc-mid-board > .spc-mid-col,
.spc-mid-board > .spc-wrap {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: auto;
  min-height: 100%;
}

.spc-mid-board .spc-panel {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.spc-mid-board .spc-table-scroll {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* دسکتاپ: جدول نمای کلی کل ارتفاع باکس را پر کند */
.spc-mid-board .spc-overview-panel .spc-table-scroll {
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
  flex: 1 1 auto;
}

.spc-mid-board .spc-overview-panel .spc-table {
  width: 100%;
  height: 100%;
  margin: 0;
  table-layout: fixed;
}

.spc-mid-board .spc-overview-panel .spc-table tbody {
  height: 100%;
}

.spc-mid-board .spc-overview-panel .spc-table tbody tr {
  height: 25%;
}

.spc-mid-board .spc-overview-panel .spc-table th,
.spc-mid-board .spc-overview-panel .spc-table td {
  vertical-align: middle;
  padding-top: 10px;
  padding-bottom: 10px;
}

.spc-overview-panel .spc-table th.spc-label-col,
.spc-overview-panel .spc-table td.spc-label-col {
  width: auto;
  white-space: nowrap;
}

.spc-overview-panel .spc-table th.spc-num,
.spc-overview-panel .spc-table td.spc-num {
  width: auto;
  white-space: nowrap;
}

.spc-overview-panel .spc-table th,
.spc-overview-panel .spc-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.4;
}

.spc-mid-board .spc-tabs .spc-tab-panel.is-active {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.spc-mid-board .spc-tabs .spc-tab-panel.is-active .spc-table-scroll {
  flex: 1;
}

/* نوار عنوان نمای کلی — هم‌ارتفاع با نوار تب‌ها */
.spc-overview-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spc-space-2);
  padding: 14px var(--spc-space-4);
  border-bottom: 1px solid var(--spc-border);
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
  flex-shrink: 0;
}

.spc-overview-bar .spc-panel-title {
  margin: 0;
}

.spc-mid-board .spc-overview-bar {
  padding: var(--spc-space-3);
  background: #f7f8fc;
  /* ارتفاع تقریبی یک ردیف دکمه تب (شامل wrap متن) */
  min-height: calc(var(--spc-space-3) * 2 + 9px * 2 + 1.4em * 2);
  box-sizing: border-box;
}

.spc-mid-board .spc-tab-nav {
  min-height: calc(var(--spc-space-3) * 2 + 9px * 2 + 1.4em * 2);
  box-sizing: border-box;
  align-items: center;
}

/* ---- Tabs (سه تب کنار هم مثل طرح) ---- */
.spc-tab-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--spc-space-2);
  padding: var(--spc-space-3);
  background: #f7f8fc;
  border-bottom: 1px solid var(--spc-border);
}

.spc-tab-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--spc-primary);
  font-family: inherit;
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: .15s ease;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  line-height: 1.4;
  white-space: normal;
}

.spc-tab-btn:hover {
  color: var(--spc-primary);
  background: #fff;
}

.spc-tab-btn.is-active {
  background: var(--spc-primary);
  color: #fff;
  border-color: var(--spc-primary);
}

.spc-tab-panel {
  display: none;
}

.spc-tab-panel.is-active {
  display: block;
}

.spc-type-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 12px 8px;
  background: #fff;
  border-bottom: 1px solid var(--spc-border);
}

.spc-type-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(45, 46, 125, 0.14);
  border-radius: 999px;
  background: #f7f8fc;
  color: var(--spc-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: .15s ease;
}

.spc-type-btn:hover {
  background: #eef0f8;
  border-color: rgba(45, 46, 125, 0.22);
}

.spc-type-btn.is-active {
  background: linear-gradient(135deg, #2d2e7d 0%, #3d4ca8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(45, 46, 125, 0.18);
}

.spc-type-panel {
  display: none;
}

.spc-type-panel.is-active {
  display: block;
}

.spc-mid-board .spc-tabs .spc-tab-panel.is-active .spc-type-panel.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.spc-mid-board .spc-tabs .spc-tab-panel.is-active .spc-type-panel.is-active .spc-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
}

.spc-diff-all-row td {
  padding: 0 !important;
  background: linear-gradient(180deg, #f7f8ff 0%, #eef1fa 100%) !important;
  border-bottom: 0;
}

.spc-diff-all-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  color: var(--spc-primary);
  font-weight: 800;
  font-size: var(--spc-fs-sm);
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
  direction: rtl !important;
}

.spc-diff-all-link svg {
  flex-shrink: 0;
}

.spc-diff-all-link:hover {
  background: rgba(45, 46, 125, 0.08);
  color: var(--spc-primary-dark);
}

.spc-empty-state .spc-diff-all-link {
  width: auto;
  margin: 12px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(45, 46, 125, 0.18);
  background: #fff;
}

/* ---- Brand groups (view=all) + sticky header ---- */
.spc-brand-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--spc-border);
  background: var(--spc-primary-soft) !important;
  text-align: right;
}

.spc-brand-label,
.spc-cars-all h2.spc-brand-label {
  display: block;
  margin: 0;
  padding: 11px var(--spc-space-4);
  color: var(--spc-primary-dark);
  font-weight: 800;
  font-size: var(--spc-fs-md);
  text-align: right;
  line-height: 1.4;
}

.spc-find {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--spc-space-4) 16px;
  border-bottom: 1px solid var(--spc-border);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(45, 46, 125, 0.08), transparent 60%),
    linear-gradient(180deg, #fcfcff 0%, #f7f8fc 100%);
}

.spc-find-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: block;
  margin: 0;
}

.spc-find-field .spc-find-ico {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 16px;
  left: auto;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--spc-primary);
  pointer-events: none;
}

.spc-wrap input.spc-find-input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 52px 0 48px;
  padding-inline-start: 52px;
  padding-inline-end: 48px;
  border: 1px solid rgba(45, 46, 125, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--spc-text);
  font-size: 0.98rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(45, 46, 125, 0.07);
  appearance: none;
  -webkit-appearance: none;
}

.spc-find-input::-webkit-search-cancel-button,
.spc-find-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.spc-find-input::placeholder {
  color: #8b90a5;
}

.spc-find-input:focus {
  outline: none;
  border-color: var(--spc-primary);
  box-shadow: 0 0 0 4px rgba(45, 46, 125, 0.12), 0 10px 28px rgba(45, 46, 125, 0.08);
}

.spc-wrap button.spc-find-clear {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 8px;
  right: auto;
  bottom: auto;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: var(--spc-primary-soft);
  color: var(--spc-primary-dark);
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.spc-wrap button.spc-find-clear:hover {
  background: #e2e5f4;
}

.spc-find-status {
  flex: 0 0 auto;
  margin: 0;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  white-space: nowrap;
}

.spc-find-empty {
  margin: 16px var(--spc-space-4) 18px;
  padding: 22px 18px;
  border: 1px dashed rgba(45, 46, 125, 0.22);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.spc-find-empty strong,
.spc-find-empty span {
  display: block;
}

.spc-find-empty strong {
  color: var(--spc-primary-dark);
  font-size: var(--spc-fs-base);
}

.spc-find-empty span {
  margin-top: 4px;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
}

.spc-cars-all tr[hidden],
.spc-period-all tr[hidden],
.spc-factory-diff tr[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .spc-find {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 14px 14px;
  }

  .spc-find-input {
    height: 46px;
    font-size: 0.92rem;
  }

  .spc-find-status {
    text-align: right;
  }
}

/* ---- جستجوی صفحه اول ---- */
html.spc-home-searching {
  overflow: hidden;
}

.spc-home-find {
  margin: 22px 0 10px;
  position: relative;
}

.spc-home-find-bar {
  position: relative;
  z-index: 2;
  padding: 18px 18px 14px;
  border: 1px solid rgba(45, 46, 125, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% -10%, rgba(45, 46, 125, 0.16), transparent 46%),
    radial-gradient(90% 110% at 0% 110%, rgba(13, 148, 136, 0.12), transparent 42%),
    linear-gradient(165deg, #ffffff 0%, #f4f6fc 100%);
  box-shadow:
    0 16px 40px rgba(45, 46, 125, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.spc-home-find-bar::before {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 46, 125, 0.12), transparent 68%);
  pointer-events: none;
}

.spc-home-find-intro {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 4px 12px;
}

.spc-home-find-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 46, 125, 0.12), rgba(13, 148, 136, 0.12));
  color: var(--spc-primary);
  font-size: 0.76rem;
  font-weight: 800;
  flex: 0 1 auto;
  min-width: 0;
}

.spc-home-find-intro .spc-find-status {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--spc-muted);
}

.spc-home-find-hint {
  margin: 0;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
  line-height: 1.7;
}

.spc-home-find-bar .spc-find {
  position: relative;
  z-index: 1;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.spc-home-find-bar .spc-find-input {
  height: 54px;
  border-radius: 16px;
  border-color: rgba(45, 46, 125, 0.14);
  box-shadow: 0 12px 28px rgba(45, 46, 125, 0.08);
}

.spc-home-find-bar .spc-find-empty {
  margin: 14px 0 4px;
}

.spc-home-find.is-active {
  position: fixed;
  inset: 0;
  z-index: 99990;
  margin: 0;
  padding: calc(14px + var(--spc-admin-offset, 0px)) 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
}

.spc-home-find.is-active .spc-home-find-shade {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.spc-home-find.is-active .spc-home-find-bar,
.spc-home-find.is-active .spc-home-find-layer,
.spc-home-find.is-active .spc-find-empty {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  isolation: isolate;
  transform: translateZ(0);
}

.spc-home-find.is-active .spc-home-find-bar {
  flex: 0 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid rgba(45, 46, 125, 0.12);
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(12, 16, 36, 0.2);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

.spc-home-find.is-active .spc-home-find-intro {
  display: flex;
  margin-bottom: 8px;
}

.spc-home-find.is-active .spc-home-find-kicker {
  display: none;
}

.spc-home-find.is-active .spc-home-find-intro .spc-find-status {
  margin-inline-start: auto;
}

.spc-home-find.is-active .spc-home-find-bar .spc-find-input {
  height: 56px;
  background: #fff !important;
  border-color: rgba(45, 46, 125, 0.16);
  box-shadow: 0 8px 20px rgba(45, 46, 125, 0.08);
}

.spc-home-find.is-active .spc-home-find-layer {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.spc-home-find.is-active .spc-home-find-panel {
  flex: 1 1 auto;
  margin-top: 0;
  max-height: none;
  min-height: 0;
  border: 1px solid rgba(45, 46, 125, 0.12);
  background: #fff !important;
  box-shadow: 0 22px 48px rgba(12, 16, 36, 0.22);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

.spc-home-find.is-active .spc-home-find-panel-head {
  background: #f5f6fb !important;
}

.spc-home-find.is-active .spc-home-find-orb {
  display: none !important;
}

.spc-home-find.is-active .spc-find-empty:not([hidden]) {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

.spc-home-find-layer[hidden] {
  display: none !important;
}

.spc-home-find-shade[hidden] {
  display: none !important;
}

.spc-home-find-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
  overflow: hidden;
  background: rgba(15, 18, 32, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: spc-home-shade-in 0.28s ease both;
}

.spc-home-find-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  opacity: 0.9;
}

.spc-home-find-orb-a {
  top: 12%;
  right: 8%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(99, 112, 214, 0.45), transparent 68%);
  animation: spc-home-orb 9s ease-in-out infinite;
}

.spc-home-find-orb-b {
  bottom: 8%;
  left: 6%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35), transparent 70%);
  animation: spc-home-orb 11s ease-in-out infinite reverse;
}

.spc-home-find-orb-c {
  top: 42%;
  left: 42%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 72%);
  animation: spc-home-orb 7s ease-in-out infinite;
}

.spc-home-find-panel {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  border: 1px solid rgba(45, 46, 125, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(12, 16, 36, 0.18);
  overflow: hidden;
  max-height: min(68vh, 640px);
  display: flex;
  flex-direction: column;
  animation: spc-home-panel-in 0.42s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.spc-home-find-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488 0%, #2d2e7d 55%, #6366f1 100%);
  opacity: 0.9;
}

.spc-home-find-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(45, 46, 125, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.18) 100%);
  color: var(--spc-primary-dark);
}

.spc-home-find-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.spc-home-find-panel-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #2d2e7d 0%, #3f4db0 55%, #0d9488 140%);
  box-shadow: 0 10px 20px rgba(45, 46, 125, 0.28);
}

.spc-home-find-panel-title strong,
.spc-home-find-panel-title em {
  display: block;
}

.spc-home-find-panel-title strong {
  font-size: 0.95rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1.35;
}

.spc-home-find-panel-title em {
  margin-top: 2px;
  color: var(--spc-muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
}

.spc-home-find-count {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(45, 46, 125, 0.1);
  color: var(--spc-primary);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.spc-home-find-panel .spc-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.spc-home-find-table {
  width: 100%;
  table-layout: auto;
}

/* ستون نام مثل جدول «قیمت خودروهای وارداتی امروز» — فقط همین جدول سرچ */
.spc-home-find-table th.spc-name-cell,
.spc-home-find-table td.spc-name-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.spc-home-find-type {
  display: inline-flex;
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 46, 125, 0.1), rgba(13, 148, 136, 0.12));
  color: var(--spc-primary);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.4;
}

.spc-home-find tr[hidden] {
  display: none !important;
}

.spc-home-find-panel .spc-table thead th {
  background: linear-gradient(135deg, #2a2b74 0%, #33368f 55%, #1f6f6a 140%) !important;
}

.spc-home-find-panel .spc-table tbody tr {
  background: #fff;
  transition: background 0.18s ease;
}

.spc-home-find-panel .spc-table tbody tr:nth-child(even) {
  background: #f7f8fc;
}

.spc-home-find-panel .spc-table tbody tr:hover {
  background: #eef1fa;
}

@keyframes spc-home-shade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spc-home-panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spc-home-orb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -14px, 0) scale(1.08); }
}

@media (max-width: 720px) {
  .spc-home-find-bar {
    padding: 14px 12px 12px;
    border-radius: 20px;
  }

  .spc-home-find-hint {
    font-size: 0.78rem;
  }

  .spc-home-find-panel {
    max-height: min(62vh, 520px);
    border-radius: 20px;
  }

  .spc-home-find-panel-title em {
    display: none;
  }

  .spc-home-find-table th.spc-name-cell,
  .spc-home-find-table td.spc-name-cell {
    width: 1%;
    white-space: normal;
  }

  .spc-home-find-table th.spc-num,
  .spc-home-find-table td.spc-num {
    font-size: 0.78rem;
  }

  .spc-home-find-orb-a,
  .spc-home-find-orb-b,
  .spc-home-find-orb-c {
    width: 160px;
    height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spc-home-find-shade,
  .spc-home-find-panel,
  .spc-home-find-orb,
  .spc-home-find.is-active .spc-find-empty:not([hidden]) {
    animation: none !important;
  }
}

.spc-table-sticky-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.spc-cars-all .spc-panel {
  overflow: visible;
}

/* کلون هدر ثابت (JS) */
.spc-sticky-clone {
  position: fixed;
  z-index: 100000;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(45, 46, 125, 0.22);
  border-radius: 0 0 10px 10px;
  background: var(--spc-primary);
  font-family: var(--e-global-typography-primary-font-family, iransansx), iransansx, IranSansx, Tahoma, sans-serif;
}

.spc-sticky-clone.is-live {
  pointer-events: auto;
}

.spc-sticky-clone[hidden] {
  display: none !important;
}

.spc-sticky-clone-scroll {
  overflow: hidden;
  width: 100%;
}

.spc-sticky-clone-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: var(--spc-primary);
}

.spc-sticky-clone-table thead th {
  background: var(--spc-primary) !important;
  color: #fff !important;
  font-weight: 700;
  white-space: nowrap;
  padding: 13px 14px;
  text-align: right;
  font-size: var(--spc-fs-sm);
  border: 0;
  box-shadow: none;
}

.spc-sticky-clone-table thead th.spc-num {
  text-align: center;
}

.spc-sticky-clone-table tbody {
  display: none;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .spc-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spc-mid-board {
    grid-template-columns: 1fr;
    align-items: start;
  }

  /* موبایل/تبلت: باکس به اندازه داده — بدون کش آمدن */
  .spc-mid-board > .spc-mid-col,
  .spc-mid-board > .spc-wrap {
    min-height: 0;
    height: auto;
  }

  .spc-mid-board .spc-panel {
    height: auto;
    min-height: 0;
    flex: 0 1 auto;
  }

  .spc-mid-board .spc-table-scroll,
  .spc-mid-board .spc-overview-panel .spc-table-scroll,
  .spc-mid-board .spc-tabs .spc-tab-panel.is-active,
  .spc-mid-board .spc-tabs .spc-tab-panel.is-active .spc-table-scroll {
    flex: 0 1 auto;
    min-height: 0;
  }

  .spc-mid-board .spc-overview-panel {
    overflow: hidden;
  }

  .spc-mid-board .spc-overview-panel .spc-table-scroll {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .spc-mid-board .spc-overview-panel .spc-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    table-layout: auto;
  }

  .spc-mid-board .spc-overview-panel .spc-table tbody,
  .spc-mid-board .spc-overview-panel .spc-table tbody tr {
    height: auto;
  }

  .spc-mid-board .spc-overview-bar,
  .spc-mid-board .spc-tab-nav {
    min-height: 0;
  }

  .spc-overview-panel .spc-table th.spc-label-col,
  .spc-overview-panel .spc-table td.spc-label-col,
  .spc-overview-panel .spc-table th.spc-num,
  .spc-overview-panel .spc-table td.spc-num {
    width: 1%;
  }
}

@media (max-width: 720px) {
  .spc-page-hero {
    padding: 16px 14px 15px;
    margin-bottom: var(--spc-space-3);
    border-radius: var(--spc-radius);
  }

  .spc-page-hero::before {
    width: 3px;
  }

  .spc-page-hero-top {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 10px;
    margin-bottom: 10px;
  }

  .spc-page-title {
    font-size: 1.18rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .spc-page-meta {
    flex: 0 0 auto;
    max-width: none;
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 3px 7px;
    gap: 4px;
  }

  .spc-page-meta-dot {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
  }

  .spc-page-summary {
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .spc-hl {
    padding: 0 6px;
  }

  /* فقط موبایل: باکس نمای کلی دقیقاً به اندازه جدول — دسکتاپ دست نخورده */
  .spc-mid-board .spc-mid-overview,
  .spc-mid-board .spc-mid-overview .spc-overview-panel {
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
  }

  .spc-mid-board .spc-overview-panel {
    display: block;
    overflow: hidden;
    max-width: 100%;
  }

  .spc-mid-board .spc-overview-bar {
    min-height: 0 !important;
    padding: 12px 14px;
  }

  .spc-mid-board .spc-overview-panel .spc-table-scroll {
    display: block;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .spc-mid-board .spc-overview-panel .spc-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    height: auto !important;
  }

  .spc-mid-board .spc-overview-panel .spc-table tbody,
  .spc-mid-board .spc-overview-panel .spc-table tbody tr {
    height: auto !important;
  }

  .spc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spc-space-2);
  }

  .spc-stat-card-total {
    display: none;
  }

  .spc-stat-card {
    min-height: 0;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: var(--spc-space-2);
    text-align: right;
  }

  .spc-stats .spc-stat-icon {
    display: none;
  }

  .spc-stat-body {
    text-align: right;
  }

  .spc-stat-value {
    font-size: var(--spc-fs-base);
  }

  .spc-stat-label {
    font-size: 0.68rem;
    line-height: 1.45;
  }

  .spc-stat-sub {
    display: block;
    margin-top: 2px;
  }

  .spc-stat-card-avg {
    grid-column: auto;
  }

  .spc-panel-head {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  .spc-panel-title {
    font-size: var(--spc-fs-base);
  }

  .spc-table th,
  .spc-table td {
    padding: 10px 11px;
    font-size: 0.82rem;
  }

  .spc-table thead th {
    padding: 11px;
    font-size: 0.75rem;
  }

  .spc-tab-btn {
    font-size: 0.7rem;
    padding: 8px 6px;
  }

  .spc-type-nav {
    gap: 6px;
    padding: 8px 10px 6px;
  }

  .spc-type-btn {
    padding: 7px 6px;
    font-size: 0.72rem;
  }
}

/* ---- Period leaders (برترین درصدها) ---- */
.spc-period-leaders {
  margin-bottom: var(--spc-space-6);
}

.spc-pl-panel {
  overflow: hidden;
}

.spc-pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(45, 46, 125, 0.1), transparent 55%),
    linear-gradient(180deg, #fafbff 0%, #fff 100%);
  border-bottom: 1px solid var(--spc-border);
}

.spc-pl-head-text .spc-panel-title {
  margin: 0 0 6px;
}

.spc-pl-sub {
  margin: 0;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
  line-height: 1.6;
}

.spc-pl-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 16px;
  background: #f7f8fc;
  border-bottom: 1px solid var(--spc-border);
}

.spc-pl-tab {
  appearance: none;
  border: 1px solid rgba(45, 46, 125, 0.16);
  background: #fff;
  color: var(--spc-primary);
  font-family: inherit;
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  line-height: 1.45;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: .18s ease;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(45, 46, 125, 0.04);
}

.spc-pl-tab-full {
  display: inline;
}

.spc-pl-tab-short {
  display: none;
}

.spc-pl-tab:hover {
  background: #eef0f8;
  border-color: rgba(45, 46, 125, 0.28);
}

.spc-pl-tab.is-active {
  background: var(--spc-primary);
  color: #fff;
  border-color: var(--spc-primary);
  box-shadow: 0 8px 18px rgba(45, 46, 125, 0.18);
}

.spc-pl-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--spc-border);
  background: #fff;
}

.spc-period-all .spc-pl-toolbar {
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
}

.spc-pl-range-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.spc-pl-range-caption {
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  color: var(--spc-primary-dark);
  white-space: nowrap;
}

.spc-pl-range-select-wrap {
  position: relative;
  display: inline-flex;
  min-width: 160px;
}

.spc-pl-range-select-wrap::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-left: 2px solid var(--spc-primary);
  border-bottom: 2px solid var(--spc-primary);
  transform: translateY(-65%) rotate(-45deg);
  pointer-events: none;
}

.spc-pl-range-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 160px;
  padding: 10px 14px 10px 34px;
  border: 1px solid rgba(45, 46, 125, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f7f8fc 100%);
  color: var(--spc-primary-dark);
  font-family: inherit;
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(45, 46, 125, 0.06);
}

.spc-pl-range-select:focus {
  outline: none;
  border-color: rgba(45, 46, 125, 0.4);
  box-shadow: 0 0 0 3px rgba(45, 46, 125, 0.12);
}

.spc-pl-views {
  min-height: 180px;
}

.spc-pl-view[hidden] {
  display: none !important;
}

/* جدول برترین درصدها: نام = بلندترین اسم؛ باقی عرض بین ستون‌های عددی */
.spc-pl-table.spc-table,
.spc-pl-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}

.spc-pl-table th.spc-name-col,
.spc-pl-table td.spc-name-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.spc-pl-table th.spc-num,
.spc-pl-table td.spc-num {
  width: auto;
  white-space: nowrap;
  text-align: center;
}

.spc-pl-table .spc-car-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.spc-pl-table .spc-car-main {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.spc-pl-table .spc-car-name,
.spc-pl-table .spc-car-brand {
  white-space: nowrap;
  text-align: right;
}

.spc-pa-view[hidden] {
  display: none !important;
}

.spc-sort-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.spc-sort-th {
  cursor: pointer;
}

.spc-sort-mark {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.45);
  opacity: 0.7;
}

.spc-sort-th.is-desc .spc-sort-mark {
  border-top-color: #fff;
  opacity: 1;
}

.spc-sort-th.is-asc .spc-sort-mark {
  border-top: 0;
  border-bottom: 5px solid #fff;
  opacity: 1;
}

.spc-pa-table {
  width: 100%;
}

.spc-pa-table th.spc-name-col,
.spc-pa-table td.spc-name-col {
  text-align: right;
}

@media (max-width: 720px) {
  .spc-pl-head {
    flex-direction: column;
    align-items: stretch;
  }

  .spc-pl-head .spc-btn-all {
    align-self: flex-start;
  }

  .spc-period-all .spc-pl-range-label {
    width: 100%;
    justify-content: space-between;
  }

  .spc-period-all .spc-pl-range-select-wrap {
    flex: 1;
    min-width: 0;
  }

  .spc-period-all .spc-pl-range-select {
    min-width: 0;
    width: 100%;
  }

  .spc-pa-table {
    min-width: 720px;
  }
}

@media (max-width: 720px) {
  .spc-period-leaders .spc-pl-head {
    padding: 14px 14px 12px;
  }

  .spc-period-leaders .spc-pl-sub {
    font-size: 0.78rem;
  }

  /* موبایل: ۲ ستون × ۲ ردیف — متن کوتاه همیشه دیده شود */
  .spc-period-leaders .spc-pl-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 10px;
  }

  .spc-period-leaders .spc-pl-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--spc-primary);
    background: #fff;
    border: 1.5px solid rgba(45, 46, 125, 0.2);
    box-shadow: 0 2px 8px rgba(45, 46, 125, 0.08);
  }

  .spc-period-leaders .spc-pl-tab.is-active {
    color: #fff;
    background: var(--spc-primary);
    border-color: var(--spc-primary);
    box-shadow: 0 6px 14px rgba(45, 46, 125, 0.25);
  }

  .spc-period-leaders .spc-pl-tab-full {
    display: none !important;
  }

  .spc-period-leaders .spc-pl-tab-short {
    display: inline !important;
    color: inherit;
    font-weight: 700;
  }

  .spc-period-leaders .spc-pl-toolbar {
    padding: 10px 12px;
  }

  .spc-period-leaders .spc-pl-range-label {
    width: 100%;
    justify-content: space-between;
  }

  .spc-period-leaders .spc-pl-range-select-wrap {
    flex: 1;
    min-width: 0;
  }

  .spc-period-leaders .spc-pl-range-select {
    min-width: 0;
    width: 100%;
  }

  .spc-period-leaders .spc-pl-table {
    width: 100%;
    min-width: 480px;
  }
}

/* ---- Car cell + chart button ---- */
.spc-car-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spc-car-main {
  min-width: 0;
  flex: 1;
}

/* موبایل: ستون نام مثل جدول مونتاژی — فقط به اندازه محتوا */
@media (max-width: 720px) {
  .spc-cars-list .spc-table {
    table-layout: auto;
    min-width: 560px;
  }

  .spc-cars-list .spc-name-cell {
    width: 1%;
    white-space: normal;
  }

  /* تب‌های رتبه: عرض ثابت بین داخلی/مونتاژی/وارداتی */
  .spc-tabs .spc-type-nav {
    gap: 0;
    margin: 0;
    padding: 8px;
    background: #f3f4f9;
    border-bottom: 1px solid var(--spc-border);
  }

  .spc-tabs .spc-type-btn {
    flex: 1 1 0;
    min-height: 40px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .spc-tabs .spc-type-btn.is-active {
    background: #fff;
    color: var(--spc-primary-dark);
    box-shadow: 0 4px 12px rgba(45, 46, 125, 0.12);
  }

  .spc-tabs .spc-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0;
  }

  .spc-tabs .spc-type-panel.is-active {
    width: 100%;
    min-height: 280px;
  }

  .spc-tabs .spc-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .spc-tabs .spc-table th.spc-name-col,
  .spc-tabs .spc-table td.spc-name-col {
    width: 38% !important;
    min-width: 0 !important;
    white-space: normal !important;
    padding-left: 6px;
    padding-right: 8px;
  }

  .spc-tabs .spc-table th.spc-num:nth-child(2),
  .spc-tabs .spc-table td.spc-num:nth-child(2) {
    width: 36% !important;
  }

  .spc-tabs .spc-table th.spc-num:nth-child(3),
  .spc-tabs .spc-table td.spc-num:nth-child(3) {
    width: 26% !important;
  }

  .spc-tabs .spc-table th.spc-num,
  .spc-tabs .spc-table td.spc-num {
    padding-left: 4px;
    padding-right: 4px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.78rem;
  }

  .spc-tabs .spc-table thead th.spc-num {
    white-space: normal;
    line-height: 1.3;
    font-size: 0.66rem;
  }

  .spc-tabs .spc-table .spc-car-cell {
    gap: 4px;
  }

  .spc-tabs .spc-chart-btn {
    width: 30px;
    height: 30px;
  }

  .spc-tabs .spc-table .spc-car-name,
  .spc-tabs .spc-table .spc-car-brand {
    white-space: normal !important;
  }

  .spc-tabs .spc-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .spc-period-leaders .spc-pl-table {
    table-layout: auto;
    min-width: 560px;
  }

  .spc-pl-table th.spc-name-col,
  .spc-pl-table td.spc-name-col {
    width: 1% !important;
    min-width: 0;
    white-space: normal !important;
  }

  .spc-pl-table .spc-car-name,
  .spc-pl-table .spc-car-brand {
    white-space: normal !important;
  }

  .spc-period-all .spc-pa-table {
    table-layout: auto;
    min-width: 560px;
  }

  .spc-pa-table th.spc-name-col,
  .spc-pa-table td.spc-name-col {
    width: 1% !important;
    min-width: 0;
    white-space: normal !important;
  }

  .spc-pa-table .spc-car-name,
  .spc-pa-table .spc-car-brand {
    white-space: normal !important;
  }
}

.spc-chart-btn {
  appearance: none;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(45, 46, 125, 0.14);
  background: linear-gradient(180deg, #f7f8ff 0%, #eef0f8 100%);
  color: var(--spc-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  padding: 0;
  overflow: visible;
  animation: spc-chart-ring 4.8s ease-in-out infinite;
}

.spc-chart-ico {
  display: block;
  overflow: visible;
}

.spc-chart-ico-axis {
  opacity: 0.45;
}

.spc-chart-ico-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: spc-chart-draw 4.8s ease-in-out infinite;
}

.spc-chart-ico-dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: spc-chart-dot 4.8s ease-in-out infinite;
}

.spc-chart-ico-dot.spc-d1 { animation-delay: 0s; }
.spc-chart-ico-dot.spc-d2 { animation-delay: 0s; }
.spc-chart-ico-dot.spc-d3 { animation-delay: 0s; }
.spc-chart-ico-dot.spc-d4 { animation-delay: 0s; }

.spc-chart-ico-spark {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: spc-chart-spark 4.8s ease-in-out infinite;
}

/* موج ناهم‌زمان روی ردیف‌ها */
.spc-table tbody tr:nth-child(4n) .spc-chart-btn,
.spc-table tbody tr:nth-child(4n) .spc-chart-ico-line,
.spc-table tbody tr:nth-child(4n) .spc-chart-ico-dot,
.spc-table tbody tr:nth-child(4n) .spc-chart-ico-spark {
  animation-delay: -1.2s;
}

.spc-table tbody tr:nth-child(4n+1) .spc-chart-btn,
.spc-table tbody tr:nth-child(4n+1) .spc-chart-ico-line,
.spc-table tbody tr:nth-child(4n+1) .spc-chart-ico-dot,
.spc-table tbody tr:nth-child(4n+1) .spc-chart-ico-spark {
  animation-delay: -2.4s;
}

.spc-table tbody tr:nth-child(4n+2) .spc-chart-btn,
.spc-table tbody tr:nth-child(4n+2) .spc-chart-ico-line,
.spc-table tbody tr:nth-child(4n+2) .spc-chart-ico-dot,
.spc-table tbody tr:nth-child(4n+2) .spc-chart-ico-spark {
  animation-delay: -3.6s;
}

.spc-table tbody tr:nth-child(4n+3) .spc-chart-btn,
.spc-table tbody tr:nth-child(4n+3) .spc-chart-ico-line,
.spc-table tbody tr:nth-child(4n+3) .spc-chart-ico-dot,
.spc-table tbody tr:nth-child(4n+3) .spc-chart-ico-spark {
  animation-delay: -0.5s;
}

/* نقاط با آفست داخلی نسبت به رسم خط */
.spc-table tbody tr .spc-chart-ico-dot.spc-d1 { animation-name: spc-chart-dot-1; }
.spc-table tbody tr .spc-chart-ico-dot.spc-d2 { animation-name: spc-chart-dot-2; }
.spc-table tbody tr .spc-chart-ico-dot.spc-d3 { animation-name: spc-chart-dot-3; }
.spc-table tbody tr .spc-chart-ico-dot.spc-d4 { animation-name: spc-chart-dot-4; }

@keyframes spc-chart-draw {
  0%, 8% { stroke-dashoffset: 100; }
  42% { stroke-dashoffset: 0; }
  78%, 100% { stroke-dashoffset: 0; }
}

@keyframes spc-chart-dot-1 {
  0%, 12% { opacity: 0; transform: scale(0.4); }
  18%, 78% { opacity: 1; transform: scale(1); }
  90%, 100% { opacity: 0.35; transform: scale(0.85); }
}

@keyframes spc-chart-dot-2 {
  0%, 20% { opacity: 0; transform: scale(0.4); }
  26%, 78% { opacity: 1; transform: scale(1); }
  90%, 100% { opacity: 0.35; transform: scale(0.85); }
}

@keyframes spc-chart-dot-3 {
  0%, 28% { opacity: 0; transform: scale(0.4); }
  34%, 78% { opacity: 1; transform: scale(1); }
  90%, 100% { opacity: 0.35; transform: scale(0.85); }
}

@keyframes spc-chart-dot-4 {
  0%, 36% { opacity: 0; transform: scale(0.4); }
  44% { opacity: 1; transform: scale(1.35); }
  52%, 78% { opacity: 1; transform: scale(1); }
  90%, 100% { opacity: 0.45; transform: scale(0.9); }
}

@keyframes spc-chart-spark {
  0%, 40% { opacity: 0; transform: scale(0.2); }
  46% { opacity: 0.35; transform: scale(1.8); }
  56% { opacity: 0; transform: scale(2.4); }
  100% { opacity: 0; transform: scale(0.2); }
}

@keyframes spc-chart-ring {
  0%, 38% {
    box-shadow: 0 0 0 0 rgba(45, 46, 125, 0);
    border-color: rgba(45, 46, 125, 0.14);
  }
  48% {
    box-shadow: 0 0 0 4px rgba(45, 46, 125, 0.14);
    border-color: rgba(45, 46, 125, 0.32);
  }
  62%, 100% {
    box-shadow: 0 0 0 0 rgba(45, 46, 125, 0);
    border-color: rgba(45, 46, 125, 0.14);
  }
}

.spc-chart-btn:hover,
.spc-chart-btn:focus-visible {
  animation: none;
}

.spc-chart-btn:hover .spc-chart-ico-line,
.spc-chart-btn:focus-visible .spc-chart-ico-line {
  animation: none;
  stroke-dashoffset: 0;
}

.spc-chart-btn:hover .spc-chart-ico-dot,
.spc-chart-btn:focus-visible .spc-chart-ico-dot {
  animation: none;
  opacity: 1;
  transform: scale(1);
}

.spc-chart-btn:hover .spc-chart-ico-spark,
.spc-chart-btn:focus-visible .spc-chart-ico-spark {
  animation: none;
  opacity: 0;
}

.spc-chart-btn:hover {
  transform: translateY(-1px) scale(1.04);
  background: var(--spc-primary);
  color: #fff;
  border-color: var(--spc-primary);
  box-shadow: 0 8px 18px rgba(45, 46, 125, 0.22);
}

.spc-chart-btn:focus-visible {
  outline: 2px solid rgba(45, 46, 125, 0.35);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .spc-chart-btn,
  .spc-chart-ico-line,
  .spc-chart-ico-dot,
  .spc-chart-ico-spark {
    animation: none !important;
  }

  .spc-chart-ico-line {
    stroke-dashoffset: 0;
  }

  .spc-chart-ico-dot {
    opacity: 1;
  }

  .spc-chart-ico-spark {
    opacity: 0;
  }
}

/* فهرست‌های بلند: آیکون نمودار بماند، انیمیشن رسم خاموش شود */
.spc-cars-all .spc-chart-btn,
.spc-period-all .spc-chart-btn,
.spc-factory-diff .spc-chart-btn,
.spc-cars-all .spc-chart-ico-line,
.spc-period-all .spc-chart-ico-line,
.spc-factory-diff .spc-chart-ico-line,
.spc-cars-all .spc-chart-ico-dot,
.spc-period-all .spc-chart-ico-dot,
.spc-factory-diff .spc-chart-ico-dot,
.spc-cars-all .spc-chart-ico-spark,
.spc-period-all .spc-chart-ico-spark,
.spc-factory-diff .spc-chart-ico-spark {
  animation: none !important;
}

.spc-cars-all .spc-chart-ico-line,
.spc-period-all .spc-chart-ico-line,
.spc-factory-diff .spc-chart-ico-line {
  stroke-dashoffset: 0;
}

.spc-cars-all .spc-chart-ico-dot,
.spc-period-all .spc-chart-ico-dot,
.spc-factory-diff .spc-chart-ico-dot {
  opacity: 1;
  transform: none;
}

.spc-cars-all .spc-chart-ico-spark,
.spc-period-all .spc-chart-ico-spark,
.spc-factory-diff .spc-chart-ico-spark {
  opacity: 0;
}

/* ---- Chart Modal ---- */
html.spc-modal-open {
  overflow: hidden;
}

.spc-modal[hidden] {
  display: none !important;
}

.spc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--e-global-typography-primary-font-family, iransansx), iransansx, IranSansx, Tahoma, sans-serif;
}

.spc-modal button,
.spc-modal input,
.spc-modal select,
.spc-modal table,
.spc-modal th,
.spc-modal td {
  font-family: inherit;
}

.spc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 40, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: spc-fade-in .2s ease;
}

.spc-modal-dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(20, 22, 70, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: spc-pop-in .28s cubic-bezier(.2, .9, .25, 1);
  direction: rtl;
}

.spc-modal-glow {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 140px;
  background: radial-gradient(ellipse at top right, rgba(45, 46, 125, 0.18), transparent 60%);
  pointer-events: none;
}

.spc-modal-head {
  position: relative;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spc-space-4);
  padding: var(--spc-space-5) var(--spc-space-5) var(--spc-space-3);
}

.spc-modal-visual {
  position: relative;
  width: 168px;
  height: 112px;
}

.spc-modal-car-stage {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 100%, rgba(45, 46, 125, 0.06), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f7f8fc 48%, #eef1f8 100%);
  border: 1px solid rgba(45, 46, 125, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(45, 46, 125, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spc-modal-car-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  box-shadow: inset 0 0 28px 10px rgba(247, 248, 252, 0.95);
}

.spc-modal-car-glow {
  position: absolute;
  inset: auto 12% 6% 12%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20, 22, 60, 0.18), transparent 70%);
  filter: blur(3px);
  z-index: 1;
}

.spc-modal-car-img {
  position: relative;
  z-index: 2;
  max-width: 94%;
  max-height: 88%;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mix-blend-mode: multiply;
  filter: contrast(1.04) saturate(1.05);
  transform: translateY(4px) scale(1.4);
  opacity: 0;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .2, 1);
}

.spc-modal-visual.is-loaded .spc-modal-car-img {
  opacity: 1;
  transform: translateY(0) scale(1.5);
}

.spc-modal-car-fallback {
  position: relative;
  z-index: 2;
  color: rgba(45, 46, 125, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spc-modal-car-fallback[hidden],
.spc-modal-car-img[hidden],
.spc-chart-car-img[hidden] {
  display: none !important;
}

.spc-modal-car-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.45) 48%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.spc-modal-visual.is-loaded .spc-modal-car-shine {
  animation: spc-car-shine 1.1s ease .15s both;
}

@keyframes spc-car-shine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.spc-modal-head-text {
  min-width: 0;
  text-align: right;
}

.spc-modal-eyebrow {
  font-size: var(--spc-fs-xs);
  font-weight: 700;
  color: var(--spc-primary);
  background: var(--spc-primary-soft);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.spc-modal-title {
  margin: 0;
  font-size: var(--spc-fs-xl);
  font-weight: 800;
  color: #1a1b4b;
  line-height: 1.45;
  text-align: right;
}

.spc-modal-sub {
  margin-top: 4px;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
  line-height: 1.45;
  text-align: right;
}

.spc-modal-close {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--spc-border);
  background: #fff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .15s ease;
}

.spc-modal-close:hover {
  background: #f3f4f8;
  color: var(--spc-primary);
}

.spc-range-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--spc-space-2);
  padding: 0 var(--spc-space-5) var(--spc-space-3);
  overflow: visible;
}

.spc-range-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  border: 1px solid rgba(45, 46, 125, 0.12);
  background: #f6f7fc;
  color: var(--spc-primary-dark);
  font-family: inherit;
  font-size: var(--spc-fs-sm);
  font-weight: 700;
  line-height: 1.25;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: .15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  text-align: center;
}

.spc-range-btn:hover {
  background: #fff;
  border-color: rgba(45, 46, 125, 0.28);
}

.spc-range-btn.is-active {
  background: linear-gradient(135deg, #2d2e7d 0%, #3f4199 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(45, 46, 125, 0.22);
}

.spc-range-label-short {
  display: none;
}

.spc-range-label-full {
  display: inline;
}

.spc-modal-body {
  padding: 0 var(--spc-space-5) var(--spc-space-5);
}

.spc-modal-actions {
  display: flex;
  justify-content: center;
  padding: 4px 0 2px;
}

.spc-export-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(45, 46, 125, 0.16);
  background: linear-gradient(135deg, #2d2e7d 0%, #3f4199 100%);
  color: #fff;
  font-family: inherit;
  font-size: var(--spc-fs-sm);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(45, 46, 125, 0.22);
  transition: .18s ease;
}

.spc-export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 46, 125, 0.28);
}

.spc-export-btn:disabled,
.spc-export-btn.is-busy {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.spc-export-btn svg {
  display: block;
  flex-shrink: 0;
}

/* فریم مخفی خروجی استوری ۹:۱۶ */
.spc-story-frame {
  position: fixed;
  left: -12000px;
  top: 0;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  font-family: iransansx, IranSansx, Tahoma, sans-serif;
  color: #fff;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
}

.spc-story-frame *,
.spc-story-frame *::before,
.spc-story-frame *::after {
  box-sizing: border-box;
}

.spc-story-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(63, 65, 153, 0.55), transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(13, 148, 136, 0.28), transparent 50%),
    linear-gradient(165deg, #12142a 0%, #1a1c3d 48%, #101226 100%);
}

.spc-story-inner {
  --spc-story-gap: 20px;
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 56px 56px 56px;
  display: flex;
  flex-direction: column;
  gap: var(--spc-story-gap);
  justify-content: flex-start;
}

/* هیرو: عکس بزرگ ماشین + نام کنار هم */
.spc-story-hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 28px 30px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  min-height: 360px;
  flex: 0 0 auto;
}

.spc-story-hero.has-car {
  /* RTL: ستون اول = متن راست، ستون دوم = عکس بزرگ چپ */
  grid-template-columns: 0.9fr 1.2fr;
  gap: 18px;
  min-height: 460px;
  padding: 22px 28px 22px 16px;
}

.spc-story-hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  height: 100%;
  /* زمینه رنگی زیر عکس برای پوشش بک‌گراند سفید */
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.1) 0%, transparent 58%),
    radial-gradient(circle at 50% 50%, rgba(45, 46, 125, 0.55) 0%, rgba(18, 20, 42, 0.2) 70%, transparent 100%);
  border-radius: 28px;
  overflow: hidden;
}

.spc-story-hero-ring {
  position: absolute;
  width: min(90%, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 18px rgba(45, 46, 125, 0.18),
    inset 0 0 40px rgba(255, 255, 255, 0.06);
}

.spc-story-hero-glow {
  position: absolute;
  width: min(85%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(94, 234, 212, 0.3) 0%, rgba(45, 46, 125, 0.22) 45%, transparent 72%);
  filter: blur(2px);
}

.spc-story-hero-img {
  position: relative;
  z-index: 2;
  /* بزرگ‌نمایی با حفظ نسبت اصلی — بدون کشیدن عرض */
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 400px;
  object-fit: contain;
  object-position: center;
  /* بک‌گراند سفید عکس در زمینه تیره محو می‌شود */
  mix-blend-mode: multiply;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.4));
  transform: scale(1.12);
  transform-origin: center center;
}

/* لایه کمکی روی عکس‌های خیلی روشن */
.spc-story-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 70%, transparent 35%, rgba(18, 20, 42, 0.28) 100%);
}

.spc-story-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  padding: 8px 4px 8px 8px;
}

.spc-story-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 22px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.spc-story-title {
  margin: 0;
  font-size: 48px;
  line-height: 1.3;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.spc-story-hero.has-car .spc-story-title {
  font-size: 44px;
}

.spc-story-sub {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.spc-story-range {
  align-self: flex-start;
  margin-top: 4px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2d2e7d 0%, #3f4199 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(20, 22, 70, 0.35);
}

.spc-story-chart-block {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spc-story-gap);
  flex: 0 0 auto;
  min-height: 0;
}

.spc-story-chart-wrap {
  position: relative;
  flex: 0 0 auto;
  min-height: 320px;
  max-height: 440px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* قیمت روز: یک ردیف، خیلی کوچک، وسطِ بالای نمودار */
.spc-story-live-pins {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  direction: rtl;
  max-width: calc(100% - 28px);
}

.spc-story-live-pin {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 22, 70, 0.16);
  border: 1px solid rgba(45, 46, 125, 0.1);
  white-space: nowrap;
  line-height: 1;
}

.spc-story-live-pin.is-toman {
  background: linear-gradient(135deg, #2d2e7d 0%, #3f4199 100%);
  border-color: transparent;
  color: #fff;
}

.spc-story-live-pin.is-usd {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: transparent;
  color: #fff;
}

.spc-story-live-pin span,
.spc-story-live-pin strong,
.spc-story-live-pin em {
  display: inline;
  margin: 0;
  padding: 0;
  font-style: normal;
  letter-spacing: normal;
  white-space: nowrap;
}

.spc-story-live-pin span {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

.spc-story-live-pin strong {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.spc-story-live-pin em {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

.spc-story-chart-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spc-story-gap);
  margin: 0;
}

.spc-story-date-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: center;
}

.spc-story-date-item span {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  text-align: center;
}

.spc-story-date-item strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.spc-story-chart {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.spc-story-chart-empty {
  color: #6b7280;
  font-size: 28px;
  font-weight: 700;
}

.spc-story-stats {
  margin: 0;
  flex: 0 0 auto;
}

.spc-story-table-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 28px 26px 24px;
  margin: 0;
}

.spc-story-table-title {
  margin: 0 0 18px;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  text-align: right;
}

.spc-story-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2430;
}

.spc-story-table th,
.spc-story-table td {
  padding: 22px 18px;
  text-align: center;
  font-size: 30px;
  line-height: 1.35;
  border-bottom: 1px solid #e5e7f0;
}

.spc-story-table thead th {
  background: #2d2e7d;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  border-bottom: none;
}

.spc-story-table tbody tr:last-child td {
  border-bottom: none;
}

.spc-story-table .spc-story-unit {
  font-weight: 800;
  color: #2d2e7d;
  text-align: right;
  padding-right: 22px;
  white-space: nowrap;
  width: 22%;
}

.spc-story-table td.is-up {
  color: #15803d !important;
  font-weight: 800;
}

.spc-story-table td.is-down {
  color: #b91c1c !important;
  font-weight: 800;
}

.spc-story-table td.is-flat {
  color: #4b5563 !important;
  font-weight: 700;
}

.spc-story-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.spc-story-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: right;
}

.spc-story-mini span {
  display: block;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.spc-story-mini strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.spc-story-mini em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 24px;
  font-weight: 700;
  color: #5eead4;
}

.spc-story-table-empty {
  padding: 28px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.spc-story-cta {
  position: relative;
  margin: 0;
  margin-top: auto;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 28px;
  padding: 28px 30px 26px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(45, 46, 125, 0.95) 0%, rgba(24, 26, 64, 0.98) 55%, rgba(13, 148, 136, 0.35) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 36px rgba(0, 0, 0, 0.28);
}

.spc-story-cta-glow {
  position: absolute;
  inset: auto auto -40% 50%;
  width: 420px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(94, 234, 212, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.spc-story-cta-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: normal;
  word-spacing: normal;
}

.spc-story-cta-text {
  position: relative;
  z-index: 1;
  margin: 16px 0 14px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: normal;
  word-spacing: normal;
}

.spc-story-cta-domain {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 28px;
  border-radius: 999px;
  background: #fff;
  color: #2d2e7d;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: normal;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.spc-chart-stage {
  position: relative;
  height: 340px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 70% 85%, rgba(45, 46, 125, 0.05), transparent 55%),
    linear-gradient(180deg, #fbfcff 0%, #f4f5fb 100%);
  border: 1px solid rgba(45, 46, 125, 0.08);
  padding: 16px 14px 10px;
  overflow: hidden;
  direction: ltr;
}

/* عکس بزرگ ماشین — پشت نمودار */
.spc-chart-car-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.spc-chart-watermark {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(45, 46, 125, 0.09);
  transform: rotate(-18deg);
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.spc-chart-car-img {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: min(92%, 620px);
  height: auto;
  max-height: 92%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%) scale(1.4);
  opacity: 0;
  mix-blend-mode: multiply;
  -webkit-mix-blend-mode: multiply;
  filter: contrast(1.02) saturate(1.04);
  transition: opacity .45s ease, transform .5s cubic-bezier(.2, .9, .2, 1);
}

.spc-chart-stage.is-loaded .spc-chart-car-img {
  opacity: 0.32;
  transform: translateX(-50%) scale(1.5);
}

.spc-chart-watermark {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
  font-size: clamp(2.2rem, 6.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(45, 46, 125, 0.11);
  transform: rotate(-18deg);
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.spc-chart-canvas-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  direction: ltr;
  unicode-bidi: isolate;
}

.spc-chart-stage canvas {
  width: 100% !important;
  height: 100% !important;
  transition: opacity .2s ease;
}

.spc-chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--spc-primary);
  font-size: var(--spc-fs-md);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.55);
  z-index: 4;
  text-align: center;
  padding: var(--spc-space-4);
}

.spc-chart-loading[hidden] {
  display: none !important;
}

.spc-chart-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spc-space-2);
  margin-top: var(--spc-space-4);
}

.spc-stat-chip {
  background: #fff;
  border: 1px solid rgba(45, 46, 125, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(45, 46, 125, 0.05);
  min-width: 0;
  text-align: center;
}

.spc-stat-chip span {
  display: block;
  font-size: var(--spc-fs-xs);
  color: var(--spc-muted);
  margin-bottom: 6px;
  line-height: 1.35;
  text-align: center;
  font-weight: 700;
}

.spc-stat-chip strong {
  display: block;
  font-size: var(--spc-fs-md);
  color: var(--spc-primary-dark);
  font-weight: 800;
  word-break: break-word;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.spc-stat-chip strong small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--spc-muted);
  margin-right: 2px;
}

.spc-stat-chip-pair em.spc-usd-text {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: var(--spc-fs-sm);
  font-weight: 800;
  line-height: 1.35;
}

.spc-stat-chip-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f7f8ff 0%, #eef1fb 100%);
  text-align: center;
}

.spc-stat-chip-wide small {
  font-weight: 700;
  opacity: 0.9;
}

.spc-stat-chip-wide > small {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--spc-fs-sm);
  font-weight: 800;
}

.spc-change-box {
  padding: 14px 14px 12px;
}

.spc-change-table-wrap {
  margin-top: 4px;
  overflow-x: auto;
}

.spc-change-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  direction: rtl;
}

.spc-change-table th,
.spc-change-table td {
  padding: 9px 10px;
  text-align: center;
  font-size: var(--spc-fs-sm);
  line-height: 1.4;
  border-bottom: 1px solid rgba(45, 46, 125, 0.08);
  font-variant-numeric: tabular-nums;
}

.spc-change-table thead th {
  font-size: var(--spc-fs-xs);
  font-weight: 700;
  color: var(--spc-muted);
  background: transparent;
  border-bottom: 1px solid rgba(45, 46, 125, 0.12);
}

.spc-change-table tbody tr:last-child th,
.spc-change-table tbody tr:last-child td {
  border-bottom: 0;
}

.spc-change-table .spc-change-label {
  text-align: right;
  font-weight: 800;
  color: var(--spc-primary-dark);
  white-space: nowrap;
}

.spc-change-table td {
  font-weight: 800;
}

.spc-change-insight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(45, 46, 125, 0.07) 100%);
  border: 1px solid rgba(13, 148, 136, 0.18);
  text-align: right;
}

.spc-change-insight-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.15);
  color: #0d9488;
  font-size: 0.7rem;
  line-height: 1;
  margin-top: 1px;
}

.spc-change-insight p {
  margin: 0;
  font-size: var(--spc-fs-sm);
  line-height: 1.65;
  color: var(--spc-primary-dark);
  font-weight: 600;
  text-align: right;
}

.spc-chart-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spc-space-4);
  color: var(--spc-muted);
  background: #f8f9fc;
  border-radius: 12px;
  font-size: var(--spc-fs-md);
}

@keyframes spc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spc-pop-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spc-sheet-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Mobile modal ---- */
@media (max-width: 720px) {
  .spc-modal {
    padding: 0;
    align-items: flex-end;
    justify-content: stretch;
  }

  .spc-modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: min(92vh, 92dvh);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(20, 22, 70, 0.22);
    animation: spc-sheet-up .32s cubic-bezier(.2, .9, .25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .spc-modal-glow {
    height: 100px;
  }

  /* هدر فشرده: عکس کوچک + عنوان + بستن در یک ردیف */
  .spc-modal-head {
    grid-template-columns: 96px minmax(0, 1fr) 36px;
    grid-template-areas: none;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 10px;
    flex-shrink: 0;
  }

  .spc-modal-visual {
    width: 96px;
    height: 72px;
  }

  .spc-modal-car-stage {
    border-radius: 14px;
  }

  .spc-modal-car-img {
    max-width: 100%;
    max-height: 100%;
    transform: translateY(2px) scale(1.15);
  }

  .spc-modal-visual.is-loaded .spc-modal-car-img {
    transform: translateY(0) scale(1.25);
  }

  .spc-modal-car-fallback svg {
    width: 28px;
    height: 28px;
  }

  .spc-modal-eyebrow {
    font-size: 0.68rem;
    padding: 2px 8px;
    margin-bottom: 4px;
  }

  .spc-modal-title {
    font-size: 0.98rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .spc-modal-sub {
    font-size: 0.78rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .spc-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    justify-self: end;
  }

  .spc-range-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 14px 10px;
    gap: 6px;
    flex-shrink: 0;
  }

  .spc-range-btn {
    font-size: 0.74rem;
    padding: 9px 4px;
    border-radius: 10px;
  }

  .spc-range-label-full {
    display: none;
  }

  .spc-range-label-short {
    display: inline;
  }

  .spc-modal-body {
    padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
  }

  .spc-modal-actions {
    padding: 8px 0 4px;
  }

  .spc-export-btn {
    width: 100%;
  }

  .spc-chart-stage {
    height: 210px;
    padding: 12px 8px 6px;
    border-radius: 14px;
  }

  .spc-chart-watermark {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
    color: rgba(45, 46, 125, 0.1);
  }

  .spc-chart-car-img {
    width: min(110%, 380px);
    max-height: 85%;
    bottom: -10%;
    transform: translateX(-50%) scale(1.15);
  }

  .spc-chart-stage.is-loaded .spc-chart-car-img {
    opacity: 0.18;
    transform: translateX(-50%) scale(1.25);
  }

  .spc-chart-loading {
    font-size: 0.82rem;
    padding: 12px;
    text-align: center;
  }

  .spc-chart-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .spc-stat-chip {
    padding: 10px 11px;
    border-radius: 12px;
  }

  .spc-stat-chip span {
    font-size: 0.7rem;
  }

  .spc-stat-chip strong {
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .spc-modal-head {
    grid-template-columns: 80px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 12px 12px 8px;
  }

  .spc-modal-visual {
    width: 80px;
    height: 62px;
  }

  .spc-modal-title {
    font-size: 0.9rem;
  }

  .spc-chart-stage {
    height: 190px;
  }

  .spc-range-bar,
  .spc-modal-body {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.spc-faq {
  margin: 28px 0 8px;
}

.spc-faq-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 46, 125, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(45, 46, 125, 0.08);
}

.spc-faq-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--spc-primary) 0%, #0d9488 100%);
}

.spc-faq-head {
  padding: 26px 28px 18px;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(45, 46, 125, 0.13), transparent 58%),
    radial-gradient(70% 120% at 0% 100%, rgba(13, 148, 136, 0.12), transparent 52%),
    linear-gradient(165deg, #ffffff 0%, #f5f7fc 100%);
}

.spc-faq-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(45, 46, 125, 0.08);
  color: var(--spc-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.spc-wrap h2.spc-faq-title {
  margin: 0 0 8px;
  color: var(--spc-primary-dark);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.45;
}

.spc-faq-lead {
  margin: 0;
  max-width: 42rem;
  color: var(--spc-muted);
  font-size: var(--spc-fs-sm);
  line-height: 1.7;
}

.spc-faq-list {
  padding: 8px 12px 14px;
}

.spc-faq-item {
  margin: 8px 0;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f7f8fc;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.spc-faq-item.is-open {
  border-color: rgba(45, 46, 125, 0.14);
  background: #fff;
  box-shadow: 0 10px 28px rgba(45, 46, 125, 0.06);
}

.spc-wrap h3.spc-faq-qwrap {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.spc-wrap button.spc-faq-q {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: var(--spc-text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.6;
  text-align: right;
  cursor: pointer;
}

.spc-faq-num {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--spc-primary) 0%, #3d4ca8 55%, #0d9488 140%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(45, 46, 125, 0.18);
}

.spc-faq-qtext {
  flex: 1;
  min-width: 0;
}

.spc-faq-chevron {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--spc-primary);
  transition: transform 0.25s ease, background 0.2s ease;
}

.spc-faq-item.is-open .spc-faq-chevron {
  transform: rotate(180deg);
  background: var(--spc-primary-soft);
}

.spc-faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.spc-faq-item.is-open .spc-faq-a {
  grid-template-rows: 1fr;
}

.spc-faq-a-inner {
  overflow: hidden;
}

.spc-faq-a-inner p {
  margin: 0;
  padding: 0 68px 16px 18px;
  color: #3d4454;
  font-size: 0.94rem;
  line-height: 1.9;
}

@media (max-width: 720px) {
  .spc-faq-head {
    padding: 20px 16px 14px;
  }

  .spc-wrap h2.spc-faq-title {
    font-size: 1.12rem;
  }

  .spc-wrap button.spc-faq-q {
    align-items: flex-start;
    font-size: 0.92rem;
  }

  .spc-faq-num {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .spc-faq-a-inner p {
    padding: 0 16px 14px 12px;
  }
}
