
        /* ===== RESET & VARIABLES ===== */
        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        :root {
            --bg-dark: #0b0e11; --bg-primary: #0b0e11; --bg-secondary: #161a1e; --bg-tertiary: #1e2329; --bg-hover: #2b3139;
            --text-primary: #eaecef; --text-secondary: #848e9c; --border: #2b3139;
            --green: #0ecb81; --red: #f6465d; --accent: #f0b90b; --accent-hover: #d4a408;
            --blue: #1e88e5; --shadow: 0 4px 12px rgba(0,0,0,0.4);
            --primary-gold: #f3a812;
        }
        body.light-mode {
            --bg-primary: #ffffff; --bg-secondary: #f7f8fa; --bg-tertiary: #eef1f5; --bg-hover: #e6e9ee;
            --text-primary: #1e2329; --text-secondary: #5e6673; --border: #d8dce4;
            --shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        html, body {
            height: 100%;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
            background: var(--bg-primary); color: var(--text-primary);
            transition: background 0.3s, color 0.3s;
            touch-action: manipulation; user-select: none;
            overflow: hidden;
            position: fixed;
            width: 100%;
        }

        /* ===== LANDING PAGE ===== */
        .landing-page {
            position: fixed;
            inset: 0;
            z-index: 9000;
            background: var(--bg-dark);
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .landing-page.hide {
            opacity: 0;
            transform: scale(1.05);
            pointer-events: none;
        }

        .landing-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 5%;
            background: rgba(11, 14, 20, 0.95);
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 1000;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
        }
        .landing-logo-container {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }
        .landing-logo-icon {
            width: 36px;
            height: 36px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: none; filter: none;
            flex-shrink: 0;
            overflow: hidden;
            background: #0b0e11;
        }
        .landing-logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            box-shadow: none; filter: none; -webkit-filter: none;
        }
        .landing-logo-text {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0.5px;
            color: var(--text-primary);
            white-space: nowrap;
        }
        .landing-nav-buttons {
            display: flex;
            gap: 10px;
            flex-shrink: 0;
            position: relative;
        }
        .landing-btn {
            padding: 8px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            border: none;
            font-family: inherit;
        }
        .landing-btn-login {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--border);
        }
        .landing-btn-login:hover {
            background: var(--bg-secondary);
            border-color: var(--text-secondary);
        }
        .landing-btn-signup {
            background: var(--green);
            color: #fff;
            border: none;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
            transform: translateX(-35px);
            opacity: 1 !important;
            visibility: visible !important;
        }
        .landing-btn-signup.scrolled {
            transform: translateX(0) !important;
        }
        .landing-btn-signup:hover {
            opacity: 0.9;
        }

        .landing-hero {
            padding: 100px 5% 20px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            min-height: auto;
            gap: 30px;
            flex: none;
        }
        .landing-hero-text {
            flex: 1;
            min-width: 280px;
        }
        .landing-hero-text h1 {
            font-size: 42px;
            line-height: 1.2;
            margin-bottom: 16px;
            font-weight: 700;
        }
        .landing-hero-text h1 span {
            color: var(--primary-gold);
        }
        .landing-hero-text p {
            color: var(--text-secondary);
            font-size: 16px;
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .landing-auth-card {
            width: 100%;
            max-width: 400px;
            background: var(--bg-secondary);
            border-radius: 16px;
            padding: 28px;
            border: 1px solid var(--border);
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
            margin: 0 auto;
        }
        .landing-auth-card h2 {
            text-align: center;
            font-size: 20px;
            margin-bottom: 20px;
            color: var(--text-primary);
        }
        .landing-form-group {
            margin-bottom: 16px;
        }
        .landing-form-group label {
            display: block;
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .landing-form-group input {
            width: 100%;
            padding: 12px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: #fff;
            font-size: 14px;
            outline: none;
            transition: border-color 0.3s ease;
            font-family: inherit;
        }
        .landing-form-group input:focus {
            border-color: var(--blue);
        }
        .password-lockout-error {
            display: none;
            color: #f6465d;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.45;
            margin-top: 7px;
        }
        .password-lockout-error.show { display: block; }
        .landing-form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            margin-bottom: 20px;
            color: var(--text-secondary);
        }
        .landing-form-options a {
            color: var(--blue);
            text-decoration: none;
            cursor: pointer;
        }
        .landing-btn-submit {
            width: 100%;
            padding: 12px;
            background: var(--blue);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
            margin-bottom: 16px;
            font-family: inherit;
        }
        .landing-btn-google {
            width: 100%;
            padding: 11px;
            background: #fff;
            color: #333;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;
            font-family: inherit;
        }
        .landing-divider {
            text-align: center;
            margin: 16px 0;
            position: relative;
        }
        .landing-divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            width: 100%;
            height: 1px;
            background: var(--border);
        }
        .landing-divider span {
            background: var(--bg-secondary);
            padding: 0 10px;
            position: relative;
            color: var(--text-secondary);
            font-size: 11px;
        }
        .landing-form-error {
            background: rgba(246,70,93,0.12);
            border: 1px solid rgba(246,70,93,0.4);
            color: var(--red);
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 12px;
            display: none;
            line-height: 1.4;
        }
        .landing-form-error.show { display: block; }
        .landing-form-success {
            background: rgba(14,203,129,0.12);
            border: 1px solid rgba(14,203,129,0.4);
            color: var(--green);
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 12px;
            display: none;
            line-height: 1.4;
        }
        .landing-form-success.show { display: block; }
        .landing-auth-view { display: block; }
        .landing-auth-view.hidden { display: none; }
        .landing-back-link {
            text-align: center;
            margin-top: 14px;
        }
        .landing-back-link button {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            text-decoration: underline;
            font-family: inherit;
        }
        .landing-back-link button:hover { color: var(--accent); }

        .landing-preview-section {
            padding: 50px 5% 40px;
            text-align: center;
            background: linear-gradient(180deg, var(--bg-dark) 0%, #080a0f 100%);
        }
        .landing-preview-section h2 {
            font-size: 32px;
            margin-bottom: 12px;
        }
        .landing-preview-section p {
            color: var(--text-secondary);
            margin-bottom: 40px;
        }
        .landing-device-mockups {
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            max-width: 900px;
            margin: 0 auto;
        }
        .landing-laptop-frame {
            width: 100%;
            max-width: 600px;
            height: 200px;
            background: #111;
            border-radius: 12px;
            border: 3px solid #333;
            box-shadow: 0 15px 30px rgba(0,0,0,0.8);
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding: 16px 20px;
        }
        .landing-phone-frame {
            position: absolute;
            right: 8px;
            bottom: -20px;
            width: 115px;
            height: 195px;
            background: #000;
            border-radius: 18px;
            border: 3px solid #444;
            box-shadow: 0 15px 30px rgba(0,0,0,0.9);
            overflow: hidden;
            z-index: 10;
        }
        .landing-mock-chart {
            width: auto;
            height: 100%;
            background: transparent;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
            color: var(--text-secondary);
            text-align: left;
            padding: 0;
            gap: 8px;
        }
        .landing-preview-section {
            padding-bottom: 55px;
        }
        .landing-phone-frame .landing-mock-chart {
            width: 100%;
            align-items: center;
            text-align: center;
            justify-content: center;
        }

        .landing-assets-section {
            padding: 40px 5% 30px;
        }
        .landing-assets-section h2 {
            text-align: center;
            font-size: 24px;
            margin-bottom: 25px;
            color: #fff;
        }
        .landing-asset-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            max-width: 1100px;
            margin: 0 auto;
        }
        .landing-asset-card {
            background: var(--bg-secondary);
            padding: 14px 16px;
            border-radius: 10px;
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: transform 0.3s ease, border-color 0.3s ease;
        }
        .landing-asset-card:hover {
            transform: translateY(-4px);
            border-color: var(--primary-gold);
        }
        .landing-asset-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .landing-flag-icon {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            object-fit: cover;
            background: #333;
        }
        .landing-asset-pair {
            font-weight: 600;
            font-size: 13px;
            color: #fff;
            white-space: nowrap;
        }

        .landing-footer {
            background: #06080b;
            padding: 40px 5% 25px;
            border-top: 1px solid var(--border);
            color: #5d6675;
            font-size: 12px;
            line-height: 1.8;
        }
        .landing-footer-legal h4 {
            color: #8a94a6;
            margin-bottom: 12px;
            font-size: 14px;
        }
        .landing-footer-legal p {
            margin-bottom: 16px;
        }
        .landing-footer-bottom {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #151a23;
            color: #434a56;
        }

        /* ===== REPEATING LANDING-PAGE SCROLL REVEALS ===== */
        .rb-scroll-reveal {
            opacity: 0;
            transform: translateY(28px);
            transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: opacity, transform;
        }
        .rb-scroll-reveal.rb-scroll-visible {
            opacity: 1;
            transform: translateY(0);
        }
        @media (prefers-reduced-motion: reduce) {
            .rb-scroll-reveal,
            .rb-scroll-reveal.rb-scroll-visible {
                opacity: 1;
                transform: none;
                transition: none;
            }
        }

        /* ===== BROKER APP ===== */
        .broker-app {
            position: fixed;
            inset: 0;
            z-index: 8000;
            display: none;
            flex-direction: column;
            background: var(--bg-primary);
        }
        .broker-app.show {
            display: flex;
        }

        .loading-screen {
            position: fixed;
            inset: 0;
            background: #000;
            z-index: 20000;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 20px;
            transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .loading-screen.show { display: flex; }
        .loading-screen.zoom-fade-out {
            opacity: 0;
            transform: scale(1.08);
            pointer-events: none;
        }
        .splash-icon-box {
            width: 72px;
            height: 72px;
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            /* Flat splash logo: explicitly disable all ambient glow/shadow. */
            box-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
            animation: floatBox 2.2s ease-in-out infinite;
            letter-spacing: -1px;
            overflow: hidden;
        }
        .splash-icon-box img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            box-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
        }
        @keyframes floatBox {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        .splash-title {
            font-size: 24px;
            font-weight: 900;
            letter-spacing: 3px;
            color: #f0b90b;
            text-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
            text-align: center;
        }
        .splash-progress-wrap {
            width: 240px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            margin-top: 4px;
        }
        .splash-progress {
            width: 100%;
            height: 6px;
            background: rgba(240, 185, 11, 0.15);
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }
        .splash-progress::after {
            content: '';
            position: absolute;
            top: 0; left: 0;
            height: 100%;
            width: 100%;
            background: linear-gradient(90deg, #f0b90b, #ffd966, #f0b90b);
            background-size: 200% 100%;
            border-radius: 6px;
            transform-origin: left;
            transform: scaleX(0);
            animation: shimmer 1.5s linear infinite;
        }
        .splash-progress.animating::after {
            animation: splashFill 5s linear forwards, shimmer 1.5s linear infinite;
        }
        @keyframes splashFill {
            0% { transform: scaleX(0); }
            100% { transform: scaleX(1); }
        }
        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .splash-status {
            font-size: 11px;
            font-weight: 700;
            color: rgba(240, 185, 11, 0.75);
            letter-spacing: 2px;
            text-transform: uppercase;
        }
        .splash-percent {
            font-size: 13px;
            font-weight: 800;
            color: #f0b90b;
            font-family: 'SF Mono', Menlo, monospace;
            letter-spacing: 1px;
        }

        .header {
            height: 52px; background: var(--bg-secondary); border-bottom: 1px solid var(--border);
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 12px; position: relative; z-index: 100;
            flex-shrink: 0;
        }
        .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: 0.5px; }
        .logo-mark {
            width: 26px; height: 26px; border-radius: 7px;
            display: flex; align-items: center; justify-content: center;
            color: #000; font-weight: 900; font-size: 14px; box-shadow: none; filter: none;
            overflow: hidden;
            background: #0b0e11;
        }
        .logo-mark img {
            width: 100%; height: 100%; object-fit: cover; display: block;
            box-shadow: none; filter: none; -webkit-filter: none;
        }
        .header-right { display: flex; align-items: center; gap: 8px; }
        .balance-chip {
            background: var(--bg-tertiary); padding: 6px 12px; border-radius: 6px;
            border: 1px solid var(--border); display: flex; flex-direction: column; line-height: 1.2; min-width: 90px;
        }
        .balance-chip .lbl { font-size: 9px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
        .balance-chip .val { font-size: 13px; font-weight: 700; }
        .balance-chip .val.up { color: var(--green); }
        .balance-chip .val.down { color: var(--red); }
        .balance-chip .val.yellow { color: var(--accent); }
        .account-switcher {
            position: relative; display: flex; align-items: center; gap: 4px;
            background: var(--bg-tertiary); border-radius: 6px; padding: 3px; border: 1px solid var(--border);
        }
        .acc-btn {
            padding: 5px 12px; border-radius: 4px; font-size: 11px; font-weight: 700;
            cursor: pointer; border: none; background: transparent; color: var(--text-secondary);
            letter-spacing: 0.5px; transition: all 0.2s;
        }
        .acc-btn.active { background: var(--accent); color: #000; }
        .menu-btn {
            background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-primary);
            width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.2s; padding: 0;
        }
        .menu-btn:hover { border-color: var(--accent); }
        .menu-btn svg { width: 16px; height: 16px; fill: currentColor; }

        .main-wrap { height: calc(100vh - 52px); display: flex; flex-direction: column; }

        .pairs-strip {
            display: flex; align-items: center; gap: 4px; padding: 6px 8px;
            overflow-x: auto; scrollbar-width: none; background: var(--bg-secondary);
            border-bottom: 1px solid var(--border); flex-shrink: 0;
            -webkit-overflow-scrolling: touch;
            cursor: grab;
            user-select: none;
        }
        .pairs-strip::-webkit-scrollbar { display: none; }
        .pairs-strip.dragging { cursor: grabbing; }
        .pair-chip {
            background: var(--bg-tertiary); border: 1px solid var(--border); padding: 6px 10px;
            border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer;
            white-space: nowrap; display: flex; flex-direction: column; min-width: 100px; transition: all 0.2s;
            position: relative;
            pointer-events: auto;
        }
        .pair-chip:hover { border-color: var(--accent); }
        .pair-chip.active { background: var(--accent); color: #000; border-color: var(--accent); }
        .pair-chip .payout-tag {
            position: absolute; top: 2px; right: 4px; font-size: 8px; opacity: 0.75; font-weight: 800;
        }
        .pair-chip .pn { font-size: 10px; font-weight: 800; }
        .pair-chip .pp { font-size: 10px; font-weight: 700; }
        .pair-chip .pp.up { color: var(--green); }
        .pair-chip .pp.down { color: var(--red); }
        .pair-chip.active .pp { color: #000; }

        .tf-section {
            display: flex; align-items: center; gap: 6px; padding: 5px 10px;
            border-top: 1px solid var(--border); background: var(--bg-primary);
            overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
            -webkit-overflow-scrolling: touch;
        }
        .tf-section::-webkit-scrollbar { display: none; }
        .tf-label {
            font-size: 10px; color: var(--text-secondary); font-weight: 700;
            letter-spacing: 0.5px; text-transform: uppercase; min-width: 78px; flex-shrink: 0;
        }
        .tf-btn {
            background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary);
            padding: 4px 10px; border-radius: 4px; font-size: 10px; font-weight: 700;
            cursor: pointer; white-space: nowrap; transition: all 0.15s;
        }
        .tf-btn:hover { color: var(--text-primary); border-color: var(--accent); }
        .tf-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
        .tf-section.trade-tf .tf-btn.active { background: var(--green); border-color: var(--green); color: #000; }

        .chart-area {
            flex: 1; background: var(--bg-primary); position: relative; min-height: 0; overflow: hidden;
            touch-action: pan-x pan-y;
        }
        #chart { width: 100%; height: 100%; }
        .chart-info {
            position: absolute; top: 8px; left: 12px; z-index: 5;
            display: flex; flex-direction: column; gap: 2px; pointer-events: none;
        }
        .chart-info .sym { font-size: 18px; font-weight: 800; letter-spacing: 0.5px; }
        .chart-info .meta { font-size: 10px; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.5px; }
        .price-tag {
            position: absolute; top: 8px; right: 12px; z-index: 5;
            text-align: right; display: flex; flex-direction: column; gap: 2px;
        }
        .price-tag .last { font-size: 22px; font-weight: 800; transition: color 0.2s; }
        .price-tag .last.up { color: var(--green); }
        .price-tag .last.down { color: var(--red); }
        .price-tag .chg { font-size: 11px; font-weight: 700; }
        .price-tag .chg.up { color: var(--green); }
        .price-tag .chg.down { color: var(--red); }

        .candle-attach {
            position: absolute;
            display: flex; align-items: center;
            pointer-events: none; z-index: 6;
            transform: translate(0, -50%);
        }
        .candle-timer {
            font-size: 10px; font-weight: 900;
            background: var(--accent);
            border: none;
            color: #000;
            padding: 2px 6px; border-radius: 4px;
            white-space: nowrap;
            letter-spacing: 0.3px;
            min-width: 24px;
            text-align: center;
        }

        .trade-bar {
            display: flex; align-items: stretch; gap: 6px;
            padding: 8px 10px;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            flex-shrink: 0;
            height: 68px;
        }
        .bar-sell {
            flex: 1;
            background: linear-gradient(135deg, #f6465d, #d63447);
            border: none; border-radius: 8px;
            color: #fff;
            cursor: pointer; transition: transform 0.15s;
            display: flex; align-items: center; justify-content: center;
            padding: 0;
            box-shadow: 0 2px 8px rgba(246,70,93,0.35);
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            font-family: inherit;
        }
        .bar-sell:active { transform: scale(0.97); }
        .bar-buy {
            flex: 1;
            background: linear-gradient(135deg, #0ecb81, #0aa86a);
            border: none; border-radius: 8px;
            color: #fff;
            cursor: pointer; transition: transform 0.15s;
            display: flex; align-items: center; justify-content: center;
            padding: 0;
            box-shadow: 0 2px 8px rgba(14,203,129,0.35);
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            font-family: inherit;
        }
        .bar-buy:active { transform: scale(0.97); }
        .amount-center {
            flex: 1.2;
            display: flex; align-items: center; gap: 4px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0 4px;
            min-width: 0;
        }
        .amt-adj {
            width: 34px; height: 100%;
            border: none; background: transparent;
            font-size: 20px; font-weight: 900;
            cursor: pointer; border-radius: 6px;
            transition: background 0.15s;
            padding: 0;
        }
        .amt-adj:hover { background: var(--bg-hover); }
        .amt-adj.minus { color: var(--red); }
        .amt-adj.plus { color: var(--green); }
        .amt-field {
            flex: 1; background: transparent; border: none; outline: none;
            color: var(--text-primary); font-size: 17px; font-weight: 800;
            text-align: center; font-family: inherit; padding: 0 4px; min-width: 0;
        }
        .amt-field::-webkit-outer-spin-button, .amt-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .amt-field[type=number] { -moz-appearance: textfield; }

        .menu-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.6);
            z-index: 600; opacity: 0; pointer-events: none; transition: opacity 0.25s;
        }
        .menu-overlay.show { opacity: 1; pointer-events: auto; }
        .menu-drawer {
            position: fixed; top: 0; right: 0; bottom: 0;
            width: 42%; max-width: 320px; min-width: 200px;
            background: #000;
            z-index: 601;
            transform: translateX(100%);
            transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
            display: flex; flex-direction: column;
            padding: 0 0 20px;
            overflow-y: auto;
            border-left: 1px solid var(--border);
        }
        .menu-drawer.show { transform: translateX(0); }
        .menu-brand {
            display: flex; align-items: center; justify-content: center; gap: 10px;
            padding: 24px 20px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            margin-bottom: 8px;
        }
        .menu-brand .mb-mark {
            width: 34px; height: 34px; border-radius: 9px;
            display: flex; align-items: center; justify-content: center;
            color: #000; font-weight: 900; font-size: 18px;
            box-shadow: none; filter: none;
            overflow: hidden;
            background: #0b0e11;
            flex-shrink: 0;
        }
        .menu-brand .mb-mark img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .menu-brand .mb-text {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            line-height: 1.15;
            gap: 2px;
        }
        .menu-brand .mb-name {
            font-size: 16px; font-weight: 900; letter-spacing: 1.5px;
            color: var(--accent);
            text-shadow: none;
        }
        .menu-brand .mb-sub {
            font-size: 11px; font-weight: 700; letter-spacing: 2px;
            color: #ffffff;
            opacity: 0.95;
        }
        .menu-drawer .menu-item {
            display: flex; align-items: center; gap: 12px;
            padding: 16px 20px;
            background: transparent; border: none; color: #fff;
            font-size: 13px; font-weight: 700; cursor: pointer;
            letter-spacing: 0.5px; transition: background 0.15s;
            text-align: left; width: 100%;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .menu-drawer .menu-item:hover { background: rgba(255,255,255,0.05); }
        .menu-drawer .menu-item .mi-ic {
            width: 32px; height: 32px; min-width: 32px; min-height: 32px;
            border-radius: 0 !important;
            background: transparent !important;
            border: 0 !important; outline: 0 !important;
            padding: 0 !important; margin: 0 !important;
            box-shadow: none !important;
            display: flex; align-items: stretch; justify-content: stretch;
            overflow: hidden; color: inherit; flex: 0 0 32px;
        }
        .menu-drawer .menu-item .mi-ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
        .menu-drawer .menu-item .mi-ic img {
            display: block; width: 100% !important; height: 100% !important;
            min-width: 100%; min-height: 100%; max-width: none !important; max-height: none !important;
            margin: 0 !important; padding: 0 !important; border: 0 !important;
            object-fit: cover; object-position: center; border-radius: 0 !important;
            box-shadow: none !important; filter: none !important; -webkit-filter: none !important;
            flex: 1 1 100%;
        }
        .menu-drawer .menu-item.reset-item .mi-ic {
            background: rgba(14,203,129,0.15); color: var(--green);
        }
        .menu-drawer .menu-item.settings-item .mi-ic {
            background: rgba(30,136,229,0.15); color: var(--blue);
        }
        .menu-drawer .menu-item .mi-label { flex: 1; }
        .menu-drawer .menu-item.hidden { display: none; }

        .overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500;
            opacity: 0; pointer-events: none; transition: opacity 0.25s;
        }
        .overlay.show { opacity: 1; pointer-events: auto; }
        #accountSwitchPopup, #accountSwitchModal, .account-switch-popup, .account-switch-modal {
            backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
            box-shadow: none !important;
        }
        #accountSwitchPopup::backdrop, #accountSwitchModal::backdrop {
            backdrop-filter: none !important; background: transparent !important;
        }
        .full-panel {
            position: fixed; inset: 0; background: var(--bg-primary);
            z-index: 700; display: none; flex-direction: column;
            overflow-y: auto; padding: 16px 16px 30px;
        }
        .full-panel.show { display: flex; }
        .full-panel .fp-header {
            display: flex; align-items: center; gap: 12px;
            padding-bottom: 14px; border-bottom: 1px solid var(--border);
            margin-bottom: 16px;
        }
        .full-panel .fp-header .back-btn {
            background: var(--bg-tertiary); border: 1px solid var(--border);
            color: var(--text-primary); width: 36px; height: 36px;
            border-radius: 8px; cursor: pointer; display: flex;
            align-items: center; justify-content: center; padding: 0;
            font-size: 18px;
        }
        .full-panel .fp-header .back-btn svg {
            width: 18px; height: 18px; stroke: currentColor; fill: none;
            stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
        }
        .full-panel .fp-header .fp-title {
            font-size: 16px; font-weight: 800; letter-spacing: 0.5px;
            flex: 1;
        }

        .form-group { margin-bottom: 14px; }
        .form-label {
            font-size: 11px; color: var(--text-secondary); font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block;
        }
        .form-input, .form-select {
            width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border);
            color: var(--text-primary); padding: 12px 14px; border-radius: 8px;
            font-size: 14px; font-weight: 600; outline: none;
            transition: border-color 0.2s; font-family: inherit;
        }
        .form-input:focus, .form-select:focus { border-color: var(--accent); }
        .form-input:disabled { opacity: 0.6; cursor: not-allowed; }

        .btn-primary {
            width: 100%; background: var(--accent); color: #000; border: none;
            padding: 14px; border-radius: 8px; font-size: 14px; font-weight: 800;
            cursor: pointer; letter-spacing: 0.5px; transition: background 0.2s; text-transform: uppercase;
        }
        .btn-primary:hover { background: var(--accent-hover); }
        .btn-primary.green { background: var(--green); color: #000; }
        .btn-primary.green:hover { background: #0aa86a; }
        .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

        .tab-bar {
            display: flex; background: var(--bg-tertiary); border-radius: 8px;
            padding: 4px; margin-bottom: 16px; border: 1px solid var(--border);
        }
        .tab-btn {
            flex: 1; background: transparent; border: none; color: var(--text-secondary);
            padding: 9px; border-radius: 6px; font-size: 12px; font-weight: 700;
            cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px;
        }
        .tab-btn.active { background: var(--accent); color: #000; }

        .profile-head {
            display: flex; flex-direction: column; align-items: center; gap: 12px;
            margin-bottom: 18px; padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }
        .avatar-wrap {
            position: relative; width: 90px; height: 90px;
        }
        .avatar {
            width: 90px; height: 90px; border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), #ff9800);
            display: flex; align-items: center; justify-content: center;
            font-size: 34px; font-weight: 900; color: #000;
            overflow: hidden;
            border: 3px solid var(--border);
        }
        .avatar img {
            width: 100%; height: 100%; object-fit: cover; display: block;
        }
        .avatar-cam {
            position: absolute; bottom: 0; right: 0;
            width: 30px; height: 30px; border-radius: 50%;
            background: var(--accent); color: #000;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; border: 3px solid var(--bg-primary);
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
            transition: transform 0.15s;
        }
        .avatar-cam:active { transform: scale(0.9); }
        .avatar-cam svg {
            width: 14px; height: 14px; stroke: #000; fill: none;
            stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
        }
        .avatar-cam input[type=file] { display: none; }
        .profile-head .uinfo { text-align: center; }
        .profile-head .uname { font-size: 16px; font-weight: 800; }
        .profile-head .uid {
            font-size: 12px; color: var(--text-secondary); font-weight: 700;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            margin-top: 4px;
        }
        .uid-copy-icon {
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            width: 20px; height: 20px; color: #fff;
            transition: transform 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .uid-copy-icon:hover { color: var(--accent); }
        .uid-copy-icon:active { transform: scale(0.85); }
        .uid-copy-icon svg {
            width: 15px; height: 15px; stroke: currentColor;
            fill: none; stroke-width: 2;
            stroke-linecap: round; stroke-linejoin: round;
        }

        .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
        .stat-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
        .stat-card .sl {
            font-size: 10px; color: var(--text-secondary); font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
        }
        .stat-card .sv { font-size: 20px; font-weight: 800; }
        .stat-card .sv.up { color: var(--green); }
        .stat-card .sv.down { color: var(--red); }

        .pair-stats-section { margin-top: 18px; }
        .pair-stats-section .section-title {
            font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
            margin-bottom: 8px; color: var(--text-secondary); text-transform: uppercase;
        }
        .pair-stat-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 14px; background: var(--bg-tertiary);
            border: 1px solid var(--border); border-radius: 10px;
            margin-bottom: 8px;
        }
        .pair-stat-row .ps-left { display: flex; flex-direction: column; gap: 2px; }
        .pair-stat-row .ps-sym { font-size: 13px; font-weight: 800; }
        .pair-stat-row .ps-total { font-size: 10px; color: var(--text-secondary); font-weight: 600; }
        .pair-stat-row .ps-right { display: flex; gap: 10px; align-items: center; }
        .pair-stat-row .ps-badge {
            font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 10px;
        }
        .pair-stat-row .ps-badge.win { background: rgba(14,203,129,0.15); color: var(--green); }
        .pair-stat-row .ps-badge.loss { background: rgba(246,70,93,0.15); color: var(--red); }
        .pair-stat-row .ps-badge.neutral { background: rgba(132,142,156,0.15); color: var(--text-secondary); }

        .trade-history { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; }
        .trade-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px;
        }
        .trade-item:last-child { border-bottom: none; }
        .trade-item .ti-left { display: flex; flex-direction: column; gap: 2px; }
        .trade-item .ti-sym { font-weight: 800; font-size: 12px; }
        .trade-item .ti-time { font-size: 10px; color: var(--text-secondary); font-weight: 600; }
        .trade-item .ti-right { text-align: right; }
        .trade-item .ti-amt { font-weight: 800; }
        .trade-item .ti-amt.up { color: var(--green); }
        .trade-item .ti-amt.down { color: var(--red); }
        .trade-item .ti-dir { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
        .trade-item .ti-dir.buy { color: var(--green); }
        .trade-item .ti-dir.sell { color: var(--red); }

        .kyc-locked {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 16px; background: var(--bg-tertiary);
            border: 1px solid var(--border); border-radius: 10px;
            opacity: 0.7; margin-top: 12px;
        }
        .kyc-locked .kyc-label { font-size: 13px; font-weight: 700; }
        .kyc-locked .kyc-badge {
            display: flex; align-items: center; gap: 6px;
            font-size: 10px; font-weight: 800; color: var(--text-secondary);
            letter-spacing: 0.5px;
        }
        .kyc-locked .lock-ic { font-size: 12px; }

        .history-section {
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid var(--border);
        }
        .history-title {
            font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
            color: var(--text-secondary); text-transform: uppercase;
            margin-bottom: 10px;
            display: flex; align-items: center; gap: 8px;
        }
        .history-title::before {
            content: ''; width: 4px; height: 14px; background: var(--accent); border-radius: 2px;
        }
        .history-list {
            display: flex; flex-direction: column; gap: 8px;
            max-height: 300px; overflow-y: auto; padding-right: 4px;
        }
        .history-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 14px;
            border-radius: 10px;
            border: 1px solid transparent;
            font-size: 12px;
        }
        .history-item.deposit-history {
            background: rgba(14,203,129,0.08);
            border-color: rgba(14,203,129,0.25);
        }
        .history-item.deposit-history.failed {
            background: rgba(246,70,93,0.08);
            border-color: rgba(246,70,93,0.25);
        }
        .history-item.deposit-history.pending {
            background: rgba(240,185,11,0.08);
            border-color: rgba(240,185,11,0.25);
        }
        .history-item.withdraw-history {
            background: rgba(246,70,93,0.08);
            border-color: rgba(246,70,93,0.25);
        }
        .history-item.withdraw-history.success-state {
            background: rgba(14,203,129,0.08);
            border-color: rgba(14,203,129,0.25);
        }
        .history-item .hi-left { display: flex; flex-direction: column; gap: 3px; flex: 1; }
        .history-item .hi-right { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
        .history-item .hi-top {
            font-size: 12px; font-weight: 800;
        }
        .history-item.deposit-history .hi-top { color: var(--green); }
        .history-item.deposit-history.failed .hi-top { color: var(--red); }
        .history-item.deposit-history.pending .hi-top { color: var(--accent); }
        .history-item.withdraw-history .hi-top { color: var(--red); }
        .history-item.withdraw-history.success-state .hi-top { color: var(--green); }
        .history-item .hi-sub {
            font-size: 10px; color: var(--text-secondary); font-weight: 600;
        }
        .history-item .hi-amount {
            font-size: 13px; font-weight: 900;
        }
        .history-item.deposit-history .hi-amount { color: var(--green); }
        .history-item.deposit-history.failed .hi-amount { color: var(--red); }
        .history-item.deposit-history.pending .hi-amount { color: var(--accent); }
        .history-item.withdraw-history .hi-amount { color: var(--red); }
        .history-item.withdraw-history.success-state .hi-amount { color: var(--green); }
        .history-item .hi-status {
            font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
            padding: 2px 6px; border-radius: 6px; text-transform: uppercase;
        }
        .history-item .hi-status.pending {
            background: rgba(240,185,11,0.15); color: var(--accent);
        }
        .history-item .hi-status.success {
            background: rgba(14,203,129,0.15); color: var(--green);
        }
        .history-item .hi-status.failed {
            background: rgba(246,70,93,0.15); color: var(--red);
        }
        .history-item .hi-status.processing {
            background: rgba(240,185,11,0.15); color: var(--accent);
        }
        .history-item .hi-status.rejected {
            background: rgba(246,70,93,0.15); color: var(--red);
        }
        .history-item .hi-eta {
            font-size: 9px; color: var(--text-secondary); font-weight: 700;
            margin-top: 2px;
        }
        .history-empty {
            text-align: center; padding: 16px; font-size: 11px;
            color: var(--text-secondary); font-weight: 600;
        }

        .wallet-box-grid {
            display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px; margin-bottom: 12px;
        }
        .wallet-box {
            min-width: 0; aspect-ratio: 1 / 1; display: flex;
            flex-direction: column; align-items: center; justify-content: center;
            background: var(--bg-tertiary); color: var(--text-primary);
            border: 2px solid var(--border); border-radius: 11px;
            padding: 9px 3px; text-align: center; cursor: pointer;
            box-shadow: none; filter: none;
            transition: background-color .22s ease, border-color .22s ease, transform .22s ease;
        }
        .wallet-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .wallet-box.active {
            border-color: var(--accent);
            background: rgba(240,185,11,0.08);
            box-shadow: none;
        }
        .wallet-box:active { transform: scale(.97); }
        .wallet-box .wb-logo {
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 7px; height: 35px; width: 35px;
        }
        .wallet-box .wb-logo img {
            display: block; width: 34px; height: 34px;
            object-fit: contain; box-shadow: none !important;
            filter: none !important; text-shadow: none !important;
        }
        .wallet-box .wb-name {
            font-size: 10px; font-weight: 800; letter-spacing: .1px;
            color: var(--text-primary); line-height: 1.3;
        }
        .wallet-box.active .wb-name { color: var(--accent); }
        @media (max-width: 360px) {
            .wallet-box-grid { gap: 5px; }
            .wallet-box .wb-name { font-size: 9px; }
            .wallet-box .wb-logo img { width: 29px; height: 29px; }
        }
        .wallet-detail-card {
            background: var(--bg-tertiary); border: 1px solid var(--accent);
            border-radius: 10px; padding: 14px; margin-bottom: 14px;
            display: none; box-shadow: none;
        }
        .wallet-detail-card.show { display: block; animation: slideDown .3s ease both; }
        .wallet-detail-card.wallet-card-switch,
        #withdrawAddressField.wallet-card-switch {
            animation: walletCardSwitch .32s ease both;
        }
        @keyframes walletCardSwitch {
            from { opacity: .45; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @media (prefers-reduced-motion: reduce) {
            .wallet-detail-card.show,
            .wallet-detail-card.wallet-card-switch,
            #withdrawAddressField.wallet-card-switch { animation: none; }
        }
        .wallet-detail-card .wd-label {
            font-size: 10px; color: var(--text-secondary); font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
        }
        .wallet-detail-card .wd-value-row {
            display: flex; align-items: center; gap: 8px;
        }
        .wallet-detail-card .wd-value {
            flex: 1; font-size: 11px; font-weight: 700; color: var(--accent);
            word-break: break-all; font-family: 'SF Mono', Menlo, monospace;
            background: var(--bg-primary); padding: 10px 12px; border-radius: 8px;
            border: 1px solid var(--border);
        }
        .copy-btn {
            background: var(--accent); color: #000; border: none;
            padding: 10px 14px; border-radius: 8px; cursor: pointer;
            font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
            display: flex; align-items: center; gap: 6px;
            transition: all 0.15s;
            flex-shrink: 0;
        }
        .copy-btn:hover { background: var(--accent-hover); }
        .copy-btn:active { transform: scale(0.95); }
        .copy-btn.copied { background: var(--green); color: #000; }
        .copy-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

        .customer-details {
            background: var(--bg-secondary); border: 1px solid var(--border);
            border-radius: 10px; padding: 16px; margin-bottom: 14px;
        }
        .customer-details .cd-title {
            font-size: 13px; font-weight: 800; letter-spacing: 0.5px;
            margin-bottom: 12px; color: var(--accent); text-transform: uppercase;
            display: flex; align-items: center; gap: 8px;
        }
        .customer-details .cd-title::before {
            content: ''; width: 4px; height: 14px; background: var(--accent);
            border-radius: 2px;
        }

        .quick-amounts {
            display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
        }
        .quick-amount-chip {
            background: var(--bg-tertiary); border: 1px solid var(--border);
            color: var(--text-primary); padding: 8px 14px; border-radius: 8px;
            font-size: 12px; font-weight: 800; cursor: pointer;
            transition: all 0.15s; letter-spacing: 0.3px;
        }
        .quick-amount-chip:hover { border-color: var(--accent); }
        .quick-amount-chip.active {
            background: var(--accent); color: #000; border-color: var(--accent);
        }

        .deposit-pending-view {
            display: none;
            flex-direction: column; align-items: center; justify-content: center;
            padding: 30px 20px; text-align: center;
        }
        .deposit-pending-view.show { display: flex; }
        .deposit-pending-view .dp-icon {
            width: 80px; height: 80px; border-radius: 50%;
            background: rgba(240,185,11,0.15);
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 16px; position: relative;
        }
        .deposit-pending-view .dp-icon svg {
            width: 40px; height: 40px; stroke: var(--accent); fill: none;
            stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
        }
        .deposit-pending-view .dp-icon::before {
            content: ''; position: absolute; inset: -6px;
            border: 3px dashed var(--accent); border-radius: 50%;
            animation: spinSlow 6s linear infinite;
        }
        @keyframes spinSlow { to { transform: rotate(360deg); } }
        .deposit-pending-view .dp-title {
            font-size: 18px; font-weight: 900; color: var(--accent);
            letter-spacing: 0.5px; margin-bottom: 8px;
        }
        .deposit-pending-view .dp-msg {
            font-size: 12px; font-weight: 600; color: var(--text-secondary);
            line-height: 1.6; margin-bottom: 20px; max-width: 300px;
        }
        .deposit-pending-view .dp-timer-label {
            font-size: 10px; font-weight: 700; color: var(--text-secondary);
            text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
        }
        .deposit-pending-view .dp-timer {
            font-size: 48px; font-weight: 900; color: var(--text-primary);
            letter-spacing: 3px; font-family: 'SF Mono', Menlo, monospace;
            margin-bottom: 16px;
            transition: color 0.3s;
        }
        .deposit-pending-view .dp-timer.warning { color: var(--red); }
        .deposit-pending-view .dp-details {
            background: var(--bg-tertiary); border: 1px solid var(--border);
            border-radius: 10px; padding: 14px; width: 100%; max-width: 320px;
            margin-bottom: 16px;
        }
        .deposit-pending-view .dp-detail-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 8px 0; font-size: 12px;
            border-bottom: 1px solid var(--border);
        }
        .deposit-pending-view .dp-detail-row:last-child { border-bottom: none; }
        .deposit-pending-view .dp-detail-row .dd-l {
            color: var(--text-secondary); font-weight: 700; text-transform: uppercase;
            font-size: 10px; letter-spacing: 0.5px;
        }
        .deposit-pending-view .dp-detail-row .dd-v {
            color: var(--text-primary); font-weight: 800; font-size: 12px;
            max-width: 180px; word-break: break-all; text-align: right;
        }
        .deposit-pending-view .dp-detail-row .dd-v.gold { color: var(--accent); }

        .deposit-success-view {
            display: none;
            flex-direction: column; align-items: center; justify-content: center;
            padding: 40px 20px; text-align: center;
        }
        .deposit-success-view.show { display: flex; }
        .deposit-success-view .ds-icon {
            width: 90px; height: 90px; border-radius: 50%;
            background: rgba(14,203,129,0.15);
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 18px;
            animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .deposit-success-view .ds-icon svg {
            width: 48px; height: 48px; stroke: var(--green); fill: none;
            stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
        }
        .deposit-success-view .ds-title {
            font-size: 22px; font-weight: 900; color: var(--green);
            letter-spacing: 0.5px; margin-bottom: 8px;
        }
        .deposit-success-view .ds-amount {
            font-size: 32px; font-weight: 900; color: var(--text-primary);
            margin-bottom: 8px; font-family: 'SF Mono', Menlo, monospace;
        }
        .deposit-success-view .ds-msg {
            font-size: 13px; color: var(--text-secondary); font-weight: 600;
            line-height: 1.6; margin-bottom: 24px; max-width: 300px;
        }
        .deposit-success-view .ds-btn {
            background: var(--green); color: #000; border: none;
            padding: 14px 40px; border-radius: 8px; font-size: 14px;
            font-weight: 800; cursor: pointer; letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .chart-loader-overlay {
            position: absolute;
            inset: 0;
            background: rgba(11, 14, 17, 0.78);
            z-index: 50;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 14px;
            backdrop-filter: none;
            pointer-events: none;
            border-radius: 0;
        }
        body.light-mode .chart-loader-overlay {
            background: rgba(255, 255, 255, 0.78);
        }
        .chart-loader-overlay.show {
            display: flex;
            pointer-events: auto;
        }
        .chart-loader-spinner {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 3px solid rgba(240, 185, 11, 0.15);
            border-top-color: #f0b90b;
            animation: spinLoader 0.8s linear infinite;
        }
        @keyframes spinLoader {
            to { transform: rotate(360deg); }
        }
        /* ===== CHART INDICATOR / DRAWING TOOL ===== */
        .chart-indicator-tool {
            position: absolute;
            left: 10px;
            top: 44px;
            z-index: 55;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }
        .chart-indicator-dots {
            width: 38px;
            height: 38px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: rgba(17,20,24,.96);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0,0,0,.28);
            font-size: 22px;
            line-height: 1;
            touch-action: manipulation;
        }
        body.light-mode .chart-indicator-dots { background: rgba(255,255,255,.97); }
        .chart-indicator-dots.active { border-color: var(--accent); color: var(--accent); }
        .indicator-menu {
            width: 230px;
            max-height: min(360px, 55vh);
            overflow-y: auto;
            padding: 8px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: rgba(13,16,20,.98);
            box-shadow: 0 12px 35px rgba(0,0,0,.42);
            display: none;
        }
        body.light-mode .indicator-menu { background: rgba(255,255,255,.98); }
        .indicator-menu.show { display: block; }
        .indicator-menu-title {
            font-size: 11px; font-weight: 900; letter-spacing: .7px;
            color: var(--text-secondary); padding: 4px 7px 7px; text-transform: uppercase;
        }
        .indicator-row, .drawing-row {
            width: 100%; box-sizing: border-box;
            display: flex; align-items: center; justify-content: space-between;
            gap: 8px; padding: 9px 7px; border-radius: 7px; cursor: pointer;
            color: var(--text-primary); font-size: 11px; font-weight: 700;
            border: 0; background: transparent; font-family: inherit; text-align: left;
        }
        .indicator-row:hover, .drawing-row:hover { background: var(--bg-tertiary); }
        .indicator-row input { accent-color: var(--accent); width: 15px; height: 15px; }
        .indicator-row .ind-name, .drawing-row .ind-name { flex: 1; }
        .indicator-row .ind-type, .drawing-row .ind-type { font-size: 8px; color: var(--text-secondary); font-weight: 800; }
        .delete-all-indicators {
            width: calc(100% - 14px); margin: 7px; padding: 7px 10px;
            border: 1px solid rgba(239,68,68,.45); border-radius: 7px;
            background: rgba(239,68,68,.10); color: #ff5a6d;
            font: 800 10px/1 Inter, sans-serif; text-transform: uppercase;
            letter-spacing: .4px; cursor: pointer;
        }
        .delete-all-indicators:hover { background: rgba(239,68,68,.18); }
        .delete-all-indicators:active { transform: scale(.98); }

.indicator-section-label {
            font-size: 9px; font-weight: 900; letter-spacing: .8px;
            color: var(--text-secondary); padding: 8px 7px 4px; text-transform: uppercase;
        }
        .drawing-row.active { background: rgba(240,185,11,.14); color: var(--accent); }
        .drawing-row.active .ind-type { color: var(--accent); }
         .chart-drawing-layer {
            position: absolute; inset: 0; z-index: 35; pointer-events: none;
            overflow: hidden;
        }
        .chart-drawing-layer.interactive { pointer-events: auto; touch-action: none; }
        .chart-drawing-layer.dragging-drawing { cursor: grabbing; }
        .chart-drawing-layer svg { will-change: transform; }
        .chart-drawing-layer svg { width: 100%; height: 100%; display: block; overflow: visible; pointer-events: none; }
        .drawing-shape, .drawing-handle { pointer-events: all; touch-action: none; }
        .drawing-shape { vector-effect: non-scaling-stroke; cursor: grab; }
        .drawing-shape:active { cursor: grabbing; }
        .drawing-handle { vector-effect: non-scaling-stroke; cursor: nwse-resize; }
        .drawing-guide { pointer-events: none; vector-effect: non-scaling-stroke; }
        .chart-area.chart-transitioning #chart { visibility: hidden; }
        .chart-area.chart-transitioning .chart-info,
        .chart-area.chart-transitioning .price-tag,
        .chart-area.chart-transitioning .candle-attach,
        .chart-area.chart-transitioning .chart-indicator-tool,
        .chart-area.chart-transitioning .chart-drawing-layer,
        .chart-area.chart-transitioning .trade-execution-line,
        .chart-area.chart-transitioning .trade-direction-arrow,
        .chart-area.chart-transitioning .trade-timer-chip { visibility: hidden; }

        .chart-loader-text {
            font-size: 12px;
            font-weight: 700;
            color: #f0b90b;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            animation: loaderPulse 1.2s ease-in-out infinite;
        }
        @keyframes loaderPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .settings-content {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .settings-box {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .settings-box .sb-label {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .settings-box .sb-label svg {
            width: 18px; height: 18px;
            stroke: var(--accent);
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .theme-mode-group {
            display: flex;
            gap: 6px;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 3px;
        }
        .theme-mode-btn {
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            letter-spacing: 0.3px;
            transition: all 0.2s;
        }
        .theme-mode-btn.active {
            background: var(--accent);
            color: #000;
        }
        .logout-btn {
            width: auto;
            min-width: 140px;
            max-width: 180px;
            margin: 10px auto 0;
            background: linear-gradient(135deg, var(--red), #d63447);
            color: #fff;
            border: none;
            padding: 10px 24px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 3px 10px rgba(246,70,93,0.3);
            align-self: center;
        }
        .logout-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(246,70,93,0.4); }
        .logout-btn:active { transform: scale(0.97); }
        .logout-btn svg {
            width: 14px; height: 14px;
            stroke: #fff;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .login-email-box {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 8px;
            word-break: break-all;
            opacity: 0.85;
        }
        .login-email-box .email-icon {
            flex-shrink: 0;
            width: 16px; height: 16px;
            stroke: var(--accent);
            fill: none;
            stroke-width: 2;
        }

        #offlinePopup {
            position: fixed; inset: 0; background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px); z-index: 9999; display: none;
            flex-direction: column; align-items: center; justify-content: center;
            gap: 16px; padding: 20px; text-align: center;
        }
        #offlinePopup.show { display: flex; }
        #offlinePopup .off-ic { font-size: 56px; }
        #offlinePopup h2 { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
        #offlinePopup p { color: var(--text-secondary); font-size: 13px; max-width: 300px; line-height: 1.5; }

        #globalNetworkBlocker {
            position: fixed; inset: 0; z-index: 999999; display: none;
            flex-direction: column; align-items: center; justify-content: center;
            gap: 14px; padding: 24px; text-align: center;
            background: #050609; color: #fff;
            pointer-events: auto; touch-action: none;
        }
        #globalNetworkBlocker .gnb-icon {
            width: 68px; height: 68px; border-radius: 50%;
            display:flex; align-items:center; justify-content:center;
            background: rgba(240,185,11,0.12); border:1px solid rgba(240,185,11,0.35);
            font-size: 32px;
        }
        #globalNetworkBlocker h2 { font-size: 21px; font-weight: 900; letter-spacing: .5px; }
        #globalNetworkBlocker p { color:#9aa3b2; font-size:13px; max-width:320px; line-height:1.55; }
        #globalNetworkBlocker .gnb-status { color:#f0b90b; font-size:11px; font-weight:800; letter-spacing:1px; text-transform:uppercase; }
        #globalNetworkBlocker .gnb-retry {
            margin-top:4px; border:1px solid rgba(240,185,11,.45); background:rgba(240,185,11,.12);
            color:#f0b90b; border-radius:8px; padding:10px 18px; font:800 12px inherit; cursor:pointer;
        }
        body.rb-network-blocked > *:not(#globalNetworkBlocker) {
            pointer-events: none !important;
        }

        #toast {
            position: fixed; top: 70px; left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: var(--bg-tertiary); border: 1px solid var(--border);
            padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
            z-index: 9000; opacity: 0; pointer-events: none; transition: all 0.3s;
            box-shadow: var(--shadow); max-width: 90%; text-align: center;
        }
        #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
        #toast.success { border-color: var(--green); color: var(--green); }
        #toast.error { border-color: var(--red); color: var(--red); }
        #toast.info { border-color: var(--accent); color: var(--accent); }
        #toast.account-toast {
            background: rgba(0, 0, 0, 0.82) !important;
            border: 2px solid #10b981 !important;
            color: #10b981 !important;
            font-weight: 800 !important;
            letter-spacing: 0.5px !important;
            box-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
            text-shadow: none !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            outline: none !important;
            border-radius: 10px !important;
            padding: 14px 24px !important;
        }

        .trade-amount-popup {
            position: fixed;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.5);
            background: rgba(30, 35, 41, 0.98);
            border: 2px solid var(--accent);
            border-radius: 14px;
            padding: 18px 28px;
            z-index: 9500;
            opacity: 0; pointer-events: none;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 8px 32px rgba(240, 185, 11, 0.4);
            text-align: center;
        }
        .trade-amount-popup.show {
            opacity: 1; transform: translate(-50%, -50%) scale(1);
        }
        .trade-amount-popup .tap-amount {
            font-size: 22px; font-weight: 900; color: var(--accent);
            letter-spacing: 0.5px; line-height: 1.3;
        }
        .trade-amount-popup .tap-label {
            font-size: 12px; font-weight: 700; color: var(--text-secondary);
            letter-spacing: 1px; text-transform: uppercase; margin-top: 4px;
        }

        .trade-execution-line {
            position: absolute;
            height: 2px;
            pointer-events: none;
            z-index: 7;
            border-radius: 1px;
            transform-origin: left center;
            transition: opacity 0.3s;
            box-shadow: none;
        }
        .trade-execution-line.buy { background: #00E676; }
        .trade-execution-line.sell { background: #FF3D00; }

        .trade-direction-arrow {
            display: block;
            position: static;
            width: 12px;
            height: 12px;
            flex: 0 0 12px;
            pointer-events: none;
            animation: none;
        }
        .trade-direction-arrow.up path { fill: #00E676; }
        .trade-direction-arrow.down path { fill: #FF3D00; }

        .trade-timer-chip {
            position: absolute;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 4px 7px;
            min-height: 23px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 800;
            line-height: 1;
            pointer-events: none;
            z-index: 9;
            white-space: nowrap;
            transition: none;
            letter-spacing: 0.1px;
            box-sizing: border-box;
        }
        .trade-timer-value {
            display: block;
            flex: 0 0 auto;
            font-variant-numeric: tabular-nums;
            line-height: 1;
        }
        .trade-timer-chip.buy {
            background: rgba(0, 230, 118, 0.18);
            border: 1px solid #00E676;
            color: #00E676;
        }
        .trade-timer-chip.sell {
            background: rgba(255, 61, 0, 0.18);
            border: 1px solid #FF3D00;
            color: #FF3D00;
        }

        .trade-result-pop {
            position: absolute;
            font-size: 12px; font-weight: 900;
            padding: 6px 12px; border-radius: 6px;
            pointer-events: none; z-index: 10;
            white-space: nowrap;
            animation: resultPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
            letter-spacing: 0.5px;
            box-shadow: none;
            border: none;
        }
        @keyframes resultPop {
            0% { transform: scale(0.3); opacity: 0; }
            60% { transform: scale(1.15); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        .trade-result-pop.win { background: #0ecb81; color: #fff; }
        .trade-result-pop.loss { background: #f6465d; color: #fff; }
        .trade-result-pop.fade-out {
            opacity: 0; transform: scale(0.5) translateY(-10px);
            transition: all 0.6s ease;
        }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

        @media (max-width: 991px) {
            .landing-hero {
                padding-top: 95px;
                min-height: auto;
            }
            .landing-hero-text h1 {
                font-size: 34px;
            }
        }
        @media (max-width: 768px) {
            .landing-header {
                padding: 10px 4%;
            }
            .landing-logo-text {
                font-size: 14px;
            }
            .landing-logo-icon {
                width: 30px;
                height: 30px;
                font-size: 15px;
            }
            .landing-btn {
                padding: 6px 12px;
                font-size: 12px;
            }
            .landing-hero {
                padding-top: 80px;
                padding-bottom: 10px;
                flex-direction: column;
                text-align: center;
                gap: 18px;
            }
            .landing-hero-text h1 {
                font-size: 24px;
            }
            .landing-hero-text p {
                font-size: 13px;
                margin-bottom: 12px;
            }
            .landing-laptop-frame {
                height: 160px;
                max-width: 100%;
            }
            .landing-phone-frame {
                position: absolute;
                right: 5px;
                bottom: -20px;
                width: 100px;
                height: 170px;
            }
            .landing-device-mockups {
                position: relative;
                min-height: 180px;
                margin-bottom: 30px;
            }
            .landing-preview-section {
                padding: 25px 5% 40px;
            }
            .landing-preview-section h2 {
                font-size: 20px;
            }
            .landing-preview-section p {
                font-size: 12px;
                margin-bottom: 16px;
            }
            .landing-assets-section {
                padding: 30px 5% 25px;
            }
            .landing-assets-section h2 {
                font-size: 20px;
                margin-bottom: 16px;
            }
            .landing-asset-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            .landing-asset-card {
                padding: 12px 10px;
            }
            .landing-asset-pair {
                font-size: 12px;
            }
            .landing-footer {
                padding: 25px 5% 18px;
            }
            .landing-footer-legal h4 {
                font-size: 13px;
            }
            .landing-footer-legal p {
                font-size: 11px;
            }
        }

        /* Five original, crisp SVG menu icons: rounded squares; absolutely no glow/shadow/blur. */
        .menu-drawer .menu-item:not(.reset-item) .mi-ic {
            width: 34px !important;
            height: 34px !important;
            min-width: 34px !important;
            min-height: 34px !important;
            flex: 0 0 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 0 !important;
            margin: 0 !important;
            border-radius: 10px !important;
            border: 1px solid currentColor !important;
            outline: none !important;
            box-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }
        .menu-drawer .menu-item:not(.reset-item) .mi-ic svg {
            display: block;
            width: 20px;
            height: 20px;
            flex: 0 0 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
            box-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
        }
        .menu-drawer .menu-item[data-menu="profile"] .mi-ic { color: #9bc6ff; background: #172b43 !important; }
        .menu-drawer .menu-item[data-menu="analytics"] .mi-ic { color: #72d8d0; background: #123533 !important; }
        .menu-drawer .menu-item[data-menu="deposit"] .mi-ic { color: #7ae3ae; background: #123327 !important; }
        .menu-drawer .menu-item[data-menu="withdraw"] .mi-ic { color: #f4b98b; background: #3b261c !important; }
        .menu-drawer .menu-item[data-menu="settings"] .mi-ic { color: #c6acfb; background: #2d2543 !important; }
        /* Preserve the pre-existing demo reset icon's visual treatment. */
        .menu-drawer .menu-item.reset-item .mi-ic { box-shadow: none !important; filter: none !important; }
        .loading-screen .splash-icon-box,
        .loading-screen .splash-icon-box img,
        .loading-screen .splash-title {
            box-shadow: none !important;
            text-shadow: none !important;
            filter: none !important;
            -webkit-filter: none !important;
        }
    