/* ================================================================
   KFOO AI Trading Platform — Trading Page Styles v2.0
   ================================================================ */

/* ═══════════════════════════════════════════════════════════════
   BINANCE THEME — Exact color match with Binance Exchange
   Applied when body has class "binance-theme"
   ═══════════════════════════════════════════════════════════════ */
body.binance-theme {
    --bg-primary: #181a20;
    --bg-secondary: #1e2329;
    --bg-tertiary: #2b3139;
    --bg-card: #1e2329;
    --bg-card-hover: #2b3139;

    --accent-green: #0ecb81;
    --accent-green-dim: rgba(14, 203, 129, 0.12);
    --accent-green-glow: rgba(14, 203, 129, 0.35);
    --accent-red: #f6465d;
    --accent-red-dim: rgba(246, 70, 93, 0.12);
    --accent-red-glow: rgba(246, 70, 93, 0.35);
    --accent-blue: #1e9de4;
    --accent-blue-dim: rgba(30, 157, 228, 0.12);
    --accent-purple: #b86dff;
    --accent-purple-dim: rgba(184, 109, 255, 0.12);
    --accent-orange: #f0b90b;
    --accent-orange-dim: rgba(240, 185, 11, 0.12);
    --accent-gold: #f0b90b;
    --accent-cyan: #1e9de4;

    --text-primary: #eaecef;
    --text-secondary: #848e9c;
    --text-muted: #5e6673;

    --border-color: #2b3139;
    --border-glow: rgba(14, 203, 129, 0.2);

    --gradient-green: linear-gradient(135deg, #0ecb81, #02a566);
    --gradient-red: linear-gradient(135deg, #f6465d, #cf304d);
    --gradient-blue: linear-gradient(135deg, #1e9de4, #1a7cbd);
    --gradient-gold: linear-gradient(135deg, #f0b90b, #d4a20a);
    --gradient-card: linear-gradient(145deg, #1e2329, #181a20);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow-green: 0 0 20px rgba(14, 203, 129, 0.25);
    --shadow-glow-red: 0 0 20px rgba(246, 70, 93, 0.25);

    background: #181a20;
    color: #eaecef;
}

/* ── Binance: Nav override ─────────────────────────────────── */
body.binance-theme .top-nav {
    background: rgba(24, 26, 32, 0.97);
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .nav-btn.active {
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.08);
}

body.binance-theme .nav-btn.active::after {
    background: #f0b90b;
}

body.binance-theme .logo-ai {
    color: #f0b90b;
    text-shadow: 0 0 10px rgba(240, 185, 11, 0.35);
}

body.binance-theme .nav-badge {
    background: linear-gradient(135deg, #f0b90b, #d4a20a);
    color: #181a20;
}

body.binance-theme .live-indicator {
    background: rgba(14, 203, 129, 0.08);
    color: #0ecb81;
}

body.binance-theme .logo-icon {
    box-shadow: 0 0 12px rgba(240, 185, 11, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Binance: Scrollbar ──────────────────────────────────── */
body.binance-theme ::-webkit-scrollbar-track {
    background: #1e2329;
}

body.binance-theme ::-webkit-scrollbar-thumb {
    background: #474d57;
    border-radius: 10px;
}

body.binance-theme ::-webkit-scrollbar-thumb:hover {
    background: #5e6673;
}

body.binance-theme ::selection {
    background: #f0b90b;
    color: #181a20;
}

/* ── Auth Overlay ─────────────────────────────────────────────── */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-card {
    background: linear-gradient(145deg, rgba(15, 21, 35, 0.95), rgba(10, 14, 23, 0.98));
    border: 1px solid rgba(0, 230, 118, 0.15);
    border-radius: 20px;
    padding: 40px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 230, 118, 0.05);
}

.auth-card h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 8px;
    color: #e8eaf6;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: #8892b0;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #8892b0;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #8892b0;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e8eaf6;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
    direction: ltr;
    text-align: left;
}

.form-group input:focus {
    border-color: rgba(0, 230, 118, 0.4);
    background: rgba(0, 230, 118, 0.05);
}

.form-group input::placeholder {
    color: #5a6480;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #0a0e17;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-auth:hover {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
    transform: translateY(-2px);
}

.btn-auth:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-error {
    color: #ff1744;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
}

/* ── Auth Animations ─────────────────────────────────────────── */
.auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(10, 14, 23, 0.3);
    border-top-color: #0a0e17;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 6px;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.btn-auth-success {
    background: linear-gradient(135deg, #0ecb81, #00e676) !important;
    box-shadow: 0 0 25px rgba(14, 203, 129, 0.4) !important;
    transform: scale(1.02) !important;
}

.auth-card-success {
    border-color: rgba(14, 203, 129, 0.5) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(14, 203, 129, 0.15) !important;
    transition: all 0.3s ease !important;
}

.auth-card-shake {
    animation: authShake 0.4s ease;
}

@keyframes authShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

/* ── Trading Layout ───────────────────────────────────────────── */
.trading-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 12px;
    margin-top: 70px;
    height: calc(100vh - 70px);
    overflow: auto;
}

/* ── Top Bar ──────────────────────────────────────────────────── */
.trading-top-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 16px;
}

.trading-symbol-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trading-symbol-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.trading-symbol-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #e8eaf6;
}

.trading-symbol-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
}

.price-up {
    color: #00e676;
}

.price-down {
    color: #ff1744;
}

.trading-symbol-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.change-positive {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
}

.change-negative {
    background: rgba(255, 23, 68, 0.12);
    color: #ff1744;
}

.trading-stats {
    display: flex;
    gap: 20px;
    margin-right: auto;
}

.trading-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trading-stat-label {
    font-size: 11px;
    color: #5a6480;
}

.trading-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #8892b0;
}

.symbol-search-wrapper {
    position: relative;
}

/* ── Search Trigger Button ── */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #848e9c;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}

.search-trigger:hover {
    border-color: rgba(240, 185, 11, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.search-trigger-icon {
    font-size: 14px;
}

.search-trigger-text {
    color: #5e6673;
    white-space: nowrap;
}

/* ── Coin Search Dropdown Panel ── */
.coin-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 380px;
    background: #1e2329;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    display: none;
    animation: coinDropFadeIn 0.2s ease;
    overflow: hidden;
}

.coin-search-dropdown.open {
    display: block;
}

@keyframes coinDropFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header with Spot/Futures Tabs ── */
.coin-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.coin-search-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 3px;
}

.coin-tab {
    padding: 5px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #848e9c;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.coin-tab.active {
    background: #f0b90b;
    color: #181a20;
}

.coin-search-close {
    background: none;
    border: none;
    color: #5e6673;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.coin-search-close:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Search Input inside Dropdown ── */
.coin-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.coin-search-icon {
    font-size: 14px;
    color: #5e6673;
}

#coinSearchInput {
    flex: 1;
    background: none;
    border: none;
    color: #eaecef;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    outline: none;
}

#coinSearchInput::placeholder {
    color: #474d57;
}

/* ── Scrollable Coin List ── */
.coin-search-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 4px 0;
}

.coin-search-loading {
    text-align: center;
    padding: 24px;
    color: #5e6673;
    font-size: 13px;
}

/* ── Individual Coin Row ── */
.coin-row {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 10px;
}

.coin-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.coin-row.active-coin {
    background: rgba(240, 185, 11, 0.08);
}

.coin-row-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.coin-row-info {
    flex: 1;
    min-width: 0;
}

.coin-row-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #eaecef;
}

.coin-row-full {
    font-size: 11px;
    color: #5e6673;
    margin-right: 6px;
}

.coin-row-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #848e9c;
    text-align: left;
    min-width: 80px;
}

.coin-row-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    min-width: 60px;
    padding: 2px 6px;
    border-radius: 4px;
}

.coin-row-change.positive {
    color: #0ecb81;
    background: rgba(14, 203, 129, 0.1);
}

.coin-row-change.negative {
    color: #f6465d;
    background: rgba(246, 70, 93, 0.1);
}

.coin-list-empty {
    text-align: center;
    padding: 24px;
    color: #5e6673;
    font-size: 13px;
}

/* ── Sort Bar ── */
.coin-sort-bar {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    color: #5e6673;
    user-select: none;
}

.coin-sort-col {
    cursor: default;
}

.coin-sort-name {
    flex: 1;
    min-width: 0;
    padding-right: 34px;
}

.coin-sort-price {
    min-width: 80px;
    text-align: left;
    cursor: pointer !important;
    transition: color 0.2s;
}

.coin-sort-change {
    min-width: 60px;
    text-align: left;
    cursor: pointer !important;
    transition: color 0.2s;
}

.coin-sort-price:hover,
.coin-sort-change:hover {
    color: #eaecef;
}

.sort-arrow {
    font-size: 10px;
    margin-right: 2px;
}

.sort-arrow.asc {
    color: #0ecb81;
}

.sort-arrow.desc {
    color: #f6465d;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 230, 118, 0.2);
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu-btn:hover {
    background: rgba(0, 230, 118, 0.15);
}

/* ── KFOO AI Chart — Premium Branding ─────────────────────── */
.chart-wrapper {
    display: flex;
    flex-direction: column;
    background: #0f1523;
    border: 1px solid rgba(0, 230, 200, 0.15);
    border-radius: 14px;
    overflow: hidden;
    min-height: 400px;
    position: relative;
    box-shadow:
        0 0 20px rgba(0, 230, 200, 0.04),
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-wrapper::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(0, 230, 200, 0.2), rgba(120, 80, 255, 0.15), rgba(0, 230, 200, 0.1));
    z-index: -1;
    pointer-events: none;
}

