/* ============================================================
   ستوك — مسارات الحرارية v2 — نظام تصميم مستقل (v2)
   صفحة قيادة الإشارات: هوية بصرية جديدة لا تشبه باقي الصفحات
   — غرفة عمليات: قاعدة كربونية أغمق، خطوط شعرية، هوية لونية
   فيروزية-ليمونية بدل الأزرق السماوي، جدول بيانات حقيقي
   برأس أعمدة وشريط درجة، خط زمني رأسي للإشارات، وشمعة نبض حية.
   يعتمد أساس الخطوط والتنقل من stock.css ويبني فوقه مستقلاً
   — لا يلمس أي نمط قائم في أي صفحة أخرى.
   v2 (مهمة 37): زر «الشارت» فيروسي على كل صف من جدول المرشحين
   يفتح سهم السهم في الشارت الاحترافي بنافذة جديدة.
   ============================================================ */

:root {
  --tr2-bg: #05070b;
  --tr2-panel: #0a0f16;
  --tr2-panel2: #0d141d;
  --tr2-line: rgba(148, 163, 184, 0.14);
  --tr2-line2: rgba(148, 163, 184, 0.24);
  --tr2-txt: #e8edf5;
  --tr2-dim: #a7b1c7;
  --tr2-faint: #67718a;
  --tr2-teal: #2dd4bf;
  --tr2-lime: #a3e635;
  --tr2-amber: #fbbf24;
  --tr2-red: #f0846e;
  --tr2-gold: #ffd166;
  --tr2-rail-w: 312px;
}

/* هيكل الصفحة: جسم أغمق من بقية الصفحات بوهج فيروزي علوي وحبيبات شبكة */
body.tr2-body {
  background:
    radial-gradient(1100px 340px at 50% -120px, rgba(45, 212, 191, 0.09), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    var(--tr2-bg);
  background-size: auto, 44px 44px, 44px 44px, auto;
}

.tr2-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  display: grid;
  grid-template-columns: var(--tr2-rail-w) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* ============ السكة الجانبية: وحدة تحكم مرقمة ============ */
.tr2-rail {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tr2-mod {
  background: linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  border: 1px solid var(--tr2-line);
  border-radius: 14px;
  padding: 13px 14px 14px;
}
.tr2-mod-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
}
.tr2-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--tr2-teal);
  font-variant-numeric: tabular-nums;
}
.tr2-mod-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--tr2-txt);
}

/* أزرار الإطار: صف رباعي */
.tr2-tfs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tr2-tfs button {
  appearance: none;
  border: 1px solid var(--tr2-line2);
  background: rgba(148, 163, 184, 0.05);
  color: var(--tr2-dim);
  border-radius: 9px;
  padding: 8px 4px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tr2-tfs button:hover { color: var(--tr2-txt); border-color: rgba(45, 212, 191, 0.45); }
.tr2-tfs button.on {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(163, 230, 53, 0.10));
  border-color: rgba(45, 212, 191, 0.6);
  color: var(--tr2-txt);
}

/* حقل طول المؤشر والقوائم */
.tr2-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}
.tr2-field > span {
  font-size: 12px;
  color: var(--tr2-dim);
  font-weight: 600;
  white-space: nowrap;
}
.tr2-select, .tr2-input {
  appearance: none;
  background: rgba(5, 7, 11, 0.75);
  border: 1px solid var(--tr2-line2);
  color: var(--tr2-txt);
  border-radius: 9px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.tr2-select:focus-visible, .tr2-input:focus-visible,
.tr2-tfs button:focus-visible, .tr2-btn:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.65);
  outline-offset: 1px;
}
.tr2-input { width: 76px; text-align: center; }

/* مفاتيح الفلاتر: صف مفتاح + نص */
.tr2-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}
.tr2-switch-row > span {
  font-size: 12.5px;
  color: var(--tr2-dim);
  font-weight: 600;
}
.tr2-switch {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 21px;
  border: 1px solid var(--tr2-line2);
  background: rgba(5, 7, 11, 0.8);
  transition: background 0.15s, border-color 0.15s;
  flex: none;
}
.tr2-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--tr2-faint);
  transition: transform 0.18s, background 0.18s;
}
.tr2-switch.on {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.35), rgba(163, 230, 53, 0.22));
  border-color: rgba(45, 212, 191, 0.65);
}
.tr2-switch.on::after {
  transform: translateX(-17px);
  background: var(--tr2-lime);
}
[dir="rtl"] .tr2-switch.on::after { transform: translateX(-17px); }

