ك/* ═══════════════════════════════════════════════════════
   hl2.css — سيولة · إضافات التصميم
   يُحمَّل بعد hl.css في index.html

   ✅ Footer — زران نحيفان
   ✅ Options Overlay — ألوان ديناميكية (فاتح/داكن)
   ✅ طبقات z-index صحيحة هندسياً 100%
      opts-overlay : 200
      modal-overlay: 300
      toast        : 350  ← فوق كل modal
      loader       : 400  ← فوق الكل
   ✅ شريط التاريخ والوقت
   ✅ جدول الأشهر
   ✅ Nav Logo Button
   ✅ Trade Panel نظيف
═══════════════════════════════════════════════════════ */

/* ──────────────────────────────────────
   Footer — زران فقط
────────────────────────────────────── */
.footer {
  display: flex !important;
  gap: 8px !important;
  padding: 6px 12px max(8px, env(safe-area-inset-bottom)) !important;
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
  flex-shrink: 0 !important;
}

.footer-main-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-secondary);
  font-size: 14px; font-weight: 800;
  font-family: var(--font-ui);
  cursor: pointer; transition: all .18s;
  white-space: nowrap; overflow: hidden;
}
.footer-main-btn:active { transform: scale(.95); }
.footer-main-btn:hover  {
  border-color: var(--ac); color: var(--ac); background: var(--ac-dim);
}

/* زر الخيارات — ملون بارز */
.footer-opts-btn {
  background: linear-gradient(135deg, var(--ac), #a8502f) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 3px 16px var(--ac-dim);
}
.footer-opts-btn:hover  {
  filter: brightness(1.08); color: #fff !important;
  background: linear-gradient(135deg, var(--ac), #a8502f) !important;
}
.footer-opts-btn:active { transform: scale(.96); }

.fmb-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.fmb-lbl  { font-size: 14px; font-weight: 800; }

/* ──────────────────────────────────────
   Z-INDEX — طبقات مرتبة هندسياً 100%

   opts-overlay : 200
   modal-overlay: 300  (يفتح فوق opts)
   toast        : 350  (يظهر داخل سياق أي modal مفتوح)
   notif-banner : 380  (إشعار TP/SL فوق التوست)
   loader       : 400  (فوق كل شيء دائماً)
────────────────────────────────────── */
.opts-overlay   { z-index: 200 !important; }
.modal-overlay  { z-index: 300 !important; }
#toast          { z-index: 350 !important; }
#notifBanner    { z-index: 380 !important; }
#loader         { z-index: 400 !important; }

/* ──────────────────────────────────────
   Options — context menu
   ✅ تعتيم 50% فوق الشاشة — يعمل في فاتح وداكن
   ✅ نصوص فقط — لا صور لا grid لا backdrop-filter
   ✅ أسرع overlay ممكن
────────────────────────────────────── */

/* الخلفية المعتمة — نقر خارج القائمة يغلقها */
.opts-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);   /* 50% تعتيم — يعمل في كلا المظهرين */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.opts-overlay.hidden { display: none; }

/* animation: ظهور سريع بدون تعقيد */
.opts-overlay.visible {
  animation: optsFadeIn .15s ease;
}
.opts-overlay.closing {
  animation: optsFadeOut .12s ease forwards;
}
@keyframes optsFadeIn  { from{opacity:0;} to{opacity:1;} }
@keyframes optsFadeOut { from{opacity:1;} to{opacity:0;} }

/* القائمة — بطاقة نصوص وسط الشاشة */
.opts-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  width: min(88vw, 320px);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

/* كل زر = سطر نص كامل */
.opts-item {
  display: block; width: 100%;
  padding: 15px 20px;
  background: none; border: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  transition: background .08s;
}
.opts-item:last-child { border-bottom: none; }
.opts-item:active     { background: var(--bg-elev); }

/* الخروج — أحمر */
.opts-item-logout { color: var(--dn); font-weight: 800; }
.opts-item-logout:active { background: var(--dn-dim); }

/* إلغاء — رمادي ثقيل */
.opts-item-cancel {
  color: var(--text-secondary);
  font-weight: 900;
  background: var(--bg-elev);
  border-top: 2px solid var(--border) !important;
  margin-top: 0;
}
.opts-item-cancel:active { background: var(--bg-input); }

/* ──────────────────────────────────────
   Toast — يظهر فوق أي modal مفتوح
   z-index: 350 (فوق modal 300)
────────────────────────────────────── */
#toast {
  bottom: 68px !important;
  /* z-index في كتلة z-index أعلاه */
}