/* ── KFOO AI Chart Header ─────────────────────────────────── */
.kfoo-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(15, 21, 35, 0.98), rgba(20, 28, 50, 0.95));
    border-bottom: 1px solid rgba(0, 230, 200, 0.1);
    min-height: 42px;
    z-index: 5;
}

.kfoo-chart-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kfoo-chart-logo {
    font-size: 18px;
    filter: drop-shadow(0 0 4px rgba(0, 230, 200, 0.4));
}

.kfoo-chart-title {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #00e6c8, #7850ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
}

.kfoo-chart-badge {
    font-size: 9px;
    font-weight: 700;
    color: #0f1523;
    background: linear-gradient(135deg, #00e6c8, #00c9ff);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Chart OHLC Price Details Bar ── */
.chart-ohlc-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(30, 35, 41, 0.92);
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    z-index: 8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    backdrop-filter: blur(4px);
}

.ohlc-item {
    color: #5e6673;
    white-space: nowrap;
}

.ohlc-val {
    color: #eaecef;
    font-weight: 600;
    margin-right: 2px;
}

.ohlc-val.ohlc-high {
    color: #0ecb81;
}

.ohlc-val.ohlc-low {
    color: #f6465d;
}

.ohlc-val.ohlc-up {
    color: #0ecb81;
}

.ohlc-val.ohlc-down {
    color: #f6465d;
}

.ohlc-sep {
    color: rgba(255, 255, 255, 0.08);
    font-size: 10px;
}

.ohlc-change-item {
    padding: 1px 6px;
    border-radius: 4px;
}

.ohlc-change-item.change-up {
    background: rgba(14, 203, 129, 0.12);
}

.ohlc-change-item.change-down {
    background: rgba(246, 70, 93, 0.12);
}

.kfoo-chart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kfoo-chart-symbol {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #e0e6f0;
    letter-spacing: 0.5px;
}

/* ── Timeframe Buttons ────────────────────────────────────── */
.tf-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tf-btn {
    border: none;
    background: transparent;
    color: #6b7a99;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    letter-spacing: 0.3px;
}

.tf-btn:hover {
    color: #c0c8e0;
    background: rgba(255, 255, 255, 0.06);
}

/* Minutes — Cyan accent */
.tf-btn[data-tf="1"],
.tf-btn[data-tf="2"],
.tf-btn[data-tf="3"],
.tf-btn[data-tf="5"],
.tf-btn[data-tf="15"],
.tf-btn[data-tf="30"] {
    --tf-color: #00e5ff;
    --tf-glow: rgba(0, 229, 255, 0.35);
    --tf-bg: rgba(0, 229, 255, 0.1);
    --tf-border: rgba(0, 229, 255, 0.3);
}

/* Hours — Gold accent */
.tf-btn[data-tf="60"],
.tf-btn[data-tf="240"] {
    --tf-color: #ffd740;
    --tf-glow: rgba(255, 215, 64, 0.35);
    --tf-bg: rgba(255, 215, 64, 0.1);
    --tf-border: rgba(255, 215, 64, 0.3);
}

/* Day — Green accent */
.tf-btn[data-tf="D"] {
    --tf-color: #00e676;
    --tf-glow: rgba(0, 230, 118, 0.35);
    --tf-bg: rgba(0, 230, 118, 0.1);
    --tf-border: rgba(0, 230, 118, 0.3);
}

/* Week — Purple accent */
.tf-btn[data-tf="W"] {
    --tf-color: #bb86fc;
    --tf-glow: rgba(187, 134, 252, 0.35);
    --tf-bg: rgba(187, 134, 252, 0.1);
    --tf-border: rgba(187, 134, 252, 0.3);
}

/* Month — Orange-Pink accent */
.tf-btn[data-tf="M"] {
    --tf-color: #ff6e7f;
    --tf-glow: rgba(255, 110, 127, 0.35);
    --tf-bg: rgba(255, 110, 127, 0.1);
    --tf-border: rgba(255, 110, 127, 0.3);
}

.tf-btn.active {
    color: var(--tf-color);
    background: var(--tf-bg);
    border: 1px solid var(--tf-border);
    box-shadow: 0 0 10px var(--tf-glow), inset 0 0 8px rgba(255, 255, 255, 0.03);
    text-shadow: 0 0 6px var(--tf-glow);
}

/* ── Indicators Dropdown ─────────────────────────────────── */
.indicators-dropdown {
    position: relative;
}

.indicators-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(170, 0, 255, 0.2);
    border-radius: 8px;
    background: rgba(170, 0, 255, 0.08);
    color: #bb86fc;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.indicators-trigger:hover {
    background: rgba(170, 0, 255, 0.15);
    border-color: rgba(170, 0, 255, 0.35);
    box-shadow: 0 0 12px rgba(170, 0, 255, 0.2);
}

.indicators-dropdown.open .indicators-trigger {
    background: rgba(170, 0, 255, 0.18);
    border-color: rgba(170, 0, 255, 0.4);
    box-shadow: 0 0 16px rgba(170, 0, 255, 0.25);
}

.ind-icon {
    font-size: 14px;
}

.ind-arrow {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.25s;
}

.indicators-dropdown.open .ind-arrow {
    transform: rotate(180deg);
}

.indicators-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(12, 16, 28, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(170, 0, 255, 0.15);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(170, 0, 255, 0.08);
    z-index: 200;
    animation: indMenuIn 0.2s ease;
}

@keyframes indMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.indicators-dropdown.open .indicators-menu {
    display: block;
}

.ind-menu-header {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #bb86fc;
    padding: 6px 10px 8px;
    border-bottom: 1px solid rgba(170, 0, 255, 0.1);
    margin-bottom: 4px;
}

.ind-category {
    font-family: 'Cairo', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #5a6480;
    padding: 8px 10px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ind-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #c0c8e0;
}

.ind-item:hover {
    background: rgba(170, 0, 255, 0.1);
    color: #e8eaf6;
}

.ind-item.added {
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
}

.ind-item.added::after {
    content: '✓';
    margin-right: auto;
    font-size: 12px;
    font-weight: 800;
    color: #00e676;
}

.ind-item-icon {
    width: 20px;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
}

.ind-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 4px 8px;
}

/* Indicators menu scrollbar */
.indicators-menu::-webkit-scrollbar {
    width: 4px;
}

.indicators-menu::-webkit-scrollbar-track {
    background: transparent;
}

.indicators-menu::-webkit-scrollbar-thumb {
    background: rgba(170, 0, 255, 0.3);
    border-radius: 4px;
}

.kfoo-chart-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #00e676;
    letter-spacing: 1px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #00e676;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

/* ── Chart Container ──────────────────────────────────────── */
.trading-chart-area,
.tradingview-widget-container {
    flex: 1;
    min-height: 400px;
    width: 100%;
    height: 100%;
}

.tradingview-widget-container iframe {
    width: 100% !important;
    height: 100% !important;
}

/* ── TradingView Brand Cover ──────────────────────────────── */
.tv-brand-cover {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 30px;
    background: #131722;
    z-index: 10;
    border-radius: 0 6px 0 0;
    pointer-events: none;
}

/* ── KFOO AI Watermark ────────────────────────────────────── */
.kfoo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cairo', sans-serif;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 6px;
    color: rgba(0, 230, 200, 0.04);
    pointer-events: none;
    z-index: 8;
    user-select: none;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ── Fullscreen ───────────────────────────────────────────── */
.chart-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    min-height: 100vh;
}

/* ── Right Panel ──────────────────────────────────────────────── */
.trading-right-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.trading-right-panel::-webkit-scrollbar {
    width: 4px;
}

.trading-right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.trading-right-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.trading-right-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Order Form ───────────────────────────────────────────────── */
.order-form-card {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.order-form-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #e8eaf6;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Market Type Selector (Spot / Futures) ────────────────────── */
.market-type-selector {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    position: relative;
}

.market-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #8892b0;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.market-type-btn.active {
    color: #e8eaf6;
}

.market-type-btn[data-market="spot"].active {
    color: #00e676;
}

.market-type-btn[data-market="futures"].active {
    color: #ffd740;
}

.market-type-icon {
    font-size: 16px;
}

.market-type-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    border-radius: 10px;
    transition: all 0.35s cubic-bezier(.4, 0, .2, 1);
    right: 4px;
    z-index: 0;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.market-type-selector.futures .market-type-slider {
    right: calc(50%);
    background: rgba(255, 215, 64, 0.12);
    border-color: rgba(255, 215, 64, 0.25);
}

/* ── Leverage Control ─────────────────────────────────────────── */
.leverage-control {
    background: rgba(255, 215, 64, 0.04);
    border: 1px solid rgba(255, 215, 64, 0.12);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    animation: fadeSlideDown 0.3s ease;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.leverage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.leverage-label {
    font-size: 13px;
    font-weight: 700;
    color: #ffd740;
}

.leverage-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    color: #ffd740;
    background: rgba(255, 215, 64, 0.12);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 64, 0.2);
    min-width: 60px;
    text-align: center;
}

.leverage-value.high {
    color: #ff9100;
    background: rgba(255, 145, 0, 0.12);
    border-color: rgba(255, 145, 0, 0.2);
}

.leverage-value.danger {
    color: #ff1744;
    background: rgba(255, 23, 68, 0.12);
    border-color: rgba(255, 23, 68, 0.2);
    animation: pulse-danger 1s infinite;
}

.leverage-max-badge {
    font-size: 11px;
    color: #8b95a8;
    background: rgba(255, 215, 64, 0.08);
    border: 1px solid rgba(255, 215, 64, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
    margin-right: auto;
    font-family: 'JetBrains Mono', monospace;
}

.leverage-max-badge strong {
    color: #ffd740;
    font-size: 12px;
    font-weight: 700;
}

@keyframes pulse-danger {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 23, 68, 0);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 23, 68, 0.3);
    }
}

