:root {
    --neon-green: #0ecb81;
    /* Dashboard Quantum Green */
    --neon-cyan: #00f2ff;
    --neon-yellow: #ffff00;
    --neon-glow: 0 0 10px rgba(14, 203, 129, 0.4);
    --section-bg: #09171A;
    /* Dashboard Quantum BG */
    --card-bg: #10141d;
    /* Dashboard Quantum Card */
    --border-color: rgba(255, 255, 255, 0.08);
    /* Dashboard Border */
}

.vibrant-quantum {
    background-color: #09171A !important;
    /* Dashboard Quantum BG */
    background-image: none !important;
    min-height: 100vh;
    color: #eaecef;
    /* Dashboard Text */
}

.spot-trading-main {
    padding-bottom: 0;
}

/* Card / Component Styling */
/* Card / Component Styling */
.trading-sidebar,
.trading-bottom__tab,
.order-book,
.market-history,
.trading-chart,
.trading-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

/* =========================================
   Flexbox "Stretch" Layout System
   ========================================= */

/* 1. Root Component Containers - Force them to fill the grid column */
.trading-left,
/* Order Book Root */
.trading-right,
/* Markets Root */
.trading-right__bottom

/* History Root */
    {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: none !important;
    min-height: 0;
    /* Important for nested flex scroll */
}

/* 2. Middle Layers - Propagate the height down */
.trading-left .tab-content,
.trading-right .tab-content,
.trading-right__bottom .tab-content,
.trading-left .tab-pane,
.trading-right .tab-pane,
.trading-right__bottom .tab-pane,
.market-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* 3. Specific Order Book Internal Wrappers */
.trading-left__buy,
.trading-left__bottom {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* 4. The Scrollable Content Areas */
.sell-side-order-list,
.buy-side-order-list,
.pair-list,
.trade-history {
    flex: 1 1 auto;
    overflow-y: auto;
    /* The actual scrollbar */
    min-height: 0;
}

/* Fix for sidebar Markets having a top section that shouldn't grow */
.trading-right__top {
    flex: 0 0 auto;
}

/* Fix for Order Book header being fixed height */
.trading-left__top,
.trading-left__header,
.trading-market__header {
    flex: 0 0 auto;
}

/* Ensure no double borders or margins breaking layout */
.trading-left,
.trading-right,
.trading-right__bottom {
    margin-bottom: 10px;
    /* Keep gap between stacked cards if any */
}

/* Remove margin from the last item in a flex column so it sits flush */
.col-xl-3.d-flex.flex-column>div:last-child {
    margin-bottom: 0;
}

/* Specifically target the My Orders table wrapper often used in components */
.my-order-list-box {
    max-height: 500px;
    overflow-y: auto;
}

.trading-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.trading-header__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.text--base {
    color: var(--neon-cyan) !important;
}

/* Table Styling */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: #9ca3af;
}

.table td,
.table th {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    white-space: nowrap;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
}

.empty-state__icon i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

/* Buttons */
.btn--base {
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    color: #000;
    border: none;
    font-weight: 600;
    box-shadow: var(--neon-glow);
}

.btn--base:hover {
    filter: brightness(1.1);
    color: #000;
}

/* Form Controls */
.form--control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 4px;
}

.form--control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.1);
}

/* =========================================
   Slider Visibility Improvements (Reinforced)
   ========================================= */

/* The Slider Track (Background Line) */
.buy-amount-slider.ui-slider-horizontal,
.sell-amount-slider.ui-slider-horizontal,
.ui-slider-horizontal {
    height: 8px !important;
    background: #2d3542 !important;
    /* Solid dark gray instead of faint opacity */
    border: 1px solid #4a5568 !important;
    /* Visible border */
    border-radius: 4px !important;
    margin-bottom: 20px !important;
}

/* The Filled Part (Progress Bar) */
.buy-amount-slider .ui-slider-range,
.sell-amount-slider .ui-slider-range,
.ui-slider .ui-slider-range {
    background: #00f2ff !important;
    /* Hardcoded neon cyan */
    background: var(--neon-cyan) !important;
    border-radius: 4px !important;
}

/* The Handle (Knob) */
.buy-amount-slider .ui-slider-handle,
.sell-amount-slider .ui-slider-handle,
.ui-slider .ui-slider-handle {
    width: 18px !important;
    height: 18px !important;
    background: #ffffff !important;
    border: 3px solid #00f2ff !important;
    border-color: var(--neon-cyan) !important;
    border-radius: 50% !important;
    top: -6px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.5) !important;
    z-index: 10 !important;
}

.ui-slider .ui-slider-handle:hover,
.ui-slider .ui-slider-handle:focus {
    background: #00f2ff !important;
    background: var(--neon-cyan) !important;
    border-color: #ffffff !important;
    transform: scale(1.1);
}

/* The Range Steps (0%, 25%, etc) */
.buy-amount-range,
.sell-amount-range {
    display: flex;
    justify-content: space-between;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
    position: relative;
    padding: 0 5px;
}

/* Line connecting the percentage dots (Optional visual aid) */
.buy-amount-range::after,
.sell-amount-range::after {
    content: '';
    position: absolute;
    top: 15px;
    /* Aligned with dots */
    left: 10px;
    right: 10px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.range-list__number {
    font-size: 11px !important;
    color: #889096 !important;
    cursor: pointer;
    position: relative;
    padding-top: 12px !important;
    transition: all 0.3s;
}

.range-list__number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px !important;
    height: 8px !important;
    background: #2b3139 !important;
    border-radius: 50%;
    border: 1px solid #889096 !important;
    transition: all 0.3s;
}

.range-list__number:hover {
    color: var(--neon-cyan) !important;
}

.range-list__number:hover::before {
    background: var(--neon-cyan) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 8px var(--neon-cyan) !important;
}