/* ============ ساین کریپتو — استایل اصلی ============ */

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

:root {
  --bg: #070a12;
  --bg-2: #0a0f1c;
  --surface: rgba(17, 24, 40, 0.72);
  --surface-solid: #0e1424;
  --line: rgba(120, 145, 190, 0.16);
  --line-strong: rgba(120, 145, 190, 0.3);
  --text: #e9eefb;
  --muted: #8d9ab7;
  --muted-2: #6b7896;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.14);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* جلوگیری از تغییر عرض صفحه وقتی نوار اسکرول ظاهر/پنهان می‌شود */
  scrollbar-gutter: stable;
  /* جلوگیری از بزرگ/کوچک شدن خودکار متن هنگام اسکرول در موبایل */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* clip جای hidden؛ کانتینر اسکرول نمی‌سازد و پرش عرض رخ نمی‌دهد */
  overflow-x: clip;
}

h1, h2, h3, h4 { line-height: 1.45; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 22px;
}

/* عرض بیشتر برای بخش قیمت‌ها و نمودار */
.container-wide {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- پس‌زمینهٔ تزئینی ---------- */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.orb-1 {
  width: 520px; height: 520px;
  top: -180px; inset-inline-start: -100px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 65%);
}
.orb-2 {
  width: 620px; height: 620px;
  top: 220px; inset-inline-end: -220px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.36), transparent 65%);
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 145, 190, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 145, 190, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- هدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 10, 18, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: 0.2px; }
.brand-text small {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 2.4px;
  text-transform: uppercase;
  direction: ltr;
  text-align: right;
}
.brand.small .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.brand.small .brand-text strong { font-size: 15px; }

.nav {
  display: flex;
  gap: 6px;
  margin-inline-start: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(120, 145, 190, 0.1); }

.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #9ff0c4;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
  white-space: nowrap;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

main { position: relative; z-index: 1; }