.leverage-slider-wrapper {
    margin-bottom: 6px;
}

.leverage-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #ff1744 0%, #ff9100 30%, #ffd740 60%, #00e676 100%);
    outline: none;
    cursor: pointer;
}

.leverage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8eaf6;
    border: 3px solid #ffd740;
    box-shadow: 0 0 10px rgba(255, 215, 64, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.leverage-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(255, 215, 64, 0.6);
}

.leverage-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8eaf6;
    border: 3px solid #ffd740;
    box-shadow: 0 0 10px rgba(255, 215, 64, 0.4);
    cursor: pointer;
}

.leverage-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.leverage-marks span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5a6480;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.leverage-marks span:hover {
    color: #ffd740;
    background: rgba(255, 215, 64, 0.08);
}

.leverage-warning {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid rgba(255, 23, 68, 0.15);
    font-size: 12px;
    font-weight: 700;
    color: #ff1744;
    text-align: center;
    animation: fadeSlideDown 0.3s ease;
}


.order-side-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.order-side-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.04);
    color: #8892b0;
}

.order-side-tab.buy-active {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.1);
}

.order-side-tab.sell-active {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.1);
}

/* Sell tab hidden in Spot mode — smooth transition */
.order-side-tab#sellSideTab {
    transition: flex 0.35s cubic-bezier(.4, 0, .2, 1),
        opacity 0.25s ease,
        max-width 0.35s cubic-bezier(.4, 0, .2, 1),
        padding 0.3s ease,
        margin 0.3s ease;
    overflow: hidden;
    max-width: 200px;
}

.order-side-tab#sellSideTab.spot-hidden {
    flex: 0 0 0;
    max-width: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    border: none;
    pointer-events: none;
}

/* Spot mode indicator on order form */
.order-form-card.spot-mode .order-side-tabs::after {
    content: '💰 Spot — شراء فقط';
    font-size: 10px;
    color: #00e676;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
    animation: spotBadgeFadeIn 0.3s ease;
}

@keyframes spotBadgeFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.order-type-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e8eaf6;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    outline: none;
    margin-bottom: 12px;
    cursor: pointer;
}

.order-type-select option {
    background: #0f1523;
    color: #e8eaf6;
}

.order-input-group {
    margin-bottom: 10px;
    position: relative;
}

.order-input-group label {
    display: block;
    font-size: 12px;
    color: #5a6480;
    margin-bottom: 4px;
    font-weight: 600;
}

.order-input-group input {
    width: 100%;
    padding: 10px 14px;
    padding-left: 60px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e8eaf6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    direction: ltr;
    text-align: left;
}

.order-input-group input:focus {
    border-color: rgba(0, 230, 118, 0.3);
}

.order-input-suffix {
    position: absolute;
    left: 14px;
    bottom: 10px;
    font-size: 12px;
    color: #5a6480;
    font-weight: 600;
}

.order-percent-btns {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.order-percent-btn {
    flex: 1;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: transparent;
    color: #8892b0;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.order-percent-btn:hover {
    border-color: rgba(0, 230, 118, 0.3);
    color: #00e676;
}

.order-percent-btn.active {
    border-color: #f0b90b;
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.1);
}

/* ── Quantity Slider (Binance-style) ── */
.qty-slider-wrap {
    position: relative;
    padding: 12px 6px 8px;
    margin-bottom: 8px;
}

.qty-slider-dots {
    position: absolute;
    top: 12px;
    left: 6px;
    right: 6px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1;
}

.qty-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2a2e39;
    border: 2px solid #3a3f4c;
    transition: all 0.2s;
}

.qty-dot.active {
    background: #f0b90b;
    border-color: #f0b90b;
    box-shadow: 0 0 6px rgba(240, 185, 11, 0.4);
}

.qty-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #2a2e39;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    margin: 0;
}

.qty-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0b90b;
    border: 3px solid #1a1d26;
    cursor: grab;
    box-shadow: 0 0 8px rgba(240, 185, 11, 0.5);
    transition: transform 0.15s, box-shadow 0.15s;
}

.qty-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 14px rgba(240, 185, 11, 0.7);
}

.qty-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.qty-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0b90b;
    border: 3px solid #1a1d26;
    cursor: grab;
    box-shadow: 0 0 8px rgba(240, 185, 11, 0.5);
}

.qty-slider-label {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #f0b90b;
    margin-top: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.qty-slider-wrap:hover .qty-slider-label {
    opacity: 1;
}

.order-summary {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
}

.order-summary-row .label {
    color: #5a6480;
}

.order-summary-row .value {
    color: #e8eaf6;
    font-family: 'JetBrains Mono', monospace;
}

.btn-place-order {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-place-order.buy {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #0a0e17;
}

.btn-place-order.sell {
    background: linear-gradient(135deg, #ff1744, #d50000);
    color: #fff;
}

.btn-place-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-place-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Balance Card ─────────────────────────────────────────────── */
.balance-card {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
}

.balance-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #e8eaf6;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #00e676;
    margin-bottom: 8px;
}

.balance-list {
    overflow: hidden;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
}

.balance-item .asset {
    color: #e8eaf6;
    font-weight: 600;
}

.balance-item .amount {
    color: #8892b0;
    font-family: 'JetBrains Mono', monospace;
}

.balance-item .amount.pnl-positive {
    color: #0ecb81 !important;
}

.balance-item .amount.pnl-negative {
    color: #f6465d !important;
}

/* ── Bottom Panel (Orders) ────────────────────────────────────── */
.trading-bottom-panel {
    grid-column: 1 / -1;
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.orders-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.orders-tab {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #8892b0;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.orders-tab.active {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
}

.orders-table {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    flex: 1;
}

.stats-panel {
    overflow-y: auto;
    flex: 1;
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    padding: 8px 12px;
    text-align: right;
    font-size: 11px;
    color: #5a6480;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.orders-table td {
    padding: 8px 12px;
    text-align: right;
    font-size: 13px;
    color: #e8eaf6;
    font-family: 'JetBrains Mono', monospace;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.orders-table .buy-text {
    color: #00e676;
}

.orders-table .sell-text {
    color: #ff1744;
}

.btn-cancel-order {
    padding: 4px 10px;
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: 6px;
    background: rgba(255, 23, 68, 0.1);
    color: #ff1744;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-order:hover {
    background: rgba(255, 23, 68, 0.2);
}

.no-orders {
    text-align: center;
    padding: 30px;
    color: #5a6480;
    font-size: 14px;
}

/* ── API Keys Setup Card ──────────────────────────────────────── */
.api-keys-card {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.api-keys-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #e8eaf6;
}

/* ── API Keys Header Dropdown ─────────────────────────────── */
.api-keys-dropdown {
    position: relative;
}

.api-keys-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 215, 64, 0.2);
    border-radius: 8px;
    background: rgba(255, 215, 64, 0.08);
    color: #ffd740;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.api-keys-trigger:hover {
    background: rgba(255, 215, 64, 0.15);
    border-color: rgba(255, 215, 64, 0.35);
    box-shadow: 0 0 12px rgba(255, 215, 64, 0.15);
}

.api-keys-dropdown.open .api-keys-trigger {
    background: rgba(255, 215, 64, 0.18);
    border-color: rgba(255, 215, 64, 0.4);
    box-shadow: 0 0 16px rgba(255, 215, 64, 0.2);
}

.api-key-icon {
    font-size: 14px;
}

.api-key-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.api-keys-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: rgba(12, 16, 28, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 215, 64, 0.12);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 64, 0.06);
    z-index: 300;
    animation: apiPanelIn 0.2s ease;
}

@keyframes apiPanelIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.api-keys-dropdown.open .api-keys-panel {
    display: block;
}

.api-panel-header {
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ffd740;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 215, 64, 0.1);
}

.api-panel-desc {
    font-size: 11px;
    color: #8892b0;
    margin-bottom: 12px;
    line-height: 1.5;
}

.api-keys-panel .form-group {
    margin-bottom: 10px;
}

.api-keys-panel .form-group label {
    font-size: 11px;
    color: #8892b0;
    margin-bottom: 4px;
    display: block;
}

.api-keys-panel .form-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #e0e6f0;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    box-sizing: border-box;
}

.api-keys-panel .form-group input:focus {
    outline: none;
    border-color: rgba(255, 215, 64, 0.3);
    box-shadow: 0 0 8px rgba(255, 215, 64, 0.1);
}

.api-keys-panel .btn-auth {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffd740, #ffab00);
    color: #0a0e1a;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 4px;
}

.api-keys-panel .btn-auth:hover {
    box-shadow: 0 4px 16px rgba(255, 215, 64, 0.3);
    transform: translateY(-1px);
}

.api-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.api-status-badge.connected {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
}

.api-status-badge.disconnected {
    background: rgba(255, 23, 68, 0.12);
    color: #ff1744;
}

/* ── API Connected State ───────────────────────────────────── */
.api-keys-trigger.api-connected {
    border-color: rgba(0, 230, 118, 0.25);
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
}

.api-keys-trigger.api-connected:hover {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.35);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.15);
}

.api-connected-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 230, 118, 0.1);
}

.api-connected-icon {
    font-size: 28px;
    line-height: 1;
}

.api-connected-title {
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #00e676;
}

.api-connected-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.api-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.api-info-label {
    font-size: 11px;
    color: #8892b0;
    font-weight: 600;
}

.api-info-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #e0e6f0;
    font-weight: 600;
    letter-spacing: 1px;
}

.api-info-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #00e676;
}

.api-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
    animation: apiDotPulse 2s ease-in-out infinite;
}

@keyframes apiDotPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 16px rgba(0, 230, 118, 0.8);
    }
}

