/* ===== LURKY BINARY TRADER - PREMIUM DASHBOARD CSS ===== */

/* ===== OAUTH REDIRECT SPLASH ===== */
#oauth-redirect-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
}

.oauth-logo-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff444f, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: oauth-pulse 1.5s ease-in-out infinite;
}

.oauth-logo-circle .fas {
    color: #fff;
    font-size: 28px;
}

.oauth-auth-text {
    color: #94a3b8;
    font-size: 15px;
}

@keyframes oauth-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

@keyframes oauth-dot {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40%           { opacity: 1;   transform: scale(1.2); }
}

/* ===== DESIGN TOKENS ===== */
:root {
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --text-primary: #1a1d23;
    --text-secondary: #5a6270;
    --text-muted: #8b929d;
    --border: #e0e4ea;
    --border-light: #edf0f4;

    --accent-blue: #1a56db;
    --accent-blue-dark: #1345b5;
    --accent-green: #0cad56;
    --accent-green-light: #d1fae5;
    --accent-red: #e53e3e;
    --accent-red-light: #fee2e2;
    --accent-orange: #dd6b20;
    --accent-orange-light: #ffedd5;
    --accent-purple: #7c3aed;
    --accent-purple-light: #ede9fe;
    --accent-teal: #0d9488;
    --accent-pink: #db2777;

    --navbar-bg: linear-gradient(135deg, #1a3a8a 0%, #1e56c7 40%, #2563eb 100%);
    --navbar-text: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow-green: 0 0 20px rgba(12, 173, 86, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(26, 86, 219, 0.15);

    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 56px;
    --navbar-height: 54px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== APP WRAPPER ===== */
.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* ===== TOP HEADER ===== */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
}

.hamburger-btn:hover {
    background: var(--bg-body);
    color: var(--accent-blue);
}

.header-separator {
    width: 1px;
    height: 28px;
    background: var(--border);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flag-balance {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.flag-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.balance-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.deposit-btn {
    padding: 10px 24px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.deposit-btn:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-blue);
}

/* ===== MAIN NAVIGATION BAR ===== */
.main-navbar {
    background: linear-gradient(90deg, #0a1628 0%, #0d2147 40%, #0a1e4a 70%, #071232 100%);
    height: var(--navbar-height);
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 90;
    box-shadow: 0 3px 20px rgba(0, 136, 255, 0.35), 0 1px 0 rgba(0, 195, 255, 0.15) inset;
    border-bottom: 1px solid rgba(0, 180, 255, 0.2);
}

.main-navbar::-webkit-scrollbar {
    height: 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    min-width: max-content;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 20px;
    color: rgba(200, 225, 255, 0.82);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    border-radius: 6px;
    position: relative;
    height: 100%;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.nav-tab i {
    font-size: 17px;
    transition: var(--transition);
}

.nav-tab span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: capitalize;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(0, 180, 255, 0.12);
    text-shadow: 0 0 12px rgba(0, 195, 255, 0.5);
}

.nav-tab.active {
    color: #ffffff;
    background: rgba(0, 195, 255, 0.15);
    text-shadow: 0 0 10px rgba(0, 220, 255, 0.6);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, #00c3ff, #0088ff, #00e5ff);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.9), 0 0 20px rgba(0, 150, 255, 0.5);
}

.nav-divider {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

/* Bot dropdown on navbar */
.nav-tab.has-submenu {
    position: relative;
}

.bot-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px 0;
    z-index: 500;
    animation: dropdownIn 0.2s ease;
}

.nav-tab.has-submenu:hover .bot-dropdown,
.nav-tab.has-submenu.submenu-open .bot-dropdown {
    display: block;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.bot-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.bot-dropdown-item:hover {
    background: var(--accent-blue);
    color: #ffffff;
}

.bot-dropdown-item i {
    width: 18px;
    text-align: center;
}

/* ===== CONTENT AREA ===== */
.content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: var(--bg-body);
}

/* ===== VIEW PANELS ===== */
.view-panel {
    display: none;
    animation: viewFadeIn 0.35s ease;
}

.view-panel.active {
    display: block;
}

/* Manual Trader view panel overrides */
#view-manual-trader {
    padding: 0;
    overflow: hidden;
    height: calc(100vh - 120px);
}

#manual-trader-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.page-header h1 i {
    color: var(--accent-blue);
    font-size: 22px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== DASHBOARD ===== */
.dashboard-welcome {
    margin-bottom: 24px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 2px;
}

.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dash-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dash-card-icon.green {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.dash-card-icon.blue {
    background: rgba(26, 86, 219, 0.1);
    color: var(--accent-blue);
}

.dash-card-icon.purple {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
}

.dash-card-icon.orange {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

.dash-card-info {
    display: flex;
    flex-direction: column;
}

.dash-card-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-card-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dash-card-value.positive {
    color: var(--accent-green);
}

.dash-card-value.negative {
    color: var(--accent-red);
}

.dash-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dash-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.dash-section.full-width {
    grid-column: 1 / -1;
}

.dash-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.dash-section h3 i {
    color: var(--accent-blue);
    font-size: 14px;
}

/* Mini table */
.mini-table-wrap {
    overflow-x: auto;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
}

.mini-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-body);
}

.mini-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.mini-table .empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-style: italic;
}

.mini-table .win {
    color: var(--accent-green);
    font-weight: 700;
}

.mini-table .loss {
    color: var(--accent-red);
    font-weight: 700;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.qa-btn {
    padding: 12px 10px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.qa-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.qa-btn.green {
    background: var(--accent-green);
}

.qa-btn.blue {
    background: var(--accent-blue);
}

.qa-btn.purple {
    background: var(--accent-purple);
}

.qa-btn.orange {
    background: var(--accent-orange);
}

.qa-btn.teal {
    background: var(--accent-teal);
}

.qa-btn.pink {
    background: var(--accent-pink);
}

/* Dashboard mini chart */
#dash-mini-chart {
    width: 100%;
    height: 200px;
    border-radius: var(--radius);
    background: var(--bg-body);
    border: 1px solid var(--border-light);
}

/* ===== BOT BUILDER PAGE ===== */
.builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.builder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.builder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-blue);
    opacity: 0;
    transition: var(--transition);
}

.builder-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.builder-card:hover::before {
    opacity: 1;
}

.builder-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.builder-icon.green {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.builder-icon.blue {
    background: rgba(26, 86, 219, 0.1);
    color: var(--accent-blue);
}

.builder-icon.purple {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
}

.builder-icon.orange {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

.builder-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.builder-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.builder-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.builder-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.builder-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-blue);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===== BOT CARD STATUS BADGE ===== */
.bot-card-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.bot-card-status.stopped {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bot-card-status.running {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse-status 2s infinite;
}

.bot-card-status.active {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== BOT OPEN BUTTON ===== */
.bot-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    pointer-events: none; /* card handles click */
}

.builder-card:hover .bot-open-btn {
    background: linear-gradient(135deg, #1e40af 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

/* ==========================================================================
   LUCKFLOWTRADE — PREMIUM 3D AUTOMATED TRADING BOT CARDS SYSTEM
   ========================================================================== */

.builder-card.bot-3d-card {
    position: relative;
    background: #040814;
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 22px;
    padding: 0;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85), 
                0 0 25px rgba(0, 160, 255, 0.12), 
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s ease, 
                border-color 0.35s ease;
    will-change: transform, box-shadow;
}

.builder-card.bot-3d-card::before {
    display: none; /* override default top bar */
}

/* Background Wrap & Dominant Reference Artwork */
.bot-card-bg-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    border-radius: 22px;
    background: #040814;
}

.bot-card-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: brightness(0.92) contrast(1.15) saturate(1.12);
    transform: scale(1.02);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

/* Cinematic Multi-stop Dark Vignette Overlay */
.bot-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(4, 8, 20, 0.72) 0%,
        rgba(4, 8, 20, 0.18) 28%,
        rgba(4, 8, 20, 0.35) 55%,
        rgba(4, 8, 20, 0.88) 80%,
        #040814 100%
    );
    pointer-events: none;
}

/* Ambient Electric-Blue Pulsing Core */
.bot-card-glow-pulse {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 220, 255, 0.32) 0%,
        rgba(0, 110, 255, 0.16) 45%,
        transparent 70%
    );
    filter: blur(28px);
    z-index: 2;
    pointer-events: none;
    animation: ambientCorePulse 4s ease-in-out infinite alternate;
}

@keyframes ambientCorePulse {
    0% {
        opacity: 0.35;
        transform: translate(-50%, -50%) scale(0.92);
    }
    100% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(1.12);
        filter: blur(34px);
    }
}

/* Dynamic Interactive Light Sheen */
.bot-card-sheen {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    border-radius: 22px;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 240, 255, 0.18) 0%,
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.builder-card.bot-3d-card:hover .bot-card-sheen {
    opacity: 1;
}

/* Continuous Floating & Sparkling Blue Particles Field */
.bot-particle-field {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.b-dot {
    position: absolute;
    border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 8px #00f0ff, 0 0 16px #0088ff, 0 0 24px rgba(0, 212, 255, 0.7);
    pointer-events: none;
}

.bd-1 { left: 16%; width: 4px; height: 4px; animation: floatBlueParticle 5.5s infinite ease-in; animation-delay: 0s; }
.bd-2 { left: 42%; width: 3px; height: 3px; animation: floatBlueParticle 4.3s infinite ease-in; animation-delay: 1.1s; }
.bd-3 { left: 68%; width: 5px; height: 5px; animation: floatBlueParticle 6.2s infinite ease-in; animation-delay: 0.6s; }
.bd-4 { left: 28%; width: 2.5px; height: 2.5px; animation: floatBlueParticle 3.9s infinite ease-in; animation-delay: 2.2s; }
.bd-5 { left: 58%; width: 4px; height: 4px; animation: floatBlueParticle 5.8s infinite ease-in; animation-delay: 1.8s; }
.bd-6 { left: 82%; width: 3px; height: 3px; animation: floatBlueParticle 4.7s infinite ease-in; animation-delay: 3.0s; }
.bd-7 { left: 34%; width: 4.5px; height: 4.5px; animation: floatBlueParticle 6.8s infinite ease-in; animation-delay: 3.5s; }

@keyframes floatBlueParticle {
    0% {
        transform: translateY(440px) translateX(0px) scale(0.6);
        opacity: 0;
    }
    20% {
        opacity: 0.95;
    }
    75% {
        opacity: 0.85;
        transform: translateY(120px) translateX(12px) scale(1.15);
    }
    100% {
        transform: translateY(-25px) translateX(-8px) scale(0.5);
        opacity: 0;
    }
}

/* Sparkling Starburst Particles */
.b-sparkle {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #ffffff;
    box-shadow: 0 0 10px #00f0ff, 0 0 20px #0099ff;
    clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
    pointer-events: none;
}

.bs-1 {
    top: 32%;
    left: 48%;
    animation: pulseSparkleStar 3.8s infinite ease-in-out;
    animation-delay: 0.5s;
}

.bs-2 {
    top: 24%;
    left: 64%;
    animation: pulseSparkleStar 4.6s infinite ease-in-out;
    animation-delay: 2.1s;
}

@keyframes pulseSparkleStar {
    0%, 100% {
        transform: scale(0.2) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.4) rotate(90deg);
        opacity: 1;
        filter: drop-shadow(0 0 10px #00f0ff);
    }
}

/* Card Header Bar (Status & Tier Tag) */
.bot-card-top {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 0;
    pointer-events: none;
    transform: translateZ(15px);
}

.bot-tier-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(2, 132, 199, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Floating Center Icon Halo */
.bot-card-icon-halo {
    position: relative;
    z-index: 5;
    margin: 12px auto 0;
    display: flex;
    justify-content: center;
    transform: translateZ(28px);
    pointer-events: none;
}

.bot-card-icon-halo .builder-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0;
    background: rgba(6, 14, 32, 0.75);
    border: 1px solid rgba(0, 212, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 
                0 0 20px rgba(0, 180, 255, 0.35), 
                inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Dark Glassmorphism Bottom Panel */
.bot-card-glass-panel {
    position: relative;
    z-index: 5;
    margin: 14px 12px 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 16, 36, 0.84) 0%, rgba(4, 9, 22, 0.96) 100%);
    border: 1px solid rgba(0, 212, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateZ(22px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.bot-card-glass-panel h3 {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 212, 255, 0.4);
}

.bot-card-glass-panel p {
    font-size: 12.5px;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0 0 14px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.bot-card-glass-panel .bot-open-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #0c4a6e 100%);
    border: 1px solid rgba(56, 189, 248, 0.65);
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0;
}

/* 3D Hover & Elevation Effects */
.builder-card.bot-3d-card:hover {
    border-color: rgba(0, 220, 255, 0.75);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.9), 
                0 0 35px rgba(0, 212, 255, 0.42), 
                inset 0 0 20px rgba(0, 160, 255, 0.18);
}

.builder-card.bot-3d-card:hover .bot-card-artwork {
    transform: scale(1.08) translateY(-3px);
    filter: brightness(1.0) contrast(1.2) saturate(1.2);
}

.builder-card.bot-3d-card:hover .bot-card-icon-halo .builder-icon {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(0, 212, 255, 0.6);
}

.builder-card.bot-3d-card:hover .bot-card-glass-panel {
    border-color: rgba(0, 220, 255, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75), 
                0 0 18px rgba(0, 180, 255, 0.22), 
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateZ(28px);
}

.builder-card.bot-3d-card:hover .bot-open-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 45%, #0369a1 100%);
    box-shadow: 0 6px 22px rgba(14, 165, 233, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.9);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .b-dot,
    .b-sparkle,
    .bot-card-glow-pulse {
        animation: none !important;
    }
    .builder-card.bot-3d-card {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================================================
   MOBILE BOT CARD RESPONSIVE OPTIMIZATION (320px – 767px)
   Proportionally compacts bot cards by ~20-25% while preserving all 3D styling
   ========================================================================== */
@media (max-width: 767px) {
    #bots-list-grid,
    #dbb-bots-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Overall card height reduced ~23% (480px -> 370px) */
    .builder-card.bot-3d-card {
        min-height: 370px;
        border-radius: 18px;
        box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.8),
                    0 0 18px rgba(0, 160, 255, 0.12),
                    inset 0 1px 1px rgba(255, 255, 255, 0.15);
    }

    .bot-card-bg-wrap {
        border-radius: 18px;
    }

    /* Artwork image optimized vertically for mobile frame */
    .bot-card-artwork {
        object-position: center 22%;
    }

    /* Ambient blue core glow resized for mobile */
    .bot-card-glow-pulse {
        width: 180px;
        height: 180px;
        top: 32%;
        filter: blur(20px);
    }

    /* Compact card header */
    .bot-card-top {
        padding: 12px 14px 0;
    }

    .bot-card-top .bot-card-status {
        font-size: 10px;
        padding: 2.5px 8px;
        margin-bottom: 0;
    }

    .bot-tier-tag {
        font-size: 10px;
        padding: 2.5px 8px;
        gap: 4px;
    }

    /* Compact center floating icon */
    .bot-card-icon-halo {
        margin: 6px auto 0;
        transform: translateZ(18px);
    }

    .bot-card-icon-halo .builder-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 21px;
    }

    /* Compact glassmorphism bottom panel */
    .bot-card-glass-panel {
        margin: 8px 10px 10px;
        padding: 12px 14px;
        border-radius: 14px;
        transform: translateZ(15px);
    }

    .bot-card-glass-panel h3 {
        font-size: 16.5px;
        margin: 0 0 4px 0;
    }

    .bot-card-glass-panel p {
        font-size: 11.5px;
        line-height: 1.45;
        margin: 0 0 10px 0;
    }

    .bot-card-glass-panel .bot-open-btn {
        width: 100%;
        padding: 9.5px 14px;
        font-size: 12px;
        border-radius: 10px;
        gap: 6px;
    }
}

/* Ultra-compact tuning for very narrow screens (<= 360px e.g. iPhone SE / small Androids) */
@media (max-width: 360px) {
    .builder-card.bot-3d-card {
        min-height: 355px;
    }

    .bot-card-top {
        padding: 10px 12px 0;
    }

    .bot-card-icon-halo {
        margin: 4px auto 0;
    }

    .bot-card-icon-halo .builder-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 19px;
    }

    .bot-card-glass-panel {
        margin: 6px 8px 8px;
        padding: 10px 12px;
    }

    .bot-card-glass-panel h3 {
        font-size: 15px;
        margin-bottom: 3px;
    }

    .bot-card-glass-panel p {
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .bot-card-glass-panel .bot-open-btn {
        padding: 8.5px 12px;
        font-size: 11.5px;
    }
}

/* ===== CHART PAGE ===== */
.chart-full-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-light);
}

.chart-toolbar-centered {
    margin-bottom: 20px;
    justify-content: center;
}

.chart-market-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.chart-price-live {
    font-weight: 800;
    font-size: 18px;
    color: var(--accent-blue);
    font-variant-numeric: tabular-nums;
}

.chart-digit-live {
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-purple);
    background: var(--accent-purple-light);
    padding: 4px 10px;
    border-radius: 6px;
}

#main-chart-canvas {
    width: 100%;
    height: 420px;
    display: block;
}

.chart-digit-bar {
    padding: 14px 20px;
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
}

.digit-bar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.digit-bars {
    display: flex;
    gap: 6px;
    height: 60px;
    align-items: flex-end;
}

.dbar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.dbar-fill {
    width: 100%;
    background: var(--accent-blue);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.3s ease;
}

.dbar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
}

.dbar-pct {
    font-size: 10px;
    margin-top: 2px;
}

/* ===== BOT PAGES ===== */
.bot-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    min-height: 500px;
}

.bot-layout-single {
    grid-template-columns: 1fr;
}