/* ============ المسرح الرئيسي ============ */
.tr2-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* شريط الحالة الحية */
.tr2-statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  border: 1px solid var(--tr2-line);
  border-radius: 14px;
  padding: 10px 16px;
}
.tr2-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--tr2-teal);
  white-space: nowrap;
}
.tr2-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tr2-lime);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.55);
  animation: tr2pulse 2.2s infinite;
}
@keyframes tr2pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}
.tr2-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--tr2-faint);
  font-weight: 600;
  white-space: nowrap;
}
.tr2-stat b {
  color: var(--tr2-txt);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.tr2-sep { width: 1px; height: 18px; background: var(--tr2-line2); flex: none; }

/* بطاقة آخر إشارة — البطل */
.tr2-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(560px 200px at 88% -40%, rgba(163, 230, 53, 0.10), transparent 70%),
    linear-gradient(180deg, #0d141d, #0a0f16);
  padding: 20px 22px;
}
.tr2-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tr2-teal), var(--tr2-lime));
  opacity: 0.85;
}
.tr2-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tr2-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--tr2-teal);
}
.tr2-hero-title {
  margin: 8px 0 2px;
  font-size: clamp(21px, 3.4vw, 30px);
  font-weight: 900;
  color: var(--tr2-txt);
  line-height: 1.35;
}
.tr2-hero-sub {
  margin: 0;
  color: var(--tr2-dim);
  font-size: 13.5px;
  line-height: 1.9;
}
.tr2-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.tr2-metric {
  border: 1px solid var(--tr2-line);
  border-radius: 12px;
  background: rgba(5, 7, 11, 0.55);
  padding: 10px 12px;
}
.tr2-metric i {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--tr2-faint);
  font-weight: 700;
  margin-bottom: 4px;
}
.tr2-metric b {
  font-size: 21px;
  font-weight: 900;
  color: var(--tr2-txt);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.tr2-metric b.up { color: var(--tr2-lime); }
.tr2-metric b.dn { color: var(--tr2-red); }
.tr2-metric b.tl { color: var(--tr2-teal); }

/* نبض السوق: شريط كانفس رفيع لمتوسط القوة وعلامات الإشارات */
.tr2-pulsewrap {
  border: 1px solid var(--tr2-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  padding: 12px 14px 8px;
}
.tr2-pulse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tr2-pulse-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--tr2-dim);
}
.tr2-pulse-head span {
  font-size: 12px;
  color: var(--tr2-faint);
  font-weight: 600;
}
#tr2-pulse-canvas { width: 100%; height: 96px; display: block; }

/* ============ الخط الزمني للإشارات ============ */
.tr2-tl-wrap {
  border: 1px solid var(--tr2-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  padding: 14px 16px;
}
.tr2-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tr2-sec-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 900;
  color: var(--tr2-txt);
}
.tr2-sec-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--tr2-faint);
  line-height: 1.8;
}
.tr2-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--tr2-line2);
  background: rgba(148, 163, 184, 0.06);
  color: var(--tr2-dim);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tr2-chip.tl { border-color: rgba(45, 212, 191, 0.4); color: var(--tr2-teal); }

.tr2-timeline {
  position: relative;
  margin: 4px 2px 0;
  padding-inline-start: 20px;
}
.tr2-timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.55), rgba(45, 212, 191, 0.08));
  border-radius: 2px;
}
.tr2-node {
  position: relative;
  padding: 9px 12px 10px 0;
  padding-inline-start: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.tr2-node:hover { background: rgba(45, 212, 191, 0.05); }
.tr2-node::before {
  content: "";
  position: absolute;
  inset-inline-start: -20px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tr2-panel);
  border: 2.5px solid var(--tr2-teal);
  transition: background 0.15s;
}
.tr2-node.on::before { background: var(--tr2-lime); border-color: var(--tr2-lime); }
.tr2-node-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.tr2-node-pct {
  font-size: 19px;
  font-weight: 900;
  color: var(--tr2-txt);
  font-variant-numeric: tabular-nums;
  min-width: 64px;
}
.tr2-node-date { font-size: 12.5px; color: var(--tr2-dim); font-weight: 700; }
.tr2-node-meta { font-size: 12px; color: var(--tr2-faint); font-variant-numeric: tabular-nums; }
.tr2-node-meta b { color: var(--tr2-teal); font-weight: 800; }

