/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #07090e;
    --bg-secondary: rgba(15, 22, 36, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --profit: #10b981;
    --profit-glow: rgba(16, 185, 129, 0.12);
    --loss: #f43f5e;
    --loss-glow: rgba(244, 63, 94, 0.12);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.25;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vh;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

/* Typography Utilities */
.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.accent-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Container */
.dashboard-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Glassmorphism Panel style */
.glass-panel {
    background: var(--bg-secondary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--profit);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--profit);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.connection-status {
    font-size: 14px;
}

.status-label {
    color: var(--text-muted);
}

.status-value {
    color: var(--text-main);
    font-weight: 600;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* Auto-Refresh Indicator */
.auto-refresh-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.refresh-label {
    color: var(--text-muted);
}

.refresh-value {
    font-weight: 600;
    color: var(--accent);
}

.progress-bar-container {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background-color: var(--accent);
    transition: width 1s linear;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.metric-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.metric-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.metric-value {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.metric-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.metric-change {
    font-size: 16px;
    font-weight: 600;
}

/* Up/Down styling */
.up-state {
    color: var(--profit) !important;
}

.metric-card.up-state {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--profit-glow) 100%);
}

.down-state {
    color: var(--loss) !important;
}

.metric-card.down-state {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--loss-glow) 100%);
}

/* Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Chart & Trade History Section */
.chart-history-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 1200px) {
    .chart-history-section {
        grid-template-columns: 1fr; /* Make them stack */
    }
}

.chart-container, .history-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    overflow: hidden;
}

.tradingview-widget-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: none;
    overflow-y: visible;
    padding-right: 8px;
}

/* Custom scrollbar for history */
.history-timeline::-webkit-scrollbar {
    width: 6px;
}
.history-timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.history-timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.trade-history-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.trade-history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.trade-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.trade-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-symbol {
    font-weight: 600;
    font-size: 15px;
}