.btn-disconnect-api {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 23, 68, 0.2);
    border-radius: 8px;
    background: rgba(255, 23, 68, 0.06);
    color: #ff5252;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-disconnect-api:hover {
    background: rgba(255, 23, 68, 0.15);
    border-color: rgba(255, 23, 68, 0.35);
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.15);
    transform: translateY(-1px);
}

.btn-disconnect-api:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Toast Notification ───────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    animation: slideInLeft 0.3s ease;
    min-width: 280px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.toast.success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #00e676;
}

.toast.error {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: #ff1744;
}

.toast.info {
    background: rgba(41, 121, 255, 0.15);
    border: 1px solid rgba(41, 121, 255, 0.3);
    color: #2979ff;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ── SL/TP Section ────────────────────────────────────────────── */
.sltp-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.sltp-group {
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.3s;
}

.sl-group {
    background: rgba(255, 23, 68, 0.04);
    border: 1px solid rgba(255, 23, 68, 0.08);
}

.sl-group.active {
    border-color: rgba(255, 23, 68, 0.25);
    background: rgba(255, 23, 68, 0.06);
}

.tp-group {
    background: rgba(0, 230, 118, 0.04);
    border: 1px solid rgba(0, 230, 118, 0.08);
}

.tp-group.active {
    border-color: rgba(0, 230, 118, 0.25);
    background: rgba(0, 230, 118, 0.06);
}

.sltp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.sltp-label {
    font-size: 12px;
    font-weight: 700;
}

.sl-label {
    color: #ff1744;
}

.tp-label {
    color: #00e676;
}

.sltp-pct {
    margin-right: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.sltp-pct.sl-pct {
    color: #ff1744;
    background: rgba(255, 23, 68, 0.1);
}

.sltp-pct.tp-pct {
    color: #00e676;
    background: rgba(0, 230, 118, 0.1);
}

/* Toggle switch */
.sltp-toggle {
    position: relative;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
}

.sltp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sltp-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    transition: all 0.3s;
}

.sltp-toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: #5a6480;
    border-radius: 50%;
    transition: all 0.3s;
}

.sl-group .sltp-toggle input:checked+.sltp-toggle-slider {
    background: rgba(255, 23, 68, 0.25);
}

.sl-group .sltp-toggle input:checked+.sltp-toggle-slider::before {
    transform: translateX(16px);
    background: #ff1744;
}

.tp-group .sltp-toggle input:checked+.sltp-toggle-slider {
    background: rgba(0, 230, 118, 0.25);
}

.tp-group .sltp-toggle input:checked+.sltp-toggle-slider::before {
    transform: translateX(16px);
    background: #00e676;
}

.sltp-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    pointer-events: none;
    transition: all 0.3s;
}

.sltp-group.active .sltp-input-row {
    opacity: 1;
    pointer-events: all;
}

.sltp-input-row input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e8eaf6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
    direction: ltr;
    text-align: left;
    min-width: 0;
}

.sl-group.active .sltp-input-row input:focus {
    border-color: rgba(255, 23, 68, 0.4);
}

.tp-group.active .sltp-input-row input:focus {
    border-color: rgba(0, 230, 118, 0.4);
}

.sltp-suffix {
    font-size: 11px;
    color: #5a6480;
    font-weight: 600;
    flex-shrink: 0;
}

.sltp-hint {
    font-size: 10px;
    color: #5a6480;
    margin-top: 4px;
    display: none;
}

.sltp-group.active .sltp-hint {
    display: block;
}

/* Forced SL Buttons */
.forced-sl-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    opacity: 0.4;
    pointer-events: none;
    transition: all 0.3s;
}

.sltp-group.active .forced-sl-btns {
    opacity: 1;
    pointer-events: all;
}

.forced-sl-label {
    font-size: 10px;
    font-weight: 700;
    color: #ff1744;
    white-space: nowrap;
    flex-shrink: 0;
}