/* ============ جدول المرشحين ============ */
.tr2-table-wrap {
  border: 1px solid var(--tr2-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  padding: 14px 16px 10px;
  overflow-x: auto;
}
.tr2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 940px;
}
.tr2-table thead th {
  text-align: start;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--tr2-faint);
  border-bottom: 1px solid var(--tr2-line2);
  padding: 7px 9px;
  white-space: nowrap;
}
.tr2-table tbody td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding: 8px 9px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tr2-table tbody tr { cursor: pointer; transition: background 0.12s; }
.tr2-table tbody tr:hover { background: rgba(45, 212, 191, 0.045); }
.tr2-table tbody tr.top1 { background: linear-gradient(90deg, rgba(255, 209, 102, 0.10), transparent 60%); }
.tr2-table tbody tr.top2 { background: linear-gradient(90deg, rgba(200, 205, 215, 0.07), transparent 60%); }
.tr2-table tbody tr.top3 { background: linear-gradient(90deg, rgba(205, 133, 63, 0.08), transparent 60%); }
.tr2-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--tr2-line2);
  font-size: 12px;
  font-weight: 900;
  color: var(--tr2-dim);
  font-variant-numeric: tabular-nums;
}
tr.top1 .tr2-rank { border-color: var(--tr2-gold); color: var(--tr2-gold); }
tr.top2 .tr2-rank { border-color: #c8cdd7; color: #c8cdd7; }
tr.top3 .tr2-rank { border-color: #cd853f; color: #cd853f; }
.tr2-sym { display: flex; flex-direction: column; gap: 1px; min-width: 130px; }
.tr2-sym b { color: var(--tr2-txt); font-size: 13px; font-weight: 800; }
.tr2-sym span { color: var(--tr2-faint); font-size: 12px; }

/* شريط الدرجة داخل الخلية */
.tr2-score { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.tr2-score b {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  width: 30px;
  text-align: center;
}
.tr2-score b.hi { color: var(--tr2-gold); }
.tr2-score b.mid2 { color: var(--tr2-lime); }
.tr2-score b.mid { color: var(--tr2-txt); }
.tr2-score b.lo { color: var(--tr2-red); }
.tr2-bar {
  position: relative;
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
  min-width: 54px;
}
.tr2-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--tr2-teal), var(--tr2-lime));
}
.tr2-score b.lo + .tr2-bar i { background: linear-gradient(90deg, rgba(240, 132, 110, 0.8), rgba(240, 132, 110, 0.4)); }
.tr2-score b.hi + .tr2-bar i { background: linear-gradient(90deg, var(--tr2-gold), #ffedb3); }
.tr2-band {
  font-size: 12px;
  color: var(--tr2-faint);
  font-weight: 700;
  width: 52px;
}

/* شمعة مصغرة لمسار القوة */
.tr2-spark { width: 64px; height: 26px; display: block; }

/* خلايا رقمية */
.tr2-td-num { font-weight: 800; color: var(--tr2-txt); }
.tr2-td-num.hi { color: var(--tr2-teal); }
.tr2-td-num.mid { color: var(--tr2-txt); }
.tr2-td-num.lo { color: var(--tr2-red); }
.tr2-td-num.up { color: var(--tr2-lime); }
.tr2-td-num.dn { color: var(--tr2-red); }
.tr2-td-dim { color: var(--tr2-faint); }

/* زر الشارت الاحترافي على كل صف (v2 — مهمة 37):
   رابط فيروسي بهوية الصفحة يفتح سهم السهم في /chart بنافذة جديدة
   — بلا أي مساس بأصناف صفحات أخرى */
.tr2-td-chart { text-align: center; }
.tr2-chbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.08);
  color: var(--tr2-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.tr2-chbtn svg { display: block; }
.tr2-chbtn:hover,
.tr2-chbtn:focus-visible {
  background: rgba(45, 212, 191, 0.17);
  border-color: var(--tr2-teal);
  color: #d9fff8;
  outline: none;
}

/* ============ جهاز التنبيهات البريدية ============ */
.tr2-mail {
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(480px 170px at 12% -30%, rgba(45, 212, 191, 0.08), transparent 70%),
    linear-gradient(180deg, var(--tr2-panel2), var(--tr2-panel));
  padding: 16px 18px;
}
.tr2-mail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.tr2-mail-box {
  border: 1px solid var(--tr2-line);
  border-radius: 12px;
  background: rgba(5, 7, 11, 0.5);
  padding: 12px 13px;
}
.tr2-mail-box h3 {
  margin: 0 0 9px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--tr2-dim);
  display: flex;
  align-items: center;
  gap: 7px;
}
.tr2-mail-box h3 .tr2-num { letter-spacing: 1px; }

/* شارات الإيميل */
.tr2-emails {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
  min-height: 27px;
}
.tr2-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
  color: var(--tr2-txt);
  border-radius: 999px;
  padding: 3px 6px 3px 12px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
}
.tr2-email-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: plaintext;
}
.tr2-email-chip button {
  appearance: none;
  border: 0;
  background: rgba(148, 163, 184, 0.14);
  color: var(--tr2-dim);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tr2-email-chip button:hover { background: rgba(240, 132, 110, 0.25); color: var(--tr2-red); }
.tr2-email-add {
  display: flex;
  gap: 6px;
}
.tr2-email-add input { flex: 1; direction: ltr; text-align: start; font-weight: 600; }

/* أزرار عامة */
.tr2-btn {
  appearance: none;
  border: 1px solid var(--tr2-line2);
  background: rgba(148, 163, 184, 0.07);
  color: var(--tr2-txt);
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.tr2-btn:hover { border-color: rgba(45, 212, 191, 0.5); }
.tr2-btn.primary {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.9), rgba(163, 230, 53, 0.75));
  border-color: transparent;
  color: #04120e;
}
.tr2-btn.primary:hover { filter: brightness(1.08); }
.tr2-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tr2-btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* حالة النظام الصادقة */
.tr2-mail-state {
  margin-top: 12px;
  border-top: 1px dashed var(--tr2-line2);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tr2-state-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--tr2-faint);
  line-height: 1.8;
}
.tr2-state-line b { color: var(--tr2-dim); font-weight: 700; }
.tr2-state-line.ok b { color: var(--tr2-lime); }
.tr2-state-line.warn b { color: var(--tr2-amber); }
.tr2-state-line.bad b { color: var(--tr2-red); }
.tr2-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--tr2-faint);
  line-height: 1.9;
}

