/* ============================================================
   ستوك — stock.sawalq.com — نظام التصميم v11 «طرفية التداول العربية»
   طرفية تداول داكنة بحدود حادة وأقواس زوايا (HUD)، شبكة خلفية دقيقة،
   خط Cairo مستضاف ذاتياً، زجاج ضبابي، وشارات مربعة بنقاط حالتها —
   مع قسم صفحة الشارت الاحترافي ومناطق التحكم.
   بلا أي إيموجي (أيقونات SVG فقط).
   ============================================================ */

/* ---------- الخط المستضاف ذاتياً (Cairo متغيّر 200-1000) ---------- */
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- الرموز — v29 «تصميم بمعايير آبل»: أسود نقي · زجاج مصنفر · أكشن أزرق · أخضر/أحمر مالي ---------- */
:root {
  --bg0: #000000;
  --bg1: #050507;
  --bg2: #1c1c1e;
  --panel: rgba(245, 245, 247, 0.055);
  --panel2: rgba(245, 245, 247, 0.095);
  --line: rgba(245, 245, 247, 0.14);
  --line2: rgba(245, 245, 247, 0.24);
  --ink: #f5f5f7;
  --ink2: #a1a1a6;
  --dim: #8e8e93;
  --acc: #0a84ff;
  --acc2: #64d2ff;
  --acc-deep: #0060df;
  --teal: #64d2ff;
  --up: #30d158;
  --up-soft: #7ce89c;
  --dn: #ff453a;
  --dn-soft: #ff9a90;
  --warn: #ff9f0a;
  --rad: 18px;
  --rad-sm: 12px;
  --grad-ink: linear-gradient(100deg, #f5f5f7 12%, #64d2ff 42%, #bf5af2 72%, #ff375f 100%);
  --glow-acc: 0 10px 34px rgba(10, 132, 255, 0.25);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Arabic", "Segoe UI", "Cairo", "Helvetica Neue", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 460px at 85% -12%, rgba(10, 132, 255, 0.07), transparent 55%),
    radial-gradient(820px 420px at -6% 112%, rgba(191, 90, 242, 0.045), transparent 55%),
    var(--bg0);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* v29 آبل: لا شبكة خلفية — سطح أسود نقي نظيف */
body::before {
  content: none;
}

main.shell, main.shell-narrow { position: relative; z-index: 1; }
.shell { width: min(1120px, 100% - 40px); margin-inline: auto; }
.shell-narrow { width: min(680px, 100% - 40px); }

/* ظهور متدرج للأقسام */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.19s; }
.rise-4 { animation-delay: 0.26s; }

/* ---------- أقواس الزوايا (طابع HUD) ---------- */
.hud { position: relative; }
.hud::before, .hud::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  pointer-events: none;
  z-index: 3;
  transition: border-color 0.2s ease;
}
.hud::before {
  top: -1px; right: -1px;
  border-top: 2px solid rgba(10, 132, 255, 0.55);
  border-right: 2px solid rgba(10, 132, 255, 0.55);
  border-top-right-radius: var(--rad);
}
.hud::after {
  bottom: -1px; left: -1px;
  border-bottom: 2px solid rgba(10, 132, 255, 0.55);
  border-left: 2px solid rgba(10, 132, 255, 0.55);
  border-bottom-left-radius: var(--rad);
}
.hud:hover::before, .hud:hover::after { border-color: var(--acc); }

/* ---------- الترويسة اللاصقة ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(4, 6, 10, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(10, 132, 255, 0.2), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(10, 132, 255, 0.12);
}
.brand-mark svg { display: block; }
.brand small {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim);
  display: block;
  line-height: 1.2;
  letter-spacing: 0.14em;
}
.brand > span:not(.brand-mark) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.topnav {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  color: var(--ink2);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 15px;
  border-radius: 9px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.topnav a:hover { color: var(--ink); background: rgba(245, 245, 247, 0.09); }
.topnav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(130deg, var(--acc), var(--acc-deep));
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.35);
}
.market-led {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 12px;
  direction: ltr;
}
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
  animation: led-pulse 2.4s ease-out infinite;
}
@keyframes led-pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

/* ---------- شريط الشريط المتحرك (ديكوري) ---------- */
.tape {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.03);
  position: relative;
  z-index: 1;
}
.tape-track {
  direction: ltr;
  display: flex;
  width: max-content;
  animation: tape 52s linear infinite;
}
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tape-group { display: flex; }
.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--dim);
  white-space: nowrap;
}
.tape-item b { color: var(--ink2); font-weight: 800; }
.tape-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(10, 132, 255, 0.5); }

/* ---------- العناوين ---------- */
h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h1 .grad, .grad {
  background: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 .grad, .grad { color: var(--acc2); background: none; }
}
.sub {
  margin: 0 0 20px;
  color: var(--ink2);
  font-size: 1rem;
  max-width: 60ch;
  font-weight: 500;
}
.sub strong { color: var(--ink); direction: ltr; unicode-bidi: embed; }

.page-head, .chart-head { padding: 36px 0 10px; }
.page-head h1, .chart-head h1 { margin: 0 0 10px; font-size: clamp(1.75rem, 4vw, 2.55rem); }
.page-head .sub, .chart-head .sub { margin: 0 0 8px; }
.head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.meta-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--acc);
  transform: rotate(45deg);
}

/* ---------- الشارة النابضة ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--acc2);
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(10, 132, 255, 0.38);
  border-radius: 999px;
  padding: 6px 14px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.55);
  animation: pulse-dot 2.2s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(10, 132, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0); }
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 11px;
  padding: 11px 21px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}
.btn-quiet {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}
.btn-quiet:hover { transform: translateY(-2px); border-color: rgba(10, 132, 255, 0.55); }
.btn-accent {
  color: #fff;
  background: linear-gradient(130deg, var(--acc), var(--acc-deep));
  border: 1px solid rgba(10, 132, 255, 0.65);
  box-shadow: var(--glow-acc);
}
.btn-accent:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 34px rgba(10, 132, 255, 0.32); }
.btn-accent:disabled { opacity: 0.5; cursor: wait; transform: none; }
.btn-ghost-dn { border: 1px dashed rgba(255, 69, 58, 0.5); color: var(--dn-soft); background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; border-radius: 9px; }

/* ---------- الهيرو ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  align-items: center;
  gap: 36px;
  padding: 52px 0 34px;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
  padding: 0;
}
.chip {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }

/* لوحة الطرفية الجانبية */
.term {
  background: linear-gradient(168deg, rgba(245, 245, 247, 0.07), rgba(245, 245, 247, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.5);
}
.term-dots { display: flex; gap: 5px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1) { background: rgba(255, 69, 58, 0.75); }
.term-dots i:nth-child(2) { background: rgba(255, 159, 10, 0.75); }
.term-dots i:nth-child(3) { background: rgba(48, 209, 88, 0.75); }
.term-title { font-size: 0.75rem; font-weight: 800; color: var(--dim); letter-spacing: 0.08em; }
.term-body { padding: 14px 14px 6px; }
.art-note {
  margin: 6px 4px 10px;
  font-size: 0.75rem;
  color: var(--dim);
  text-align: center;
}
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: rgba(245, 245, 247, 0.09); stroke-width: 1; }
.chart .candles line { stroke-width: 2.4; stroke-linecap: round; }
.chart .up line { stroke: var(--up); }
.chart .up rect { fill: var(--up); }
.chart .down line { stroke: var(--dn); }
.chart .down rect { fill: var(--dn); }
.chart .candles rect { opacity: 0.92; }
.chart .bxx { fill: rgba(48, 209, 88, 0.1); stroke: rgba(48, 209, 88, 0.55); stroke-width: 1; stroke-dasharray: none; animation: bx-in 1.2s ease-out 0.4s both; }
.chart .bxx.dn { fill: rgba(255, 69, 58, 0.1); stroke: rgba(255, 69, 58, 0.55); }
@keyframes bx-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.chart .lv-line { stroke: rgba(245, 245, 247, 0.35); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .lv-50 { stroke: rgba(100, 210, 255, 0.65); }
.chart .pr-line {
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: draw 2.4s ease-out 0.8s forwards;
}
.chart .pr-chip { fill: #ffffff; }
.chart .pr-txt { fill: #04060a; font-size: 12px; font-weight: 800; font-family: var(--font); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .pulse { fill: var(--acc); animation: pulse-dot 2.2s ease-out infinite; }

/* ---------- الشريط المتحرك للبطاقات التزيينية داخل الطرفية ---------- */
.term-rows { display: grid; gap: 6px; padding: 4px 14px 14px; }
.term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--ink2);
  background: rgba(4, 6, 10, 0.45);
  border: 1px solid rgba(245, 245, 247, 0.09);
  border-radius: 8px;
  padding: 7px 11px;
}
.term-row .t-num { direction: ltr; font-variant-numeric: tabular-nums; font-weight: 800; }
.term-row .t-up { color: var(--up-soft); }
.term-row .t-dn { color: var(--dn-soft); }
.term-row .t-acc { color: var(--acc2); }

/* ---------- شريط الأرقام (الإحصاءات الكبيرة) ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 26px 0 10px;
}
.strip-item {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 16px 18px 13px;
  overflow: hidden;
}
.strip-item::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--acc), transparent);
}
.strip-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  direction: ltr;
  text-align: right;
}
.strip-lbl { font-size: 0.76rem; color: var(--dim); font-weight: 700; }

/* ---------- بطاقات الأدوات ---------- */
.tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px 0 8px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 132, 255, 0.5);
  background: var(--panel2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.tool-ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.tool-ico svg { width: 20px; height: 20px; }
.ico-green  { color: #7ce89c; background: rgba(100, 210, 255, 0.12); border: 1px solid rgba(100, 210, 255, 0.4); }
.ico-accent { color: var(--acc2); background: rgba(10, 132, 255, 0.12); border: 1px solid rgba(10, 132, 255, 0.42); }
.ico-pink   { color: #f9a8d4; background: rgba(249, 168, 212, 0.1); border: 1px solid rgba(249, 168, 212, 0.4); }
.ico-violet { color: #bf5af2; background: rgba(191, 90, 242, 0.1); border: 1px solid rgba(191, 90, 242, 0.38); }
.tool-card h2 { margin: 0; font-size: 1.02rem; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.tool-card p { margin: 0; color: var(--ink2); font-size: 0.85rem; flex: 1; }
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--acc2);
}
.tool-card:hover .tool-link svg { transform: translateX(-4px); }
.tool-link svg { transition: transform 0.18s ease; }
.tag-new {
  font-size: 0.75rem;
  font-weight: 900;
  color: #04060a;
  background: linear-gradient(120deg, var(--acc), var(--acc2));
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}
.tool-card.is-hot { border-color: rgba(10, 132, 255, 0.45); background: linear-gradient(170deg, rgba(10, 132, 255, 0.09), rgba(245, 245, 247, 0.04)); }

/* ---------- بطاقات الشرح ---------- */
.how {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  padding: 16px 0 6px;
}
.how-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 17px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.how-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.how-card h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 9px;
}
.how-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
}
.how-ico svg { width: 17px; height: 17px; }
.how-card p { margin: 0; color: var(--ink2); font-size: 0.84rem; }
.how-card .how-meta {
  display: inline-flex;
  gap: 6px;
  margin-top: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim);
}

/* ---------- بطاقات الأسعار الحية ---------- */
.live { padding: 10px 0 20px; }
.live-head h2 {
  margin: 0 0 6px;
  font-size: 1.32rem;
  font-weight: 900;
}
.live-head p { margin: 0 0 18px; color: var(--ink2); font-size: 0.9rem; max-width: 68ch; }
.live-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.live-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 15px 17px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.live-card:hover { transform: translateY(-3px); border-color: var(--line2); }
.live-card.is-ready { border-color: rgba(48, 209, 88, 0.4); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
.live-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.live-sym { font-weight: 900; font-size: 0.88rem; color: var(--acc2); letter-spacing: 0.02em; }
.live-name { font-size: 0.78rem; color: var(--dim); }
.live-price {
  margin: 0 0 3px;
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.live-loading, .live-fail { color: var(--dim); font-size: 0.88rem; font-weight: 500; }
.live-change {
  margin: 0 0 5px;
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.live-change.is-up { color: var(--up); }
.live-change.is-down { color: var(--dn); }
.live-change:empty { margin: 0; }
.live-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-note { margin: 13px 0 0; font-size: 0.75rem; color: var(--dim); }

/* ---------- بطاقات ملاحظات (الرئيسية) ---------- */
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  padding: 18px 0 46px;
}
.note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 17px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.note:hover { transform: translateY(-3px); border-color: rgba(10, 132, 255, 0.45); }
.note h2 { margin: 0 0 8px; font-size: 0.98rem; font-weight: 900; }
.note p { margin: 0; color: var(--ink2); font-size: 0.87rem; }
.inline-link { color: var(--acc2); text-decoration: none; font-weight: 800; }
.inline-link:hover { text-decoration: underline; }

/* ---------- أدوات التحكم ---------- */
.controls { padding: 14px 0 6px; }
.controls-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.search-box { flex: 1 1 240px; position: relative; }
.search-box .search-ico, .sym-search .search-ico {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--dim);
  pointer-events: none;
}
.search-box input, .sym-search input {
  width: 100%;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 14px;
  padding-inline-start: 38px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input:focus, .sym-search input:focus {
  border-color: rgba(10, 132, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}
.search-box input::placeholder, .sym-search input::placeholder { color: var(--dim); font-weight: 500; }

/* تبويبات الأطر (أداة مناطق التحكم) */
.tf-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 12px;
}
.tf-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink2);
  font: inherit;
  font-weight: 800;
  font-size: 0.83rem;
  padding: 8px 19px;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tf-tab:hover { color: var(--ink); background: rgba(245, 245, 247, 0.08); }
.tf-tab.is-active {
  color: #fff;
  background: linear-gradient(130deg, var(--acc), var(--acc-deep));
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}
.tf-tab .t-sub { display: block; font-size: 0.75rem; font-weight: 700; opacity: 0.75; }

/* رقائق الفلاتر */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-groups { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.chip-label {
  flex: 0 0 auto;
  min-width: 96px;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--dim);
}
.chip-label::after { content: ":"; opacity: 0.6; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.chip-btn:hover { color: var(--ink); border-color: rgba(10, 132, 255, 0.5); }
.chip-btn.is-active {
  color: #fff;
  background: rgba(10, 132, 255, 0.17);
  border-color: rgba(10, 132, 255, 0.68);
  box-shadow: 0 0 14px rgba(10, 132, 255, 0.15);
}
.chip-clear { border-style: dashed; }
.chip-clear:hover { border-color: rgba(255, 69, 58, 0.55); color: var(--dn-soft); }
.chip-count {
  display: inline-block;
  min-width: 20px;
  margin-inline-start: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(245, 245, 247, 0.1);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--ink2);
  text-align: center;
}
.chip-btn.is-active .chip-count { color: #fff; background: rgba(10, 132, 255, 0.32); border-color: transparent; }
.chip-dot {
  flex: 0 0 auto;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-bull { background: var(--up); }
.dot-bear { background: var(--dn); }
.dot-buy { background: transparent; border: 2px solid var(--up); width: 7px; height: 7px; }
.dot-sell { background: transparent; border: 2px solid var(--dn); width: 7px; height: 7px; }
.dot-teal { background: var(--teal); }
.dot-hollow { background: transparent; border: 1.5px solid rgba(245, 245, 247, 0.55); }
/* نقاط الحالة المقلوبة: نصف بلون الاتجاه الأصلي ونصف بلون ما تحول إليه بعد الكسر */
.dot-flip-red { background: linear-gradient(135deg, var(--up) 50%, var(--dn) 50%); }
.dot-flip-green { background: linear-gradient(135deg, var(--dn) 50%, var(--up) 50%); }

/* شريط الإحصاءات التفاعلي */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px 12px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.stat-pill:hover { color: var(--ink); border-color: rgba(10, 132, 255, 0.5); transform: translateY(-1px); }
.stat-pill.is-active {
  color: #fff;
  background: rgba(10, 132, 255, 0.17);
  border-color: rgba(10, 132, 255, 0.68);
}
.st-num {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  color: var(--ink);
  min-width: 18px;
  text-align: center;
}
.stat-pill.is-active .st-num { color: #fff; }
.st-tri { display: inline-flex; color: var(--up); }
.stat-pill.is-active .st-tri { color: var(--up-soft); }
.tri { display: inline-block; vertical-align: -0.5px; flex: 0 0 auto; }

.match-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.th-hint {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0;
}

/* شريط التقدم */
.progress-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.progress {
  flex: 1;
  height: 8px;
  background: rgba(245, 245, 247, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 247, 0.08);
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--acc), var(--acc2));
  position: relative;
  transition: width 0.25s ease;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.28) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.28) 75%, transparent 75%);
  background-size: 16px 16px;
  animation: stripes 0.8s linear infinite;
}
@keyframes stripes { to { background-position: 16px 0; } }
.progress-text { font-size: 0.76rem; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- الجداول ---------- */
.table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: rgba(5, 8, 13, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(10, 132, 255, 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(10, 132, 255, 0.55); background-clip: content-box; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(7, 10, 17, 0.96);
  color: var(--dim);
  font-weight: 800;
  font-size: 0.75rem;
  text-align: right;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.data-table thead th.num { text-align: left; }
.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(245, 245, 247, 0.06);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s ease, box-shadow 0.12s ease; }
.data-table tbody tr:hover {
  background: rgba(10, 132, 255, 0.055);
  box-shadow: inset -2px 0 0 var(--acc);
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--ink); }
.data-table th.sortable.is-sorted::after { content: " ↓"; color: var(--acc2); }
.data-table td.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td.is-up { color: var(--up); font-weight: 800; font-variant-numeric: tabular-nums; }
.data-table td.is-down { color: var(--dn); font-weight: 800; font-variant-numeric: tabular-nums; }
.data-table .px { font-weight: 900; }
.data-table .cur { font-size: 0.75rem; color: var(--dim); }
.data-table .sym {
  font-weight: 900;
  color: var(--acc2);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  background: rgba(10, 132, 255, 0.08);
  border: 1px solid rgba(10, 132, 255, 0.22);
  border-radius: 7px;
  padding: 2px 8px;
  display: inline-block;
}
.data-table .name-cell { font-weight: 600; }
.data-table .dim { color: var(--dim); }
.placeholder-row td { color: var(--dim); text-align: center; padding: 28px; }
.sec-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink2);
  background: rgba(245, 245, 247, 0.07);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 9px;
  white-space: nowrap;
}
.table-foot { margin: 10px 2px 30px; font-size: 0.75rem; color: var(--dim); }

/* ---------- الشارات المربعة ---------- */
.badge-b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 8px;
  padding: 3px 10px;
  white-space: nowrap;
}
.b-bull { color: var(--up-soft); background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.42); }
.b-bear { color: var(--dn-soft); background: rgba(255, 69, 58, 0.12); border: 1px solid rgba(255, 69, 58, 0.42); }
.b-inside { color: var(--ink2); background: rgba(245, 245, 247, 0.07); border: 1px solid var(--line); }
.b-above { color: var(--up-soft); background: rgba(48, 209, 88, 0.1); border: 1px solid rgba(48, 209, 88, 0.38); }
.b-below { color: var(--dn-soft); background: rgba(255, 69, 58, 0.1); border: 1px solid rgba(255, 69, 58, 0.38); }
.b-none { color: var(--dim); background: rgba(245, 245, 247, 0.05); border: 1px solid var(--line); }
.b-buy { color: var(--up-soft); background: rgba(48, 209, 88, 0.1); border: 1px dashed rgba(48, 209, 88, 0.55); }
.b-sell { color: var(--dn-soft); background: rgba(255, 69, 58, 0.1); border: 1px dashed rgba(255, 69, 58, 0.55); }
.b-below-buy { color: var(--dn-soft); background: rgba(255, 69, 58, 0.07); border: 1px dotted rgba(255, 69, 58, 0.55); }
.b-above-sell { color: var(--up-soft); background: rgba(48, 209, 88, 0.07); border: 1px dotted rgba(48, 209, 88, 0.55); }
.b-neutral { color: var(--ink2); background: rgba(245, 245, 247, 0.05); border: 1px solid var(--line); }
.b-up { color: var(--up-soft); background: rgba(48, 209, 88, 0.12); border: 1px solid rgba(48, 209, 88, 0.38); }
.b-down { color: #bf5af2; background: rgba(191, 90, 242, 0.12); border: 1px solid rgba(191, 90, 242, 0.4); }
.b-active { color: #99f6e4; background: rgba(100, 210, 255, 0.1); border: 1px solid rgba(100, 210, 255, 0.42); }
.b-broken { color: #fde68a; background: rgba(255, 159, 10, 0.1); border: 1px dashed rgba(255, 159, 10, 0.5); }
.b-gray { color: var(--dim); background: rgba(245, 245, 247, 0.06); border: 1px dashed var(--line2); }
/* شارات مستويات حالة المنطقة (v9) — الكسر يقلب اللون فتصبح الشارة بلون ما تحول إليه */
.b-green { color: var(--up-soft); background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.42); }
.b-red { color: var(--dn-soft); background: rgba(255, 69, 58, 0.12); border: 1px solid rgba(255, 69, 58, 0.42); }
.b-green-broken { color: #fda4af; background: rgba(255, 69, 58, 0.1); border: 1px dashed rgba(255, 69, 58, 0.55); }
.b-red-broken { color: #86efac; background: rgba(48, 209, 88, 0.1); border: 1px dashed rgba(48, 209, 88, 0.55); }

/* مستويات المناطق (عمود السكانر) */
.levels { display: inline-flex; flex-direction: column; gap: 2px; font-size: 0.75rem; }
.lv { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-sell { color: var(--dn-soft); }
.lv-buy { color: var(--up-soft); }

/* شارات التقاطع المصغرة */
.mtf { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.mtf-b {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  border-radius: 7px;
  padding: 2px 6px;
  white-space: nowrap;
  cursor: help;
}
.mtf-l { font-size: 0.75rem; font-weight: 800; opacity: 0.75; }
.mtf-b.bull { color: var(--up-soft); background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.42); }
.mtf-b.bear { color: var(--dn-soft); background: rgba(255, 69, 58, 0.12); border: 1px solid rgba(255, 69, 58, 0.42); }
.mtf-b.na { color: var(--dim); background: rgba(245, 245, 247, 0.05); border: 1px solid var(--line); }
.mtf-dash { opacity: 0.7; }

/* شارات خط المرجع المصغرة */
.e50 { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.e50-b {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
  cursor: help;
}
.e50-b.above { color: var(--up-soft); background: rgba(48, 209, 88, 0.09); border: 1px solid rgba(48, 209, 88, 0.32); }
.e50-b.below { color: var(--dn-soft); background: rgba(255, 69, 58, 0.09); border: 1px solid rgba(255, 69, 58, 0.32); }
.e50-b.na { color: var(--dim); background: rgba(245, 245, 247, 0.05); border: 1px solid var(--line); }

/* نقاط الأطر الثلاثة (نظرة عامة في أداة مناطق التحكم) */
.trio { display: inline-flex; gap: 4px; }
.trio-b {
  width: 24px;
  height: 22px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: help;
}
.trio-b.inside { color: #99f6e4; background: rgba(100, 210, 255, 0.14); border: 1px solid rgba(100, 210, 255, 0.45); }
.trio-b.above { color: var(--up-soft); background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.45); }
.trio-b.below { color: var(--dn-soft); background: rgba(255, 69, 58, 0.12); border: 1px solid rgba(255, 69, 58, 0.45); }
.trio-b.na { color: var(--dim); background: rgba(245, 245, 247, 0.05); border: 1px solid var(--line); }

/* نطاق المنطقة في الجدول */
.box-range {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
}
.box-range .br-top { color: var(--ink); font-weight: 800; }
.box-range .br-bottom { color: var(--dim); }
.box-range .br-dates { font-size: 0.75rem; color: var(--dim); direction: ltr; }

/* نسبة الموضع */
.pos-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 0.8rem;
  direction: ltr;
  display: inline-block;
  min-width: 52px;
}
.pos-pct.is-up { color: var(--up); }
.pos-pct.is-dn { color: var(--dn); }
.pos-pct.is-in { color: var(--teal); }

/* ---------- رسم المنطقة BoxViz ---------- */
.bv {
  position: relative;
  height: 230px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(rgba(245, 245, 247, 0.04) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(5, 8, 13, 0.5);
  overflow: hidden;
  direction: ltr;
}
.bv-box {
  position: absolute;
  left: 12%;
  right: 34%;
  top: var(--y-top, 20%);
  height: var(--y-h, 60%);
  border: 1.5px solid;
  border-radius: 4px;
  transition: top 0.4s ease, height 0.4s ease;
}
.bv-box.bull { background: rgba(48, 209, 88, 0.09); border-color: rgba(48, 209, 88, 0.6); }
.bv-box.bear { background: rgba(255, 69, 58, 0.09); border-color: rgba(255, 69, 58, 0.6); }
.bv-box.is-gray { background: rgba(245, 245, 247, 0.06); border-color: rgba(245, 245, 247, 0.4); border-style: dashed; }
.bv-box.is-broken { border-style: dashed; }
/* قلب لون المنطقة عند الكسر كما في المؤشر: الصاعدة المكسورة تصير حمراء والعكس */
.bv-box.is-broken.bull { background: rgba(255, 69, 58, 0.07); border-color: rgba(255, 69, 58, 0.55); }
.bv-box.is-broken.bear { background: rgba(48, 209, 88, 0.07); border-color: rgba(48, 209, 88, 0.55); }
.bv-lv {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 0;
  border-top: 1px dashed rgba(245, 245, 247, 0.3);
  top: var(--y);
}
.bv-lv.is-50 { border-top: 1.5px solid rgba(100, 210, 255, 0.75); }
.bv-lv-tag {
  position: absolute;
  left: 70%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
  background: rgba(7, 10, 17, 0.9);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
  top: var(--y);
}
.bv-lv-tag.is-50 { color: var(--teal); border-color: rgba(100, 210, 255, 0.5); }
.bv-price {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 0;
  border-top: 2px solid #fff;
  top: var(--y);
  z-index: 4;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.35));
}
.bv-chip {
  position: absolute;
  right: 4%;
  transform: translateY(-50%);
  top: var(--y);
  z-index: 5;
  font-size: 0.75rem;
  font-weight: 900;
  color: #04060a;
  background: #fff;
  border-radius: 7px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  direction: ltr;
}
.bv-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- النافذة المنبثقة (تفاصيل السهم) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 16px;
  background: rgba(2, 4, 8, 0.72);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  overflow-y: auto;
}
.modal.is-open { display: flex; }
.sheet {
  width: min(880px, 100%);
  background: linear-gradient(180deg, #0a0f1a, #070a11);
  border: 1px solid var(--line2);
  border-radius: var(--rad);
  padding: 22px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  animation: rise 0.28s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  position: relative;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sheet-title .sym { font-size: 1.05rem; }
.sheet-title .nm { font-weight: 800; font-size: 0.95rem; }
.sheet-title .pr { font-variant-numeric: tabular-nums; font-weight: 900; direction: ltr; color: var(--teal); }
.sheet-close {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.sheet-close:hover { color: var(--dn-soft); border-color: rgba(255, 69, 58, 0.5); }
.tf-blocks { display: grid; gap: 14px; }
.tf-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(245, 245, 247, 0.03);
}
.tf-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}
.tf-block-head h3 { margin: 0; font-size: 0.92rem; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.tf-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; align-items: start; }
.kv-list { display: flex; flex-direction: column; }
.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
  border-bottom: 1px dashed rgba(245, 245, 247, 0.13);
  font-size: 0.8rem;
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--dim); font-weight: 700; flex: 0 0 auto; }
.kv .v { font-variant-numeric: tabular-nums; font-weight: 800; text-align: left; }
.kv .v.num { direction: ltr; }
.kv .v.is-up { color: var(--up); }
.kv .v.is-dn { color: var(--dn); }
.kv .v.is-teal { color: var(--teal); }
.kv .v.is-warn { color: var(--warn); }
.forming-chip {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink2);
  background: rgba(245, 245, 247, 0.06);
  border: 1px dashed var(--line2);
  border-radius: 8px;
  padding: 5px 10px;
}

/* ---------- التذييل ---------- */
.site-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(3, 5, 8, 0.6);
  padding: 15px 0 20px;
  position: relative;
  z-index: 1;
}
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--dim);
}
.foot-row p { margin: 0; }
.site-foot a { color: var(--acc2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-copy { font-size: 0.75rem; }

/* ---------- إتاحة الوصول ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- استجابة ---------- */
@media (max-width: 980px) {
  .tools { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
  .notes { grid-template-columns: 1fr; }
  .live-cards { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: 1fr; }
  .tf-grid { grid-template-columns: 1fr; }
  .market-led { display: none; }
}
@media (max-width: 700px) {
  .topnav a { padding: 6px 10px; font-size: 0.75rem; }
  .table-wrap { max-height: 62vh; }
  .data-table { font-size: 0.79rem; }
  .data-table thead th, .data-table tbody td { padding: 8px 10px; }
  .levels { font-size: 0.75rem; }
  .chip-label { min-width: 100%; }
  .chip-label::after { content: ""; }
  .mtf-b, .e50-b { font-size: 0.75rem; padding: 2px 4px; }
  .match-count { display: none; }
  .th-hint { display: none; }
  .stats-row { gap: 6px; }
  .stat-pill { font-size: 0.75rem; padding: 6px 10px; }
  .how-card h2 { font-size: 0.88rem; }
  .how-ico { width: 30px; height: 30px; }
  .how-ico svg { width: 15px; height: 15px; }
  .tf-tabs { width: 100%; }
  .tf-tab { flex: 1; padding: 8px 8px; }
  .bv { height: 200px; }
  .bv-box { left: 6%; right: 42%; }
  .bv-lv-tag { left: 62%; font-size: 0.75rem; padding: 1px 5px; }
  .bv-chip { font-size: 0.75rem; }
  .sheet { padding: 16px; }
}
@media (max-width: 480px) {
  body.page { line-height: 1.8; }
  .shell { width: min(1120px, 100% - 26px); }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topnav { order: 10; width: 100%; overflow-x: auto; }
  .topnav a { flex: 1 0 auto; text-align: center; padding: 7px 9px; white-space: nowrap; }
  .hero { padding: 24px 0 18px; }
  .live-cards { grid-template-columns: 1fr; }
  .live-price { font-size: 1.3rem; }
  .strip { grid-template-columns: 1fr 1fr; gap: 9px; }
  .strip-num { font-size: 1.35rem; }
  .brand small { display: none; }
}

/* ---------- شارت المناطق (v8) ---------- */
.chart-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 14px;
  background: rgba(245, 245, 247, 0.03);
  margin-bottom: 14px;
}
.chart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.chart-panel-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-panel-head h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--teal), var(--acc));
  flex: 0 0 auto;
}
.chart-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ctab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink2);
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ctab:hover { color: var(--ink); border-color: var(--line2); }
.ctab.is-active {
  color: #06231f;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(100, 210, 255, 0.25);
}
.chart-mount {
  position: relative;
  height: 380px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(rgba(245, 245, 247, 0.03) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(245, 245, 247, 0.03) 1px, transparent 1px) 0 0 / 12.5% 100%,
    #060a12;
  overflow: hidden;
}
.chart-note {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-weight: 700;
  font-size: 0.84rem;
}
.chart-host { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.chart-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink2);
}
.lg-item { display: inline-flex; align-items: center; gap: 5px; }
.lg-swatch {
  width: 14px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}
.sw-bull { background: rgba(48, 209, 88, 0.28); border: 1px solid rgba(48, 209, 88, 0.75); }
.sw-bear { background: rgba(255, 69, 58, 0.28); border: 1px solid rgba(255, 69, 58, 0.75); }
.sw-flip-red { background: linear-gradient(135deg, rgba(48, 209, 88, 0.38) 50%, rgba(255, 69, 58, 0.38) 50%); border: 1px dashed rgba(255, 69, 58, 0.8); }
.sw-flip-green { background: linear-gradient(135deg, rgba(255, 69, 58, 0.38) 50%, rgba(48, 209, 88, 0.38) 50%); border: 1px dashed rgba(48, 209, 88, 0.8); }
.sw-gray { background: rgba(245, 245, 247, 0.14); border: 1px dashed rgba(245, 245, 247, 0.5); }
.sw-forming { background: rgba(255, 159, 10, 0.10); border: 1px dashed rgba(255, 159, 10, 0.6); }
.lg-line { width: 16px; height: 0; display: inline-block; border-top: 2px solid; }
.lv50 { border-color: var(--teal); }
.pl { border-color: rgba(245, 245, 247, 0.65); border-top-style: dashed; }
.chart-ohlc {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-ohlc .is-up { color: var(--up); }
.chart-ohlc .is-dn { color: var(--dn); }
.chart-ranges { display: flex; gap: 4px; margin-inline-start: auto; }
.rng {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink2);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.rng:hover { color: var(--ink); }
.rng.is-active { color: var(--teal); border-color: rgba(100, 210, 255, 0.5); background: rgba(100, 210, 255, 0.09); }

/* حد أقصى لعدد المناطق المعروضة (v10) — يعيد استخدام نمط .rng */
.chart-boxmax { display: flex; align-items: center; gap: 4px; }
.bxm-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  margin-inline-end: 3px;
  white-space: nowrap;
}
.bxm { min-width: 30px; text-align: center; }

/* أدوات التقريب والتحريك (v10) */
.chart-zoom { display: flex; gap: 4px; }
.zbtn {
  width: 27px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink2);
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.zbtn:hover { color: var(--teal); border-color: rgba(100, 210, 255, 0.5); background: rgba(100, 210, 255, 0.07); }
.zbtn svg { display: block; }
.chart-canvas.is-grab { cursor: grabbing; }
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.chart-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none; /* الشارت يلتقط السحب والقرص كاملين — التمرير من خارجه */
  cursor: crosshair;
}
.chart-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
  background: rgba(8, 12, 20, 0.94);
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 8px 10px;
  min-width: 148px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  transform: translate(calc(var(--tip-x, 0px) * (1 - 2 * var(--tip-flip, 0)) - 100% * var(--tip-flip, 0)), var(--tip-y, 0px));
}
.tp-date {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal);
}
.tp-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  font-size: 0.75rem;
}
.tp-grid span { color: var(--dim); font-weight: 700; }
.tp-grid b {
  font-variant-numeric: tabular-nums;
  text-align: left;
  font-weight: 800;
  color: var(--ink);
}
.tp-grid b.is-up { color: var(--up); }
.tp-grid b.is-dn { color: var(--dn); }