.trade-direction {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trade-direction.bullish { color: #60a5fa; }
.trade-direction.bearish { color: #f472b6; }
.trade-direction.neutral { color: #a78bfa; }

.trade-pnl {
    font-size: 16px;
    font-weight: 700;
    text-align: right;
}

.trade-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

@media (min-width: 1200px) {
    .workspace-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.positions-panel, .orders-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.badge {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Table Design */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.dashboard-table th {
    color: var(--text-muted);
    font-weight: 400;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-weight: 400;
}

.dashboard-table tbody tr {
    transition: background-color 0.2s ease;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.filled {
    background: rgba(16, 185, 129, 0.1);
    color: var(--profit);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.open, .status-badge.pending {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.rejected, .status-badge.canceled {
    background: rgba(244, 63, 94, 0.1);
    color: var(--loss);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Qty pill styles */
.qty-badge {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.qty-badge.short {
    background: rgba(244, 63, 94, 0.1);
    color: var(--loss);
}

.qty-badge.long {
    background: rgba(16, 185, 129, 0.1);
    color: var(--profit);
}

/* Mobile Responsive Adjustments */
/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 12px;
        gap: 16px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        text-align: center;
        padding: 16px;
    }

    .logo-area {
        justify-content: center;
    }

    .connection-status {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .auto-refresh-control {
        justify-content: center;
        margin: 0 auto;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-value {
        font-size: 26px;
    }

    .positions-panel, .orders-panel {
        padding: 16px !important;
        gap: 12px;
    }

    .panel-header h2 {
        font-size: 16px;
    }

    .dashboard-table td, .dashboard-table th {
        padding: 12px;
        font-size: 13px;
    }

    /* Hide non-profit elements by default on mobile */
    .metrics-grid .metric-card:nth-child(1),
    .metrics-grid .metric-card:nth-child(3),
    .orders-panel {
        display: none !important;
    }

    /* Show them when container has .show-all */
    .show-all .metrics-grid .metric-card:nth-child(1),
    .show-all .metrics-grid .metric-card:nth-child(3) {
        display: flex !important;
    }
    
    .show-all .orders-panel {
        display: flex !important;
    }

    .more-btn {
        display: block !important;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    /* Tree Grid Column adjustments for mobile */
    .positions-header-row, .tree-row {
        padding: 10px 8px !important;
    }
    
    .col-symbol {
        min-width: 110px !important;
        flex: 1.5 !important;
        font-size: 12px;
        gap: 4px !important;
    }
    .col-qty {
        width: 50px !important;
        font-size: 11px;
    }
    .col-pnl {
        width: 80px !important;
        font-size: 11px;
    }
    .col-action {
        width: 70px !important;
        font-size: 11px;
    }
    .col-price, .col-value, .col-cost {
        display: none !important;
    }

    /* Chart Container adjustments for mobile */
    .chart-container, .history-container {
        padding: 12px !important;
    }
    
    .glass-panel {
        padding: 16px !important;
    }

    .tradingview-widget-container {
        height: 300px !important;
    }

    /* Prediction Card stacking on mobile */
    .prediction-card {
        padding: 16px !important;
    }
    .prediction-card > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .prediction-content {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row !important;
        gap: 12px !important;
    }
    #xgb-probabilities {
        justify-content: flex-start;
        gap: 6px !important;
    }
    #prediction-confidence {
        align-self: flex-start;
    }
}

/* AI Prediction Card */
.prediction-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.05);
    border-radius: 16px;
    margin-bottom: 8px;
}

.prediction-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prediction-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.prediction-text-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prediction-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1.5px;
}

.prediction-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.prediction-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.probability-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.probability-pill.chop {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.2);
}
.probability-pill.bull {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}
.probability-pill.bear {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

@media (max-width: 768px) {
    .prediction-divider {
        display: none !important;
    }
}

/* More Button Style */
.more-btn {
    display: none;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.more-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}
/* Tree Grid Layout for Positions */
.tree-container {
    width: 100%;
    overflow-x: auto;
}
.positions-header-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tree-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.01);
}
.tree-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Tree Nodes - Level Styles */
.tree-row.level-1 {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.015);
    border-left: 4px solid var(--accent);
}
.tree-row.level-2 {
    font-weight: 500;
    background: rgba(0, 0, 0, 0.12);
    border-left: 4px solid rgba(99, 102, 241, 0.5);
}
.tree-row.level-3 {
    font-weight: 400;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: rgba(0, 0, 0, 0.22);
    border-left: 4px solid rgba(255, 255, 255, 0.1);
}

/* Tree Structure Columns */
.col-symbol {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}
.col-qty { width: 80px; text-align: right; flex-shrink: 0; }
.col-price { width: 100px; text-align: right; flex-shrink: 0; }
.col-value { width: 120px; text-align: right; flex-shrink: 0; }
.col-cost { width: 120px; text-align: right; flex-shrink: 0; }
.col-pnl { width: 130px; text-align: right; flex-shrink: 0; }
.col-action { width: 90px; text-align: center; flex-shrink: 0; }

/* Tree Children Collapsible Container */
.tree-children {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    position: relative;
}
.tree-children.expanded {
    max-height: 500px;
    opacity: 1;
}

/* Indentations and Vertical Connecting Lines */
.tree-children.indent-1 {
    margin-left: 12px;
    border-left: 1px dashed rgba(255, 255, 255, 0.08);
}
.tree-children.indent-2 {
    margin-left: 20px;
    border-left: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Chevron Rotations */
.chevron-icon {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}
.chevron-icon.rotated {
    transform: rotate(90deg);
    color: var(--text-main);
}

/* Close Action Buttons */
.btn-close-group, .btn-close-sm {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}
.btn-close-group {
    padding: 4px 10px;
}
.btn-close-sm {
    padding: 2px 6px;
}
.btn-close-group:hover, .btn-close-sm:hover {
    background: rgba(244, 63, 94, 0.25);
    border-color: #f43f5e;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
    color: #fff;
}

/* Premium Tags */
.strategy-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}
.strategy-badge.ic {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.strategy-badge.spread {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.strategy-badge.single {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Timeline & Accordion Layout for History */
.history-date-section {
    margin-bottom: 12px;
    background: rgba(15, 22, 36, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.history-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}
.history-date-header:hover {
    background: rgba(255, 255, 255, 0.03);
}
.history-date-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-main);
}
.history-date-summary {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.history-trades-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.history-trades-container.expanded {
    max-height: 1000px;
    opacity: 1;
}

/* History Card */
.history-trade-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0;
}
.history-trade-card:last-child {
    border-bottom: none;
}
.history-trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.history-trade-header:hover {
    background: rgba(255, 255, 255, 0.02);
}
.history-trade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.history-trade-title {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.history-trade-meta {
    font-size: 11px;
    color: var(--text-muted);
}
.history-trade-financials {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.history-trade-pnl {
    font-size: 14px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* History Nested Spreads */
.history-spread-item {
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding: 0;
}
.history-spread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 10px 32px;
    cursor: pointer;
    user-select: none;
    background: rgba(0, 0, 0, 0.1);
    font-size: 12px;
    transition: background 0.2s;
    border-left: 2px solid rgba(99, 102, 241, 0.3);
}
.history-spread-header:hover {
    background: rgba(0, 0, 0, 0.16);
}

/* History Legs List */
.history-legs-list {
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 16px 6px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.history-leg-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}
.history-leg-row:last-child {
    border-bottom: none;
}

/* Timeframe & Metric Selectors styling */
.timeframe-selector, .metric-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.timeframe-btn, .metric-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
}

.timeframe-btn:hover, .metric-btn:hover {
    color: var(--text-main);
}

.timeframe-btn.active, .metric-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* History Stats Banner styling */
.history-stats-banner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 15px;
    gap: 16px;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
}