.bot-layout-single > .bot-controls {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.bot-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.bot-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.bot-status-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bot-status-badge.stopped {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.bot-status-badge.running {
    background: var(--accent-green-light);
    color: var(--accent-green);
    animation: pulse-badge 2s infinite;
}

.bot-status-badge.analyzing {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.bot-pnl {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.bot-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-group input[type="range"] {
    padding: 0;
    border: none;
    box-shadow: none;
    accent-color: var(--accent-blue);
    height: 6px;
    cursor: pointer;
}

.range-display {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-blue);
    text-align: right;
}

.bot-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.bot-start-btn {
    padding: 12px 16px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.bot-start-btn:hover {
    background: #0a9a4c;
    transform: translateY(-1px);
}

.bot-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bot-stop-btn {
    padding: 12px 16px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.bot-stop-btn:hover {
    background: #c53030;
}

.bot-stop-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Bot Logs */
.bot-logs-area {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.bot-logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1a1d23;
    color: #a1aab5;
    font-size: 13px;
    font-weight: 700;
}

.bot-logs-header i {
    margin-right: 6px;
}

.clear-logs-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.clear-logs-btn:hover {
    color: var(--accent-red);
}

.bot-logs {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: #0d1117;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    color: #c9d1d9;
    min-height: 400px;
    max-height: 500px;
}

.bot-logs .log-entry {
    margin-bottom: 2px;
}

.bot-logs .log-time {
    color: #484f58;
}

.bot-logs .log-info {
    color: #58a6ff;
}

.bot-logs .log-decision {
    color: #d2a8ff;
}

.bot-logs .log-trade {
    color: #ffa657;
}

.bot-logs .log-win {
    color: #3fb950;
}

.bot-logs .log-loss {
    color: #f85149;
}

.bot-logs .log-warning {
    color: #d29922;
}

.bot-logs .log-analysis {
    color: #79c0ff;
}

/* ===== ANALYSIS TOOL ===== */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.analysis-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.analysis-card h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.analysis-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.analysis-signal {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-body);
    color: var(--text-muted);
}

.analysis-signal.bullish {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.analysis-signal.bearish {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.analysis-signal.neutral {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}

.analysis-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.analysis-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section h3 i {
    color: var(--accent-blue);
}

.tick-stream {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #0d1117;
    color: #c9d1d9;
    padding: 16px;
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.8;
}

/* ===== RISK MANAGEMENT ===== */
.risk-calc-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    max-width: 700px;
}

.risk-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.risk-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.risk-result {
    padding: 18px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.risk-result.safe {
    background: var(--accent-green-light);
}

.risk-result.warning {
    background: var(--accent-orange-light);
}

.risk-result.danger {
    background: var(--accent-red-light);
}

.risk-result-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.risk-result-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

/* ===== COPY TRADING ===== */
.copy-traders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.trader-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.trader-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.trader-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.trader-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trader-info h4 {
    font-size: 15px;
    font-weight: 700;
}

.trader-stat {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.trader-stat.positive {
    color: var(--accent-green);
    font-weight: 700;
}

.copy-btn {
    padding: 8px 18px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--accent-blue-dark);
}

/* ===== STRATEGY PAGES ===== */
.strategy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.strategy-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.strategy-info {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.strategy-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.strategy-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== HAMBURGER SIDE DRAWER ===== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.side-drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-close {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--bg-body);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.drawer-close:hover {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.drawer-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.drawer-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.drawer-section-title:hover {
    color: var(--accent-blue);
}

.drawer-section-title span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-section-title i:first-child {
    color: var(--accent-blue);
}

.drawer-chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.drawer-section-title.expanded .drawer-chevron {
    transform: rotate(180deg);
}

.drawer-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
}

.drawer-submenu.open {
    display: flex;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.drawer-link:hover {
    background: rgba(26, 86, 219, 0.08);
    color: var(--accent-blue);
}

.drawer-link i {
    width: 18px;
    text-align: center;
    font-size: 13px;
}

.drawer-theme-options {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

.theme-option {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    color: var(--text-secondary);
}

.theme-option:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.theme-option.active {
    border-color: var(--accent-blue);
    background: rgba(26, 86, 219, 0.08);
    color: var(--accent-blue);
}

.drawer-footer {
    margin-top: auto;
    padding: 16px 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

/* ===== DARK THEME ===== */
body.dark-theme {
    --bg-body: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2230;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border: #30363d;
    --border-light: #21262d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

body.dark-theme .top-header {
    background: #161b22;
}

body.dark-theme .main-navbar {
    background: linear-gradient(135deg, #0d2046 0%, #162d6b 40%, #1a46a0 100%);
}

body.dark-theme .bot-logs-header {
    background: #010409;
}

body.dark-theme .bot-logs {
    background: #010409;
}

body.dark-theme .mini-table th {
    background: #0d1117;
}

body.dark-theme .chart-toolbar {
    background: #0d1117;
}

body.dark-theme .chart-digit-bar {
    background: #0d1117;
}

body.dark-theme .tick-stream {
    background: #010409;
}

body.dark-theme .form-group input,
body.dark-theme .form-group select {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

body.dark-theme .flag-icon {
    border-color: #30363d;
    background: #21262d;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .bot-layout {
        grid-template-columns: 1fr;
    }

    .dash-grid-2col {
        grid-template-columns: 1fr;
    }

    .strategy-content {
        grid-template-columns: 1fr;
    }

    .risk-inputs-grid {
        grid-template-columns: 1fr;
    }

    .risk-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }

    .dash-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .bot-layout {
        grid-template-columns: 1fr;
    }

    .nav-tab {
        padding: 6px 14px;
    }

    .nav-tab span {
        font-size: 10px;
    }

    .dashboard-welcome h1 {
        font-size: 22px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .analysis-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .dash-stats-row {
        grid-template-columns: 1fr;
    }

    .header-right {
        gap: 8px;
    }

    .balance-text {
        font-size: 15px;
    }

    .deposit-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== NEW DASHBOARD LAUNCHER ===== */
.launcher-header {
    text-align: center;
    margin-bottom: 32px;
    margin-top: 16px;
}

.launcher-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.launcher-header p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.bot-launcher-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 500px;
    margin: 0 auto 60px auto;
}

.launcher-card {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.launcher-card:hover {
    transform: translateY(-4px);
}

.launcher-card span {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.launcher-icon {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: #f4f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.launcher-card:hover .launcher-icon {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.launcher-footer-wrapper {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-risk-disclaimer {
    align-self: flex-start;
    background: #facc15;
    color: #854d0e;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.launcher-footer {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 12px 16px;
    gap: 20px;
}

.btn-run {
    background: #0d9488;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 100px;
    justify-content: center;
    transition: var(--transition);
}

.btn-run.stopped {
    background: #e53e3e;
}

.run-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

/* ===== NEW COPY TRADING REPLICATOR ===== */
.replicator-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.btn-green-solid {
    background: #22c55e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-green-solid.stopped {
    background: #e53e3e;
}

.btn-tutorial {
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-tutorial i {
    color: #ff0000;
    font-size: 24px;
    margin-bottom: 4px;
}

.btn-tutorial.inline {
    margin-left: 16px;
}

.btn-tutorial span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.account-banner-row {
    background: #1e3a8a;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.account-id {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.account-bal {
    color: #facc15;
    font-size: 18px;
    font-weight: 700;
}

.replicator-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.replicator-divider {
    height: 1px;
    background: var(--border-light);
    margin-bottom: 24px;
}

.replicator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.replicator-form-row {
    display: flex;
    flex: 1;
    gap: 12px;
    align-items: center;
}

.replicator-form-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.btn-cyan {
    background: #06b6d4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    min-width: 80px;
    transition: var(--transition);
}

.btn-cyan:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-sync {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 24px;
    gap: 4px;
}

.btn-sync i {
    font-size: 16px;
}

.replicator-stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.stats-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stats-top h3 {
    font-size: 18px;
    font-weight: 700;
}

.stats-bottom {
    font-size: 14px;
    color: var(--text-secondary);
}

.stats-bottom.success {
    color: #22c55e;
    font-weight: 600;
}

/* ===== LANDING PAGE VIEW STYLING ===== */
.landing-view {
    display: none;
    background: #090b0f;
    color: #ffffff;
    min-height: 100vh;
    width: 100%;
    flex-direction: column;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.landing-view.active {
    display: flex;
}

/* Landing Header */
.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    min-height: 72px;
    height: 72px;
    background: rgba(9, 11, 15, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.landing-logo .logo-mark {
    background: #22c55e;
    color: #000000;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
}

.landing-logo .logo-text {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.landing-nav .nav-item {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-green {
    color: #22c55e;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-btn-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.landing-btn-login:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.landing-btn-signup {
    background: #22c55e;
    color: #0d1117;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.landing-btn-signup:hover {
    background: #16a34a;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.landing-btn-deriv {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 68, 79, 0.12);
    border: 1px solid rgba(255, 68, 79, 0.45);
    color: #ff444f;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.landing-btn-deriv:hover {
    background: #ff444f;
    border-color: #ff444f;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 68, 79, 0.4);
    transform: translateY(-1px);
}

/* Landing Hero */
.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: radial-gradient(circle at center, #111622 0%, #090b0f 70%);
}

.hero-bg-container {
    position: relative;
    max-width: 1000px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* Floating Withdraw Container */
.floating-withdraw-container {
    position: absolute;
    top: 36.5%;
    left: 43.6%;
    width: 32.5%;
    height: 10.5%;
    cursor: pointer;
    z-index: 10;
    border-radius: 12px;
    transform-origin: center;
    animation: floatingBob 3s ease-in-out infinite;
}

@keyframes floatingBob {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-6px) scale(1.02);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

.floating-withdraw-glow {
    position: absolute;
    inset: -3px;
    background: linear-gradient(90deg, #22c55e, #10b981);
    border-radius: 12px;
    opacity: 0.7;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

.floating-withdraw-container:hover .floating-withdraw-glow {
    opacity: 1;
    filter: blur(12px);
}

.floating-withdraw-card {
    position: absolute;
    inset: 0;
    background: #090b0f;
    border: 2px solid #22c55e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 6%;
    gap: 5%;
    box-shadow: inset 0 0 15px rgba(34, 197, 94, 0.2);
    transition: all 0.3s ease;
}

.floating-withdraw-container:hover .floating-withdraw-card {
    background: #111622;
    border-color: #4ade80;
}

.withdraw-logo {
    background: #22c55e;
    color: #090b0f;
    border-radius: 50%;
    width: 15%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5vw;
}

.withdraw-label {
    font-size: 1.6vw;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Modal Window Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #30363d;
    background: #0d1117;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #22c55e;
}

.modal-close {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 24px;
}

.withdrawal-status-icon {
    font-size: 40px;
    color: #22c55e;
    text-align: center;
    margin-bottom: 16px;
}

.modal-desc {
    font-size: 13px;
    color: #8b949e;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-submit-btn {
    width: 100%;
    background: #22c55e;
    color: #0d1117;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s;
}

.modal-submit-btn:hover {
    background: #16a34a;
}

.withdraw-success-alert {
    margin-top: 20px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #4ade80;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.withdraw-success-alert i {
    font-size: 16px;
    margin-top: 2px;
}

.fa-spin-slow {
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustment for landing page items */
@media (max-width: 768px) {
    .landing-header {
        padding: 0 16px;
        min-height: 64px;
        height: 64px;
    }

    .landing-logo .logo-mark {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .landing-logo .logo-text {
        font-size: 15px;
    }

    .landing-logo {
        gap: 8px;
    }

    .landing-actions {
        gap: 8px;
    }

    .landing-btn-login,
    .landing-btn-signup,
    .landing-btn-deriv {
        padding: 6px 12px;
        font-size: 13px;
    }

    .landing-hero {
        padding: 20px;
    }

    .withdraw-label {
        font-size: 3vw;
    }
}

@media (max-width: 400px) {
    .landing-logo .logo-text {
        font-size: 13px;
    }

    .landing-btn-login,
    .landing-btn-signup,
    .landing-btn-deriv {
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* ===== SPEED BOT PANEL ===== */

/* Back row */
.sb-back-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: var(--card-bg, #161b22);
    flex-shrink: 0;
}
.sb-back-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cdd6f4;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sb-back-btn:hover { border-color: #22c55e; color: #22c55e; }
.sb-page-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sb-page-title i { color: #0ea5e9; }

/* Main two-column layout */
#view-bot-speed {
    display: none;
    flex-direction: column;
    height: calc(100vh - 118px);
    min-height: 580px;
    background: #0b1120;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    position: relative;
}
#view-bot-speed.active {
    display: flex;
}
.sb-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 0;
    position: relative;
}

/* ---- DERIV BOT HEADER & TOOLBAR ---- */
.sb-deriv-header {
    background: #090f1d;
    height: 50px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(56, 189, 248, 0.16);
    flex-shrink: 0;
    gap: 10px;
}
.sb-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.sb-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.sb-title-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sb-header-title h2 {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-sub-domain {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 500;
}
.sb-logo-badge {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
.sb-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sb-account-dropdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 11.5px;
    cursor: pointer;
    line-height: 1.2;
}
.sb-acc-type {
    color: #38bdf8;
    font-weight: 600;
    font-size: 10.5px;
}
.sb-acc-bal {
    color: #ffffff;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace, sans-serif;
}
.sb-activity-header-btn {
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.sb-activity-header-btn:hover,
.sb-activity-header-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}
.sb-deposit-btn {
    background: #ff444f;
    color: #ffffff;
    border: none;
    border-radius: 18px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sb-deposit-btn:hover { background: #e63946; }

/* Hide duplicate top horizontal toolbar strip — vertical rail is used */
.sb-toolbar-strip {
    display: none !important;
}
.sb-qs-btn {
    background: #ff444f;
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sb-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sb-tool-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.sb-tool-btn:hover { color: #ffffff; border-color: #0ea5e9; background: #0f172a; }

/* Deriv Block Builder UI — Authentic Speed Bot Deriv Experience + Luckflowtrade Dark Navy Identity */
.sb-left-rail {
    width: 58px;
    background: #0b1324;
    border-right: 1px solid rgba(56, 189, 248, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    gap: 8px;
    flex-shrink: 0;
    z-index: 10;
    overflow-y: auto;
    scrollbar-width: none;
}
.sb-left-rail::-webkit-scrollbar { display: none; }
.sb-rail-pill-btn {
    background: #ff444f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.15;
    padding: 7px 3px;
    width: 48px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    box-shadow: 0 4px 12px rgba(255, 68, 79, 0.35);
    transition: transform 0.15s, background 0.15s;
    flex-shrink: 0;
}
.sb-rail-pill-btn:hover { background: #e0303b; transform: translateY(-1px); }
.sb-rail-icons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    width: 100%;
}
.sb-rail-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.sb-rail-icon-btn:hover {
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.45);
}
.sb-rail-sep {
    width: 28px;
    height: 1px;
    background: rgba(148, 163, 184, 0.16);
    margin: 3px 0;
    flex-shrink: 0;
}

/* ---- WORKSPACE CANVAS (LEFT / MAIN) ---- */
#view-bot-speed .sb-params-col {
    flex: 1;
    width: auto;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #0d1526;
    background-image: radial-gradient(rgba(56, 189, 248, 0.14) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 0;
    border-right: none;
    transition: all 0.2s ease;
}
#view-bot-speed .sb-params-col.collapsed .sb-workspace-container {
    opacity: 0.35;
}
#view-bot-speed .sb-workspace-container {
    background: transparent; /* Dot-grid canvas shows through (#ffffff pill inputs inside blocks) */
    padding: 16px 20px 80px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sb-deriv-block {
    background: #0e4c68;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.28);
    margin-bottom: 4px;
}
.sb-block-header {
    background: #083250;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}
.sb-block-header i {
    color: #38bdf8;
}
.sb-block-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sb-block-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sb-block-label {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    min-width: 135px;
}
.sb-contract-highlight-box {
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 2px 4px;
    background: rgba(245, 158, 11, 0.14);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}
.sb-breadcrumb-selects {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
}
.sb-bread-arrow {
    color: #93c5fd;
    font-weight: 700;
}
.sb-pill-select {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
}
.sb-pill-select.mini { padding: 4px 8px; font-size: 11.5px; }
.sb-pill-select.full { width: 100%; }
.sb-pill-select.highlight {
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #38bdf8;
    font-weight: 700;
}
.sb-contract-highlight-box .sb-pill-select.highlight {
    border: none;
}
.sb-pill-input {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    width: 88px;
    box-sizing: border-box;
}
.sb-pill-input.mini { width: 68px; padding: 4px 8px; }
.sb-pill-input.full { width: 100%; }
.sb-block-check-row {
    margin-top: 2px;
}
.sb-check-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #e2e8f0;
    font-size: 11.5px;
    line-height: 1.35;
    cursor: pointer;
}
.sb-check-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #0ea5e9;
    flex-shrink: 0;
}
.sb-sub-block {
    background: #083250;
    border-radius: 7px;
    padding: 10px 12px;
    margin-top: 4px;
    border-left: 3px solid #38bdf8;
}
.sb-sub-header {
    color: #38bdf8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sb-sub-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sb-inline-field, .sb-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: #f1f5f9;
    font-weight: 500;
}
.sb-restart-note {
    font-size: 11.5px;
    color: #bae6fd;
    line-height: 1.45;
}

/* ---- RIGHT / DRAWER: TRADING ACTIVITY PANEL (Summary | Transactions | Journal) ---- */
.sb-journal-col {
    width: 410px;
    max-width: 44%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0b1120;
    border-left: 1px solid rgba(56, 189, 248, 0.2);
    padding-bottom: 0;
    transition: width 0.22s ease, opacity 0.18s ease;
}
.sb-journal-col.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    border-left: none !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    padding: 0 !important;
}

/* Performance Panel Sub-bar & Stats */
.sb-perf-subbar {
    background: #0f172a;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(56, 189, 248, 0.14);
    flex-shrink: 0;
}
.sb-perf-subbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.sb-perf-subbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sb-collapse-btn, .sb-reset-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.sb-collapse-btn:hover { background: #0ea5e9; color: #ffffff; border-color: #0ea5e9; }
.sb-reset-btn:hover { background: #ef4444; color: #ffffff; border-color: #ef4444; }
#sb-perf-chev.rotated {
    transform: rotate(180deg);
}
.sb-whats-this-wrap {
    padding: 10px 16px;
    text-align: right;
    background: #0b1120;
}
.sb-whats-this-link {
    color: #38bdf8;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* Hide redundant bottom nav inside Speed Bot view so Run/Stop bar sits cleanly at bottom */
.sb-bottom-nav {
    display: none !important;
}

/* Modal overlays */
.sb-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.sb-modal-content {
    background: #1e293b;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    overflow: hidden;
}
.sb-modal-header {
    background: #0f172a;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: #38bdf8; }
.sb-modal-close { background: transparent; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; }
.sb-modal-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; color: #e2e8f0; font-size: 13px; }
.sb-form-group { display: flex; flex-direction: column; gap: 6px; }
.sb-form-group label { font-size: 12px; color: #94a3b8; font-weight: 600; }
.sb-form-row { display: flex; gap: 12px; }
.sb-form-group.half { flex: 1; }
.sb-modal-footer { padding: 14px 18px; background: #0f172a; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.sb-btn-primary { background: #0ea5e9; color: #ffffff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.sb-btn-secondary { background: #334155; color: #e2e8f0; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 600; cursor: pointer; }

/* Tabs */
.sb-tabs {
    display: flex;
    background: #0f172a;
    border-bottom: 2px solid rgba(56, 189, 248, 0.14);
    flex-shrink: 0;
}
.sb-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 8px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.sb-tab:hover { color: #f8fafc; }
.sb-tab.active {
    color: #38bdf8;
    border-bottom-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.06);
}

/* Tab content */
.sb-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    flex-direction: column;
}
.sb-tab-content.active { display: flex; }

/* Summary tab */
.sb-summary-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13.5px;
    line-height: 1.6;
}
.sb-summary-empty strong { color: #38bdf8; }

/* Stats grid */
.sb-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: rgba(56, 189, 248, 0.12);
    border-top: 1px solid rgba(56, 189, 248, 0.12);
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
    flex-shrink: 0;
}
.sb-stat-item {
    background: #0f172a;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sb-stat-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}
.sb-stat-value {
    font-size: 13.5px;
    color: #f8fafc;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace, sans-serif;
}

/* Transactions tab */
.sb-tx-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}
.sb-tx-empty {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 32px 20px;
}
.sb-tx-empty strong { color: #38bdf8; }
.sb-tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12.5px;
    gap: 8px;
    transition: background 0.15s;
}
.sb-tx-row:hover { background: rgba(56, 189, 248, 0.05); }
.sb-tx-time { color: #64748b; font-size: 11px; min-width: 68px; }
.sb-tx-type { color: #e2e8f0; font-weight: 600; flex: 1; }
.sb-tx-stake { color: #94a3b8; min-width: 58px; text-align: right; }
.sb-tx-result { font-weight: 700; min-width: 74px; text-align: right; }
.sb-tx-result.win { color: #22c55e; }
.sb-tx-result.loss { color: #ef4444; }

/* Journal tab */
.sb-journal-toolbar {
    padding: 6px 12px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: flex-end;
}
.sb-clear-journal-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 5px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.sb-clear-journal-btn:hover { background: #ef4444; color: #ffffff; }
.sb-journal-log {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.55;
}

/* ---- RUN BAR ---- */
.sb-run-bar {
    position: relative;
    height: 58px;
    background: #090f1d;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 30;
    flex-shrink: 0;
}
.sb-collapse-handle {
    height: 22px;
    padding: 0 14px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
    z-index: 35;
}
.sb-collapse-handle:hover {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}
.sb-run-btn {
    background: #00a79e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0 22px;
    height: 40px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.sb-run-btn:hover { background: #008c84; box-shadow: 0 0 16px rgba(0, 167, 158, 0.4); }
.sb-run-btn:disabled {
    background: #1e293b;
    color: #475569;
    cursor: not-allowed;
    box-shadow: none;
}
.sb-drawer-pill-btn {
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    border-radius: 6px;
    height: 38px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sb-drawer-pill-btn:hover,
.sb-drawer-pill-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}
.sb-stop-btn {
    background: #374151;
    color: #9ca3af;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sb-stop-btn:not(:disabled):hover { background: #ef4444; color: #fff; }
.sb-stop-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sb-run-status-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
    cursor: pointer;
}
.sb-run-status-text {
    font-size: 12.5px;
    color: #cbd5e1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-run-progress {
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
    overflow: hidden;
}
.sb-run-progress-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0ea5e9, #10b981);
    border-radius: 2px;
    transition: width 0.5s ease;
}
.sb-run-progress-inner.animated {
    animation: sb-progress-pulse 2s ease-in-out infinite;
}
@keyframes sb-progress-pulse {
    0%   { width: 15%; }
    50%  { width: 85%; }
    100% { width: 15%; }
}

/* ---- RESPONSIVE: MOBILE (320px – 767px) ---- */
@media (max-width: 767px) {
    #view-bot-speed {
        height: calc(100vh - 96px);
        min-height: 480px;
        border-radius: 8px;
        margin: 0;
    }
    .sb-deriv-header {
        height: 46px;
        padding: 0 10px;
        gap: 6px;
    }
    .sb-header-left {
        gap: 6px;
    }
    .sb-back-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    .sb-logo-badge {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    .sb-header-title h2 {
        font-size: 12.5px;
    }
    .sb-sub-domain,
    .sb-deposit-btn,
    .sb-activity-header-btn .sb-act-label {
        display: none !important;
    }
    .sb-activity-header-btn {
        padding: 5px 8px;
    }
    .sb-header-right {
        gap: 6px;
    }
    .sb-acc-type {
        font-size: 9.5px;
    }
    .sb-acc-bal {
        font-size: 11px;
    }
    /* Keep left vertical rail + right workspace side-by-side on mobile */
    .sb-layout {
        flex-direction: row !important;
        overflow: hidden;
    }
    .sb-left-rail {
        width: 46px;
        padding: 8px 3px;
        gap: 6px;
    }
    .sb-rail-pill-btn {
        width: 40px;
        font-size: 8.5px;
        padding: 6px 2px;
    }
    .sb-rail-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    #view-bot-speed .sb-params-col {
        flex: 1;
        width: calc(100% - 46px);
        min-width: 0;
        border-right: none;
        border-bottom: none;
        overflow-y: auto;
        overflow-x: hidden;
    }
    #view-bot-speed .sb-workspace-container {
        padding: 10px 10px 90px;
        gap: 10px;
    }
    .sb-block-header {
        font-size: 12.5px;
        padding: 8px 10px;
    }
    .sb-block-body {
        padding: 10px;
        gap: 8px;
    }
    .sb-block-row {
        gap: 6px;
    }
    .sb-block-label {
        min-width: 100%;
        font-size: 11.5px;
        margin-bottom: 1px;
    }
    .sb-pill-select {
        font-size: 11.5px;
        padding: 4px 9px;
    }
    .sb-sub-block {
        padding: 8px 9px;
    }
    .sb-inline-field, .sb-inline-row {
        gap: 6px;
        font-size: 11px;
    }
    /* Mobile Slide-Up Activity Drawer (Summary / Transactions / Journal) */
    .sb-journal-col {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 56px;
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh;
        max-height: 380px;
        min-height: 240px;
        z-index: 95;
        background: #0b1120;
        border-left: none;
        border-top: 2px solid #0ea5e9;
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.85);
        padding-bottom: 0;
    }
    .sb-journal-col.collapsed {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
    }
    .sb-run-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 56px;
        padding: 0 10px;
        gap: 8px;
        z-index: 100;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.55);
    }
    .sb-run-btn {
        padding: 0 16px;
        height: 38px;
        font-size: 13.5px;
    }
    .sb-drawer-pill-btn {
        padding: 0 9px;
        height: 36px;
        font-size: 11px;
    }
    .sb-stop-btn {
        width: 38px;
        height: 38px;
    }
    .sb-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 360px) {
    .sb-left-rail {
        width: 40px;
    }
    .sb-rail-pill-btn {
        width: 34px;
        font-size: 7.5px;
    }
    .sb-rail-icon-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .sb-drawer-pill-btn span {
        display: none;
    }
}

/* ===== ANALYSIS TOOL DASHBOARD ===== */

/* Main 2-column grid: left 2fr, right 1fr */
.an-main-grid {
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Left column stacks two panels */
.an-left-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right column (signal + stats) stacks vertically */
.an-side-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Bottom row grid */
.an-bottom-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Shared panel padding (replaces style="padding: 20px") */
.an-panel-pad {
    padding: 20px;
}

/* Shared panel heading */
.an-panel-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── AI Insights box ── */
.an-ai-box-panel {
    padding: 20px;
    background: linear-gradient(135deg, #111827, #1f2937);
    border-color: rgba(255, 255, 255, 0.05);
}

.an-ai-title {
    font-size: 14px;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.an-ai-body {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    color: #e6edf3;
}

/* ── Digit summary (most / least) ── */
.an-digit-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.an-digit-card {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.an-digit-card-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.an-digit-card-value {
    font-size: 20px;
    font-weight: 800;
}

/* ── Bar-chart container ── */
.an-chart-bar-wrap {
    height: 150px;
    background: var(--bg-body);
    border-radius: 8px;
    padding: 12px;
}

/* Full-size canvas (fills its parent) */
.an-full-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Signal confidence list ── */
.an-signal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.an-signal-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.an-signal-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
}

/* Progress-bar track */
.an-bar-track {
    height: 6px;
    background: #21262d;
    border-radius: 3px;
    overflow: hidden;
}

/* Progress-bar fill (width is set dynamically by JS) */
.an-bar-fill {
    width: 50%;
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease, background 0.3s ease;
}

.an-bar-green {
    background: #22c55e;
}

.an-bar-cyan {
    background: #06b6d4;
}

.an-bar-purple {
    background: #7c3aed;
}

.an-bar-pink {
    background: #ec4899;
}

/* ── Trading statistics mini-grid ── */
.an-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.an-stat-cell {
    background: var(--bg-body);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.an-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.an-stat-value {
    font-size: 15px;
    font-weight: 800;
    margin-top: 2px;
}

/* ── Pattern detection rows ── */
.an-pattern-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 12px;
}

.an-pattern-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
}

.an-pattern-label {
    font-weight: 600;
}

.an-pattern-value {
    font-weight: 700;
}

.an-standby {
    color: #0cad56;
}

/* ── Market Bias Ratio pie charts ── */
.an-ratio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: center;
    height: 120px;
}

.an-ratio-cell {
    background: var(--bg-body);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.an-ratio-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.an-pie-wrap {
    height: 60px;
    position: relative;
}

.an-pie-canvas {
    width: 100%;
    height: 100%;
}

.an-ratio-text {
    font-size: 11px;
    font-weight: 700;
}

/* ── Live tick chart ── */
.an-tick-chart-wrap {
    background: var(--bg-body);
    border-radius: 8px;
    padding: 10px;
    height: 200px;
}

/* ── Colour utility classes ── */
.an-text-green {
    color: #22c55e;
}

.an-text-red {
    color: #e53e3e;
}

.an-text-cyan {
    color: #06b6d4;
}

/* Responsive: stack analysis grids on mobile */
@media (max-width: 900px) {
    .an-main-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Analysis Tool: Market Summary row ── */
.an-summary-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* ===== RISE/FALL BOT — TAB TABLE STYLES ===== */

/* Inactive tab button (the active one still uses its inline style set by JS) */
.rfbot-tab-btn {
    background: none;
    border: none;
    color: #a1aab5;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    padding: 0 4px;
    height: 100%;
    transition: color 0.2s, border-color 0.2s;
}

.rfbot-tab-btn:hover {
    color: #ffffff;
}

/* History tab content wrapper */
.rfbot-tab-content-wrap {
    padding: 12px;
    overflow-y: auto;
    max-height: 220px;
    background: #0d1117;
}

/* History table */
.rfbot-history-table {
    font-size: 12px;
    width: 100%;
}

/* Table header cells */
.rfbot-th {
    padding: 6px;
    font-size: 10px;
    background: #161b22;
    color: #8b949e;
    text-align: left;
    white-space: nowrap;
}

/* Table body */
.rfbot-tbody {
    background: #0d1117;
    color: #c9d1d9;
}

/* Empty state row */
.rfbot-empty-row {
    text-align: center;
    color: #8b949e;
    padding: 20px;
    font-style: italic;
}

/* Journal tab wrapper */
.rfbot-journal-wrap {
    display: none;
    /* JS shows/hides this */
    padding: 12px;
    overflow-y: auto;
    max-height: 220px;
    min-height: 220px;
    background: #0d1117;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #c9d1d9;
}

/* Journal init message */
.rfbot-journal-init {
    color: #484f58;
}

/* Risk Management Visual Charts */
.rc-chart-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.rc-chart-box {
    padding: 16px;
}

.rc-chart-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.rc-chart-container {
    background: var(--bg-body);
    border-radius: 8px;
    padding: 10px;
    height: 180px;
    position: relative;
}

.rc-chart-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Safety Metrics Card */
.rc-safety-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rc-safety-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.rc-safety-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
}

.rc-safety-box {
    background: var(--bg-body);
    padding: 12px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rc-safety-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.rc-safety-value {
    font-size: 24px;
    font-weight: 900;
    margin-top: 4px;
}

.rc-safety-value.green {
    color: #22c55e;
}

.rc-safety-value.red {
    color: #e53e3e;
    font-size: 20px;
    font-weight: 800;
}

.rc-safety-value.blue {
    color: #06b6d4;
    font-size: 20px;
    font-weight: 800;
}

.rc-safety-value.primary {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 800;
}

/* General Recovery Calculator */
.rc-recovery-card {
    background: var(--bg-body);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.rc-recovery-title {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
}

.rc-recovery-flex {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rc-recovery-col {
    flex: 1;
}

.rc-recovery-col-center {
    flex: 1;
    text-align: center;
}

.rc-recovery-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
}

.rc-recovery-input {
    padding: 6px;
    width: 100%;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
}

.rc-recovery-gain {
    font-size: 15px;
    font-weight: 800;
    color: #e53e3e;
    margin-top: 6px;
}

/* Risk Meter Gauge */
.rc-meter-container {
    text-align: center;
    margin-bottom: 20px;
}

.rc-meter-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.rc-meter-class-text {
    font-size: 24px;
    font-weight: 800;
    margin: 4px 0;
}

.rc-meter-bar-bg {
    height: 12px;
    width: 100%;
    background: #21262d;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin-top: 8px;
}

.rc-meter-fill {
    width: 20%;
    height: 100%;
    background: #22c55e;
    transition: all 0.3s ease;
}

.rc-meter-legend {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Compound Growth Calculator Output */
.rc-cg-output-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rc-cg-output-box {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.rc-cg-output-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.rc-cg-output-value {
    font-size: 16px;
    font-weight: 800;
}

.rc-cg-output-value.green {
    color: #22c55e;
}

.rc-cg-output-value.blue {
    color: #06b6d4;
}

/* Drawdown Calculator Output */
.rc-dd-output-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rc-dd-output-box {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.rc-dd-output-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.rc-dd-output-value {
    font-size: 16px;
    font-weight: 800;
}

.rc-dd-output-value.red {
    color: #e53e3e;
}

.rc-dd-output-value.green {
    color: #22c55e;
}

/* Daily Loss Limit Calculator Output */
.rc-dl-output-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rc-dl-output-box {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.rc-dl-output-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.rc-dl-output-value {
    font-size: 16px;
    font-weight: 800;
}

.rc-dl-output-value.red {
    color: #e53e3e;
}

.rc-dl-output-value.green {
    color: #22c55e;
}

/* Position Size Calculator Output */
.rc-ps-output-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rc-ps-output-box {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.rc-ps-output-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.rc-ps-output-value {
    font-size: 16px;
    font-weight: 800;
}

.rc-ps-output-value.red {
    color: #e53e3e;
}

.rc-ps-output-value.green {
    color: #22c55e;
}

/* Common Layout Helpers */
.rc-grid-3col {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rc-card-padded {
    padding: 20px;
}

.dash-card-value.sm-text {
    font-size: 16px;
}

/* Indicators & Signals Card */
.rc-ind-card {
    padding: 16px;
}

.rc-ind-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.rc-ind-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    text-align: center;
}

.rc-ind-box {
    background: var(--bg-body);
    padding: 8px;
    border-radius: 6px;
}

.rc-ind-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.rc-ind-val {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.rc-ind-val.lg {
    font-size: 14px;
    font-weight: 800;
}

.rc-ind-val.green {
    color: #22c55e;
}

.rc-ind-subtext {
    font-size: 10px;
    font-weight: 600;
    color: #8b949e;
}

.rc-ind-subtext.normal {
    font-weight: 400;
}

/* Trend Strength Bar */
.rc-trend-container {
    margin-top: 14px;
}

.rc-trend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.rc-trend-bar-bg {
    height: 8px;
    width: 100%;
    background: #21262d;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.rc-trend-bar-bear {
    width: 50%;
    height: 100%;
    background: #e53e3e;
    transition: width 0.3s ease;
}

.rc-trend-bar-bull {
    width: 50%;
    height: 100%;
    background: #22c55e;
    transition: width 0.3s ease;
}

/* Button & Layout Helpers */
.btn-grid-2col {
    grid-template-columns: 1fr 1fr;
}

.btn-grid-1col {
    grid-template-columns: 1fr;
}

.bot-start-btn.bg-green {
    background: #22c55e;
}

.bot-stop-btn.bg-red {
    background: #e53e3e;
}

.bot-start-btn.bg-blue {
    background: var(--accent-blue);
}

.col-flex-20 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Utility: JS-controlled visibility */
.is-hidden {
    display: none !important;
}

.bot-btn-row.show-grid {
    display: grid;
}

/* History Table & Journal Tabs */
.tab-content-history {
    padding: 12px;
    overflow-y: auto;
    max-height: 220px;
    background: #0d1117;
}

.tab-content-history.is-hidden {
    display: none;
}

.mini-table.full {
    font-size: 12px;
    width: 100%;
}

.mini-table th.mini-th {
    padding: 6px;
    font-size: 10px;
    background: #161b22;
    color: #8b949e;
}

.mini-table tbody.mini-tbody {
    background: #0d1117;
    color: #c9d1d9;
}

.mini-table .empty-row {
    text-align: center;
    color: #8b949e;
    padding: 20px;
    font-style: italic;
}

.tab-content-journal {
    padding: 12px;
    overflow-y: auto;
    max-height: 220px;
    min-height: 220px;
    background: #0d1117;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #c9d1d9;
}

.tab-content-journal.is-hidden {
    display: none;
}

.journal-init-msg {
    color: #484f58;
}

/* Bot Stats Grid (4-col) */
.bot-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.bot-stat-box {
    background: var(--bg-body);
    padding: 8px;
    border-radius: 6px;
}

.bot-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.bot-stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.bot-stat-value .win {
    color: #0cad56;
}

.bot-stat-value .loss {
    color: #e53e3e;
}

/* Tab Log Area */
.bot-logs-area.flex-fill {
    flex: 1;
}

.bot-logs-header.tab-bar {
    background: #1a1d23;
    color: #a1aab5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 44px;
}

.tab-btn-group {
    display: flex;
    gap: 16px;
    height: 100%;
}

.tab-btn {
    background: none;
    border: none;
    color: #a1aab5;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    padding: 0 4px;
    height: 100%;
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: var(--accent-blue);
}

/* Execute/Start Button Full-Width */
.bot-execute-btn {
    grid-column: 1 / -1;
    background: var(--accent-blue);
    padding: 14px 20px;
    font-size: 15px;
    margin-top: 10px;
}

/* Live Stats Card */
.live-stats-card {
    padding: 16px;
}

.live-stats-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Strategy Description Box */
.strategy-info-box {
    background: rgba(26, 86, 219, 0.05);
    border: 1px solid rgba(26, 86, 219, 0.15);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Builder Help & Preview Panel */
.builder-help-panel {
    background: var(--bg-card);
    padding: 24px;
    color: var(--text-primary);
}

.builder-help-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.builder-help-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.strategy-info.checklist-box {
    box-shadow: none;
    border-color: var(--border);
    background: var(--bg-body);
    padding: 16px;
    border-radius: 8px;
}

.checklist-box-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.checklist-box-list {
    padding-left: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.bot-success-alert {
    margin-top: 20px;
}

.bot-success-alert.is-hidden {
    display: none;
}

/* ============================================================
   NEW LANDING PAGE HERO - TWO COLUMN LAYOUT
   ============================================================ */
.landing-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 64px 60px;
    min-height: calc(100vh - 72px);
    background: linear-gradient(135deg, #050d1a 0%, #071530 45%, #0b1e3d 80%, #091225 100%);
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,136,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,200,200,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-text-col {
    flex: 0 0 50%;
    max-width: 580px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,136,255,0.15);
    border: 1px solid rgba(0,180,255,0.3);
    color: #00c8ff;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    color: #f0f6ff;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.hero-title-accent {
    color: #00f3ff !important;
    -webkit-text-fill-color: #00f3ff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    font-weight: 800 !important;
    text-shadow: 0 0 24px rgba(0, 243, 255, 0.75), 0 2px 6px rgba(0, 0, 0, 0.95) !important;
    display: inline-block;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(180,210,255,0.8);
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 500px;
}

.hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 32px;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(200,225,255,0.85);
    font-weight: 500;
}

.hero-feature-item i { color: #00e676; font-size: 14px; }

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #0066ff, #0099ff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 25px rgba(0,100,255,0.45);
    transition: all 0.25s ease;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(0,120,255,0.6);
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    background: transparent;
    color: rgba(180,220,255,0.9);
    border: 1px solid rgba(0,180,255,0.4);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-btn-secondary:hover {
    background: rgba(0,150,255,0.1);
    border-color: rgba(0,200,255,0.6);
    color: #fff;
}

.hero-btn-deriv {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    background: rgba(255, 68, 79, 0.12);
    color: #ff444f;
    border: 1px solid rgba(255, 68, 79, 0.45);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.hero-btn-deriv:hover {
    background: #ff444f;
    border-color: #ff444f;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 68, 79, 0.35);
    transform: translateY(-2px);
}

.hero-trust-text {
    font-size: 12px;
    color: rgba(140,180,255,0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.hero-visual-col {
    flex: 0 0 45%;
    position: relative;
    z-index: 2;
}

.hero-visual-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 22px 24px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,180,255,0.1) inset;
}

.hero-chart-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.hero-chart-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.hero-chart-dot.green { background: #22c55e; }
.hero-chart-dot.yellow { background: #f59e0b; }
.hero-chart-dot.red { background: #ef4444; }

.hero-chart-label {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: rgba(180,210,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-chart-body {
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.2);
}

.hero-chart-svg { width: 100%; height: 100%; }

.hero-stats-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 14px;
}

.hero-stat { flex: 1; text-align: center; }

.hero-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #e0f0ff;
    line-height: 1;
}

.hero-stat-value.positive { color: #22c55e; }
.hero-stat-value.blue-text { color: #38bdf8; }

.hero-stat-label {
    font-size: 10.5px;
    color: rgba(160,200,255,0.6);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-bot-list { display: flex; flex-direction: column; gap: 8px; }

.hero-bot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.hero-bot-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.hero-bot-dot.running {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.hero-bot-name { flex: 1; color: rgba(200,220,255,0.85); font-weight: 500; }
.hero-bot-pnl.positive { color: #22c55e; font-weight: 700; }

.hero-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10,25,60,0.88);
    border: 1px solid rgba(0,180,255,0.25);
    border-radius: 12px;
    padding: 10px 16px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    font-size: 13px;
    color: #e0f0ff;
}

.hero-float-card i { font-size: 20px; color: #00c3ff; }

.hero-float-1 { top: -30px; right: -20px; animation: float-card 4s ease-in-out infinite; }
.hero-float-2 { bottom: -24px; left: -20px; animation: float-card 4s ease-in-out infinite 1.5s; }

@keyframes float-card {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.float-card-val { font-weight: 800; font-size: 15px; color: #00e5ff; }
.float-card-lbl { font-size: 10px; color: rgba(160,200,255,0.7); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============================================================
   NEW DASHBOARD HOME SECTION STYLES
   ============================================================ */
.dashboard-welcome { padding: 28px 0 12px 0; }

.dashboard-welcome h1 {
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.dashboard-welcome p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.dash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }

.dash-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dash-card-icon.blue   { background: rgba(0,136,255,0.15);   color: #38bdf8; }
.dash-card-icon.green  { background: rgba(34,197,94,0.15);   color: #22c55e; }
.dash-card-icon.purple { background: rgba(139,92,246,0.15);  color: #a78bfa; }
.dash-card-icon.orange { background: rgba(249,115,22,0.15);  color: #fb923c; }

.dash-card-info { display: flex; flex-direction: column; gap: 3px; }

.dash-card-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-card-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.dash-card-value.positive { color: #22c55e; }

.dash-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 0 16px 0;
}

.dash-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.dash-section.full-width { grid-column: 1 / -1; }

.dash-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-section h3 i { color: var(--accent-blue); }

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 9px;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qa-btn.green  { background: rgba(34,197,94,0.18);  border: 1px solid rgba(34,197,94,0.35);  color: #4ade80; }
.qa-btn.blue   { background: rgba(56,189,248,0.18); border: 1px solid rgba(56,189,248,0.35); color: #38bdf8; }
.qa-btn.purple { background: rgba(167,139,250,0.18);border: 1px solid rgba(167,139,250,0.35);color: #a78bfa; }
.qa-btn.orange { background: rgba(251,146,60,0.18); border: 1px solid rgba(251,146,60,0.35); color: #fb923c; }
.qa-btn.teal   { background: rgba(45,212,191,0.18); border: 1px solid rgba(45,212,191,0.35); color: #2dd4bf; }
.qa-btn.pink   { background: rgba(244,114,182,0.18);border: 1px solid rgba(244,114,182,0.35);color: #f472b6; }
.qa-btn:hover  { transform: translateY(-1px); filter: brightness(1.15); }

.mini-table-wrap { overflow-x: auto; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.mini-table th {
    text-align: left;
    padding: 6px 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.mini-table td {
    padding: 8px 10px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mini-table .empty-msg {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
}

#dash-mini-chart {
    width: 100%;
    height: 180px;
    display: block;
    border-radius: 8px;
    background: rgba(0,0,0,0.15);
}

@media (max-width: 900px) {
    .landing-hero          { flex-direction: column; padding: 40px 24px; gap: 40px; }
    .hero-text-col,
    .hero-visual-col       { flex: unset; max-width: 100%; width: 100%; }
    .hero-cta-row          { flex-direction: column; align-items: stretch; gap: 12px; }
    .dash-stats-row        { grid-template-columns: 1fr 1fr; }
    .dash-grid-2col        { grid-template-columns: 1fr; }
    .hero-float-1,
    .hero-float-2          { display: none; }
}

/* ===== AUTH MODAL OVERLAY ===== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 25, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: authFadeIn 0.25s ease;
}

.auth-modal-overlay.active {
    display: flex;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.auth-modal {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 60%, #162032 100%);
    border: 1px solid rgba(99, 179, 237, 0.18);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 25px 60px rgba(0,0,0,0.6),
        0 0 80px rgba(26, 86, 219, 0.15);
    position: relative;
    animation: authSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Header */
.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-modal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.01em;
}

.auth-logo-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

.auth-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: #e2e8f0;
    transform: rotate(90deg);
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.auth-tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-tab.active {
    background: #1a56db;
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.4);
}

.auth-tab:not(.active):hover { color: #cbd5e1; }

/* Alert banners */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap > i {
    position: absolute;
    left: 14px;
    color: #475569;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrap input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 42px 12px 40px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}

.auth-input-wrap input::placeholder { color: #475569; }

.auth-input-wrap input:focus {
    border-color: #1a56db;
    background: rgba(26, 86, 219, 0.08);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.auth-pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
}

.auth-pw-toggle:hover { color: #94a3b8; }

.auth-forgot-row { text-align: right; margin-top: -8px; }

.auth-forgot-link {
    font-size: 12.5px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot-link:hover { text-decoration: underline; }

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1a56db 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 86, 219, 0.5);
    background: linear-gradient(135deg, #1e62e8 0%, #3b7cf8 100%);
}

.auth-submit-btn:active { transform: translateY(0); }

.auth-btn-spinner { display: none; align-items: center; gap: 8px; }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* Google & Deriv Buttons */
.auth-oauth-group { display: flex; gap: 10px; width: 100%; }

.auth-google-btn, .auth-deriv-btn {
    flex: 1;
    padding: 11px;
    background: #fff;
    border: none;
    border-radius: 10px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-google-btn:hover, .auth-deriv-btn:hover {
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.auth-deriv-btn {
    background: #fff;
    color: #1e293b;
}

.auth-deriv-icon {
    color: #ff444f;
    font-size: 18px;
}

/* Large OAuth Buttons for Signup */
.auth-google-btn-large, .auth-deriv-btn-large {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    justify-content: flex-start;
    gap: 16px;
}

.auth-google-btn-large:hover, .auth-deriv-btn-large:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.auth-deriv-btn-large {
    border-color: rgba(255, 68, 79, 0.2);
}

.auth-deriv-btn-large:hover {
    background: rgba(255, 68, 79, 0.08);
    border-color: rgba(255, 68, 79, 0.3);
    box-shadow: 0 6px 16px rgba(255, 68, 79, 0.2);
}

.auth-btn-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-btn-icon-deriv {
    background: rgba(255, 68, 79, 0.1);
}

.auth-btn-icon-google {
    background: rgba(255, 255, 255, 0.1);
}

.auth-deriv-icon {
    color: #ff444f;
    font-size: 20px;
}

#auth-panel-signup {
    display: none;
}

#app-wrapper {
    display: none;
}

.auth-signup-info {
    text-align: center;
    margin-bottom: 24px;
}

.auth-signup-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

.auth-signup-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-btn-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.auth-btn-title {
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
}

.auth-btn-desc {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}

.auth-modal-footer-note {
    text-align: center;
    font-size: 11.5px;
    color: #475569;
    margin-top: 18px;
}

.auth-modal-footer-note a { color: #3b82f6; text-decoration: none; }
.auth-modal-footer-note a:hover { text-decoration: underline; }

.auth-deriv-affiliate-box {
    margin-top: 16px;
    padding: 11px 14px;
    background: rgba(255, 68, 79, 0.08);
    border: 1px solid rgba(255, 68, 79, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.auth-deriv-affiliate-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff444f;
    font-weight: 700;
    text-decoration: none;
    font-size: 12.5px;
    transition: color 0.2s ease;
}

.auth-deriv-affiliate-link:hover {
    color: #ff7582;
    text-decoration: underline;
}

/* ===== DOLLAR NOTE (REALISTIC $100 BILL) ===== */
.dollar-note-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px !important;
    min-height: 350px;
    gap: 24px;
}

.dollar-note {
    perspective: 1200px;
    animation: noteFloat 4s ease-in-out infinite;
}

@keyframes noteFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(-3deg); }
    50%       { transform: translateY(-12px) rotateX(2deg) rotateY(3deg); }
}

.note-outer {
    width: 340px;
    height: 148px;
    background: linear-gradient(135deg, #1a4a20 0%, #2d7a35 25%, #1f5c28 50%, #2d7a35 75%, #1a4a20 100%);
    border-radius: 7px;
    padding: 6px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.15),
        0 0 40px rgba(34, 197, 94, 0.12);
    position: relative;
    overflow: hidden;
}

/* Microprint texture overlay */
.note-outer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.04) 2px,
        rgba(0,0,0,0.04) 3px
    ),
    repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(255,255,255,0.02) 4px,
        rgba(255,255,255,0.02) 5px
    );
    border-radius: 3px;
    pointer-events: none;
}

/* Watermark */
.note-watermark {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 72px;
    font-weight: 900;
    color: rgba(255,255,255,0.04);
    font-family: serif;
    letter-spacing: -2px;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Security strip */
.note-security-strip {
    position: absolute;
    left: 30%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
        #3b82f6 0%, #8b5cf6 20%, #3b82f6 40%,
        #8b5cf6 60%, #3b82f6 80%, #8b5cf6 100%);
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.note-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d5c25 0%, #276b30 30%, #1d5c25 60%, #224f27 100%);
    border-radius: 3px;
    display: flex;
    align-items: stretch;
    position: relative;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Left strip */
.note-left-strip {
    width: 38px;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.1) 100%);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
}

.note-serial {
    font-size: 5.5px;
    color: rgba(255,255,255,0.55);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.note-value-side {
    font-size: 22px;
    font-weight: 900;
    color: rgba(255,255,255,0.85);
    font-family: serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    line-height: 1;
}

/* Center */
.note-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
}

.note-header-row {
    width: 100%;
    text-align: center;
}

.note-reserve {
    font-size: 7px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.note-portrait {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-portrait-inner {
    width: 68px;
    height: 68px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 2;
}

.note-portrait-icon {
    font-size: 34px;
    color: rgba(255,255,255,0.75);
}

.note-oval-ring {
    position: absolute;
    width: 84px;
    height: 84px;
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.note-footer-row {
    width: 100%;
    text-align: center;
}

.note-denomination {
    font-size: 7px;
    font-weight: 700;
    color: rgba(255,255,255,0.65);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Right strip */
.note-right-strip {
    width: 38px;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.1) 100%);
    border-left: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
}

.note-value-right {
    font-size: 22px;
    font-weight: 900;
    color: rgba(255,255,255,0.85);
    font-family: serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    line-height: 1;
}

.note-serial-right {
    font-size: 5.5px;
    color: rgba(255,255,255,0.55);
    writing-mode: vertical-rl;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.note-tagline {
    font-size: 14px;
    font-weight: 600;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.note-tagline i { font-size: 18px; }

/* ===== LOGGED-IN USER BADGE IN HEADER ===== */
.header-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 86, 219, 0.1);
    border: 1px solid rgba(26, 86, 219, 0.2);
    border-radius: 20px;
    padding: 4px 12px 4px 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-user-badge:hover {
    background: rgba(26, 86, 219, 0.18);
}

.header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 700;
}

.header-user-email {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    color: #ef4444;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.header-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}
/* BULK TRADER CSS */

/* =========================================================
   BULK TRADER STYLES
   ========================================================= */

.bulk-trader-container {
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.bulk-trader-mobile-tabs {
    display: none;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.bt-tab {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    background: #1e293b;
}
.bt-tab.active {
    color: #fff;
    background: #2563eb;
    border-bottom: 2px solid #60a5fa;
}

/* ---- Main 3-column grid ---- */
.bt-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 20px;
    align-items: start;
}

.bt-settings-panel, .bt-action-panel {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-light, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 18px;
}

.bt-visual-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bt-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.bt-row .bt-form-group { flex: 1; }

.bt-form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.bt-form-group select, .bt-form-group input {
    width: 100%;
    padding: 9px 10px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, #e0e4ea);
    border-radius: 6px;
    color: var(--text-primary, #1a1d23);
    font-size: 13px;
    font-weight: 600;
}

/* ---- Live Price ---- */
.bt-current-tick {
    text-align: center;
    margin-bottom: 18px;
    width: 100%;
}
.bt-current-tick > span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.bt-current-tick h1 {
    font-size: 44px;
    font-weight: 800;
    color: #3b82f6;
    margin: 4px 0 0 0;
    transition: color .15s;
}
.bt-price-flash {
    animation: btPriceFlash .25s ease-out;
}
@keyframes btPriceFlash {
    0%   { color: #ffffff; transform: scale(1.05); }
    100% { color: #3b82f6; transform: scale(1); }
}

/* ---- Circles grid ---- */
.bt-circles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

/* Each circle wrapper */
.bt-circle-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    transition: transform .15s;
}
.bt-circle-wrap:hover { transform: scale(1.06); }

/* Glow on the highest digit */
.bt-circle-highlight svg {
    filter: drop-shadow(0 0 8px rgba(59,130,246,.7));
}
.bt-circle-highlight .bt-digit-num {
    color: #fff !important;
}
.bt-circle-highlight .bt-digit-pct {
    color: #94a3b8 !important;
}

/* Down-arrow above highest circle */
.bt-circle-arrow {
    font-size: 14px;
    color: #ef4444;
    margin-bottom: 2px;
    line-height: 1;
    animation: arrowBounce .7s ease-in-out infinite alternate;
}
@keyframes arrowBounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-4px); }
}

/* SVG rings */
.bt-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 7;
}
.bt-ring-fg {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    transition: stroke-dashoffset .45s cubic-bezier(.4,0,.2,1);
}

/* Center label */
.bt-circle-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -42%);
    text-align: center;
    pointer-events: none;
    width: 100%;
}
.bt-digit-num {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.bt-digit-pct {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1px;
    white-space: nowrap;
}

/* ---- Recent tick boxes ---- */
.bt-recent-ticks {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}
.bt-recent-tick-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    transition: transform .1s;
}
.bt-recent-tick-box.even { background: #14b8a6; }
.bt-recent-tick-box.odd  { background: #ef4444; }
.bt-recent-tick-box.blue { background: #14b8a6; }
.bt-recent-tick-box.red  { background: #ef4444; }

/* ---- Run/Stop Button ---- */
.bt-run-row {
    margin-bottom: 12px;
}
.bt-run-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.bt-run-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}
.bt-run-btn:active {
    transform: translateY(0);
}
.bt-run-btn.bt-running {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.bt-run-btn.bt-running:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ---- Action panel ---- */
.bt-buy-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.bt-buy-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    text-align: center;
}
.bt-buy-btn:hover { opacity: .9; transform: translateY(-1px); }
.bt-buy-btn:active { transform: translateY(0); }
.bt-buy-btn.over   { background: #14b8a6; border-bottom: 4px solid #0d9488; }
.bt-buy-btn.under  { background: #ef4444; border-bottom: 4px solid #b91c1c; }
.bt-buy-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.bt-buy-pct   { font-size: 14px; font-weight: 600; opacity: .9; }

.bt-status {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin-bottom: 8px;
    min-height: 20px;
}
.bt-status-detailed {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    background: var(--bg-darker, #0f172a);
    padding: 10px;
    border-radius: 8px;
}

/* ---- Responsive mobile ---- */
@media (max-width: 1024px) {
    .bt-main-grid {
        grid-template-columns: 1fr;
    }
    .bulk-trader-mobile-tabs { display: flex; }
    .bt-settings-panel, .bt-action-panel {
        background: transparent;
        border: none;
        padding: 0;
    }
    .bt-circles-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    .bt-circle-wrap svg { width: 62px; height: 62px; }
    .bt-digit-num { font-size: 14px; }
    .bt-digit-pct { font-size: 8px; }
}

/* ===== AUTH SIGNUP PANEL – extracted from inline styles ===== */

/* Hidden panels (JS toggles these; initial state via CSS) */
#auth-panel-signup    { display: none; }
#app-wrapper          { display: none; }
#header-not-connected { display: none; }
#header-user-badge    { display: none; }
#header-logout-btn    { display: none; }
#deposit-btn          { display: none; }

/* Signup info block */
.auth-signup-info {
    text-align: center;
    margin-bottom: 24px;
}

.auth-signup-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

/* Signup button stack */
.auth-signup-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Icon wrapper colour variants */
.auth-btn-icon-wrapper--deriv  { background: rgba(255, 68, 79, 0.1); }
.auth-btn-icon-wrapper--google { background: rgba(255, 255, 255, 0.1); }

/* Deriv icon inside large signup button */
.auth-deriv-icon-large {
    color: #ff444f;
    font-size: 20px;
}

/* Header link icon (not-connected state) */
.header-link-icon { color: var(--text-muted); }

/* Chart market select */
.chart-market-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    margin-right: 15px;
}

.bt-stat-win {
    color: #10b981;
}

.bt-stat-loss {
    color: #ef4444;
}

.oauth-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.oauth-dots-container {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.oauth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff444f;
    display: block;
    animation: oauth-dot 1.2s infinite;
}

.oauth-dot:nth-child(1) { animation-delay: 0s; }
.oauth-dot:nth-child(2) { animation-delay: 0.2s; }
.oauth-dot:nth-child(3) { animation-delay: 0.4s; }

/* ===== SCROLLING TICKER BANNER ===== */
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.3333%); }
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 2px solid rgba(0, 136, 255, 0.18);
    flex-shrink: 0;
    /* Sit flush between navbar and content, no extra height growth */
    height: 34px;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    align-items: center;
    /* Make the track 3× wide so we can loop seamlessly */
    width: max-content;
    animation: ticker-scroll 28s linear infinite;
    will-change: transform;
    /* Pause on hover (desktop) */
}

.ticker-wrapper:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-text {
    display: inline-block;
    white-space: nowrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #111111;
    letter-spacing: 0.01em;
    line-height: 1;
    padding: 0 6px;
    /* Prevent any wrapping */
    overflow: hidden;
}

/* Dark theme support */
body.dark-theme .ticker-wrapper {
    background: #0d1117;
    border-bottom-color: rgba(0, 180, 255, 0.25);
}

body.dark-theme .ticker-text {
    color: #f0f4ff;
}

/* Ensure ticker is hidden on landing/auth views (only show inside app-wrapper) */
.landing-view .ticker-wrapper,
.auth-modal .ticker-wrapper {
    display: none;
}

/* ===== DEPOSIT PANEL ===== */
.deposit-form-card {
    max-width: 500px;
    margin: 0 auto;
}

/* ===== DASHBOARD EMPTY STATE ===== */
.dash-empty-state {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.dash-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Custom Bots Sub-section */
.custom-bots-section {
    margin-top: 40px;
    display: none;
}

.custom-bots-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ===== AUTH ALERTS (hidden by default, shown via JS) ===== */
#auth-alert-error,
#auth-alert-success {
    display: none;
}

/* ========== BOT BUILDER & D-CIRCLES ========== */

/* Bot Builder Header */
.bb-header {
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.bb-header h2 {
    margin: 0;
    font-size: 18px;
    background: #ff444f; /* Changed to Deriv-style red */
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.bb-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bb-tool-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.bb-tool-btn:hover { background: #e2e8f0; color: #111; }

/* Bot Builder Workspace Blocks */
.bb-workspace {
    padding-bottom: 80px; /* space for footer */
}
.bb-block {
    background: #112240;
    border-radius: 4px;
    color: white;
    max-width: 600px;
}
.bb-block-header {
    background: #0f172a;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
}
.bb-block-content {
    background: #e2e8f0;
    color: #333;
    padding: 10px 15px 15px 15px;
    border-radius: 0 0 4px 4px;
    border-left: 5px solid #112240;
}
.bb-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}
.bb-row select, .bb-row input {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
}
.bb-tiny-input { width: 60px; }
.bb-sub-block {
    background: #112240;
    margin-top: 10px;
    border-radius: 4px;
}
.bb-sub-header {
    color: white;
    font-size: 13px;
    padding: 6px 10px;
}
.bb-sub-content {
    background: #f1f5f9;
    padding: 10px;
    border-left: 5px solid #112240;
}
.bb-if-block {
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}
.bb-inline-block {
    background: white;
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}
.bb-mt-2 { margin-top: 10px; }
.bb-mt-3 { margin-top: 20px; }

/* Footer Controls */
.bb-footer-control {
    position: fixed;
    bottom: 0;
    left: 240px; /* Drawer width */
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
    z-index: 100;
}
@media (max-width: 768px) {
    .bb-footer-control { left: 0; }
}
.bb-run-btn {
    background: #4db6ac;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bb-run-btn:hover { background: #3c9c93; }
.bb-run-btn.running { background: #ef4444; }
.bb-run-btn.running:hover { background: #dc2626; }
.bb-status {
    flex-grow: 1;
    text-align: center;
    font-weight: 600;
    color: #111;
    background: #f8fafc;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}
.bb-ai-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5), inset -2px -2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 101;
    transition: transform 0.2s;
}
.bb-ai-button:hover { transform: scale(1.05); }

/* D-Circles Dashboard */
#view-d-circles {
    padding-bottom: 80px;
}
.dc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.dc-current-price-col {
    display: flex;
    flex-direction: column;
}
.dc-current-price {
    font-size: 32px;
    font-weight: bold;
    color: #111;
}
.dc-price-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}
.dc-market-selector {
    position: relative;
}
#dc-market-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    font-family: inherit;
    font-size: 14px;
}
.dc-market-label {
    position: absolute;
    right: 0;
    bottom: -18px;
    font-size: 10px;
    color: #94a3b8;
}

.dc-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02), 0 10px 15px rgba(0,0,0,0.03);
}
.dc-card-title {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}
.dc-flex-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
#dc-history-label {
    text-transform: none;
    font-size: 11px;
    color: #94a3b8;
}

/* Digit Grid */
.dc-digit-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}
.dc-digit-circle {
    width: 65px;
    height: 65px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.05);
}
.dc-digit-num { font-size: 20px; font-weight: bold; line-height: 1; margin-bottom: 2px;}
.dc-digit-pct { font-size: 11px; color: #cbd5e1; }
/* Highlights */
.dc-high-1 { box-shadow: 0 0 0 3px #22c55e, 0 4px 6px rgba(0,0,0,0.1); }
.dc-high-2 { box-shadow: 0 0 0 3px #3b82f6, 0 4px 6px rgba(0,0,0,0.1); }
.dc-low-1 { box-shadow: 0 0 0 3px #ef4444, 0 4px 6px rgba(0,0,0,0.1); }
.dc-low-2 { box-shadow: 0 0 0 3px #eab308, 0 4px 6px rgba(0,0,0,0.1); }

/* Absolute icon for lowest/highest etc */
.dc-alert-icon {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}
.dc-triangle-icon {
    position: absolute;
    bottom: -8px;
    color: #ef4444;
    font-size: 12px;
}

.dc-stats-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dc-stat-box {
    flex: 1;
    min-width: 100px;
    background: #f8fafc;
    padding: 12px 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f1f5f9;
}
.dc-stat-label { font-size: 11px; color: #94a3b8; margin-bottom: 5px; font-weight: 600;}
.dc-stat-value { font-size: 15px; font-weight: bold; }

/* Pattern Analysis Tabs */
.dc-tabs {
    display: flex;
    margin-bottom: 25px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}
.dc-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.dc-tab.active {
    background: #0f172a;
    color: white;
}

/* Progress rows */
.dc-progress-row {
    display: flex;
    gap: 15px;
}
.dc-progress-item {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.bg-teal { background: #4db6ac; }
.bg-red { background: #ef4444; }
.bg-yellow { background: #f59e0b; }
.dc-progress-val { font-size: 28px; font-weight: bold; margin-bottom: 4px; }
.dc-progress-lbl { font-size: 12px; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.05em;}

/* Over/Under Stacked */
.dc-digit-selector-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dc-digit-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}
.dc-select-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.dc-select-btn.active {
    background: #fce7f3;
    border-color: #fbcfe8;
    color: #111;
    font-weight: bold;
}
.dc-progress-stacked {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.dc-stacked-item {
    padding: 20px;
    border-radius: 8px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.dc-stacked-val { font-size: 28px; font-weight: bold; margin-bottom: 4px; }
.dc-stacked-lbl { font-size: 12px; text-transform: uppercase; opacity: 0.9; letter-spacing: 0.05em; }

/* Last 30 Digits History */
.dc-history-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dc-hist-bubble {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
}

/* Colors text */
.text-green { color: #22c55e !important; }
.text-blue { color: #3b82f6 !important; }
.text-red { color: #ef4444 !important; }
.text-yellow { color: #eab308 !important; }

/* ========== CUSTOM DERIV DROPDOWNS ========== */
.deriv-dropdown {
    position: relative;
    display: inline-block;
    min-width: 140px;
    font-family: inherit;
    font-size: 13px;
    user-select: none;
}

.deriv-dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.deriv-dropdown-selected:hover {
    border-color: #94a3b8;
}

.deriv-dropdown.open .deriv-dropdown-selected {
    border-color: #ff444f;
    box-shadow: 0 0 0 2px rgba(255, 68, 79, 0.1);
}

.deriv-dropdown-selected i {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s;
}

.deriv-dropdown.open .deriv-dropdown-selected i {
    transform: rotate(180deg);
}

.deriv-dropdown-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.deriv-dropdown.open .deriv-dropdown-options {
    display: block;
}

/* Open upwards if constrained */
.deriv-dropdown.open-up .deriv-dropdown-options {
    top: auto;
    bottom: calc(100% + 4px);
}

.deriv-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    color: #333;
    transition: background 0.15s;
    font-size: 13px;
}

.deriv-option:hover {
    background: #f1f5f9;
}

.deriv-option.selected {
    font-weight: 500;
}

.deriv-option i.fa-check {
    font-size: 12px;
    color: #333;
    visibility: hidden;
}

.deriv-option.selected i.fa-check {
    visibility: visible;
}

/* ===== MOVED FROM INLINE STYLES ===== */

/* OAuth redirect splash overlay */
#oauth-redirect-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
}

/* OAuth "Authenticating with Deriv..." text */
.oauth-auth-text {
    color: #94a3b8;
    font-size: 15px;
}

/* Hidden state for dc-tab-over-under (was style="display:none;") */
.dc-tab-content--hidden {
    display: none;
}

/* Keyframe animations (were inside inline <style> in the splash div) */
@keyframes oauth-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

@keyframes oauth-dot {
    0%, 80%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ===== DERIV BOT WORKSPACE MODAL OVERLAY ===== */
.deriv-bot-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.deriv-bot-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.deriv-bot-modal {
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal header/topbar */
.db-modal-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.db-modal-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.db-modal-title {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
}

.db-modal-status {
    background: #3b82f6;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.db-modal-status.active {
    background: #10b981 !important;
}

.db-modal-status.stopped {
    background: #64748b !important;
}

.db-modal-actions {
    display: flex;
    gap: 12px;
}

/* Topbar Buttons */
.db-run-btn-top {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.db-run-btn-top:hover {
    background: #059669;
}

.db-stop-btn-top {
    background: #475569;
    color: #94a3b8;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.db-stop-btn-top.active-stop {
    background: #ef4444;
    color: white;
    cursor: pointer;
}

.db-stop-btn-top.active-stop:hover {
    background: #dc2626;
}

.db-close-btn-top {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.db-close-btn-top:hover {
    background: rgba(239, 68, 68, 0.1);
}

.db-modal-body {
    flex-grow: 1;
    position: relative;
    background: #0f172a;
    display: flex;
    overflow: hidden;
}

.db-logo-mark {
    width: 32px;
    height: 32px;
    background: #ef4444;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

/* ===== DERIV BOT WORKSPACE LAYOUT ===== */
.deriv-bot-workspace-wrap {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 75vh;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Deriv Bot Left Rail Toolbar */
.deriv-bot-left-rail {
    width: 64px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
}

.deriv-quick-strat-btn {
    width: 52px;
    height: 48px;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    padding: 4px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deriv-quick-strat-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.deriv-rail-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.deriv-rail-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.deriv-rail-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.deriv-bot-canvas-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

/* Sticky Footer */
.bb-footer-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    gap: 16px;
    flex-shrink: 0;
    z-index: 10;
}

.bb-run-btn {
    background: #0d9488;
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.bb-run-btn:hover {
    background: #0f766e;
}

.bb-status-slider-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 400px;
}

.bb-status {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.bb-slider-track {
    width: 100%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.bb-slider-dot {
    position: absolute;
    top: -2px;
    left: 45%;
    width: 8px;
    height: 8px;
    background: #475569;
    border-radius: 50%;
}

.bb-ai-button {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Blockly Workspace Aesthetic Fine-Tuning — High Contrast Dark Theme */
.blocklyToolboxDiv {
    background-color: #090e1a !important;
    border-right: 1px solid #1e293b !important;
    padding: 8px 4px !important;
    min-width: 185px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 20 !important;
}

.blocklyTreeLabel {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important; /* Crisp, readable high-contrast light text */
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    display: inline-block !important;
    max-width: 175px !important;
}

.blocklyTreeRow {
    padding: 6px 10px !important;
    border-radius: 6px !important;
    margin-bottom: 3px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    color: #cbd5e1 !important;
    cursor: pointer !important;
}

.blocklyTreeRow:hover {
    background-color: #182238 !important;
    color: #38bdf8 !important;
}

.blocklyTreeRow:hover .blocklyTreeLabel {
    color: #38bdf8 !important;
}

.blocklyTreeSelected {
    background-color: #1e293b !important;
}

.blocklyTreeSelected .blocklyTreeRow {
    background-color: #1e293b !important;
    color: #00e5ff !important;
}

.blocklyTreeSelected .blocklyTreeLabel {
    color: #38bdf8 !important;
}

.blocklyFlyoutBackground {
    fill: #0c1220 !important;
    fill-opacity: 0.96 !important;
    stroke: #1e293b !important;
}

.blocklyMainBackground {
    fill: #080d19 !important;
    stroke-width: 0 !important;
}

.blocklyScrollbarHandle {
    fill: #334155 !important;
}

.blocklyText {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    fill: #f8fafc !important;
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .deriv-bot-left-rail {
        width: 44px;
        padding: 6px 2px;
        gap: 6px;
    }

    .deriv-quick-strat-btn {
        width: 38px;
        height: 38px;
        font-size: 7.5px;
    }

    .deriv-rail-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .db-modal-header {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .db-modal-title-area {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .db-modal-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }

    .db-modal-actions {
        width: 100%;
        display: flex;
        gap: 6px;
        justify-content: stretch;
    }

    .db-run-btn-top, .db-stop-btn-top, .db-close-btn-top {
        flex: 1;
        justify-content: center;
        padding: 7px 8px;
        font-size: 11px;
        border-radius: 6px;
        white-space: nowrap;
    }

    .blocklyToolboxDiv {
        min-width: 130px !important;
        max-width: 148px !important;
        padding: 4px 2px !important;
    }

    .blocklyTreeRow {
        padding: 5px 6px !important;
        margin-bottom: 2px !important;
    }

    .blocklyTreeLabel {
        font-size: 10.5px !important;
        max-width: 120px !important;
    }
}

/* ===================================================================
   BLOCKLY LAUNCHER CARD — shown on each bot view
   =================================================================== */
.blockly-launcher-card {
    max-width: 680px;
    margin: 40px auto;
    background: linear-gradient(135deg, rgba(13,22,48,0.92) 0%, rgba(10,18,40,0.96) 100%);
    border: 1px solid rgba(99,179,237,0.22);
    border-radius: 20px;
    padding: 48px 48px 44px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(99,179,237,0.08);
    backdrop-filter: blur(12px);
    animation: blcFadeIn 0.35s ease;
}

@keyframes blcFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.blc-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(6,182,212,0.35);
}

.blc-title {
    font-size: 22px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 14px;
    letter-spacing: -0.3px;
}

.blc-desc {
    font-size: 14.5px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 28px;
}

.blc-desc strong {
    color: #67e8f9;
}

.blc-features {
    list-style: none;
    padding: 0;
    margin: 0 auto 36px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 360px;
}

.blc-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #cbd5e1;
}

.blc-features li i {
    color: #34d399;
    font-size: 14px;
    flex-shrink: 0;
}

.blc-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(6,182,212,0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.blc-open-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(6,182,212,0.55);
}

.blc-open-btn:active {
    transform: translateY(0) scale(0.98);
    opacity: 0.9;
}

@media (max-width: 600px) {
    .blockly-launcher-card {
        padding: 32px 22px 28px;
        margin: 20px auto;
    }
    .blc-title { font-size: 18px; }
    .blc-features { max-width: 100%; }
}

/* ===================================================================
   DERIV BOT BUILDER (dbb-*) � Pixel-accurate Deriv Bot style
   =================================================================== */

/* Outer wrapper: left rail + scrollable canvas stacked vertically */
.dbb-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    background: #0d1117;
    position: relative;
    overflow: hidden;
}

/* -- Left Rail -- */
.dbb-left-rail {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #161b22;
    border-bottom: 1px solid rgba(99,179,237,0.12);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.dbb-rail-btn.dbb-qs-btn {
    background: #ff444f;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
}
.dbb-rail-btn.dbb-qs-btn:hover { opacity: 0.88; transform: scale(1.03); }

.dbb-rail-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s, color 0.15s;
}
.dbb-rail-icon-btn:hover { background: rgba(99,179,237,0.12); color: #e2e8f0; }

.dbb-rail-divider {
    width: 1px;
    height: 24px;
    background: rgba(99,179,237,0.15);
    margin: 0 4px;
}

/* -- Canvas (scrollable) -- */
.dbb-canvas {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px 100px;
    position: relative;
}
.dbb-canvas::-webkit-scrollbar { width: 4px; }
.dbb-canvas::-webkit-scrollbar-track { background: transparent; }
.dbb-canvas::-webkit-scrollbar-thumb { background: rgba(99,179,237,0.2); border-radius: 4px; }

/* -- Quick Strategy Panel -- */
.dbb-qs-panel {
    background: #1a2332;
    border: 1px solid rgba(99,179,237,0.2);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.dbb-qs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(99,179,237,0.07);
    font-weight: 600;
    font-size: 14px;
    color: #e2e8f0;
}
.dbb-qs-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
.dbb-qs-close:hover { color: #ef4444; }
.dbb-qs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}
.dbb-qs-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(99,179,237,0.1);
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s;
}
.dbb-qs-card:hover { background: rgba(6,182,212,0.12); border-color: rgba(6,182,212,0.3); color: #e2e8f0; }
.dbb-qs-card i { font-size: 16px; color: #06b6d4; }

/* -- Strategy Label -- */
.dbb-strategy-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    padding: 0 2px;
}
.dbb-strategy-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,200,0,0.15);
    color: #facc15;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* -- Blocks -- */
.dbb-block {
    background: #163b55;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.dbb-block-purchase { background: #163b55; }
.dbb-block-sell     { background: #1a3b2a; }

.dbb-block-header {
    background: #1e4f70;
    color: #e0f2fe;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dbb-block-purchase .dbb-block-header { background: #1e4f70; }
.dbb-block-sell .dbb-block-header     { background: #1a5c38; }

.dbb-block-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

/* Field rows */
.dbb-field-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #cbd5e1;
}
.dbb-field-label { color: #94a3b8; white-space: nowrap; font-size: 13px; }

/* Cascade (breadcrumb selector) */
.dbb-cascade {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.dbb-cascade-arrow { color: #475569; font-size: 16px; }

/* Chip-style dropdown */
.dbb-chip-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e3a50;
    border: 1px solid rgba(99,179,237,0.25);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #e2e8f0;
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.dbb-chip-select:hover { border-color: rgba(6,182,212,0.5); background: #1e3a5a; }
.dbb-chip-select.wide { min-width: 160px; border-radius: 6px; }
.dbb-chip-select.sm   { padding: 4px 10px; font-size: 12px; }
.dbb-chip-select i.fa-caret-down { font-size: 11px; color: #64748b; }

.dbb-chip-drop {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #1a2e42;
    border: 1px solid rgba(99,179,237,0.2);
    border-radius: 8px;
    min-width: 160px;
    z-index: 900;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    overflow: hidden;
}
.dbb-chip-drop.open { display: block; }
.dbb-chip-drop div {
    padding: 9px 14px;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.12s;
}
.dbb-chip-drop div:hover { background: rgba(6,182,212,0.12); color: #e2e8f0; }

/* Toggle switches */
.dbb-toggle-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.5;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dbb-toggle-row:last-of-type { border-bottom: none; }
.dbb-toggle-switch { position: relative; flex-shrink: 0; display: inline-block; width: 36px; height: 20px; }
.dbb-toggle-switch input { opacity: 0; width: 0; height: 0; }
.dbb-toggle-track {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #334155; border-radius: 20px;
    transition: background 0.2s;
}
.dbb-toggle-track:before {
    content: '';
    position: absolute;
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%;
    transition: transform 0.2s;
}
.dbb-toggle-switch input:checked + .dbb-toggle-track { background: #06b6d4; }
.dbb-toggle-switch input:checked + .dbb-toggle-track:before { transform: translateX(16px); }

/* Sub-block (Trade options) */
.dbb-sub-block {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 4px;
}
.dbb-sub-block-title { font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.dbb-trade-opts-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.dbb-opt-group { display: flex; align-items: center; gap: 8px; }
.dbb-opt-label { font-size: 12.5px; color: #94a3b8; white-space: nowrap; }

/* Number inputs */
.dbb-num-input {
    background: #1e3a50;
    border: 1px solid rgba(99,179,237,0.25);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 13px;
    padding: 5px 8px;
    width: 60px;
    text-align: center;
    -moz-appearance: textfield;
}
.dbb-num-input.wide { width: 90px; }
.dbb-num-input.sm   { width: 48px; }
.dbb-num-input:focus { outline: none; border-color: rgba(6,182,212,0.5); }
.dbb-num-input::-webkit-inner-spin-button, .dbb-num-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* -- Sticky Footer -- */
.dbb-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #161b22;
    border-top: 1px solid rgba(99,179,237,0.12);
    z-index: 50;
}
.dbb-run-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #06b6d4;
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.dbb-run-btn:hover { background: #0891b2; transform: scale(1.02); }
.dbb-run-btn.running { background: #ef4444; }
.dbb-run-btn.running:hover { background: #dc2626; }

.dbb-footer-status-wrap { flex: 1; min-width: 0; }
.dbb-footer-status { font-size: 13px; color: #94a3b8; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbb-footer-progress { height: 4px; background: #1e293b; border-radius: 4px; overflow: hidden; }
.dbb-progress-track { height: 4px; background: #1e293b; border-radius: 4px; position: relative; }
.dbb-progress-dot {
    width: 14px; height: 14px;
    background: #06b6d4; border-radius: 50%;
    position: absolute; top: -5px; left: 0;
    transition: left 0.3s ease;
    box-shadow: 0 0 6px #06b6d4;
    display: none;
}
.dbb-progress-dot.active { display: block; }
.dbb-summary-btn {
    background: transparent;
    border: 1px solid rgba(99,179,237,0.2);
    color: #64748b;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.dbb-summary-btn:hover { background: rgba(99,179,237,0.1); color: #e2e8f0; }

/* ===== MANUAL TRADER TERMINAL VIEW ===== */
#view-manual-trader { padding: 0 !important; width: 100%; height: calc(100vh - 105px); min-height: 600px; overflow: hidden; background: #0d1117; }
#manual-trader-iframe { width: 100%; height: 100%; border: none; display: block; background: #0d1117; }

/* ===== MAIN DASHBOARD & PERSONAL RISK SHIELDS STYLES ===== */
.dash-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.dash-title-group h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-title-group h1 i {
    color: #10b981;
}
.dash-title-group p {
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}
.dash-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

/* 1. TOP METRICS GRID (WALLET & SESSION METRICS) */
.dash-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .dash-metrics-grid {
        grid-template-columns: 1fr;
    }
}
.dash-metric-card {
    background: var(--card-bg, #161b22);
    border: 1px solid var(--border-color, #21262d);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, border-color 0.2s;
}
.dash-metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 179, 237, 0.4);
}
.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.metric-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
}
.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.metric-icon.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.metric-value-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.metric-value {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace, sans-serif;
    color: var(--text-primary, #f8fafc);
    margin: 0;
}
.metric-value.positive { color: #10b981; }
.metric-value.negative { color: #ef4444; }
.metric-subtext {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 2. PRIVATE PERSONAL RISK TARGET CARD */
.dash-risk-card {
    background: var(--card-bg, #161b22);
    border: 1px solid var(--border-color, #21262d);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.risk-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid var(--border-color, #21262d);
    padding-bottom: 16px;
}
.risk-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}
.risk-shield-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.risk-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin: 0 0 4px 0;
}
.risk-card-subtitle {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}
.risk-status-pill {
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Progress Grid */
.risk-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 800px) {
    .risk-progress-grid {
        grid-template-columns: 1fr;
    }
}
.risk-progress-item {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.progress-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}
.progress-title {
    color: var(--text-primary, #f8fafc);
    display: flex;
    align-items: center;
    gap: 8px;
}
.progress-fraction {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}
.progress-bar-track {
    width: 100%;
    height: 10px;
    background: #21262d;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease-in-out;
}
.progress-bar-fill.tp-fill {
    background: linear-gradient(90deg, #10b981, #06b6d4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.progress-bar-fill.sl-fill {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.progress-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    font-family: 'JetBrains Mono', monospace;
}
.progress-status {
    font-weight: 600;
    color: #10b981;
}

/* 4. CONFIGURATION INPUTS */
.risk-config-panel {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.config-header .config-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 6px;
}
.config-inputs-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.config-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.config-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary, #f8fafc);
}
.config-input-wrapper {
    display: flex;
    align-items: center;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.2s;
}
.config-input-wrapper:focus-within {
    border-color: #10b981;
}
.currency-prefix {
    color: var(--text-muted, #94a3b8);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 14px;
    margin-right: 6px;
}
.config-input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary, #f8fafc);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 0;
}
.btn-save-limits {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    height: 40px;
}
.btn-save-limits:hover {
    background: #0284c7;
    transform: translateY(-1px);
}
.btn-save-limits:active {
    transform: translateY(0);
}
.config-security-note {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   PROFESSIONAL VISUAL TRADING BOT BUILDER STYLES (DERIV BOT EXPERIENCE)
   ========================================================================== */

.dbb-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 560px;
    background: #0a0f1d;
    color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

/* ── Top Header Toolbar Bar ── */
.dbb-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #0d1424;
    border-bottom: 1px solid #1e293b;
    gap: 12px;
    flex-wrap: wrap;
    z-index: 20;
    flex-shrink: 0;
}

.dbb-strategy-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dbb-strat-name-input {
    background: #182238;
    border: 1px solid #334155;
    color: #f8fafc;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 200px;
}

.dbb-strat-name-input:focus {
    border-color: #00a79e;
    box-shadow: 0 0 0 2px rgba(0, 167, 158, 0.25);
}

.dbb-strategy-badge {
    background: #1e293b;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dbb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dbb-mode-toggle {
    display: flex;
    background: #141d33;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid #334155;
}

.dbb-mode-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.dbb-mode-btn.active#dbb-mode-demo-btn {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.dbb-mode-btn.active#dbb-mode-live-btn {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
}

.dbb-head-btn {
    background: #182238;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.dbb-head-btn:hover {
    background: #243354;
    border-color: #475569;
    color: #ffffff;
}

/* ── Deriv Bot Sub-Tabs ── */
.dbb-sub-tabs {
    display: flex;
    background: #0a0f1d;
    border-bottom: 1px solid #1e293b;
    padding: 0 16px;
    gap: 4px;
    flex-shrink: 0;
}

.dbb-sub-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
}

.dbb-sub-tab-btn:hover {
    color: #f8fafc;
}

.dbb-sub-tab-btn.active {
    color: #00a79e;
    border-bottom-color: #00a79e;
    font-weight: 700;
}

/* ── Main Workspace Body (Full Height) ── */
.dbb-main-body {
    display: flex;
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

/* ── Deriv Bot Left Icon & Control Rail ── */
.dbb-left-rail {
    width: 58px;
    background: #090e1a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 6px;
    z-index: 25;
    flex-shrink: 0;
}

/* Deriv Bot Red Quick Strategy Button */
.dbb-qs-pill-btn {
    background: #ff444f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.15;
    padding: 8px 3px;
    width: 48px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    box-shadow: 0 4px 12px rgba(255, 68, 79, 0.4);
    transition: transform 0.15s, background 0.2s;
}

.dbb-qs-pill-btn i {
    font-size: 13px;
}

.dbb-qs-pill-btn:hover {
    background: #e0303b;
    transform: translateY(-1px);
}

.dbb-qs-pill-btn:active {
    transform: translateY(0);
}

.dbb-rail-divider {
    width: 32px;
    height: 1px;
    background: #1e293b;
    margin: 4px 0;
}

.dbb-rail-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dbb-rail-icon-btn:hover {
    background: #182238;
    color: #38bdf8;
    border-color: #334155;
    transform: scale(1.05);
}

.dbb-rail-icon-btn:active {
    transform: scale(0.95);
}

/* ── Center Blockly Canvas Container (Takes 100% of available space) ── */
.dbb-canvas-area {
    flex: 1;
    position: relative;
    height: 100%;
    width: 100%;
    min-width: 0;
    background: #080d19;
    overflow: hidden;
}

#blocklyDiv {
    width: 100% !important;
    height: 100% !important;
    min-height: 480px;
    position: relative;
    background: #080d19;
}

/* ── Quick Strategy Dropdown Modal Inside Canvas ── */
.dbb-qs-panel {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 330px;
    max-width: calc(100vw - 80px);
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    z-index: 40;
    overflow: hidden;
}

.dbb-qs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #182238;
    font-weight: 700;
    font-size: 13px;
    color: #f1f5f9;
}

.dbb-qs-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
}

.dbb-qs-close:hover {
    color: #f8fafc;
}

.dbb-qs-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 6px;
    max-height: 380px;
    overflow-y: auto;
}

.dbb-qs-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #182238;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.dbb-qs-card:hover {
    background: #243354;
    transform: translateX(3px);
}

/* ── Slide-Over Block Inspector Panel (Optional drawer, does NOT squeeze canvas) ── */
.dbb-inspector-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 310px;
    max-width: 92vw;
    background: rgba(13, 20, 36, 0.96);
    backdrop-filter: blur(14px);
    border-left: 1px solid #334155;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.dbb-inspector-drawer.open {
    transform: translateX(0);
}

.dbb-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #141d33;
    border-bottom: 1px solid #1e293b;
}

.dbb-inspector-header-title h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dbb-inspector-sub {
    font-size: 11px;
    color: #94a3b8;
}

.dbb-inspector-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s;
}

.dbb-inspector-close-btn:hover {
    color: #ffffff;
    background: #1e293b;
}

.dbb-inspector-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.dbb-inspector-empty {
    text-align: center;
    padding: 40px 16px;
    color: #64748b;
    font-size: 13px;
}

.dbb-inspector-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.dbb-inspector-field {
    margin-bottom: 14px;
}

.dbb-inspector-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.dbb-inspector-field input,
.dbb-inspector-field select {
    width: 100%;
    background: #182238;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.dbb-inspector-field input:focus,
.dbb-inspector-field select:focus {
    border-color: #00a79e;
}

/* ── Deriv Bot Bottom Control Area ── */
.dbb-bottom-panel {
    position: relative;
    background: #0a0f1d;
    border-top: 1px solid #1e293b;
    z-index: 30;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
}

/* Drawer Handle Bar (Deriv Bot Chevron toggle) */
.dbb-drawer-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px 0;
    cursor: pointer;
    user-select: none;
    background: transparent;
}

.dbb-drawer-handle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #141d33;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 2px 14px;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.dbb-drawer-handle-pill:hover,
.dbb-drawer-handle-pill.expanded {
    background: #243354;
    color: #f8fafc;
    border-color: #00a79e;
}

/* Deriv Bot Footer Control Bar */
.dbb-footer-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    gap: 14px;
    flex-wrap: wrap;
    background: #0d1424;
}

.dbb-run-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Deriv Bot Prominent Green Run Button */
.dbb-run-btn {
    background: #00a79e;
    color: #ffffff;
    border: none;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 167, 158, 0.4);
    transition: all 0.2s;
}

.dbb-run-btn:hover {
    background: #008f87;
    transform: translateY(-1px);
}

.dbb-run-btn:active {
    transform: translateY(0);
}

.dbb-run-btn.running {
    background: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
}

.dbb-pause-btn {
    background: #eab308;
    color: #0f172a;
    border: none;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.dbb-stop-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.dbb-pause-btn:disabled,
.dbb-stop-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(40%);
}

/* Status Pill with Dot and Track matching Deriv Bot */
.dbb-status-badge-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #141d33;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 5px 14px;
}

.dbb-status-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
}

.dbb-status-indicator.running {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: dbbPulse 1.5s infinite;
}

.dbb-status-indicator.paused {
    background: #eab308;
}

@keyframes dbbPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dbb-status-text {
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
}

.dbb-status-slider-track {
    width: 48px;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.dbb-status-slider-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 14px;
    background: #00a79e;
    border-radius: 2px;
}

/* Quick Metrics Preview Strip */
.dbb-stats-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    cursor: pointer;
}

.dbb-stat-pill {
    background: #141d33;
    border: 1px solid #1e293b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    transition: border-color 0.2s, background 0.2s;
}

.dbb-stats-strip:hover .dbb-stat-pill {
    border-color: #334155;
    background: #182238;
}

.dbb-stat-pill .lbl {
    color: #94a3b8;
}

.dbb-stat-pill .val {
    font-weight: 700;
}

/* ── Collapsible Performance & Martingale Drawer ── */
.dbb-stats-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: #070b14;
    border-top: 1px solid transparent;
}

.dbb-stats-drawer.expanded {
    max-height: 420px;
    overflow-y: auto;
    border-top-color: #1e293b;
}

.dbb-risk-warning-banner {
    background: #451a03;
    border-top: 1px solid #78350f;
    border-bottom: 1px solid #78350f;
    color: #fef3c7;
    font-size: 12px;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dbb-martingale-stepper-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #0a0f1d;
    border-bottom: 1px solid #1e293b;
    overflow-x: auto;
}

.dbb-stepper-title {
    font-size: 12px;
    font-weight: 700;
    color: #a855f7;
    white-space: nowrap;
}

.dbb-stepper-track {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dbb-step-node {
    background: #141d33;
    border: 1px solid #334155;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    transition: all 0.2s;
}

.dbb-step-node.active {
    background: #6b21a8;
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.dbb-step-node.locked {
    background: #450a0a;
    border-color: #ef4444;
    color: #fca5a5;
    opacity: 0.8;
}

.dbb-step-node .s-step {
    font-weight: 700;
}

.dbb-step-node .s-stake {
    font-size: 10px;
    opacity: 0.9;
}

.dbb-log-stream-wrap {
    background: #080d17;
    padding: 8px 16px 12px 16px;
}

.dbb-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dbb-log-title {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dbb-log-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dbb-log-filter {
    background: #141d33;
    border: 1px solid #334155;
    color: #94a3b8;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.dbb-log-filter.active {
    background: #00a79e;
    color: #ffffff;
    border-color: #00a79e;
}

.dbb-log-clear {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    margin-left: 6px;
}

.dbb-log-clear:hover {
    color: #ef4444;
}

.dbb-log-body {
    max-height: 110px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #040711;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #1e293b;
}

.dbb-log-line {
    line-height: 1.4;
}

.dbb-log-line .ts {
    color: #64748b;
    margin-right: 6px;
}

.dbb-log-line.info { color: #cbd5e1; }
.dbb-log-line.trade { color: #38bdf8; }
.dbb-log-line.win { color: #4ade80; font-weight: 600; }
.dbb-log-line.loss { color: #f87171; font-weight: 600; }
.dbb-log-line.error { color: #fb7185; }
.dbb-log-line.risk { color: #fbbf24; }
.dbb-log-line.martingale { color: #c084fc; }

/* ── Blockly Dark Theme Custom Overrides ── */
.blocklyToolboxDiv {
    background-color: #090e1a !important;
    border-right: 1px solid #1e293b !important;
    color: #cbd5e1 !important;
    min-width: 185px !important;
    box-sizing: border-box !important;
}

.blocklyTreeRow {
    padding: 7px 10px !important;
    border-radius: 6px !important;
    margin: 2px 4px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: background 0.15s, color 0.15s !important;
}

.blocklyTreeRow:hover {
    background-color: #182238 !important;
    color: #38bdf8 !important;
}

.blocklyTreeSelected .blocklyTreeRow {
    background-color: #1e293b !important;
    color: #00e5ff !important;
}

.blocklyTreeLabel {
    color: #f1f5f9 !important;
    font-size: 12px !important;
}

.blocklyFlyoutBackground {
    fill: #0c1220 !important;
    fill-opacity: 0.95 !important;
    stroke: #1e293b !important;
}

.blocklyScrollbarHandle {
    fill: #334155 !important;
}

/* ── Responsive Mobile Rules (320px – 767px) ── */
@media (max-width: 767px) {
    .dbb-wrap {
        height: calc(100vh - 56px);
        min-height: 0;
        overflow: hidden;
    }
    .dbb-top-header {
        padding: 6px 10px;
        gap: 6px;
    }
    .dbb-strategy-title-wrap {
        width: 100%;
    }
    .dbb-strat-name-input {
        min-width: 140px;
        flex: 1;
        font-size: 12.5px;
        padding: 5px 8px;
    }
    .dbb-header-actions {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
        flex-wrap: nowrap;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .dbb-head-btn {
        padding: 5px 8px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .dbb-mode-btn {
        padding: 4px 7px;
        font-size: 10px;
        white-space: nowrap;
    }
    .dbb-sub-tabs {
        padding: 0 10px;
        overflow-x: auto;
        white-space: nowrap;
    }
    .dbb-sub-tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    .dbb-left-rail {
        width: 44px;
        padding: 6px 0;
        gap: 4px;
    }
    .dbb-qs-pill-btn {
        width: 38px;
        padding: 5px 2px;
        font-size: 7.5px;
    }
    .dbb-rail-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .dbb-canvas-area {
        width: calc(100% - 44px);
    }
    .dbb-footer-control-bar {
        padding: 6px 10px;
        gap: 8px;
    }
    .dbb-run-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    .dbb-pause-btn,
    .dbb-stop-btn {
        padding: 7px 9px;
        font-size: 11px;
    }
    .dbb-status-badge-wrap {
        padding: 4px 8px;
    }
    .dbb-status-slider-track {
        display: none;
    }
    .dbb-stats-strip {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
        flex-wrap: nowrap;
    }
    .dbb-stat-pill {
        white-space: nowrap;
        font-size: 10px;
        padding: 3px 6px;
    }
    .dbb-inspector-drawer {
        width: 100vw;
        max-width: 100vw;
    }
    .blocklyToolboxDiv {
        min-width: 130px !important;
        max-width: 145px !important;
        padding: 4px 2px !important;
    }
    .blocklyTreeRow {
        padding: 5px 6px !important;
        font-size: 10.5px !important;
    }
    .blocklyTreeLabel {
        font-size: 10.5px !important;
        max-width: 120px !important;
    }
}

/* ── Ultra-Compact Tuning (<= 360px e.g. iPhone SE) ── */
@media (max-width: 360px) {
    .dbb-left-rail,
    .deriv-bot-left-rail {
        width: 38px !important;
    }
    .dbb-qs-pill-btn,
    .deriv-quick-strat-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 7px !important;
    }
    .dbb-rail-icon-btn,
    .deriv-rail-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    .blocklyToolboxDiv {
        min-width: 120px !important;
        max-width: 130px !important;
    }
    .blocklyTreeLabel {
        font-size: 9.5px !important;
        max-width: 105px !important;
    }
    .db-run-btn-top,
    .db-stop-btn-top,
    .db-close-btn-top {
        padding: 5px 4px !important;
        font-size: 10px !important;
        gap: 3px !important;
    }
}

/* ── Responsive Laptop Optimization (768px – 1365px) ── */
@media (min-width: 768px) and (max-width: 1365px) {
    .blocklyToolboxDiv {
        min-width: 180px !important;
    }
    .blocklyTreeLabel {
        font-size: 12px !important;
        max-width: 170px !important;
    }
    .dbb-wrap {
        height: calc(100vh - 60px);
    }
    .sb-params-col {
        width: 380px !important;
        min-width: 330px !important;
    }
}

/* ── Responsive Desktop Optimization (> 1365px) ── */
@media (min-width: 1366px) {
    .blocklyToolboxDiv {
        min-width: 195px !important;
    }
    .blocklyTreeLabel {
        font-size: 12.5px !important;
        max-width: 190px !important;
    }
    .dbb-left-rail {
        width: 60px;
    }
    .sb-params-col {
        width: 440px;
    }
}

.dbb-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dbb-modal-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.dbb-modal-header {
    padding: 16px 20px;
    background: #182238;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dbb-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dbb-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
}

.dbb-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.dbb-modal-footer {
    padding: 14px 20px;
    background: #182238;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #1e293b;
}

.live-warning-box {
    background: #450a0a;
    border: 1px solid #991b1b;
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.live-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    background: #182238;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
}

.live-summary-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #334155;
    padding-bottom: 4px;
}

.live-summary-row:last-child {
    border-bottom: none;
}

.live-confirm-checkbox {
    margin-top: 12px;
    font-size: 12px;
    color: #e2e8f0;
}

.live-confirm-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}


/* ============================================================
   PREMIUM 3D FLOATING MONEY HERO VISUAL EFFECT
   ============================================================ */
.landing-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 70px 60px;
    min-height: calc(100vh - 72px);
    background: radial-gradient(circle at 65% 45%, #0d285c 0%, #08183a 35%, #040d21 75%, #020612 100%) !important;
    position: relative;
    overflow: hidden;
    perspective: 1400px;
    transform-style: preserve-3d;
}

/* 3D Money Stage & Particles Container */
.hero-3d-money-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* Deep Space Ambient Glow backdrop */
.money-space-backdrop {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 75% 35%, rgba(0, 162, 255, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse at 25% 65%, rgba(0, 229, 255, 0.16) 0%, transparent 50%),
        url('hero-3d-money-bg.jpg') center/cover no-repeat;
    opacity: 0.45;
    mix-blend-mode: lighten;
    filter: contrast(1.15) brightness(0.9);
}

.money-particle-field {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #00d9ff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 90px 40px, #38bdf8, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #00ffe7, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    animation: particleDrift 20s linear infinite;
}

@keyframes particleDrift {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

/* General Floating Bill Base Element */
.floating-bill {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 20px 35px rgba(0, 10, 35, 0.85));
}

.floating-bill .bill-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    mix-blend-mode: screen;
    user-select: none;
    pointer-events: none;
}

/* ------------------------------------------------------------
   1. BILLS FLOATING BEHIND TEXT (Low Opacity, Soft Blur)
   ------------------------------------------------------------ */
.bill-behind-text-top {
    top: 6%;
    left: 10%;
    width: 290px;
    opacity: 0.28;
    filter: blur(2.5px) drop-shadow(0 10px 25px rgba(0, 15, 45, 0.8));
    transform: rotateX(25deg) rotateY(-18deg) rotateZ(-22deg) scale(0.85);
    animation: float3d_BehindTop calc(var(--float-dur, 7s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-behind-text-mid {
    top: 36%;
    left: 24%;
    width: 320px;
    opacity: 0.32;
    filter: blur(2px) drop-shadow(0 15px 30px rgba(0, 20, 50, 0.85));
    transform: rotateX(-15deg) rotateY(22deg) rotateZ(16deg) scale(0.9);
    animation: float3d_BehindMid calc(var(--float-dur, 8.5s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-behind-text-bot {
    bottom: 10%;
    left: 4%;
    width: 250px;
    opacity: 0.22;
    filter: blur(3.5px) drop-shadow(0 10px 20px rgba(0, 15, 40, 0.8));
    transform: rotateX(30deg) rotateY(-12deg) rotateZ(-14deg) scale(0.75);
    animation: float3d_BehindBot calc(var(--float-dur, 9s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-behind-text-far {
    top: 50%;
    left: 1%;
    width: 200px;
    opacity: 0.18;
    filter: blur(4px);
    transform: rotateX(-20deg) rotateY(-25deg) rotateZ(35deg) scale(0.6);
    animation: float3d_BehindFar calc(var(--float-dur, 10s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

/* ------------------------------------------------------------
   2. FOCAL RIGHT-SIDE 3D FLOATING BILLS (Sharp, Dynamic 3D Angles)
   ------------------------------------------------------------ */
.bill-hero-primary {
    top: 22%;
    right: 8%;
    width: 390px;
    z-index: 2;
    opacity: 0.95;
    filter: drop-shadow(0 25px 50px rgba(0, 15, 45, 0.9)) drop-shadow(0 0 25px rgba(0, 180, 255, 0.35));
    transform: perspective(1000px) rotateX(24deg) rotateY(-26deg) rotateZ(14deg) translateZ(80px) scale(1.12);
    animation: float3d_HeroPrimary calc(var(--float-dur, 6.5s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-hero-secondary {
    top: 6%;
    right: 28%;
    width: 330px;
    z-index: 1;
    opacity: 0.85;
    filter: drop-shadow(0 20px 40px rgba(0, 15, 45, 0.85));
    transform: perspective(1000px) rotateX(-18deg) rotateY(34deg) rotateZ(-20deg) translateZ(30px) scale(0.92);
    animation: float3d_HeroSecondary calc(var(--float-dur, 7.8s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-hero-foreground {
    bottom: 3%;
    right: 2%;
    width: 450px;
    z-index: 3;
    opacity: 0.9;
    filter: blur(1.2px) drop-shadow(0 35px 65px rgba(0, 5, 25, 0.95));
    transform: perspective(900px) rotateX(32deg) rotateY(-14deg) rotateZ(6deg) translateZ(140px) scale(1.25);
    animation: float3d_HeroForeground calc(var(--float-dur, 6s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-hero-distant-1 {
    top: 3%;
    right: 3%;
    width: 230px;
    opacity: 0.45;
    filter: blur(3px);
    transform: rotateX(15deg) rotateY(40deg) rotateZ(-38deg) scale(0.65);
    animation: float3d_HeroDistant1 calc(var(--float-dur, 11s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-hero-distant-2 {
    top: 55%;
    right: 36%;
    width: 250px;
    opacity: 0.5;
    filter: blur(3.5px);
    transform: rotateX(-30deg) rotateY(-20deg) rotateZ(28deg) scale(0.68);
    animation: float3d_HeroDistant2 calc(var(--float-dur, 12s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

.bill-hero-distant-3 {
    bottom: 28%;
    right: 22%;
    width: 270px;
    opacity: 0.6;
    filter: blur(2px);
    transform: rotateX(10deg) rotateY(25deg) rotateZ(-12deg) scale(0.78);
    animation: float3d_HeroDistant3 calc(var(--float-dur, 9.5s)) ease-in-out infinite calc(var(--float-delay, 0s));
}

/* Glow Aura for primary bill */
.bill-glow-aura {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: pulseAura 4s ease-in-out infinite;
}

@keyframes pulseAura {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ------------------------------------------------------------
   3D FLOATING KEYFRAME ANIMATIONS (Smooth, Natural, Subtle)
   ------------------------------------------------------------ */
@keyframes float3d_BehindTop {
    0%, 100% { transform: rotateX(25deg) rotateY(-18deg) rotateZ(-22deg) translateY(0px) translateX(0px) scale(0.85); }
    50% { transform: rotateX(28deg) rotateY(-14deg) rotateZ(-20deg) translateY(-14px) translateX(6px) scale(0.87); }
}

@keyframes float3d_BehindMid {
    0%, 100% { transform: rotateX(-15deg) rotateY(22deg) rotateZ(16deg) translateY(0px) translateX(0px) scale(0.9); }
    50% { transform: rotateX(-18deg) rotateY(26deg) rotateZ(18deg) translateY(-16px) translateX(-8px) scale(0.92); }
}

@keyframes float3d_BehindBot {
    0%, 100% { transform: rotateX(30deg) rotateY(-12deg) rotateZ(-14deg) translateY(0px) translateX(0px) scale(0.75); }
    50% { transform: rotateX(26deg) rotateY(-8deg) rotateZ(-12deg) translateY(-12px) translateX(5px) scale(0.77); }
}

@keyframes float3d_BehindFar {
    0%, 100% { transform: rotateX(-20deg) rotateY(-25deg) rotateZ(35deg) translateY(0px) scale(0.6); }
    50% { transform: rotateX(-16deg) rotateY(-20deg) rotateZ(38deg) translateY(-18px) scale(0.62); }
}

@keyframes float3d_HeroPrimary {
    0%, 100% { transform: perspective(1000px) rotateX(24deg) rotateY(-26deg) rotateZ(14deg) translateZ(80px) translateY(0px) scale(1.12); }
    50% { transform: perspective(1000px) rotateX(20deg) rotateY(-22deg) rotateZ(16deg) translateZ(100px) translateY(-18px) scale(1.15); }
}

@keyframes float3d_HeroSecondary {
    0%, 100% { transform: perspective(1000px) rotateX(-18deg) rotateY(34deg) rotateZ(-20deg) translateZ(30px) translateY(0px) scale(0.92); }
    50% { transform: perspective(1000px) rotateX(-22deg) rotateY(38deg) rotateZ(-18deg) translateZ(45px) translateY(-15px) scale(0.95); }
}

@keyframes float3d_HeroForeground {
    0%, 100% { transform: perspective(900px) rotateX(32deg) rotateY(-14deg) rotateZ(6deg) translateZ(140px) translateY(0px) scale(1.25); }
    50% { transform: perspective(900px) rotateX(28deg) rotateY(-10deg) rotateZ(8deg) translateZ(160px) translateY(-22px) scale(1.28); }
}

@keyframes float3d_HeroDistant1 {
    0%, 100% { transform: rotateX(15deg) rotateY(40deg) rotateZ(-38deg) translateY(0px) scale(0.65); }
    50% { transform: rotateX(18deg) rotateY(44deg) rotateZ(-35deg) translateY(-12px) scale(0.67); }
}

@keyframes float3d_HeroDistant2 {
    0%, 100% { transform: rotateX(-30deg) rotateY(-20deg) rotateZ(28deg) translateY(0px) scale(0.68); }
    50% { transform: rotateX(-26deg) rotateY(-16deg) rotateZ(31deg) translateY(-14px) scale(0.7); }
}

@keyframes float3d_HeroDistant3 {
    0%, 100% { transform: rotateX(10deg) rotateY(25deg) rotateZ(-12deg) translateY(0px) scale(0.78); }
    50% { transform: rotateX(14deg) rotateY(28deg) rotateZ(-10deg) translateY(-15px) scale(0.8); }
}

/* Text Content Polish */
.hero-text-col {
    flex: 0 0 52%;
    max-width: 600px;
    z-index: 5;
    position: relative;
}

.hero-title {
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 25px rgba(0, 5, 20, 0.95), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: 16.5px;
    color: rgba(220, 235, 255, 0.92);
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 520px;
    text-shadow: 0 2px 12px rgba(0, 5, 20, 0.9);
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 5, 20, 0.9);
}

.hero-trust-text {
    font-size: 13.5px;
    color: #38bdf8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.trust-link-text {
    color: #00e5ff;
    letter-spacing: 0.02em;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 991px) {
    .landing-hero {
        flex-direction: column;
        padding: 56px 32px 48px;
        gap: 32px;
        min-height: auto;
        overflow: hidden;
    }
    .hero-text-col {
        flex: 1 1 100%;
        max-width: 100%;
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        z-index: 10;
    }
    .hero-features {
        max-width: 460px;
        margin: 0 auto 24px auto;
        text-align: left;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-trust-text {
        justify-content: center;
    }
    .hero-3d-anchor {
        display: none;
    }
}

/* ============================================================
   MOBILE-FIRST RESPONSIVE MONEY POSITIONING (< 768px)
   ============================================================ */
@media (max-width: 768px) {
    .landing-hero {
        padding: 48px 20px 40px;
        overflow: hidden;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .hero-3d-money-stage {
        overflow: hidden;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    /* Clear central text backdrop by hiding central/heavy overlapping bills */
    .bill-behind-text-mid,
    .bill-hero-secondary,
    .bill-hero-foreground,
    .bill-hero-distant-1,
    .bill-hero-distant-2,
    .bill-behind-text-far {
        display: none !important;
    }

    /* Outer Edge Floating Bills (Framing the hero around corners) */
    .bill-behind-text-top {
        top: 2%;
        left: -30px;
        width: 145px;
        opacity: 0.35;
        filter: blur(1.5px) drop-shadow(0 8px 16px rgba(0, 10, 30, 0.8));
        transform: rotate(-22deg) scale(0.85);
        animation: floatMobile_TL 6s ease-in-out infinite;
        display: block !important;
    }

    .bill-hero-primary {
        top: 3%;
        right: -25px;
        width: 155px;
        opacity: 0.4;
        filter: blur(1px) drop-shadow(0 10px 20px rgba(0, 15, 35, 0.85));
        transform: rotate(18deg) scale(0.9);
        animation: floatMobile_TR 6.5s ease-in-out infinite;
        display: block !important;
    }

    .bill-behind-text-bot {
        bottom: 3%;
        left: -25px;
        width: 135px;
        opacity: 0.3;
        filter: blur(2px) drop-shadow(0 8px 16px rgba(0, 10, 30, 0.8));
        transform: rotate(15deg) scale(0.8);
        animation: floatMobile_BL 7s ease-in-out infinite;
        display: block !important;
    }

    .bill-hero-distant-3 {
        bottom: 4%;
        right: -20px;
        width: 140px;
        opacity: 0.32;
        filter: blur(1.8px) drop-shadow(0 8px 16px rgba(0, 10, 30, 0.8));
        transform: rotate(-14deg) scale(0.8);
        animation: floatMobile_BR 7.5s ease-in-out infinite;
        display: block !important;
    }

    /* Foreground Text Content Integrity */
    .hero-text-col {
        z-index: 10;
        position: relative;
    }

    .hero-title {
        font-size: clamp(28px, 6.8vw, 38px);
        line-height: 1.18;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 22px;
        max-width: 100%;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 320px;
        margin: 0 auto 20px auto;
    }

    .hero-feature-item {
        font-size: 13.5px;
    }

    .hero-trust-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .landing-hero {
        padding: 40px 16px 32px;
    }

    .bill-behind-text-top {
        width: 120px;
        left: -25px;
        top: 1%;
        opacity: 0.3;
    }

    .bill-hero-primary {
        width: 125px;
        right: -20px;
        top: 2%;
        opacity: 0.35;
    }

    .bill-behind-text-bot {
        width: 115px;
        left: -20px;
        bottom: 2%;
        opacity: 0.25;
    }

    .bill-hero-distant-3 {
        width: 120px;
        right: -15px;
        bottom: 2%;
        opacity: 0.28;
    }

    .hero-title {
        font-size: 27px;
    }
}

/* Smooth Floating Animations for Mobile Outer Edge Bills */
@keyframes floatMobile_TL {
    0%, 100% { transform: rotate(-22deg) translateY(0px) scale(0.85); }
    50% { transform: rotate(-20deg) translateY(-8px) scale(0.87); }
}

@keyframes floatMobile_TR {
    0%, 100% { transform: rotate(18deg) translateY(0px) scale(0.9); }
    50% { transform: rotate(20deg) translateY(-10px) scale(0.92); }
}

@keyframes floatMobile_BL {
    0%, 100% { transform: rotate(15deg) translateY(0px) scale(0.8); }
    50% { transform: rotate(12deg) translateY(-8px) scale(0.82); }
}

@keyframes floatMobile_BR {
    0%, 100% { transform: rotate(-14deg) translateY(0px) scale(0.8); }
    50% { transform: rotate(-12deg) translateY(-9px) scale(0.82); }
}


/* ==================================================
   DASHBOARD OVERVIEW CARDS — PROFESSIONAL LIGHT MODE
   ================================================== */
#view-dashboard .dash-metric-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 22px 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#view-dashboard .dash-metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}
#view-dashboard .metric-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #475569 !important;
}
#view-dashboard .metric-icon.green { background: #dcfce7 !important; color: #059669 !important; }
#view-dashboard .metric-icon.blue { background: #dbeafe !important; color: #2563eb !important; }
#view-dashboard .metric-icon.purple { background: #f3e8ff !important; color: #7c3aed !important; }

#view-dashboard .metric-value {
    font-size: 26px !important;
    font-weight: 800 !important;
    font-family: 'JetBrains Mono', monospace, sans-serif !important;
    color: #0f172a !important;
    margin: 0 !important;
}
#view-dashboard .metric-value.positive { color: #059669 !important; }
#view-dashboard .metric-value.negative { color: #dc2626 !important; }
#view-dashboard .metric-subtext {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #475569 !important;
}

/* 2. PRIVATE PERSONAL RISK TARGET CARD - LIGHT MODE */
#view-dashboard .dash-risk-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
#view-dashboard .risk-card-header {
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 16px !important;
}
#view-dashboard .risk-shield-icon {
    background: #dcfce7 !important;
    border: 1px solid #a7f3d0 !important;
    color: #059669 !important;
}
#view-dashboard .risk-card-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
#view-dashboard .risk-card-subtitle {
    font-size: 12px !important;
    color: #475569 !important;
}
#view-dashboard .risk-status-pill {
    background: #dcfce7 !important;
    border: 1px solid #a7f3d0 !important;
    color: #059669 !important;
    font-weight: 700 !important;
}
#view-dashboard .risk-progress-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    gap: 10px;
}
#view-dashboard .progress-title {
    color: #0f172a !important;
    font-weight: 700 !important;
}
#view-dashboard .progress-fraction {
    color: #334155 !important;
    font-weight: 700 !important;
}
#view-dashboard .progress-bar-track {
    background: #e2e8f0 !important;
}
#view-dashboard .progress-footer-row {
    color: #475569 !important;
}
#view-dashboard .progress-pct {
    color: #475569 !important;
    font-weight: 600 !important;
}
#view-dashboard .progress-status {
    color: #059669 !important;
    font-weight: 700 !important;
}

/* 4. CONFIGURATION INPUTS - LIGHT MODE */
#view-dashboard .risk-config-panel {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 18px !important;
}
#view-dashboard .config-header .config-title {
    color: #334155 !important;
    font-weight: 700 !important;
}
#view-dashboard .config-input-group label {
    color: #0f172a !important;
    font-weight: 600 !important;
}
#view-dashboard .config-input-wrapper {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
}
#view-dashboard .config-input-wrapper:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}
#view-dashboard .currency-prefix {
    color: #475569 !important;
}
#view-dashboard .config-input-wrapper input {
    color: #0f172a !important;
}
#view-dashboard .btn-save-limits {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    transition: background 0.2s ease;
}
#view-dashboard .btn-save-limits:hover {
    background: #0369a1 !important;
}
#view-dashboard .config-security-note {
    color: #475569 !important;
    font-size: 12px !important;
}
#view-dashboard .config-security-note code {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

/* ==================================================
   DCIRCLE MARKET — ENHANCEMENTS & MOBILE RESPONSIVENESS
   ================================================== */
.dc-price-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dc-price-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
.dc-price-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.dc-market-selector-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
@media (max-width: 768px) {
    .dc-market-selector-wrapper {
        align-items: stretch;
        width: 100%;
    }
    .dc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}
.dc-market-pills-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dc-cat-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dc-cat-btn.active, .dc-cat-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.dc-market-dropdown-box {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.dc-market-select-input {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}
.dc-market-select-input optgroup {
    background: #0f172a;
    color: #94a3b8;
    font-weight: 700;
}
.dc-market-select-input option {
    background: #1e293b;
    color: #ffffff;
}
.dc-speed-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.dc-speed-badge.std {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Quick Market Pills Bar */
.dc-quick-markets-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.dc-quick-label {
    font-size: 11px;
    font-weight: 800;
    color: #cbd5e1;
    white-space: nowrap;
    letter-spacing: 0.05em;
}
.dc-quick-pills-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.dc-quick-pills-scroll::-webkit-scrollbar { display: none; }
.dc-quick-pill {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dc-quick-pill:hover, .dc-quick-pill.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}
.dc-quick-divider {
    width: 1px;
    height: 18px;
    background: #334155;
    margin: 0 4px;
}

/* Responsive DCircle Phone Styles */
@media (max-width: 600px) {
    .dc-digit-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 10px 6px !important;
        display: grid !important;
        justify-items: center;
    }
    .dc-digit-circle {
        width: 54px !important;
        height: 54px !important;
        max-width: 54px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        margin: 0 auto;
    }
    .dc-digit-num { font-size: 16px !important; }
    .dc-digit-pct { font-size: 10px !important; }
    .dc-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .dc-stat-box { min-width: 0 !important; }
    .dc-digit-selector {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
    }
    .dc-select-btn {
        width: 100% !important;
        min-height: 40px !important;
    }
}


/* ==================================================
   HIDE FIXED BOTTOM RUN BARS & WHITE LINES ON LANDING/LOGIN
   ================================================== */
#view-landing .bb-footer-control,
#view-landing .sb-bottom-nav,
#view-landing .sb-run-bar,
#view-landing .dbb-footer-control-bar,
.landing-view .bb-footer-control,
.landing-view .sb-bottom-nav,
.landing-view .sb-run-bar,
.landing-view .dbb-footer-control-bar,
body:has(#view-landing.active) .bb-footer-control,
body:has(#view-landing.active) .sb-bottom-nav,
body:has(#view-landing.active) .sb-run-bar,
body:has(#view-landing.active) .dbb-footer-control-bar {
    display: none !important;
}

/* Ensure fixed run bars and bottom navs ONLY show when their specific panel is active */
.view-panel:not(.active) .bb-footer-control,
.view-panel:not(.active) .sb-bottom-nav,
.view-panel:not(.active) .sb-run-bar,
.view-panel:not(.active) .dbb-footer-control-bar {
    display: none !important;
}

/* ==================================================
   UTILITY COLOR, BADGE & ANIMATION CLASSES
   ================================================== */
.text-emerald-400 { color: #34d399 !important; }
.text-rose-400 { color: #fb7185 !important; }
.text-purple-400 { color: #c084fc !important; }
.text-green-400 { color: #4ade80 !important; }
.text-blue-400 { color: #60a5fa !important; }
.text-amber-400 { color: #fbbf24 !important; }
.text-cyan-400 { color: #22d3ee !important; }
.text-teal-400 { color: #2dd4bf !important; }
.text-gray-500 { color: #64748b !important; }
.text-purple { color: #a855f7 !important; }
.text-orange { color: #f97316 !important; }
.text-accent { color: #38bdf8 !important; }
.bg-rose-950 { background-color: rgba(76, 5, 25, 0.4) !important; }
.border-rose-500 { border-color: #f43f5e !important; }
.ml-2 { margin-left: 0.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}
.live-text {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==================================================
   DERIV BOT BUILDER SUB-TABS (WORKSPACE vs GALLERY)
   ================================================== */
.dbb-sub-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #0b1120;
    border-bottom: 1px solid #1e293b;
}
.dbb-sub-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.dbb-sub-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}
.dbb-sub-tab-btn.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

/* =====================================================================
   STAGE 5.7 — GLOBAL UPGRADE A (ACCOUNT SELECTOR) & UPGRADE B (KES/USD)
   ===================================================================== */
.global-currency-selector-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
    padding: 3px 8px 3px 4px;
    font-size: 11px;
}

.currency-pill-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-pill-btn.mini {
    padding: 3px 8px;
    font-size: 10.5px;
}

.currency-pill-btn.active {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.currency-rate-badge {
    color: #7dd3fc;
    font-size: 10.5px;
    font-weight: 600;
    padding-left: 4px;
    white-space: nowrap;
}

.sb-currency-mini-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 999px;
    padding: 2px;
}

.global-account-selector-wrap {
    position: relative;
}

.global-account-selector-wrap .flag-balance {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: all 0.2s ease;
}

.global-account-selector-wrap .flag-balance:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(30, 41, 59, 0.92);
}

.header-account-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-account-top-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-mode-pill {
    font-size: 9.5px;
    font-weight: 800;
    padding: 1.5px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-mode-pill.demo {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.account-mode-pill.real {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.account-mode-pill.disconnected {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.account-id-label {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

.account-caret {
    font-size: 10px;
    color: #94a3b8;
}

.header-account-bal-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.balance-display-sub,
.sb-acc-display-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: #38bdf8;
}

.global-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    z-index: 9500;
    overflow: hidden;
}

.gad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
}

.gad-sub {
    font-size: 10.5px;
    color: #38bdf8;
    font-weight: 600;
}

.gad-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gad-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.18s ease;
}

.gad-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.gad-item.active {
    background: rgba(37, 99, 235, 0.18);
    border-color: #3b82f6;
}

.gad-item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gad-item-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gad-item-sub {
    font-size: 11px;
    color: #94a3b8;
}

.gad-item-right {
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
}

.gad-footer {
    padding: 8px 10px;
    background: #0b1120;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gad-connect-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(2, 132, 199, 0.18);
    color: #38bdf8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.gad-connect-btn:hover {
    background: rgba(2, 132, 199, 0.32);
    color: #fff;
}

.strat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 8px;
    gap: 12px;
}

.strat-list-meta h4 {
    margin: 0 0 3px 0;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.strat-list-meta p {
    margin: 0;
    font-size: 11.5px;
    color: #94a3b8;
}

.strat-list-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.strat-btn-load {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.strat-btn-delete {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 767px) {
    .currency-rate-badge {
        display: none;
    }
    .global-account-dropdown {
        right: -40px;
        width: 280px;
    }
}

/* =========================================================================
   STAGE 5.7.12: PROFESSIONAL LOGIN INITIALIZATION EXPERIENCE (UPGRADE C)
   ========================================================================= */
.workspace-init-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(circle at 50% 15%, rgba(14, 165, 233, 0.16) 0%, rgba(6, 13, 31, 0.97) 60%, #040917 100%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.35s ease;
    box-sizing: border-box;
}

.workspace-init-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.workspace-init-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.workspace-init-glow-1 {
    width: 340px;
    height: 340px;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(56, 189, 248, 0.18);
}

.workspace-init-glow-2 {
    width: 280px;
    height: 280px;
    bottom: -70px;
    right: 10%;
    background: rgba(37, 99, 235, 0.16);
}

.workspace-init-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(9, 16, 32, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.78),
        0 0 36px rgba(14, 165, 233, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-sizing: border-box;
    overflow: hidden;
}

.workspace-init-header {
    text-align: left;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.workspace-init-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.workspace-init-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
    flex-shrink: 0;
}

.workspace-init-brand-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.workspace-init-brand-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #f8fafc;
}

.workspace-init-brand-sub {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 600;
}

.workspace-init-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.workspace-init-subtitle {
    margin: 0;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.4;
}

.workspace-init-progress-section {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.workspace-init-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.workspace-init-current-task {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-init-progress-pct {
    font-size: 13px;
    font-weight: 800;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.workspace-init-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.workspace-init-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #2563eb 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.65);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: initProgressGlow 2.2s linear infinite;
}

@keyframes initProgressGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.workspace-init-steps {
    list-style: none;
    margin: 0;
    padding: 0 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.workspace-init-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.workspace-init-step[data-status="LOADING"] {
    background: rgba(2, 132, 199, 0.14);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.12);
}

.workspace-init-step[data-status="COMPLETED"] {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.28);
}

.workspace-init-step[data-status="SKIPPED"] {
    background: rgba(100, 116, 139, 0.1);
    border-color: rgba(148, 163, 184, 0.22);
}

.workspace-init-step[data-status="FAILED"] {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.38);
}

.init-step-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
}

.workspace-init-step[data-status="LOADING"] .init-step-icon-wrap {
    color: #38bdf8;
}

.workspace-init-step[data-status="COMPLETED"] .init-step-icon-wrap {
    color: #34d399;
}

.workspace-init-step[data-status="SKIPPED"] .init-step-icon-wrap {
    color: #94a3b8;
}

.workspace-init-step[data-status="FAILED"] .init-step-icon-wrap {
    color: #fb7185;
}

.init-step-body {
    flex: 1 1 auto;
    min-width: 0;
}

.init-step-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
}

.init-step-detail {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.init-step-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.init-step-badge.pending {
    background: rgba(51, 65, 85, 0.65);
    color: #94a3b8;
}

.init-step-badge.loading {
    background: rgba(2, 132, 199, 0.28);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.45);
}

.init-step-badge.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.init-step-badge.skipped {
    background: rgba(100, 116, 139, 0.25);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.init-step-badge.failed {
    background: rgba(244, 63, 94, 0.22);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.42);
}

.workspace-init-alert {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12px;
    line-height: 1.4;
    background: rgba(2, 132, 199, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
    flex-shrink: 0;
}

.workspace-init-alert.warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.42);
    color: #fde68a;
}

.workspace-init-alert.error {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(244, 63, 94, 0.48);
    color: #fecdd3;
}

.workspace-init-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.workspace-init-alert-text {
    flex: 1 1 auto;
    min-width: 0;
}

.workspace-init-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.workspace-init-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.workspace-init-btn.primary {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.workspace-init-btn.primary:hover {
    filter: brightness(1.1);
}

.workspace-init-btn.secondary {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.workspace-init-btn.secondary:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #ffffff;
}

.workspace-init-btn.danger {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.45);
    color: #fda4af;
}

.workspace-init-btn.danger:hover {
    background: rgba(244, 63, 94, 0.35);
    color: #ffffff;
}

@media (max-width: 767px) {
    .workspace-init-overlay {
        padding: 10px;
    }
    .workspace-init-card {
        padding: 16px 14px;
        max-height: calc(100dvh - 20px);
        border-radius: 14px;
    }
    .workspace-init-title {
        font-size: 17px;
    }
    .workspace-init-subtitle {
        font-size: 11.5px;
    }
    .workspace-init-step {
        padding: 7px 9px;
        gap: 8px;
    }
    .init-step-label {
        font-size: 11.5px;
    }
    .init-step-detail {
        font-size: 10.5px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .init-step-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    .workspace-init-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .workspace-init-btn {
        width: 100%;
    }
}