/* ---------- شارة عمر البيانات (الكاش) ---------- */
.cache-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.cache-chip.is-live {
  color: var(--teal);
  border-color: rgba(100, 210, 255, 0.4);
  background: rgba(100, 210, 255, 0.07);
}
.cache-chip.is-cached {
  color: var(--warn);
  border-color: rgba(255, 159, 10, 0.35);
  background: rgba(255, 159, 10, 0.06);
}

/* نافذة التفاصيل أعرض لاحتواء الشارت */
.sheet { width: min(1020px, 100%); }

@media (max-width: 700px) {
  .chart-mount { height: 280px; }
  .chart-legend, .chart-ohlc { display: none; }
  .chart-ranges { margin-inline-start: 0; }
  .chart-boxmax { order: 3; }
  .chart-zoom { order: 2; }
  .chart-ranges { order: 1; }
  .bxm-label { display: none; }
  .chart-panel { padding: 10px; }
  .chart-panel-head { gap: 8px; }
}

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .rise-1, .rise-2, .rise-3, .rise-4 { animation: none; }
  .chart .pr-line, .chart .bxx { animation: none; stroke-dashoffset: 0; }
  .badge-dot, .chart .pulse, .led { animation: none; }
  .progress-fill::after { animation: none; }
  .tape-track { animation: none; }
  .btn, .note, .tool-card, .how-card, .live-card { transition: none; }
}

/* ---------- الطباعة ---------- */
@media print {
  body.page { background: #fff; color: #111; }
  body::before, .site-head, .tape { display: none; }
}

/* ============================================================
   صفحة الشارت الاحترافي /chart (v11) — أنماط جديدة حصراً في نهاية الملف
   البنية (chart.html): body.page-chart > main.shell.shell-chart
   > .chart-head + .chart-bar (بحث + أطر + حد المناطق) + .chart-stage
   (ليجند + أدوات + لوحة الرسم) + .zone-strip (بطاقات ملخص المناطق).
   الأصناف المتشاركة مع نافذة تفاصيل الأداة القديمة (chart-mount /
   chart-tools / chart-legend / chart-note) مؤطرة داخل .page-chart
   حتى لا تنكسر أي صفحة أخرى — صفر تعديل على الأنماط أعلاه.
   ============================================================ */

/* ---------- غلاف أعرض + ترويسة الصفحة ---------- */
.shell-chart { width: min(1180px, 100% - 40px); }

/* ---------- صف أدوات الشارت ---------- */
.chart-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0 6px;
}
.sym-search { position: relative; flex: 1 1 300px; max-width: 420px; }
.page-chart .chart-bar .tf-tabs { margin-bottom: 0; }

/* مجموعة أزرار مقسمة (حد المناطق / قالب العرض) */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #0d1420;
  border: 1px solid rgba(245, 245, 247, 0.18);
  border-radius: 11px;
  padding: 4px;
}
.seg-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  padding: 0 8px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.seg-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink2);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.seg-btn:hover { color: var(--ink); background: rgba(245, 245, 247, 0.09); }
.seg-btn.is-active {
  color: #fff;
  background: rgba(10, 132, 255, 0.17);
  border-color: rgba(10, 132, 255, 0.68);
  box-shadow: 0 0 14px rgba(10, 132, 255, 0.15);
}

/* أزرار الأدوات الصغيرة (الآن / إعادة / تحديث) */
.tool-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink2);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tool-btn:hover { color: var(--ink); border-color: rgba(10, 132, 255, 0.5); background: rgba(245, 245, 247, 0.07); }

/* ---------- لوحة الشارت (HUD) ---------- */
.page-chart .chart-stage {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: rgba(5, 8, 13, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
/* أقواس الزوايا داخل الحدود لأن overflow:hidden يقصّ ما خارجها */
.page-chart .chart-stage::before { top: 0; right: 0; border-top-right-radius: calc(var(--rad) - 1px); }
.page-chart .chart-stage::after { bottom: 0; left: 0; border-bottom-left-radius: calc(var(--rad) - 1px); }

/* شريط الليجند العلوي */
.page-chart .chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.page-chart .lg-sym { font-weight: 900; color: var(--acc2); letter-spacing: 0.03em; }
.page-chart .lg-name { color: var(--ink2); font-size: 0.76rem; font-weight: 600; }
.page-chart .lg-price { font-weight: 900; color: #ffffff; font-size: 0.92rem; direction: ltr; }
.page-chart .lg-chg { font-weight: 800; color: var(--ink2); font-size: 0.78rem; direction: ltr; }
.page-chart .lg-chg.is-up { color: var(--up); }
.page-chart .lg-chg.is-dn { color: var(--dn); }
.page-chart .lg-ohlc { display: inline-flex; align-items: baseline; gap: 10px; font-size: 0.75rem; }
.page-chart .lg-k { color: var(--dim); font-weight: 700; }
.page-chart .lg-k b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.page-chart .lg-tf {
  margin-inline-start: auto;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--teal);
  background: rgba(100, 210, 255, 0.09);
  border: 1px solid rgba(100, 210, 255, 0.4);
  border-radius: 7px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* صف أدوات العرض تحت الليجند */
.page-chart .chart-tools {
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(245, 245, 247, 0.1);
}

/* لوحة الرسم نفسها */
.page-chart .chart-mount {
  position: relative;
  height: min(62vh, 620px);
  min-height: 420px;
  border: 0;
  border-radius: 0;
  background: #070b12;
  direction: ltr;
  overflow: hidden;
}
/* كل الأبناء المباشرين يتمددون لملء اللوحة (والملاحظة مطلقة حتى لا تدفع المحرك خارج اللوحة) */
.page-chart .chart-mount > * { width: 100%; height: 100%; }
/* لوحة المحرك الموحد: كانفاس واحد يستقبل السحب والتقريب مباشرة —
   المناطق مرسومة داخله خلف الشموع لا في طبقة فوقية */
.page-chart .chart-mount > canvas { position: absolute; inset: 0; z-index: 2; }
.page-chart .chart-note {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.page-chart .chart-note[hidden] { display: none; }

/* ---------- شريط بطاقات ملخص المناطق ---------- */
.zone-strip { padding: 18px 0 8px; }
.zone-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.z-card {
  background: #0a0f18;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}
.z-k {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.z-v {
  display: block;
  font-weight: 900;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.z-v.is-up { color: var(--up); }
.z-v.is-dn { color: var(--dn); }
.z-v.is-teal { color: var(--teal); }
.z-v.is-warn { color: var(--warn); }
.z-v.is-dim { color: var(--dim); }

/* حاشية أسفل الصفحة */
.chart-foot { margin: 14px 2px 34px; font-size: 0.75rem; color: var(--dim); }

/* ---------- روابط تصبح بطاقات/عناصر قابلة للنقر (v11) ---------- */
a.live-card { text-decoration: none; color: inherit; display: block; }
a.live-card:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
a.tape-item { color: inherit; text-decoration: none; }
a.tape-item:hover b, a.tape-item:hover { color: var(--ink); }
a.tape-item:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; border-radius: 6px; }
a.sym-link { text-decoration: none; }
a.sym-link:hover { color: #fff; background: rgba(10, 132, 255, 0.16); border-color: rgba(10, 132, 255, 0.6); }

/* ---------- استجابة صفحة الشارت ---------- */
@media (max-width: 900px) {
  .zone-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  /* إبقاء الليجند ظاهراً في صفحة الشارت (قاعدة النافذة القديمة تخفيه) */
  .page-chart .chart-legend { display: flex; padding: 9px 12px; }
  .page-chart .lg-ohlc { display: none; }
  .sym-search { flex-basis: 100%; max-width: none; }
  .zone-cards { grid-template-columns: 1fr; gap: 8px; }
  .z-card { padding: 12px 13px; }
  .page-chart .chart-mount { height: min(56vh, 540px); min-height: 360px; }
  .chart-foot { margin-bottom: 26px; }
}
@media (max-width: 390px) {
  .page-chart .lg-name { display: none; }
  .page-chart .seg-view .seg-label { display: none; }
  .page-chart .chart-legend { gap: 5px 10px; font-size: 0.76rem; }
  .page-chart .lg-tf { padding: 2px 7px; font-size: 0.75rem; }
  .seg-btn { padding: 5px 9px; }
  .z-card { padding: 11px 12px; }
}

/* ============================================================
   v12 — الفرص والتنبيهات والمشاركة والحالة الطازجة
   ============================================================ */

/* شارة الطازجة: نبضة عنبرية هادئة تُبرز التشكل الجديد */
.b-fresh {
  color: var(--warn);
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.45);
  animation: freshPulse 2.6s ease-in-out infinite;
}
@keyframes freshPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.28); }
  50% { box-shadow: 0 0 0 5px rgba(255, 159, 10, 0); }
}
.dot-fresh { background: var(--warn); box-shadow: 0 0 8px rgba(255, 159, 10, 0.55); }

/* قسم الفرص: ترويسة + مسار أفقي قابل للتمرير */
.opp-sec { margin: 30px 0 6px; }
.opp-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.opp-head h2 { margin: 0; font-size: 1.28rem; font-weight: 900; }
.opp-head h2::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-inline-start: 10px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 10px rgba(48, 209, 88, 0.8);
  animation: led-pulse 2.2s ease-in-out infinite;
  vertical-align: middle;
}
.opp-sub { margin: 0; color: var(--dim); font-size: 0.82rem; }
.opp-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 208px;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 132, 255, 0.35) transparent;
}
.opp-track::-webkit-scrollbar { height: 8px; }
.opp-track::-webkit-scrollbar-thumb { background: rgba(10, 132, 255, 0.3); border-radius: 8px; }
.opp-track::-webkit-scrollbar-track { background: rgba(245, 245, 247, 0.05); border-radius: 8px; }
.opp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(245, 245, 247, 0.05), rgba(245, 245, 247, 0.02));
  border: 1px solid var(--line2);
  border-radius: var(--rad);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.opp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 132, 255, 0.5);
  box-shadow: 0 14px 30px rgba(10, 132, 255, 0.14);
}
.opp-rank {
  position: absolute;
  top: 10px;
  inset-inline-start: 12px;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--dim);
  letter-spacing: 1px;
}
.opp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.opp-top .sym { font-size: 1.02rem; }
.opp-score {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  color: var(--ink2);
  background: rgba(245, 245, 247, 0.07);
}
.opp-score.strong { color: var(--up-soft); border-color: rgba(48, 209, 88, 0.45); background: rgba(48, 209, 88, 0.1); }
.opp-score.hot { color: #fff; border-color: rgba(10, 132, 255, 0.65); background: linear-gradient(135deg, var(--acc), var(--acc-deep)); box-shadow: var(--glow-acc); }
.opp-name {
  color: var(--ink2);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-price { font-variant-numeric: tabular-nums; font-weight: 900; direction: ltr; text-align: right; font-size: 1.06rem; color: var(--teal); }
.opp-price small { color: var(--dim); font-weight: 700; font-size: 0.75rem; }
.opp-dots { display: flex; gap: 6px; margin-top: 2px; }
.opp-dot {
  width: 26px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  border-radius: 6px;
  border: 1px solid var(--line2);
  color: var(--dim);
  background: rgba(245, 245, 247, 0.05);
}
.opp-dot.above { color: var(--up-soft); border-color: rgba(48, 209, 88, 0.5); background: rgba(48, 209, 88, 0.12); }
.opp-dot.below { color: var(--dn-soft); border-color: rgba(255, 69, 58, 0.5); background: rgba(255, 69, 58, 0.12); }
.opp-dot.flip-red { color: #fda4af; border-color: rgba(255, 69, 58, 0.45); background: rgba(255, 69, 58, 0.07); border-style: dashed; }
.opp-dot.flip-green { color: var(--up-soft); border-color: rgba(48, 209, 88, 0.45); background: rgba(48, 209, 88, 0.07); border-style: dashed; }
.opp-dot.hollow { border-style: dashed; opacity: 0.75; }
.opp-more { margin: 4px 0 0; color: var(--dim); font-size: 0.82rem; }

/* لوحة الفرص في الرئيسية: أعمدة بدل المسار الأفقي على الشاشات الواسعة */
#opps-panel .opp-track {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-auto-columns: unset;
  overflow-x: visible;
}

/* CTA التنبيهات في الرئيسية */
.alerts-cta {
  margin: 34px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 26px;
  border-radius: var(--rad);
  border: 1px solid rgba(10, 132, 255, 0.28);
  background:
    radial-gradient(600px 200px at 92% -30%, rgba(10, 132, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(245, 245, 247, 0.05), rgba(245, 245, 247, 0.02));
}
.alerts-cta h2 { margin: 0 0 6px; font-size: 1.22rem; font-weight: 900; }
.alerts-cta p { margin: 0; color: var(--ink2); font-size: 0.88rem; max-width: 62ch; }
.alerts-cta-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.alerts-hint { color: var(--dim); font-size: 0.75rem; }

/* أزرار شريط الأدوات الجانبية */
.btn.is-ok { color: var(--up-soft) !important; border-color: rgba(48, 209, 88, 0.55) !important; }
.btn-block { width: 100%; justify-content: center; }
.sheet-actions { display: flex; align-items: center; gap: 10px; }

/* نافذة بطاقة المشاركة: تطفو فوق نافذة التفاصيل */
#share-modal { z-index: 130; }
.sheet-share { width: min(680px, 100%); }
.share-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-height: min(66vh, 760px);
  overflow-y: auto;
  border: 1px solid var(--line2);
  border-radius: var(--rad-sm);
  background: rgba(4, 6, 10, 0.55);
  padding: 10px;
}
.share-canvas {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.share-note { margin: 10px 0 0; color: var(--dim); font-size: 0.76rem; }

/* نافذة تنبيهات البريد */
.sheet-alerts { width: min(520px, 100%); }
.alerts-sub { margin: 2px 0 16px; color: var(--ink2); font-size: 0.86rem; line-height: 1.9; }
.alerts-form { display: flex; flex-direction: column; gap: 16px; }
.alerts-field { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.alerts-lbl { font-weight: 800; font-size: 0.84rem; color: var(--ink); }
#alerts-email {
  background: rgba(4, 6, 10, 0.6);
  border: 1px solid var(--line2);
  border-radius: var(--rad-sm);
  color: var(--ink);
  padding: 11px 13px;
  font-family: var(--font);
  font-size: 0.94rem;
  direction: ltr;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#alerts-email:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}
.alerts-freq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.freq-opt { cursor: pointer; }
.freq-opt input { position: absolute; opacity: 0; pointer-events: none; }
.freq-opt span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--rad-sm);
  background: rgba(245, 245, 247, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
  height: 100%;
}
.freq-opt b { font-size: 0.86rem; font-weight: 900; }
.freq-opt small { color: var(--dim); font-size: 0.75rem; line-height: 1.6; }
.freq-opt input:checked + span {
  border-color: rgba(100, 210, 255, 0.55);
  background: rgba(100, 210, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(100, 210, 255, 0.08);
}
.freq-opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.alerts-status { margin: 0; min-height: 1.4em; font-size: 0.82rem; color: var(--ink2); line-height: 1.8; }
.alerts-status.is-ok { color: var(--up-soft); }
.alerts-status.is-err { color: var(--dn-soft); }

/* تجاوب الأقسام الجديدة */
@media (max-width: 760px) {
  .alerts-cta { flex-direction: column; align-items: stretch; text-align: right; }
  .alerts-cta-actions { align-items: stretch; }
  .alerts-cta-actions .btn { width: 100%; justify-content: center; }
  .alerts-freq { grid-template-columns: 1fr; }
  #opps-panel .opp-track { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 560px) {
  .controls-row { flex-wrap: wrap; }
  .controls-row .btn-sm { flex: 1 1 46%; justify-content: center; }
  .opp-track { grid-auto-columns: 172px; }
  .opp-sec { margin-top: 22px; }
  .sheet { padding: 16px; }
  .share-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   شرائح السوق (v13) — تقسيم السوق حسب القيمة السوقية ومؤشر لكل شريحة
   ============================================================ */

.stat-pill.info { cursor: default; }
.stat-pill.info:hover { transform: none; border-color: var(--line); color: var(--ink2); }
.stat-pill.info .st-num { color: var(--ink); }
.st-up { color: var(--up); }
.st-dn { color: var(--dn); }

.idx-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 2px 14px; }
.idx-controls .spacer { flex: 1; }

/* لوحة المؤشر الكبيرة */
.idx-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(245, 245, 247, 0.05), rgba(245, 245, 247, 0.02));
  padding: 14px 14px 10px;
  overflow: hidden;
}
.idx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.idx-title { margin: 0; font-size: 0.95rem; font-weight: 900; }
.idx-note { margin: 0; color: var(--dim); font-size: 0.75rem; }
.idx-legend { display: flex; flex-wrap: wrap; gap: 7px; }
.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.lg-chip:hover { border-color: var(--line2); }
.lg-chip.off { opacity: 0.38; }
.lg-chip .sw { width: 14px; height: 4px; border-radius: 2px; flex: none; }
.lg-chip .v { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--ink); direction: ltr; }
.idx-ranges { display: flex; gap: 5px; }
.idx-ranges button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.idx-ranges button:hover { color: var(--ink); border-color: var(--line2); }
.idx-ranges button.on {
  color: #fff;
  background: rgba(10, 132, 255, 0.17);
  border-color: rgba(10, 132, 255, 0.6);
}
.idx-canvas-host { position: relative; }
.idx-canvas { width: 100%; height: 430px; display: block; touch-action: none; cursor: crosshair; }
.idx-tip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  display: none;
  min-width: 168px;
  background: rgba(8, 11, 18, 0.94);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.idx-tip .tip-date { color: var(--dim); font-weight: 700; margin-bottom: 5px; font-size: 0.75rem; }
.idx-tip .tip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1.5px 0; }
.idx-tip .tip-row .lbl { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.idx-tip .tip-row .sw { width: 12px; height: 3px; border-radius: 2px; }
.idx-tip .tip-row .num { font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; }
.idx-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--ink2);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