.forced-sl-btn {
    flex: 1;
    padding: 6px 4px;
    border: none;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.forced-sl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.forced-sl-btn.sl-5 {
    background: linear-gradient(135deg, #ff8a80, #ff5252);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.forced-sl-btn.sl-10 {
    background: linear-gradient(135deg, #ff5252, #ff1744);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.forced-sl-btn.sl-20 {
    background: linear-gradient(135deg, #ff1744, #d50000);
    border: 1px solid rgba(213, 0, 0, 0.3);
}

.forced-sl-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

.forced-sl-btn.active {
    box-shadow: 0 0 14px rgba(255, 23, 68, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.forced-sl-btn.sl-5.active {
    box-shadow: 0 0 14px rgba(255, 82, 82, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
}

.forced-sl-btn.sl-10.active {
    box-shadow: 0 0 14px rgba(255, 23, 68, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
}

.forced-sl-btn.sl-20.active {
    box-shadow: 0 0 14px rgba(213, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
}

.sl-text {
    color: #ff1744 !important;
}

.tp-text {
    color: #00e676 !important;
}

/* ── Order Book Card ─────────────────────────────────────────── */
.ob-card {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 280px;
}

.ob-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ob-title {
    font-size: 13px;
    font-weight: 700;
    color: #e8eaf6;
}

.ob-spread {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #8892b0;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
}

.ob-table {
    padding: 0 4px 6px;
}

.ob-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 4px 10px;
    font-size: 10px;
    color: #5a6480;
    font-weight: 600;
}

.ob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 2px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    position: relative;
    height: 22px;
    align-items: center;
    cursor: pointer;
    transition: background 0.1s;
}

.ob-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ob-row .ob-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.12;
    transition: width 0.3s ease;
}

.ob-row.ask-row .ob-bar {
    right: 0;
    background: #ff1744;
}

.ob-row.bid-row .ob-bar {
    right: 0;
    background: #00e676;
}

.ob-row.ask-row .ob-price {
    color: #ff5252;
}

.ob-row.bid-row .ob-price {
    color: #69f0ae;
}

.ob-row .ob-qty,
.ob-row .ob-total {
    color: #b0bec5;
    font-size: 10px;
}

.ob-mid-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ob-mid-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 800;
    color: #e8eaf6;
}

.ob-mid-arrow {
    font-size: 12px;
    transition: color 0.3s;
}

.ob-mid-arrow.up {
    color: #00e676;
}

.ob-mid-arrow.down {
    color: #ff1744;
}

/* ── Live Trades Card ────────────────────────────────────────── */
.trades-card {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 200px;
}

.trades-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trades-title {
    font-size: 13px;
    font-weight: 700;
    color: #e8eaf6;
}

.trades-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #00e676;
    background: rgba(0, 230, 118, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.trades-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    padding: 4px 14px;
    font-size: 10px;
    color: #5a6480;
    font-weight: 600;
}

.trades-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 230, 118, 0.2) transparent;
}

.trade-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    padding: 3px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    align-items: center;
    transition: background 0.15s;
}

.trade-row.new-trade {
    animation: tradeBlink 0.6s ease;
}

.trade-row .trade-price.buy {
    color: #69f0ae;
}

.trade-row .trade-price.sell {
    color: #ff5252;
}

.trade-row .trade-qty {
    color: #b0bec5;
    font-size: 10px;
}

.trade-row .trade-time {
    color: #5a6480;
    font-size: 10px;
}

@keyframes tradeBlink {
    0% {
        background: rgba(0, 230, 118, 0.15);
    }

    100% {
        background: transparent;
    }
}

@keyframes tradeBlink-sell {
    0% {
        background: rgba(255, 23, 68, 0.15);
    }

    100% {
        background: transparent;
    }
}

.trade-row.sell.new-trade {
    animation: tradeBlink-sell 0.6s ease;
}

/* ── Price Flash ─────────────────────────────────────────────── */
.price-flash-up {
    animation: flashGreen 0.4s ease;
}

.price-flash-down {
    animation: flashRed 0.4s ease;
}

@keyframes flashGreen {
    0% {
        background: rgba(0, 230, 118, 0.25);
    }

    100% {
        background: transparent;
    }
}

@keyframes flashRed {
    0% {
        background: rgba(255, 23, 68, 0.25);
    }

    100% {
        background: transparent;
    }
}

/* ── 24h Stats animation ─────────────────────────────────────── */
.stat-updated {
    animation: statPulse 0.3s ease;
}

@keyframes statPulse {
    0% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* ═════════════════════════════════════════════════════════════════
   BINANCE THEME — Component-specific overrides (hardcoded colors)
   ═════════════════════════════════════════════════════════════════ */

/* ── Auth ───────────────────────────────────────────────────── */
body.binance-theme .auth-overlay {
    background: rgba(24, 26, 32, 0.97);
}

body.binance-theme .auth-card {
    background: linear-gradient(145deg, #1e2329, #181a20);
    border: 1px solid #2b3139;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.binance-theme .auth-card h2 {
    color: #eaecef;
}

body.binance-theme .auth-card .auth-subtitle {
    color: #848e9c;
}

body.binance-theme .auth-tabs {
    background: rgba(43, 49, 57, 0.5);
}

body.binance-theme .auth-tab {
    color: #848e9c;
}

body.binance-theme .auth-tab.active {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

body.binance-theme .form-group label {
    color: #848e9c;
}

body.binance-theme .form-group input {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .form-group input:focus {
    border-color: #f0b90b;
    background: #363c46;
}

body.binance-theme .form-group input::placeholder {
    color: #5e6673;
}

body.binance-theme .btn-auth {
    background: linear-gradient(135deg, #0ecb81, #02a566);
    color: #181a20;
}

body.binance-theme .btn-auth:hover {
    box-shadow: 0 0 20px rgba(14, 203, 129, 0.3);
}

body.binance-theme .auth-error {
    color: #f6465d;
}

/* ── Top Bar ───────────────────────────────────────────────── */
body.binance-theme .trading-top-bar {
    background: #1e2329;
    border: 1px solid #2b3139;
}

body.binance-theme .trading-symbol-name {
    color: #eaecef;
}

body.binance-theme .price-up {
    color: #0ecb81;
}

body.binance-theme .price-down {
    color: #f6465d;
}

body.binance-theme .change-positive {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

body.binance-theme .change-negative {
    background: rgba(246, 70, 93, 0.12);
    color: #f6465d;
}

body.binance-theme .trading-stat-label {
    color: #5e6673;
}

body.binance-theme .trading-stat-value {
    color: #848e9c;
}

body.binance-theme .symbol-search-wrapper input {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .symbol-search-wrapper input:focus {
    border-color: #f0b90b;
}

body.binance-theme .search-results-dropdown {
    background: #1e2329;
    border: 1px solid #2b3139;
}

body.binance-theme .search-result-item {
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .search-result-item:hover {
    background: rgba(240, 185, 11, 0.06);
}

body.binance-theme .user-menu-btn {
    border: 1px solid rgba(240, 185, 11, 0.2);
    background: rgba(240, 185, 11, 0.06);
    color: #f0b90b;
}

body.binance-theme .user-menu-btn:hover {
    background: rgba(240, 185, 11, 0.12);
}

/* ── Chart Wrapper ─────────────────────────────────────────── */
body.binance-theme .chart-wrapper {
    background: #1e2329;
    border: 1px solid #2b3139;
    box-shadow: none;
}

body.binance-theme .chart-wrapper::before {
    display: none;
}

body.binance-theme .kfoo-chart-header {
    background: #1e2329;
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .kfoo-chart-title {
    background: linear-gradient(135deg, #f0b90b, #f8d12f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.binance-theme .kfoo-chart-badge {
    background: linear-gradient(135deg, #f0b90b, #d4a20a);
    color: #181a20;
}

body.binance-theme .kfoo-chart-symbol {
    color: #eaecef;
}

body.binance-theme .tf-buttons {
    background: #2b3139;
    border: 1px solid #363c46;
}

body.binance-theme .tf-btn {
    color: #848e9c;
}

body.binance-theme .tf-btn:hover {
    color: #eaecef;
    background: #363c46;
}

/* Override all tf-btn accent colors for Binance */
body.binance-theme .tf-btn[data-tf="1"],
body.binance-theme .tf-btn[data-tf="2"],
body.binance-theme .tf-btn[data-tf="3"],
body.binance-theme .tf-btn[data-tf="5"],
body.binance-theme .tf-btn[data-tf="15"],
body.binance-theme .tf-btn[data-tf="30"] {
    --tf-color: #f0b90b;
    --tf-glow: rgba(240, 185, 11, 0.3);
    --tf-bg: rgba(240, 185, 11, 0.1);
    --tf-border: rgba(240, 185, 11, 0.3);
}

body.binance-theme .tf-btn[data-tf="60"],
body.binance-theme .tf-btn[data-tf="240"] {
    --tf-color: #f0b90b;
    --tf-glow: rgba(240, 185, 11, 0.3);
    --tf-bg: rgba(240, 185, 11, 0.1);
    --tf-border: rgba(240, 185, 11, 0.3);
}

body.binance-theme .tf-btn[data-tf="D"] {
    --tf-color: #0ecb81;
    --tf-glow: rgba(14, 203, 129, 0.3);
    --tf-bg: rgba(14, 203, 129, 0.1);
    --tf-border: rgba(14, 203, 129, 0.3);
}

body.binance-theme .tf-btn[data-tf="W"] {
    --tf-color: #b86dff;
    --tf-glow: rgba(184, 109, 255, 0.3);
    --tf-bg: rgba(184, 109, 255, 0.1);
    --tf-border: rgba(184, 109, 255, 0.3);
}

body.binance-theme .tf-btn[data-tf="M"] {
    --tf-color: #f6465d;
    --tf-glow: rgba(246, 70, 93, 0.3);
    --tf-bg: rgba(246, 70, 93, 0.1);
    --tf-border: rgba(246, 70, 93, 0.3);
}

/* Indicators */
body.binance-theme .indicators-trigger {
    border: 1px solid rgba(184, 109, 255, 0.2);
    background: rgba(184, 109, 255, 0.06);
    color: #b86dff;
}

body.binance-theme .indicators-menu {
    background: #1e2329;
    border: 1px solid #2b3139;
}

body.binance-theme .ind-menu-header {
    color: #b86dff;
}

body.binance-theme .ind-category {
    color: #5e6673;
}

body.binance-theme .ind-item {
    color: #eaecef;
}

body.binance-theme .ind-item:hover {
    background: #2b3139;
}

body.binance-theme .ind-item.added {
    background: rgba(14, 203, 129, 0.06);
    color: #0ecb81;
}

body.binance-theme .ind-item.added::after {
    color: #0ecb81;
}

body.binance-theme .ind-sep {
    background: #2b3139;
}

body.binance-theme .kfoo-chart-live {
    color: #0ecb81;
}

body.binance-theme .live-dot {
    background: #0ecb81;
    box-shadow: 0 0 6px rgba(14, 203, 129, 0.5);
}

body.binance-theme .tv-brand-cover {
    background: #1e2329;
}

body.binance-theme .kfoo-watermark {
    color: rgba(240, 185, 11, 0.04);
}

/* ── Right Panel Cards ─────────────────────────────────────── */
body.binance-theme .order-form-card,
body.binance-theme .balance-card,
body.binance-theme .ob-card,
body.binance-theme .trades-card,
body.binance-theme .api-keys-card {
    background: #1e2329;
    border: 1px solid #2b3139;
}

/* ── Order Form ────────────────────────────────────────────── */
body.binance-theme .order-form-title {
    color: #eaecef;
}

body.binance-theme .market-type-selector {
    background: #2b3139;
}

body.binance-theme .market-type-btn {
    color: #848e9c;
}

body.binance-theme .market-type-btn.active {
    color: #eaecef;
}

body.binance-theme .market-type-btn[data-market="spot"].active {
    color: #0ecb81;
}

body.binance-theme .market-type-btn[data-market="futures"].active {
    color: #f0b90b;
}

body.binance-theme .market-type-slider {
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.2);
}

body.binance-theme .market-type-selector.futures .market-type-slider {
    background: rgba(240, 185, 11, 0.12);
    border-color: rgba(240, 185, 11, 0.25);
}

/* Leverage */
body.binance-theme .leverage-control {
    background: rgba(240, 185, 11, 0.04);
    border: 1px solid rgba(240, 185, 11, 0.12);
}

body.binance-theme .leverage-label {
    color: #f0b90b;
}

body.binance-theme .leverage-value {
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.12);
    border-color: rgba(240, 185, 11, 0.2);
}

body.binance-theme .leverage-value.high {
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.12);
    border-color: rgba(240, 185, 11, 0.2);
}

body.binance-theme .leverage-value.danger {
    color: #f6465d;
    background: rgba(246, 70, 93, 0.12);
    border-color: rgba(246, 70, 93, 0.2);
}

body.binance-theme .leverage-marks span {
    color: #5e6673;
}

body.binance-theme .leverage-marks span:hover {
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.06);
}

body.binance-theme .leverage-warning {
    background: rgba(246, 70, 93, 0.08);
    border: 1px solid rgba(246, 70, 93, 0.15);
    color: #f6465d;
}

/* Buy/Sell tabs */
body.binance-theme .order-side-tab {
    background: #2b3139;
    color: #848e9c;
}

body.binance-theme .order-side-tab.buy-active {
    background: #0ecb81;
    color: #181a20;
    box-shadow: none;
}

body.binance-theme .order-side-tab.sell-active {
    background: #f6465d;
    color: #fff;
    box-shadow: none;
}

body.binance-theme .order-type-select {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .order-type-select option {
    background: #1e2329;
    color: #eaecef;
}

body.binance-theme .order-input-group input {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .order-input-group input:focus {
    border-color: #f0b90b;
}

body.binance-theme .order-input-group label {
    color: #5e6673;
}

body.binance-theme .order-input-suffix {
    color: #5e6673;
}

body.binance-theme .order-percent-btn {
    border: 1px solid #363c46;
    color: #848e9c;
}

body.binance-theme .order-percent-btn:hover {
    border-color: #f0b90b;
    color: #f0b90b;
}

body.binance-theme .order-summary {
    background: #2b3139;
}

body.binance-theme .order-summary-row .label {
    color: #5e6673;
}

body.binance-theme .order-summary-row .value {
    color: #eaecef;
}

body.binance-theme .btn-place-order.buy {
    background: #0ecb81;
    color: #181a20;
}

body.binance-theme .btn-place-order.sell {
    background: #f6465d;
    color: #fff;
}

/* ── Balance ───────────────────────────────────────────────── */
body.binance-theme .balance-card-title {
    color: #eaecef;
}

body.binance-theme .balance-total {
    color: #0ecb81;
}

body.binance-theme .balance-item .asset {
    color: #eaecef;
}

body.binance-theme .balance-item .amount {
    color: #848e9c;
}

body.binance-theme .balance-item {
    border-bottom: 1px solid #2b3139;
}

/* ── Orders Bottom Panel ───────────────────────────────────── */
body.binance-theme .trading-bottom-panel {
    background: #1e2329;
    border: 1px solid #2b3139;
}

body.binance-theme .orders-tabs {
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .orders-tab {
    color: #848e9c;
}

body.binance-theme .orders-tab.active {
    background: rgba(240, 185, 11, 0.08);
    color: #f0b90b;
}

body.binance-theme .orders-table th {
    color: #5e6673;
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .orders-table td {
    color: #eaecef;
    border-bottom: 1px solid rgba(43, 49, 57, 0.5);
}

body.binance-theme .orders-table .buy-text {
    color: #0ecb81;
}

body.binance-theme .orders-table .sell-text {
    color: #f6465d;
}

body.binance-theme .btn-cancel-order {
    border: 1px solid rgba(246, 70, 93, 0.3);
    background: rgba(246, 70, 93, 0.1);
    color: #f6465d;
}

body.binance-theme .btn-cancel-order:hover {
    background: rgba(246, 70, 93, 0.2);
}

body.binance-theme .no-orders {
    color: #5e6673;
}

/* ── Order Book ────────────────────────────────────────────── */
body.binance-theme .ob-card-header {
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .ob-title {
    color: #eaecef;
}

body.binance-theme .ob-spread {
    color: #848e9c;
    background: #2b3139;
}

body.binance-theme .ob-header-row {
    color: #5e6673;
}

body.binance-theme .ob-row:hover {
    background: #2b3139;
}

body.binance-theme .ob-row.ask-row .ob-bar {
    background: #f6465d;
}

body.binance-theme .ob-row.bid-row .ob-bar {
    background: #0ecb81;
}

body.binance-theme .ob-row.ask-row .ob-price {
    color: #f6465d;
}

body.binance-theme .ob-row.bid-row .ob-price {
    color: #0ecb81;
}

body.binance-theme .ob-row .ob-qty,
body.binance-theme .ob-row .ob-total {
    color: #848e9c;
}

body.binance-theme .ob-mid-price {
    border-top: 1px solid #2b3139;
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .ob-mid-val {
    color: #eaecef;
}

body.binance-theme .ob-mid-arrow.up {
    color: #0ecb81;
}

body.binance-theme .ob-mid-arrow.down {
    color: #f6465d;
}

/* ── Live Trades ───────────────────────────────────────────── */
body.binance-theme .trades-card-header {
    border-bottom: 1px solid #2b3139;
}

body.binance-theme .trades-title {
    color: #eaecef;
}

body.binance-theme .trades-count {
    color: #0ecb81;
    background: rgba(14, 203, 129, 0.08);
}

body.binance-theme .trades-header-row {
    color: #5e6673;
}

body.binance-theme .trades-list {
    scrollbar-color: #474d57 transparent;
}

body.binance-theme .trade-row .trade-price.buy {
    color: #0ecb81;
}

body.binance-theme .trade-row .trade-price.sell {
    color: #f6465d;
}

body.binance-theme .trade-row .trade-qty {
    color: #848e9c;
}

body.binance-theme .trade-row .trade-time {
    color: #5e6673;
}

/* ── SL / TP ───────────────────────────────────────────────── */
body.binance-theme .sl-group {
    background: rgba(246, 70, 93, 0.04);
    border: 1px solid rgba(246, 70, 93, 0.08);
}

body.binance-theme .sl-group.active {
    border-color: rgba(246, 70, 93, 0.25);
    background: rgba(246, 70, 93, 0.06);
}

body.binance-theme .tp-group {
    background: rgba(14, 203, 129, 0.04);
    border: 1px solid rgba(14, 203, 129, 0.08);
}

body.binance-theme .tp-group.active {
    border-color: rgba(14, 203, 129, 0.25);
    background: rgba(14, 203, 129, 0.06);
}

body.binance-theme .sl-label {
    color: #f6465d;
}

body.binance-theme .tp-label {
    color: #0ecb81;
}

body.binance-theme .sltp-pct.sl-pct {
    color: #f6465d;
    background: rgba(246, 70, 93, 0.1);
}

body.binance-theme .sltp-pct.tp-pct {
    color: #0ecb81;
    background: rgba(14, 203, 129, 0.1);
}

body.binance-theme .sltp-toggle-slider {
    background: #2b3139;
}

body.binance-theme .sltp-toggle-slider::before {
    background: #5e6673;
}

body.binance-theme .sl-group .sltp-toggle input:checked+.sltp-toggle-slider {
    background: rgba(246, 70, 93, 0.25);
}

body.binance-theme .sl-group .sltp-toggle input:checked+.sltp-toggle-slider::before {
    background: #f6465d;
}

body.binance-theme .tp-group .sltp-toggle input:checked+.sltp-toggle-slider {
    background: rgba(14, 203, 129, 0.25);
}

body.binance-theme .tp-group .sltp-toggle input:checked+.sltp-toggle-slider::before {
    background: #0ecb81;
}

body.binance-theme .sltp-input-row input {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .sltp-suffix {
    color: #5e6673;
}

body.binance-theme .sltp-hint {
    color: #5e6673;
}

body.binance-theme .forced-sl-label {
    color: #f6465d;
}

body.binance-theme .sl-text {
    color: #f6465d !important;
}

body.binance-theme .tp-text {
    color: #0ecb81 !important;
}

/* ── API Keys ──────────────────────────────────────────────── */
body.binance-theme .api-keys-trigger {
    border: 1px solid rgba(240, 185, 11, 0.2);
    background: rgba(240, 185, 11, 0.06);
    color: #f0b90b;
}

body.binance-theme .api-keys-panel {
    background: #1e2329;
    border: 1px solid #2b3139;
}

body.binance-theme .api-panel-header {
    color: #f0b90b;
    border-bottom: 1px solid rgba(240, 185, 11, 0.1);
}

body.binance-theme .api-panel-desc {
    color: #848e9c;
}

body.binance-theme .api-keys-panel .form-group label {
    color: #848e9c;
}

body.binance-theme .api-keys-panel .form-group input {
    border: 1px solid #2b3139;
    background: #2b3139;
    color: #eaecef;
}

body.binance-theme .api-keys-panel .form-group input:focus {
    border-color: #f0b90b;
}

body.binance-theme .api-keys-panel .btn-auth {
    background: linear-gradient(135deg, #f0b90b, #d4a20a);
    color: #181a20;
}

body.binance-theme .api-status-badge.connected {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

body.binance-theme .api-status-badge.disconnected {
    background: rgba(246, 70, 93, 0.12);
    color: #f6465d;
}

/* ── Toasts ────────────────────────────────────────────────── */
body.binance-theme .toast.success {
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.3);
    color: #0ecb81;
}

body.binance-theme .toast.error {
    background: rgba(246, 70, 93, 0.12);
    border: 1px solid rgba(246, 70, 93, 0.3);
    color: #f6465d;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes bnb-tradeBlink {
    0% {
        background: rgba(14, 203, 129, 0.15);
    }

    100% {
        background: transparent;
    }
}

@keyframes bnb-tradeBlink-sell {
    0% {
        background: rgba(246, 70, 93, 0.15);
    }

    100% {
        background: transparent;
    }
}

body.binance-theme .trade-row.new-trade {
    animation: bnb-tradeBlink 0.6s ease;
}

body.binance-theme .trade-row.sell.new-trade {
    animation: bnb-tradeBlink-sell 0.6s ease;
}

@keyframes bnb-flashGreen {
    0% {
        background: rgba(14, 203, 129, 0.25);
    }

    100% {
        background: transparent;
    }
}

@keyframes bnb-flashRed {
    0% {
        background: rgba(246, 70, 93, 0.25);
    }

    100% {
        background: transparent;
    }
}

body.binance-theme .price-flash-up {
    animation: bnb-flashGreen 0.4s ease;
}

body.binance-theme .price-flash-down {
    animation: bnb-flashRed 0.4s ease;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .trading-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }

    .trading-right-panel {
        max-height: none;
    }

    .trading-top-bar {
        flex-wrap: wrap;
    }

    .trading-stats {
        display: none;
    }

    .ob-card,
    .trades-card {
        border-radius: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Multi-TP SMC/ICT System
   ═══════════════════════════════════════════════════════════════ */

.mtp-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(14, 203, 129, 0.06);
    border: 1px solid rgba(14, 203, 129, 0.15);
    border-radius: 8px;
    cursor: pointer;
}

.mtp-toggle-label {
    position: relative;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
}

.mtp-toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mtp-toggle-slider {
    position: absolute;
    inset: 0;
    background: #2a3140;
    border-radius: 9px;
    transition: background 0.3s;
    cursor: pointer;
}

.mtp-toggle-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    background: #5a6480;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.mtp-toggle-label input:checked+.mtp-toggle-slider {
    background: #0ecb81;
}

.mtp-toggle-label input:checked+.mtp-toggle-slider::before {
    transform: translateX(14px);
    background: #fff;
}

.mtp-toggle-text {
    font-size: 11px;
    color: #b7bdc6;
    font-family: Cairo, sans-serif;
    flex: 1;
}

.mtp-mode-badge {
    background: linear-gradient(135deg, #0ecb81, #00d4aa);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    font-family: JetBrains Mono, monospace;
}

/* Panel */
.mtp-panel {
    margin-top: 8px;
    background: rgba(14, 203, 129, 0.03);
    border: 1px solid rgba(14, 203, 129, 0.12);
    border-radius: 10px;
    overflow: hidden;
    animation: mtpSlideIn 0.3s ease;
}

@keyframes mtpSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

.mtp-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(14, 203, 129, 0.06);
    border-bottom: 1px solid rgba(14, 203, 129, 0.1);
}

.mtp-title {
    font-size: 11px;
    font-weight: 700;
    color: #0ecb81;
    font-family: Cairo, sans-serif;
}

.mtp-trailing-badge {
    font-size: 9px;
    font-weight: 700;
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    animation: mtpPulse 2s infinite;
}

@keyframes mtpPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Targets */
.mtp-targets {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mtp-target {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.mtp-target:hover {
    background: rgba(14, 203, 129, 0.06);
}

.mtp-target.hit {
    border-color: rgba(14, 203, 129, 0.3);
    background: rgba(14, 203, 129, 0.08);
}

.mtp-target.active-trailing {
    border-color: rgba(240, 185, 11, 0.4);
    background: rgba(240, 185, 11, 0.06);
}

.mtp-target-line {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
}

.tp1-color {
    background: #0ecb81;
}

.tp2-color {
    background: #00d4aa;
}

.tp3-color {
    background: #00bcd4;
}

.tp4-color {
    background: #f0b90b;
}

.mtp-target-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mtp-num {
    font-size: 10px;
    font-weight: 800;
    color: #848e9c;
    font-family: JetBrains Mono, monospace;
    letter-spacing: 0.5px;
}

.mtp-price {
    font-size: 12px;
    font-weight: 700;
    color: #eaecef;
    font-family: JetBrains Mono, monospace;
}

.mtp-target-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.mtp-rr {
    font-size: 9px;
    font-weight: 700;
    color: #0ecb81;
    font-family: JetBrains Mono, monospace;
    background: rgba(14, 203, 129, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
}

.mtp-share {
    font-size: 9px;
    color: #5a6480;
    font-family: Cairo, sans-serif;
}

.mtp-status {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Progress */
.mtp-progress {
    padding: 6px 12px 8px;
}

.mtp-progress>.mtp-bar {
    height: 6px;
    background: linear-gradient(90deg, #0ecb81, #00d4aa, #00bcd4, #f0b90b);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mtp-progress::before {
    content: '';
    display: block;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    margin-bottom: -6px;
}

.mtp-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 8px;
    color: #5a6480;
    font-family: JetBrains Mono, monospace;
}

/* Mode Selector */
.mtp-mode-selector {
    display: flex;
    gap: 0;
    margin: 8px 10px 4px;
    background: #1a1e2a;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mtp-mode-btn {
    flex: 1;
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: #848e9c;
    font-family: Cairo, sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.mtp-mode-btn:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.05);
}

.mtp-mode-btn.active {
    background: linear-gradient(135deg, #0ecb81, #00d4aa);
    color: #000;
    box-shadow: 0 2px 8px rgba(14, 203, 129, 0.3);
}

.mtp-mode-desc {
    font-size: 10px;
    color: #5a6480;
    font-family: Cairo, sans-serif;
    text-align: center;
    padding: 2px 10px 6px;
}

/* Multi-TP Chart Lines */
.sltp-mtp1-line .sltp-lv {
    background: #0ecb81 !important;
}

.sltp-mtp2-line .sltp-lv {
    background: #00d4aa !important;
}

.sltp-mtp3-line .sltp-lv {
    background: #00bcd4 !important;
}

.sltp-mtp4-line .sltp-lv {
    background: #f0b90b !important;
}

/* ═══════════════════════════════════════════════════════════════
   SL/TP Overlay Lines — Chart Overlay System
   ═══════════════════════════════════════════════════════════════ */

.sltp-overlay-container {
    position: absolute;
    top: 77px;
    /* header(42) + OHLC bar(35) */
    left: 38px;
    /* TradingView drawing tools */
    right: 83px;
    /* TradingView price scale */
    bottom: 28px;
    /* TradingView timeline */
    pointer-events: none;
    z-index: 10;
    overflow: clip;
}

.sltp-chart-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: all;
    z-index: 15;
    transition: top 0.15s ease-out;
}

.sltp-chart-line .sltp-hit:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sltp-sl-line .sltp-hit:hover {
    background: rgba(246, 70, 93, 0.05);
}

.sltp-tp-line .sltp-hit:hover {
    background: rgba(14, 203, 129, 0.05);
}

/* Animated dashes on the line */
.sltp-chart-line .sltp-lv {
    background-image: repeating-linear-gradient(90deg,
            transparent,
            transparent 4px,
            rgba(0, 0, 0, 0.3) 4px,
            rgba(0, 0, 0, 0.3) 8px) !important;
    background-size: 200% 100%;
}

/* Pulse animation on the label when dragging */
.sltp-chart-line .sltp-lbl {
    transition: transform 0.15s, box-shadow 0.15s;
}

.sltp-chart-line:hover .sltp-lbl {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* Current price line for reference */
.sltp-current-price-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    z-index: 12;
    pointer-events: none;
}

.sltp-current-price-line::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -0.5px;
    height: 1px;
    background: repeating-linear-gradient(90deg,
            rgba(240, 185, 11, 0.5),
            rgba(240, 185, 11, 0.5) 3px,
            transparent 3px,
            transparent 6px);
}

/* Touch-friendly hit areas */
.sltp-chart-line .sltp-hit {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.sltp-chart-line .sltp-lv {
    touch-action: none;
}

/* ═══════════════════════════════════════════════════════════════
   SL/TP Responsive — Mobile Adjustments
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sltp-overlay-container {
        left: 8px !important;
        right: 65px !important;
    }

    /* Larger touch targets on mobile */
    .sltp-chart-line .sltp-hit {
        top: -24px !important;
        height: 48px !important;
    }

    /* Smaller labels on mobile */
    .sltp-chart-line .sltp-lbl {
        font-size: 11px !important;
        padding: 3px 8px !important;
        right: 4px !important;
        top: -12px !important;
    }

    .sltp-chart-line .sltp-tag {
        font-size: 10px !important;
        padding: 3px 8px !important;
        left: 4px !important;
        top: -12px !important;
    }

    .sltp-chart-line .sltp-tip {
        font-size: 13px !important;
        padding: 4px 10px !important;
        top: -36px !important;
    }

    .sltp-chart-line .sltp-zone {
        height: 30px !important;
    }
}

@media (max-width: 480px) {
    .sltp-overlay-container {
        left: 4px !important;
        right: 55px !important;
    }

    .sltp-chart-line .sltp-lbl {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }

    .sltp-chart-line .sltp-tag {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    .sltp-chart-line .sltp-tip {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Enhanced Trading Platform — New Styles v2.0
   ═══════════════════════════════════════════════════════════════ */

/* ── Tab Count Badges ───────────────────────────────────────── */
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.08);
    color: #848e9c;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.orders-tab.active .tab-count {
    background: rgba(14, 203, 129, 0.15);
    color: #0ecb81;
}

.positions-count {
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
}

.orders-tab.active .positions-count {
    background: rgba(240, 185, 11, 0.2);
    color: #f0b90b;
}

/* ── Market & Side Badges ───────────────────────────────────── */
.market-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.futures-badge {
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.2);
}

.spot-badge {
    background: rgba(14, 203, 129, 0.08);
    color: #0ecb81;
    border: 1px solid rgba(14, 203, 129, 0.15);
}

.side-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.side-badge.buy {
    background: rgba(14, 203, 129, 0.1);
    color: #0ecb81;
}

.side-badge.sell {
    background: rgba(246, 70, 93, 0.1);
    color: #f6465d;
}

/* ── Status Badges ───────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
}

.status-filled {
    background: rgba(14, 203, 129, 0.1);
    color: #0ecb81;
}

.status-canceled,
.status-cancelled {
    background: rgba(132, 142, 156, 0.1);
    color: #848e9c;
}

.status-partially_filled {
    background: rgba(72, 219, 251, 0.1);
    color: #48dbfb;
}

/* ── Symbol Cell ─────────────────────────────────────────────── */
.symbol-cell {
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    color: #eaecef;
}

.symbol-cell small {
    color: #5e6673;
    font-weight: 400;
    font-size: 10px;
}

/* ── Clickable Symbol in Positions ────────────────────────────── */
.position-symbol-clickable {
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 2px 6px;
    border-radius: 6px;
    position: relative;
}

.position-symbol-clickable:hover {
    color: #0ecb81 !important;
    background: rgba(14, 203, 129, 0.08);
    box-shadow: 0 0 8px rgba(14, 203, 129, 0.15);
}

.position-symbol-clickable:hover small {
    color: #0ecb81 !important;
    opacity: 0.7;
}

.position-symbol-clickable:active {
    transform: scale(0.95);
}

.price-cell {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #eaecef;
}

/* ── Order Row Hover ─────────────────────────────────────────── */
.order-row {
    transition: background 0.2s ease;
}

.order-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ── Cancel Button Enhanced ──────────────────────────────────── */
.btn-cancel-order {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(246, 70, 93, 0.3);
    background: rgba(246, 70, 93, 0.08);
    color: #f6465d;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-cancel-order:hover {
    background: rgba(246, 70, 93, 0.2);
    border-color: rgba(246, 70, 93, 0.5);
    box-shadow: 0 0 12px rgba(246, 70, 93, 0.2);
}

.cancel-icon {
    font-size: 10px;
    font-weight: 800;
}

/* ── Positions Panel ─────────────────────────────────────────── */
.position-row {
    transition: all 0.3s ease;
}

.position-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.position-row.pnl-positive {
    border-right: 2px solid rgba(14, 203, 129, 0.4);
}

.position-row.pnl-negative {
    border-right: 2px solid rgba(246, 70, 93, 0.4);
}

.pnl-positive {
    color: #0ecb81 !important;
}

.pnl-negative {
    color: #f6465d !important;
}

.pnl-value,
.roe-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
}

.leverage-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.2);
}

.liq-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #848e9c;
}

/* ── Close Position Button ───────────────────────────────────── */
.btn-close-position {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid rgba(240, 185, 11, 0.3);
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.08), rgba(240, 185, 11, 0.15));
    color: #f0b90b;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-close-position:hover {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.15), rgba(240, 185, 11, 0.25));
    border-color: rgba(240, 185, 11, 0.5);
    box-shadow: 0 0 16px rgba(240, 185, 11, 0.2);
    transform: translateY(-1px);
}

/* ── Close Position Group (Button + Dropdown Arrow) ──────────── */
.close-position-group {
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
}

.close-position-group .btn-close-position {
    border-radius: 6px 0 0 6px;
    border-right: 1px solid rgba(240, 185, 11, 0.2);
}

.close-position-group .btn-close-position:hover {
    border-radius: 6px 0 0 6px;
}

.btn-close-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    padding: 0;
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: rgba(240, 185, 11, 0.06);
    color: #f0b90b;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-dropdown:hover {
    background: rgba(240, 185, 11, 0.2);
    color: #fff;
}

/* ── Partial Close Dropdown Panel ────────────────────────────── */
.partial-close-dropdown {
    background: rgba(24, 26, 32, 0.98);
    border: 1px solid rgba(240, 185, 11, 0.25);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(240, 185, 11, 0.08);
    animation: pcdSlideIn 0.2s ease;
    overflow: hidden;
}

@keyframes pcdSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pcd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #eaecef;
    direction: rtl;
}

.pcd-qty {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #848e9c;
    font-weight: 600;
}

.pcd-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 12px;
}

.pcd-btn {
    padding: 7px 4px;
    border: 1px solid rgba(14, 203, 129, 0.25);
    border-radius: 8px;
    background: rgba(14, 203, 129, 0.06);
    color: #0ecb81;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.pcd-btn:hover {
    background: rgba(14, 203, 129, 0.2);
    border-color: rgba(14, 203, 129, 0.5);
    box-shadow: 0 0 10px rgba(14, 203, 129, 0.15);
    transform: scale(1.05);
}

.pcd-btn-full {
    border-color: rgba(246, 70, 93, 0.3);
    background: rgba(246, 70, 93, 0.08);
    color: #f6465d;
}

.pcd-btn-full:hover {
    background: rgba(246, 70, 93, 0.25);
    border-color: rgba(246, 70, 93, 0.5);
    box-shadow: 0 0 10px rgba(246, 70, 93, 0.2);
}

.pcd-custom {
    display: flex;
    gap: 6px;
    padding: 0 12px 10px;
}

.pcd-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #eaecef;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    direction: ltr;
}

.pcd-input:focus {
    border-color: rgba(240, 185, 11, 0.5);
}

.pcd-input::placeholder {
    color: #5e6673;
}

.pcd-btn-custom {
    padding: 6px 14px;
    border-color: rgba(240, 185, 11, 0.3);
    background: rgba(240, 185, 11, 0.08);
    color: #f0b90b;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    white-space: nowrap;
}

.pcd-btn-custom:hover {
    background: rgba(240, 185, 11, 0.2);
    border-color: rgba(240, 185, 11, 0.5);
    box-shadow: 0 0 10px rgba(240, 185, 11, 0.15);
}

.pcd-preview {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    color: #848e9c;
    text-align: center;
    direction: rtl;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    padding: 20px;
    text-align: center;
    color: #5e6673;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    line-height: 1.8;
}

/* ── Performance Stats Panel ─────────────────────────────────── */
.stats-panel {
    padding: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.stat-card {
    background: rgba(30, 35, 41, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(14, 203, 129, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    background: rgba(43, 49, 57, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-icon {
    font-size: 20px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 4px rgba(240, 185, 11, 0.3));
}

.stat-card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 800;
    color: #eaecef;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.stat-positive {
    color: #0ecb81 !important;
}

.stat-negative {
    color: #f6465d !important;
}

.stat-card-label {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    color: #b7bdc6;
    font-weight: 700;
    direction: rtl;
    text-align: center;
    letter-spacing: 0.3px;
}

/* ── PNL Chart ───────────────────────────────────────────────── */
.pnl-chart-container {
    background: rgba(15, 21, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
    direction: rtl;
}

.pnl-chart-header {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #eaecef;
    margin-bottom: 12px;
    direction: rtl;
}

#pnlChart {
    width: 100%;
    border-radius: 8px;
    direction: ltr;
}

/* ── Enhanced Orders Tabs ────────────────────────────────────── */
.orders-tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: rgba(15, 21, 35, 0.5);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.orders-tabs::-webkit-scrollbar {
    display: none;
}

.orders-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #848e9c;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.orders-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #eaecef;
}

.orders-tab.active {
    background: rgba(14, 203, 129, 0.08);
    color: #0ecb81;
    border: 1px solid rgba(14, 203, 129, 0.15);
}

/* ── Responsive Improvements ─────────────────────────────────── */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card-value {
        font-size: 16px;
    }

    .orders-tabs {
        padding: 2px;
    }

    .orders-tab {
        padding: 6px 10px;
        font-size: 11px;
    }

    .position-row td,
    .order-row td {
        padding: 6px 4px;
        font-size: 11px;
    }

    .btn-close-position,
    .btn-cancel-order {
        padding: 3px 8px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-card-value {
        font-size: 14px;
    }

    .stat-card-icon {
        font-size: 18px;
    }
}

/* ── Notification Toast Enhancement ──────────────────────────── */
.toast {
    animation: toastSlideIn 0.4s cubic-bezier(.4, 0, .2, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── PNL Flash Animation ─────────────────────────────────────── */
@keyframes pnlFlash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.pnl-value.flash {
    animation: pnlFlash 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   Portfolio PNL & Trade PNL Share — Styles v1.0
   ═══════════════════════════════════════════════════════════════ */

/* ── Balance Card Header ─────────────────────────────────────── */
.balance-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.portfolio-pnl-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.04);
}

.portfolio-pnl-toggle:hover {
    background: rgba(14, 203, 129, 0.12);
    transform: scale(1.1);
}

.pnl-toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.portfolio-pnl-section.expanded~.balance-card-header .pnl-toggle-icon,
.portfolio-pnl-toggle.active .pnl-toggle-icon {
    transform: rotate(180deg);
}

/* ── Portfolio PNL Section ───────────────────────────────────── */
.portfolio-pnl-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.4, 0, .2, 1), padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0;
}

.portfolio-pnl-section.expanded {
    max-height: 200px;
    opacity: 1;
    padding: 8px 0;
}

/* ── Period Selector ─────────────────────────────────────────── */
.portfolio-pnl-periods {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
}

.pnl-period-btn {
    flex: 1;
    padding: 4px 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #848e9c;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pnl-period-btn:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.05);
}

.pnl-period-btn.active {
    background: rgba(14, 203, 129, 0.1);
    color: #0ecb81;
    border: 1px solid rgba(14, 203, 129, 0.2);
}

/* ── Portfolio PNL Stats ─────────────────────────────────────── */
.portfolio-pnl-stats {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.portfolio-pnl-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    color: #eaecef;
}

.portfolio-pnl-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.portfolio-pnl-pct.pnl-positive {
    background: rgba(14, 203, 129, 0.1);
}

.portfolio-pnl-pct.pnl-negative {
    background: rgba(246, 70, 93, 0.1);
}

#portfolioPnlChart {
    width: 100%;
    border-radius: 6px;
}

/* ── Position Actions ────────────────────────────────────────── */
.position-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Share PNL Button ────────────────────────────────────────── */
.btn-share-pnl {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
}

.btn-share-pnl:hover {
    background: rgba(240, 185, 11, 0.12);
    border-color: rgba(240, 185, 11, 0.3);
    box-shadow: 0 0 12px rgba(240, 185, 11, 0.15);
    transform: scale(1.1);
}

/* ── PNL Share Overlay / Modal ───────────────────────────────── */
.pnl-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pnl-share-modal {
    background: rgba(24, 26, 32, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(14, 203, 129, 0.05);
    animation: modalSlideUp 0.35s cubic-bezier(.4, 0, .2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pnl-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pnl-share-title {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #eaecef;
}

.pnl-share-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #848e9c;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pnl-share-close:hover {
    background: rgba(246, 70, 93, 0.15);
    color: #f6465d;
}

/* ── Toggle Options ──────────────────────────────────────────── */
.pnl-share-toggles {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pnl-toggle-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #848e9c;
    transition: color 0.2s ease;
}

.pnl-toggle-option:hover {
    color: #eaecef;
}

.pnl-toggle-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.pnl-toggle-option input[type="checkbox"]:checked {
    background: #0ecb81;
    border-color: #0ecb81;
}

.pnl-toggle-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 10px;
    font-weight: 900;
}

/* ── Card Preview ────────────────────────────────────────────── */
.pnl-card-preview {
    padding: 16px 20px;
    display: flex;
    justify-content: center;
}

.pnl-card-preview canvas {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    height: auto !important;
}

/* ── Action Buttons ──────────────────────────────────────────── */
.pnl-share-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pnl-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pnl-save-btn {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.12), rgba(14, 203, 129, 0.2));
    color: #0ecb81;
    border: 1px solid rgba(14, 203, 129, 0.2);
}

.pnl-save-btn:hover {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.2), rgba(14, 203, 129, 0.35));
    border-color: rgba(14, 203, 129, 0.4);
    box-shadow: 0 0 20px rgba(14, 203, 129, 0.15);
    transform: translateY(-2px);
}

.pnl-share-btn {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.12), rgba(240, 185, 11, 0.2));
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.2);
}

.pnl-share-btn:hover {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.2), rgba(240, 185, 11, 0.35));
    border-color: rgba(240, 185, 11, 0.4);
    box-shadow: 0 0 20px rgba(240, 185, 11, 0.15);
    transform: translateY(-2px);
}

/* ── Responsive PNL Modal ────────────────────────────────────── */
@media (max-width: 600px) {
    .pnl-share-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .pnl-card-preview canvas {
        width: 100% !important;
    }

    .pnl-share-toggles {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pnl-action-btn {
        padding: 10px;
        font-size: 13px;
    }
}