/* ──────────────────────────────────────
   شريط التاريخ والوقت
────────────────────────────────────── */
.datetime-bar {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 5px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
  user-select: none;
}
.datetime-bar:hover  { background: var(--bg-input); }
.datetime-bar:active { opacity: .8; }

.dt-clock {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 800;
  color: var(--text-primary);
  direction: rtl; white-space: nowrap;
  letter-spacing: .2px;
}
.dt-hint { font-size: 13px; opacity: .5; flex-shrink: 0; }

/* ──────────────────────────────────────
   جدول الأشهر
────────────────────────────────────── */
.months-panel {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 10px 8px;
  flex-shrink: 0; overflow: hidden;
  animation: slideDown .18s ease;
}
.months-panel.hidden { display: none; }

@keyframes slideDown {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 5px;
}
@media (min-width: 480px) {
  .months-grid { grid-template-columns: repeat(6,1fr); }
}

.month-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 4px;
  text-align: center;
}
.m-num  {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 900; color: var(--ac); line-height: 1;
}
.m-name { font-size: 11px; font-weight: 800; color: var(--text-primary); }
.m-en   {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-muted); font-weight: 700;
}

/* ──────────────────────────────────────
   Nav Logo Button
────────────────────────────────────── */
.nav-logo-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 8px;
  transition: background .15s; flex-shrink: 0;
}
.nav-logo-btn:hover  { background: var(--ac-dim); }
.nav-logo-btn:active { opacity: .7; }

.nav-logo-icon {
  font-size: 18px; line-height: 1;
  filter: drop-shadow(0 0 5px rgba(224,114,72,.6));
}
.nav-logo-text {
  font-size: 16px; font-weight: 900;
  color: var(--text-primary); letter-spacing: .4px; white-space: nowrap;
}

/* ──────────────────────────────────────
   Trade Panel — نظيف (بدون header)
────────────────────────────────────── */
.trade-panel {
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--r-lg) !important;
  padding: 10px 11px !important;
  display: flex !important; flex-direction: column !important;
  gap: 8px !important; flex-shrink: 0 !important;
}

.qty-input-row {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 6px !important; align-items: stretch !important;
}
.qty-input {
  width: 100%; font-family: var(--font-mono);
  font-size: clamp(18px, 4.5vw, 22px); font-weight: 800;
  padding: 9px 10px; text-align: center; direction: ltr;
  border-radius: var(--r-sm); background: var(--bg-input);
  border: 2px solid var(--ac-dim); min-width: 0;
}
.qty-input:focus { border-color: var(--ac); }

.qty-100 {
  background: var(--ac) !important; color: #fff !important;
  border-radius: var(--r-sm) !important;
  padding: 0 11px !important; font-size: 11px !important;
  font-weight: 800 !important; font-family: var(--font-mono) !important;
  white-space: nowrap !important; flex-shrink: 0 !important;
  border: none !important;
}
.qty-100:hover { filter: brightness(1.1); }

.qty-unit {
  font-size: 11px; font-weight: 800; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  min-width: 30px; white-space: nowrap;
}

.trade-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
}
.btn-trade {
  border-radius: var(--r-md); min-height: 42px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  border: none;
}
.btn-trade:disabled { opacity: .45; pointer-events: none; }
.btn-buy  {
  background: linear-gradient(155deg, var(--up), #1a7f37);
  box-shadow: 0 3px 10px var(--up-dim);
}
.btn-sell {
  background: linear-gradient(155deg, var(--dn), #a0281e);
  box-shadow: 0 3px 10px var(--dn-dim);
}
.btn-label { font-size: 15px; font-weight: 900; color: #fff; }
.btn-price {
  font-family: var(--font-mono); font-size: 10px;
  color: rgba(255,255,255,.85); font-weight: 700;
}

/* ──────────────────────────────────────
   About modal body
────────────────────────────────────── */
.about-body {
  display: flex; flex-direction: column; gap: 12px;
  flex: 1; overflow-y: auto;
}
.about-block {
  background: var(--ac-dim);
  border: 1px solid color-mix(in srgb, var(--ac) 25%, transparent);
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 13px; line-height: 1.7; color: var(--text-secondary);
}
.about-section { display: flex; flex-direction: column; gap: 8px; }
.about-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-input); border-radius: var(--r-sm); padding: 10px 12px;
}
.about-icon { font-size: 20px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.about-item div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.about-item strong { font-size: 13px; font-weight: 900; color: var(--text-primary); }
.about-item p {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary); line-height: 1.6; margin: 0;
}
