/* ستوك — أنماط صفحة سوبر بولنجر ترند (/sbt) v3 — + أرضية نص 12px (Apple HIG)
   تعتمد على هوية stock.css العامة وتضيف فقط ما يخص الصفحة:
   التخطيط الثنائي والبطاقات الجانبية وقارئات kv وقائمة الإشارات
   وقسم السكانر بشريطه وتقدمه وشرائح فلاتره وعمود تقاطع EMA5/12 — صفر إيموجي */

/* ===== التخطيط الثنائي للشارت والبطاقات ===== */
.sbt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; margin-top: 14px; }
.sbt-host { position: relative; min-height: 360px; }
.sbt-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sbt-card {
  background: rgba(10, 15, 26, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
}
.sbt-card h3 { margin: 0 0 10px; font-size: 0.86rem; font-weight: 900; color: var(--ink); }
.sbt-mini { margin: 8px 0 0; color: var(--dim); font-size: 0.75rem; line-height: 1.6; }

/* ===== مفتاح الرسم ===== */
.sbt-legend { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.sbt-legend .lg-swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.sw-line-up { background: #34d399; }
.sw-line-dn { background: #fb5569; }
.sw-zz { background: rgba(167, 177, 199, 0.75); }
.sw-tp { background: rgba(255, 211, 77, 0.9); }
.lg-tri { width: 0; height: 0; display: inline-block; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.tri-up { border-bottom: 8px solid #34d399; }
.tri-dn { border-top: 8px solid #fb5569; }

/* ===== قارئات القيم kv ===== */
.sbt-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sbt-kv li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.78rem; color: var(--ink2); }
.sbt-kv li b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; }
.sbt-kv li b.is-up { color: #34d399; }
.sbt-kv li b.is-dn { color: #fb5569; }
.sbt-kv li b.is-warn { color: #ffd34d; }

/* ===== قائمة إشارات الانقلاب ===== */
.sbt-signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.sbt-signals li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 38, 0.5);
  font-size: 0.75rem; color: var(--ink2);
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.sbt-signals li:hover { border-color: rgba(10, 132, 255, 0.55); background: rgba(10, 132, 255, 0.07); }
.sbt-signals li .tri { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; flex: none; }
.sbt-signals li.long .tri { border-bottom: 7px solid #34d399; }
.sbt-signals li.short .tri { border-top: 7px solid #fb5569; }
.sbt-signals li .sg-side { font-weight: 900; min-width: 34px; }
.sbt-signals li.long .sg-side { color: #34d399; }
.sbt-signals li.short .sg-side { color: #fb5569; }
.sbt-signals li .sg-date { color: var(--ink); font-weight: 700; }
.sbt-signals li .sg-pct { margin-inline-start: auto; font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; color: var(--ink); }
.sbt-signals li .sg-ago { color: var(--dim); font-size: 0.75rem; }

/* ===== قسم السكانر ===== */
.sbt-scan {
  margin-top: 16px;
  background: rgba(10, 15, 26, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 12px;
}
.sbt-scan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sbt-scan-head .idx-title { font-size: 1rem; }
.sbt-scan-head .idx-note { max-width: 720px; line-height: 1.7; }
.sbt-scan-tools { display: flex; gap: 8px; flex: none; }
.sbt-scan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.sbt-scan-bar .hm-field input { min-width: 190px; }
.sbt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sbt-chips button {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 38, 0.5);
  color: var(--ink2); font: 700 0.75rem/1 Cairo, Tahoma, sans-serif;
  cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.sbt-chips button:hover { color: var(--ink); border-color: var(--line2); }
.sbt-chips button.on {
  color: #fff; border-color: rgba(10, 132, 255, 0.65);
  background: rgba(10, 132, 255, 0.22);
}

/* شريط التقدم */
.sbt-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sbt-progress-track { flex: 1; height: 7px; border-radius: 4px; background: rgba(151, 167, 199, 0.16); overflow: hidden; }
.sbt-progress-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.9), rgba(45, 212, 191, 0.9));
  transition: width 0.25s ease;
}
.sbt-progress-text { font: 800 0.75rem/1 Cairo, Tahoma, sans-serif; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* الجدول */
.sbt-tbl-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sbt-tbl-wrap .data-table { min-width: 920px; margin: 0; }
.sbt-tbl-wrap .data-table thead th { position: sticky; top: 0; background: rgba(10, 15, 26, 0.98); z-index: 2; }
.sbt-tbl-wrap .data-table tbody td { white-space: nowrap; }
.sbt-tbl-wrap .data-table th.sortable { cursor: pointer; user-select: none; }
.sbt-tbl-wrap .data-table th.sortable.is-sorted-asc::after { content: " ↑"; color: var(--acc2); }
.sbt-tbl-wrap .data-table tbody tr { transition: background 0.12s ease; }
.sbt-tbl-wrap .data-table tbody tr:hover { background: rgba(10, 132, 255, 0.06); }
.sbt-tbl-wrap .data-table tbody tr.is-fresh-long { box-shadow: inset 3px 0 0 #34d399; }
.sbt-tbl-wrap .data-table tbody tr.is-fresh-short { box-shadow: inset 3px 0 0 #fb5569; }
.sbt-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font: 800 0.75rem/1.3 Cairo, Tahoma, sans-serif;
  border: 1px solid transparent;
}
.sbt-pill.up { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.09); }
.sbt-pill.dn { color: #fb5569; border-color: rgba(251, 85, 105, 0.4); background: rgba(251, 85, 105, 0.09); }
.sbt-score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 7px; border-radius: 8px; font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; }
.sbt-score.hi { color: #04060a; background: #34d399; }
.sbt-score.mid { color: #04060a; background: #ffd34d; }
.sbt-score.low { color: var(--ink2); background: rgba(151, 167, 199, 0.18); }
.sbt-sigchips { display: flex; flex-wrap: wrap; gap: 4px; }
.sbt-sigchips i {
  font-style: normal; font-size: 0.75rem; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink2); white-space: nowrap;
}
.sbt-sigchips i.fresh_long, .sbt-sigchips i.fresh_short { color: #fff; border-color: transparent; }
.sbt-sigchips i.fresh_long { background: rgba(52, 211, 153, 0.55); }
.sbt-sigchips i.fresh_short { background: rgba(251, 85, 105, 0.55); }
.sbt-sigchips i.near_line { color: #ffd34d; border-color: rgba(255, 211, 77, 0.4); }
.sbt-sigchips i.move_strong { color: #5eead4; border-color: rgba(45, 212, 191, 0.4); }
.sbt-sigchips i.steady { color: #93c5fd; border-color: rgba(147, 197, 253, 0.35); }
.sbt-sigchips i.ema_cross_up { color: #34d399; border-color: rgba(52, 211, 153, 0.4); }
.sbt-sigchips i.ema_cross_dn { color: #fb5569; border-color: rgba(251, 85, 105, 0.4); }

/* عمود تقاطع EMA5/12 */
.ec-arr { font-style: normal; font-weight: 900; }
.ec-arr.is-up { color: #34d399; }
.ec-arr.is-dn { color: #fb5569; }
.sbt-foot-note { margin: 10px 2px 0; color: var(--dim); font-size: 0.75rem; line-height: 1.7; }

/* ===== الاستجابة ===== */
@media (max-width: 980px) {
  .sbt-layout { grid-template-columns: 1fr; }
  .sbt-legend { justify-content: flex-start; }
  .sbt-scan-head { flex-direction: column; }
  .sbt-scan-tools { width: 100%; }
  .sbt-scan-tools .btn-sm { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 560px) {
  .sbt-scan { padding: 13px 11px 10px; }
  .sbt-scan-bar .hm-field { flex: 1 1 100%; }
  .sbt-scan-bar .hm-field input, .sbt-scan-bar .hm-field select { width: 100%; }
  .sbt-chips button { padding: 6px 10px; font-size: 0.75rem; }
  .sbt-signals li .sg-ago { display: none; }
}
