* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    margin: 0;
    padding: 0;
}

.app-locked { display: none; }

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0d1117;
}
.auth-screen.hidden { display: none; }
.auth-panel {
    width: min(460px, 100%);
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.35);
}
.auth-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}
.auth-brand span {
    color: #ffd966;
    font-size: 1.5rem;
    font-weight: 800;
}
.auth-brand small { color: #8b949e; }
.auth-form { display: grid; gap: 10px; }
.auth-form label {
    color: #c9d1d9;
    font-weight: 700;
    font-size: 0.9rem;
}
.auth-form input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #c9d1d9;
    outline: none;
}
.auth-form input:focus { border-color: #58a6ff; }
.auth-form button,
.account-actions button,
.trade-action-btn {
    border: none;
    background: #238636;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}
.auth-form button { margin-top: 8px; }
.auth-form button:hover,
.account-actions button:hover,
.trade-action-btn:hover { background: #2ea043; }
.plans-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}
.plans-preview div {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px;
}
.plans-preview strong {
    display: block;
    color: #58a6ff;
    margin-bottom: 4px;
}
.plans-preview span,
.auth-disclaimer { color: #8b949e; font-size: 0.85rem; }
.auth-disclaimer {
    margin: 16px 0 0;
    line-height: 1.7;
}

/* ── تبويبات طرق الدخول ─────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 4px;
}
.auth-tab {
    flex: 1;
    padding: 9px 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #8b949e;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.auth-tab.active {
    background: #161b22;
    color: #e6edf3;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.auth-tab:hover:not(.active) { color: #c9d1d9; }

/* ── محتوى كل تبويب ────────────────────────────────────── */
.auth-tab-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 6px;
}
.auth-tab-content label {
    color: #c9d1d9;
    font-weight: 700;
    font-size: 0.9rem;
}
.auth-tab-content input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #c9d1d9;
    outline: none;
    box-sizing: border-box;
    font-size: 0.95rem;
}
.auth-tab-content input:focus { border-color: #58a6ff; }
.auth-tab-content button {
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: #238636;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background .2s;
}
.auth-tab-content button:hover  { background: #2ea043; }
.auth-tab-content button:disabled { background: #21262d; color: #8b949e; cursor: not-allowed; }

/* ── دخول / حساب جديد ──────────────────────────────────── */
.auth-mode-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}
.auth-mode-btn {
    flex: 1;
    padding: 9px;
    border: none;
    background: #0d1117;
    color: #8b949e;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all .2s;
}
.auth-mode-btn.active  { background: #161b22; color: #e6edf3; }
.auth-mode-btn:hover:not(.active) { color: #c9d1d9; }

/* ── زر Google ──────────────────────────────────────────── */
.auth-google-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px !important;
    background: #fff !important;
    color: #3c4043 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: box-shadow .2s;
}
.auth-google-btn:hover { box-shadow: 0 1px 8px rgba(0,0,0,0.25) !important; background: #f8f9fa !important; }

/* ── تلميح ───────────────────────────────────────────────── */
.auth-tab-hint {
    color: #8b949e;
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
}

/* ── زر الرجوع (هاتف) ──────────────────────────────────── */
.auth-back-btn {
    background: #21262d !important;
    color: #8b949e !important;
}
.auth-back-btn:hover { background: #30363d !important; color: #c9d1d9 !important; }

/* ── رسائل الخطأ ────────────────────────────────────────── */
.auth-error {
    color: #f85149;
    font-size: 0.85rem;
    line-height: 1.7;
    background: rgba(248,81,73,0.08);
    border: 1px solid rgba(248,81,73,0.25);
    border-radius: 7px;
    padding: 10px 14px;
    display: none;
}

/* ── مودال التثبيت الاحترافي ──────────────────────────────── */
.install-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.install-modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}
.install-modal-card {
    background: linear-gradient(160deg, #1c2128 0%, #161b22 100%);
    border: 1px solid rgba(240,192,64,0.3);
    border-radius: 24px;
    padding: 32px 24px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 0 80px rgba(240,192,64,0.1), 0 24px 60px rgba(0,0,0,0.7);
    overflow: hidden;
    animation: install-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes install-pop {
    from { transform: scale(0.82) translateY(24px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.install-modal-glow {
    position: absolute;
    top: -70px; left: 50%;
    transform: translateX(-50%);
    width: 240px; height: 140px;
    background: radial-gradient(circle, rgba(240,192,64,0.22) 0%, transparent 70%);
    pointer-events: none;
}
.install-modal-close {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(139,148,158,0.1);
    border: none;
    color: #8b949e;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.install-modal-close:hover { background: rgba(248,81,73,0.2); color: #f85149; }
.install-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
}
.install-modal-icon-wrap {
    position: relative;
    margin-bottom: 12px;
}
.install-modal-icon {
    width: 88px; height: 88px;
    border-radius: 22px;
    box-shadow: 0 6px 24px rgba(240,192,64,0.35);
    display: block;
}
.install-modal-icon-ring {
    position: absolute;
    inset: -7px;
    border-radius: 29px;
    border: 2px solid rgba(240,192,64,0.45);
    animation: ring-pulse 2.2s ease-in-out infinite;
}
@keyframes ring-pulse {
    0%,100% { opacity: 0.35; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.06); }
}
.install-modal-badge {
    background: rgba(240,192,64,0.12);
    border: 1px solid rgba(240,192,64,0.35);
    color: #f0c040;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.4px;
}
.install-modal-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #e6edf3;
    margin: 0 0 10px;
    line-height: 1.3;
}
.install-modal-subtitle {
    color: #8b949e;
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0 0 20px;
}
.install-modal-features {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.install-modal-feat {
    background: rgba(88,166,255,0.08);
    border: 1px solid rgba(88,166,255,0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.79rem;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 5px;
}
.install-modal-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f0c040 0%, #d4960a 100%);
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0d1117;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 24px rgba(240,192,64,0.4);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.install-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px rgba(240,192,64,0.55);
}
.install-modal-btn:active { transform: translateY(0); }
.install-modal-hint {
    color: #6e7681;
    font-size: 0.75rem;
    margin: 0 0 16px;
}
.install-modal-dismiss {
    background: none;
    border: none;
    color: #6e7681;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px 16px;
    text-decoration: underline;
    transition: color 0.15s;
    margin-top: 4px;
}
.install-modal-dismiss:hover { color: #c9d1d9; }
/* خطوات iOS */
.install-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    text-align: right;
}
.install-ios-step {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(88,166,255,0.06);
    border: 1px solid rgba(88,166,255,0.12);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #c9d1d9;
}
.install-ios-num {
    background: rgba(240,192,64,0.15);
    color: #f0c040;
    font-weight: 800;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.install-ios-step strong { color: #58a6ff; }
.install-ios-arrow-hint {
    color: #f0c040;
    font-size: 0.82rem;
    margin-bottom: 14px;
    animation: bounce-down 1.3s ease-in-out infinite;
}
@keyframes bounce-down {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/* ══════════════════════════════════════════════════════
   اتفاقية المستخدم
════════════════════════════════════════════════════════ */
.agr-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.85); z-index: 2000;
}
.agr-overlay.open { display: block; }

.agr-modal {
    display: none; position: fixed; inset: 0; z-index: 2100;
    background: #0d1117;
    flex-direction: column;
    overflow: hidden;
}
.agr-modal.open { display: flex; }

/* رأس الاتفاقية */
.agr-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex-shrink: 0;
    flex-wrap: wrap; gap: 6px;
}
.agr-header-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: #f0c040;
}
.agr-version { font-size: .74rem; color: #8b949e; }

/* جسم الاتفاقية — قابل للتمرير */
.agr-body {
    flex: 1; overflow-y: auto; padding: 20px;
    max-width: 760px; width: 100%; margin: 0 auto;
    line-height: 1.8;
}

/* نصوص الاتفاقية */
.agr-intro-badge {
    background: rgba(240,192,64,.1); border: 1px solid rgba(240,192,64,.3);
    border-radius: 10px; padding: 12px 16px; font-size: .88rem;
    color: #f0c040; font-weight: 600; margin-bottom: 20px; text-align: center;
}
.agr-section-title {
    font-size: 1.2rem; color: #e6edf3; font-weight: 800;
    margin-bottom: 6px; text-align: center;
}
.agr-lead {
    text-align: center; color: #58a6ff; font-weight: 600;
    font-size: 1rem; margin-bottom: 4px;
}
.agr-meta {
    text-align: center; color: #8b949e; font-size: .8rem; margin-bottom: 24px;
}
.agr-alert {
    background: rgba(248,81,73,.08); border: 1px solid rgba(248,81,73,.3);
    border-radius: 10px; padding: 14px 16px; font-size: .88rem;
    color: #f85149; margin-bottom: 22px; line-height: 1.7;
}
.agr-h3 {
    font-size: .98rem; color: #f0c040; font-weight: 700;
    margin: 22px 0 10px; padding-bottom: 6px;
    border-bottom: 1px solid #21262d;
}
.agr-body p { color: #c9d1d9; font-size: .88rem; margin-bottom: 10px; }
.agr-list {
    color: #c9d1d9; font-size: .87rem;
    padding-inline-start: 22px; margin-bottom: 12px;
}
.agr-list li { margin-bottom: 6px; line-height: 1.7; }
.agr-final-note {
    background: rgba(63,185,80,.07); border: 1px solid rgba(63,185,80,.25);
    border-radius: 10px; padding: 14px 16px; font-size: .85rem;
    color: #c9d1d9; line-height: 1.8; margin-top: 24px; margin-bottom: 8px;
}

/* ذيل الاتفاقية — ثابت */
.agr-footer {
    padding: 16px 20px;
    background: #161b22;
    border-top: 1px solid #30363d;
    display: flex; flex-direction: column; gap: 12px;
    flex-shrink: 0;
    max-width: 760px; width: 100%; margin: 0 auto;
    box-sizing: border-box;
}
.agr-footer { margin: 0; max-width: 100%; padding: 16px 20px; }

.agr-scroll-hint {
    text-align: center; color: #8b949e; font-size: .82rem;
    animation: bobble 2s infinite;
}
@keyframes bobble { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }

.agr-checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    color: #c9d1d9; font-size: .85rem; cursor: pointer;
    transition: opacity .3s;
}
.agr-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
    accent-color: #3fb950; cursor: pointer;
}

.agr-accept-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg,#3fb950,#2ea043);
    color: #fff; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 800; cursor: pointer;
    transition: opacity .2s; letter-spacing: .3px;
}
.agr-accept-btn:disabled {
    background: #21262d; color: #8b949e; cursor: not-allowed;
}
.agr-accept-btn:not(:disabled):hover { opacity: .88; }

.agr-start-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg,#f0c040,#e0a800);
    color: #0d1117; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 800; cursor: pointer;
    transition: opacity .2s;
}
.agr-start-btn:hover { opacity: .88; }

.agr-close-btn {
    width: 100%; padding: 12px;
    background: #21262d; border: 1px solid #30363d;
    color: #c9d1d9; border-radius: 10px;
    font-size: .95rem; font-weight: 600; cursor: pointer;
    transition: background .2s;
}
.agr-close-btn:hover { background: #30363d; }

/* شهادة القبول */
.agr-certificate {
    text-align: center; padding: 10px 0 30px;
}
.agr-cert-seal { font-size: 4rem; margin-bottom: 12px; }
.agr-cert-title { font-size: 1.3rem; color: #3fb950; font-weight: 800; margin-bottom: 6px; }
.agr-cert-sub { color: #8b949e; font-size: .88rem; margin-bottom: 24px; }
.agr-cert-box {
    background: #161b22; border: 1px solid #30363d; border-radius: 14px;
    overflow: hidden; text-align: start; margin-bottom: 20px;
}
.agr-cert-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid #21262d;
}
.agr-cert-row:last-child { border-bottom: none; }
.agr-cert-key { color: #8b949e; font-size: .82rem; min-width: 120px; flex-shrink: 0; padding-top: 1px; }
.agr-cert-val { color: #e6edf3; font-size: .85rem; word-break: break-all; }
.agr-code {
    font-family: monospace; font-size: .9rem; color: #f0c040;
    letter-spacing: 1px; font-weight: 700;
}
.agr-cert-notice {
    background: rgba(88,166,255,.08); border: 1px solid rgba(88,166,255,.2);
    border-radius: 10px; padding: 14px; font-size: .83rem;
    color: #8b949e; line-height: 1.7; text-align: start;
}

/* ══════════════════════════════════════════════════════
   الشريط الجانبي
════════════════════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1100;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

.sidebar {
    position: fixed;
    top: 0; bottom: 0;
    width: 280px;
    background: #0d1117;
    border-inline-start: 1px solid #21262d;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
}
[dir="rtl"] .sidebar { right: 0; transform: translateX(100%); }
[dir="ltr"] .sidebar { left: 0;  transform: translateX(-100%); }
.sidebar.open { transform: translateX(0) !important; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #21262d;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.2rem; font-weight: 700; color: #f0c040;
}
.sidebar-close {
    background: none; border: none; color: #8b949e;
    font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
    border-radius: 6px; transition: background .2s;
}
.sidebar-close:hover { background: #21262d; color: #e6edf3; }

.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #21262d;
}
.sidebar-avatar {
    width: 42px; height: 42px;
    background: #161b22;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    border: 1px solid #30363d;
}
.sidebar-user-info { display: flex; flex-direction: column; gap: 4px; }
.sidebar-user-info strong { color: #e6edf3; font-size: .95rem; }

.sidebar-nav { flex: 1; padding: 10px 12px; }
.sidebar-item {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 13px 14px;
    background: none; border: none;
    color: #c9d1d9; font-size: .95rem;
    border-radius: 10px; cursor: pointer;
    text-align: start;
    transition: background .18s, color .18s;
}
.sidebar-item:hover { background: #161b22; color: #f0c040; }
.sidebar-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-lang {
    padding: 14px 20px;
    border-top: 1px solid #21262d;
    display: flex; flex-direction: column; gap: 10px;
}
.sidebar-lang-label { color: #8b949e; font-size: .85rem; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid #21262d;
}
.sidebar-logout {
    width: 100%; padding: 11px;
    background: #21262d; border: 1px solid #30363d;
    color: #f85149; border-radius: 8px;
    cursor: pointer; font-size: .9rem; font-weight: 600;
    transition: background .2s;
}
.sidebar-logout:hover { background: #2d1117; }

/* ── شارة المستخدمين المتصلين ─────────────────────── */
.online-users-badge {
    display: flex; align-items: center; gap: 5px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: .78rem;
    color: #e6edf3;
    font-weight: 600;
}
.online-dot {
    width: 7px; height: 7px;
    background: #3fb950;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0%,100% { opacity: 1; }
    50%      { opacity: .4; }
}

/* ══════════════════════════════════════════════════════
   مودال التقييم
════════════════════════════════════════════════════════ */
.feedback-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 1300;
}
.feedback-overlay.open { display: block; }
.feedback-modal {
    display: none; position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #0d1117;
    border-top: 1px solid #30363d;
    border-radius: 20px 20px 0 0;
    z-index: 1400;
    padding-bottom: env(safe-area-inset-bottom);
    max-height: 85vh; overflow-y: auto;
}
.feedback-modal.open { display: block; }
.feedback-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #21262d;
}
.feedback-header h3 { color: #e6edf3; font-size: 1rem; margin: 0; }
.feedback-header button {
    background: none; border: none; color: #8b949e;
    font-size: 1.1rem; cursor: pointer;
}
.feedback-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.feedback-desc { color: #8b949e; font-size: .88rem; margin: 0; }
.feedback-rating { display: flex; flex-direction: column; gap: 10px; color: #c9d1d9; font-size: .9rem; }
.rating-stars { display: flex; gap: 6px; flex-wrap: wrap; }
.r-num {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: #161b22; border: 1px solid #30363d;
    border-radius: 8px; color: #8b949e;
    font-size: .9rem; font-weight: 700;
    cursor: pointer; transition: all .15s;
}
.r-num:hover, .r-num.selected { background: #f0c040; color: #0d1117; border-color: #f0c040; }
.rating-selected { font-size: 1.1rem; font-weight: 700; color: #f0c040; }
.feedback-textarea {
    width: 100%; padding: 12px;
    background: #161b22; border: 1px solid #30363d;
    border-radius: 10px; color: #e6edf3;
    font-size: .9rem; resize: none; font-family: inherit;
    box-sizing: border-box;
}
.feedback-textarea:focus { outline: none; border-color: #f0c040; }
.feedback-submit {
    width: 100%; padding: 13px;
    background: #f0c040; color: #0d1117;
    border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: opacity .2s;
}
.feedback-submit:hover { opacity: .85; }
.feedback-success { color: #3fb950; text-align: center; font-weight: 600; padding: 8px; }

/* ── تبديل اللغة في القائمة ─────────────────────────── */
.lang-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.lang-toggle {
    display: flex;
    gap: 6px;
    width: 100%;
}
.lang-btn {
    flex: 1;
    padding: 7px;
    border: 1px solid #30363d;
    border-radius: 7px;
    background: #0d1117;
    color: #8b949e;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
}
.lang-btn:hover { border-color: #58a6ff; color: #e6edf3; }
.lang-active { background: #1f6feb !important; color: #fff !important; border-color: #1f6feb !important; }

/* ── مودالات من نحن / سياسة الخصوصية ────────────────── */
.info-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 1300;
}
.info-overlay.open { display: block; }
.info-modal {
    display: none; position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #161b22;
    border-top: 1px solid #30363d;
    border-radius: 20px 20px 0 0;
    z-index: 1400;
    padding-bottom: env(safe-area-inset-bottom);
    max-height: 80vh; overflow-y: auto;
}
.info-modal.open { display: block; }
.info-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #21262d;
    position: sticky; top: 0; background: #161b22; z-index: 1;
}
.info-modal-head h3 { color: #e6edf3; font-size: 1rem; margin: 0; }
.info-modal-head button {
    background: none; border: none; color: #8b949e;
    font-size: 1.2rem; cursor: pointer; padding: 4px 8px;
}
.info-modal-body {
    padding: 20px;
    color: #c9d1d9;
    font-size: .9rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ── إشعارات — زر السايدبار ─────────────────────────── */
.sidebar-notif-row {
    display: flex; align-items: center; gap: 4px;
    padding: 0 4px;
}
.sidebar-item-notif { flex: 1; }
.notif-status-badge {
    font-size: .72rem; font-weight: 700; white-space: nowrap;
    padding: 3px 8px; border-radius: 99px;
    background: #21262d; color: #8b949e;
}

/* ── Toast إشعار داخلي (وهو مفتوح) ─────────────────── */
.notif-toast {
    position: fixed; top: 72px;
    inset-inline-end: 16px;
    width: min(340px, calc(100vw - 32px));
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: 14px 14px 14px 16px;
    display: flex; align-items: flex-start; gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    z-index: 3000;
    animation: toast-in .3s ease;
    transition: opacity .4s, transform .4s;
}
.notif-toast-hide { opacity: 0; transform: translateY(-10px); }
@keyframes toast-in {
    from { opacity:0; transform:translateY(-12px); }
    to   { opacity:1; transform:translateY(0); }
}
.notif-toast-icon { font-size: 1.6rem; flex-shrink: 0; }
.notif-toast-text { flex: 1; }
.notif-toast-text strong { display: block; color: #e6edf3; font-size: .88rem; margin-bottom: 3px; }
.notif-toast-text span   { color: #8b949e; font-size: .82rem; line-height: 1.5; }
.notif-toast-close {
    background: none; border: none; color: #8b949e;
    font-size: 1rem; cursor: pointer; padding: 2px 6px; flex-shrink: 0;
    border-radius: 4px; transition: color .2s;
}
.notif-toast-close:hover { color: #e6edf3; }

/* --- شريط التنقل العلوي --- */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    padding: 0 28px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 500;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
}
.brand-logo {
    font-size: 1.6rem;
    color: #58a6ff;
    line-height: 1;
}
.brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #c9d1d9;
    letter-spacing: 1px;
    white-space: nowrap;
}
.brand-accent { color: #58a6ff; }

.navbar-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}
.nav-username {
    color: #c9d1d9;
    font-size: 0.9rem;
    font-weight: 600;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-btn-vip {
    background: #238636;
    color: #fff;
}
.nav-btn-vip:hover { background: #2ea043; }

.nav-btn-logout {
    background: transparent;
    color: #8b949e;
    border: 1px solid #30363d;
}
.nav-btn-logout:hover { border-color: #f85149; color: #f85149; }

.nav-btn-menu {
    background: #161b22;
    color: #c9d1d9;
    border: 1px solid #30363d;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    padding: 8px 16px;
}
.nav-btn-menu:hover { border-color: #58a6ff; color: #58a6ff; }
.menu-icon { font-size: 1rem; }

@media(max-width: 640px) {
    .top-navbar { padding: 0 12px; gap: 8px; }
    .navbar-center { display: flex; gap: 6px; }
    .tz-badge { display: none; }
    .brand-name { font-size: 0.9rem; }
    .nav-btn { padding: 7px 10px; font-size: 0.8rem; }
}
.subscription-badge {
    background: rgba(88, 166, 255, 0.12);
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.35);
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 800;
}
.tz-badge {
    background: rgba(255, 152, 0, 0.10);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.30);
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.business-dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 14px;
}
.stat-box span {
    display: block;
    color: #8b949e;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.stat-box strong {
    color: #c9d1d9;
    font-size: 1.4rem;
}
.history-panel {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
}
.history-panel h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #ffd966;
    margin: 0 0 12px;
}
.history-panel h3 span {
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 400;
}
.trade-history-item {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #30363d;
}
.trade-history-item:first-child { border-top: none; }
.trade-history-item strong { color: #c9d1d9; }
.trade-history-item span { color: #8b949e; font-size: 0.85rem; }
.trade-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.trade-action-btn.loss { background: #da3633; }
.trade-action-btn.loss:hover { background: #f85149; }

@media(max-width: 760px) {
    .account-bar { align-items: flex-start; flex-direction: column; }
    .business-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trade-history-item { grid-template-columns: 1fr; }
    .trade-actions { justify-content: flex-start; }
}

/* ticker محذوف */

.container { max-width: 1400px; margin: auto; padding: 20px; }
h1 {
    text-align: center; color: #ffd966; margin-top: 10px; margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(255, 217, 102, 0.2);
}
.sub { text-align: center; color: #8b949e; margin-top: 0; font-size: 0.9em; margin-bottom: 20px;}

/* --- أزرار تبديل نوع التداول --- */
.mode-toggle-container {
    display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px;
}
.mode-hint {
    font-size: 0.82rem; color: #8b949e;
    background: rgba(88,166,255,0.06); border: 1px solid rgba(88,166,255,0.15);
    padding: 5px 14px; border-radius: 20px;
}

/* بطاقة الترحيب */
.onboarding-card {
    background: linear-gradient(135deg, rgba(88,166,255,0.1), rgba(255,217,102,0.06));
    border: 1px solid rgba(88,166,255,0.35);
    border-radius: 12px; padding: 16px 20px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; transition: opacity 0.3s;
}
.onboarding-content { display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.onboarding-icon { font-size: 1.8rem; flex-shrink: 0; }
.onboarding-content strong { color: #ffd966; display: block; margin-bottom: 4px; }
.onboarding-content p { color: #8b949e; font-size: 0.88rem; margin: 0; line-height: 1.6; }
.onboarding-close {
    background: rgba(88,166,255,0.15); border: 1px solid rgba(88,166,255,0.3);
    color: #58a6ff; padding: 8px 18px; border-radius: 8px;
    cursor: pointer; font-weight: 700; font-size: 0.88rem; white-space: nowrap;
    transition: all 0.15s;
}
.onboarding-close:hover { background: rgba(88,166,255,0.3); }
.mode-toggle {
    display: flex; background: #21262d; border-radius: 12px; padding: 5px;
    border: 1px solid #30363d; box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.mode-toggle input { display: none; }
.mode-toggle label {
    padding: 10px 25px; cursor: pointer; border-radius: 8px; font-weight: bold;
    color: #8b949e; transition: all 0.3s ease; font-size: 0.95em;
}
.mode-toggle input:checked + label {
    background: #58a6ff; color: #0d1117; box-shadow: 0 2px 10px rgba(88, 166, 255, 0.3);
}

.controls {
    display: flex; gap: 15px; background: #161b22; padding: 15px;
    border-radius: 12px; margin-bottom: 20px; flex-wrap: wrap;
    align-items: center; border: 1px solid #30363d; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative; z-index: 100;
}
.controls label { font-weight: bold; color: #ffd966; }

/* القائمة الذكية */
.custom-dropdown { position: relative; min-width: 200px; }
.dropdown-selected { 
    background: #0d1117; border: 1px solid #30363d; padding: 10px 15px; 
    border-radius: 8px; cursor: pointer; color: #c9d1d9; display: flex; 
    justify-content: space-between; align-items: center; font-size: 14px;
}
.dropdown-selected:hover { border-color: #ffd966; }
.dropdown-menu { 
    position: absolute; top: 100%; left: 0; right: 0; background: #161b22; 
    border: 1px solid #30363d; border-radius: 8px; margin-top: 5px; 
    display: none; max-height: 350px; overflow-y: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.dropdown-menu.show { display: block; }
.dropdown-search { padding: 10px; position: sticky; top: 0; background: #161b22; border-bottom: 1px solid #30363d; z-index: 2; }
.dropdown-search input { 
    width: 100%; padding: 10px; background: #0d1117; border: 1px solid #30363d; 
    color: white; border-radius: 5px; outline: none; font-size: 14px;
}
.dropdown-search input:focus { border-color: #58a6ff; }
.dropdown-option { 
    padding: 10px 15px; cursor: pointer; border-bottom: 1px solid #21262d; 
    transition: background 0.2s; font-size: 14px; display: flex; justify-content: space-between;
}
.dropdown-option:hover { background: #1f6feb; color: white; }
.dropdown-option:hover .asset-api-tag { color: #fff; border-color: rgba(255,255,255,0.4); }
.dropdown-option.major { background: rgba(229,194,88,0.04); }
.dropdown-option.major .asset-disp { color: #ffd966; font-weight: 700; }

/* رؤوس مجموعات القائمة */
.dropdown-group-header {
    padding: 7px 14px 5px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #8b949e;
    text-transform: uppercase;
    background: #1c2128;
    border-top: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 1;
}
.dropdown-group-header:first-child { border-top: none; }

/* عناصر الخيار المحسّنة */
.asset-disp {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e6edf3;
    flex: 1;
}
.asset-nm {
    font-size: 0.75rem;
    color: #8b949e;
    margin: 0 6px;
}

/* شارة API */
.asset-api-tag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.binance-tag { color: #f0b90b; border-color: rgba(240,185,11,0.4); background: rgba(240,185,11,0.06); }
.yahoo-tag  { color: #7c3aed; border-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.06); }

.btn-add {
    background: #238636; color: white; border: none; padding: 10px 15px;
    border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s;
}
.btn-add:hover { background: #2ea043; }

.btn-evaluate-now {
    background: linear-gradient(135deg, rgba(255,217,102,0.18), rgba(255,217,102,0.08));
    color: #ffd966; border: 1px solid rgba(255,217,102,0.45);
    padding: 10px 18px; border-radius: 8px; cursor: pointer;
    font-weight: 700; font-size: 0.92rem; transition: all 0.2s;
    white-space: nowrap;
}
.btn-evaluate-now:hover {
    background: linear-gradient(135deg, rgba(255,217,102,0.32), rgba(255,217,102,0.16));
    border-color: #ffd966; box-shadow: 0 0 12px rgba(255,217,102,0.2);
}

.controls select {
    padding: 10px 15px; border-radius: 8px; border: 1px solid #30363d;
    background: #0d1117; color: #c9d1d9; font-size: 14px; min-width: 120px;
    cursor: pointer; outline: none; transition: border-color 0.3s;
}
.controls select:focus { border-color: #ffd966; }

/* قائمة المراقبة */
.watchlist-container {
    width: 100%; background: #0d1117; padding: 15px; border-radius: 8px;
    border: 1px dashed #30363d; margin-top: 15px; display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; align-items: center;
}
.watchlist-title { width: 100%; text-align: center; font-size: 0.85em; color: #8b949e; margin-bottom: 5px; }
.watch-chip {
    background: #21262d; border: 1px solid #58a6ff; color: #c9d1d9;
    padding: 5px 12px; border-radius: 15px; font-size: 0.85em; display: flex; align-items: center; gap: 8px;
}
.watch-chip button {
    background: transparent; border: none; color: #f85149; cursor: pointer;
    font-weight: bold; padding: 0; font-size: 1.1em; line-height: 1;
}
.watch-chip button:hover { color: #ff7b72; }

.live-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(46, 160, 67, 0.1); color: #2ea043;
    padding: 8px 15px; border-radius: 20px; font-weight: bold;
    font-size: 0.9em; border: 1px solid rgba(46, 160, 67, 0.3);
}
.countdown-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(88, 166, 255, 0.1); color: #58a6ff;
    padding: 8px 15px; border-radius: 20px; font-weight: bold;
    font-size: 0.9em; border: 1px solid rgba(88, 166, 255, 0.3);
}

.dot {
    width: 8px; height: 8px; background-color: #2ea043;
    border-radius: 50%; animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 160, 67, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 160, 67, 0); }
}

.chart-container {
    position: relative; width: 100%; height: 500px;
    background: #161b22; border-radius: 12px; border: 1px solid #30363d;
    margin-bottom: 20px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.2); z-index: 1;
}
#chart { width: 100%; height: 100%; }

.panels-wrapper { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media(min-width: 900px) { .panels-wrapper { grid-template-columns: 1fr 1fr; } }

.signals-panel, .radar-panel {
    background: #161b22; border-radius: 12px; padding: 20px;
    border: 1px solid #30363d; max-height: 600px; overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.signals-panel h3, .radar-panel h3 {
    margin-top: 0; color: #ffd966; border-bottom: 1px solid #30363d;
    padding-bottom: 12px; display: flex; justify-content: space-between; align-items: center;
}
.signals-panel h3 span, .radar-panel h3 span {
    font-size: 0.75em; color: #8b949e; font-weight: normal; background: #21262d; padding: 6px 10px; border-radius: 8px;
}

.signal-item {
    padding: 18px; margin: 12px 0; border-radius: 10px; background: linear-gradient(145deg, #1e2329, #161b22);
    display: flex; flex-direction: column; border-right: 6px solid; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.signal-buy { border-right-color: #2ea043; box-shadow: -4px 0 15px rgba(46, 160, 67, 0.05); }
.signal-sell { border-right-color: #f85149; box-shadow: -4px 0 15px rgba(248, 81, 73, 0.05); }
.signal-expired { border-right-color: #484f58; background: #161b22; opacity: 0.5; }

.signal-header { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 12px; font-size: 1.1em; }

.deadline-active {
    background: rgba(229, 194, 88, 0.1); color: #e5c258; padding: 8px 12px; border-radius: 6px; font-size: 0.9em;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; border: 1px solid rgba(229, 194, 88, 0.2);
}
.deadline-expired {
    background: rgba(248, 81, 73, 0.1); color: #f85149; padding: 8px 12px; border-radius: 6px; font-size: 0.9em;
    text-align: center; margin-bottom: 12px; border: 1px solid rgba(248, 81, 73, 0.2);
}

.timer-bar-bg { width: 100%; height: 4px; background: #30363d; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.timer-bar-fill { height: 100%; transition: width 1s linear; }
.signal-buy  .timer-bar-fill { background: #2ea043; }
.signal-sell .timer-bar-fill { background: #f85149; }
/* عداد العقود الآجلة: يتغير لون الشريط حسب urgency */
.timer-fill-futures { background: #58a6ff !important; }

/* عداد عاجل (أقل من 25%): أحمر */
.deadline-urgent {
    background: rgba(248,81,73,0.12); color: #f85149; padding: 8px 12px; border-radius: 6px; font-size: 0.9em;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
    border: 1px solid rgba(248,81,73,0.3);
}
/* عداد تحذيري (25-60%): أصفر */
.deadline-warn {
    background: rgba(229,194,88,0.12); color: #e5c258; padding: 8px 12px; border-radius: 6px; font-size: 0.9em;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
    border: 1px solid rgba(229,194,88,0.25);
}

/* ── بطاقة أسعار العقود الآجلة ── */
.futures-entry-box {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    padding: 10px 14px;
    margin: 8px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.fep-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 2px 0;
}
.fep-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}
.fep-entry { padding-bottom: 4px; }
.fep-label { color: #8b949e; }
.fep-value { font-weight: 600; font-family: monospace; display: flex; align-items: center; gap: 6px; }
.fep-entry-price { color: #e6edf3; font-size: 1rem; letter-spacing: 0.02em; }
.fep-tp-val { color: #2ea043; }
.fep-sl-val { color: #f85149; }
.fep-pct { font-size: 0.78rem; font-weight: 700; }
.pct-pos { color: #2ea043; }
.pct-neg { color: #f85149; }

.signal-targets { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: bold; font-size: 0.95em; background: rgba(0,0,0,0.2); padding: 8px; border-radius: 6px; }
.target-tp { color: #2ea043; }
.target-sl { color: #f85149; }

.signal-expiry { justify-content: center; color: #e5c258; }

.signal-details { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.85em; color: #8b949e; align-items: center; }
.signal-details span { background: #2d333b; padding: 5px 10px; border-radius: 8px; }

.signal-prob { font-weight: bold; color: white !important; }
.prob-high { background: #238636 !important; }
.prob-med { background: #d29922 !important; color: #000 !important; }
.prob-low { background: #484f58 !important; }

.radar-panel { border-color: #58a6ff; }
.radar-panel h3 { color: #58a6ff; border-bottom-color: #58a6ff; }

.radar-item {
    display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; margin: 8px 0; background: #21262d;
    border-radius: 8px; border-right: 4px solid; cursor: pointer; transition: transform 0.2s ease, background-color 0.2s ease;
}
.radar-item:hover { transform: translateX(-5px) scale(1.02); background-color: #2d333b; }
.radar-item.buy { border-right-color: #2ea043; }
.radar-item.sell { border-right-color: #f85149; }
.radar-symbol { font-weight: bold; font-size: 1.05em; }
.radar-name { font-size: 0.75rem; color: #8b949e; margin-top: 2px; }
.radar-info { display: flex; gap: 10px; align-items: center; font-size: 0.9em; }

/* تلميح "تحليلي" بجانب نسبة النجاح */
.prob-note {
    font-size: 0.7rem; font-weight: 400; color: #8b949e;
    background: #21262d; padding: 2px 6px; border-radius: 5px; margin-right: 4px;
}

/* --- نافذة التنبيه المبكر --- */
.early-warning-box {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(229, 194, 88, 0.95); color: #0d1117; padding: 15px 30px;
    border-radius: 12px; font-weight: bold; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 9999; display: none; text-align: center; border: 2px solid #fff;
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1em; min-width: 300px;
}
.early-warning-box span { display: block; margin-top: 5px; font-size: 0.9em; }
@keyframes slideDown { 0% { top: -80px; opacity: 0; } 100% { top: 20px; opacity: 1; } }

.footer { text-align: center; margin-top: 25px; color: #8b949e; font-size: 0.85em; padding-bottom: 20px;}
#loadingMsg { color: #ffd966; font-weight: bold; margin-left: 10px; display: none; }

/* --- Dropdown القائمة الرئيسية --- */
.nav-dropdown { position: relative; }
.dropdown-arrow { font-size: 0.7rem; opacity: 0.7; }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    display: none;
    z-index: 600;
    animation: dropIn 0.18s ease;
}
.nav-dropdown-menu.show { display: block; }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
    width: 100%; text-align: right; background: none; border: none;
    padding: 13px 18px; color: #c9d1d9; font-size: 0.95rem;
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    transition: background 0.15s;
}
.nav-dropdown-item:hover { background: #21262d; color: #58a6ff; }
.nav-dropdown-item span { font-size: 1.1rem; }
.nav-dropdown-divider { height: 1px; background: #30363d; margin: 4px 0; }

/* ============================================================
   مودال تقييم الدخول
   ============================================================ */
.eval-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.eval-modal-overlay.active { opacity: 1; pointer-events: all; }

.eval-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(680px, 96vw); max-height: 90vh;
    background: #161b22; border: 1px solid #30363d; border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    z-index: 1001; display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s; overflow: hidden;
}
.eval-modal.active { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }

.eval-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid #30363d;
    background: #0d1117; flex-shrink: 0;
}
.eval-modal-header h2 { margin: 0; color: #c9d1d9; font-size: 1.05rem; font-weight: 700; }

.eval-modal-body { overflow-y: auto; flex: 1; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }

.eval-loading { text-align: center; color: #8b949e; padding: 40px; font-size: 1.1rem; }
.eval-error   { text-align: center; color: #f85149; padding: 30px; }

/* بطاقة النتيجة */
.eval-result-header {
    border-radius: 12px; padding: 20px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.eval-direction { font-size: 2rem; font-weight: 800; letter-spacing: 1px; }
.eval-symbol    { color: #8b949e; font-size: 0.9rem; }
.eval-price     { color: #c9d1d9; font-size: 1rem; }
.eval-prob-value{ font-size: 1rem; }
.eval-neutral-msg { color: #8b949e; font-size: 0.9rem; margin-top: 4px; }

.eval-prob-bar-wrap {
    width: 100%; height: 8px; background: #30363d; border-radius: 4px; overflow: hidden; margin-top: 4px;
}
.eval-prob-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }

/* تحذير الوقت */
.eval-time-warn {
    background: rgba(248,81,73,0.1); border: 1px solid rgba(248,81,73,0.3);
    color: #f85149; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; text-align: center;
}

/* مؤقت الشمعة */
.eval-timer {
    background: #21262d; border-radius: 10px; padding: 14px 18px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.eval-timer span:first-child { color: #8b949e; font-size: 0.85rem; flex: 1; }
.eval-timer-bar { width: 100%; height: 5px; background: #30363d; border-radius: 3px; overflow: hidden; }
.eval-timer-fill { height: 100%; border-radius: 3px; transition: width 0.5s linear; }

/* الأهداف */
.eval-targets {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.eval-target {
    background: #21262d; border-radius: 8px; padding: 12px;
    text-align: center; font-size: 0.85rem; border: 1px solid #30363d;
}
.eval-target.tp { border-color: rgba(46,160,67,0.3); color: #2ea043; }
.eval-target.sl { border-color: rgba(248,81,73,0.3); color: #f85149; }
.eval-target.rr { color: #58a6ff; border-color: rgba(88,166,255,0.3); }
.eval-target strong { display: block; margin-top: 4px; font-size: 1rem; }

/* المؤشرات */
.eval-indicators-title { color: #8b949e; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.eval-indicators-list  { display: flex; flex-direction: column; gap: 6px; }
.eval-indicator {
    display: flex; align-items: center; gap: 12px;
    background: #21262d; border-radius: 8px; padding: 11px 14px;
}
.eval-ind-icon  { font-size: 1rem; flex-shrink: 0; }
.eval-ind-body  { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.eval-ind-label { color: #c9d1d9; font-size: 0.85rem; font-weight: 600; }
.eval-ind-value { font-size: 0.8rem; }
.eval-ind-weight{ font-size: 0.8rem; font-weight: 700; color: #58a6ff; min-width: 28px; text-align: left; }

/* نقاط الشراء والبيع */
.eval-scores {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.eval-score {
    border-radius: 8px; padding: 14px; text-align: center;
}
.eval-score span { display: block; font-size: 0.8rem; margin-bottom: 4px; }
.eval-score strong { font-size: 1.8rem; font-weight: 800; }
.eval-score.buy  { background: rgba(46,160,67,0.08); border: 1px solid rgba(46,160,67,0.2); }
.eval-score.buy  span { color: #2ea043; }
.eval-score.buy  strong { color: #2ea043; }
.eval-score.sell { background: rgba(248,81,73,0.08); border: 1px solid rgba(248,81,73,0.2); }
.eval-score.sell span { color: #f85149; }
.eval-score.sell strong { color: #f85149; }

.eval-disclaimer { color: #484f58; font-size: 0.78rem; text-align: center; margin: 0; }

@media(max-width: 600px) {
    .eval-targets { grid-template-columns: 1fr; }
}

/* --- مودال سجل الصفقات --- */
.trade-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.trade-modal-overlay.active { opacity: 1; pointer-events: all; }

.trade-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(1100px, 96vw);
    max-height: 88vh;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    z-index: 1001;
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    overflow: hidden;
}
.trade-modal.active {
    opacity: 1; pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.trade-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 28px; border-bottom: 1px solid #30363d;
    background: #0d1117; flex-shrink: 0;
}
.modal-title-group { display: flex; align-items: center; gap: 12px; }
.modal-icon { font-size: 1.4rem; }
.trade-modal-header h2 { margin: 0; color: #c9d1d9; font-size: 1.15rem; font-weight: 700; }
.modal-close-btn {
    background: none; border: 1px solid #30363d; color: #8b949e;
    font-size: 1rem; width: 32px; height: 32px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.modal-close-btn:hover { border-color: #f85149; color: #f85149; background: rgba(248,81,73,0.08); }

.modal-stats-bar {
    display: flex; align-items: center;
    border-bottom: 1px solid #30363d; flex-shrink: 0; flex-wrap: wrap;
}
.modal-stat {
    padding: 16px 24px; text-align: center;
    border-left: 1px solid #30363d; flex: 1;
}
.modal-stat:last-of-type { border-left: none; }
.export-csv-btn {
    margin: 8px 16px 8px auto;
    padding: 8px 16px;
    background: rgba(88,166,255,0.1);
    border: 1px solid rgba(88,166,255,0.3);
    color: #58a6ff; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: all 0.15s;
}
.export-csv-btn:hover { background: rgba(88,166,255,0.22); border-color: #58a6ff; }
.export-pdf-btn {
    margin: 8px 4px 8px 4px;
    padding: 8px 16px;
    background: rgba(248,81,73,0.1);
    border: 1px solid rgba(248,81,73,0.3);
    color: #f85149; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: all 0.15s;
}
.export-pdf-btn:hover { background: rgba(248,81,73,0.22); border-color: #f85149; }
.export-xlsx-btn {
    margin: 8px 4px 8px 4px;
    padding: 8px 16px;
    background: rgba(46,160,67,0.1);
    border: 1px solid rgba(46,160,67,0.3);
    color: #2ea043; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: all 0.15s;
}
.export-xlsx-btn:hover { background: rgba(46,160,67,0.22); border-color: #2ea043; }

/* ── شريط الفلاتر ─────────────────────────────────────────── */
.trade-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(22,27,34,0.7);
    border-top: 1px solid rgba(48,54,61,0.8);
    border-bottom: 1px solid rgba(48,54,61,0.8);
}
.trade-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.filter-label {
    font-size: 0.75rem;
    color: #8b949e;
    font-weight: 500;
}
.filter-input {
    background: rgba(13,17,23,0.9);
    border: 1px solid rgba(48,54,61,0.9);
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.82rem;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.15s;
    direction: ltr;
}
.filter-input:focus { border-color: #58a6ff; }
.filter-date { min-width: 130px; color-scheme: dark; }
.filter-reset-btn {
    align-self: flex-end;
    padding: 6px 14px;
    background: rgba(248,81,73,0.08);
    border: 1px solid rgba(248,81,73,0.25);
    border-radius: 6px;
    color: #f85149;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.filter-reset-btn:hover { background: rgba(248,81,73,0.18); border-color: #f85149; }

/* ── عمود الرقم التعريفي ───────────────────────────────────── */
.th-id { color: #d4a017 !important; font-size: 0.8rem; white-space: nowrap; }
.td-ish-id-cell { white-space: nowrap; }
.td-ish-id {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #d4a017;
    background: rgba(212,160,23,0.08);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.5px;
}

@media(max-width:760px) {
    .trade-filters-bar { gap: 8px; padding: 10px 12px; }
    .trade-filter-group { min-width: 120px; }
}

.modal-stat span { display: block; font-size: 0.8rem; color: #8b949e; margin-bottom: 6px; }
.modal-stat strong { font-size: 1.5rem; color: #c9d1d9; }
.modal-stat.win strong { color: #2ea043; }
.modal-stat.loss strong { color: #f85149; }
.modal-stat.rate strong { color: #58a6ff; }

.modal-table-wrap { overflow-y: auto; flex: 1; }

.trade-table {
    width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.trade-table thead {
    position: sticky; top: 0; background: #21262d; z-index: 2;
}
.trade-table th {
    padding: 12px 16px; text-align: right; color: #8b949e;
    font-weight: 600; font-size: 0.8rem; letter-spacing: 0.5px;
    border-bottom: 1px solid #30363d; white-space: nowrap;
}
.trade-table td {
    padding: 13px 16px; border-bottom: 1px solid #21262d;
    color: #c9d1d9; white-space: nowrap; vertical-align: middle;
}
.trade-table tr:hover td { background: rgba(88,166,255,0.04); }
.table-empty { text-align: center; color: #8b949e; padding: 40px !important; }

.td-symbol { font-weight: 700; color: #fff; }
.td-buy  { color: #58a6ff; font-weight: 600; }
.td-sell { color: #f85149; font-weight: 600; }
.td-win  { color: #2ea043; font-weight: 700; }
.td-loss { color: #f85149; font-weight: 700; }
.td-open { color: #e5c258; }
.td-auto { font-size: 0.75rem; color: #58a6ff; display: block; }
.td-price { font-family: monospace; font-size: 0.88rem; }
.td-close-price { font-family: monospace; font-size: 0.88rem; color: #8b949e; }

.tbl-action-btn {
    border: none; border-radius: 6px; padding: 5px 10px;
    font-size: 0.8rem; cursor: pointer; font-weight: 600; margin: 0 2px;
}
.tbl-action-win { background: rgba(46,160,67,0.15); color: #2ea043; border: 1px solid rgba(46,160,67,0.3); }
.tbl-action-win:hover { background: #238636; color: #fff; }
.tbl-action-loss { background: rgba(248,81,73,0.12); color: #f85149; border: 1px solid rgba(248,81,73,0.3); }
.tbl-action-loss:hover { background: #da3633; color: #fff; }

/* ── ربح/خسارة % ── */
.pnl-pos { color: #2ea043; font-weight: 700; font-family: monospace; }
.pnl-neg { color: #f85149; font-weight: 700; font-family: monospace; }

/* ── مدة الصفقة ── */
.td-duration { color: #8b949e; font-size: 0.85rem; text-align: center; white-space: nowrap; }

/* ── ملاحظة الخسارة ── */
.loss-note-row td {
    background: rgba(248,81,73,0.06) !important;
    border-top: none !important;
    padding: 5px 14px 8px !important;
    font-size: 0.82rem;
    color: #c9a0a0;
    border-right: 3px solid rgba(248,81,73,0.4);
}

/* ── شارة "يُراقَب" ── */
.monitor-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: #58a6ff;
    background: rgba(88,166,255,0.1);
    border: 1px solid rgba(88,166,255,0.25);
    border-radius: 5px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* ── تلوين صف الربح والخسارة بخفة ── */
.row-win  td { background: rgba(46,160,67,0.04) !important; }
.row-loss td { background: rgba(248,81,73,0.04) !important; }

.mini-stats:hover .stat-box { border-color: #58a6ff; }
.mini-stats .stat-box { transition: border-color 0.2s; }
.result-win { color: #2ea043 !important; font-weight: bold; }
.result-loss { color: #f85149 !important; font-weight: bold; }
.result-open { color: #e5c258 !important; }

@media(max-width: 760px) {
    .modal-stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   🎓 الجولة التفاعلية — 4-Curtains Spotlight Tour
   ============================================================ */

/* الحاوية الجذرية — لا خلفية لها، الستائر هي من تُظلم */
#tourWrap {
    position: fixed;
    inset: 0;
    z-index: 99000;
    pointer-events: none; /* نتيح للستائر والبطاقة تحديد pointer-events بأنفسهم */
}

/* الستائر الأربع — تحجب كل شيء خارج "الثقب" */
.t-curtain {
    position: fixed;
    background: rgba(0, 0, 0, 0.86);
    pointer-events: all;   /* تمنع النقر على كل ما وراءها */
    z-index: 99001;
    transition: top .28s ease, left .28s ease,
                width .28s ease, height .28s ease;
}

/* الإطار الذهبي حول العنصر المضيء */
.t-frame {
    position: fixed;
    border-radius: 10px;
    border: 2px solid rgba(255, 217, 102, 0.85);
    box-shadow:
        0 0 0 4px rgba(255, 217, 102, 0.12),
        0 0 22px 4px rgba(255, 217, 102, 0.22);
    pointer-events: none;  /* العنصر الداخلي يبقى مرئياً ولكن غير قابل للضغط */
    z-index: 99002;
    transition: top .28s ease, left .28s ease,
                width .28s ease, height .28s ease;
    animation: tFramePulse 2s ease-in-out infinite;
}
@keyframes tFramePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,217,102,0.12), 0 0 22px 4px rgba(255,217,102,0.22); }
    50%       { box-shadow: 0 0 0 6px rgba(255,217,102,0.20), 0 0 32px 8px rgba(255,217,102,0.32); }
}

/* بطاقة الشرح */
.t-card {
    position: fixed;
    z-index: 99010;
    pointer-events: all;   /* النقر يعمل فقط هنا */
    width: min(370px, calc(100vw - 32px));
    background: #161b22;
    border: 1px solid rgba(255, 217, 102, 0.35);
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
    animation: tCardIn .25s cubic-bezier(.4,0,.2,1);
}
@keyframes tCardIn {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);   }
}
.t-card-exit {
    animation: tCardOut .18s ease forwards !important;
}
@keyframes tCardOut {
    to { opacity: 0; transform: translateY(-6px) scale(.97); }
}

/* شريط التقدم */
.t-progress-bar {
    height: 3px;
    background: #30363d;
    border-radius: 2px;
    margin-bottom: 14px;
    overflow: hidden;
}
.t-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd966, #ff9800);
    border-radius: 2px;
    transition: width .4s ease;
}

/* عداد */
.t-counter {
    font-size: 0.73rem;
    color: #8b949e;
    margin-bottom: 8px;
    letter-spacing: .06em;
}

/* عنوان */
.t-title {
    margin: 0 0 11px;
    color: #ffd966;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.4;
}

/* نص */
.t-text {
    margin: 0 0 18px;
    color: #c9d1d9;
    font-size: 0.91rem;
    line-height: 1.85;
}
.t-text b { color: #ffd966; }

/* أزرار */
.t-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.t-btn-skip {
    background: none; border: none;
    color: #484f58; font-size: 0.82rem;
    cursor: pointer; padding: 0;
    transition: color .15s;
}
.t-btn-skip:hover { color: #8b949e; }

.t-btn-next {
    background: linear-gradient(135deg, #ffd966, #f0a500);
    color: #0d1117; border: none;
    padding: 10px 24px; border-radius: 10px;
    font-weight: 800; font-size: 0.94rem;
    cursor: pointer; transition: all .2s;
}
.t-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,217,102,.4);
}
.t-btn-next:active { transform: translateY(0); }

/* موبايل */
@media (max-width: 600px) {
    .t-card  { padding: 16px 14px 14px; }
    .t-title { font-size: .96rem; }
    .t-text  { font-size: .85rem; }
    .t-btn-next { padding: 9px 18px; }
}

/* ================================================================
   صفحة "تداول الآن" — Brokers Modal
   ================================================================ */

.brokers-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 19000;
    backdrop-filter: blur(3px);
}
.brokers-overlay.active { display: block; }

.brokers-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, calc(100vw - 24px));
    max-height: 90vh;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    z-index: 19001;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.brokers-modal.active { display: flex; }

/* Header */
.brokers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #30363d;
    background: #0d1117;
    flex-shrink: 0;
}
.brokers-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brokers-header-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.brokers-header-title h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #ffd966;
}
.brokers-header-title p {
    margin: 0;
    font-size: .82rem;
    color: #8b949e;
}
.brokers-close-btn {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}
.brokers-close-btn:hover { background: #30363d; color: #c9d1d9; }

/* Body */
.brokers-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
}

/* ── Quiz ─────────────────────────────────────── */
.bk-quiz {
    max-width: 560px;
    margin: 0 auto;
}
.bk-progress-wrap {
    height: 4px;
    background: #30363d;
    border-radius: 99px;
    margin-bottom: 12px;
    overflow: hidden;
}
.bk-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd966, #f7a600);
    border-radius: 99px;
    transition: width .4s ease;
}
.bk-step-label {
    font-size: .78rem;
    color: #8b949e;
    margin-bottom: 20px;
    text-align: center;
}
.bk-question-icon {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 10px;
}
.bk-question-text {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    color: #e6edf3;
    margin: 0 0 6px;
}
.bk-question-hint {
    font-size: .82rem;
    color: #8b949e;
    text-align: center;
    margin: 0 0 20px;
}
.bk-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.bk-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #0d1117;
    border: 1.5px solid #30363d;
    border-radius: 10px;
    cursor: pointer;
    text-align: right;
    color: #c9d1d9;
    transition: border-color .2s, background .2s;
    position: relative;
}
.bk-opt:hover { border-color: #58a6ff; background: rgba(88,166,255,.05); }
.bk-opt.selected {
    border-color: #ffd966;
    background: rgba(255,217,102,.08);
    color: #ffd966;
}
.bk-opt-label { font-weight: 700; font-size: .95rem; flex: 1; }
.bk-opt-sub   { font-size: .78rem; color: #8b949e; }
.bk-opt.selected .bk-opt-sub { color: rgba(255,217,102,.7); }
.bk-opt-check {
    font-size: .9rem;
    opacity: 0;
    color: #ffd966;
    transition: opacity .2s;
    margin-right: auto;
}
.bk-opt.selected .bk-opt-check { opacity: 1; }

.bk-quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bk-back-btn {
    background: none;
    border: 1px solid #30363d;
    color: #8b949e;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    transition: border-color .2s, color .2s;
}
.bk-back-btn:hover { border-color: #58a6ff; color: #58a6ff; }
.bk-next-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffd966, #f7a600);
    color: #0d1117;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: .95rem;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}
.bk-next-btn:disabled { opacity: .35; cursor: not-allowed; }
.bk-next-btn:not(:disabled):hover { transform: translateY(-1px); }

/* ── Loading ──────────────────────────────────── */
.bk-loading {
    text-align: center;
    padding: 60px 20px;
    color: #8b949e;
}
.bk-spinner {
    font-size: 2.4rem;
    animation: bk-spin 1s linear infinite;
    display: block;
    margin-bottom: 16px;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* ── Profile Bar ──────────────────────────────── */
.bk-profile-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,217,102,.06);
    border: 1px solid rgba(255,217,102,.2);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: .84rem;
    color: #c9d1d9;
}
.bk-profile-bar strong { color: #ffd966; }
.bk-count { margin-right: auto; font-weight: 700; }
.bk-reset-btn {
    background: none;
    border: 1px solid #30363d;
    color: #8b949e;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .8rem;
    transition: border-color .2s, color .2s;
}
.bk-reset-btn:hover { border-color: #ffd966; color: #ffd966; }
.bk-start-btn {
    background: linear-gradient(135deg, #2ea043, #1a7a30);
    border: none;
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    transition: opacity .2s;
}
.bk-start-btn:hover { opacity: .85; }

/* ── Cards Grid ───────────────────────────────── */
.bk-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.bk-card {
    background: #0d1117;
    border: 1.5px solid #30363d;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .25s, transform .2s;
}
.bk-card:hover {
    border-color: var(--broker-color, #58a6ff);
    transform: translateY(-2px);
}
.bk-recommended-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ffd966, #f7a600);
    color: #0d1117;
    font-size: .72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 99px;
}

.bk-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 14px;
    background: var(--broker-bg, rgba(88,166,255,.05));
    border-bottom: 1px solid #30363d;
}
.bk-logo {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.bk-card-info h3 {
    margin: 0 0 3px;
    font-size: 1.05rem;
    color: var(--broker-color, #e6edf3);
}
.bk-card-info p {
    margin: 0;
    font-size: .8rem;
    color: #8b949e;
}

.bk-sections { padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

.bk-section-title {
    font-size: .78rem;
    font-weight: 700;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.bk-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bk-list li { font-size: .85rem; color: #c9d1d9; line-height: 1.4; }
.bk-list.bk-cons li { color: #8b949e; }

.bk-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bk-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.bk-tag {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: .74rem;
    padding: 3px 8px;
    border-radius: 6px;
}
.bk-license {
    background: rgba(46,160,67,.1);
    border: 1px solid rgba(46,160,67,.3);
    color: #2ea043;
    font-size: .74rem;
    padding: 3px 8px;
    border-radius: 6px;
}
.bk-region {
    background: rgba(88,166,255,.08);
    border: 1px solid rgba(88,166,255,.2);
    color: #58a6ff;
    font-size: .74rem;
    padding: 3px 8px;
    border-radius: 6px;
}
.bk-limits {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .78rem;
    color: #8b949e;
}
.bk-limits strong { color: #e6edf3; }

.bk-cta-btn {
    display: block;
    margin: 0 18px 14px;
    padding: 13px;
    background: linear-gradient(135deg, var(--broker-color, #ffd966), rgba(0,0,0,0));
    background: var(--broker-color, #ffd966);
    color: #0d1117;
    text-align: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: .95rem;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.bk-cta-btn:hover { opacity: .88; transform: translateY(-1px); }
.bk-cta-note {
    text-align: center;
    font-size: .72rem;
    color: #8b949e;
    margin: 0 18px 16px;
}

/* موبايل */
@media (max-width: 640px) {
    .brokers-modal { max-height: 96vh; }
    .brokers-body  { padding: 16px; }
    .bk-cards-grid { grid-template-columns: 1fr; }
    .bk-two-col    { grid-template-columns: 1fr; }
    .bk-profile-bar { font-size: .78rem; }
}

/* Capital Tips */
.capital-tips-modal { max-width: 720px; }
.capital-tips-body { display: flex; flex-direction: column; gap: 16px; }
.capital-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}
.capital-intro strong { color: #f0c040; font-size: 1rem; }
.capital-intro span { color: #8b949e; font-size: .86rem; }
.capital-input-label { display: flex; flex-direction: column; gap: 4px; color: #e6edf3; font-weight: 700; }
.capital-input-label small { color: #8b949e; font-weight: 500; }
.capital-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.capital-input {
    width: 100%;
    min-height: 44px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #e6edf3;
    padding: 0 12px;
    font-size: 1rem;
}
.capital-calc-btn {
    min-height: 44px;
    border: none;
    border-radius: 8px;
    background: #f0c040;
    color: #0d1117;
    font-weight: 800;
    padding: 0 16px;
    cursor: pointer;
}
.capital-result { display: flex; flex-direction: column; gap: 12px; }
.capital-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capital-summary-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px;
}
.capital-summary-card span { display:block; color:#8b949e; font-size:.78rem; margin-bottom:5px; }
.capital-summary-card strong { color:#e6edf3; font-size:1.05rem; }
.capital-note, .capital-plan, .capital-explain {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 14px;
    color: #c9d1d9;
    line-height: 1.75;
}
.capital-plan h4, .capital-explain h4 { color:#f0c040; margin: 0 0 8px; font-size: .98rem; }
.capital-plan ul, .capital-explain ul { margin: 0; padding-inline-start: 20px; }
.capital-table { width:100%; border-collapse: collapse; overflow: hidden; border-radius: 8px; }
.capital-table th, .capital-table td { border: 1px solid #30363d; padding: 9px; text-align: start; color:#c9d1d9; }
.capital-table th { background:#161b22; color:#f0c040; font-size:.82rem; }
.capital-table td { background:#0d1117; font-size:.86rem; }
@media (max-width: 560px) {
    .capital-input-row, .capital-summary-grid { grid-template-columns: 1fr; }
    .capital-table { font-size: .8rem; }
}
