        /* Exact Vault Theme Styling */
        :root {
            --bg-color: #090a0f;
            --sidebar-bg: #11131c;
            --card-bg: #151824;
            --card-border: rgba(255, 255, 255, 0.07);
            --card-hover-border: rgba(99, 102, 241, 0.4);

            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --text-subdued: #64748b;

            --primary: #6366f1;
            --primary-light: #818cf8;
            --primary-bg: rgba(99, 102, 241, 0.12);
            --primary-border: rgba(99, 102, 241, 0.3);

            --profit: #10b981;
            --profit-light: #34d399;
            --profit-bg: rgba(16, 185, 129, 0.15);
            --profit-border: rgba(16, 185, 129, 0.3);

            --loss: #ef4444;
            --loss-light: #f87171;
            --loss-bg: rgba(239, 68, 68, 0.15);
            --loss-border: rgba(239, 68, 68, 0.3);

            --warning: #f59e0b;
        }

        body.light-mode {
            --bg-color: #f8fafc;
            --sidebar-bg: #ffffff;
            --card-bg: #ffffff;
            --card-border: rgba(0, 0, 0, 0.08);
            --card-hover-border: rgba(99, 102, 241, 0.4);

            --text-main: #0f172a;
            --text-muted: #475569;
            --text-subdued: #64748b;

            --primary: #4f46e5;
            --primary-light: #6366f1;
            --primary-bg: rgba(79, 70, 229, 0.1);
            --primary-border: rgba(79, 70, 229, 0.25);

            --profit: #059669;
            --profit-light: #10b981;
            --profit-bg: rgba(16, 185, 129, 0.1);
            --profit-border: rgba(16, 185, 129, 0.25);

            --loss: #dc2626;
            --loss-light: #ef4444;
            --loss-bg: rgba(239, 68, 68, 0.1);
            --loss-border: rgba(239, 68, 68, 0.25);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            overflow-x: hidden;
        }

        .app-layout {
            display: flex;
            width: 100%;
            min-height: 100vh;
        }

        /* Sidebar Styling */
        .sidebar {
            width: 240px;
            background: var(--sidebar-bg);
            border-right: 1px solid var(--card-border);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 24px 16px;
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            z-index: 100;
        }

        .brand-logo {
            width: 32px;
            height: 32px;
            background: linear-gradient(135deg, var(--primary), #a855f7);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-weight: 800;
            font-size: 1.1rem;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .menu-section-label {
            font-size: 0.65rem;
            font-weight: 700;
            color: var(--text-subdued);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 12px;
            padding: 0 8px;
        }

        .nav-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
            list-style: none;
        }

        .nav-item a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .nav-item a:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.04);
        }

        .nav-item.active a {
            background: var(--primary-bg);
            color: var(--primary-light);
            font-weight: 600;
            border: 1px solid var(--primary-border);
        }

        .sidebar-footer {
            border-top: 1px solid var(--card-border);
            padding-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        /* Main Content Container */
        .main-content {
            margin-left: 240px;
            flex: 1;
            padding: 28px 36px;
            max-width: calc(100vw - 240px);
        }

        /* Top Header Bar */
        .top-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .top-header h2 {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .top-header-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* Sub Tabs Styling */
        .sub-tabs {
            display: flex;
            gap: 6px;
            background: rgba(255, 255, 255, 0.03);
            padding: 4px;
            border-radius: 10px;
            border: 1px solid var(--card-border);
            width: fit-content;
        }

        .sub-tab-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .sub-tab-btn.active {
            background: var(--primary);
            color: #ffffff;
            box-shadow: 0 2px 8px var(--primary-border);
        }

        /* Month Selector Styling */
        .month-selector-wrapper {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            padding: 4px 8px;
        }

        .select-month-picker {
            background: transparent;
            border: none;
            color: var(--text-main);
            font-weight: 700;
            font-size: 0.85rem;
            outline: none;
            cursor: pointer;
            padding: 4px 6px;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            text-align: center;
        }

        .select-month-picker option {
            background: var(--sidebar-bg);
            color: var(--text-main);
        }

        .btn-month-nav {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .btn-month-nav:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.08);
        }

        .badge-status {
            background: var(--profit-bg);
            border: 1px solid var(--profit-border);
            color: var(--profit-light);
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .btn-icon {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-icon:hover {
            color: var(--text-main);
            border-color: var(--primary);
        }

        /* Vault KPI Cards Grid */
        .vault-kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        @media (max-width: 1200px) {
            .vault-kpi-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 640px) {
            .vault-kpi-grid {
                grid-template-columns: 1fr;
            }
        }

        .vault-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: all 0.2s ease;
        }

        .vault-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 14px;
        }

        .vault-card-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
        }

        .vault-card-icon {
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
        }

        .vault-card-value {
            font-size: 1.75rem;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.03em;
            margin-bottom: 8px;
        }

        .vault-card-sub {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .badge-change.pos {
            color: var(--profit-light);
            background: var(--profit-bg);
        }

        .badge-change.neg {
            color: var(--loss-light);
            background: var(--loss-bg);
        }

        .card-progress-bar {
            width: 100%;
            height: 5px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 3px;
            margin-top: 10px;
            overflow: hidden;
        }

        .card-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--profit-light));
            border-radius: 3px;
        }

        /* CALENDAR COMPONENT STYLING */
        .calendar-section-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .calendar-wrapper {
            display: grid;
            grid-template-columns: 1fr 240px;
            gap: 24px;
        }

        @media (max-width: 1024px) {
            .calendar-wrapper {
                grid-template-columns: 1fr;
            }
        }

        .calendar-table-container {
            overflow-x: auto;
        }

        .calendar-grid {
            width: 100%;
            border-collapse: collapse;
            text-align: center;
            font-size: 0.8rem;
        }

        .calendar-grid th {
            padding: 10px;
            color: #ea580c;
            border-bottom: 3px solid #ea580c;
            font-weight: 700;
            font-size: 0.85rem;
        }

        .calendar-grid td {
            width: 12.5%;
            height: 76px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            vertical-align: top;
            padding: 6px;
            position: relative;
            background: rgba(255, 255, 255, 0.015);
        }

        .day-num {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-align: left;
            margin-bottom: 4px;
        }

        .cell-profit {
            background: rgba(16, 185, 129, 0.18) !important;
            border: 1px solid var(--profit-border) !important;
        }

        .cell-loss {
            background: rgba(239, 68, 68, 0.18) !important;
            border: 1px solid var(--loss-border) !important;
        }

        .cell-summary {
            background: rgba(99, 102, 241, 0.08) !important;
            font-weight: 600;
        }

        .trade-cnt-badge {
            font-size: 0.7rem;
            color: var(--text-main);
            margin-bottom: 2px;
        }

        .trade-pnl-val {
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            font-size: 0.75rem;
        }

        .monthly-stats-panel {
            border-left: 1px solid var(--card-border);
            padding-left: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            justify-content: center;
        }

        .monthly-stat-item {
            text-align: center;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
            padding-bottom: 10px;
        }

        .monthly-stat-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .monthly-stat-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-subdued);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 4px;
        }

        .monthly-stat-val {
            font-size: 1.35rem;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
        }

        /* Dual Charts Grid */
        .vault-charts-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 24px;
        }

        @media (max-width: 992px) {
            .vault-charts-grid {
                grid-template-columns: 1fr;
            }
        }

        .chart-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 20px;
        }

        .chart-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .chart-card-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .chart-canvas-wrapper {
            position: relative;
            height: 270px;
            width: 100%;
        }

        .doughnut-center-wrap {
            position: relative;
            height: 190px;
            width: 100%;
            margin-bottom: 16px;
        }

        .legend-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .legend-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
        }

        .legend-left {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
        }

        .legend-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .legend-val {
            font-family: 'JetBrains Mono', monospace;
            font-weight: 600;
            color: var(--text-main);
        }

        .table-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 20px;
        }

        .table-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .btn-pill {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--card-border);
            color: var(--text-muted);
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-pill:hover {
            color: var(--text-main);
            border-color: var(--primary);
        }

        .vault-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.85rem;
        }

        .vault-table th {
            color: var(--text-subdued);
            font-weight: 600;
            padding: 12px 14px;
            border-bottom: 1px solid var(--card-border);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .vault-table td {
            padding: 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            vertical-align: middle;
        }

        .stock-cell {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .stock-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: var(--primary-light);
            font-size: 0.85rem;
        }

        .stock-info {
            display: flex;
            flex-direction: column;
        }

        .stock-sym {
            font-weight: 700;
            color: var(--text-main);
        }

        .stock-sub {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .status-pill.win {
            background: var(--profit-bg);
            color: var(--profit-light);
            border: 1px solid var(--profit-border);
        }

        .status-pill.loss {
            background: var(--loss-bg);
            color: var(--loss-light);
            border: 1px solid var(--loss-border);
        }

        .filter-row {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
        }

        .filter-input {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--card-border);
            border-radius: 8px;
            padding: 8px 12px;
            color: var(--text-main);
            font-size: 0.825rem;
            outline: none;
        }

        .login-overlay {
            position: fixed;
            inset: 0;
            background: rgba(9, 10, 15, 0.9);
            backdrop-filter: blur(20px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .login-card {
            background: var(--sidebar-bg);
            border: 1px solid var(--card-border);
            border-radius: 20px;
            padding: 36px 30px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
            text-align: center;
        }

        .loader-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 50vh;
            gap: 12px;
            color: var(--text-muted);
        }

        .hidden {
            display: none !important;
        }
                @keyframes spin {
                    0% {
                        transform: rotate(0deg);
                    }

                    100% {
                        transform: rotate(360deg);
                    }
                }

/* AI Smart Insights Panel */
.smart-insights-panel {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

body.light-mode .smart-insights-panel {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 15px -2px rgba(99, 102, 241, 0.05);
}

.smart-insights-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}

/* AI Smart Setup & Winrate Insights */
.smart-insights-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

body.light-mode .smart-insights-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.smart-insights-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #10b981, #f59e0b);
}

.smart-insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.smart-insights-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.smart-insights-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.smart-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

body.light-mode .insight-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.insight-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.insight-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.insight-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.insight-tag.opt { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.insight-tag.warn { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.insight-tag.info { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.insight-tag.tip { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.insight-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.insight-card-body {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-subdued);
}

.insight-highlight {
    font-weight: 700;
    color: var(--text-main);
}

.insight-stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.insight-stat {
    font-size: 0.8rem;
    font-weight: 600;
}

.insight-stat.pos { color: #10b981; }
.insight-stat.neg { color: #ef4444; }


/* Master Trading Recap Pillars */
.recap-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.recap-pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

body.light-mode .recap-pillar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.recap-pillar-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.recap-pillar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.recap-pillar-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.recap-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.recap-metric-label {
    color: var(--text-subdued);
}

.recap-metric-val {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
}

.recap-metric-val.pos { color: #10b981; }
.recap-metric-val.neg { color: #ef4444; }

.recap-subtext {
    font-size: 0.75rem;
    color: var(--text-subdued);
    font-style: italic;
    margin-top: 2px;
}