/* حالات الفراغ والتحميل */
.tr2-empty {
  border: 1px dashed var(--tr2-line2);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  color: var(--tr2-faint);
  font-size: 13px;
  line-height: 2;
}
.tr2-scanline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--tr2-dim);
  font-weight: 700;
}
.tr2-scanbar {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
  min-width: 120px;
}
.tr2-scanbar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--tr2-teal), var(--tr2-lime));
  transition: width 0.3s;
}

/* توست خاص بالصفحة */
.tr2-toast {
  position: fixed;
  bottom: 18px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  background: #101826;
  border: 1px solid var(--tr2-line2);
  color: var(--tr2-txt);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 700;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: min(92vw, 560px);
  text-align: center;
}
.tr2-toast.show { opacity: 1; transform: translateX(50%) translateY(-4px); }
.tr2-toast.ok { border-color: rgba(163, 230, 53, 0.5); }
.tr2-toast.bad { border-color: rgba(240, 132, 110, 0.5); }

/* ============ التجاوب ============ */
@media (max-width: 1099px) {
  .tr2-shell { grid-template-columns: 1fr; }
  .tr2-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
  }
}
@media (max-width: 720px) {
  .tr2-shell { padding: 12px 10px 30px; gap: 12px; }
  .tr2-rail { grid-template-columns: 1fr; }
  .tr2-hero { padding: 16px 14px; }
  .tr2-metric b { font-size: 18px; }
  .tr2-node-pct { font-size: 16px; min-width: 54px; }
  .tr2-statusbar { gap: 9px; padding: 9px 12px; }
}
