/* ========== فونت ========== */
  body, .ui, .card, h1, h2, h3, h4, h5, h6, p, span, div, li, a, button, table, th, td {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
  }
  #tablo-khani-guide { direction: rtl; }

  /* کارت آموزش قدرت — تایپوگرافی خیلی مهم و قدرتمند */
  .card-power-edu {
    color: #0f172a !important;
    font-size: 1.08em;
    line-height: 2.05;
    font-weight: 600;
    border-right: 5px solid var(--primary) !important;
    box-shadow: 0 4px 18px rgba(26,82,118,.12) !important;
  }
  .card-power-edu h2 {
    font-size: 1.45em !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em;
    color: #0b3a5c !important;
    border-bottom: 3px solid var(--primary) !important;
    padding-bottom: 10px !important;
  }
  .card-power-edu h3 {
    font-size: 1.22em !important;
    font-weight: 800 !important;
    color: #0b3a5c !important;
  }
  .card-power-edu .power-subhead {
    font-size: 1.14em !important;
    font-weight: 800 !important;
    color: #0b3a5c !important;
    margin: 16px 0 10px !important;
    padding-right: 10px;
    border-right: 4px solid var(--accent);
  }
  .card-power-edu p,
  .card-power-edu li,
  .card-power-edu td,
  .card-power-edu div {
    color: #0f172a !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    line-height: 2.05 !important;
  }
  .card-power-edu strong,
  .card-power-edu b {
    font-weight: 800 !important;
    color: #071a2e !important;
  }
  .card-power-edu table {
    font-size: 1.05em !important;
  }
  .card-power-edu th {
    font-weight: 800 !important;
    font-size: 1.05em !important;
  }
  .card-power-edu td {
    font-weight: 700 !important;
  }
  .card-power-edu .power-formula {
    font-size: 1.18em !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(26,82,118,.25);
    color: #fff !important;
  }
  .card-power-edu .power-formula * {
    color: #fff !important;
  }
  .card-power-edu .power-box {
    font-size: 1.05em !important;
    font-weight: 700 !important;
    line-height: 2 !important;
    color: #0f172a !important;
    border-width: 1px 1px 1px 5px !important;
  }
  .card-power-edu .power-kicker {
    font-size: 1em !important;
    font-weight: 800 !important;
    color: #0b3a5c !important;
  }
  .card-power-edu ol,
  .card-power-edu ul {
    font-weight: 700 !important;
  }
  .card-power-edu ol li,
  .card-power-edu ul li {
    margin-bottom: 6px;
  }
  body.dark-theme .card-power-edu,
  body.dark-theme .card-power-edu p,
  body.dark-theme .card-power-edu li,
  body.dark-theme .card-power-edu td,
  body.dark-theme .card-power-edu div {
    color: #f1f5f9 !important;
  }
  body.dark-theme .card-power-edu h2,
  body.dark-theme .card-power-edu h3,
  body.dark-theme .card-power-edu .power-subhead,
  body.dark-theme .card-power-edu .power-kicker {
    color: #93c5fd !important;
  }
  body.dark-theme .card-power-edu strong,
  body.dark-theme .card-power-edu b {
    color: #ffffff !important;
  }

  /* ========== متغیرهای تم ========== */
  :root {
    --bg-page: #f4f7fa;
    --bg-card: #ffffff;
    --bg-soft: #f8fbfd;
    --text-main: #2c3e50;
    --text-soft: #3d566e;
    --text-muted: #7f8c8d;
    --border: #e1e8ed;
    --shadow: 0 2px 10px rgba(0,0,0,0.06);
    --primary: #1a5276;
    --primary-light: #2980b9;
    --accent: #e67e22;
  }

  /* ========== تم شب ========== */
  body.dark-theme {
    --bg-page: #0f1720;
    --bg-card: #1a2332;
    --bg-soft: #212b3d;
    --text-main: #e8eef5;
    --text-soft: #c5d0dc;
    --text-muted: #8896a6;
    --border: #2c3a4f;
    --shadow: 0 2px 12px rgba(0,0,0,0.35);
    --primary: #4a9ede;
    --primary-light: #6bb3e8;
    --accent: #f0a04b;
  }

  body.dark-theme {
    background: var(--bg-page) !important;
    color: var(--text-main);
  }
  body.dark-theme .ui.container { background: transparent; }
  body.dark-theme .card {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-main);
  }
  body.dark-theme .card h1,
  body.dark-theme .card h2,
  body.dark-theme .card h3,
  body.dark-theme .card h4 {
    color: var(--text-main) !important;
  }
  body.dark-theme .card p,
  body.dark-theme .card span,
  body.dark-theme .card li,
  body.dark-theme .card div {
    color: var(--text-soft);
  }

  /* جدول‌ها در تم شب */
  body.dark-theme table thead tr {
    background: linear-gradient(135deg, #1e3a5f, #2c5a8a) !important;
  }
  body.dark-theme table td {
    border-color: var(--border) !important;
    color: var(--text-soft);
  }
  body.dark-theme table tbody tr {
    background: var(--bg-card) !important;
  }
  body.dark-theme table tbody tr:nth-child(even) {
    background: var(--bg-soft) !important;
  }

  /* هایلایت‌ها در تم شب */
  body.dark-theme [style*="background:#eafaf1"],
  body.dark-theme [style*="background: #eafaf1"] {
    background: #14341f !important;
    color: #a8e6b8 !important;
  }
  body.dark-theme [style*="background:#fdedec"],
  body.dark-theme [style*="background: #fdedec"] {
    background: #3a1a1a !important;
    color: #f5b7b1 !important;
  }
  body.dark-theme [style*="background:#eaf2f8"],
  body.dark-theme [style*="background: #eaf2f8"] {
    background: #14283a !important;
    color: #a8d4f0 !important;
  }
  body.dark-theme [style*="background:#fef9e7"],
  body.dark-theme [style*="background: #fef9e7"] {
    background: #3a2f14 !important;
    color: #f5d98a !important;
  }
  body.dark-theme [style*="background:#f8fbfd"],
  body.dark-theme [style*="background: #f8fbfd"] {
    background: var(--bg-soft) !important;
  }

  /* باکس فرمول */
  body.dark-theme [style*="background:#1a5276"] {
    background: #1e3a5f !important;
  }

  /* کارت گرادیانی هدر — بدون تغییر */
  body.dark-theme #tablo-header-card {
    /* همان گرادیان آبی می‌ماند */
  }

  /* کارت الگوی تکنیکال در تم شب */
  body.dark-theme #technical-pattern-body {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
  }
  body.dark-theme #technical-pattern-body h4 {
    color: var(--text-main) !important;
  }
  body.dark-theme #technical-pattern-body p,
  body.dark-theme #technical-pattern-body span,
  body.dark-theme #technical-pattern-body li {
    color: var(--text-soft) !important;
  }
  body.dark-theme #technical-pattern-body [style*="background: #d1fae5"],
  body.dark-theme #technical-pattern-body [style*="background:#d1fae5"] {
    background: #14341f !important;
  }
  body.dark-theme #technical-pattern-body [style*="background: #fee2e2"],
  body.dark-theme #technical-pattern-body [style*="background:#fee2e2"] {
    background: #3a1a1a !important;
  }
  body.dark-theme #technical-pattern-body [style*="background: #f8fafc"],
  body.dark-theme #technical-pattern-body [style*="background:#f8fafc"] {
    background: var(--bg-soft) !important;
  }
  body.dark-theme #technical-pattern-body [style*="background: linear-gradient(135deg, #e3f2fd"] {
    background: linear-gradient(135deg, #14283a, #1e3a5f) !important;
  }
  body.dark-theme #technical-pattern-body [style*="background: white"],
  body.dark-theme #technical-pattern-body [style*="background:white"] {
    background: #212b3d !important;
  }

  /* توضیحات تکمیلی */
  body.dark-theme [style*="background:#f8fbfd; border:2px dashed"],
  body.dark-theme [style*="background: #f8fbfd; border: 2px dashed"] {
    background: var(--bg-soft) !important;
  }

  /* اسکرول‌بار تم شب */
  body.dark-theme::-webkit-scrollbar { width: 10px; }
  body.dark-theme::-webkit-scrollbar-track { background: #0f1720; }
  body.dark-theme::-webkit-scrollbar-thumb {
    background: #2c3a4f;
    border-radius: 5px;
  }
  body.dark-theme::-webkit-scrollbar-thumb:hover { background: #3d4f6a; }

  /* جریان پول زیر چارت */
  .mfi-edu .mfi-up { color: #1fb589; font-weight: 700; }
  .mfi-edu .mfi-down { color: #ef4a4a; font-weight: 700; }
  .mfi-edu .mfi-strip { display:flex; align-items:flex-end; gap:3px; height:88px; margin:14px 0 6px; direction:ltr; }
  .mfi-edu .mfi-strip i { flex:1; border-radius:2px 2px 0 0; background:#1fb589; }
  .mfi-edu .mfi-strip i.r { background:#ef4a4a; }
  .mfi-edu .mfi-badge { display:inline-block; border:1px solid #f5b942; color:#b8860b; border-radius:6px; padding:0 10px; font-size:0.88em; margin-top:8px; font-weight:700; }
  .mfi-edu .mfi-steps { padding:0; list-style:none; counter-reset:mfi-s; margin:10px 0; }
  .mfi-edu .mfi-steps > li { counter-increment:mfi-s; position:relative; padding:4px 52px 4px 0; margin:8px 0; }
  .mfi-edu .mfi-steps > li::before { content:counter(mfi-s); position:absolute; right:0; top:4px; width:30px; height:30px; border-radius:50%; background:var(--primary); color:#fff; font-weight:700; display:grid; place-items:center; font-size:0.85em; line-height:1; }
  .mfi-edu .mfi-shot { border:1px solid var(--border); border-radius:10px; margin:12px 0; padding:12px; text-align:center; color:var(--text-soft); font-size:0.9em; }
  .mfi-edu .mfi-shot img { max-width:100%; border-radius:8px; display:block; margin:0 auto; }
  #power-color-edu,
  #mfi-edu { scroll-margin-top: 72px; }