/* بطاقات الشرائح */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px 0 6px;
}
.tier-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: var(--panel);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tier-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tier-name { margin: 0; font-size: 1rem; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.tier-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tier-count { color: var(--dim); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.tier-desc { margin: 3px 0 12px; color: var(--ink2); font-size: 0.78rem; }
.tier-val-row { display: flex; align-items: baseline; gap: 8px; }
.tier-val { font-size: 1.72rem; font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; line-height: 1.1; }
.tier-val-lbl { color: var(--dim); font-size: 0.75rem; font-weight: 700; }
.tier-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tier-badge {
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 7px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.tier-badge b { font-weight: 900; direction: ltr; display: inline-block; }
.tier-badge.up { color: var(--up); border-color: rgba(48, 209, 88, 0.4); background: rgba(48, 209, 88, 0.08); }
.tier-badge.dn { color: var(--dn); border-color: rgba(255, 69, 58, 0.4); background: rgba(255, 69, 58, 0.08); }
.tier-badge.na { color: var(--dim); }
.tier-spark { width: 100%; height: 56px; display: block; margin-top: 12px; }
.tier-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tier-toggle {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tier-toggle:hover { color: var(--ink); border-color: var(--acc2); background: rgba(10, 132, 255, 0.06); }
.tier-toggle svg { transition: transform 0.2s ease; }
.tier-toggle.open svg { transform: rotate(180deg); }
.tier-sample-note { color: var(--dim); font-size: 0.75rem; margin: 0; }
.tier-members {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.tier-members.open { display: flex; }
.tier-members::-webkit-scrollbar { width: 8px; }
.tier-members::-webkit-scrollbar-track { background: transparent; }
.tier-members::-webkit-scrollbar-thumb { background: rgba(10, 132, 255, 0.35); border-radius: 8px; background-clip: content-box; }
.member-chip {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.member-chip:hover { color: var(--ink); border-color: var(--acc2); background: rgba(10, 132, 255, 0.07); }
.member-chip b { color: var(--ink); font-weight: 800; }
.member-chip.is-sample { border-color: rgba(100, 210, 255, 0.35); }

/* أبرز شركات العينة */
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6px 0; }
.mover-card { border: 1px solid var(--line); border-radius: var(--rad); background: var(--panel); padding: 14px 16px; }
.mover-card h3 { margin: 0 0 10px; font-size: 0.88rem; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.mover-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mover-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink2);
  font-size: 0.8rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.mover-row:hover { background: rgba(10, 132, 255, 0.07); color: var(--ink); }
.mover-row .pos { width: 20px; color: var(--dim); font-weight: 800; font-size: 0.75rem; }
.mover-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); }
.mover-row .cd { color: var(--dim); font-size: 0.75rem; direction: ltr; }
.mover-row .pv { font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; }
.mover-row .pv.up { color: var(--up); }
.mover-row .pv.dn { color: var(--dn); }

/* بطاقة مشاركة */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 26px;
  transform: translateX(50%);
  background: rgba(8, 11, 18, 0.95);
  color: var(--ink);
  border: 1px solid rgba(10, 132, 255, 0.55);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 800;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.g-toast.show { opacity: 1; transform: translateX(50%) translateY(-4px); }

@media (max-width: 900px) {
  .tier-grid { grid-template-columns: 1fr; }
  .idx-canvas { height: 340px; }
  .movers { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .idx-canvas { height: 290px; }
  .tier-val { font-size: 1.5rem; }
  .idx-tip { font-size: 0.75rem; }
}
.dot-large { background: #64d2ff; }
.dot-mid { background: #ff9f0a; }
.dot-small { background: #a78bfa; }
.tools .tool-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.idx-empty[hidden] { display: none; }

/* ============================================================
   v17 — الواجهة الرئيسية الاحترافية
   شريط نبض السوق الحي في الهيرو + لوحة مراقبة السوق + قسم كيف تعمل
   + الظهور التدريجي والعدادات — كلها بنفس لغة التصميم (HUD داكن)
   ============================================================ */

/* ---------- شريط نبض السوق الحي (داخل الهيرو) ---------- */
.mkt-live {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.55);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.mkt-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 18px 10px;
  border-inline-start: 1px solid rgba(245, 245, 247, 0.12);
  min-width: 0;
}
.mkt-cell:first-child { border-inline-start: 0; }
.mkt-k {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.mkt-v {
  font-size: 1.04rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
}
.mkt-v.is-up { color: var(--up); }
.mkt-v.is-dn { color: var(--dn); }
.mkt-status { direction: rtl; display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; }
.status-led {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}
.status-led.is-open {
  background: var(--up);
  animation: pulse-open 2.2s ease-out infinite;
}
@keyframes pulse-open {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

/* ---------- لوحة مراقبة السوق ---------- */
.watch-sec { margin: 30px 0 4px; }
.how-sec { margin: 26px 0 4px; }
.watch-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.watch-head h2 {
  margin: 0 0 6px;
  font-size: 1.32rem;
  font-weight: 900;
  position: relative;
}
.watch-head h2::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -6px;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--acc), transparent);
}
.watch-head p { margin: 0; color: var(--ink2); font-size: 0.9rem; max-width: 62ch; }
.qjump { display: flex; gap: 8px; align-items: center; }
.qjump input {
  background: rgba(4, 6, 10, 0.62);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 13px;
  width: 220px;
  direction: ltr;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.qjump input::placeholder { color: var(--dim); font-weight: 600; }
.qjump input:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.13);
}
.watch-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.wf-btn {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 15px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.wf-btn:hover { color: var(--ink); border-color: var(--line2); }
.wf-btn.is-active {
  color: #fff;
  background: linear-gradient(130deg, var(--acc), var(--acc-deep));
  border-color: rgba(10, 132, 255, 0.65);
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.28);
}
.watch-breadth {
  margin-inline-start: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.watch-breadth b.is-up { color: var(--up); font-weight: 900; }
.watch-breadth b.is-dn { color: var(--dn); font-weight: 900; }
.watch-breadth .sep { opacity: 0.55; }

.watch {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
}
.watch-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.9fr 0.7fr;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  text-decoration: none;
  color: var(--ink);
  border-top: 1px solid rgba(245, 245, 247, 0.08);
  transition: background 0.14s ease;
}
#watch-rows .watch-row:first-child { border-top: 0; }
a.watch-row:hover { background: rgba(245, 245, 247, 0.065); }
.watch-head-row {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  letter-spacing: 0.06em;
  background: rgba(4, 6, 10, 0.42);
  padding: 9px 18px;
}
.watch-sym { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.watch-sym b { direction: ltr; text-align: right; font-size: 0.9rem; font-weight: 900; color: var(--acc2); letter-spacing: 0.02em; }
.watch-sym span {
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-price {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
  font-weight: 900;
  font-size: 1rem;
}
.watch-price small { color: var(--dim); font-weight: 600; font-size: 0.75rem; margin-inline-start: 4px; }
.watch-cell { display: flex; justify-content: flex-start; }
.chg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  border-radius: 8px;
  padding: 3px 10px;
}
.chg-badge::before { content: ""; width: 0; height: 0; border-inline: 5px solid transparent; }
.chg-badge.is-up { color: var(--up-soft); background: rgba(48, 209, 88, 0.1); }
.chg-badge.is-up::before { border-bottom: 7px solid currentColor; }
.chg-badge.is-dn { color: var(--dn-soft); background: rgba(255, 69, 58, 0.1); }
.chg-badge.is-dn::before { border-top: 7px solid currentColor; }
.chg-badge.is-flat { color: var(--ink2); background: rgba(245, 245, 247, 0.08); }
.chg-badge.is-flat::before { display: none; }
.watch-time {
  font-size: 0.75rem;
  color: var(--dim);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.watch-note { margin: 12px 0 0; font-size: 0.75rem; color: var(--dim); }
.watch-skeleton { margin: 0; padding: 24px 18px; color: var(--dim); font-size: 0.84rem; font-weight: 600; }

/* فلاتر الصاعدين والهابطين */
#watch-rows[data-filter="up"] .watch-row:not([data-dir="up"]) { display: none; }
#watch-rows[data-filter="dn"] .watch-row:not([data-dir="dn"]) { display: none; }

/* ---------- الظهور التدريجي (يُفعّل فقط بعد تأكد جافاسكربت) ---------- */
.anim-on [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.anim-on [data-reveal].in { opacity: 1; transform: none; }

/* ---------- استجابة v17 ---------- */
@media (max-width: 980px) {
  .mkt-live { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .mkt-cell:nth-child(odd) { border-inline-start: 0; }
  .mkt-cell:nth-child(n + 3) { border-top: 1px solid rgba(245, 245, 247, 0.12); }
}
@media (max-width: 700px) {
  .watch-row { grid-template-columns: 1.4fr 1fr 0.9fr; padding: 10px 13px; }
  .watch-head-row { padding: 8px 13px; }
  .watch-col-time { display: none; }
  .qjump { width: 100%; }
  .qjump input { flex: 1; width: auto; min-width: 0; }
  .watch-breadth { width: 100%; margin-inline-start: 0; }
  .mkt-cell { padding: 9px 13px 8px; }
  .mkt-v { font-size: 0.95rem; }
}

/* احترام تقليل الحركة للأنماط الجديدة */
@media (prefers-reduced-motion: reduce) {
  .anim-on [data-reveal] { opacity: 1; transform: none; transition: none; }
  .status-led.is-open { animation: none; }
}

/* ============================================================
   قسم v18 — خريطة حرارة القوة النسبية (/heatmap)
   ============================================================ */

.shell-wide { width: min(1280px, 100% - 40px); margin-inline: auto; }

/* أدوات اللوحة: بحث + ترتيب + تحديث */
.hm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hm-field { position: relative; display: inline-flex; }
.hm-field input,
.hm-field select {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  min-width: 190px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hm-field select { min-width: 170px; cursor: pointer; }
.hm-field input::placeholder { color: var(--dim); font-weight: 500; }
.hm-field input:focus,
.hm-field select:focus { border-color: rgba(10, 132, 255, 0.55); background: var(--panel2); }

/* صف الفلاتر: رقائق الحالة + مبدّل الإطار الزمني */
.hm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 14px;
}
.hm-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-hot { background: #d73027; box-shadow: 0 0 8px rgba(215, 48, 39, 0.7); }
.dot-mid { background: #ecd99a; box-shadow: 0 0 8px rgba(236, 217, 154, 0.5); }
.dot-cold { background: #2c9c59; box-shadow: 0 0 8px rgba(44, 156, 89, 0.7); }
.hm-tf { display: flex; gap: 5px; }
.hm-tf button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.hm-tf button:hover { color: var(--ink); border-color: var(--line2); }
.hm-tf button.on {
  color: #fff;
  background: rgba(10, 132, 255, 0.17);
  border-color: rgba(10, 132, 255, 0.6);
}

/* شريط التقدم المدمج */
.hm-progress { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.hm-progress .progress { flex: 1; }

/* اللوحة نفسها */
.hm-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(245, 245, 247, 0.05), rgba(245, 245, 247, 0.02));
  padding: 14px 14px 12px;
  overflow: hidden;
  margin-bottom: 26px;
}
.hm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.hm-legend { display: inline-flex; align-items: center; gap: 8px; }
.hm-legend-edge {
  font-size: 0.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink2);
}
.hm-legend-bar {
  width: 190px;
  height: 9px;
  border-radius: 5px;
  border: 1px solid rgba(245, 245, 247, 0.25);
  background: linear-gradient(90deg, rgb(10,48,34), rgb(22,122,66) 12%, rgb(64,168,92) 22%, rgb(118,188,104) 30%, rgb(190,218,140) 38%, rgb(233,233,160) 46%, rgb(243,210,118) 52%, rgb(243,168,98) 58%, rgb(236,118,78) 64%, rgb(212,58,48) 70%, rgb(186,34,44) 78%, rgb(148,18,40) 88%, rgb(108,12,30));
}
.hm-legend-scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px dashed rgba(245, 245, 247, 0.18);
  border-radius: 9px;
}
.hm-legend-scale span {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.hm-legend-scale span i {
  font-style: normal;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--dim);
}

/* مضيف اللوحة القابل للتمرير عمودياً عند كثرة الصفوف */
.hm-host {
  position: relative;
  overflow: auto;
  max-height: 760px;
  border: 1px solid rgba(245, 245, 247, 0.13);
  border-radius: 10px;
  background: #070b12;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 245, 247, 0.35) transparent;
}
.hm-host::-webkit-scrollbar { width: 9px; height: 9px; }
.hm-host::-webkit-scrollbar-track { background: transparent; }
.hm-host::-webkit-scrollbar-thumb { background: rgba(245, 245, 247, 0.28); border-radius: 8px; }
.hm-host::-webkit-scrollbar-thumb:hover { background: rgba(10, 132, 255, 0.45); }
.hm-content { position: relative; }
.hm-canvas { display: block; cursor: crosshair; outline: none; }
.hm-canvas:focus-visible { box-shadow: inset 0 0 0 2px rgba(10, 132, 255, 0.55); }

/* التولتيب */
.hm-tip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  min-width: 178px;
  max-width: 250px;
  background: rgba(8, 11, 18, 0.95);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.hm-tip[hidden] { display: none; }
.hm-tip-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.hm-tip-head b { color: var(--ink); font-weight: 900; font-size: 0.8rem; }
.hm-tip-head span {
  color: var(--ink2);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-tip-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.hm-tip-val { font-size: 1.02rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.hm-tip-when { color: var(--dim); font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-tip-state { color: var(--ink2); font-size: 0.75rem; width: 100%; }
.hm-tip-na { color: var(--dim); font-weight: 700; }

/* الحالة الفارغة */
.hm-empty {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--dim);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  padding: 20px;
  background: rgba(7, 11, 18, 0.55);
}
.hm-empty[hidden] { display: none; }

.hm-foot-note {
  margin: 10px 2px 0;
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 600;
}
.hm-foot-note::before {
  content: "ملاحظة: ";
  color: var(--warn);
  font-weight: 800;
}

/* استجابة v18 */
@media (max-width: 760px) {
  .hm-field input { min-width: 0; width: 100%; }
  .hm-tools { width: 100%; }
  .hm-tools .hm-field { flex: 1 1 46%; }
  .hm-tools .hm-field input,
  .hm-tools .hm-field select { width: 100%; min-width: 0; }
  .hm-filters { flex-direction: column; align-items: stretch; }
  .hm-tf { justify-content: center; }
  .hm-legend-bar { width: 120px; }
  .hm-legend-scale span i { display: none; }
  .hm-tip { max-width: 200px; }
}

/* ============================================================
   قسم v19 — مختبر طرق عرض القوة النسبية (/views)
   شريط تبويبات عشر طرق + حاويات العرض + قوائم الأعلى والأدنى
   + أدلة الشرائح + بطاقة دعوة في خريطة القوة
   ============================================================ */

.lab-tabs-wrap { margin: 18px 0 0; }
.lab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
}
.lab-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink2);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.lab-tab:hover { color: var(--ink); background: rgba(245, 245, 247, 0.09); }
.lab-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  border-radius: 6px;
  background: rgba(245, 245, 247, 0.12);
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 800;
}
.lab-tab.is-active {
  color: #fff;
  background: linear-gradient(130deg, var(--acc), var(--acc-deep));
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}
.lab-tab.is-active .lab-tab-num { background: rgba(255, 255, 255, 0.18); color: #fff; }

.lab-host { max-height: 720px; overflow-y: auto; }
.lab-canvas { display: block; outline: none; }
.lab-canvas:focus-visible { box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.45); border-radius: 8px; }

.lab-extra { display: flex; align-items: center; gap: 8px; }
.lab-extra[hidden] { display: none; }

/* أدلة الشرائح والمناطق داخل اللوحة */
.lab-tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 2px 10px;
}
.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(11, 15, 24, 0.85);
  border: 1px solid var(--line);
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-chip i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.tier-chip b { color: var(--ink); font-weight: 800; }

/* قائمتا الأعلى والأدنى */
.lab-tb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 4px;
}
.tb-card { padding: 14px; }
.tb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.tb-dot { width: 11px; height: 11px; border-radius: 4px; flex: 0 0 auto; }
.tb-head h3 { margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--ink); }
.tb-head p { margin: 2px 0 0; font-size: 0.75rem; color: var(--ink2); }
.tb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s ease;
}
.tb-row:hover, .tb-row:focus-visible { background: rgba(245, 245, 247, 0.08); outline: none; }
.tb-rank {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(245, 245, 247, 0.10);
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 800;
}
.tb-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.tb-info b { font-size: 0.85rem; font-weight: 800; color: var(--ink); letter-spacing: 0.2px; }
.tb-info small {
  font-size: 0.75rem;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.tb-spark { flex: 0 0 auto; opacity: 0.9; }
.tb-val { font-size: 0.9rem; font-weight: 800; min-width: 44px; text-align: center; }
.tb-delta {
  min-width: 52px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.10);
  color: var(--ink2);
}
.tb-delta.up { background: rgba(212, 58, 48, 0.16); color: #ff8f9d; }
.tb-delta.down { background: rgba(48, 209, 88, 0.14); color: #4ade80; }

/* بطاقة دعوة المختبر في صفحة خريطة القوة */
.lab-cta { margin-top: 14px; }
.lab-cta-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(100, 210, 255, 0.35);
  background: linear-gradient(120deg, rgba(100, 210, 255, 0.10), rgba(10, 132, 255, 0.07));
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.lab-cta-link:hover { border-color: rgba(100, 210, 255, 0.7); transform: translateY(-1px); }
.lab-cta-link svg { flex: 0 0 auto; color: #64d2ff; }

@media (max-width: 860px) {
  .lab-tb { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .lab-tabs { flex-wrap: nowrap; }
  .lab-tab { padding: 7px 10px; font-size: 0.75rem; }
  .tb-spark { display: none; }
  .tb-info small { max-width: 96px; }
  .hm-tools { width: 100%; }
  .lab-extra { width: 100%; }
}

/* ============================================================
   قسم v20 — واجهة مسارات الحرارة المستقلة (/tracks)
   شريط مقياس الاختراق الجماعي + سجل الإشارات + تولتيب صفري
   ============================================================ */
.tr-hud { position: relative; }
.tr-sigctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tr-sigctl .hm-field select { min-width: 168px; }
#sig-toggle svg { flex: 0 0 auto; }

.sig-section {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.sig-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.sig-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
}
.sig-note {
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 600;
}
.sig-host { position: relative; margin-top: 8px; }
.sig-strip-canvas { cursor: crosshair; }

.sig-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #64d2ff;
  border: 1px solid rgba(100, 210, 255, 0.35);
  background: rgba(100, 210, 255, 0.08);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.sig-count-chip {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64d2ff;
  border: 1px solid rgba(100, 210, 255, 0.3);
  background: rgba(100, 210, 255, 0.07);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sig-log {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.sig-card {
  display: block;
  width: 100%;
  text-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.sig-card:hover {
  border-color: rgba(100, 210, 255, 0.55);
  transform: translateY(-1px);
}
.sig-card.is-focus {
  border-color: rgba(100, 210, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(100, 210, 255, 0.35);
}
.sig-card-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
}
.sig-card-date b {
  color: #64d2ff;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}
.sig-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 600;
  margin-top: 5px;
}
.sig-card-meta b { color: var(--ink2); font-variant-numeric: tabular-nums; }
.sig-bar {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 4px;
  background: rgba(245, 245, 247, 0.14);
  margin-top: 9px;
}
.sig-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(100, 210, 255, 0.5), #64d2ff);
}
.sig-bar u {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  inset-inline-start: 50%;
  background: rgba(244, 247, 252, 0.55);
  border-radius: 1px;
}
.sig-empty {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}
.tr-logwrap { margin-top: 16px; padding: 18px; }

/* صفوف التولتيب في واجهة المسارات */
.hm-tip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 2px 0;
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 600;
}
.hm-tip-row b {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.hm-tip-row.sig b { color: #64d2ff; }

@media (max-width: 760px) {
  .sig-log { grid-template-columns: 1fr 1fr; }
  .sig-card { padding: 9px 11px; }
  .tr-sigctl { width: 100%; }
  .tr-sigctl .hm-field { flex: 1 1 auto; }
  .tr-sigctl .hm-field select { width: 100%; min-width: 0; }
  .sig-legend { white-space: normal; }
}
@media (max-width: 520px) {
  .sig-log { grid-template-columns: 1fr; }
}

/* ============================================================
   قسم v21 — لوحة شارت مؤشر تاسي في واجهة المسارات (/tracks)
   يُفتح بالضغط على تاريخ في سجل الاختراقات، بعلامة على تاريخ
   الاختراق وقراءات حقيقية للمؤشر من Yahoo Finance
   ============================================================ */
.tasi-wrap {
  position: relative;
  margin-top: 16px;
  padding: 18px;
  border-color: rgba(100, 210, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(100, 210, 255, 0.10), 0 18px 44px rgba(0, 0, 0, 0.34);
}
.tasi-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}
.tasi-host { position: relative; }
.tasi-canvas { cursor: crosshair; border-radius: 10px; }
.tasi-src {
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  line-height: 1.7;
}
.mini-tasi {
  color: #64d2ff;
  font-weight: 800;
  font-size: 0.75rem;
  border: 1px solid rgba(100, 210, 255, 0.32);
  background: rgba(100, 210, 255, 0.08);
  border-radius: 999px;
  padding: 1px 8px;
}
.sig-card:hover .mini-tasi {
  border-color: rgba(100, 210, 255, 0.6);
  background: rgba(100, 210, 255, 0.14);
}

@media (max-width: 760px) {
  .tasi-wrap { padding: 14px; }
  .tasi-stats { gap: 6px; }
  .tasi-stats .stat-pill { font-size: 0.75rem; }
}

/* ================= v23 — مدرسة ICT ================= */
.ic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; margin-top: 14px; }
.ic-hud { min-width: 0; }
.ic-host { position: relative; min-height: 360px; }
.ic-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; max-width: 320px; }
.lg-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.lg-swatch { display: inline-block; width: 12px; height: 9px; border-radius: 2px; }
.sw-fvg-bull { background: rgba(100, 210, 255, 0.35); border: 1px solid rgba(100, 210, 255, 0.7); }
.sw-fvg-bear { background: rgba(244, 63, 94, 0.35); border: 1px solid rgba(244, 63, 94, 0.7); }
.sw-ob-bull { background: rgba(48, 209, 88, 0.4); border: 1px dashed rgba(48, 209, 88, 0.85); }
.sw-ob-bear { background: rgba(255, 69, 58, 0.4); border: 1px dashed rgba(255, 69, 58, 0.85); }
.sw-ote { background: rgba(255, 211, 77, 0.25); border: 1px dashed rgba(255, 211, 77, 0.6); }

.ic-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ic-card { background: rgba(10, 15, 26, 0.72); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 12px; }
.ic-card h3 { margin: 0 0 10px; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.ic-card h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px rgba(10, 132, 255, 0.8); }

.ic-gauge { position: relative; height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); display: flex; }
.ic-gauge-band { height: 100%; }
.ic-band-prem { flex: 30; background: rgba(255, 69, 58, 0.45); order: 3; }
.ic-band-eq { flex: 20; background: rgba(245, 245, 247, 0.14); order: 2; }
.ic-band-disc { flex: 30; background: rgba(48, 209, 88, 0.45); order: 1; }
.ic-gauge-mark { position: absolute; top: -3px; width: 14px; height: 20px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px rgba(4, 6, 10, 0.85), 0 0 10px rgba(255, 255, 255, 0.7); }
.ic-gauge-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-top: 5px; }

.ic-kv { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ic-kv li { font-size: 12px; color: var(--ink2); display: flex; justify-content: space-between; gap: 8px; }
.ic-kv b { color: var(--ink); font-weight: 700; }

.ic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.ic-list li { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ic-list li:hover { border-color: rgba(10, 132, 255, 0.55); }
.ic-list li.is-focus { border-color: var(--acc); background: rgba(10, 132, 255, 0.08); }
.ic-list li b { font-size: 12px; color: var(--ink); }
.ic-list li span { font-size: 12px; color: var(--ink2); }
.ic-list li small { font-size: 12px; color: var(--ink2); opacity: 0.85; }
.ic-fillbar { display: inline-block; width: 54px; height: 5px; border-radius: 3px; background: rgba(245, 245, 247, 0.12); vertical-align: middle; margin-inline-end: 6px; overflow: hidden; }
.ic-fillbar i { display: block; height: 100%; background: var(--acc2); border-radius: 3px; }

.ic-mini { font-size: 12px; color: var(--ink2); margin: 8px 0 0; line-height: 1.7; }

@media (max-width: 1020px) {
  .ic-layout { grid-template-columns: 1fr; }
  .ic-legend { justify-content: flex-start; max-width: none; }
  .ic-list { max-height: 200px; }
}

/* ================= v24 — فلتر الفرص (مدرسة ICT) ================= */

.fl-tf-group { margin-inline-start: 10px; }
.fl-score-group { gap: 10px; align-items: center; }
.fl-score-group input[type="range"] {
  width: 130px; accent-color: var(--acc); cursor: pointer; height: 18px;
}
.fl-score-val {
  min-width: 30px; text-align: center; font-weight: 800; font-size: 0.8rem;
  color: #fff; background: rgba(10, 132, 255, 0.22); border: 1px solid rgba(10, 132, 255, 0.45);
  border-radius: 7px; padding: 2px 6px;
}

.dot-ob { background: var(--acc); }
.dot-fvg { background: var(--teal); }
.dot-ote { background: #c084fc; }
.dot-sweep { background: var(--warn); }
.dot-choch { background: #fb923c; }
.dot-bos { background: #93a4c3; }
.dot-warn { background: var(--warn); }

.th-sort {
  background: none; border: none; color: inherit; font: inherit; font-weight: 800;
  cursor: pointer; padding: 0; opacity: 0.62; transition: opacity 0.15s;
}
.th-sort:hover { opacity: 1; }
.th-sort.is-active { opacity: 1; color: var(--acc2); }

tr.fl-row { cursor: pointer; transition: background 0.12s; }
tr.fl-row:hover td, tr.fl-row:focus-visible td { background: rgba(10, 132, 255, 0.065); }
tr.fl-row:focus-visible { outline: 2px solid rgba(10, 132, 255, 0.55); outline-offset: -2px; }

.fl-ev { display: block; font-size: 12px; font-weight: 500; color: var(--dim); margin-top: 2px; }
.chg-up { color: var(--up); font-weight: 700; }
.chg-dn { color: var(--dn); font-weight: 700; }

.fl-scorecell { display: inline-flex; align-items: center; gap: 7px; direction: ltr; }
.fl-scorenum { font-weight: 900; font-size: 0.86rem; min-width: 24px; text-align: center; }
.fl-scorenum.hot { color: var(--acc2); text-shadow: 0 0 12px rgba(10, 132, 255, 0.45); }
.fl-scorenum.mid { color: var(--warn); }
.fl-scorenum.low { color: var(--ink2); }
.fl-meter {
  display: inline-block; width: 54px; height: 6px; border-radius: 3px;
  background: rgba(245, 245, 247, 0.1); overflow: hidden; vertical-align: middle;
}
.fl-meter i { display: block; height: 100%; border-radius: 3px; }
.fl-meter i.hot { background: linear-gradient(90deg, var(--acc-deep), var(--acc)); box-shadow: 0 0 8px rgba(10, 132, 255, 0.55); }
.fl-meter i.mid { background: linear-gradient(90deg, #b4761f, var(--warn)); }
.fl-meter i.low { background: rgba(245, 245, 247, 0.65); }

.fl-side {
  display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 700;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.fl-side.b-bull { color: var(--up-soft); background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.42); }
.fl-side.b-bear { color: var(--dn-soft); background: rgba(255, 69, 58, 0.12); border: 1px solid rgba(255, 69, 58, 0.42); }
.fl-side.b-both { color: var(--warn); background: rgba(255, 159, 10, 0.1); border: 1px solid rgba(255, 159, 10, 0.4); }
.fl-side.b-none { color: var(--ink2); background: rgba(245, 245, 247, 0.08); border: 1px solid var(--line); }

.fl-sigcell { max-width: 250px; }
.fl-sig {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600;
  color: var(--ink2); border: 1px solid var(--line); border-radius: 999px;
  padding: 2.5px 8px; margin: 2px 0 2px 4px; white-space: nowrap; background: rgba(245, 245, 247, 0.05);
}
.fl-sig-more { font-size: 0.75rem; color: var(--acc2); font-weight: 700; margin-inline-start: 2px; }

.fl-zonecell { max-width: 250px; }
.fl-zone { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 0.75rem; color: var(--ink2); margin-bottom: 3px; align-items: baseline; }
.fl-zone:last-child { margin-bottom: 0; }
.fl-zone b { color: var(--ink); font-weight: 700; font-size: 0.75rem; }
.fl-zone small { color: var(--dim); font-size: 0.75rem; }
.fl-zone.lv-bull b { color: var(--up-soft); }
.fl-zone.lv-bear b { color: var(--dn-soft); }
.fl-zone.lv-ote b { color: #bf5af2; }

.fl-grade {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; font-weight: 900; font-size: 0.8rem; border-radius: 9px;
  padding: 4px 10px; margin-inline-end: 8px; direction: ltr;
}
.fl-grade-hot { color: #fff; background: linear-gradient(120deg, var(--acc-deep), var(--acc)); box-shadow: 0 0 16px rgba(10, 132, 255, 0.35); }
.fl-grade-mid { color: #1a1405; background: linear-gradient(120deg, #d29a2b, var(--warn)); }
.fl-grade-low { color: var(--ink); background: rgba(245, 245, 247, 0.2); border: 1px solid var(--line2); }
.fl-grade-info { color: var(--teal); background: rgba(100, 210, 255, 0.12); border: 1px solid rgba(100, 210, 255, 0.4); }

.dim { color: var(--dim); }

@media (max-width: 1020px) {
  .fl-sigcell, .fl-zonecell { max-width: none; }
  .fl-sig { white-space: normal; }
  .fl-tf-group { margin-inline-start: 0; }
}
@media (max-width: 720px) {
  .fl-meter { width: 40px; }
  .fl-score-group input[type="range"] { width: 100px; }
}

/* ================= v25 — فلتر الفرص: واجهة المحطة السينمائية =================
   لوحة الألوان المخصصة: كريمي var(--st-ink) · فحمي #3A3A3A · كهرماني var(--st-acc) · رمادي #5E5E5E
   صفحة /filter كاملة بهوية «طرفية أفلام الخيال العلمي»: خلفية كريمية بشبكة دقيقة،
   محطة مسح داكنة حية تُظهر الجلب والمعالجة والتحليل لحظة بلحظة. */

body.page-filter {
  background:
    radial-gradient(1000px 500px at 85% -8%, rgba(var(--st-acc-rgb), 0.13), transparent 55%),
    radial-gradient(860px 480px at -6% 108%, rgba(58, 58, 58, 0.1), transparent 55%),
    var(--st-ink);
  color: #3A3A3A;
}
body.page-filter::before {
  background-image:
    linear-gradient(rgba(58, 58, 58, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 58, 58, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* الترويسة والتذييل بلوحة الفحمي والكهرماني */
body.page-filter .site-head { background: rgba(58, 58, 58, 0.94); border-bottom: 1px solid rgba(var(--st-acc-rgb), 0.5); }
body.page-filter .site-head .brand { color: var(--st-ink); }
body.page-filter .site-head .brand small { color: rgba(var(--st-ink-rgb), 0.55); }
body.page-filter .brand-mark rect[fill="#0a0f1a"] { fill: #3A3A3A; }
body.page-filter .brand-mark path { stroke: var(--st-acc); }
body.page-filter .brand-mark rect[stroke] { stroke: rgba(var(--st-acc-rgb), 0.75); }
body.page-filter .topnav a { color: rgba(var(--st-ink-rgb), 0.72); }
body.page-filter .topnav a:hover { color: var(--st-ink); background: rgba(var(--st-ink-rgb), 0.09); }
body.page-filter .topnav a[aria-current="page"] { color: var(--st-acc); background: rgba(var(--st-acc-rgb), 0.14); }
body.page-filter .market-led { color: var(--st-acc); }
body.page-filter .site-foot { background: #3A3A3A; color: rgba(var(--st-ink-rgb), 0.8); border-top: 1px solid rgba(var(--st-acc-rgb), 0.4); }
body.page-filter .site-foot a { color: var(--st-acc); }
body.page-filter .site-foot .foot-copy { color: rgba(var(--st-ink-rgb), 0.5); }

/* رأس الصفحة والشرائح التعريفية */
body.page-filter .page-head h1 { color: #3A3A3A; }
body.page-filter .page-head h1 .grad { background: linear-gradient(100deg, #3A3A3A 20%, var(--st-acc) 80%); -webkit-background-clip: text; background-clip: text; }
body.page-filter .page-head .sub { color: #5E5E5E; }
body.page-filter .page-head .sub strong { color: #3A3A3A; }
body.page-filter .badge { color: #5E5E5E; border-color: rgba(58, 58, 58, 0.3); background: rgba(58, 58, 58, 0.05); }
body.page-filter .badge-dot { background: var(--st-acc); box-shadow: 0 0 10px rgba(var(--st-acc-rgb), 0.8); }
body.page-filter .meta-chip { color: #3A3A3A; border-color: rgba(58, 58, 58, 0.24); background: rgba(var(--st-ink-rgb), 0.7); }
body.page-filter .head-meta .meta-chip { box-shadow: 0 1px 0 rgba(58, 58, 58, 0.12); }

/* بطاقات الشرح */
body.page-filter .how-card { background: rgba(var(--st-ink-rgb), 0.85); border: 1px solid rgba(58, 58, 58, 0.2); box-shadow: 0 8px 24px rgba(58, 58, 58, 0.07); }
body.page-filter .how-card h2 { color: #3A3A3A; }
body.page-filter .how-card p { color: #5E5E5E; }
body.page-filter .how-ico.ico-green, body.page-filter .how-ico.ico-accent { color: var(--st-acc); background: rgba(var(--st-acc-rgb), 0.14); border-color: rgba(var(--st-acc-rgb), 0.5); }
body.page-filter .how-ico.ico-pink, body.page-filter .how-ico.ico-violet { color: #3A3A3A; background: rgba(58, 58, 58, 0.08); border-color: rgba(58, 58, 58, 0.34); }

/* أدوات التحكم والرقائق */
body.page-filter .controls .search-box { background: rgba(var(--st-ink-rgb), 0.9); border-color: rgba(58, 58, 58, 0.3); }
body.page-filter .controls .search-box input { color: #3A3A3A; }
body.page-filter .controls .search-box input::placeholder { color: rgba(94, 94, 94, 0.75); }
body.page-filter .search-ico { color: #5E5E5E; }
body.page-filter .match-count { color: #5E5E5E; }
body.page-filter .cache-chip { border: 1px solid rgba(94, 94, 94, 0.5); color: #5E5E5E; background: rgba(94, 94, 94, 0.08); }
body.page-filter .cache-chip.is-live { color: #3A3A3A; border-color: rgba(var(--st-acc-rgb), 0.65); background: rgba(var(--st-acc-rgb), 0.13); }
body.page-filter .chip-btn { color: #5E5E5E; border-color: rgba(58, 58, 58, 0.28); background: rgba(var(--st-ink-rgb), 0.75); }
body.page-filter .chip-btn:hover { color: #3A3A3A; border-color: rgba(58, 58, 58, 0.55); }
body.page-filter .chip-btn.is-active { color: #3A3A3A; border-color: var(--st-acc); background: rgba(var(--st-acc-rgb), 0.2); }
body.page-filter .chip-label { color: #5E5E5E; }
body.page-filter .fl-score-val { color: #3A3A3A; background: rgba(var(--st-acc-rgb), 0.2); border-color: rgba(var(--st-acc-rgb), 0.65); }
body.page-filter .fl-score-group input[type="range"] { accent-color: var(--st-acc); }
body.page-filter .btn { color: #3A3A3A; border-color: rgba(58, 58, 58, 0.35); background: rgba(var(--st-ink-rgb), 0.8); }
body.page-filter .btn:hover { border-color: #3A3A3A; background: var(--st-ink); }
body.page-filter .btn-accent { color: #3A3A3A; background: linear-gradient(120deg, #f0b455, var(--st-acc)); border-color: var(--st-acc); box-shadow: 0 10px 26px rgba(var(--st-acc-rgb), 0.3); }
body.page-filter .btn-accent:hover { box-shadow: 0 14px 34px rgba(var(--st-acc-rgb), 0.42); }

/* جدول النتائج بالهوية الكريمية */
body.page-filter .table-wrap.hud { background: rgba(var(--st-ink-rgb), 0.72); border: 1px solid rgba(58, 58, 58, 0.22); box-shadow: 0 10px 30px rgba(58, 58, 58, 0.08); }
body.page-filter .hud::before, body.page-filter .hud::after { border-color: rgba(var(--st-acc-rgb), 0.8); }
body.page-filter .hud:hover::before, body.page-filter .hud:hover::after { border-color: var(--st-acc); }
body.page-filter .data-table th { color: #3A3A3A; border-color: rgba(58, 58, 58, 0.22); }
body.page-filter .data-table td { border-color: rgba(58, 58, 58, 0.12); color: #3A3A3A; }
body.page-filter .data-table .placeholder-row td { color: #5E5E5E; }
body.page-filter .data-table tbody tr:hover { background: rgba(var(--st-acc-rgb), 0.06); }
body.page-filter tr.fl-row:hover td, body.page-filter tr.fl-row:focus-visible td { background: rgba(var(--st-acc-rgb), 0.09); }
body.page-filter tr.fl-row:focus-visible { outline: 2px solid rgba(var(--st-acc-rgb), 0.7); outline-offset: -2px; }
body.page-filter .th-sort.is-active { color: #B4761F; }
body.page-filter .sym-link { color: #3A3A3A; }
body.page-filter .sym-link:hover { color: #B4761F; }
body.page-filter .px { color: #3A3A3A; }
body.page-filter .chg-up { color: #B4761F; }
body.page-filter .chg-dn { color: #5E5E5E; }
body.page-filter .fl-ev { color: #5E5E5E; }
body.page-filter .fl-scorenum.hot { color: #B4761F; text-shadow: none; }
body.page-filter .fl-scorenum.mid { color: #3A3A3A; }
body.page-filter .fl-scorenum.low { color: #5E5E5E; }
body.page-filter .fl-meter { background: rgba(58, 58, 58, 0.1); }
body.page-filter .fl-meter i.hot { background: linear-gradient(90deg, #d9992b, var(--st-acc)); box-shadow: none; }
body.page-filter .fl-meter i.mid { background: linear-gradient(90deg, #5E5E5E, #3A3A3A); }
body.page-filter .fl-meter i.low { background: rgba(94, 94, 94, 0.5); }
body.page-filter .fl-side.b-bull { color: #B4761F; background: rgba(var(--st-acc-rgb), 0.14); border-color: rgba(var(--st-acc-rgb), 0.55); }
body.page-filter .fl-side.b-bear { color: #3A3A3A; background: rgba(58, 58, 58, 0.08); border-color: rgba(58, 58, 58, 0.45); }
body.page-filter .fl-side.b-both { color: #3A3A3A; background: rgba(94, 94, 94, 0.12); border-color: rgba(94, 94, 94, 0.55); }
body.page-filter .fl-side.b-none { color: #5E5E5E; background: rgba(94, 94, 94, 0.06); border-color: rgba(94, 94, 94, 0.4); }
body.page-filter .fl-sig { color: #5E5E5E; border-color: rgba(58, 58, 58, 0.22); background: rgba(58, 58, 58, 0.04); }
body.page-filter .fl-sig-more { color: #B4761F; }
body.page-filter .fl-zone { color: #5E5E5E; }
body.page-filter .fl-zone b { color: #3A3A3A; }
body.page-filter .fl-zone small { color: #5E5E5E; }
body.page-filter .fl-zone.lv-bull b { color: #B4761F; }
body.page-filter .fl-zone.lv-bear b { color: #3A3A3A; }
body.page-filter .fl-zone.lv-ote b { color: #B4761F; }
body.page-filter .dot-ob { background: var(--st-acc); }
body.page-filter .dot-fvg { background: #3A3A3A; }
body.page-filter .dot-ote { background: rgba(var(--st-acc-rgb), 0.65); }
body.page-filter .dot-sweep { background: #5E5E5E; }
body.page-filter .dot-choch { background: rgba(58, 58, 58, 0.6); }
body.page-filter .dot-bos { background: rgba(94, 94, 94, 0.6); }
body.page-filter .dot-warn { background: var(--st-acc); }
body.page-filter .dot-bull { background: var(--st-acc); }
body.page-filter .dot-bear { background: #3A3A3A; }
body.page-filter .stat-pill { color: #3A3A3A; border-color: rgba(58, 58, 58, 0.24); background: rgba(var(--st-ink-rgb), 0.85); }
body.page-filter .stat-pill:hover { border-color: rgba(var(--st-acc-rgb), 0.6); }
body.page-filter .stat-pill.is-active { border-color: var(--st-acc); background: rgba(var(--st-acc-rgb), 0.16); }
body.page-filter .stat-pill .st-num { color: #B4761F; }
body.page-filter .fl-grade-hot { color: #3A3A3A; background: linear-gradient(120deg, #f0b455, var(--st-acc)); box-shadow: 0 0 16px rgba(var(--st-acc-rgb), 0.35); }
body.page-filter .fl-grade-mid { color: var(--st-ink); background: linear-gradient(120deg, #5E5E5E, #3A3A3A); }
body.page-filter .fl-grade-low { color: #3A3A3A; background: rgba(94, 94, 94, 0.12); border-color: rgba(58, 58, 58, 0.3); }
body.page-filter .fl-grade-info { color: #B4761F; background: rgba(var(--st-acc-rgb), 0.1); border-color: rgba(var(--st-acc-rgb), 0.45); }
body.page-filter .table-foot { color: #5E5E5E; }
body.page-filter .fl-grade { border: 1px solid transparent; }
/* إصلاحات تسريب اللون القديم في الجدول */
body.page-filter .data-table thead th {
  background: rgba(58, 58, 58, 0.97);
  color: rgba(var(--st-ink-rgb), 0.85);
  border-bottom: 1px solid rgba(var(--st-acc-rgb), 0.45);
}
body.page-filter .data-table thead th .th-sort { color: rgba(var(--st-ink-rgb), 0.85); }
body.page-filter .data-table thead th .th-sort:hover { color: var(--st-ink); }
body.page-filter .data-table thead th .th-sort.is-active { color: var(--st-acc); }
body.page-filter .data-table tbody tr:hover {
  background: rgba(var(--st-acc-rgb), 0.07);
  box-shadow: inset -2px 0 0 var(--st-acc);
}
body.page-filter .data-table .sym {
  color: #B4761F;
  background: rgba(var(--st-acc-rgb), 0.12);
  border-color: rgba(var(--st-acc-rgb), 0.4);
}
body.page-filter .data-table .sym:hover { background: rgba(var(--st-acc-rgb), 0.22); color: #3A3A3A; }
body.page-filter .data-table .dim { color: #5E5E5E; }
body.page-filter .data-table .cur { color: #5E5E5E; }

/* حارس الإخفاء: العناصر ذات display المرن تتجاهل خاصية hidden افتراضياً */
.ops-boot[hidden], .ops-term[hidden], .ops-summary[hidden] { display: none !important; }
body.page-filter [hidden] { display: none !important; }

/* ---------- المحطة السينمائية: هيكل فحمي حي على الخلفية الكريمية ---------- */
.ops-term { margin: 18px 0 26px; }
.ops-frame {
  position: relative;
  background:
    linear-gradient(rgba(var(--st-ink-rgb), 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--st-ink-rgb), 0.028) 1px, transparent 1px),
    var(--st-frame);
  background-size: 30px 30px, 30px 30px, auto;
  border: 1px solid rgba(var(--st-acc-rgb), 0.55);
  border-radius: var(--rad);
  box-shadow: 0 24px 60px rgba(58, 58, 58, 0.35), inset 0 0 80px rgba(0, 0, 0, 0.18);
  color: var(--st-ink);
  overflow: hidden;
}
/* خطوط مسح CRT خفيفة */
.ops-frame::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.11) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
/* شعاع مسح يجتاز المحطة */
.ops-beam {
  position: absolute; inset-inline: 0; height: 46px; top: -46px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(var(--st-acc-rgb), 0.16) 60%, rgba(var(--st-acc-rgb), 0.05));
  animation: ops-beam 5.5s linear infinite;
}
@keyframes ops-beam { 0% { top: -46px; } 100% { top: 100%; } }

.ops-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(var(--st-ink-rgb), 0.14);
  background: rgba(0, 0, 0, 0.22);
}
.ops-dots { display: inline-flex; gap: 6px; }
.ops-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(var(--st-ink-rgb), 0.18); }
.ops-dots i:first-child { background: var(--st-acc); box-shadow: 0 0 8px rgba(var(--st-acc-rgb), 0.7); }
.ops-title { font-weight: 800; font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(var(--st-ink-rgb), 0.92); direction: ltr; }
.ops-topbar .ops-live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 700; color: var(--st-acc); }
.ops-clock {
  margin-inline-start: auto; font-weight: 800; font-size: 0.9rem; color: var(--st-ink);
  font-variant-numeric: tabular-nums; direction: ltr;
  background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(var(--st-ink-rgb), 0.16);
  border-radius: 8px; padding: 3px 10px;
}
.ops-led {
  width: 8px; height: 8px; border-radius: 50%; background: var(--st-acc); display: inline-block;
  box-shadow: 0 0 10px rgba(var(--st-acc-rgb), 0.9);
  animation: ops-led 1.15s ease-in-out infinite;
}
@keyframes ops-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.ops-grid {
  display: grid;
  grid-template-columns: 236px 1fr 300px;
  gap: 0;
}

/* المراحل */
.ops-phases { list-style: none; margin: 0; padding: 14px; border-inline-end: 1px solid rgba(var(--st-ink-rgb), 0.12); display: flex; flex-direction: column; gap: 4px; }
.ops-phase { display: flex; gap: 10px; align-items: flex-start; padding: 8px 9px; border-radius: 9px; transition: background 0.25s; opacity: 0.5; }
.ops-phase .ph-led {
  width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; flex: none;
  border: 2px solid rgba(var(--st-ink-rgb), 0.3); background: transparent; transition: all 0.25s;
}
.ops-phase b { display: block; font-size: 0.78rem; font-weight: 800; color: rgba(var(--st-ink-rgb), 0.9); line-height: 1.4; }
.ops-phase small { display: block; font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.5); line-height: 1.5; }
.ops-phase.is-active { opacity: 1; background: rgba(var(--st-acc-rgb), 0.1); }
.ops-phase.is-active .ph-led { border-color: var(--st-acc); background: var(--st-acc); box-shadow: 0 0 12px rgba(var(--st-acc-rgb), 0.85); animation: ops-led 0.9s ease-in-out infinite; }
.ops-phase.is-done { opacity: 0.85; }
.ops-phase.is-done .ph-led { border-color: var(--st-acc); background: rgba(var(--st-acc-rgb), 0.25); animation: none; }
.ops-phase.is-done .ph-led { position: relative; }
.ops-phase.is-done .ph-led::after {
  content: ""; position: absolute; top: 1px; inset-inline-start: 1.5px;
  width: 4px; height: 7px;
  border-right: 2px solid var(--st-check); border-bottom: 2px solid var(--st-check);
  transform: rotate(45deg);
}

/* المنتصف: حلقة التقدم والعدادات */
.ops-mid { padding: 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 13px; }
.ops-ring-wrap { position: relative; width: 138px; height: 138px; }
.ops-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ops-ring .ring-track { fill: none; stroke: rgba(var(--st-ink-rgb), 0.12); stroke-width: 7; }
.ops-ring .ring-fill {
  fill: none; stroke: var(--st-acc); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.25, 0.8, 0.3, 1);
  filter: drop-shadow(0 0 7px rgba(var(--st-acc-rgb), 0.6));
}
.ops-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ops-ring-center b { font-size: 1.5rem; font-weight: 900; color: var(--st-ink); font-variant-numeric: tabular-nums; line-height: 1.1; direction: ltr; }
.ops-ring-center span { font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.55); font-variant-numeric: tabular-nums; direction: ltr; }
.ops-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; width: 100%; }
.ops-counter { text-align: center; background: rgba(0, 0, 0, 0.24); border: 1px solid rgba(var(--st-ink-rgb), 0.12); border-radius: 10px; padding: 8px 4px 7px; }
.ops-counter b { display: block; font-size: 1.14rem; font-weight: 900; color: var(--st-acc); font-variant-numeric: tabular-nums; direction: ltr; line-height: 1.25; }
.ops-counter span { font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.55); }
.ops-split { display: flex; height: 9px; width: 100%; border-radius: 6px; overflow: hidden; border: 1px solid rgba(var(--st-ink-rgb), 0.14); background: rgba(0, 0, 0, 0.25); }
.ops-split .split-bull { background: var(--st-acc); transition: width 0.4s ease; }
.ops-split .split-bear { background: rgba(var(--st-ink-rgb), 0.32); flex: 1; transition: width 0.4s ease; }
.ops-split-cap { display: flex; justify-content: space-between; width: 100%; font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.6); font-variant-numeric: tabular-nums; }
.ops-split-cap span:last-child { direction: ltr; }

/* سجل المسح */
.ops-console { border-inline-start: 1px solid rgba(var(--st-ink-rgb), 0.12); display: flex; flex-direction: column; min-height: 0; }
.ops-console-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px 8px; font-size: 0.75rem; font-weight: 800; color: rgba(var(--st-ink-rgb), 0.75);
  border-bottom: 1px dashed rgba(var(--st-ink-rgb), 0.14);
}
.ops-console-hint { font-weight: 600; color: rgba(var(--st-ink-rgb), 0.4); font-variant-numeric: tabular-nums; }
.ops-log {
  flex: 1; overflow-y: auto; padding: 9px 12px 12px;
  font-size: 0.75rem; line-height: 1.85; max-height: 292px; min-height: 240px;
  scrollbar-width: thin; scrollbar-color: rgba(var(--st-acc-rgb), 0.5) transparent;
}
.ops-log::-webkit-scrollbar { width: 7px; }
.ops-log::-webkit-scrollbar-thumb { background: rgba(var(--st-acc-rgb), 0.45); border-radius: 4px; }
.ops-log::-webkit-scrollbar-track { background: rgba(var(--st-ink-rgb), 0.05); }
.ops-ln { display: flex; align-items: baseline; gap: 8px; animation: ops-ln-in 0.28s ease both; color: rgba(var(--st-ink-rgb), 0.82); }
@keyframes ops-ln-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ops-ln .ln-t { color: rgba(var(--st-ink-rgb), 0.38); font-size: 0.75rem; direction: ltr; font-variant-numeric: tabular-nums; flex: none; }
.ln-tag { flex: none; font-size: 0.75rem; font-weight: 800; border-radius: 5px; padding: 0.5px 7px; line-height: 1.7; }
.ln-tag.t-fetch { color: var(--st-acc); border: 1px solid rgba(var(--st-acc-rgb), 0.55); background: rgba(var(--st-acc-rgb), 0.09); }
.ln-tag.t-anlz { color: rgba(var(--st-ink-rgb), 0.72); border: 1px solid rgba(var(--st-ink-rgb), 0.22); }
.ln-tag.t-opp { color: var(--st-check); background: var(--st-acc); box-shadow: 0 0 12px rgba(var(--st-acc-rgb), 0.5); }
.ln-tag.t-sys { color: rgba(var(--st-ink-rgb), 0.55); border: 1px dashed rgba(var(--st-ink-rgb), 0.3); }
.ops-ln .ln-sc { margin-inline-start: auto; color: var(--st-acc); font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; }
.ops-cursor { display: inline-block; width: 8px; height: 14px; background: var(--st-acc); vertical-align: text-bottom; animation: ops-caret 0.85s steps(1) infinite; }
@keyframes ops-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* شريط الفرص المتحرك */
.ops-ticker {
  display: flex; align-items: center; gap: 8px; overflow: hidden;
  padding: 9px 14px; border-top: 1px solid rgba(var(--st-ink-rgb), 0.14);
  background: rgba(0, 0, 0, 0.2);
  min-height: 40px;
}
.ops-ticker:empty::before { content: "بانتظار أول فرصة مرصودة…"; font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.4); }
.tk-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; color: var(--st-ink);
  border: 1px solid rgba(var(--st-acc-rgb), 0.5); background: rgba(var(--st-acc-rgb), 0.12);
  border-radius: 999px; padding: 3px 10px;
  animation: tk-pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  font-variant-numeric: tabular-nums;
}
.tk-chip b { color: var(--st-acc); font-weight: 900; direction: ltr; }
.tk-chip.is-bear { border-color: rgba(var(--st-ink-rgb), 0.3); background: rgba(var(--st-ink-rgb), 0.08); }
.tk-chip.is-bear b { color: rgba(var(--st-ink-rgb), 0.85); }
@keyframes tk-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* شريط الإنجاز بعد الاكتمال */
.ops-summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 14px 0 20px; padding: 11px 16px;
  background: rgba(var(--st-sum-rgb), 0.92); border: 1px solid rgba(var(--st-sum-line-rgb), 0.35);
  border-inline-start: 4px solid var(--st-acc); border-radius: var(--rad-sm);
  box-shadow: 0 8px 22px rgba(58, 58, 58, 0.08);
  animation: rise 0.4s ease both;
}
.ops-summary b { font-size: 0.84rem; color: var(--st-sum-ink); }
.ops-summary .btn { padding: 5px 13px; font-size: 0.75rem; border-radius: 8px; }
.ops-summary .ops-led { animation-duration: 2.4s; }

/* شاشة الإقلاع السينمائية */
.ops-boot {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(var(--st-boot-rgb), 0.97);
  display: flex; align-items: center; justify-content: center;
  color: var(--st-ink); cursor: pointer;
  transition: opacity 0.45s ease;
}
.ops-boot.is-out { opacity: 0; pointer-events: none; }
.ops-boot-inner { width: min(560px, 88vw); font-size: 0.9rem; line-height: 2.15; }
.ops-boot-brand {
  font-weight: 900; font-size: 1.05rem; color: var(--st-acc); letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(var(--st-acc-rgb), 0.4); padding-bottom: 10px; margin-bottom: 14px;
  direction: ltr; text-align: left;
}
.ops-boot-line { margin: 0; opacity: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease; color: rgba(var(--st-ink-rgb), 0.88); }
.ops-boot-line.is-in { opacity: 1; transform: none; }
.ops-boot-line .ok { color: var(--st-acc); font-weight: 800; }
.ops-boot-caret { display: inline-block; width: 10px; height: 17px; background: var(--st-acc); vertical-align: middle; animation: ops-caret 0.8s steps(1) infinite; }
.ops-boot-skip { margin-top: 20px; font-size: 0.75rem; color: rgba(var(--st-ink-rgb), 0.4); }

/* الاستجابة للمقاسات */
@media (max-width: 1020px) {
  .ops-grid { grid-template-columns: 1fr; }
  .ops-phases { flex-direction: row; flex-wrap: wrap; border-inline-end: none; border-bottom: 1px solid rgba(var(--st-ink-rgb), 0.12); gap: 2px; padding: 10px; }
  .ops-phase { flex: 1 1 44%; min-width: 150px; }
  .ops-mid { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
  .ops-ring-wrap { width: 112px; height: 112px; }
  .ops-counters { width: auto; flex: 1 1 220px; }
  .ops-split, .ops-split-cap { width: auto; flex: 1 1 100%; }
  .ops-console { border-inline-start: none; border-top: 1px solid rgba(var(--st-ink-rgb), 0.12); }
  .ops-log { max-height: 190px; min-height: 150px; }
}
@media (max-width: 640px) {
  .ops-title { font-size: 0.75rem; }
  .ops-clock { font-size: 0.78rem; padding: 2px 8px; }
  .ops-mid { padding: 14px; gap: 10px; }
  .ops-ring-wrap { width: 96px; height: 96px; }
  .ops-ring-center b { font-size: 1.15rem; }
  .ops-counter b { font-size: 0.95rem; }
  .ops-log { max-height: 160px; min-height: 120px; font-size: 0.75rem; }
  .ops-summary { padding: 10px 12px; gap: 8px; }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .ops-beam, .ops-led, .ops-phase.is-active .ph-led, .ops-cursor, .ops-boot-caret { animation: none; }
  .ops-frame::after { display: none; }
  .ops-ln, .tk-chip { animation-duration: 0.01s; }
}

/* ================= v27 — الرئيسية: مختبر السوق الحي · تشكيلة «الفسفوري الحي» =================
   أعماق المختبر: ليل #071310 · ألواح #0C201A · حبر نعناعي #DCF5EA · خافت #6E9484
   الإشارات: فسفوري #00E6A8 للحي والصعود · سماوي #3FD9C4 للتحليل · وردي #FF7A93 للهبوط */

/* متغيرات المحطة السينمائية المشتركة — صفحة الفلتر تحتفظ بالقيم الافتراضية الكهرمانية،
   والرئيسية فقط تتجاوزها إلى الفسفوري */
:root {
  --st-acc: #E8A230;
  --st-acc-rgb: 232, 162, 48;
  --st-ink: #F4F0EA;
  --st-ink-rgb: 244, 240, 234;
  --st-frame: #3A3A3A;
  --st-boot-rgb: 38, 38, 38;
  --st-check: #3A3A3A;
  --st-sum-rgb: 244, 240, 234;
  --st-sum-line-rgb: 58, 58, 58;
  --st-sum-ink: #3A3A3A;
}
body.page-home {
  --st-acc: #00E6A8;
  --st-acc-rgb: 0, 230, 168;
  --st-ink: #DCF5EA;
  --st-ink-rgb: 220, 245, 234;
  --st-frame: #0C201A;
  --st-boot-rgb: 4, 12, 10;
  --st-check: #052E21;
  --st-sum-rgb: 12, 32, 26;
  --st-sum-line-rgb: 0, 230, 168;
  --st-sum-ink: #DCF5EA;
}

body.page-home {
  background:
    radial-gradient(1100px 560px at 88% -10%, rgba(0, 230, 168, 0.1), transparent 55%),
    radial-gradient(900px 520px at 6% 110%, rgba(63, 217, 196, 0.06), transparent 55%),
    linear-gradient(rgba(0, 230, 168, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 168, 0.045) 1px, transparent 1px),
    #071310;
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
  color: #DCF5EA;
}
/* حارس الإخفاء: العناصر ذات display المرن تتجاهل hidden */
body.page-home [hidden] { display: none !important; }
body.page-home ::selection { background: rgba(0, 230, 168, 0.35); color: #071310; }

/* الترويسة والتذييل */
body.page-home .site-head { background: rgba(7, 19, 16, 0.94); border-bottom: 1px solid rgba(0, 230, 168, 0.35); }
body.page-home .site-head .brand { color: #DCF5EA; }
body.page-home .site-head .brand small { color: rgba(220, 245, 234, 0.5); }
body.page-home .brand-mark rect[fill="#0a0f1a"] { fill: #0C201A; }
body.page-home .brand-mark path { stroke: #00E6A8; }
body.page-home .brand-mark rect[stroke] { stroke: rgba(0, 230, 168, 0.7); }
body.page-home .topnav a { color: rgba(220, 245, 234, 0.68); }
body.page-home .topnav a:hover { color: #DCF5EA; background: rgba(0, 230, 168, 0.1); }
body.page-home .topnav a[aria-current="page"] { color: #00E6A8; background: rgba(0, 230, 168, 0.13); }
body.page-home .market-led { color: #00E6A8; }
body.page-home .site-foot { background: rgba(5, 14, 11, 0.97); color: rgba(220, 245, 234, 0.78); border-top: 1px solid rgba(0, 230, 168, 0.3); }
body.page-home .site-foot a { color: #00E6A8; }
body.page-home .site-foot .foot-copy { color: rgba(220, 245, 234, 0.45); }

/* شريط الشموع المتحرك */
body.page-home .tape { border-bottom: 1px solid rgba(0, 230, 168, 0.16); background: rgba(10, 26, 21, 0.75); }
body.page-home .tape-item { color: #6E9484; }
body.page-home .tape-item b { color: #DCF5EA; }
body.page-home .tape-item:hover { color: #00E6A8; }
body.page-home .tape-dot { background: rgba(0, 230, 168, 0.65); }

/* ترويسة المختبر */
.lab-head {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; align-items: end;
  padding: 38px 0 14px;
}
.lab-head .badge { color: #6E9484; border-color: rgba(0, 230, 168, 0.3); background: rgba(0, 230, 168, 0.06); }
.lab-head .badge-dot { background: #00E6A8; box-shadow: 0 0 10px rgba(0, 230, 168, 0.8); }
.lab-head h1 { color: #DCF5EA; margin-bottom: 10px; }
.lab-head h1 .grad { background: linear-gradient(100deg, #3FD9C4 15%, #00E6A8 85%); -webkit-background-clip: text; background-clip: text; }
.lab-head .sub { color: #6E9484; margin: 0; max-width: 60ch; font-size: 0.95rem; }
.lab-side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
body.page-home .qjump { justify-content: flex-end; }
body.page-home .qjump input {
  background: rgba(10, 26, 21, 0.9); border-color: rgba(0, 230, 168, 0.35); color: #DCF5EA;
}
body.page-home .qjump input:focus { border-color: #00E6A8; box-shadow: 0 0 0 3px rgba(0, 230, 168, 0.16); }
body.page-home .qjump input::placeholder { color: rgba(110, 148, 132, 0.8); }

/* شريط نبض السوق */
body.page-home .mkt-live {
  grid-template-columns: repeat(6, auto);
  width: 100%;
  background: #0C201A;
  border: 1px solid rgba(0, 230, 168, 0.45);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(0, 230, 168, 0.04);
}
body.page-home .mkt-cell { border-inline-start: 1px solid rgba(220, 245, 234, 0.1); }
body.page-home .mkt-k { color: rgba(220, 245, 234, 0.5); }
body.page-home .mkt-v { color: #DCF5EA; }
body.page-home .mkt-v.is-up { color: #00E6A8; }
body.page-home .mkt-v.is-dn { color: #FF7A93; }
body.page-home .mkt-v.mkt-scan { color: #00E6A8; font-size: 0.9rem; }
body.page-home .status-led.is-open { background: #00E6A8; animation: lab-pulse 2.2s ease-out infinite; }
@keyframes lab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 168, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(0, 230, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 168, 0); }
}

/* لوحة الفرص: ترويسة وأدوات */
.lab-board-sec { margin: 30px 0 4px; }
body.page-home .watch-head h2 { color: #DCF5EA; }
body.page-home .watch-head h2::after { background: linear-gradient(90deg, #00E6A8, transparent); }
body.page-home .watch-head p { color: #6E9484; }
.board-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.board-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
body.page-home .search-box { flex: 0 1 300px; }
body.page-home .search-box { background: rgba(10, 26, 21, 0.9); border-color: rgba(0, 230, 168, 0.3); border-radius: 10px; border-width: 1px; border-style: solid; }
body.page-home .search-box input { color: #DCF5EA; }
body.page-home .search-box input::placeholder { color: rgba(110, 148, 132, 0.8); }
body.page-home .search-ico { color: #6E9484; }
body.page-home .match-count { color: #6E9484; }
body.page-home .cache-chip { border: 1px solid rgba(110, 148, 132, 0.5); color: #6E9484; background: rgba(110, 148, 132, 0.1); border-radius: 999px; padding: 3px 12px; font-size: 0.75rem; font-weight: 700; }
body.page-home .cache-chip.is-live { color: #00E6A8; border-color: rgba(0, 230, 168, 0.6); background: rgba(0, 230, 168, 0.12); }
body.page-home .chip-btn { color: rgba(220, 245, 234, 0.65); border-color: rgba(220, 245, 234, 0.2); background: rgba(10, 26, 21, 0.7); }
body.page-home .chip-btn:hover { color: #DCF5EA; border-color: rgba(0, 230, 168, 0.5); }
body.page-home .chip-btn.is-active { color: #00E6A8; border-color: #00E6A8; background: rgba(0, 230, 168, 0.14); }
body.page-home .chip-label { color: #6E9484; }
body.page-home .btn { color: #DCF5EA; border-color: rgba(220, 245, 234, 0.25); background: rgba(10, 26, 21, 0.8); }
body.page-home .btn:hover { border-color: #00E6A8; color: #00E6A8; background: rgba(0, 230, 168, 0.08); }
body.page-home .btn-accent { color: #052E21; background: linear-gradient(120deg, #3FE8B5, #00E6A8); border-color: #00E6A8; box-shadow: 0 10px 26px rgba(0, 230, 168, 0.28); }
body.page-home .btn-accent:hover { color: #052E21; box-shadow: 0 14px 34px rgba(0, 230, 168, 0.4); }
body.page-home .stat-pill { color: #DCF5EA; border-color: rgba(220, 245, 234, 0.2); background: rgba(10, 26, 21, 0.8); }
body.page-home .stat-pill:hover { border-color: rgba(0, 230, 168, 0.55); }
body.page-home .stat-pill.is-active { border-color: #00E6A8; background: rgba(0, 230, 168, 0.14); }
body.page-home .stat-pill .st-num { color: #00E6A8; }

/* جدول اللوحة */
body.page-home .table-wrap.hud { background: rgba(10, 26, 21, 0.82); border: 1px solid rgba(0, 230, 168, 0.28); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42); }
body.page-home .hud::before, body.page-home .hud::after { border-color: rgba(0, 230, 168, 0.75); }
body.page-home .hud:hover::before, body.page-home .hud:hover::after { border-color: #00E6A8; }
body.page-home .data-table thead th {
  background: rgba(5, 14, 11, 0.96);
  color: rgba(220, 245, 234, 0.85);
  border-bottom: 1px solid rgba(0, 230, 168, 0.4);
}
body.page-home .data-table td { border-color: rgba(220, 245, 234, 0.09); color: #DCF5EA; }
body.page-home .data-table .placeholder-row td { color: #6E9484; }
body.page-home .data-table tbody tr:hover {
  background: rgba(0, 230, 168, 0.07);
  box-shadow: inset -2px 0 0 #00E6A8;
}
body.page-home tr.fl-row:hover td, body.page-home tr.fl-row:focus-visible td { background: rgba(0, 230, 168, 0.09); }
body.page-home tr.fl-row:focus-visible { outline: 2px solid rgba(0, 230, 168, 0.7); outline-offset: -2px; }
body.page-home .sym-link { color: #DCF5EA; }
body.page-home .sym-link:hover { color: #00E6A8; }
body.page-home .px { color: #DCF5EA; }
body.page-home .chg-up { color: #00E6A8; }
body.page-home .chg-dn { color: #FF7A93; }
body.page-home .fl-ev { color: #6E9484; }
body.page-home .fl-scorenum.hot { color: #00E6A8; text-shadow: 0 0 12px rgba(0, 230, 168, 0.5); }
body.page-home .fl-scorenum.mid { color: #3FD9C4; }
body.page-home .fl-scorenum.low { color: #6E9484; }
body.page-home .fl-meter { background: rgba(220, 245, 234, 0.1); }
body.page-home .fl-meter i.hot { background: linear-gradient(90deg, #17C48F, #00E6A8); box-shadow: 0 0 8px rgba(0, 230, 168, 0.45); }
body.page-home .fl-meter i.mid { background: linear-gradient(90deg, #2BA79A, #3FD9C4); }
body.page-home .fl-meter i.low { background: rgba(110, 148, 132, 0.55); }
body.page-home .fl-side.b-bull { color: #00E6A8; background: rgba(0, 230, 168, 0.12); border-color: rgba(0, 230, 168, 0.5); }
body.page-home .fl-side.b-bear { color: #FF7A93; background: rgba(255, 122, 147, 0.1); border-color: rgba(255, 122, 147, 0.45); }
body.page-home .fl-side.b-both { color: #3FD9C4; background: rgba(63, 217, 196, 0.1); border-color: rgba(63, 217, 196, 0.45); }
body.page-home .fl-side.b-none { color: #6E9484; background: rgba(110, 148, 132, 0.08); border-color: rgba(110, 148, 132, 0.4); }
body.page-home .fl-sig { color: rgba(220, 245, 234, 0.7); border-color: rgba(220, 245, 234, 0.18); background: rgba(220, 245, 234, 0.04); }
body.page-home .fl-sig-more { color: #00E6A8; }
body.page-home .fl-zone { color: #6E9484; }
body.page-home .fl-zone b { color: #DCF5EA; }
body.page-home .fl-zone small { color: #6E9484; }
body.page-home .fl-zone.lv-bull b { color: #00E6A8; }
body.page-home .fl-zone.lv-bear b { color: #FF7A93; }
body.page-home .fl-zone.lv-ote b { color: #3FD9C4; }
body.page-home .dot-ob { background: #00E6A8; }
body.page-home .dot-fvg { background: #3FD9C4; }
body.page-home .dot-ote { background: rgba(0, 230, 168, 0.65); }
body.page-home .dot-sweep { background: #FF7A93; }
body.page-home .dot-choch { background: rgba(63, 217, 196, 0.7); }
body.page-home .dot-bos { background: rgba(110, 148, 132, 0.75); }
body.page-home .dot-warn { background: #FF7A93; }
body.page-home .dot-bull { background: #00E6A8; }
body.page-home .dot-bear { background: #FF7A93; }
body.page-home .data-table .sym { color: #00E6A8; background: rgba(0, 230, 168, 0.1); border-color: rgba(0, 230, 168, 0.4); }
body.page-home .data-table .sym:hover { background: rgba(0, 230, 168, 0.24); color: #052E21; }
body.page-home .data-table .dim { color: #6E9484; }
body.page-home .table-foot { color: #6E9484; }

/* خريطة السوق التفاعلية */
.radar-sec { margin: 30px 0 4px; }
.radar-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rl-item { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 700; color: #6E9484; }
.rl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.rl-dot.rl-hot { background: #00E6A8; box-shadow: 0 0 8px rgba(0, 230, 168, 0.85); }
.rl-dot.rl-mid { background: rgba(63, 217, 196, 0.8); }
.rl-dot.rl-low { background: rgba(220, 245, 234, 0.3); border: 1px solid rgba(110, 148, 132, 0.6); }
.radar-card {
  position: relative;
  background:
    linear-gradient(rgba(0, 230, 168, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 168, 0.03) 1px, transparent 1px),
    #0C201A;
  background-size: 30px 30px, 30px 30px, auto;
  border: 1px solid rgba(0, 230, 168, 0.45);
  border-radius: var(--rad, 14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 90px rgba(0, 230, 168, 0.05);
  overflow: hidden;
  padding: 8px;
}
.radar-card::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
#radar-canvas { display: block; width: 100%; }
.radar-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: rgba(4, 12, 10, 0.95);
  border: 1px solid rgba(0, 230, 168, 0.55);
  border-radius: 9px;
  color: #DCF5EA;
  padding: 7px 11px;
  font-size: 0.75rem; font-weight: 700; line-height: 1.7;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.radar-tip b { color: #00E6A8; }
.radar-tip span { display: block; color: rgba(220, 245, 234, 0.7); font-weight: 600; }
.radar-cap { margin: 10px 2px 0; font-size: 0.75rem; color: #6E9484; }

/* مراقبة الأثقل */
body.page-home .watch.hud { background: rgba(10, 26, 21, 0.82); border: 1px solid rgba(0, 230, 168, 0.28); }
body.page-home .watch-row { border-color: rgba(220, 245, 234, 0.09); color: #DCF5EA; }
body.page-home .watch-row:hover { background: rgba(0, 230, 168, 0.07); }
body.page-home .watch-sym b { color: #DCF5EA; }
body.page-home .watch-sym span { color: #6E9484; }
body.page-home .watch-price { color: #DCF5EA; }
body.page-home .watch-price small { color: #6E9484; }
body.page-home .watch-time { color: #6E9484; }
body.page-home .watch-skeleton { color: #6E9484; }
body.page-home .watch-note { color: #6E9484; }
body.page-home .chg-badge.is-up { color: #052E21; background: rgba(0, 230, 168, 0.8); }
body.page-home .chg-badge.is-dn { color: #2A0B12; background: rgba(255, 122, 147, 0.75); }
body.page-home .chg-badge.is-flat { color: #6E9484; background: rgba(110, 148, 132, 0.15); }
body.page-home .wf-btn { color: rgba(220, 245, 234, 0.65); border-color: rgba(220, 245, 234, 0.2); background: rgba(10, 26, 21, 0.7); }
body.page-home .wf-btn:hover { color: #DCF5EA; border-color: rgba(0, 230, 168, 0.5); }
body.page-home .wf-btn.is-active { color: #00E6A8; border-color: #00E6A8; background: rgba(0, 230, 168, 0.14); }
body.page-home .watch-breadth { color: #6E9484; }
body.page-home .watch-breadth b.is-up { color: #00E6A8; }
body.page-home .watch-breadth b.is-dn { color: #FF7A93; }

/* أدوات المختبر */
body.page-home .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 6px; }
body.page-home .tool-card { background: rgba(10, 26, 21, 0.85); border: 1px solid rgba(0, 230, 168, 0.22); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); padding: 16px 18px; }
body.page-home .tool-card h2 { color: #DCF5EA; font-size: 0.95rem; }
body.page-home .tool-card p { color: #6E9484; font-size: 0.78rem; }
body.page-home .tool-card .tool-link { color: #00E6A8; font-size: 0.76rem; }
body.page-home .tool-card:hover { border-color: rgba(0, 230, 168, 0.55); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 230, 168, 0.15); }
body.page-home .tool-card.is-hot { border-color: rgba(0, 230, 168, 0.5); background: linear-gradient(170deg, rgba(0, 230, 168, 0.12), rgba(10, 26, 21, 0.85) 55%); }
body.page-home .tool-ico.ico-accent { color: #00E6A8; background: rgba(0, 230, 168, 0.12); border-color: rgba(0, 230, 168, 0.45); }
body.page-home .tool-ico.ico-green { color: #3FD9C4; background: rgba(63, 217, 196, 0.1); border-color: rgba(63, 217, 196, 0.4); }
body.page-home .tool-ico.ico-violet { color: #00E6A8; background: rgba(0, 230, 168, 0.1); border-color: rgba(0, 230, 168, 0.4); }
body.page-home .tool-ico.ico-pink { color: #FF7A93; background: rgba(255, 122, 147, 0.1); border-color: rgba(255, 122, 147, 0.4); }
body.page-home .tag-new { color: #052E21; background: linear-gradient(120deg, #3FE8B5, #00E6A8); border: none; }

/* تنبيهات البريد */
body.page-home .alerts-cta { background: #0C201A; border: 1px solid rgba(0, 230, 168, 0.4); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); }
body.page-home .alerts-cta h2 { color: #DCF5EA; }
body.page-home .alerts-cta p { color: rgba(220, 245, 234, 0.68); }
body.page-home .alerts-hint { color: rgba(220, 245, 234, 0.45); }

/* استجابة المقاسات */
@media (max-width: 1020px) {
  .lab-head { grid-template-columns: 1fr; gap: 14px; padding-top: 30px; }
  body.page-home .mkt-live { grid-template-columns: repeat(3, auto); }
  body.page-home .mkt-cell { min-width: 0; }
  body.page-home .tools { grid-template-columns: repeat(2, 1fr); }
  .board-tools { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .lab-head { padding-top: 24px; }
  body.page-home .mkt-live { grid-template-columns: repeat(2, auto); }
  body.page-home .tools { grid-template-columns: 1fr; }
  .radar-tip { font-size: 0.75rem; }
  body.page-home .qjump { flex-wrap: wrap; }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  body.page-home .status-led.is-open { animation: none; }
}

/* ============================================================
   v29 — «تصميم بمعايير آبل» للموقع كاملاً
   أسود نقي #000 · ألواح #1c1c1e · زجاج مصنفر saturate+blur
   أكشن أزرق #0a84ff · أخضر مالي #30d158 · أحمر مالي #ff453a
   تدرج آبل الذكي للعناوين · كبسولات 980px · شعرات hairline
   طبقة تجاوز نهائية فوق كل الأقسام — البنية والوظائف كما هي.
   ============================================================ */

/* ---------- إطفاء أقواس الزوايا HUD في كل الصفحات ---------- */
.hud::before, .hud::after,
body.page-filter .hud::before, body.page-filter .hud::after,
body.page-home .hud::before, body.page-home .hud::after { display: none !important; }

body.page ::selection { background: rgba(10, 132, 255, 0.4); color: #ffffff; }

/* ---------- الترويسة: زجاج مصنفر بشعرة سفلية ---------- */
.site-head,
body.page-home .site-head {
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
body.page-filter .site-head {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}
.brand { font-weight: 700; letter-spacing: 0; }
.brand small { letter-spacing: 0.2em; font-weight: 600; color: #77777d; }
body.page-filter .brand, body.page-filter .site-head .brand { color: #1d1d1f; }
body.page-filter .brand small { color: #86868b; }
.brand-mark {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
}
body.page-filter .brand-mark { background: #1d1d1f; border-color: rgba(0, 0, 0, 0.2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16); }
.brand-mark rect[fill="#0a0f1a"] { fill: #1c1c1e; }
.brand-mark path { stroke: var(--acc); }
.brand-mark rect[stroke] { stroke: rgba(10, 132, 255, 0.85); }
body.page-filter .brand-mark rect[fill="#0a0f1a"] { fill: #1d1d1f; }
body.page-filter .brand-mark path { stroke: #0071e3; }
body.page-filter .brand-mark rect[stroke] { stroke: rgba(0, 113, 227, 0.85); }
body.page-home .brand-mark rect[fill="#0a0f1a"] { fill: #1c1c1e; }
body.page-home .brand-mark path { stroke: #0a84ff; }
body.page-home .brand-mark rect[stroke] { stroke: rgba(10, 132, 255, 0.85); }

/* تنقل بلا صندوق — نص رمادي يتوهج للأبيض عند التحويم */
.topnav { background: transparent; border: none; padding: 0; gap: 2px; }
.topnav a { font-weight: 600; font-size: 0.84rem; color: #a1a1a6; padding: 7px 14px; border-radius: 980px; }
.topnav a:hover { color: #f5f5f7; background: rgba(255, 255, 255, 0.08); }
.topnav a[aria-current="page"] { color: #f5f5f7; background: rgba(255, 255, 255, 0.13); box-shadow: none; }
body.page-filter .topnav a { color: #424245; }
body.page-filter .topnav a:hover { color: #1d1d1f; background: rgba(0, 0, 0, 0.05); }
body.page-filter .topnav a[aria-current="page"] { color: #0071e3; background: rgba(0, 113, 227, 0.09); }
body.page-home .topnav a { color: #a1a1a6; }
body.page-home .topnav a:hover { color: #f5f5f7; background: rgba(255, 255, 255, 0.08); }
body.page-home .topnav a[aria-current="page"] { color: #f5f5f7; background: rgba(255, 255, 255, 0.13); }

.market-led { color: #a1a1a6; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); font-weight: 600; }
body.page-filter .market-led { color: #1d1d1f; border-color: rgba(0, 0, 0, 0.14); background: rgba(0, 0, 0, 0.04); }
body.page-home .market-led { color: #a1a1a6; }

/* ---------- الشريط المتحرك: هادئ ومحايد ---------- */
.tape { background: rgba(255, 255, 255, 0.025); }
.tape-item { color: #6e6e73; font-weight: 500; }
.tape-item b { color: #a1a1a6; font-weight: 600; }
.tape-item:hover b { color: #f5f5f7; }
.tape-dot { background: rgba(255, 255, 255, 0.28); }
body.page-home .tape { border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.025); }
body.page-home .tape-item { color: #6e6e73; }
body.page-home .tape-item b { color: #a1a1a6; }
body.page-home .tape-item:hover { color: #f5f5f7; }
body.page-home .tape-dot { background: rgba(255, 255, 255, 0.28); }

/* ---------- الشارات: كبسولة زجاجية بنبضة خضراء حية ---------- */
.badge { color: #a1a1a6; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 600; }
.badge-dot {
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
  animation: ap-pulse 2.2s ease-out infinite;
}
@keyframes ap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

/* ---------- الأزرار: كبسولات 980px بلا حدود ---------- */
.btn { border-radius: 980px; font-weight: 600; }
.btn-quiet { background: rgba(255, 255, 255, 0.08); color: #f5f5f7; border: none; }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.14); border-color: transparent; transform: none; }
.btn-accent { background: var(--acc); color: #ffffff; border: none; box-shadow: 0 8px 22px rgba(10, 132, 255, 0.32); }
.btn-accent:hover { transform: none; filter: brightness(1.12); box-shadow: 0 12px 28px rgba(10, 132, 255, 0.4); }
.btn-ghost-dn { border: 1px solid rgba(255, 69, 58, 0.4); color: var(--dn-soft); background: transparent; }
.btn-sm { border-radius: 980px; }
body.page-filter .btn { background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.12); color: #1d1d1f; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
body.page-filter .btn:hover { border-color: rgba(0, 0, 0, 0.22); background: #ffffff; color: #1d1d1f; }
body.page-filter .btn-accent { background: #0071e3; border-color: #0071e3; color: #ffffff; box-shadow: 0 8px 20px rgba(0, 113, 227, 0.28); }
body.page-filter .btn-accent:hover { background: #0077ed; border-color: #0077ed; box-shadow: 0 10px 26px rgba(0, 113, 227, 0.36); }
body.page-home .btn { background: rgba(255, 255, 255, 0.08); border: none; color: #f5f5f7; }
body.page-home .btn:hover { border: none; background: rgba(255, 255, 255, 0.14); color: #ffffff; }
body.page-home .btn-accent { background: var(--acc); border: none; color: #ffffff; box-shadow: 0 8px 22px rgba(10, 132, 255, 0.32); }
body.page-home .btn-accent:hover { box-shadow: 0 12px 28px rgba(10, 132, 255, 0.4); color: #ffffff; }

/* رقائق الشارات المربعة */
.meta-chip { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.13); }
.meta-chip::before { border-radius: 50%; transform: none; background: var(--acc); }

/* رقائق الفلاتر: التحديد مكبسول أزرق مصمت مثل iOS */
.chip-btn.is-active { color: #ffffff; background: var(--acc); border-color: transparent; box-shadow: none; }
.chip-btn.is-active .chip-count { color: #ffffff; background: rgba(255, 255, 255, 0.22); border-color: transparent; }
.chip-btn:hover { color: #f5f5f7; border-color: rgba(255, 255, 255, 0.3); }
body.page-home .chip-btn { color: #a1a1a6; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
body.page-home .chip-btn:hover { color: #f5f5f7; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }
body.page-home .chip-btn.is-active { color: #ffffff; border-color: transparent; background: var(--acc); }
body.page-home .chip-btn.is-active .chip-count { color: #ffffff; background: rgba(255, 255, 255, 0.22); }
body.page-filter .chip-btn { color: #424245; border-color: rgba(0, 0, 0, 0.12); background: #ffffff; }
body.page-filter .chip-btn:hover { color: #1d1d1f; border-color: rgba(0, 0, 0, 0.28); background: #ffffff; }
body.page-filter .chip-btn.is-active { color: #ffffff; border-color: #0071e3; background: #0071e3; }

.wf-btn { border-radius: 980px; }
body.page-home .wf-btn { color: #a1a1a6; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
body.page-home .wf-btn:hover { color: #f5f5f7; border-color: rgba(255, 255, 255, 0.3); }
body.page-home .wf-btn.is-active { color: #ffffff; border-color: transparent; background: var(--acc); }

/* حبات الإحصاءات */
.stat-pill { color: var(--ink); border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); }
.stat-pill:hover { border-color: rgba(255, 255, 255, 0.28); transform: none; }
.stat-pill.is-active { border-color: var(--acc); background: rgba(10, 132, 255, 0.14); }
.stat-pill .st-num { color: var(--acc2); }
body.page-home .stat-pill { color: #f5f5f7; border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); }
body.page-home .stat-pill:hover { border-color: rgba(255, 255, 255, 0.28); }
body.page-home .stat-pill.is-active { border-color: var(--acc); background: rgba(10, 132, 255, 0.14); }
body.page-home .stat-pill .st-num { color: #64d2ff; }

/* ---------- الجداول: شعرات فاصلة وترويسة شفافة رمادية ---------- */
.data-table thead th {
  background: transparent;
  color: #77777d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.data-table td { border-color: rgba(255, 255, 255, 0.08); }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.045); box-shadow: inset -2px 0 0 var(--acc); }
.data-table .sym { color: #64d2ff; background: rgba(10, 132, 255, 0.12); border-color: rgba(10, 132, 255, 0.35); }
.data-table .sym:hover { background: rgba(10, 132, 255, 0.28); color: #ffffff; }
a.sym-link { color: var(--ink); }
a.sym-link:hover { color: #ffffff; background: rgba(10, 132, 255, 0.16); border-color: rgba(10, 132, 255, 0.6); }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); }

/* ---------- التذييل: شعرة علوية على أسود نقي ---------- */
.site-foot { background: transparent; border-top: 1px solid rgba(255, 255, 255, 0.08); }
body.page-home .site-foot { background: transparent; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #a1a1a6; }
body.page-home .site-foot a { color: #64d2ff; }
body.page-home .site-foot .foot-copy { color: #6e6e73; }

/* ============================================================
   المحطة المشتركة (ops-*) — متغيرات آبل:
   الفلتر (فاتح): جهاز فحمي #1d1d1f على صفحة #f5f5f7 بلكنة #0071e3
   الرئيسية (داكن): لوح #1c1c1e على أسود #000 بلكنة #0a84ff
   ============================================================ */
:root {
  --st-acc: #0071e3;
  --st-acc-rgb: 0, 113, 227;
  --st-ink: #ffffff;
  --st-ink-rgb: 255, 255, 255;
  --st-frame: #1d1d1f;
  --st-boot-rgb: 0, 0, 0;
  --st-check: #ffffff;
  --st-sum-rgb: 255, 255, 255;
  --st-sum-line-rgb: 0, 113, 227;
  --st-sum-ink: #1d1d1f;
}
body.page-home {
  --st-acc: #0a84ff;
  --st-acc-rgb: 10, 132, 255;
  --st-ink: #f5f5f7;
  --st-ink-rgb: 245, 245, 247;
  --st-frame: #1c1c1e;
  --st-boot-rgb: 0, 0, 0;
  --st-check: #ffffff;
  --st-sum-rgb: 28, 28, 30;
  --st-sum-line-rgb: 10, 132, 255;
  --st-sum-ink: #f5f5f7;
}

/* المحطة: جهاز أسود مصقول بظل عميق — بلا خطوط CRT */
.ops-frame {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    var(--st-frame);
  background-size: 30px 30px, 30px 30px, auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ops-frame::after { display: none; }
.ops-beam { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05) 60%, transparent); }
/* أضواء نافذة ماك الثلاثة */
.ops-dots i { background: rgba(255, 255, 255, 0.16); box-shadow: none; }
.ops-dots i:nth-child(1) { background: #ff5f57; }
.ops-dots i:nth-child(2) { background: #febc2e; }
.ops-dots i:nth-child(3) { background: #28c840; }
.ops-summary {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   صفحة فلتر الفرص (/filter) — آبل فاتح: #f5f5f7 · حبر #1d1d1f · أزرق #0071e3
   ============================================================ */
body.page-filter {
  background:
    radial-gradient(900px 420px at 85% -8%, rgba(0, 113, 227, 0.06), transparent 55%),
    #f5f5f7;
  color: #1d1d1f;
}
body.page-filter::before { content: none; }
body.page-filter ::selection { background: rgba(0, 113, 227, 0.2); color: #1d1d1f; }
body.page-filter .site-foot { background: rgba(255, 255, 255, 0.65); color: #6e6e73; border-top: 1px solid rgba(0, 0, 0, 0.08); }
body.page-filter .site-foot a { color: #0071e3; }
body.page-filter .site-foot .foot-copy { color: #86868b; }
body.page-filter .page-head h1 { color: #1d1d1f; }
body.page-filter .page-head h1 .grad { background: linear-gradient(100deg, #1d1d1f 20%, #0071e3 80%); -webkit-background-clip: text; background-clip: text; }
body.page-filter .page-head .sub { color: #6e6e73; }
body.page-filter .page-head .sub strong { color: #1d1d1f; }
body.page-filter .badge { color: #6e6e73; border-color: rgba(0, 0, 0, 0.12); background: rgba(0, 0, 0, 0.03); }
body.page-filter .badge-dot { background: #0071e3; box-shadow: 0 0 10px rgba(0, 113, 227, 0.55); animation: none; }
body.page-filter .meta-chip { color: #1d1d1f; border-color: rgba(0, 0, 0, 0.1); background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
body.page-filter .meta-chip::before { background: #0071e3; }
body.page-filter .how-card { background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06); }
body.page-filter .how-card h2 { color: #1d1d1f; }
body.page-filter .how-card p { color: #6e6e73; }
body.page-filter .how-ico.ico-green, body.page-filter .how-ico.ico-accent { color: #0071e3; background: rgba(0, 113, 227, 0.08); border-color: rgba(0, 113, 227, 0.35); }
body.page-filter .how-ico.ico-pink, body.page-filter .how-ico.ico-violet { color: #1d1d1f; background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.14); }
body.page-filter .controls .search-box { background: #ffffff; border-color: rgba(0, 0, 0, 0.14); }
body.page-filter .controls .search-box input { color: #1d1d1f; }
body.page-filter .controls .search-box input::placeholder { color: #86868b; }
body.page-filter .search-ico { color: #86868b; }
body.page-filter .match-count { color: #6e6e73; }
body.page-filter .cache-chip { border: 1px solid rgba(0, 0, 0, 0.14); color: #6e6e73; background: rgba(0, 0, 0, 0.03); }
body.page-filter .cache-chip.is-live { color: #0071e3; border-color: rgba(0, 113, 227, 0.5); background: rgba(0, 113, 227, 0.07); }
body.page-filter .chip-label { color: #6e6e73; }
body.page-filter .fl-score-val { color: #0071e3; background: rgba(0, 113, 227, 0.09); border-color: rgba(0, 113, 227, 0.4); }
body.page-filter .fl-score-group input[type="range"] { accent-color: #0071e3; }
body.page-filter .table-wrap.hud { background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07); }
body.page-filter .data-table thead th { background: transparent; color: #6e6e73; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
body.page-filter .data-table thead th .th-sort { color: #6e6e73; }
body.page-filter .data-table thead th .th-sort:hover { color: #1d1d1f; }
body.page-filter .data-table thead th .th-sort.is-active { color: #0071e3; }
body.page-filter .data-table td { border-color: rgba(0, 0, 0, 0.07); color: #1d1d1f; }
body.page-filter .data-table .placeholder-row td { color: #86868b; }
body.page-filter .data-table tbody tr:hover { background: rgba(0, 113, 227, 0.045); box-shadow: none; }
body.page-filter tr.fl-row:hover td, body.page-filter tr.fl-row:focus-visible td { background: rgba(0, 113, 227, 0.05); }
body.page-filter tr.fl-row:focus-visible { outline: 2px solid rgba(0, 113, 227, 0.6); outline-offset: -2px; }
body.page-filter .th-sort.is-active { color: #0071e3; }
body.page-filter .sym-link { color: #1d1d1f; }
body.page-filter .sym-link:hover { color: #0071e3; }
body.page-filter .px { color: #1d1d1f; }
body.page-filter .chg-up { color: #1d8a4e; }
body.page-filter .chg-dn { color: #d70015; }
body.page-filter .fl-ev { color: #6e6e73; }
body.page-filter .fl-scorenum.hot { color: #0071e3; text-shadow: none; }
body.page-filter .fl-scorenum.mid { color: #1d1d1f; }
body.page-filter .fl-scorenum.low { color: #86868b; }
body.page-filter .fl-meter { background: rgba(0, 0, 0, 0.08); }
body.page-filter .fl-meter i.hot { background: #0071e3; box-shadow: none; }
body.page-filter .fl-meter i.mid { background: rgba(0, 113, 227, 0.45); }
body.page-filter .fl-meter i.low { background: rgba(0, 0, 0, 0.18); }
body.page-filter .fl-side.b-bull { color: #1d8a4e; background: rgba(29, 138, 78, 0.09); border-color: rgba(29, 138, 78, 0.35); }
body.page-filter .fl-side.b-bear { color: #d70015; background: rgba(215, 0, 21, 0.06); border-color: rgba(215, 0, 21, 0.3); }
body.page-filter .fl-side.b-both { color: #b25000; background: rgba(255, 159, 10, 0.1); border-color: rgba(255, 159, 10, 0.4); }
body.page-filter .fl-side.b-none { color: #86868b; background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.14); }
body.page-filter .fl-sig { color: #6e6e73; border-color: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.025); }
body.page-filter .fl-sig-more { color: #0071e3; }
body.page-filter .fl-zone { color: #6e6e73; }
body.page-filter .fl-zone b { color: #1d1d1f; }
body.page-filter .fl-zone small { color: #86868b; }
body.page-filter .fl-zone.lv-bull b { color: #1d8a4e; }
body.page-filter .fl-zone.lv-bear b { color: #d70015; }
body.page-filter .fl-zone.lv-ote b { color: #0071e3; }
body.page-filter .dot-ob { background: #0071e3; }
body.page-filter .dot-fvg { background: #1d1d1f; }
body.page-filter .dot-ote { background: rgba(0, 113, 227, 0.6); }
body.page-filter .dot-sweep { background: #ff9f0a; }
body.page-filter .dot-choch { background: #86868b; }
body.page-filter .dot-bos { background: #b0b0b5; }
body.page-filter .dot-warn { background: #ff9f0a; }
body.page-filter .dot-bull { background: #1d8a4e; }
body.page-filter .dot-bear { background: #d70015; }
body.page-filter .stat-pill { color: #1d1d1f; border-color: rgba(0, 0, 0, 0.12); background: #ffffff; }
body.page-filter .stat-pill:hover { border-color: rgba(0, 113, 227, 0.5); }
body.page-filter .stat-pill.is-active { border-color: #0071e3; background: rgba(0, 113, 227, 0.07); }
body.page-filter .stat-pill .st-num { color: #0071e3; }
body.page-filter .fl-grade-hot { color: #ffffff; background: #0071e3; box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3); }
body.page-filter .fl-grade-mid { color: #1d1d1f; background: #e8e8ed; }
body.page-filter .fl-grade-low { color: #6e6e73; background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.15); }
body.page-filter .fl-grade-info { color: #0071e3; background: rgba(0, 113, 227, 0.08); border-color: rgba(0, 113, 227, 0.35); }
body.page-filter .table-foot { color: #86868b; }
body.page-filter .data-table .sym { color: #0071e3; background: rgba(0, 113, 227, 0.08); border-color: rgba(0, 113, 227, 0.3); }
body.page-filter .data-table .sym:hover { background: rgba(0, 113, 227, 0.16); color: #0051a2; }
body.page-filter .data-table .dim { color: #86868b; }
body.page-filter .data-table .cur { color: #6e6e73; }

/* ============================================================
   الصفحة الرئيسية (/) — آبل داكن: أسود نقي · ألواح #1c1c1e · أزرق #0a84ff
   ============================================================ */
body.page-home {
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(10, 132, 255, 0.08), transparent 55%),
    radial-gradient(820px 440px at 4% 112%, rgba(191, 90, 242, 0.05), transparent 55%),
    #000000;
  color: #f5f5f7;
}
body.page-home ::selection { background: rgba(10, 132, 255, 0.4); color: #ffffff; }

/* ترويسة المختبر */
.lab-head .badge { color: #a1a1a6; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
.lab-head .badge-dot { background: #30d158; box-shadow: 0 0 10px rgba(48, 209, 88, 0.7); }
.lab-head h1 { color: #f5f5f7; margin-bottom: 10px; letter-spacing: -0.02em; }
.lab-head h1 .grad { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; }
.lab-head .sub { color: #a1a1a6; margin: 0; max-width: 60ch; font-size: 0.98rem; font-weight: 400; }
.lab-side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
body.page-home .qjump { justify-content: flex-end; }
body.page-home .qjump input {
  background: #1c1c1e; border-color: rgba(255, 255, 255, 0.12); color: #f5f5f7;
  border-radius: 12px;
}
body.page-home .qjump input:focus { border-color: var(--acc); box-shadow: 0 0 0 3.5px rgba(10, 132, 255, 0.28); }
body.page-home .qjump input::placeholder { color: #6e6e73; }
body.page-home .qjump .btn-sm { background: var(--acc); color: #fff; border: none; }

/* شريط نبض السوق: لوح #1c1c1e واحد بفواصل شعرية */
body.page-home .mkt-live {
  grid-template-columns: repeat(6, auto);
  width: 100%;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
body.page-home .mkt-cell { border-inline-start: 1px solid rgba(255, 255, 255, 0.08); }
body.page-home .mkt-k { color: #86868b; }
body.page-home .mkt-v { color: #f5f5f7; }
body.page-home .mkt-v.is-up { color: #30d158; }
body.page-home .mkt-v.is-dn { color: #ff453a; }
body.page-home .mkt-v.mkt-scan { color: #64d2ff; font-size: 0.9rem; }
body.page-home .status-led.is-open { background: #30d158; animation: ap-pulse 2.2s ease-out infinite; }

/* لوحة الفرص */
.lab-board-sec { margin: 30px 0 4px; }
body.page-home .watch-head h2 { color: #f5f5f7; font-weight: 700; letter-spacing: -0.01em; }
body.page-home .watch-head h2::after { background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent); }
body.page-home .watch-head p { color: #a1a1a6; }
.board-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.board-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
body.page-home .search-box { flex: 0 1 300px; background: #1c1c1e; border-color: rgba(255, 255, 255, 0.12); border-radius: 12px; }
body.page-home .search-box input { color: #f5f5f7; }
body.page-home .search-box input::placeholder { color: #6e6e73; }
body.page-home .search-ico { color: #77777d; }
body.page-home .match-count { color: #77777d; }
body.page-home .cache-chip { border: 1px solid rgba(255, 255, 255, 0.14); color: #86868b; background: rgba(255, 255, 255, 0.05); border-radius: 980px; padding: 3px 12px; font-size: 0.75rem; font-weight: 600; }
body.page-home .cache-chip.is-live { color: #64d2ff; border-color: rgba(10, 132, 255, 0.5); background: rgba(10, 132, 255, 0.1); }
body.page-home .chip-label { color: #77777d; }

/* جدول اللوحة */
body.page-home .table-wrap.hud { background: #1c1c1e; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); border-radius: var(--rad); }
body.page-home .data-table thead th { background: transparent; color: #77777d; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
body.page-home .data-table td { border-color: rgba(255, 255, 255, 0.08); color: #f5f5f7; }
body.page-home .data-table .placeholder-row td { color: #77777d; }
body.page-home .data-table tbody tr:hover { background: rgba(255, 255, 255, 0.045); box-shadow: inset -2px 0 0 var(--acc); }
body.page-home tr.fl-row:hover td, body.page-home tr.fl-row:focus-visible td { background: rgba(255, 255, 255, 0.05); }
body.page-home tr.fl-row:focus-visible { outline: 2px solid rgba(10, 132, 255, 0.6); outline-offset: -2px; }
body.page-home .sym-link { color: #f5f5f7; }
body.page-home .sym-link:hover { color: #ffffff; }
body.page-home .px { color: #f5f5f7; }
body.page-home .chg-up { color: #30d158; }
body.page-home .chg-dn { color: #ff453a; }
body.page-home .fl-ev { color: #86868b; }
body.page-home .fl-scorenum.hot { color: #64d2ff; text-shadow: none; }
body.page-home .fl-scorenum.mid { color: #a1a1a6; }
body.page-home .fl-scorenum.low { color: #77777d; }
body.page-home .fl-meter { background: rgba(255, 255, 255, 0.1); }
body.page-home .fl-meter i.hot { background: var(--acc); box-shadow: none; }
body.page-home .fl-meter i.mid { background: rgba(10, 132, 255, 0.5); }
body.page-home .fl-meter i.low { background: rgba(255, 255, 255, 0.2); }
body.page-home .fl-side.b-bull { color: #30d158; background: rgba(48, 209, 88, 0.1); border-color: rgba(48, 209, 88, 0.4); }
body.page-home .fl-side.b-bear { color: #ff453a; background: rgba(255, 69, 58, 0.1); border-color: rgba(255, 69, 58, 0.4); }
body.page-home .fl-side.b-both { color: #ff9f0a; background: rgba(255, 159, 10, 0.1); border-color: rgba(255, 159, 10, 0.4); }
body.page-home .fl-side.b-none { color: #86868b; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.15); }
body.page-home .fl-sig { color: rgba(245, 245, 247, 0.7); border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.04); }
body.page-home .fl-sig-more { color: #64d2ff; }
body.page-home .fl-zone { color: #86868b; }
body.page-home .fl-zone b { color: #f5f5f7; }
body.page-home .fl-zone small { color: #86868b; }
body.page-home .fl-zone.lv-bull b { color: #30d158; }
body.page-home .fl-zone.lv-bear b { color: #ff453a; }
body.page-home .fl-zone.lv-ote b { color: #64d2ff; }
body.page-home .dot-ob { background: var(--acc); }
body.page-home .dot-fvg { background: #64d2ff; }
body.page-home .dot-ote { background: rgba(10, 132, 255, 0.6); }
body.page-home .dot-sweep { background: #ff9f0a; }
body.page-home .dot-choch { background: #86868b; }
body.page-home .dot-bos { background: #b0b0b5; }
body.page-home .dot-warn { background: #ff9f0a; }
body.page-home .dot-bull { background: #30d158; }
body.page-home .dot-bear { background: #ff453a; }
body.page-home .data-table .sym { color: #64d2ff; background: rgba(10, 132, 255, 0.12); border-color: rgba(10, 132, 255, 0.35); }
body.page-home .data-table .sym:hover { background: rgba(10, 132, 255, 0.28); color: #ffffff; }
body.page-home .data-table .dim { color: #86868b; }
body.page-home .table-foot { color: #86868b; }

/* خريطة السوق: لوح داكن نظيف بلا CRT */
.radar-sec { margin: 30px 0 4px; }
.radar-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rl-item { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 600; color: #86868b; }
.rl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rl-dot.rl-hot { background: var(--acc); box-shadow: 0 0 8px rgba(10, 132, 255, 0.8); }
.rl-dot.rl-mid { background: rgba(100, 210, 255, 0.8); }
.rl-dot.rl-low { background: rgba(245, 245, 247, 0.3); border: none; }
.radar-card {
  position: relative;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  padding: 8px;
}
.radar-card::after { display: none; }
#radar-canvas { display: block; width: 100%; }
.radar-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: rgba(28, 28, 30, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #f5f5f7;
  padding: 8px 12px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.7;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.radar-tip b { color: #64d2ff; }
.radar-tip span { display: block; color: #a1a1a6; font-weight: 500; }
.radar-cap { margin: 10px 2px 0; font-size: 0.75rem; color: #86868b; }

/* مراقبة الأثقل */
body.page-home .watch.hud { background: #1c1c1e; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--rad); }
body.page-home .watch-row { border-color: rgba(255, 255, 255, 0.07); color: #f5f5f7; }
body.page-home .watch-row:hover { background: rgba(255, 255, 255, 0.04); }
body.page-home .watch-sym b { color: #f5f5f7; }
body.page-home .watch-sym span { color: #77777d; }
body.page-home .watch-price { color: #f5f5f7; }
body.page-home .watch-price small { color: #77777d; }
body.page-home .watch-time { color: #77777d; }
body.page-home .watch-skeleton { color: #77777d; }
body.page-home .watch-note { color: #86868b; }
body.page-home .chg-badge.is-up { color: #ffffff; background: rgba(48, 209, 88, 0.85); }
body.page-home .chg-badge.is-dn { color: #ffffff; background: rgba(255, 69, 58, 0.85); }
body.page-home .chg-badge.is-flat { color: #a1a1a6; background: rgba(255, 255, 255, 0.12); }
body.page-home .watch-breadth { color: #86868b; }
body.page-home .watch-breadth b.is-up { color: #30d158; }
body.page-home .watch-breadth b.is-dn { color: #ff453a; }

/* أدوات المختبر: بطاقات آبل ناعمة */
body.page-home .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 6px; }
body.page-home .tool-card { background: #1c1c1e; border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); padding: 18px 20px; border-radius: var(--rad); }
body.page-home .tool-card h2 { color: #f5f5f7; font-size: 0.95rem; font-weight: 700; }
body.page-home .tool-card p { color: #a1a1a6; font-size: 0.78rem; }
body.page-home .tool-card .tool-link { color: #64d2ff; font-size: 0.76rem; }
body.page-home .tool-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.22); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
body.page-home .tool-card.is-hot { border-color: rgba(10, 132, 255, 0.5); background: linear-gradient(170deg, rgba(10, 132, 255, 0.12), #1c1c1e 55%); }
body.page-home .tool-ico.ico-accent { color: #64d2ff; background: rgba(10, 132, 255, 0.12); border-color: rgba(10, 132, 255, 0.4); }
body.page-home .tool-ico.ico-green { color: #30d158; background: rgba(48, 209, 88, 0.1); border-color: rgba(48, 209, 88, 0.35); }
body.page-home .tool-ico.ico-violet { color: #bf5af2; background: rgba(191, 90, 242, 0.1); border-color: rgba(191, 90, 242, 0.35); }
body.page-home .tool-ico.ico-pink { color: #ff375f; background: rgba(255, 55, 95, 0.1); border-color: rgba(255, 55, 95, 0.35); }
body.page-home .tag-new { color: #ffffff; background: var(--acc); border: none; }

/* تنبيهات البريد */
body.page-home .alerts-cta { background: #1c1c1e; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); border-radius: var(--rad); }
body.page-home .alerts-cta h2 { color: #f5f5f7; font-weight: 700; }
body.page-home .alerts-cta p { color: #a1a1a6; }
body.page-home .alerts-hint { color: #77777d; }

/* ---------- v29 استجابة: روابط بلا لفّ وشريط نبض يتوزع بلا قصّ ---------- */
.topnav a { white-space: nowrap; }
@media (max-width: 1360px) {
  .topnav a { padding: 7px 10px; font-size: 0.78rem; }
}
@media (max-width: 1220px) {
  .market-led { display: none; }
}
@media (max-width: 1320px) {
  body.page-home .mkt-live { grid-template-columns: repeat(3, auto); }
}
@media (max-width: 640px) {
  body.page-home .mkt-live { grid-template-columns: repeat(2, auto); }
  body.page-home .mkt-cell { padding-inline: 14px; }
}

/* ============================================================
   v30 — «طرفية TradingView» للموقع كاملاً
   طبقة تجاوز نهائية بأسلوب منصة TradingView الشهيرة:
   خلفية #131722 · ألواح #1e222d · حدود #2a2e39 · حبر #d1d4dc
   أزرق TradingView #2962ff · أخضر #089981 · أحمر #f23645
   أركان مضغوطة 4-8px · أرقام جدولية · كثافة عالية بلا توهجات
   البنية والوظائف والميزات كما هي — التحويل بصري خالص.
   ============================================================ */

/* ---------- الرموز الموحدة ---------- */
:root {
  --bg0: #131722;
  --bg1: #0f1319;
  --bg2: #1e222d;
  --panel: #1e222d;
  --panel2: #2a2e39;
  --line: #2a2e39;
  --line2: #363a45;
  --ink: #d1d4dc;
  --ink2: #b2b5be;
  --dim: #9aa0aa;
  --acc: #2962ff;
  --acc2: #6ba1ff;
  --acc-deep: #1e53e5;
  --teal: #26a69a;
  --up: #089981;
  --up-soft: #26a69a;
  --dn: #f23645;
  --dn-soft: #f56d7c;
  --warn: #f7a600;
  --rad: 8px;
  --rad-sm: 6px;
  --grad-ink: linear-gradient(100deg, #2962ff 0%, #6ba1ff 100%);
  --glow-acc: 0 2px 10px rgba(41, 98, 255, 0.28);
  --font: -apple-system, BlinkMacSystemFont, "Trebuchet MS", "Segoe UI", Roboto, "Cairo", Tahoma, sans-serif;
}
body.page {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}
body.page ::selection { background: rgba(41, 98, 255, 0.42); color: #ffffff; }

/* أشرطة تمرير رفيعة داكنة مثل المنصة */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #363a45; border-radius: 5px; border: 2px solid var(--bg0); }
::-webkit-scrollbar-thumb:hover { background: #43465a; }

/* ---------- الترويسة: شريط علوي مسطح بحدود المنصة ---------- */
.site-head,
body.page-home .site-head,
body.page-filter .site-head {
  background: #131722;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.brand { font-weight: 700; letter-spacing: 0; }
.brand small { letter-spacing: 0.16em; font-weight: 600; color: var(--dim); }
body.page-filter .brand, body.page-filter .site-head .brand { color: var(--ink); }
body.page-filter .brand small { color: var(--dim); }
.brand-mark {
  background: #1e222d;
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 6px;
}
body.page-filter .brand-mark { background: #1e222d; border-color: var(--line); box-shadow: none; }
.brand-mark rect[fill="#0a0f1a"] { fill: #1e222d; }
.brand-mark path { stroke: var(--acc); }
.brand-mark rect[stroke] { stroke: rgba(41, 98, 255, 0.6); }
body.page-filter .brand-mark rect[fill="#0a0f1a"] { fill: #1e222d; }
body.page-filter .brand-mark path { stroke: #2962ff; }
body.page-filter .brand-mark rect[stroke] { stroke: rgba(41, 98, 255, 0.6); }
body.page-home .brand-mark rect[fill="#0a0f1a"] { fill: #1e222d; }
body.page-home .brand-mark path { stroke: #2962ff; }
body.page-home .brand-mark rect[stroke] { stroke: rgba(41, 98, 255, 0.6); }

/* روابط التنقل: أزرار مسطحة تتوهج بلوح التمرير — تماماً كقائمة المنصة */
.topnav { background: transparent; border: none; padding: 0; gap: 2px; }
.topnav a {
  font-weight: 500; font-size: 0.8rem; color: var(--ink2);
  padding: 6px 11px; border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.topnav a:hover { color: #ffffff; background: var(--panel2); }
.topnav a[aria-current="page"] { color: #ffffff; background: var(--panel2); box-shadow: none; font-weight: 600; }
body.page-filter .topnav a { color: var(--ink2); }
body.page-filter .topnav a:hover { color: #ffffff; background: var(--panel2); }
body.page-filter .topnav a[aria-current="page"] { color: #ffffff; background: var(--panel2); }
body.page-home .topnav a { color: var(--ink2); }
body.page-home .topnav a:hover { color: #ffffff; background: var(--panel2); }
body.page-home .topnav a[aria-current="page"] { color: #ffffff; background: var(--panel2); }

.market-led {
  color: var(--up-soft); border: 1px solid var(--line);
  background: rgba(8, 153, 129, 0.08); font-weight: 600;
}
body.page-filter .market-led { color: var(--up-soft); border-color: var(--line); background: rgba(8, 153, 129, 0.08); }
body.page-home .market-led { color: var(--up-soft); }

/* ---------- الشريط المتحرك: شريط أسعار المنصة ---------- */
.tape,
body.page-home .tape {
  background: var(--bg1);
  border-bottom: 1px solid var(--line);
}
.tape-item {
  color: var(--dim); font-weight: 600; font-size: 0.78rem;
  gap: 8px;
  border-inline-end: 1px solid rgba(42, 46, 57, 0.7);
  padding-inline: 16px;
}
.tape-item b { color: var(--ink); font-weight: 600; }
.tape-item:hover b, body.page-home .tape-item:hover { color: #ffffff; }
.tape-dot { display: none; }
.tape-sym { color: var(--dim); font-weight: 600; letter-spacing: 0.02em; }
.tape-px { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tape-chg { font-weight: 700; font-variant-numeric: tabular-nums; }
.tape-chg.up { color: var(--up); }
.tape-chg.dn { color: var(--dn); }
.tape-chg.fl { color: var(--dim); }

/* ---------- الشارات ---------- */
.badge {
  color: var(--ink2); background: var(--panel);
  border: 1px solid var(--line); font-weight: 600; border-radius: 6px;
}
.badge-dot {
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(8, 153, 129, 0.5);
  animation: ap-pulse 2.2s ease-out infinite;
}
@keyframes ap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(8, 153, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(8, 153, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 153, 129, 0); }
}
.meta-chip { background: var(--panel); border-color: var(--line); border-radius: 6px; }
.meta-chip::before { border-radius: 50%; transform: none; background: var(--acc); }

/* ---------- الأزرار: مستطيلات مسطحة بأركان 4px ---------- */
.btn { border-radius: 4px; font-weight: 600; }
.btn-quiet { background: var(--panel2); color: var(--ink); border: none; }
.btn-quiet:hover { background: var(--line2); border-color: transparent; transform: none; }
.btn-accent { background: var(--acc); color: #ffffff; border: none; box-shadow: none; }
.btn-accent:hover { transform: none; background: var(--acc-deep); filter: none; box-shadow: none; }
.btn-ghost-dn { border: 1px solid rgba(242, 54, 69, 0.45); color: var(--dn-soft); background: transparent; }
.btn-sm { border-radius: 4px; }
body.page-filter .btn { background: var(--panel2); border: none; color: var(--ink); box-shadow: none; }
body.page-filter .btn:hover { border-color: transparent; background: var(--line2); color: #ffffff; }
body.page-filter .btn-accent { background: var(--acc); border-color: transparent; color: #ffffff; box-shadow: none; }
body.page-filter .btn-accent:hover { background: var(--acc-deep); border-color: transparent; box-shadow: none; }
body.page-home .btn { background: var(--panel2); border: none; color: var(--ink); }
body.page-home .btn:hover { border: none; background: var(--line2); color: #ffffff; }
body.page-home .btn-accent { background: var(--acc); border: none; color: #ffffff; box-shadow: none; }
body.page-home .btn-accent:hover { background: var(--acc-deep); box-shadow: none; color: #ffffff; }

/* ---------- الرقائق والمفاتيح ---------- */
.chip-btn { border-radius: 4px; font-weight: 500; }
.chip-btn.is-active { color: #ffffff; background: var(--acc); border-color: transparent; box-shadow: none; }
.chip-btn.is-active .chip-count { color: #ffffff; background: rgba(255, 255, 255, 0.22); border-color: transparent; }
.chip-btn:hover { color: #ffffff; border-color: var(--line2); background: var(--panel2); }
body.page-home .chip-btn { color: var(--ink2); border-color: var(--line); background: var(--panel); }
body.page-home .chip-btn:hover { color: #ffffff; border-color: var(--line2); background: var(--panel2); }
body.page-home .chip-btn.is-active { color: #ffffff; border-color: transparent; background: var(--acc); }
body.page-home .chip-btn.is-active .chip-count { color: #ffffff; background: rgba(255, 255, 255, 0.22); }
body.page-filter .chip-btn { color: var(--ink2); border-color: var(--line); background: var(--panel); }
body.page-filter .chip-btn:hover { color: #ffffff; border-color: var(--line2); background: var(--panel2); }
body.page-filter .chip-btn.is-active { color: #ffffff; border-color: transparent; background: var(--acc); }

.wf-btn { border-radius: 4px; }
body.page-home .wf-btn { color: var(--ink2); border-color: var(--line); background: var(--panel); }
body.page-home .wf-btn:hover { color: #ffffff; border-color: var(--line2); background: var(--panel2); }
body.page-home .wf-btn.is-active { color: #ffffff; border-color: transparent; background: var(--acc); }

.stat-pill { color: var(--ink); border-color: var(--line); background: var(--panel); border-radius: 6px; }
.stat-pill:hover { border-color: var(--line2); transform: none; }
.stat-pill.is-active { border-color: var(--acc); background: rgba(41, 98, 255, 0.14); }
.stat-pill .st-num { color: var(--acc2); }
body.page-home .stat-pill { color: var(--ink); border-color: var(--line); background: var(--panel); }
body.page-home .stat-pill:hover { border-color: var(--line2); }
body.page-home .stat-pill.is-active { border-color: var(--acc); background: rgba(41, 98, 255, 0.14); }
body.page-home .stat-pill .st-num { color: var(--acc2); }

/* ---------- الجداول: كثافة المنصة وأرقام جدولية ---------- */
.data-table { font-variant-numeric: tabular-nums; }
.data-table thead th {
  background: var(--panel);
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.data-table td { border-color: rgba(42, 46, 57, 0.6); color: var(--ink); }
.data-table tbody tr { transition: background 0.12s ease; }
.data-table tbody tr:hover {
  background: var(--panel2);
  box-shadow: none;
}
.data-table .sym {
  color: var(--ink);
  background: var(--panel2);
  border: none;
  border-radius: 4px;
  font-weight: 700;
}
.data-table .sym:hover { background: var(--line2); color: #ffffff; }
a.sym-link { color: var(--ink); }
a.sym-link:hover { color: #ffffff; background: var(--panel2); border-color: var(--line2); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--line2); }

/* ---------- التذييل ---------- */
.site-foot,
body.page-home .site-foot,
body.page-filter .site-foot {
  background: var(--bg1);
  border-top: 1px solid var(--line);
  color: var(--dim);
}
.site-foot a, body.page-home .site-foot a, body.page-filter .site-foot a { color: var(--ink2); }
.site-foot a:hover, body.page-home .site-foot a:hover { color: #ffffff; }
body.page-home .site-foot .foot-copy, body.page-filter .site-foot .foot-copy { color: var(--dim); }

/* ============================================================
   المحطة المشتركة (ops-*) — ألوان TradingView:
   لوح #1e222d بحدود #2a2e39 · حلقة وسجل بلكنة #2962ff
   ============================================================ */
:root {
  --st-acc: #2962ff;
  --st-acc-rgb: 41, 98, 255;
  --st-ink: #d1d4dc;
  --st-ink-rgb: 209, 212, 220;
  --st-frame: #1e222d;
  --st-boot-rgb: 19, 23, 34;
  --st-check: #089981;
  --st-sum-rgb: 30, 34, 45;
  --st-sum-line-rgb: 41, 98, 255;
  --st-sum-ink: #d1d4dc;
}
body.page-home {
  --st-acc: #2962ff;
  --st-acc-rgb: 41, 98, 255;
  --st-ink: #d1d4dc;
  --st-ink-rgb: 209, 212, 220;
  --st-frame: #1e222d;
  --st-boot-rgb: 19, 23, 34;
  --st-check: #089981;
  --st-sum-rgb: 30, 34, 45;
  --st-sum-line-rgb: 41, 98, 255;
  --st-sum-ink: #d1d4dc;
}
.ops-frame {
  background: var(--st-frame);
  background-size: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.ops-frame::after { display: none; }
.ops-beam { background: linear-gradient(180deg, transparent, rgba(209, 212, 220, 0.04) 60%, transparent); }
/* نقاط نافذة محايدة — الطابع مسطح لا ماك */
.ops-dots i { background: #363a45; box-shadow: none; }
.ops-dots i:nth-child(1) { background: #363a45; }
.ops-dots i:nth-child(2) { background: #363a45; }
.ops-dots i:nth-child(3) { background: #43465a; }
.ops-summary { border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }

/* ============================================================
   صفحة فلتر الفرص (/filter) — داكن موحّد بأسلوب المنصة
   ============================================================ */
body.page-filter {
  background: var(--bg0);
  color: var(--ink);
}
body.page-filter::before { content: none; }
body.page-filter ::selection { background: rgba(41, 98, 255, 0.42); color: #ffffff; }
body.page-filter .page-head h1 { color: var(--ink); }
body.page-filter .page-head h1 .grad { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; }
body.page-filter .page-head .sub { color: var(--ink2); }
body.page-filter .page-head .sub strong { color: var(--ink); }
body.page-filter .badge { color: var(--ink2); border-color: var(--line); background: var(--panel); }
body.page-filter .badge-dot { background: var(--up); box-shadow: 0 0 8px rgba(8, 153, 129, 0.55); animation: none; }
body.page-filter .meta-chip { color: var(--ink); border-color: var(--line); background: var(--panel); box-shadow: none; }
body.page-filter .meta-chip::before { background: var(--acc); }
body.page-filter .how-card { background: var(--panel); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
body.page-filter .how-card h2 { color: var(--ink); }
body.page-filter .how-card p { color: var(--ink2); }
body.page-filter .how-ico.ico-green, body.page-filter .how-ico.ico-accent { color: var(--acc2); background: rgba(41, 98, 255, 0.1); border-color: rgba(41, 98, 255, 0.4); }
body.page-filter .how-ico.ico-pink, body.page-filter .how-ico.ico-violet { color: var(--ink2); background: var(--panel2); border-color: var(--line); }
body.page-filter .controls .search-box { background: var(--panel); border-color: var(--line); border-radius: 4px; }
body.page-filter .controls .search-box input { color: var(--ink); }
body.page-filter .controls .search-box input::placeholder { color: var(--dim); }
body.page-filter .search-ico { color: var(--dim); }
body.page-filter .match-count { color: var(--dim); }
body.page-filter .cache-chip { border: 1px solid var(--line); color: var(--dim); background: var(--panel); border-radius: 4px; }
body.page-filter .cache-chip.is-live { color: var(--acc2); border-color: rgba(41, 98, 255, 0.5); background: rgba(41, 98, 255, 0.08); }
body.page-filter .chip-label { color: var(--dim); }
body.page-filter .fl-score-val { color: var(--acc2); background: rgba(41, 98, 255, 0.09); border-color: rgba(41, 98, 255, 0.4); }
body.page-filter .fl-score-group input[type="range"] { accent-color: var(--acc); }
body.page-filter .table-wrap.hud { background: var(--panel); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
body.page-filter .data-table thead th { background: transparent; color: var(--dim); border-bottom: 1px solid var(--line); }
body.page-filter .data-table thead th .th-sort { color: var(--dim); }
body.page-filter .data-table thead th .th-sort:hover { color: var(--ink); }
body.page-filter .data-table thead th .th-sort.is-active { color: var(--acc2); }
body.page-filter .data-table td { border-color: rgba(42, 46, 57, 0.6); color: var(--ink); }
body.page-filter .data-table .placeholder-row td { color: var(--dim); }
body.page-filter .data-table tbody tr:hover { background: var(--panel2); box-shadow: none; }
body.page-filter tr.fl-row:hover td, body.page-filter tr.fl-row:focus-visible td { background: var(--panel2); }
body.page-filter tr.fl-row:focus-visible { outline: 2px solid rgba(41, 98, 255, 0.6); outline-offset: -2px; }
body.page-filter .th-sort.is-active { color: var(--acc2); }
body.page-filter .sym-link { color: var(--ink); }
body.page-filter .sym-link:hover { color: var(--acc2); }
body.page-filter .px { color: var(--ink); }
body.page-filter .chg-up { color: var(--up); }
body.page-filter .chg-dn { color: var(--dn); }
body.page-filter .fl-ev { color: var(--dim); }
body.page-filter .fl-scorenum.hot { color: var(--acc2); text-shadow: none; }
body.page-filter .fl-scorenum.mid { color: var(--ink); }
body.page-filter .fl-scorenum.low { color: var(--dim); }
body.page-filter .fl-meter { background: rgba(209, 212, 220, 0.12); }
body.page-filter .fl-meter i.hot { background: var(--acc); box-shadow: none; }
body.page-filter .fl-meter i.mid { background: rgba(41, 98, 255, 0.5); }
body.page-filter .fl-meter i.low { background: rgba(209, 212, 220, 0.2); }
body.page-filter .fl-side.b-bull { color: var(--up-soft); background: rgba(8, 153, 129, 0.1); border-color: rgba(8, 153, 129, 0.4); }
body.page-filter .fl-side.b-bear { color: var(--dn-soft); background: rgba(242, 54, 69, 0.08); border-color: rgba(242, 54, 69, 0.35); }
body.page-filter .fl-side.b-both { color: var(--warn); background: rgba(247, 166, 0, 0.1); border-color: rgba(247, 166, 0, 0.4); }
body.page-filter .fl-side.b-none { color: var(--dim); background: var(--panel2); border-color: var(--line); }
body.page-filter .fl-sig { color: var(--ink2); border-color: var(--line); background: var(--panel2); }
body.page-filter .fl-sig-more { color: var(--acc2); }
body.page-filter .fl-zone { color: var(--dim); }
body.page-filter .fl-zone b { color: var(--ink); }
body.page-filter .fl-zone small { color: var(--dim); }
body.page-filter .fl-zone.lv-bull b { color: var(--up-soft); }
body.page-filter .fl-zone.lv-bear b { color: var(--dn-soft); }
body.page-filter .fl-zone.lv-ote b { color: var(--acc2); }
body.page-filter .dot-ob { background: var(--acc); }
body.page-filter .dot-fvg { background: var(--teal); }
body.page-filter .dot-ote { background: rgba(41, 98, 255, 0.6); }
body.page-filter .dot-sweep { background: var(--warn); }
body.page-filter .dot-choch { background: var(--dim); }
body.page-filter .dot-bos { background: #9598a1; }
body.page-filter .dot-warn { background: var(--warn); }
body.page-filter .dot-bull { background: var(--up); }
body.page-filter .dot-bear { background: var(--dn); }
body.page-filter .stat-pill { color: var(--ink); border-color: var(--line); background: var(--panel); }
body.page-filter .stat-pill:hover { border-color: var(--line2); }
body.page-filter .stat-pill.is-active { border-color: var(--acc); background: rgba(41, 98, 255, 0.12); }
body.page-filter .stat-pill .st-num { color: var(--acc2); }
body.page-filter .fl-grade-hot { color: #ffffff; background: var(--acc); box-shadow: none; }
body.page-filter .fl-grade-mid { color: var(--ink); background: var(--panel2); }
body.page-filter .fl-grade-low { color: var(--dim); background: transparent; border-color: var(--line); }
body.page-filter .fl-grade-info { color: var(--acc2); background: rgba(41, 98, 255, 0.08); border-color: rgba(41, 98, 255, 0.35); }
body.page-filter .table-foot { color: var(--dim); }
body.page-filter .data-table .sym { color: var(--ink); background: var(--panel2); border: none; }
body.page-filter .data-table .sym:hover { background: var(--line2); color: #ffffff; }
body.page-filter .data-table .dim { color: var(--dim); }
body.page-filter .data-table .cur { color: var(--dim); }
body.page-filter .ops-boot-inner { color: var(--st-ink); }
body.page-filter .ops-boot { background: rgba(var(--st-boot-rgb), 0.97); }

/* ============================================================
   الصفحة الرئيسية (/) — لوحة المنصة الكاملة
   ============================================================ */
body.page-home {
  background: var(--bg0);
  color: var(--ink);
}
body.page-home ::selection { background: rgba(41, 98, 255, 0.42); color: #ffffff; }

/* ترويسة المختبر */
.lab-head .badge { color: var(--ink2); border-color: var(--line); background: var(--panel); }
.lab-head .badge-dot { background: var(--up); box-shadow: 0 0 8px rgba(8, 153, 129, 0.7); }
.lab-head h1 { color: var(--ink); margin-bottom: 10px; letter-spacing: 0; font-weight: 700; }
.lab-head h1 .grad { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; }
.lab-head .sub { color: var(--ink2); margin: 0; max-width: 60ch; font-size: 0.95rem; font-weight: 400; }
.lab-side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
body.page-home .qjump { justify-content: flex-end; }
body.page-home .qjump input {
  background: var(--panel); border-color: var(--line); color: var(--ink);
  border-radius: 4px;
}
body.page-home .qjump input:focus { border-color: var(--acc); box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.28); }
body.page-home .qjump input::placeholder { color: var(--dim); }
body.page-home .qjump .btn-sm { background: var(--acc); color: #fff; border: none; }

/* شريط نبض السوق: لوح واحد بفواصل — كواد المنصة */
body.page-home .mkt-live {
  grid-template-columns: repeat(6, auto);
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}
body.page-home .mkt-cell { border-inline-start: 1px solid rgba(42, 46, 57, 0.7); }
body.page-home .mkt-k { color: var(--dim); }
body.page-home .mkt-v { color: var(--ink); font-variant-numeric: tabular-nums; }
body.page-home .mkt-v.is-up { color: var(--up); }
body.page-home .mkt-v.is-dn { color: var(--dn); }
body.page-home .mkt-v.mkt-scan { color: var(--acc2); font-size: 0.9rem; }
body.page-home .status-led.is-open { background: var(--up); animation: ap-pulse 2.2s ease-out infinite; }

/* لوحة الفرص */
.lab-board-sec { margin: 30px 0 4px; }
body.page-home .watch-head h2 { color: var(--ink); font-weight: 700; letter-spacing: 0; }
body.page-home .watch-head h2::after { background: var(--line2); }
body.page-home .watch-head p { color: var(--ink2); }
.board-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.board-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
body.page-home .search-box { flex: 0 1 300px; background: var(--panel); border-color: var(--line); border-radius: 4px; }
body.page-home .search-box input { color: var(--ink); }
body.page-home .search-box input::placeholder { color: var(--dim); }
body.page-home .search-ico { color: var(--dim); }
body.page-home .match-count { color: var(--dim); }
body.page-home .cache-chip { border: 1px solid var(--line); color: var(--dim); background: var(--panel); border-radius: 4px; padding: 3px 12px; font-size: 0.75rem; font-weight: 600; }
body.page-home .cache-chip.is-live { color: var(--acc2); border-color: rgba(41, 98, 255, 0.5); background: rgba(41, 98, 255, 0.08); }
body.page-home .chip-label { color: var(--dim); }

/* جدول اللوحة */
body.page-home .table-wrap.hud { background: var(--panel); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
body.page-home .data-table thead th { background: transparent; color: var(--dim); border-bottom: 1px solid var(--line); }
body.page-home .data-table td { border-color: rgba(42, 46, 57, 0.6); color: var(--ink); }
body.page-home .data-table .placeholder-row td { color: var(--dim); }
body.page-home .data-table tbody tr:hover { background: var(--panel2); box-shadow: none; }
body.page-home tr.fl-row:hover td, body.page-home tr.fl-row:focus-visible td { background: var(--panel2); }
body.page-home tr.fl-row:focus-visible { outline: 2px solid rgba(41, 98, 255, 0.6); outline-offset: -2px; }
body.page-home .sym-link { color: var(--ink); }
body.page-home .sym-link:hover { color: #ffffff; }
body.page-home .px { color: var(--ink); }
body.page-home .chg-up { color: var(--up); }
body.page-home .chg-dn { color: var(--dn); }
body.page-home .fl-ev { color: var(--dim); }
body.page-home .fl-scorenum.hot { color: var(--acc2); text-shadow: none; }
body.page-home .fl-scorenum.mid { color: var(--ink2); }
body.page-home .fl-scorenum.low { color: var(--dim); }
body.page-home .fl-meter { background: rgba(209, 212, 220, 0.12); }
body.page-home .fl-meter i.hot { background: var(--acc); box-shadow: none; }
body.page-home .fl-meter i.mid { background: rgba(41, 98, 255, 0.5); }
body.page-home .fl-meter i.low { background: rgba(209, 212, 220, 0.2); }
body.page-home .fl-side.b-bull { color: var(--up-soft); background: rgba(8, 153, 129, 0.1); border-color: rgba(8, 153, 129, 0.4); }
body.page-home .fl-side.b-bear { color: var(--dn-soft); background: rgba(242, 54, 69, 0.08); border-color: rgba(242, 54, 69, 0.35); }
body.page-home .fl-side.b-both { color: var(--warn); background: rgba(247, 166, 0, 0.1); border-color: rgba(247, 166, 0, 0.4); }
body.page-home .fl-side.b-none { color: var(--dim); background: var(--panel2); border-color: var(--line); }
body.page-home .fl-sig { color: var(--ink2); border-color: var(--line); background: var(--panel2); }
body.page-home .fl-sig-more { color: var(--acc2); }
body.page-home .fl-zone { color: var(--dim); }
body.page-home .fl-zone b { color: var(--ink); }
body.page-home .fl-zone small { color: var(--dim); }
body.page-home .fl-zone.lv-bull b { color: var(--up-soft); }
body.page-home .fl-zone.lv-bear b { color: var(--dn-soft); }
body.page-home .fl-zone.lv-ote b { color: var(--acc2); }
body.page-home .dot-ob { background: var(--acc); }
body.page-home .dot-fvg { background: var(--teal); }
body.page-home .dot-ote { background: rgba(41, 98, 255, 0.6); }
body.page-home .dot-sweep { background: var(--warn); }
body.page-home .dot-choch { background: var(--dim); }
body.page-home .dot-bos { background: #9598a1; }
body.page-home .dot-warn { background: var(--warn); }
body.page-home .dot-bull { background: var(--up); }
body.page-home .dot-bear { background: var(--dn); }
body.page-home .data-table .sym { color: var(--ink); background: var(--panel2); border: none; }
body.page-home .data-table .sym:hover { background: var(--line2); color: #ffffff; }
body.page-home .data-table .dim { color: var(--dim); }
body.page-home .table-foot { color: var(--dim); }

/* خريطة السوق: لوح المنصة المسطح */
.radar-sec { margin: 30px 0 4px; }
.radar-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rl-item { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 600; color: var(--dim); }
.rl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rl-dot.rl-hot { background: var(--acc); box-shadow: none; }
.rl-dot.rl-mid { background: rgba(41, 98, 255, 0.55); }
.rl-dot.rl-low { background: rgba(120, 123, 134, 0.55); border: none; }
.radar-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
  padding: 8px;
}
.radar-card::after { display: none; }
#radar-canvas { display: block; width: 100%; }
.radar-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: var(--bg2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--line2);
  border-radius: 6px;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.7;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.radar-tip b { color: var(--acc2); }
.radar-tip span { display: block; color: var(--ink2); font-weight: 500; }
.radar-cap { margin: 10px 2px 0; font-size: 0.75rem; color: var(--dim); }

/* مراقبة الأثقل */
body.page-home .watch.hud { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
body.page-home .watch-row { border-color: rgba(42, 46, 57, 0.6); color: var(--ink); }
body.page-home .watch-row:hover { background: var(--panel2); }
body.page-home .watch-sym b { color: var(--ink); }
body.page-home .watch-sym span { color: var(--dim); }
body.page-home .watch-price { color: var(--ink); font-variant-numeric: tabular-nums; }
body.page-home .watch-price small { color: var(--dim); }
body.page-home .watch-time { color: var(--dim); }
body.page-home .watch-skeleton { color: var(--dim); }
body.page-home .watch-note { color: var(--dim); }
/* شارات التغير: نص ملون فقط — تماماً كقوائم المنصة */
body.page-home .chg-badge { background: transparent; border: none; padding-inline: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
body.page-home .chg-badge::before { display: none; }
body.page-home .chg-badge.is-up { color: var(--up); background: transparent; }
body.page-home .chg-badge.is-dn { color: var(--dn); background: transparent; }
body.page-home .chg-badge.is-flat { color: var(--dim); background: transparent; }
body.page-home .watch-breadth { color: var(--dim); }
body.page-home .watch-breadth b.is-up { color: var(--up); }
body.page-home .watch-breadth b.is-dn { color: var(--dn); }

/* أدوات المختبر: بطاقات الألواح */
body.page-home .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 6px; }
body.page-home .tool-card { background: var(--panel); border: 1px solid var(--line); box-shadow: none; padding: 16px 18px; border-radius: 8px; }
body.page-home .tool-card h2 { color: var(--ink); font-size: 0.92rem; font-weight: 700; }
body.page-home .tool-card p { color: var(--ink2); font-size: 0.78rem; }
body.page-home .tool-card .tool-link { color: var(--acc2); font-size: 0.76rem; }
body.page-home .tool-card:hover { transform: none; border-color: var(--line2); background: #232836; box-shadow: none; }
body.page-home .tool-card.is-hot { border-color: rgba(41, 98, 255, 0.55); background: linear-gradient(170deg, rgba(41, 98, 255, 0.1), var(--panel) 55%); }
body.page-home .tool-ico.ico-accent { color: var(--acc2); background: rgba(41, 98, 255, 0.1); border-color: rgba(41, 98, 255, 0.4); }
body.page-home .tool-ico.ico-green { color: var(--up-soft); background: rgba(8, 153, 129, 0.1); border-color: rgba(8, 153, 129, 0.4); }
body.page-home .tool-ico.ico-violet { color: #a277ff; background: rgba(162, 119, 255, 0.1); border-color: rgba(162, 119, 255, 0.4); }
body.page-home .tool-ico.ico-pink { color: var(--dn-soft); background: rgba(242, 54, 69, 0.1); border-color: rgba(242, 54, 69, 0.4); }
body.page-home .tag-new { color: #ffffff; background: var(--acc); border: none; }

/* تنبيهات البريد */
body.page-home .alerts-cta { background: var(--panel); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
body.page-home .alerts-cta h2 { color: var(--ink); font-weight: 700; }
body.page-home .alerts-cta p { color: var(--ink2); }
body.page-home .alerts-hint { color: var(--dim); }

/* ---------- v30 لمسات كثافة المنصة على كل الصفحات ---------- */
.page-head h1 { letter-spacing: 0; }
.how-card, .note, .lab-cta { border-radius: 8px; }
body.page .search-box input, body.page .hm-field input { border-radius: 4px; }
body.page .btn, body.page .chip-btn, body.page .wf-btn, body.page .stat-pill { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }

/* ---------- v30 ضبط دقيق: تبويبات المختبر وحلقات التركيز ---------- */
.lab-tab { border-radius: 6px; font-weight: 600; }
.lab-tab.is-active { background: var(--acc); box-shadow: none; }
.lab-tab:hover { background: var(--panel2); }
.lab-tab-num { border-radius: 4px; font-weight: 700; }
.lab-canvas:focus-visible { box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.45); border-radius: 6px; }
.hm-field input, .controls input[type="search"], input[type="search"] { border-radius: 4px; }
.progress { border-radius: 4px; }
.progress-fill { background: var(--acc); }
.g-toast { border-radius: 6px; }

/* ---------- v30 استجابة: إعادة تفعيل توزيع الشبكات على الشاشات الضيقة ----------
   (قواعد v30 غير الشرطية كانت تلغي استعلامات الوسائط السابقة — تُستعاد هنا) */
@media (max-width: 1320px) {
  body.page-home .mkt-live { grid-template-columns: repeat(3, auto); }
}
@media (max-width: 1020px) {
  body.page-home .tools { grid-template-columns: repeat(2, 1fr); }
  .board-tools { justify-content: flex-start; }
}
@media (max-width: 640px) {
  body.page-home .mkt-live { grid-template-columns: repeat(2, auto); }
  body.page-home .mkt-cell { padding-inline: 14px; }
  body.page-home .tools { grid-template-columns: 1fr; }
}

/* ============================================================
   v31 — مؤشر اتساع السوق: واجهة جديدة بأسلوب المنصة
   خط واحد من صفر إلى 266 يحسب عدد الأسهم فوق متوسطها المتحرك
   ============================================================ */

.br-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.br-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg2); }
.br-seg button {
  appearance: none; border: none; background: transparent; color: var(--ink2);
  font: inherit; font-size: 0.76rem; font-weight: 600; padding: 7px 14px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.br-seg button + button { border-inline-start: 1px solid var(--line); }
.br-seg button:hover { background: var(--panel2); color: var(--ink); }
.br-seg button.is-active { background: var(--acc); color: #ffffff; }
.br-seg button:disabled { opacity: 0.55; cursor: default; }
.br-tools .hm-field select { min-width: 132px; }
#br-sig.is-on { color: var(--teal); border-color: rgba(38, 166, 154, 0.45); background: rgba(38, 166, 154, 0.1); }

.br-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 2px 0 14px; }
.br-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 11px; min-width: 0; }
.br-stat .k { margin: 0 0 4px; font-size: 0.75rem; font-weight: 600; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-stat .v { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-stat .v small { font-size: 0.75rem; font-weight: 500; color: var(--dim); margin-inline-start: 4px; }
.br-stat .v.is-up { color: var(--up); }
.br-stat .v.is-dn { color: var(--dn); }

.br-chart-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 10px; }
.br-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.75rem; font-weight: 600; color: var(--ink2); padding: 2px 4px 10px; }
.br-leg { display: inline-flex; align-items: center; gap: 6px; }
.br-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.br-dot-line { width: 16px; height: 3px; border-radius: 2px; }
.br-legend-note { margin-inline-start: auto; color: var(--dim); font-weight: 500; }
.br-canvas-wrap { position: relative; height: 430px; border: 1px solid rgba(42, 46, 57, 0.6); border-radius: 6px; background: var(--bg1); overflow: hidden; }
#br-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; }
.br-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 6px;
  color: var(--ink); padding: 8px 12px; font-size: 0.75rem; font-weight: 600; line-height: 1.8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); white-space: nowrap;
}
.br-tip b { color: var(--acc2); }
.br-tip span { display: block; color: var(--ink2); font-weight: 500; }
.br-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 0.82rem; font-weight: 600; pointer-events: none;
}

.br-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 4px; }
.br-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; min-width: 0; }
.br-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.br-panel-head h2 { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.br-count { font-size: 0.75rem; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.br-count.is-up { color: var(--up); border-color: rgba(8, 153, 129, 0.45); background: rgba(8, 153, 129, 0.1); }
.br-count.is-dn { color: var(--dn); border-color: rgba(242, 54, 69, 0.45); background: rgba(242, 54, 69, 0.1); }
.br-list { overflow-y: auto; max-height: 320px; min-height: 120px; }
.br-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  border-bottom: 1px solid rgba(42, 46, 57, 0.55); font-size: 0.75rem; text-decoration: none;
}
.br-row:hover { background: var(--panel2); }
.br-sym { flex: none; min-width: 44px; color: var(--acc2); font-weight: 700; font-variant-numeric: tabular-nums; }
.br-name { flex: 1; min-width: 0; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-close { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.br-dist { flex: none; width: 58px; text-align: left; font-variant-numeric: tabular-nums; font-weight: 700; }
.br-dist.is-up { color: var(--up); }
.br-dist.is-dn { color: var(--dn); }
.br-chev { flex: none; color: var(--dim); }
.br-list-empty { margin: 0; padding: 18px 12px; color: var(--dim); font-size: 0.75rem; text-align: center; }

.br-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.br-table thead th {
  position: sticky; top: 0; background: var(--bg2); color: var(--dim);
  font-weight: 600; text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.br-table tbody td { padding: 7px 10px; border-bottom: 1px solid rgba(42, 46, 57, 0.55); color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-table tbody tr:hover td { background: var(--panel2); }
.br-table td.num { color: var(--ink); font-weight: 600; }
.br-table td.num.is-up { color: var(--up); }
.br-table td.num.is-dn { color: var(--dn); }
.br-table .th-bar, .br-table .td-bar { width: 34%; }
.br-minibar { display: block; height: 5px; border-radius: 3px; background: var(--bg2); border: 1px solid rgba(42, 46, 57, 0.6); overflow: hidden; }
.br-minibar span { display: block; height: 100%; background: var(--acc); border-radius: 3px; }

/* استجابة صفحة الاتساع */
@media (max-width: 1380px) {
  .market-led { display: none; }
}
@media (max-width: 1280px) {
  .br-stats { grid-template-columns: repeat(3, 1fr); }
  .br-grid { grid-template-columns: 1fr; }
  .br-canvas-wrap { height: 360px; }
}
@media (max-width: 700px) {
  .br-stats { grid-template-columns: repeat(2, 1fr); }
  .br-canvas-wrap { height: 300px; }
  .br-tools .hm-field select { min-width: 110px; }
  .br-seg button { padding: 7px 10px; }
  .br-legend-note { display: none; }
}

/* v31 إصلاح: خاصية hidden على صف تقدم الاتساع — display:flex كان يغلبها */
#br-progress-row[hidden] { display: none !important; }

/* ============================================================
   v32 — طرفية السوق الحية: إعادة تصميم الرئيسية بأسلوب شاشات
   الترمنال الاحترافية (HUD كثيف): ألواح معنونة بمعين، أرقام LED،
   حلقة 266 مساراً، شريط تنفيذ، سجل إشارات، خطوط مسح CRT.
   كل القواعد تحت body.page-home فقط — بقية الصفحات بلا مساس.
   ============================================================ */

body.page-home {
  --tk-bg: #05070d;
  --tk-bg2: #070b13;
  --tk-panel: #0a0f1a;
  --tk-panel2: #0d1424;
  --tk-line: #1a2334;
  --tk-line2: #263252;
  --tk-ink: #d9e4f8;
  --tk-ink2: #8fa0c4;
  --tk-dim: #59688f;
  --tk-up: #2ee6a8;
  --tk-up-rgb: 46, 230, 168;
  --tk-dn: #ff4d6a;
  --tk-dn-rgb: 255, 77, 106;
  --tk-cy: #43d9e8;
  --tk-cy-rgb: 67, 217, 232;
  --tk-am: #ffb454;
  --tk-am-rgb: 255, 180, 84;
  --tk-vi: #b48cff;
  --tk-bl: #4f8bff;
  --tk-bl-rgb: 79, 139, 255;
  --tk-mono: "SF Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Cascadia Mono", "Courier New", monospace;
  --st-acc: var(--tk-cy);
  --st-acc-rgb: var(--tk-cy-rgb);
  --st-ink: var(--tk-ink);
  --st-ink-rgb: 217, 228, 248;
  --st-frame: var(--tk-panel);
  --st-boot-rgb: 5, 7, 13;
  --st-check: var(--tk-up);
  --st-sum-rgb: 10, 15, 26;
  --st-sum-line-rgb: 67, 217, 232;
  --st-sum-ink: var(--tk-ink);
  background-color: var(--tk-bg);
  background-image:
    linear-gradient(rgba(90, 130, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 130, 210, 0.05) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
  color: var(--tk-ink);
  font-variant-numeric: tabular-nums;
}
body.page-home::before { content: none; }
body.page-home ::selection { background: rgba(var(--tk-cy-rgb), 0.35); color: #ffffff; }

/* خطوط مسح CRT + تظليل حواف — طبقة عرض فقط */
#crt {
  position: fixed; inset: 0; z-index: 96; pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(190, 215, 255, 0.024) 0px, rgba(190, 215, 255, 0.024) 1px,
    transparent 1px, transparent 3px);
}
#crt::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 38%, transparent 62%, rgba(0, 0, 0, 0.42) 100%);
}

/* ---------- الترويسة وشريط الأسعار ---------- */
body.page-home .site-head {
  background: rgba(6, 9, 16, 0.92);
  border-bottom: 1px solid var(--tk-line);
  backdrop-filter: blur(10px);
}
body.page-home .brand span { color: var(--tk-ink); }
body.page-home .brand small { color: var(--tk-cy); letter-spacing: 0.18em; }
body.page-home .topnav a {
  background: transparent; border: 1px solid transparent; color: var(--tk-ink2);
  font-weight: 600; border-radius: 4px;
}
body.page-home .topnav a:hover { background: var(--tk-panel2); border-color: var(--tk-line); color: var(--tk-ink); }
body.page-home .topnav a[aria-current="page"] {
  background: rgba(var(--tk-cy-rgb), 0.12); border-color: rgba(var(--tk-cy-rgb), 0.4); color: var(--tk-cy);
}
body.page-home .market-led { color: var(--tk-up); font-family: var(--tk-mono); letter-spacing: 0.12em; }
body.page-home .market-led .led { background: var(--tk-up); box-shadow: 0 0 8px rgba(var(--tk-up-rgb), 0.9); }
body.page-home .tape { border-bottom: 1px solid var(--tk-line); background: rgba(7, 11, 19, 0.85); }
body.page-home .tape-item { color: var(--tk-ink2); }
body.page-home .tape-item b { color: var(--tk-ink); }
body.page-home .tape-item .tape-up { color: var(--tk-up); }
body.page-home .tape-item .tape-dn { color: var(--tk-dn); }
body.page-home .tape-chg.up { color: var(--tk-up); }
body.page-home .tape-chg.dn { color: var(--tk-dn); }
body.page-home .tape-chg.fl { color: var(--tk-dim); }

/* ---------- شريط الأوامر ---------- */
.cmd-strip {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 0;
  margin: 14px 0 10px;
  background: linear-gradient(180deg, var(--tk-panel2), var(--tk-panel));
  border: 1px solid var(--tk-line); border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.cmd-cell {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 9px 16px; border-inline-start: 1px solid var(--tk-line); min-width: 0;
}
.cmd-cell:first-child { border-inline-start: none; }
.cmd-cell small {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--tk-dim);
  text-transform: uppercase; white-space: nowrap;
}
.cmd-id { flex-direction: row; align-items: center; gap: 10px; flex: 1 1 240px; }
.cmd-diamond {
  width: 9px; height: 9px; flex: none; background: var(--tk-cy);
  transform: rotate(45deg); box-shadow: 0 0 12px rgba(var(--tk-cy-rgb), 0.8);
  animation: cmdPulse 2.8s ease-in-out infinite;
}
@keyframes cmdPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.cmd-id b { font-size: 13px; font-weight: 800; color: var(--tk-ink); white-space: nowrap; letter-spacing: 0.01em; }
.cmd-id small { letter-spacing: 0.08em; text-transform: none; font-size: 12px; }
.cmd-num { font-family: var(--tk-mono); font-size: 15px; font-weight: 700; color: var(--tk-ink); }
.cmd-chg { font-family: var(--tk-mono); font-size: 12px; font-weight: 700; color: var(--tk-dim); }
.cmd-chg.is-up, .cmd-cell .mkt-chg.is-up { color: var(--tk-up); text-shadow: 0 0 10px rgba(var(--tk-up-rgb), 0.4); }
.cmd-chg.is-dn, .cmd-cell .mkt-chg.is-dn { color: var(--tk-dn); text-shadow: 0 0 10px rgba(var(--tk-dn-rgb), 0.4); }
.cmd-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--tk-ink2); }
.cmd-clock { font-family: var(--tk-mono); font-size: 21px; font-weight: 700; color: var(--tk-up); letter-spacing: 0.04em; text-shadow: 0 0 14px rgba(var(--tk-up-rgb), 0.45); line-height: 1.1; }
.cmd-jump { gap: 3px; }
.cmd-jump-row { display: flex; gap: 6px; }
.cmd-jump input {
  width: 150px; background: var(--tk-bg2); border: 1px solid var(--tk-line); border-radius: 4px;
  color: var(--tk-ink); font-family: var(--tk-mono); font-size: 12px; padding: 5px 9px; outline: none;
}
.cmd-jump input:focus { border-color: rgba(var(--tk-cy-rgb), 0.55); box-shadow: 0 0 0 2px rgba(var(--tk-cy-rgb), 0.15); }
.cmd-jump button {
  appearance: none; border: 1px solid rgba(var(--tk-cy-rgb), 0.45); background: rgba(var(--tk-cy-rgb), 0.12);
  color: var(--tk-cy); border-radius: 4px; width: 30px; cursor: pointer; display: grid; place-items: center;
}
.cmd-jump button:hover { background: rgba(var(--tk-cy-rgb), 0.22); }

/* ---------- شبكة سطح الطرفية ---------- */
.hud-deck {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px;
  margin: 0 0 22px;
}
.tk-panel {
  background: linear-gradient(180deg, rgba(16, 24, 42, 0.65), rgba(10, 15, 26, 0.9)), var(--tk-panel);
  border: 1px solid var(--tk-line); border-radius: 7px; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.tk-panel::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--tk-cy-rgb), 0.4), transparent);
  opacity: 0.6; pointer-events: none;
}
.tk-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 11px; border-bottom: 1px solid var(--tk-line);
  background: rgba(13, 20, 36, 0.6); flex: none;
}
.tk-hd > span:first-child {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--tk-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--tk-ink2); text-transform: uppercase; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tk-hd > span:first-child::before { content: "◆"; color: var(--tk-cy); font-size: 12px; flex: none; text-shadow: 0 0 8px rgba(var(--tk-cy-rgb), 0.8); }
.tk-hd-x {
  font-family: var(--tk-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--tk-dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.p-br-led  { grid-column: span 3; }
.p-br-line { grid-column: span 5; }
.p-scan    { grid-column: span 4; }
.p-rail    { grid-column: span 3; }
.p-wheel   { grid-column: span 6; }
.p-movers  { grid-column: span 3; }
.p-etape   { grid-column: span 7; }
.p-log     { grid-column: span 5; }

/* ---------- لوحة عداد الاتساع LED ---------- */
.br-led-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.br-led-main { display: flex; align-items: baseline; gap: 8px; direction: ltr; justify-content: flex-end; }
.led-num {
  font-family: var(--tk-mono); font-size: 46px; font-weight: 700; line-height: 1;
  color: var(--tk-up); text-shadow: 0 0 18px rgba(var(--tk-up-rgb), 0.55), 0 0 46px rgba(var(--tk-up-rgb), 0.22);
  letter-spacing: 0.01em;
}
.led-num.is-mid { color: var(--tk-am); text-shadow: 0 0 18px rgba(var(--tk-am-rgb), 0.5); }
.led-num.is-weak { color: var(--tk-dn); text-shadow: 0 0 18px rgba(var(--tk-dn-rgb), 0.5); }
.led-den { font-family: var(--tk-mono); font-size: 15px; font-weight: 600; color: var(--tk-dim); }
.led-cap { margin: 0; font-size: 12px; font-weight: 600; color: var(--tk-dim); }
.br-split {
  display: flex; height: 9px; border-radius: 3px; overflow: hidden;
  border: 1px solid var(--tk-line); background: rgba(var(--tk-dn-rgb), 0.16);
}
.br-split-up { display: block; height: 100%; background: linear-gradient(90deg, rgba(var(--tk-up-rgb), 0.75), var(--tk-up)); box-shadow: 0 0 10px rgba(var(--tk-up-rgb), 0.5); transition: width 0.5s ease; }
.br-split-dn { flex: 1; }
.br-led-rows { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--tk-ink2); }
.br-led-rows > div { display: flex; align-items: center; gap: 8px; }
.br-led-rows b { margin-inline-start: auto; font-family: var(--tk-mono); font-size: 12.5px; }
.br-led-rows b.is-up { color: var(--tk-up); }
.br-led-rows b.is-dn { color: var(--tk-dn); }
.tk-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; flex: none; }
.tk-dot-up { background: var(--tk-up); box-shadow: 0 0 7px rgba(var(--tk-up-rgb), 0.8); }
.tk-dot-dn { background: var(--tk-dn); box-shadow: 0 0 7px rgba(var(--tk-dn-rgb), 0.8); }
.tk-dot-cy { background: var(--tk-cy); box-shadow: 0 0 7px rgba(var(--tk-cy-rgb), 0.8); }
.tk-brmini { width: 100%; height: 46px; display: block; margin-top: auto; }

/* ---------- لوحة خط الاتساع ---------- */
.br-line-body { position: relative; flex: 1; min-height: 208px; padding: 6px 4px 2px; }
#brline-canvas { position: absolute; inset: 6px 4px 2px; width: calc(100% - 8px); height: calc(100% - 8px); display: block; cursor: crosshair; }
.tk-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: rgba(7, 11, 19, 0.96); border: 1px solid var(--tk-line2); border-radius: 5px;
  color: var(--tk-ink); padding: 7px 11px; font-family: var(--tk-mono); font-size: 12px; font-weight: 600; line-height: 1.9;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); white-space: nowrap;
}
.tk-tip b { color: var(--tk-cy); }
.tk-tip .t-up { color: var(--tk-up); }
.tk-tip .t-dn { color: var(--tk-dn); }
.tk-tip span { display: block; color: var(--tk-ink2); }

/* ---------- لوحة خط الأنابيب ---------- */
.scan-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.scan-bar-wrap {
  height: 12px; border: 1px solid var(--tk-line); border-radius: 3px; overflow: hidden;
  background:
    repeating-linear-gradient(-45deg, rgba(90, 130, 210, 0.07) 0 6px, transparent 6px 12px),
    var(--tk-bg2);
}
.scan-bar {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(var(--tk-cy-rgb), 0.65), var(--tk-cy));
  box-shadow: 0 0 14px rgba(var(--tk-cy-rgb), 0.55);
  transition: width 0.35s ease; position: relative;
}
.scan-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: scanSweep 1.6s linear infinite;
}
@keyframes scanSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.scan-counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.scan-c {
  background: var(--tk-bg2); border: 1px solid var(--tk-line); border-radius: 5px;
  padding: 7px 6px 6px; text-align: center; min-width: 0;
}
.scan-c b { display: block; font-family: var(--tk-mono); font-size: 17px; font-weight: 700; color: var(--tk-cy); line-height: 1.15; text-shadow: 0 0 10px rgba(var(--tk-cy-rgb), 0.35); }
.scan-c span { font-size: 12px; font-weight: 700; color: var(--tk-dim); letter-spacing: 0.04em; }
.scan-rows { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--tk-line); border-radius: 5px; overflow: hidden; }
.scan-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--tk-ink2);
  background: var(--tk-bg2);
}
.scan-row + .scan-row { border-top: 1px solid var(--tk-line); }
.scan-row b { font-family: var(--tk-mono); color: var(--tk-ink); font-size: 12px; }
.scan-actions { display: flex; gap: 8px; margin-top: auto; }
.scan-actions .btn { flex: 1; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  background: var(--tk-dim); flex: none;
}
.live-dot.is-live { background: var(--tk-up); box-shadow: 0 0 8px rgba(var(--tk-up-rgb), 0.9); animation: cmdPulse 1.2s ease-in-out infinite; }
.live-dot.is-done { background: var(--tk-cy); box-shadow: 0 0 8px rgba(var(--tk-cy-rgb), 0.8); }

/* ---------- سكة الإشارات ---------- */
.rail-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rail-mini { border: 1px solid var(--tk-line); border-radius: 5px; background: var(--tk-bg2); padding: 7px 9px 6px; min-width: 0; }
.rail-mini-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rail-mini-h span { font-size: 12px; font-weight: 700; color: var(--tk-dim); letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-mini-h b { font-family: var(--tk-mono); font-size: 12px; font-weight: 700; color: var(--tk-ink); flex: none; }
.rail-mini-h b.is-up { color: var(--tk-up); }
.rail-mini-h b.is-dn { color: var(--tk-dn); }
.rail-mini canvas { width: 100%; height: 52px; display: block; }
.rail-hot-bar { height: 8px; border: 1px solid var(--tk-line); border-radius: 3px; overflow: hidden; background: var(--tk-bg); margin-top: 4px; }
.rail-hot-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, rgba(var(--tk-am-rgb), 0.6), var(--tk-am)); box-shadow: 0 0 10px rgba(var(--tk-am-rgb), 0.5); transition: width 0.4s ease; }
.rail-hot-cap { margin: 5px 0 0; font-size: 12px; font-weight: 600; color: var(--tk-dim); font-family: var(--tk-mono); }

/* ---------- حلقة السوق ---------- */
.wheel-body { position: relative; flex: 1; min-height: 400px; overflow: hidden; }
#wheel-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.wheel-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.wheel-center b {
  font-family: var(--tk-mono); font-size: 42px; font-weight: 700; color: var(--tk-up); line-height: 1;
  text-shadow: 0 0 22px rgba(var(--tk-up-rgb), 0.55), 0 0 60px rgba(var(--tk-up-rgb), 0.2);
}
.wheel-center span { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--tk-ink2); letter-spacing: 0.1em; }
.wheel-center small { margin-top: 2px; font-family: var(--tk-mono); font-size: 12px; font-weight: 600; color: var(--tk-dim); }
.wheel-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: rgba(7, 11, 19, 0.96); border: 1px solid var(--tk-line2); border-radius: 5px;
  color: var(--tk-ink); padding: 7px 11px; font-size: 12px; font-weight: 600; line-height: 1.9;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65); white-space: nowrap;
}
.wheel-tip b { font-family: var(--tk-mono); color: var(--tk-cy); }
.wheel-tip .w-up { color: var(--tk-up); font-family: var(--tk-mono); }
.wheel-tip .w-dn { color: var(--tk-dn); font-family: var(--tk-mono); }
.wheel-tip span { display: block; color: var(--tk-ink2); font-weight: 500; }
.wheel-zoom {
  position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 5; pointer-events: none;
  background: rgba(7, 11, 19, 0.94); border: 1px solid var(--tk-line2); border-radius: 6px;
  padding: 8px 12px 4px;
}
.wheel-zoom canvas { display: block; }

/* ---------- سكة المتحركين ---------- */
.mv-tabs { display: flex; border-bottom: 1px solid var(--tk-line); flex: none; }
.mv-tab {
  appearance: none; flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 8px 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--tk-dim);
  border-inline-end: 1px solid var(--tk-line); border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.mv-tab:last-child { border-inline-end: none; }
.mv-tab b { font-family: var(--tk-mono); font-weight: 700; color: var(--tk-ink2); }
.mv-tab:hover { color: var(--tk-ink); background: rgba(90, 130, 210, 0.06); }
.mv-tab.is-active { color: var(--tk-cy); border-bottom-color: var(--tk-cy); background: rgba(var(--tk-cy-rgb), 0.06); }
.mv-tab.is-active b { color: var(--tk-cy); }
.mv-list { flex: 1; overflow-y: auto; min-height: 220px; max-height: 404px; }
.mv-empty { margin: 0; padding: 26px 14px; text-align: center; color: var(--tk-dim); font-size: 12px; font-weight: 600; }
.mv-row {
  display: grid; grid-template-columns: 20px 52px 1fr auto; align-items: center; gap: 7px;
  padding: 6px 10px; border-bottom: 1px solid rgba(26, 35, 52, 0.7); text-decoration: none;
  font-size: 12px; animation: mvIn 0.5s ease-out;
}
@keyframes mvIn { from { background: rgba(var(--tk-cy-rgb), 0.12); } to { background: transparent; } }
.mv-row:hover { background: var(--tk-panel2); }
.mv-rank { font-family: var(--tk-mono); font-size: 12px; color: var(--tk-dim); font-weight: 700; }
.mv-sym { font-family: var(--tk-mono); font-size: 12px; font-weight: 700; color: var(--tk-cy); direction: ltr; text-align: start; }
.mv-name { color: var(--tk-ink2); font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-val { font-family: var(--tk-mono); font-size: 12px; font-weight: 700; direction: ltr; }
.mv-val.is-up { color: var(--tk-up); }
.mv-val.is-dn { color: var(--tk-dn); }
.mv-val.is-sc { color: var(--tk-am); }

/* ---------- شريط التنفيذ ---------- */
.etape-wrap { max-height: 322px; overflow: auto; border-top: none; }
.etape { width: 100%; border-collapse: collapse; font-size: 12px; }
.etape thead th {
  position: sticky; top: 0; z-index: 2; background: var(--tk-bg2);
  color: var(--tk-dim); font-family: var(--tk-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; text-align: start;
  padding: 7px 10px; border-bottom: 1px solid var(--tk-line); white-space: nowrap;
}
.etape tbody td {
  padding: 5px 10px; border-bottom: 1px solid rgba(26, 35, 52, 0.55);
  color: var(--tk-ink2); white-space: nowrap; font-weight: 600;
}
.etape tbody tr { animation: etIn 1.4s ease-out; }
@keyframes etIn { 0% { background: rgba(var(--tk-cy-rgb), 0.16); } 100% { background: transparent; } }
.etape tbody tr:hover td { background: var(--tk-panel2); }
.etape td.num, .etape th.num { text-align: end; font-family: var(--tk-mono); }
.etape .et-time { font-family: var(--tk-mono); font-size: 12px; color: var(--tk-dim); direction: ltr; text-align: start; }
.etape .et-sym { font-family: var(--tk-mono); font-weight: 700; color: var(--tk-cy); direction: ltr; text-align: start; }
.etape .et-sym a { color: inherit; text-decoration: none; }
.etape .et-sym a:hover { color: var(--tk-ink); text-decoration: underline; }
.etape .et-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.etape .et-px { color: var(--tk-ink); }
.etape .et-chg.is-up { color: var(--tk-up); }
.etape .et-chg.is-dn { color: var(--tk-dn); }
.etape .et-sc { color: var(--tk-am); }
.etape .et-ab { font-family: var(--tk-mono); font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 3px; border: 1px solid; }
.etape .et-ab.is-above { color: var(--tk-up); border-color: rgba(var(--tk-up-rgb), 0.4); background: rgba(var(--tk-up-rgb), 0.08); }
.etape .et-ab.is-below { color: var(--tk-dn); border-color: rgba(var(--tk-dn-rgb), 0.4); background: rgba(var(--tk-dn-rgb), 0.08); }
.etape .et-side { font-size: 12px; font-weight: 700; }
.etape .et-side.is-bull { color: var(--tk-up); }
.etape .et-side.is-bear { color: var(--tk-dn); }
.etape .et-side.is-both { color: var(--tk-am); }
.etape .et-side.is-none { color: var(--tk-dim); }
.etape tr.et-empty td { text-align: center; color: var(--tk-dim); padding: 26px 10px; font-weight: 600; }
.et-freeze {
  appearance: none; border: 1px solid var(--tk-line); background: transparent; color: var(--tk-dim);
  font: inherit; font-family: var(--tk-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 3px; cursor: pointer;
}
.et-freeze:hover { color: var(--tk-ink); border-color: var(--tk-line2); }
.et-freeze[aria-pressed="true"] { color: var(--tk-am); border-color: rgba(var(--tk-am-rgb), 0.5); background: rgba(var(--tk-am-rgb), 0.1); }

/* ---------- سجل الإشارات ---------- */
.hud-log {
  flex: 1; overflow-y: auto; min-height: 240px; max-height: 322px;
  padding: 8px 10px; font-family: var(--tk-mono); font-size: 12px; line-height: 2;
}
.hud-ln { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hud-ln .hl-t { color: var(--tk-dim); flex: none; font-size: 12px; }
.hud-ln .hl-tag {
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  padding: 1px 6px; border-radius: 3px; border: 1px solid;
}
.hud-ln .hl-tag.t-fetch { color: var(--tk-bl); border-color: rgba(var(--tk-bl-rgb), 0.4); background: rgba(var(--tk-bl-rgb), 0.08); }
.hud-ln .hl-tag.t-anlz { color: var(--tk-vi); border-color: rgba(180, 140, 255, 0.35); background: rgba(180, 140, 255, 0.07); }
.hud-ln .hl-tag.t-opp { color: var(--tk-up); border-color: rgba(var(--tk-up-rgb), 0.45); background: rgba(var(--tk-up-rgb), 0.09); }
.hud-ln .hl-tag.t-sys { color: var(--tk-cy); border-color: rgba(var(--tk-cy-rgb), 0.4); background: rgba(var(--tk-cy-rgb), 0.07); }
.hud-ln .hl-tx { color: var(--tk-ink2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-ln .hl-sc { margin-inline-start: auto; color: var(--tk-am); font-weight: 700; flex: none; }
.hud-ln.is-opp .hl-tx { color: var(--tk-ink); }

/* ---------- إعادة تلوين أقسام ما تحت الشبكة بروح الترمنال ---------- */
body.page-home ::-webkit-scrollbar { width: 9px; height: 9px; }
body.page-home ::-webkit-scrollbar-track { background: var(--tk-bg2); }
body.page-home ::-webkit-scrollbar-thumb { background: var(--tk-line2); border-radius: 4px; border: 2px solid var(--tk-bg2); }
body.page-home ::-webkit-scrollbar-thumb:hover { background: var(--tk-dim); }

body.page-home .lab-board-sec h2, body.page-home .radar-sec h2, body.page-home .watch-sec h2 {
  color: var(--tk-ink); font-weight: 800; letter-spacing: 0.01em;
}
body.page-home .watch-head p { color: var(--tk-dim); }
body.page-home .chip-btn {
  background: var(--tk-bg2); border: 1px solid var(--tk-line); color: var(--tk-ink2);
  border-radius: 4px; font-weight: 700;
}
body.page-home .chip-btn:hover { border-color: var(--tk-line2); color: var(--tk-ink); }
body.page-home .chip-btn.is-active {
  background: rgba(var(--tk-cy-rgb), 0.14); border-color: rgba(var(--tk-cy-rgb), 0.5); color: var(--tk-cy);
}
body.page-home .search-box input {
  background: var(--tk-bg2); border: 1px solid var(--tk-line); color: var(--tk-ink); border-radius: 4px;
}
body.page-home .search-box input:focus { border-color: rgba(var(--tk-cy-rgb), 0.55); box-shadow: 0 0 0 2px rgba(var(--tk-cy-rgb), 0.14); }
body.page-home .search-box .search-ico { color: var(--tk-dim); }
body.page-home .match-count { color: var(--tk-dim); font-family: var(--tk-mono); font-size: 12px; }
body.page-home .cache-chip {
  background: rgba(var(--tk-up-rgb), 0.08); border: 1px solid rgba(var(--tk-up-rgb), 0.4);
  color: var(--tk-up); border-radius: 4px; font-family: var(--tk-mono); font-size: 12px; font-weight: 700;
}
body.page-home .cache-chip.is-cached {
  background: rgba(var(--tk-am-rgb), 0.08); border-color: rgba(var(--tk-am-rgb), 0.4); color: var(--tk-am);
}
body.page-home .btn { border-radius: 5px; font-weight: 700; }
body.page-home .btn-accent {
  background: linear-gradient(180deg, rgba(var(--tk-cy-rgb), 0.2), rgba(var(--tk-cy-rgb), 0.1));
  border: 1px solid rgba(var(--tk-cy-rgb), 0.55); color: var(--tk-cy); box-shadow: none;
}
body.page-home .btn-accent:hover { background: rgba(var(--tk-cy-rgb), 0.26); box-shadow: 0 0 16px rgba(var(--tk-cy-rgb), 0.25); }
body.page-home .btn:not(.btn-accent) { background: var(--tk-bg2); border: 1px solid var(--tk-line); color: var(--tk-ink2); }
body.page-home .btn:not(.btn-accent):hover { border-color: var(--tk-line2); color: var(--tk-ink); }

body.page-home .table-wrap { background: var(--tk-panel); border: 1px solid var(--tk-line); border-radius: 7px; box-shadow: none; }
body.page-home .data-table thead th {
  background: var(--tk-bg2); color: var(--tk-dim); font-family: var(--tk-mono);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--tk-line);
}
body.page-home .data-table tbody td { border-bottom: 1px solid rgba(26, 35, 52, 0.6); color: var(--tk-ink2); }
body.page-home .data-table tbody tr:hover td { background: var(--tk-panel2); }
body.page-home .data-table .px, body.page-home .data-table .fl-scorenum { font-family: var(--tk-mono); }
body.page-home .sym-link { color: var(--tk-cy); }
body.page-home .fl-scorenum.hot { color: var(--tk-up); }
body.page-home .fl-scorenum.mid { color: var(--tk-cy); }
body.page-home .fl-scorenum.low { color: var(--tk-dim); }
body.page-home .fl-meter { background: var(--tk-bg2); border: 1px solid var(--tk-line); }
body.page-home .fl-meter i.hot { background: var(--tk-up); }
body.page-home .fl-meter i.mid { background: var(--tk-cy); }
body.page-home .fl-meter i.low { background: var(--tk-dim); }
body.page-home .chg-up { color: var(--tk-up); }
body.page-home .chg-dn { color: var(--tk-dn); }
body.page-home .fl-side.b-bull { color: var(--tk-up); border-color: rgba(var(--tk-up-rgb), 0.4); background: rgba(var(--tk-up-rgb), 0.07); }
body.page-home .fl-side.b-bear { color: var(--tk-dn); border-color: rgba(var(--tk-dn-rgb), 0.4); background: rgba(var(--tk-dn-rgb), 0.07); }
body.page-home .stat-pill {
  background: var(--tk-bg2); border: 1px solid var(--tk-line); color: var(--tk-ink2); border-radius: 4px;
}
body.page-home .stat-pill.is-active { border-color: rgba(var(--tk-cy-rgb), 0.5); color: var(--tk-cy); background: rgba(var(--tk-cy-rgb), 0.08); }
body.page-home .stat-pill .st-num { font-family: var(--tk-mono); color: var(--tk-ink); }
body.page-home .placeholder-row td { color: var(--tk-dim); }
body.page-home .table-foot { color: var(--tk-dim); font-size: 12px; }

body.page-home .radar-card { background: var(--tk-panel); border: 1px solid var(--tk-line); border-radius: 7px; box-shadow: none; }
body.page-home .radar-tip { background: rgba(7, 11, 19, 0.96); border: 1px solid var(--tk-line2); border-radius: 5px; color: var(--tk-ink); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); }
body.page-home .radar-tip b { color: var(--tk-cy); }
body.page-home .rl-item { color: var(--tk-dim); font-size: 12px; }
body.page-home .rl-hot { background: var(--tk-up); }
body.page-home .rl-mid { background: var(--tk-cy); }
body.page-home .rl-low { background: var(--tk-dim); }

body.page-home .watch { background: var(--tk-panel); border: 1px solid var(--tk-line); border-radius: 7px; box-shadow: none; }
body.page-home .watch-row { border-bottom: 1px solid rgba(26, 35, 52, 0.6); color: var(--tk-ink2); }
body.page-home .watch-row:hover { background: var(--tk-panel2); }
body.page-home .watch-head-row { color: var(--tk-dim); font-family: var(--tk-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
body.page-home .watch-sym b { color: var(--tk-cy); font-family: var(--tk-mono); }
body.page-home .watch-sym span { color: var(--tk-ink2); }
body.page-home .watch-price { color: var(--tk-ink); font-family: var(--tk-mono); }
body.page-home .chg-badge.is-up { background: rgba(var(--tk-up-rgb), 0.1); color: var(--tk-up); }
body.page-home .chg-badge.is-dn { background: rgba(var(--tk-dn-rgb), 0.1); color: var(--tk-dn); }
body.page-home .chg-badge.is-flat { background: var(--tk-bg2); color: var(--tk-dim); }
body.page-home .watch-breadth { font-family: var(--tk-mono); font-size: 12px; }
body.page-home .watch-breadth .is-up { color: var(--tk-up); }
body.page-home .watch-breadth .is-dn { color: var(--tk-dn); }
body.page-home .wf-btn { background: var(--tk-bg2); border: 1px solid var(--tk-line); color: var(--tk-ink2); border-radius: 4px; }
body.page-home .wf-btn.is-active { border-color: rgba(var(--tk-cy-rgb), 0.5); color: var(--tk-cy); background: rgba(var(--tk-cy-rgb), 0.08); }
body.page-home .watch-note { color: var(--tk-dim); }

body.page-home .tool-card { background: var(--tk-panel); border: 1px solid var(--tk-line); border-radius: 7px; box-shadow: none; }
body.page-home .tool-card:hover { border-color: var(--tk-line2); background: var(--tk-panel2); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4); }
body.page-home .tool-card h2 { color: var(--tk-ink); }
body.page-home .tool-card p { color: var(--tk-dim); }
body.page-home .tool-ico { border-radius: 5px; }
body.page-home .ico-accent { color: var(--tk-cy); background: rgba(var(--tk-cy-rgb), 0.1); border: 1px solid rgba(var(--tk-cy-rgb), 0.3); }
body.page-home .ico-violet { color: var(--tk-vi); background: rgba(180, 140, 255, 0.09); border: 1px solid rgba(180, 140, 255, 0.3); }
body.page-home .ico-green { color: var(--tk-up); background: rgba(var(--tk-up-rgb), 0.09); border: 1px solid rgba(var(--tk-up-rgb), 0.3); }
body.page-home .ico-pink { color: var(--tk-dn); background: rgba(var(--tk-dn-rgb), 0.09); border: 1px solid rgba(var(--tk-dn-rgb), 0.3); }
body.page-home .tool-link { color: var(--tk-cy); }
body.page-home .tag-new { background: rgba(var(--tk-up-rgb), 0.12); color: var(--tk-up); border: 1px solid rgba(var(--tk-up-rgb), 0.4); }

body.page-home .alerts-cta { background: var(--tk-panel); border: 1px solid var(--tk-line); border-radius: 7px; box-shadow: none; }
body.page-home .alerts-cta h2 { color: var(--tk-ink); }
body.page-home .alerts-cta p { color: var(--tk-dim); }
body.page-home .alerts-hint { color: var(--tk-dim); }

body.page-home .site-foot { border-top: 1px solid var(--tk-line); background: rgba(6, 9, 16, 0.9); }
body.page-home .site-foot p { color: var(--tk-dim); }

/* المحطة السينمائية بإضاءة الترمنال */
body.page-home .ops-boot { background: rgba(var(--st-boot-rgb), 0.97); }
body.page-home .ops-boot-brand { color: var(--tk-cy); font-family: var(--tk-mono); }
body.page-home .ops-frame { background: linear-gradient(180deg, rgba(16, 24, 42, 0.8), rgba(10, 15, 26, 0.96)), var(--tk-panel); border-color: var(--tk-line2); }
body.page-home .ops-title { color: var(--tk-ink2); font-family: var(--tk-mono); letter-spacing: 0.14em; }
body.page-home .ops-clock { color: var(--tk-cy); font-family: var(--tk-mono); }
body.page-home .ops-counter b { font-family: var(--tk-mono); color: var(--tk-cy); }
body.page-home .ops-phase b { color: var(--tk-ink); }
body.page-home .ops-phase small { color: var(--tk-dim); }
body.page-home .ops-summary { background: linear-gradient(180deg, rgba(16, 24, 42, 0.9), rgba(10, 15, 26, 0.97)); border: 1px solid var(--tk-line2); color: var(--tk-ink); }
body.page-home .ops-summary b { color: var(--tk-ink); }

/* ---------- استجابة الطرفية ---------- */
@media (max-width: 1500px) {
  .p-br-led  { grid-column: span 4; }
  .p-br-line { grid-column: span 8; }
  .p-scan    { grid-column: span 12; }
  .scan-body { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 14px; }
  .scan-bar-wrap { flex: 1 1 220px; }
  .scan-counters { flex: 1 1 300px; }
  .scan-rows { flex: 1 1 220px; }
  .scan-actions { flex: 0 0 auto; margin-top: 0; }
}
@media (max-width: 1360px) {
  .p-rail   { grid-column: span 4; }
  .p-wheel  { grid-column: span 8; }
  .p-movers { grid-column: span 4; }
  .p-etape  { grid-column: span 7; }
  .p-log    { grid-column: span 5; }
  .mv-list { max-height: 372px; }
}
@media (max-width: 1120px) {
  .p-br-led, .p-br-line, .p-rail, .p-wheel, .p-movers, .p-etape, .p-log { grid-column: span 12; }
  .p-br-line { grid-column: span 12; }
  .rail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wheel-body { min-height: 380px; }
  .mv-list { max-height: 320px; }
  .cmd-id { flex-basis: 100%; border-inline-start: none; border-bottom: 1px solid var(--tk-line); padding-bottom: 8px; margin-bottom: 2px; }
}
@media (max-width: 640px) {
  .rail-body { grid-template-columns: 1fr; }
  .wheel-body { min-height: 320px; }
  .led-num { font-size: 38px; }
  .cmd-clock { font-size: 17px; }
  .cmd-cell { padding: 8px 12px; }
  .cmd-jump input { width: 118px; }
  .etape-wrap { max-height: 260px; }
  .hud-log { max-height: 240px; min-height: 180px; }
  .mv-list { max-height: 280px; }
  .scan-counters { grid-template-columns: repeat(2, 1fr); }
  .br-led-rows b { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #crt { display: none; }
  .cmd-diamond, .scan-bar::after, .live-dot.is-live { animation: none; }
  .etape tbody tr, .mv-row { animation: none; }
}


/* ===== نموذج ب — الأجنحة والتضمين ولوحة القيادة (v34) ===== */

/* وضع التضمين: صفحة مخدومة بembed=1 داخل إطار جناح — تُخفى كرومتها ويبقى المحتوى */
.embed .site-head, .embed .site-foot { display: none !important; }
.embed main { padding-top: 10px; }

/* أجنحة المنصة: رأس الجناح وشريط التبويبات ومنطقة العرض */
.wing-head { padding: 30px 0 6px; }
.wing-head h1 { margin: 0 0 10px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.wing-head .sub { margin: 0 0 6px; }
.wing-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 14px 0 0; padding: 8px 0; overflow-x: auto; scrollbar-width: none;
}
.wing-tabs::-webkit-scrollbar { display: none; }
.wing-tab {
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--ink2); font: inherit; font-weight: 700; font-size: 0.86rem;
  padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.wing-tab:hover { color: var(--ink); border-color: var(--line2); background: var(--panel); }
.wing-tab:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.wing-tab.is-active {
  color: var(--ink); border-color: rgba(10, 132, 255, 0.55);
  background: rgba(10, 132, 255, 0.13);
}
.wing-stage { position: relative; margin: 14px 0 26px; }
.wing-frame {
  width: 100%; height: calc(100vh - 330px); min-height: 560px;
  border: 1px solid var(--line); border-radius: var(--rad-sm);
  background: var(--bg1); display: block;
}
.wing-frame[hidden] { display: none !important; }
.wing-loading { color: var(--dim); font-size: 0.85rem; padding: 18px 4px; }
.wing-noscript { color: var(--ink2); font-size: 0.9rem; line-height: 2; }
.wing-noscript a { color: var(--acc2); }

/* لوحة قيادة الرئيسية: شبكة البطاقات الموجزة */
.dash-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 26px 0 8px;
}
.dash-card {
  border: 1px solid var(--line); border-radius: var(--rad-sm);
  background: var(--panel); padding: 16px 18px 12px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-card-head h2 { margin: 0; font-size: 0.98rem; font-weight: 900; }
.dash-more {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--acc2); font-size: 0.76rem; font-weight: 800; white-space: nowrap;
}
.dash-more:hover { color: var(--ink); }
.dash-pulse { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dash-big { font-size: 2rem; font-weight: 900; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.dash-sub { font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-sub.is-up, .dash-row-val.is-up, .dash-tier-sub.is-up { color: var(--up); }
.dash-sub.is-dn, .dash-row-val.is-dn, .dash-tier-sub.is-dn { color: var(--dn); }
.dash-kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dash-kv li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: var(--ink2); font-size: 0.8rem;
  border-bottom: 1px dashed rgba(245, 245, 247, 0.08); padding-bottom: 5px;
}
.dash-kv li:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-kv b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-rows { display: grid; gap: 4px; min-height: 132px; align-content: start; }
.dash-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 10px; border-radius: 9px; color: var(--ink2); font-size: 0.82rem;
  border: 1px solid transparent; transition: background 0.15s ease, border-color 0.15s ease;
}
.dash-row:hover { background: var(--panel2); border-color: var(--line); color: var(--ink); }
.dash-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 700; }
.dash-row-code { color: var(--dim); font-size: 0.75rem; direction: ltr; }
.dash-row-val { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.dash-empty { color: var(--dim); font-size: 0.82rem; padding: 10px 4px; }
.dash-note { margin: auto 0 0; color: var(--dim); font-size: 0.75rem; border-top: 1px dashed rgba(245, 245, 247, 0.08); padding-top: 8px; }
.dash-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dash-tier {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px;
  display: grid; gap: 4px; justify-items: center; text-align: center; background: rgba(245, 245, 247, 0.03);
}
.dash-tier-name { color: var(--ink2); font-size: 0.75rem; font-weight: 800; }
.dash-tier-val { font-size: 1.06rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.dash-tier-sub { color: var(--dim); font-size: 0.75rem; }
.dash-sec { display: grid; gap: 8px; }
.dash-sec-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.dash-sec-row.is-up { border-color: rgba(48, 209, 88, 0.35); background: rgba(48, 209, 88, 0.06); }
.dash-sec-row.is-dn { border-color: rgba(255, 69, 58, 0.35); background: rgba(255, 69, 58, 0.06); }
.dash-sec-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dash-sec-row.is-up .dash-sec-dot { background: var(--up); }
.dash-sec-row.is-dn .dash-sec-dot { background: var(--dn); }
.dash-sec-name { font-weight: 800; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-sec-count { color: var(--ink2); font-size: 0.75rem; white-space: nowrap; }
.dash-info { margin: 0; color: var(--ink2); font-size: 0.84rem; line-height: 1.9; flex: 1; }
.dash-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-links a {
  color: var(--acc2); font-size: 0.78rem; font-weight: 800;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-links a:hover { background: var(--panel2); color: var(--ink); }

@media (max-width: 1020px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-grid { grid-template-columns: 1fr; }
  .wing-frame { height: calc(100vh - 250px); min-height: 470px; }
  .wing-tab { padding: 8px 14px; font-size: 0.8rem; }
  .dash-big { font-size: 1.6rem; }
}

/* ============================================================
   عقل المحلل — أنماط دردشة المحلل ولوحة الحالة (صفحة /chat وتبويب الجناح)
   ============================================================ */
/* ---------- عقل المحلل — أنماط الصفحة (مستقلة عن نظام التصميم العام) ---------- */
.mind-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 940px) { .mind-grid { grid-template-columns: 1fr; } }

.chat-card, .mind-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
}
.chat-card-head, .mind-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--panel2);
}
.chat-card-head h2, .mind-card-head h2 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.chat-status { font-size: 0.75rem; color: var(--dim); }

.chat-msgs {
  height: 430px; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
@media (max-width: 940px) { .chat-msgs { height: 360px; } }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.msg-owner { align-self: flex-start; background: var(--acc-deep); color: #fff; border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-end; background: var(--panel2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-meta { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--dim); direction: ltr; text-align: left; }
.msg-ai .msg-meta { text-align: right; direction: rtl; }
.msg-lesson { display: block; margin-top: 8px; padding: 8px 10px; border-right: 2px solid var(--up); background: rgba(48, 209, 88, 0.08); border-radius: 8px; color: var(--up-soft); font-size: 0.8rem; white-space: normal; }
.msg-typing { align-self: flex-end; color: var(--dim); font-size: 0.8rem; padding: 6px 12px; }
.chat-empty { margin: auto; text-align: center; color: var(--dim); font-size: 0.85rem; line-height: 2; max-width: 380px; }

.chat-input-row { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: flex-end; background: var(--panel2); }
.chat-input-row textarea {
  flex: 1; min-height: 44px; max-height: 120px; resize: none;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); border-radius: var(--rad-sm);
  color: var(--ink); font-family: inherit; font-size: 0.9rem; padding: 10px 12px; line-height: 1.7;
}
.chat-input-row textarea:focus { outline: none; border-color: var(--acc); }
.chat-send {
  border: none; cursor: pointer; background: var(--acc); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 0.85rem;
  padding: 11px 18px; border-radius: var(--rad-sm); transition: background 0.15s ease;
}
.chat-send:hover { background: var(--acc2); color: #05070d; }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

.chat-key-row { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; background: var(--panel2); }
.chat-key-row label { font-size: 0.75rem; color: var(--ink2); }
.chat-key-row input {
  flex: 1; min-width: 160px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2);
  border-radius: 8px; color: var(--ink); font-family: inherit; font-size: 0.8rem; padding: 8px 10px;
}
.chat-key-row input:focus { outline: none; border-color: var(--acc); }
.chat-key-state { font-size: 0.75rem; color: var(--dim); }
.chat-key-state.ok { color: var(--up-soft); }
.chat-key-state.bad { color: var(--dn-soft); }

/* محدد مزود رد الدردشة: تلقائي / GLM / راوتر */
.chat-head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.chat-pref { display: inline-flex; gap: 3px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.chat-pref-btn {
  appearance: none; border: 0; background: transparent; color: var(--dim);
  font-family: inherit; font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; transition: color 0.15s, background 0.15s;
}
.chat-pref-btn:hover { color: var(--ink); }
.chat-pref-btn:focus-visible { outline: 1px solid var(--acc); outline-offset: 1px; }
.chat-pref-btn.on { background: var(--acc); color: #04121a; font-weight: 800; }
@media (max-width: 640px) {
  .chat-head-tools { justify-content: flex-start; }
  .chat-pref-btn { padding: 4px 8px; }
}

.mind-stack { display: flex; flex-direction: column; gap: 14px; }
.mind-card-body { padding: 14px 16px; font-size: 0.85rem; }
.playbook-list { margin: 0; padding: 0; list-style: none; counter-reset: pb; }
.playbook-list li { counter-increment: pb; position: relative; padding: 8px 30px 8px 4px; border-bottom: 1px dashed var(--line); line-height: 1.8; color: var(--ink2); }
.playbook-list li:last-child { border-bottom: none; }
.playbook-list li::before {
  content: counter(pb); position: absolute; right: 0; top: 9px;
  width: 20px; height: 20px; display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700; color: var(--acc2);
  border: 1px solid var(--line2); border-radius: 6px;
}
.mind-empty { color: var(--dim); font-size: 0.8rem; line-height: 2; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-cell { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.stat-cell b { display: block; font-size: 1.05rem; color: var(--ink); direction: ltr; }
.stat-cell span { font-size: 0.75rem; color: var(--dim); }
.stat-cell b.up { color: var(--up-soft); }
.stat-cell b.dn { color: var(--dn-soft); }
.mind-list { margin: 0; padding: 0; list-style: none; }
.mind-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 0.8rem; color: var(--ink2); line-height: 1.7; }
.mind-list li:last-child { border-bottom: none; }
.mind-list b { color: var(--ink); direction: ltr; unicode-bidi: embed; }
.chip-res { display: inline-block; font-size: 0.75rem; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); margin-inline-start: 6px; }
.chip-res.stop, .chip-res.loss, .chip-res.flip { color: var(--dn-soft); border-color: rgba(255, 69, 58, 0.4); }
.chip-res.ok1 { color: var(--up-soft); border-color: rgba(48, 209, 88, 0.4); }
.chip-res.ok0 { color: var(--dn-soft); border-color: rgba(255, 69, 58, 0.4); }
.chip-res.pend { color: var(--warn); }
.mind-foot { padding: 8px 16px 12px; font-size: 0.75rem; color: var(--dim); border-top: 1px dashed var(--line); }


/* ---------- الوكيل النشط: شارة بحث الإنترنت وزر دفتر التعلم ---------- */
.msg-web { display: block; margin-top: 8px; padding: 8px 10px; border-right: 2px solid var(--acc2); background: rgba(100, 210, 255, 0.08); border-radius: 8px; color: var(--acc2); font-size: 0.8rem; white-space: normal; overflow-wrap: anywhere; }
.chat-journal-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--dim); font-size: 0.78rem; font-weight: 700; text-decoration: none; transition: color 0.15s ease, border-color 0.15s ease; }
.chat-journal-btn:hover { color: var(--ink); border-color: var(--acc2); }
.chat-journal-btn:focus-visible { outline: 1px solid var(--acc2); outline-offset: 1px; }


/* ---------- الإيجنت المستقل: واجهة النشاط الحي ---------- */
.agent-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 18px; }
.ag-provider { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line2); color: var(--acc2); font-size: 0.75rem; font-weight: 700; }
.ag-goal-tx { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink); line-height: 1.9; }
.ag-goal-tx b { color: var(--acc2); }
.ag-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ag-step { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.28); font-size: 0.78rem; color: var(--ink2); }
.ag-step b { color: var(--ink); font-size: 0.8rem; }
.ag-step-dot { font-size: 0.75rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.ag-step.ok .ag-step-dot { color: var(--up-soft); border: 1px solid rgba(48, 209, 88, 0.4); }
.ag-step.no .ag-step-dot { color: var(--dn-soft); border: 1px solid rgba(255, 69, 58, 0.4); }
.ag-step-brief { color: var(--dim); font-size: 0.75rem; }
.ag-step-ms { color: var(--dim); font-size: 0.75rem; direction: ltr; margin-inline-start: auto; }
.ag-steps.compact .ag-step { padding: 5px 8px; }
.ag-finding { margin-top: 10px; padding: 10px 12px; border-right: 2px solid var(--acc2); background: rgba(100, 210, 255, 0.07); border-radius: 8px; }
.ag-finding p { margin: 0 0 6px; font-size: 0.84rem; color: var(--ink); line-height: 1.9; }
.ag-finding p:last-child { margin-bottom: 0; }
.ag-run-row { display: flex; gap: 8px; margin-top: 14px; }
.ag-run-row input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); font: inherit; font-size: 0.84rem; }
.ag-run-row input:focus { outline: 1px solid var(--acc2); border-color: var(--acc2); }
.ag-meter { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.ag-meter-lab { min-width: 52px; font-size: 0.75rem; font-weight: 700; color: var(--ink2); }
.ag-meter-bar { flex: 1; height: 8px; border-radius: 5px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); overflow: hidden; }
.ag-meter-fill { display: block; height: 100%; border-radius: 5px; transition: width 0.4s ease; }
.ag-meter-fill.glm { background: linear-gradient(90deg, #2ee6a8, #1fb884); }
.ag-meter-fill.or { background: linear-gradient(90deg, #64d2ff, #3a9fd8); }
.ag-meter-fill.wq { background: linear-gradient(90deg, #ffd60a, #e6a700); }
.ag-meter b { min-width: 34px; text-align: center; color: var(--ink); font-size: 0.8rem; direction: ltr; }
.ag-runs { display: grid; gap: 10px; padding: 14px 16px; }
.ag-run { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: rgba(0, 0, 0, 0.25); }
.ag-run-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.ag-run-top b { color: var(--ink); font-size: 0.78rem; }
.ag-run-src { font-size: 0.75rem; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); }
.ag-run-model { font-size: 0.75rem; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(100, 210, 255, 0.35); color: var(--acc2); }
.ag-run-goal { margin: 0 0 7px; font-size: 0.8rem; color: var(--ink2); line-height: 1.8; }
.ag-run-finding { margin: 7px 0 0; font-size: 0.75rem; color: var(--dim); line-height: 1.8; }
@media (max-width: 900px) {
  .agent-grid { grid-template-columns: 1fr; }
  .ag-run-row { flex-direction: column; }
}

/* — لوحة الأرقام والمعادلات في صفحة الإيجنت (مدير الأدوات) — */
.ag-tune-verdict { margin-top: 10px; padding: 9px 11px; border-right: 2px solid var(--acc2); background: rgba(100, 210, 255, 0.07); border-radius: 8px; font-size: 0.76rem; color: var(--ink); line-height: 1.9; }
.ag-tune-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ag-tune-links .chat-send { padding: 7px 14px; font-size: 0.78rem; }

/* — واجهة مراقبة الإيجنت الحية (الإصدار 54) — */
.ag-live { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg, rgba(10, 15, 26, 0.72), rgba(5, 7, 13, 0.65)); }
.ag-live-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #8e8e93; box-shadow: 0 0 0 0 rgba(142, 142, 147, 0.5); }
.ag-live.on { border-color: rgba(48, 209, 88, 0.45); background: linear-gradient(180deg, rgba(10, 26, 16, 0.8), rgba(5, 13, 9, 0.7)); }
.ag-live.on .ag-live-dot { background: #30d158; animation: agpulse 1.6s ease-out infinite; }
.ag-live.off .ag-live-dot { background: #6b7280; }
.ag-live.err .ag-live-dot { background: #ff9f0a; }
@keyframes agpulse { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }
.ag-live-tx { font-size: 0.88rem; font-weight: 700; color: var(--ink); line-height: 1.8; flex: 1 1 320px; min-width: 0; }
.ag-live.on .ag-live-tx { color: #4cd97b; }
.ag-live-sub { flex-basis: 100%; font-size: 0.75rem; color: var(--dim); line-height: 1.8; }
.ag-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px 0; }
.ag-chip { padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--dim); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.ag-chip:hover { color: var(--ink); border-color: var(--acc2); }
.ag-chip.on { color: #04110a; background: linear-gradient(90deg, #2ee6a8, #1fb884); border-color: transparent; }
.ag-chip:focus-visible { outline: 1px solid var(--acc2); outline-offset: 1px; }
.ag-more { display: block; margin: 12px 16px 16px; padding: 9px 14px; width: calc(100% - 32px); border-radius: 10px; border: 1px dashed var(--line2); background: transparent; color: var(--dim); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.ag-more:hover { color: var(--ink); border-color: var(--acc2); }
.ag-more:focus-visible { outline: 1px solid var(--acc2); outline-offset: 1px; }
.ag-run-kind { font-size: 0.75rem; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(126, 231, 135, 0.4); color: var(--up-soft); }
.ag-run-ms { font-size: 0.75rem; color: var(--dim); direction: ltr; margin-inline-start: auto; }
.ag-lessons { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ag-lessons li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.28); font-size: 0.76rem; color: var(--ink2); line-height: 1.85; }
.ag-lessons li.ag-lesson-h { border-color: rgba(100, 210, 255, 0.35); color: var(--acc2); font-weight: 700; font-size: 0.75rem; background: rgba(100, 210, 255, 0.06); }
.ag-hist-sub { margin: 0; padding: 10px 16px 0; font-size: 0.75rem; color: var(--dim); line-height: 1.9; }
.ag-hist-wrap { padding: 12px 16px 16px; overflow-x: auto; }
.ag-hist { width: 100%; border-collapse: collapse; font-size: 0.75rem; min-width: 560px; }
.ag-hist th { text-align: right; padding: 7px 9px; border-bottom: 1px solid var(--line2); color: var(--dim); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.ag-hist td { padding: 9px 9px; border-bottom: 1px solid var(--line); color: var(--ink2); vertical-align: top; line-height: 1.8; }
.ag-hist tbody tr:last-child td { border-bottom: none; }
.ag-hist-t { color: var(--dim); white-space: nowrap; }
.ag-hist-d { min-width: 190px; }
.ag-hist-chg { margin: 0 0 5px; }
.ag-hist-chg:last-child { margin-bottom: 0; }
.ag-chg-k { color: var(--ink); font-weight: 700; }
.ag-old { color: var(--dim); direction: ltr; unicode-bidi: embed; }
.ag-arrow { color: var(--dim); }
.ag-new { color: var(--up-soft); direction: ltr; unicode-bidi: embed; }
.ag-hist-reset { color: #ffd60a; font-weight: 700; }
.ag-hist-note { color: var(--dim); font-size: 0.75rem; max-width: 260px; }
.ag-hist-real { direction: ltr; unicode-bidi: embed; }
.ag-verdict { font-weight: 700; white-space: nowrap; }
.ag-verdict.up { color: var(--up-soft); }
.ag-verdict.dn { color: var(--dn-soft); }
@media (max-width: 760px) {
  .ag-live { padding: 11px 13px; }
  .ag-live-tx { font-size: 0.82rem; }
  .ag-hist { min-width: 520px; }
}

/* ==== التنقل الموحد nav.js v1 — أدوات كل الموقع + الدردشة + الإيجنت بنبضة حية ==== */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink2); background: none; border: none; cursor: pointer;
  font: inherit; font-size: 0.82rem; font-weight: 800;
  padding: 7px 15px; border-radius: 9px; white-space: nowrap;
}
.nav-drop-btn svg { transition: transform 0.18s ease; opacity: 0.7; }
.nav-drop-btn:hover { color: var(--ink); background: rgba(245, 245, 247, 0.09); }
.nav-drop.is-open .nav-drop-btn { color: #fff; background: rgba(245, 245, 247, 0.12); }
.nav-drop.is-open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop-panel {
  display: none; position: fixed; top: -9999px; left: -9999px;
  width: min(560px, calc(100vw - 32px));
  grid-template-columns: repeat(4, 1fr); gap: 14px 18px;
  background: #0b0e15; border: 1px solid var(--line2); border-radius: 16px;
  padding: 16px 18px; z-index: 60;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.nav-drop.is-open .nav-drop-panel { display: grid; animation: navdrop 0.16s ease; }
@keyframes navdrop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.nav-drop-col h4 {
  margin: 0 0 8px; font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--dim); font-weight: 800; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.nav-drop-col a {
  display: block; color: var(--ink2); text-decoration: none;
  font-size: 0.8rem; font-weight: 700; padding: 6px 8px; border-radius: 8px;
}
.nav-drop-col a:hover { color: var(--ink); background: rgba(245, 245, 247, 0.08); }
.nav-drop-col a[aria-current="page"] { color: #fff; background: linear-gradient(130deg, var(--acc), var(--acc-deep)); }
.nav-agent { position: relative; }
.nav-live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(245, 245, 247, 0.28); margin-inline-start: 6px; vertical-align: middle;
}
.nav-agent.is-live .nav-live-dot {
  background: var(--up); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55);
  animation: navpulse 1.7s ease-out infinite;
}
@keyframes navpulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}
@media (max-width: 900px) {
  .nav-drop-panel { grid-template-columns: repeat(2, 1fr); width: min(420px, calc(100vw - 24px)); }
}
@media (max-width: 720px) {
  .nav-drop { width: 100%; }
  .nav-drop-btn { width: 100%; justify-content: center; }
  .nav-drop-panel {
    position: fixed; top: auto; inset-inline: 8px; width: auto;
    grid-template-columns: repeat(2, 1fr); max-height: 70vh; overflow-y: auto;
  }
}

/* ==== دليل الأدوات الكامل في الرئيسية + تمييز زر الإيجنت ==== */
.tools-dir { margin-top: 14px; border-radius: var(--rad); border: 1px solid var(--line); background: var(--panel); padding: 22px; }
.tools-dir-head h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ink); }
.tools-dir-head p { margin: 0 0 16px; color: var(--dim); font-size: 0.85rem; }
.tools-dir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 20px; }
.tools-dir-col h3 {
  margin: 0 0 9px; font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--dim); font-weight: 800; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 7px;
}
.tools-dir-col a {
  display: block; color: var(--ink2); text-decoration: none;
  font-size: 0.82rem; font-weight: 700; padding: 5px 8px; border-radius: 8px;
}
.tools-dir-col a:hover { color: var(--ink); background: rgba(245, 245, 247, 0.08); }
.nav-agent { color: var(--acc2); }
.nav-agent:hover { background: rgba(100, 210, 255, 0.12) !important; color: var(--ink); }
.nav-agent[aria-current="page"] { color: #fff; }
@media (max-width: 900px) { .tools-dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools-dir-grid { grid-template-columns: 1fr; } .tools-dir { padding: 17px; } }
/* سطح المكتب: الشريط حاوية ممرّرة واللوحة المنسدلة ثابتة الموضع بجوار الزر —
   القص المطلق يكسر الشريط ويدفع زر الأدوات خارج الشاشة فأزيل */

/* ===== v42: دالة الهدف وريبلاي التوصيات وميزانية التغيير وروابط السياسات ===== */
.ag-obj { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 11px; background: rgba(46, 230, 168, 0.08); border: 1px solid rgba(46, 230, 168, 0.25); border-radius: 10px; }
.ag-obj-score { font-size: 1.05rem; font-weight: 800; color: var(--acc, #2ee6a8); white-space: nowrap; }
.ag-obj-score.up { color: #2ee6a8; }
.ag-obj-score.dn { color: #ff6b81; }
.ag-obj-tx { font-size: 0.75rem; color: var(--ink2, #a7b1c7); line-height: 1.8; }
.ag-recs { margin-top: 8px; padding: 8px 11px; background: rgba(100, 210, 255, 0.06); border-radius: 8px; font-size: 0.75rem; color: var(--ink, #e9edf6); line-height: 1.9; }
.ag-recs b { color: var(--acc2, #64d2ff); }
.ag-budget { margin-top: 8px; font-size: 0.75rem; color: var(--ink2, #a7b1c7); line-height: 1.8; }
.foot-pol { font-size: 0.78rem; margin: 4px 0; }
.foot-pol a { color: var(--ink2, #a7b1c7); text-decoration: none; }
.foot-pol a:hover { color: var(--acc, #ff2d78); }

/* ===== v43: قائمة الأسهم فوق 60 عند إشارة الاختراق الجماعي (مسارات الحرارة) ===== */
.ab60-list {
  display: grid;
  /* مهمة 33: صف كامل العرض على كل العروض — الشرائح العشر تراكمت فصارت البطاقات
     الضيقة تفيض على جيرانها، والصف الموحد يقرأ كصف بيانات نظيف كما في الجوال */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.ab60-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ab60-row:hover {
  border-color: rgba(100, 210, 255, 0.55);
  transform: translateY(-1px);
}
.ab60-rank {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dim);
  min-width: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ab60-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ab60-id b {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.ab60-id i {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab60-val {
  margin-inline-start: auto;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
@media (max-width: 720px) {
  .ab60-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ab60-row { padding: 8px 10px; }
}
@media (max-width: 480px) {
  .ab60-list { grid-template-columns: 1fr; }
}

/* ===== v44: أقصى زيادة بعد الإشارة في قائمة فوق 60 (مسارات الحرارة) ===== */
.ab60-gain {
  margin-inline-start: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-gain b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ab60-gain b.up { color: var(--up, #30d158); }
.ab60-gain b.dn { color: var(--dn, #ff453a); }
.ab60-gain b.zero { color: var(--dim); }
.ab60-gain.none b { color: var(--dim); font-weight: 700; }
.ab60-gain i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ab60-row .ab60-val { margin-inline-start: 0; }
@media (max-width: 720px) {
  .ab60-gain { padding-inline-end: 8px; }
  .ab60-gain b { font-size: 0.75rem; }
  .ab60-gain i { font-size: 0.75rem; }
}

/* ===== v45: الحجم النسبي لحظة الإشارة بجانب أقصى زيادة (مسارات الحرارة) ===== */
.ab60-rvol {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-rvol b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-rvol b.hi { color: rgb(100, 210, 255); }
.ab60-rvol b.mid { color: var(--ink, #e8edf7); }
.ab60-rvol b.lo { color: var(--dim, #8b95ab); }
.ab60-rvol.none b { color: var(--dim); font-weight: 700; }
.ab60-rvol i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ab60-rvol { padding-inline-end: 8px; }
  .ab60-rvol b { font-size: 0.75rem; }
  .ab60-rvol i { font-size: 0.75rem; }
}

/* ===== v46: زر الشارت المشروح لكل سهم في قائمة فوق 60 ونافذة الشارت (مسارات الحرارة) =====
   الزر يفتح نافذة شارت السهم مع تحديد مكان إشارة الاختراق الجماعي وعرض ما حدث بعدها */
.ab60-row:focus-visible {
  outline: 2px solid rgba(100, 210, 255, 0.8);
  outline-offset: 2px;
}
.ab60-chart-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(100, 210, 255, 0.4);
  background: rgba(100, 210, 255, 0.1);
  color: rgb(140, 220, 255);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ab60-chart-btn:hover {
  background: rgba(100, 210, 255, 0.2);
  border-color: rgba(100, 210, 255, 0.7);
}
.ab60-chart-btn:focus-visible {
  outline: 2px solid rgba(100, 210, 255, 0.8);
  outline-offset: 1px;
}
.ab60-chart-btn svg { flex: 0 0 auto; }

/* النافذة */
body.ab60-locked { overflow: hidden; }
.ab60-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ab60-modal[hidden] { display: none; }
.ab60-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.74);
  backdrop-filter: blur(3px);
}
.ab60-modal-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(94vh, 820px);
  overflow: auto;
  background: var(--panel, #0b1018);
  border: 1px solid var(--line, #232b3d);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.ab60-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ab60-chart-titles { min-width: 0; }
.ab60-chart-titles h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink, #e8edf7);
  line-height: 1.3;
}
.ab60-chart-titles p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim, #8b95ab);
  line-height: 1.5;
}
.ab60-chart-host { margin: 2px 0 4px; }
.ab60-chart-canvas { display: block; border-radius: 10px; }
.ab60-chart-volnote {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim, #8b95ab);
  line-height: 1.6;
}

/* شريط الأرقام */
.ab60-chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.ab60-chart-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 11px;
  border: 1px solid var(--line, #232b3d);
  border-radius: 10px;
  background: rgba(103, 113, 138, 0.07);
}
.ab60-chart-stat i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim, #8b95ab);
  white-space: nowrap;
}
.ab60-chart-stat b {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink, #e8edf7);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ab60-chart-stat.up b { color: var(--up, #30d158); }
.ab60-chart-stat.dn b { color: var(--dn, #ff453a); }
.ab60-chart-stat.hi b { color: rgb(100, 210, 255); }

/* السرد: ماذا حدث بعدها */
.ab60-chart-story {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #232b3d);
  border-inline-start: 3px solid rgba(45, 212, 191, 0.65);
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.05);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2, #a7b1c7);
  line-height: 1.75;
}
@media (max-width: 720px) {
  .ab60-modal { padding: 10px; }
  .ab60-modal-panel { padding: 12px 12px 14px; border-radius: 13px; }
  .ab60-chart-stat b { font-size: 0.75rem; }
  .ab60-chart-story { font-size: 0.75rem; }
  /* عمود واحد بلا تمدد: 1fr يسمح للصف بالتمدد مع محتواه فيفيض — minmax(0,1fr) يقيده */
  .ab60-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ab60-row { gap: 8px; }
  /* زر أيقوني في النطاق الضيق حفاظاً على هوية الصف */
  .ab60-chart-btn { padding: 4px 7px; }
  .ab60-chart-btn span { display: none; }
}

/* ===== v47: فرز قائمة فوق 60 بضغط الاتجاه (مسارات الحرارة) =====
   مبدّل الترتيب (ضغط الاتجاه افتراضياً بطلب المالك أو قوة الحرارة)
   وشريحة ضغط الاتجاه لحظة الإشارة بنفس بنية شريحتي النسبة والحجم النسبي */
.ab60-tsort {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0 8px;
}
.ab60-tsort-lb {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dim, #8b95ab);
}
.ab60-tsort-btn {
  appearance: none;
  border: 1px solid var(--line, #232b3d);
  background: rgba(10, 15, 26, 0.45);
  color: var(--ink2, #a7b1c7);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ab60-tsort-btn:hover { color: var(--ink, #e8edf7); border-color: rgba(100, 210, 255, 0.35); }
.ab60-tsort-btn:focus-visible { outline: 2px solid rgba(100, 210, 255, 0.8); outline-offset: 2px; }
.ab60-tsort-btn[aria-pressed="true"] {
  color: #64d2ff;
  border-color: rgba(100, 210, 255, 0.55);
  background: rgba(100, 210, 255, 0.10);
}
.ab60-tsort-note {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim, #8b95ab);
}
.ab60-pr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-pr b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-pr b.up { color: var(--up, #30d158); }
.ab60-pr b.dn { color: var(--dn, #ff453a); }
.ab60-pr b.zero { color: var(--dim); }
.ab60-pr.none b, .ab60-pr.wait b { color: var(--dim); font-weight: 700; }
.ab60-pr i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ab60-tsort { margin: 0 0 6px; }
  .ab60-pr { padding-inline-end: 8px; }
  .ab60-pr b { font-size: 0.75rem; }
  .ab60-pr i { font-size: 0.75rem; }
}


/* ===== v48: سرعة السهم كخيار فرز ثالث لقائمة فوق 60 (مسارات الحرارة) =====
   شريحة سرعة السهم (أميهود) على كل صف — بنية شريحة الضغط نفسها وأصنافها
   hi سماوي (سريع 0.10 فأكثر) وmid طبيعي (متوسط 0.03-0.10) وlo خافت (ثقيل) —
   والزر الثالث في المبدّل يرث نمط أزرار الترتيب القائم كاملاً */
.ab60-vel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-vel b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-vel b.hi { color: #64d2ff; }
.ab60-vel b.mid { color: var(--ink, #e8edf7); }
.ab60-vel b.lo { color: var(--dim, #8b95ab); }
.ab60-vel.none b { color: var(--dim); font-weight: 700; }
.ab60-vel i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ab60-vel { padding-inline-end: 8px; }
  .ab60-vel b { font-size: 0.75rem; }
  .ab60-vel i { font-size: 0.75rem; }
}

/* إصلاح فيض الجوال في صف القائمة: أربع شرائح قياس + زر الشارت لا يتسعان
   لصف واحد على الشاشات الضيقة — الالتفاف يبقي كل بيانات الصف ظاهرة على سطرين
   والاسم ينكمش بنقط الحذف والقيمة تدفع لطرف السطر الأول */
@media (max-width: 720px) {
  .ab60-row { flex-wrap: wrap; row-gap: 5px; }
  .ab60-id { flex: 1 1 auto; }
  .ab60-val { margin-inline-start: auto; }
}

/* ===== v49: فلتر التقدم اليومي لقائمة فوق 60 (مسارات الحرارة) =====
   شريحة التقدم اليومي على كل صف — بنية شريحة السرعة نفسها —
   hi سماوي (1% فأكثر: ملف الفائز في البحث الجنائي) وmid طبيعي (0 حتى 1%)
   وlo أحمر خافت (متراجع) — وزر الفلتر يرث نمط أزرار الترتيب القائم كاملاً */
.ab60-pdg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-pdg b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-pdg b.hi { color: #64d2ff; }
.ab60-pdg b.mid { color: var(--ink, #e8edf7); }
.ab60-pdg b.lo { color: #f0846e; }
.ab60-pdg.none b { color: var(--dim); font-weight: 700; }
.ab60-pdg i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ab60-pdg { padding-inline-end: 8px; }
  .ab60-pdg b { font-size: 0.75rem; }
  .ab60-pdg i { font-size: 0.75rem; }
}

/* ===== v50: حد القائمة القابل للتعديل وفلتر فوق EMA12 ومبدّل الفريم داخل قائمة فوق الحد =====
   وإصلاح موروث أُعيد بصدق: شبكة بطاقات 228px كانت تفيض شرائحها على الجيران بعد
   تراكم عشر شرائح في الصف — صار الصف كامل العرض على كل العروض بلا فيض */
/* ===== v50: حد القائمة القابل للتعديل وفلتر فوق EMA12 ومبدّل الفريم داخل قائمة فوق الحد =====
   حقل «الحد:» رقمي مضغوط بمقاس أزرار الترتيب نفسها — وشريحة EMA12 على كل صف
   ببنية شريحة التقدم نفسها: hi سماوي (فوق المتوسط) وlo أحمر (تحته) وحالتان
   خافتتان للفراغ — ومبدّل الإطار داخل رأس القائمة يرث نمط hm-tf كاملاً
   بمقاس مصغّر ليحاذي أزرار الترتيب */
.ab60-ctl { row-gap: 4px; }
.ab60-min-field { display: inline-flex; align-items: center; }
.ab60-min-field input {
  appearance: none;
  -moz-appearance: textfield;
  width: 58px;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--line, #232b3d);
  color: var(--ink, #e8edf7);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 6px;
  border-radius: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ab60-min-field input::-webkit-outer-spin-button,
.ab60-min-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ab60-min-field input:hover { border-color: rgba(100, 210, 255, 0.35); }
.ab60-min-field input:focus-visible {
  outline: none;
  border-color: rgba(100, 210, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(100, 210, 255, 0.18);
}
.ab60-min-note {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim, #8b95ab);
}
.ab60-tf-lb { margin-inline-start: 8px; }
.ab60-tf { margin-inline-start: 2px; }
.ab60-tf button {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.ab60-ema {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-ema b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-ema b.hi { color: #64d2ff; }
.ab60-ema b.lo { color: #f0846e; }
.ab60-ema.none b { color: var(--dim); font-weight: 700; }
.ab60-ema i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ab60-ctl .ab60-min-note { display: none; }
  .ab60-ema { padding-inline-end: 8px; }
  .ab60-ema b { font-size: 0.75rem; }
  .ab60-ema i { font-size: 0.75rem; }
}

/* ===== v51: درجة قوة الاستمرار — ترتيب «الأقوى صعوداً» الافتراضي لقائمة فوق الحد =====
   شريحة الدرجة على كل صف ببنية الشرائح القائمة نفسها — ونطاقاتها الأربعة بألوان
   متدرجة صادقة عن معدلات الفوز المرصودة: قوية جداً ذهبية (فوز 68%) وقوية سماوية
   (فوز 47%) ومتوسطة بيضاء (فوز 23%) وضعيفة حمراء خافتة (فوز 13%) — وأعلى ثلاثة
   صفوف كاملة الدرجة بإطار ذهبي خافت ورتب ذهبية وفضية وبرونزية */
.ab60-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline-end: 10px;
}
.ab60-score b {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink, #e8edf7);
}
.ab60-score b.hi { color: #ffd166; }
.ab60-score b.mid2 { color: #64d2ff; }
.ab60-score b.mid { color: var(--ink, #e8edf7); }
.ab60-score b.lo { color: #f0846e; }
.ab60-score.none b { color: var(--dim); font-weight: 700; }
.ab60-score i {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ab60-row.top { border-color: rgba(255, 209, 102, 0.42); }
.ab60-row.top:hover { border-color: rgba(255, 209, 102, 0.7); }
.ab60-row.top .ab60-rank.r1 { color: #ffd166; font-size: 0.78rem; }
.ab60-row.top .ab60-rank.r2 { color: #cfd8ea; font-size: 0.78rem; }
.ab60-row.top .ab60-rank.r3 { color: #d8a06a; font-size: 0.78rem; }
@media (max-width: 720px) {
  .ab60-score { padding-inline-end: 8px; }
  .ab60-score b { font-size: 0.75rem; }
  .ab60-score i { font-size: 0.75rem; }
}

/* ============================================================
   v52 (مهمة 36): زر خارجي في شريط أقسام جناح السوق — يفتح صفحة
   مستقلة (مسارات الحرارية v2) بدل تضمينها — إضافة معزولة لا تمس
   أي نمط قائم، وجناح السوق هو المستخدم الوحيد لها.
   ============================================================ */
.wing-ext {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(45, 212, 191, 0.45); border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(163, 230, 53, 0.08));
  color: var(--ink); font: inherit; font-weight: 800; font-size: 0.86rem;
  padding: 9px 18px; white-space: nowrap; text-decoration: none;
  transition: filter 0.15s ease, border-color 0.15s ease;
}
.wing-ext:hover { filter: brightness(1.15); border-color: rgba(45, 212, 191, 0.75); }
.wing-ext:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (max-width: 720px) {
  .wing-ext { padding: 8px 14px; font-size: 0.8rem; }
}

/* ============================================================
   v53 — طبقة Apple Design (HIG) على الموقع كاملاً
   وفق مهارة apple-design-skill (مراجع developer.apple.com):
   accessibility.md › Vision (تباين ≥ 4.5:1) · › Mobility (أهداف 44×44pt)
   typography.md › Minimum sizes (أرضية 12px) · color.md › Increase Contrast
   materials: بديل صلب عند Reduce Transparency · motion: شبكة أمان Reduce Motion
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.page, body.page-home, body.page-filter {
  -webkit-tap-highlight-color: transparent;
}
a, button, [role="button"], input, select, textarea {
  touch-action: manipulation;
}

/* لوحة المفاتيح: حلقة تركيز ظاهرة على كل متحكم — accessibility.md › Mobility */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--acc2);
  outline-offset: 2px;
}

/* Reduce Motion: شبكة أمان شاملة فوق الكتل الموجّهة السابقة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reduce Transparency: بدائل صلبة لكل طبقات الزجاج — materials */
@media (prefers-reduced-transparency: reduce) {
  .site-head, body.page-home .site-head {
    background: #10141d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.page-filter .site-head {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .table-wrap, .tool-btn, .radar-tip {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1b202b;
  }
  .modal {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(16, 20, 29, 0.98);
  }
  .ab60-modal-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(8, 10, 15, 0.9);
  }
}

/* Increase Contrast: رموز أعلى تبايناً — color.md */
@media (prefers-contrast: more) {
  :root {
    --ink2: #e3e6ee;
    --dim: #c3c8d4;
    --line: #4a5060;
    --line2: #6b7284;
  }
}

/* أهداف لمس مريحة على الشاشات اللمسية — accessibility.md › Mobility (44×44pt) */
@media (pointer: coarse) {
  .topnav a, .nav-drop-btn, .tf-tab, .seg-btn { min-height: 44px; }
  .topnav a, .nav-drop-btn { display: inline-flex; align-items: center; }
  .btn-sm { min-height: 40px; }
}