/* ---------- کارت قهرمان ---------- */
.hero { padding: 46px 24px 12px; }

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  padding: 48px 46px;
  border-radius: 30px;
  background:
    radial-gradient(120% 130% at 85% 0%, rgba(139, 92, 246, 0.16), transparent 55%),
    radial-gradient(110% 120% at 0% 100%, rgba(34, 211, 238, 0.13), transparent 55%),
    linear-gradient(160deg, rgba(20, 28, 48, 0.92), rgba(10, 14, 26, 0.94));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 30px;
  padding: 1px;
  background: linear-gradient(130deg, rgba(34, 211, 238, 0.55), rgba(139, 92, 246, 0.12) 40%, rgba(244, 114, 182, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

.hero-inner { position: relative; z-index: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #b9c8e6;
  background: rgba(120, 145, 190, 0.1);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.grad-text {
  background: linear-gradient(100deg, #22d3ee, #8b5cf6 55%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

/* دکمهٔ بزرگ با رنگ در حال تغییر */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 268px;
  padding: 19px 34px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  color: #04121a;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #22d3ee, #7dd3fc, #8b5cf6, #f472b6, #22d3ee);
  background-size: 320% 320%;
  animation: colorFlow 9s ease-in-out infinite;
  box-shadow: 0 14px 40px -12px rgba(34, 211, 238, 0.65), 0 4px 18px -6px rgba(139, 92, 246, 0.6);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -12px rgba(139, 92, 246, 0.8), 0 6px 20px -4px rgba(34, 211, 238, 0.7);
}
.btn-primary:active { transform: translateY(0) scale(0.992); }
.btn-primary svg { position: relative; z-index: 2; stroke-width: 2.4; }
.btn-primary .btn-label { position: relative; z-index: 2; }
.btn-primary .btn-sheen {
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  animation: sheen 4.5s ease-in-out infinite;
  z-index: 1;
}
@keyframes colorFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes sheen {
  0%, 55% { inset-inline-start: -60%; opacity: 0; }
  70% { opacity: 0.85; }
  100% { inset-inline-start: 120%; opacity: 0; }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px 28px;
  border-radius: 16px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-strong);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(34, 211, 238, 0.5);
}

.hero-hint {
  margin: -8px 0 20px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.8;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.hero-points li { display: flex; align-items: center; gap: 7px; }
.check {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #6ee7f9;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

/* کارت کوچک کنار */
.hero-panel { display: flex; align-items: center; justify-content: center; }
.mini-card {
  width: 100%;
  max-width: 330px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(18, 25, 43, 0.95), rgba(10, 15, 26, 0.9));
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
}
.mini-head { display: flex; align-items: center; gap: 11px; }
.mini-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  font-size: 18px;
  color: #f7b955;
  background: rgba(247, 185, 85, 0.12);
  border: 1px solid rgba(247, 185, 85, 0.28);
}
.mini-head strong { display: block; font-size: 14.5px; }
.mini-head small { font-size: 11px; color: var(--muted-2); letter-spacing: 0.6px; direction: ltr; }
.mini-badge {
  margin-inline-start: auto;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(120, 145, 190, 0.12);
}
.mini-badge.up { color: #86efac; background: var(--green-soft); }
.mini-badge.down { color: #fca5a5; background: var(--red-soft); }
.mini-price {
  margin: 14px 0 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.spark { width: 100%; height: 64px; display: block; }
.mini-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted-2);
}


/* ---------- دکمهٔ سیگنال در صفحهٔ اصلی ---------- */
.btn-signal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 268px;
  padding: 19px 28px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 800;
  color: #eaf1ff;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.16));
  background-size: 220% 220%;
  border: 1px solid rgba(139, 92, 246, 0.55);
  box-shadow: 0 14px 40px -14px rgba(139, 92, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: colorFlow 11s ease-in-out infinite;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.btn-signal:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 20px 50px -14px rgba(34, 211, 238, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-signal:active { transform: translateY(0) scale(0.992); }
.btn-signal svg, .btn-signal .btn-label, .btn-signal .btn-tag { position: relative; z-index: 2; }
.btn-signal .btn-label { white-space: nowrap; }
.btn-signal .btn-tag {
  display: block;
  width: 100%;
  font-size: 10.5px;
  font-weight: 500;
  color: #a5b4d0;
  letter-spacing: 0.2px;
  text-align: center;
}

.chart-signal-cta {
  display: block;
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.28);
  transition: background 0.18s, border-color 0.18s;
}
.chart-signal-cta:hover { background: rgba(34, 211, 238, 0.16); border-color: rgba(34, 211, 238, 0.5); }

@media (max-width: 720px) {
  .btn-signal { width: 100%; min-width: 0; padding: 17px 20px; font-size: 16px; }
}

/* ---------- بازار ---------- */
.market { padding: 58px 24px 20px; }
.market-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.market-head h2 { font-size: clamp(22px, 3.2vw, 28px); margin-bottom: 5px; }
.market-head p { color: var(--muted); font-size: 13.5px; }
.market-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.rate-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(120, 145, 190, 0.08);
  border: 1px solid var(--line);
}
.rate-chip strong { color: var(--text); font-size: 13.5px; }

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  transition: background 0.2s, border-color 0.2s;
}
.refresh-btn:hover { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.45); }
.refresh-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.table-shell {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(16, 22, 38, 0.9), rgba(10, 14, 25, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
/* عرض ستون‌ها: قیمت‌ها و نمودار فضای کامل می‌گیرند */
.price-table col.col-asset { width: 22%; }
.price-table col.col-usd { width: 20%; }
.price-table col.col-irr { width: 26%; }
.price-table col.col-chg { width: 13%; }
.price-table col.col-arrow { width: 56px; }

.price-table thead th {
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  text-align: right;
  white-space: nowrap;
  background: rgba(120, 145, 190, 0.045);
  border-bottom: 1px solid var(--line);
}
.price-table tbody tr.asset-row {
  cursor: pointer;
  transition: background 0.18s;
  border-bottom: 1px solid rgba(120, 145, 190, 0.08);
}
.price-table tbody tr.asset-row:hover { background: rgba(120, 145, 190, 0.07); }
.price-table tbody tr.asset-row.active { background: rgba(34, 211, 238, 0.075); }
.price-table tbody tr.asset-row.active td { border-bottom-color: transparent; }
.price-table td { padding: 16px 18px; text-align: right; vertical-align: middle; }

.asset-cell { display: flex; align-items: center; gap: 12px; }
.asset-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  font-size: 17px;
  font-weight: 700;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
}
.asset-name { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.asset-name strong { font-size: 15px; font-weight: 700; white-space: nowrap; }
.asset-name small { font-size: 11px; color: var(--muted-2); letter-spacing: 0.4px; }

.price-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-val small { font-size: 10.5px; color: var(--muted-2); font-weight: 400; margin-inline-start: 3px; }
.price-usd { font-size: 16px; letter-spacing: -0.2px; }
.price-irr { font-size: 15px; color: #dbe4f6; letter-spacing: -0.2px; }
.price-sub { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 400; margin-top: 2px; letter-spacing: 0; }

.chg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chg.up { color: #86efac; background: var(--green-soft); }
.chg.down { color: #fca5a5; background: var(--red-soft); }
.chg.flat { color: var(--muted); background: rgba(120, 145, 190, 0.12); }

.row-chevron {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 9px;
  color: var(--muted-2);
  border: 1px solid transparent;
  transition: transform 0.25s, color 0.25s, border-color 0.2s;
}
.asset-row.active .row-chevron {
  transform: rotate(180deg);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.35);
}

/* ردیف نمودار */
.chart-row > td { padding: 0 !important; background: rgba(7, 10, 18, 0.62); }
.chart-panel {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
  animation: panelIn 0.32s ease;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chart-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-title strong { font-size: 17px; letter-spacing: -0.2px; }
.chart-title .chart-now { font-size: 20px; font-weight: 800; color: #eaf1ff; letter-spacing: -0.4px; }
.chart-title .chart-unit { font-size: 11.5px; color: var(--muted-2); }

.chart-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: rgba(120, 145, 190, 0.1);
  border: 1px solid var(--line);
}
.seg button {
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
  background: transparent;
  transition: background 0.18s, color 0.18s;
}
.seg button:hover { color: var(--text); }
.seg button.active {
  color: #04121a;
  font-weight: 700;
  background: linear-gradient(120deg, #22d3ee, #8b5cf6);
}

.chart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(120, 145, 190, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.chart-btn:hover { color: var(--text); border-color: var(--line-strong); }
.chart-btn.on {
  color: #7dd3fc;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
}

/* افسانهٔ OHLC */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: rgba(120, 145, 190, 0.06);
  border: 1px solid var(--line);
  font-size: 12px;
}
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-legend .lg em { font-style: normal; color: var(--muted-2); font-size: 11.5px; }
.chart-legend .lg b { font-weight: 700; color: #dbe4f6; font-variant-numeric: tabular-nums; }
.chart-legend .lg b.up { color: #86efac; }
.chart-legend .lg b.down { color: #fda4af; }
.chart-legend .lg-vol { margin-inline-start: auto; }
.chart-legend .lg-src { color: var(--muted-2); font-size: 11px; }
.chart-title > .chg { font-size: 12px; padding: 3px 9px; }

.chart-wrap {
  position: relative;
  height: 430px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.65), rgba(7, 10, 18, 0.35));
  border: 1px solid rgba(120, 145, 190, 0.14);
  overflow: hidden;
}
.chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
}

.chart-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted-2);
  text-align: center;
}

.chart-loading, .chart-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  gap: 8px;
  background: rgba(7, 10, 18, 0.55);
}
.chart-loading[hidden], .chart-error[hidden] { display: none; }
.chart-error { color: #fca5a5; }

/* ---------- نشان سیگنال ---------- */
.sig-chip {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 1px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
  border: 1px solid transparent;
}
.sig-chip.na { color: var(--muted-2); background: rgba(120,145,190,.12); }
.sig-chip.strong-buy { color: #bbf7d0; background: rgba(34,197,94,.22); border-color: rgba(34,197,94,.5); }
.sig-chip.buy { color: #86efac; background: rgba(34,197,94,.13); border-color: rgba(34,197,94,.32); }
.sig-chip.neutral { color: #cbd5e1; background: rgba(120,145,190,.14); border-color: rgba(120,145,190,.28); }
.sig-chip.sell { color: #fda4af; background: rgba(244,63,94,.13); border-color: rgba(244,63,94,.32); }
.sig-chip.strong-sell { color: #fecdd3; background: rgba(244,63,94,.22); border-color: rgba(244,63,94,.5); }

/* ---------- پنل تحلیل ---------- */
.analysis {
  margin-top: 16px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(16, 22, 38, 0.78), rgba(9, 13, 23, 0.86));
  border: 1px solid var(--line);
}
.an-loading { padding: 18px; text-align: center; font-size: 13px; color: var(--muted); }

.an-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.an-score-wrap { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.an-signal {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}
.an-signal.strong-buy { color: #052e16; background: linear-gradient(120deg, #4ade80, #22c55e); }
.an-signal.buy { color: #052e16; background: linear-gradient(120deg, #86efac, #4ade80); }
.an-signal.neutral { color: #dbe4f6; background: rgba(120, 145, 190, 0.2); border-color: var(--line-strong); }
.an-signal.sell { color: #4c0519; background: linear-gradient(120deg, #fda4af, #fb7185); }
.an-signal.strong-sell { color: #4c0519; background: linear-gradient(120deg, #fb7185, #f43f5e); }
.an-signal.na { color: var(--muted); background: rgba(120, 145, 190, 0.14); }

.an-score { flex: 1 1 auto; min-width: 140px; }
.an-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(244,63,94,.28), rgba(120,145,190,.18) 50%, rgba(34,197,94,.28));
  overflow: hidden;
  margin-bottom: 6px;
}
.an-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.an-bar i.strong-buy, .an-bar i.buy { background: linear-gradient(90deg, #22c55e, #4ade80); }
.an-bar i.sell, .an-bar i.strong-sell { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.an-bar i.neutral { background: rgba(160, 176, 205, 0.6); }
.an-bar-zero {
  position: absolute;
  top: -2px; bottom: -2px;
  inset-inline-start: 50%;
  width: 1px;
  background: rgba(230, 237, 251, 0.55);
}
.an-score small { font-size: 11.5px; color: var(--muted); }
.an-score small b { color: #dbe4f6; font-weight: 700; }

.an-vol { text-align: left; display: flex; flex-direction: column; gap: 1px; }
.an-vol small { font-size: 10.5px; color: var(--muted-2); }
.an-vol b { font-size: 13px; color: #dbe4f6; }

.an-summary {
  font-size: 13px;
  color: #c3cfe6;
  background: rgba(120, 145, 190, 0.07);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
  margin-bottom: 14px;
  line-height: 2;
}

.an-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.an-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 9px;
}

.an-ind-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.an-ind {
  display: grid;
  grid-template-columns: minmax(84px, auto) auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(120, 145, 190, 0.055);
  border: 1px solid rgba(120, 145, 190, 0.1);
}
.an-ind-name { font-size: 12px; color: #cfd9ef; font-weight: 600; }
.an-ind-val { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.an-ind-meter {
  height: 5px;
  border-radius: 999px;
  background: rgba(120, 145, 190, 0.14);
  overflow: hidden;
  min-width: 40px;
}
.an-ind-meter i { display: block; height: 100%; border-radius: 999px; }
.an-ind-meter.bullish i { background: linear-gradient(90deg, #22c55e, #4ade80); }
.an-ind-meter.bearish i { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.an-ind-meter.neutral i { background: rgba(160, 176, 205, 0.55); }
.an-ind-verdict {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  white-space: nowrap;
}
.an-ind-verdict.bullish { color: #86efac; background: rgba(34, 197, 94, 0.14); }
.an-ind-verdict.bearish { color: #fda4af; background: rgba(244, 63, 94, 0.14); }
.an-ind-verdict.neutral { color: var(--muted); background: rgba(120, 145, 190, 0.14); }
.an-ind-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.9;
}

.an-levels { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.an-lvl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(120, 145, 190, 0.055);
  border: 1px solid rgba(120, 145, 190, 0.1);
  font-size: 11.5px;
}
.an-lbl { color: var(--muted-2); white-space: nowrap; }
.an-lvl-row b { color: #e6edfb; font-variant-numeric: tabular-nums; font-size: 12px; }
.an-lvl-row b.down { color: #fda4af; }
.an-lvls { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.lvl {
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lvl.sup { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.lvl.res { color: #fda4af; background: rgba(244, 63, 94, 0.12); }
.lvl.tgt { color: #a5f3fc; background: rgba(34, 211, 238, 0.12); }

.an-mtf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.an-mtf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 6px;
  border-radius: 11px;
  border: 1px solid rgba(120, 145, 190, 0.14);
  background: rgba(120, 145, 190, 0.05);
}
.an-mtf-item span { font-size: 10.5px; color: var(--muted-2); }
.an-mtf-item strong { font-size: 12px; }
.an-mtf-item small { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.an-mtf-item.strong-buy, .an-mtf-item.buy { border-color: rgba(34, 197, 94, 0.35); }
.an-mtf-item.strong-buy strong, .an-mtf-item.buy strong { color: #86efac; }
.an-mtf-item.sell, .an-mtf-item.strong-sell { border-color: rgba(244, 63, 94, 0.35); }
.an-mtf-item.sell strong, .an-mtf-item.strong-sell strong { color: #fda4af; }
.an-mtf-item.neutral strong { color: #cbd5e1; }

.an-disclaimer {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.9;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

/* ---------- جداکنندهٔ بازه‌ها ---------- */
.seg-divider {
  width: 1px;
  align-self: stretch;
  margin: 2px 3px;
  background: rgba(120, 145, 190, 0.3);
}

/* ---------- وین‌ریت ---------- */
.wr-mini {
  display: inline-block;
  margin-inline-start: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted-2);
  vertical-align: middle;
}
.wr-mini.good { color: #86efac; }
.wr-mini.bad { color: #fda4af; }

.wr-badge { color: var(--muted); font-size: 13.5px; }
.wr-badge.good { color: #86efac; }
.wr-badge.bad { color: #fda4af; }
.wr-chip { border-color: rgba(34, 211, 238, 0.28); }

/* ---------- پلن معاملاتی ---------- */
.plan {
  margin: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(120, 145, 190, 0.05);
  overflow: hidden;
}
.plan.long { border-color: rgba(34, 197, 94, 0.3); }
.plan.short { border-color: rgba(244, 63, 94, 0.3); }
.plan.none { border-color: var(--line); }

.plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 13px;
  background: rgba(7, 10, 18, 0.4);
  border-bottom: 1px solid var(--line);
}
.plan-side {
  padding: 5px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
}
.plan-side.long { color: #052016; background: linear-gradient(120deg, #4ade80, #22c55e); }
.plan-side.short { color: #2a0612; background: linear-gradient(120deg, #fb7185, #f43f5e); }
.plan-side.none { color: var(--muted); background: rgba(120, 145, 190, 0.18); }
.plan-lev {
  font-size: 12px;
  color: var(--muted);
}
.plan-lev b { color: #a5f3fc; font-size: 14px; }
.plan-picked {
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10.5px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.plan-rows { padding: 6px 8px; }
.plan-row {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 12.5px;
}
.plan-row + .plan-row { margin-top: 2px; }
.plan-row.entry { background: rgba(34, 211, 238, 0.07); }
.plan-row.sl { background: rgba(244, 63, 94, 0.07); }
.plan-row.tp { background: rgba(34, 197, 94, 0.055); }
.plan-k { color: var(--muted-2); font-size: 11.5px; }
.plan-v { color: #e6edfb; font-variant-numeric: tabular-nums; font-size: 13px; }
.plan-row.sl .plan-v { color: #fda4af; }
.plan-row.tp .plan-v { color: #86efac; }
.plan-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 46px;
  text-align: left;
}
.plan-row.tp .plan-pct { color: #86efac; }
.plan-row.sl .plan-pct { color: #fda4af; }
.plan-rr {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: left;
}

.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-2);
  background: rgba(7, 10, 18, 0.3);
}
.plan-copy {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.18s, border-color 0.18s;
}
.plan-copy:hover { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.45); }
.plan-note { padding: 12px 14px; font-size: 12.5px; color: var(--muted-2); }

/* ---------- وین‌ریت در پنل تحلیل ---------- */
.an-wr {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(120, 145, 190, 0.055);
}
.an-wr.empty { padding: 10px 14px; }
.an-wr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.an-wr-head b { font-size: 17px; font-variant-numeric: tabular-nums; }
.an-wr-head b.good { color: #86efac; }
.an-wr-head b.bad { color: #fda4af; }
.an-wr-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.22);
  overflow: hidden;
  margin-bottom: 7px;
}
.an-wr-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.an-wr small { font-size: 11px; color: var(--muted-2); }

/* ---------- بایگانی ---------- */
.archive { padding: 52px 24px 20px; }
.archive-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.archive-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.arch-stat {
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(120, 145, 190, 0.055);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arch-stat small { font-size: 10.5px; color: var(--muted-2); }
.arch-stat b { font-size: 17px; color: #e6edfb; font-variant-numeric: tabular-nums; }
.arch-stat em { font-size: 10px; color: var(--muted-2); font-style: normal; }
.arch-stat.good b { color: #86efac; }
.arch-stat.bad b { color: #fda4af; }

.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.archive-table thead th {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  text-align: right;
  white-space: nowrap;
  background: rgba(120, 145, 190, 0.045);
  border-bottom: 1px solid var(--line);
}
.archive-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(120, 145, 190, 0.07);
  vertical-align: middle;
  white-space: nowrap;
}
.archive-table tbody tr {
  transition: background 0.16s;
}
.archive-table tbody tr:hover { background: rgba(120, 145, 190, 0.06); }
.archive-table tr.win { border-inline-start: 2px solid rgba(34, 197, 94, 0.5); }
.archive-table tr.loss { border-inline-start: 2px solid rgba(244, 63, 94, 0.5); }
.archive-table .num { font-variant-numeric: tabular-nums; }
.archive-table .num.down, .archive-table .down { color: #fda4af; }
.archive-table .num.up, .archive-table .up { color: #86efac; }

.arch-asset strong { display: block; font-size: 12.5px; font-weight: 700; }
.arch-asset small { font-size: 10px; color: var(--muted-2); }
.arch-tf {
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(120, 145, 190, 0.12);
}
.arch-sig {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  margin-inline-end: 5px;
}
.arch-sig.long { color: #86efac; background: rgba(34, 197, 94, 0.14); }
.arch-sig.short { color: #fda4af; background: rgba(244, 63, 94, 0.14); }
.arch-sig.none { color: var(--muted); background: rgba(120, 145, 190, 0.14); }
.arch-lev {
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
}
.arch-time { font-size: 11px; color: var(--muted-2); }
.arch-res {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
}
.arch-res.win { color: #86efac; background: rgba(34, 197, 94, 0.16); }
.arch-res.loss { color: #fda4af; background: rgba(244, 63, 94, 0.16); }
.arch-res.open { color: #a5f3fc; background: rgba(34, 211, 238, 0.13); }
.arch-res.expired { color: var(--muted); background: rgba(120, 145, 190, 0.13); }
.pnl { display: block; font-size: 10px; margin-top: 2px; }
.pnl.good { color: #86efac; }
.pnl.bad { color: #fda4af; }
.archive-empty { text-align: center; color: var(--muted-2); padding: 22px !important; font-size: 12.5px; }

/* حالت انتخاب کندل */
.chart-wrap.picking canvas { cursor: cell; }

.skeleton-row td { padding: 26px 18px; }
.skeleton {
  display: block;
  height: 26px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(120, 145, 190, 0.08), rgba(120, 145, 190, 0.18), rgba(120, 145, 190, 0.08));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.market-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted-2);
}
.market-foot strong { color: var(--muted); font-weight: 500; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
}
.muted { color: var(--muted-2); }
.sep { opacity: 0.5; }

/* ---------- درباره ---------- */
.about { padding: 56px 22px 30px; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.about-card {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(16, 22, 38, 0.85), rgba(10, 14, 25, 0.9));
  border: 1px solid var(--line);
  transition: transform 0.25s, border-color 0.25s;
}
.about-card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.32); }
.about-icon { font-size: 24px; display: block; margin-bottom: 12px; }
.about-card h3 { font-size: 16px; margin-bottom: 8px; }
.about-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.link-btn {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 700;
  color: #67e8f9;
  transition: color 0.2s, transform 0.2s;
}
.link-btn:hover { color: #a5f3fc; transform: translateX(-2px); }

/* ---------- فوتر ---------- */
.site-footer {
  margin-top: 40px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.7);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.disclaimer { max-width: 62ch; font-size: 12px; color: var(--muted-2); }
.copyright { font-size: 12px; color: var(--muted-2); }

/* ---------- مودال ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 28px;
  border-radius: 24px;
  background: linear-gradient(165deg, #111a2e, #0a0f1c);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95);
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-card.center { text-align: center; max-width: 420px; }
.modal-close {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(120, 145, 190, 0.1);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}
.modal-close:hover { color: var(--text); background: rgba(248, 113, 113, 0.18); }
.modal-card h2 { font-size: 20px; margin-bottom: 6px; }
.modal-lead { font-size: 13px; color: var(--muted); margin-bottom: 22px; }

.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}
.field textarea { resize: vertical; min-height: 74px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8d9ab7 50%), linear-gradient(135deg, #8d9ab7 50%, transparent 50%); background-position: calc(0% + 18px) 50%, calc(0% + 23px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.btn-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 800;
  color: #04121a;
  background: linear-gradient(120deg, #22d3ee, #8b5cf6);
  transition: filter 0.2s, transform 0.2s;
}
.btn-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.65; cursor: progress; transform: none; }
.spinner {
  display: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(4, 18, 26, 0.3);
  border-top-color: #04121a;
  animation: spin 0.7s linear infinite;
}
.btn-submit.loading .spinner { display: inline-block; }
.form-note { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 10px; }
.form-error {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  color: #fca5a5;
  background: var(--red-soft);
  border: 1px solid rgba(248, 113, 113, 0.35);
  margin-bottom: 12px;
}
.form-error[hidden] { display: none; }

.form-success[hidden] { display: none; }
.form-success { text-align: center; padding: 10px 0; }
.success-icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 26px;
  color: #86efac;
  background: var(--green-soft);
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.success-icon.soft { color: #a5f3fc; background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.4); font-size: 30px; }
.form-success h3 { font-size: 18px; margin-bottom: 8px; }
.form-success p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.modal-actions .btn-secondary, .modal-actions .btn-ghost { padding: 12px 18px; font-size: 13.5px; border-radius: 12px; }
.btn-ghost {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------- توست ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 120;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  background: rgba(16, 22, 38, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.95);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 980px) {
  .hero-card { grid-template-columns: 1fr; gap: 30px; padding: 36px 28px; }
  .hero-panel { order: -1; }
  .mini-card { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}

@media (max-width: 720px) {
  .header-inner { height: 66px; gap: 12px; }
  .live-status { font-size: 11.5px; padding: 6px 10px; }
  .hero { padding-top: 24px; }
  .hero-card { padding: 28px 20px; border-radius: 24px; }
  .btn-primary, .btn-secondary { width: 100%; min-width: 0; }
  .btn-primary { padding: 17px 20px; font-size: 17px; }
  .market { padding-inline: 14px; }
  .market-head { align-items: flex-start; }
  .market-tools { width: 100%; justify-content: space-between; }

  /* جدول قیمت‌ها در موبایل: هر دارایی یک کارت خوانا با قیمت کامل */
  .price-table { table-layout: auto; }
  .price-table colgroup, .price-table thead { display: none; }
  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table td { display: block; width: 100%; }

  .price-table tbody tr.asset-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 13px 14px;
  }
  .price-table tbody tr.asset-row td { padding: 0; border: 0; }
  .price-table tbody tr.asset-row td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .price-table tbody tr.asset-row td:nth-child(2) { grid-column: 1; grid-row: 2; padding-top: 8px !important; }
  .price-table tbody tr.asset-row td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; align-self: center; }
  .price-table tbody tr.asset-row td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .price-table tbody tr.asset-row td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: left; align-self: center; }
  .price-table tbody tr.asset-row td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: left; }

  .asset-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }
  .asset-cell { gap: 9px; }
  .asset-name strong { font-size: 14.5px; }
  .price-usd { font-size: 16px; }
  .price-irr { font-size: 15px; }
  .price-sub { font-size: 10px; }

  .chart-row > td { padding: 0 !important; }
  .chart-wrap { height: 340px; }
  .an-grid { grid-template-columns: 1fr; }
  .archive-stats { grid-template-columns: repeat(3, 1fr); }
  .plan-row { grid-template-columns: 74px 1fr auto; }
  .plan-rr { display: none; }
  .an-ind { grid-template-columns: minmax(70px, auto) auto 1fr auto; gap: 6px; }
  .an-head { gap: 10px; }
  .an-score-wrap { flex-wrap: wrap; }
  .an-vol { flex-direction: row; align-items: center; gap: 6px; }
  .chart-legend { gap: 4px 10px; padding: 7px 10px; font-size: 11px; }
  .chart-legend .lg-vol { margin-inline-start: 0; }
  .chart-panel { padding: 16px 12px 18px; }
  .chart-top { gap: 10px; }
  .seg button { padding: 5px 9px; font-size: 11.5px; }
  .chart-title .chart-now { font-size: 16px; }
  .modal-card { padding: 26px 20px; }
}

@media (max-width: 720px) {
  .archive { padding-inline: 12px; }
  .archive-table { font-size: 11.5px; }
  .archive-table thead th, .archive-table td { padding: 9px 7px; }
  .archive-table th:nth-child(4),
  .archive-table th:nth-child(5),
  .archive-table th:nth-child(6),
  .archive-table td:nth-child(4),
  .archive-table td:nth-child(5),
  .archive-table td:nth-child(6) { display: none; }
  .archive-tools { width: 100%; }
}

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .archive-stats { grid-template-columns: repeat(2, 1fr); }
  .live-status span:last-child { display: none; }
  .live-status { padding: 8px; }
  .market-tools { flex-direction: column; align-items: stretch; }
  .rate-chip, .refresh-btn { justify-content: center; }
  .chart-wrap { height: 300px; }
  .price-usd { font-size: 15px; }
  .price-irr { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn-primary { background: linear-gradient(120deg, #22d3ee, #8b5cf6); }
}

/* ---------- ابزارهای ترسیم نمودار ---------- */
.chart-btn.draw.on {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.16);
}
.chart-wrap.drawing canvas { cursor: crosshair; }

@media (max-width: 720px) {
  .chart-btn.draw { min-width: 30px; height: 30px; padding: 0 8px; }
}

/* ---------- دکمهٔ حساب دمو ---------- */
.btn-demo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 250px;
  padding: 18px 26px;
  border-radius: 16px;
  font-size: 16.5px;
  font-weight: 800;
  color: #eafff7;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.18), rgba(34, 211, 238, 0.16));
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 14px 40px -16px rgba(16, 185, 129, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.btn-demo:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 20px 50px -14px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-demo:active { transform: translateY(0) scale(0.992); }
.btn-demo svg, .btn-demo .btn-label, .btn-demo .btn-tag { position: relative; z-index: 2; }
.btn-demo .btn-label { white-space: nowrap; }
.btn-demo .btn-tag {
  display: block;
  width: 100%;
  font-size: 10.5px;
  font-weight: 500;
  color: #9fd8c8;
  letter-spacing: 0.2px;
  text-align: center;
}
@media (max-width: 720px) {
  .btn-demo { width: 100%; min-width: 0; padding: 16px 20px; font-size: 15.5px; }
}

/* ---------- نوار فیلتر بازار ---------- */
.market-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chips .chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.filter-chips .chip:hover { color: #e2e8f0; border-color: rgba(148, 163, 184, 0.36); }
.filter-chips .chip.active {
  color: #06121f;
  background: linear-gradient(135deg, #22d3ee, #34d399);
  border-color: transparent;
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, 0.8);
}
.mkt-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  min-width: 220px;
}
.mkt-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #e6edf7;
  font-size: 13px;
  font-family: inherit;
}
.mkt-search input::placeholder { color: rgba(148, 163, 184, 0.7); }
.asset-row[hidden] { display: none; }

/* ---------- نشان به‌روزرسانی زیرثانیه‌ای ---------- */
.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ms-badge b { color: #ecfdf5; font-weight: 700; }
.ms-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: livePulse 1.7s ease-out infinite; }
.ms-badge.slow { color: #fcd34d; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- پرش قیمت هنگام تغییر ---------- */
@keyframes tickUp {
  0% { background: rgba(34, 197, 94, 0.30); color: #bbf7d0; }
  100% { background: transparent; }
}
@keyframes tickDown {
  0% { background: rgba(244, 63, 94, 0.28); color: #fecdd3; }
  100% { background: transparent; }
}
.price-val.tick-up { animation: tickUp 0.6s ease-out; border-radius: 6px; }
.price-val.tick-down { animation: tickDown 0.6s ease-out; border-radius: 6px; }
#liveSrc { color: #a7f3d0; font-weight: 700; }

/* ---------- چارت داخل پنل خانه (موتور مشترک) ---------- */
.chart-wrap .ck { height: 100%; }
.chart-wrap .ck-stage { flex: 1 1 auto; height: 100%; min-height: 0; border-radius: 14px; }
.chart-wrap .ck-canvas { height: 100%; }
.chart-wrap.draw-tool .ck-canvas { cursor: crosshair; }
.chart-panel:fullscreen { background: #050a14; padding: 18px; overflow: auto; }
.chart-panel:fullscreen .chart-wrap { height: calc(100vh - 190px); }
