        /* ===== CSS Variables (Light Theme Default) ===== */
        :root {
            --bd-bg-primary: #f9fafb;
            --bd-bg-secondary: #ffffff;
            --bd-bg-card: #ffffff;
            --bd-bg-card-hover: #f3f4f6;
            --bd-border: #e5e7eb;
            --bd-border-hover: #d1d5db;
            --bd-text-primary: #111827;
            --bd-text-secondary: #4b5563;
            --bd-text-muted: #9ca3af;
            --bd-accent-blue: #3b82f6;
            --bd-accent-cyan: #00c4cc;
            --bd-accent-purple: #8b5cf6;
            --bd-accent-pink: #ec4899;
            --bd-accent-orange: #f59e0b;
            --bd-accent-green: #10b981;
            --bd-glow-blue: rgba(59, 130, 246, 0.1);
            --bd-glow-cyan: rgba(0, 196, 204, 0.1);
            --bd-glow-purple: rgba(139, 92, 246, 0.1);
            --bd-glow-orange: rgba(245, 158, 11, 0.1);
            --bd-banner-bg: linear-gradient(135deg, #f0fdfa 0%, #ffffff 40%, #f5f3ff 100%);
            --bd-banner-border: #e5e7eb;
            --bd-badge-bg: #f3f4f6;
        }

        /* ===== Dark Theme Variables ===== */
        html.dark {
            --bd-bg-primary: #0f1117;
            --bd-bg-secondary: #161928;
            --bd-bg-card: #1a1d2e;
            --bd-bg-card-hover: #1f2340;
            --bd-border: rgba(255,255,255,0.06);
            --bd-border-hover: rgba(255,255,255,0.12);
            --bd-text-primary: #e8eaed;
            --bd-text-secondary: #8b8fa3;
            --bd-text-muted: #5f6377;
            --bd-accent-blue: #3b82f6;
            --bd-accent-cyan: #00c4cc;
            --bd-accent-purple: #8b5cf6;
            --bd-accent-pink: #ec4899;
            --bd-accent-orange: #f59e0b;
            --bd-accent-green: #10b981;
            --bd-glow-blue: rgba(59, 130, 246, 0.15);
            --bd-glow-cyan: rgba(0, 196, 204, 0.15);
            --bd-glow-purple: rgba(139, 92, 246, 0.15);
            --bd-glow-orange: rgba(245, 158, 11, 0.15);
            --bd-banner-bg: linear-gradient(135deg, #1e2547 0%, #1a1d3a 40%, #1e1a35 100%);
            --bd-banner-border: rgba(255,255,255,0.06);
            --bd-badge-bg: rgba(255,255,255,0.05);
        }

        /* Dashboard page title */
        .fi-header-heading {
            color: var(--bd-text-primary) !important;
        }
        .fi-header-subheading {
            color: var(--bd-text-secondary) !important;
        }

        /* ===== Welcome Banner ===== */
        .bd-welcome-banner {
            background: var(--bd-banner-bg);
            border: 1px solid var(--bd-banner-border);
            border-radius: 16px;
            padding: 1.5rem 2rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.75rem;
            position: relative;
            overflow: hidden;
        }
        .bd-welcome-banner::before {
            content: '';
            position: absolute;
            top: -60px;
            right: -60px;
            width: 200px;
            height: 200px;
            background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
            border-radius: 50%;
        }
        .bd-welcome-text h2 {
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--bd-text-primary);
            margin: 0 0 4px 0;
        }
        .bd-welcome-text p {
            font-size: 0.875rem;
            color: var(--bd-text-secondary);
            margin: 0;
        }
        .bd-date-badge {
            background: var(--bd-badge-bg);
            border: 1px solid var(--bd-border);
            border-radius: 10px;
            padding: 8px 16px;
            font-size: 0.8rem;
            color: var(--bd-text-secondary);
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            z-index: 1;
        }
        .bd-date-badge svg {
            width: 16px;
            height: 16px;
            color: var(--bd-accent-blue);
        }

        /* ===== Stat Cards Grid ===== */
        .bd-stat-cards-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1rem;
            margin-bottom: 1.75rem;
        }
        @media (max-width: 1280px) {
            .bd-stat-cards-grid { grid-template-columns: repeat(3, 1fr); }
        }
        @media (max-width: 768px) {
            .bd-stat-cards-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 480px) {
            .bd-stat-cards-grid { grid-template-columns: 1fr; }
        }

        .bd-stat-card {
            background: var(--bd-bg-card);
            border: 1px solid var(--bd-border);
            border-radius: 14px;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .bd-stat-card:hover {
            border-color: var(--bd-border-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(0,0,0,0.3);
        }
        .bd-stat-card::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            border-radius: 0 0 14px 14px;
        }
        .bd-stat-card.blue::after { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
        .bd-stat-card.pink::after { background: linear-gradient(90deg, #ec4899, #f43f5e, #f472b6); }
        .bd-stat-card.purple::after { background: linear-gradient(90deg, #8b5cf6, #a855f7); }
        .bd-stat-card.cyan::after { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
        .bd-stat-card.orange::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
        .bd-stat-card.green::after { background: linear-gradient(90deg, #10b981, #34d399); }

        .bd-stat-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 0.85rem;
        }
        .bd-stat-icon-wrap {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .bd-stat-icon-wrap.blue { background: var(--bd-glow-blue); }
        .bd-stat-icon-wrap.purple { background: var(--bd-glow-purple); }
        .bd-stat-icon-wrap.cyan { background: var(--bd-glow-cyan); }
        .bd-stat-icon-wrap.orange { background: var(--bd-glow-orange); }
        .bd-stat-icon-wrap.green { background: rgba(16, 185, 129, 0.15); }

        .bd-stat-icon-wrap svg {
            width: 20px;
            height: 20px;
        }
        .bd-stat-icon-wrap.blue svg { color: var(--bd-accent-blue); }
        .bd-stat-icon-wrap.purple svg { color: var(--bd-accent-purple); }
        .bd-stat-icon-wrap.cyan svg { color: var(--bd-accent-cyan); }
        .bd-stat-icon-wrap.orange svg { color: var(--bd-accent-orange); }
        .bd-stat-icon-wrap.green svg { color: var(--bd-accent-green); }

        .bd-stat-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--bd-text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .bd-stat-value {
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--bd-text-primary);
            line-height: 1.2;
            margin-bottom: 4px;
        }
        .bd-stat-desc {
            font-size: 0.75rem;
            color: var(--bd-text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .bd-stat-desc .trend-up { color: var(--bd-accent-green); }
        .bd-stat-desc .trend-icon { font-size: 0.7rem; }

        /* ===== Analytics Grid ===== */
        .bd-analytics-grid {
            display: grid;
            grid-template-columns: 3fr 2fr;
            gap: 1.5rem;
            margin-bottom: 1.75rem;
        }
        @media (max-width: 1024px) {
            .bd-analytics-grid { grid-template-columns: 1fr; }
        }

        .bd-chart-card {
            background: var(--bd-bg-card);
            border: 1px solid var(--bd-border);
            border-radius: 16px;
            padding: 1.5rem;
            position: relative;
        }
        .bd-chart-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.25rem;
        }
        .bd-chart-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--bd-text-primary);
        }
        .bd-chart-badge {
            background: var(--bd-badge-bg);
            border: 1px solid var(--bd-border);
            border-radius: 8px;
            padding: 6px 14px;
            font-size: 0.75rem;
            color: var(--bd-text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .bd-chart-container {
            height: 260px;
            position: relative;
        }
        .bd-chart-container canvas {
            width: 100% !important;
            height: 100% !important;
        }

        /* ===== Donut / Revenue Distribution ===== */
        .bd-donut-card {
            background: var(--bd-bg-card);
            border: 1px solid var(--bd-border);
            border-radius: 16px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
        }
        .bd-donut-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--bd-text-primary);
            margin-bottom: 1.5rem;
        }
        .bd-donut-wrapper {
            display: flex;
            align-items: center;
            gap: 2rem;
            flex: 1;
        }
        @media (max-width: 600px) {
            .bd-donut-wrapper { flex-direction: column; }
        }
        .bd-donut-chart-wrap {
            position: relative;
            width: 180px;
            height: 180px;
            flex-shrink: 0;
        }
        .bd-donut-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            z-index: 2;
            pointer-events: none;
        }
        .bd-donut-center-value {
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--bd-text-primary);
        }
        .bd-donut-center-label {
            font-size: 0.65rem;
            color: var(--bd-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .bd-donut-legend {
            flex: 1;
            min-width: 0;
        }
        .bd-legend-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--bd-border);
        }
        .bd-legend-item:last-child { border-bottom: none; }
        .bd-legend-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }
        .bd-legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .bd-legend-name {
            font-size: 0.85rem;
            color: var(--bd-text-secondary);
            white-space: nowrap;
        }
        .bd-legend-right {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .bd-legend-value {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--bd-text-primary);
            white-space: nowrap;
        }
        .bd-legend-pct {
            font-size: 0.7rem;
            color: var(--bd-text-muted);
            white-space: nowrap;
        }
        .bd-legend-arrow {
            color: var(--bd-text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            transition: color 0.2s;
        }
        .bd-legend-arrow:hover { color: var(--bd-accent-blue); }

        /* ===== Encouragement Banner ===== */
        .bd-encourage-banner {
            margin-top: 1.25rem;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
            border: 1px solid rgba(16, 185, 129, 0.12);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .bd-encourage-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(16, 185, 129, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .bd-encourage-icon svg {
            width: 18px;
            height: 18px;
            color: var(--bd-accent-green);
        }
        .bd-encourage-text h4 {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--bd-text-primary);
            margin: 0;
        }
        .bd-encourage-text p {
            font-size: 0.75rem;
            color: var(--bd-text-secondary);
            margin: 2px 0 0 0;
        }

        /* ===== Bottom Grid (Orders + Sidebar) ===== */
        .bd-bottom-grid {
            display: grid;
            grid-template-columns: 3fr 2fr;
            gap: 1.5rem;
        }
        @media (max-width: 1024px) {
            .bd-bottom-grid { grid-template-columns: 1fr; }
        }

        /* ===== Orders Table ===== */
        .bd-orders-card {
            background: var(--bd-bg-card);
            border: 1px solid var(--bd-border);
            border-radius: 16px;
            overflow: hidden;
        }
        .bd-orders-header {
            padding: 1.25rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--bd-border);
        }
        .bd-orders-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--bd-text-primary);
        }
        .bd-view-all {
            font-size: 0.8rem;
            color: var(--bd-accent-blue);
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 4px;
            transition: color 0.2s;
        }
        .bd-view-all:hover { color: #60a5fa; }

        .bd-orders-table {
            width: 100%;
            border-collapse: collapse;
        }
        .bd-orders-table thead th {
            padding: 12px 16px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--bd-text-muted);
            text-align: left;
            border-bottom: 1px solid var(--bd-border);
        }
        .bd-orders-table tbody tr {
            transition: background 0.2s;
            border-bottom: 1px solid var(--bd-border);
        }
        .bd-orders-table tbody tr:hover {
            background: rgba(99, 102, 241, 0.04);
        }
        .bd-orders-table tbody tr:last-child {
            border-bottom: none;
        }
        .bd-orders-table tbody td {
            padding: 14px 16px;
            font-size: 0.85rem;
            color: var(--bd-text-primary);
        }
        .bd-order-number {
            font-weight: 600;
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
            font-size: 0.8rem;
        }
        .bd-order-customer {
            color: var(--bd-text-secondary);
        }
        .bd-order-status {
            display: inline-flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: capitalize;
        }
        .bd-status-pending {
            background: rgba(245, 158, 11, 0.12);
            color: #fbbf24;
        }
        .bd-status-processing {
            background: rgba(59, 130, 246, 0.12);
            color: #60a5fa;
        }
        .bd-status-shipped {
            background: rgba(139, 92, 246, 0.12);
            color: #a78bfa;
        }
        .bd-status-delivered {
            background: rgba(16, 185, 129, 0.12);
            color: #34d399;
        }
        .bd-status-cancelled {
            background: rgba(239, 68, 68, 0.12);
            color: #f87171;
        }
        .bd-status-refunded {
            background: rgba(107, 114, 128, 0.12);
            color: #9ca3af;
        }
        .bd-order-total {
            font-weight: 600;
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
            font-size: 0.8rem;
        }
        .bd-order-date {
            color: var(--bd-text-secondary);
            font-size: 0.8rem;
        }
        .bd-order-action {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid var(--bd-border);
            background: transparent;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
        }
        .bd-order-action svg {
            width: 16px;
            height: 16px;
            color: var(--bd-text-muted);
        }
        .bd-order-action:hover {
            border-color: var(--bd-accent-blue);
            background: var(--bd-glow-blue);
        }
        .bd-order-action:hover svg { color: var(--bd-accent-blue); }

        .bd-empty-orders {
            padding: 3rem 1.5rem;
            text-align: center;
        }
        .bd-empty-orders svg {
            width: 48px;
            height: 48px;
            color: var(--bd-text-muted);
            margin: 0 auto 12px;
        }
        .bd-empty-orders p {
            color: var(--bd-text-secondary);
            font-size: 0.9rem;
        }

        /* ===== Sidebar Cards ===== */
        .bd-sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .bd-sidebar-card {
            background: var(--bd-bg-card);
            border: 1px solid var(--bd-border);
            border-radius: 16px;
            padding: 1.5rem;
        }
        .bd-sidebar-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--bd-text-primary);
            margin-bottom: 1.25rem;
        }

        /* Quick Insights */
        .bd-insight-row {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 0;
            border-bottom: 1px solid var(--bd-border);
        }
        .bd-insight-row:last-child { border-bottom: none; }
        .bd-insight-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .bd-insight-icon svg {
            width: 20px;
            height: 20px;
        }
        .bd-insight-icon.blue { background: var(--bd-glow-blue); }
        .bd-insight-icon.blue svg { color: var(--bd-accent-blue); }
        .bd-insight-icon.purple { background: var(--bd-glow-purple); }
        .bd-insight-icon.purple svg { color: var(--bd-accent-purple); }
        .bd-insight-icon.green { background: rgba(16,185,129,0.12); }
        .bd-insight-icon.green svg { color: var(--bd-accent-green); }
        .bd-insight-info { flex: 1; }
        .bd-insight-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--bd-text-primary);
        }
        .bd-insight-value {
            font-size: 0.75rem;
            color: var(--bd-text-muted);
            margin-top: 2px;
        }
        .bd-insight-value .up { color: var(--bd-accent-green); font-weight: 600; }
        .bd-insight-value .down { color: #ef4444; font-weight: 600; }

        /* Quick Actions */
        .bd-actions-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }
        @media (max-width: 600px) {
            .bd-actions-grid { grid-template-columns: repeat(2, 1fr); }
        }
        .bd-action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 16px 8px;
            border-radius: 12px;
            border: 1px solid var(--bd-border);
            background: var(--bd-bg-primary);
            text-decoration: none;
            transition: all 0.2s ease;
        }
        .bd-action-btn:hover {
            border-color: rgba(99, 102, 241, 0.3);
            background: rgba(99, 102, 241, 0.06);
            transform: translateY(-2px);
        }
        .bd-action-btn-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .bd-action-btn-icon svg {
            width: 20px;
            height: 20px;
        }
        .bd-action-btn-icon.blue { background: var(--bd-glow-blue); }
        .bd-action-btn-icon.blue svg { color: var(--bd-accent-blue); }
        .bd-action-btn-icon.purple { background: var(--bd-glow-purple); }
        .bd-action-btn-icon.purple svg { color: var(--bd-accent-purple); }
        .bd-action-btn-icon.green { background: rgba(16,185,129,0.12); }
        .bd-action-btn-icon.green svg { color: var(--bd-accent-green); }
        .bd-action-btn-icon.orange { background: var(--bd-glow-orange); }
        .bd-action-btn-icon.orange svg { color: var(--bd-accent-orange); }
        .bd-action-btn-label {
            font-size: 0.7rem;
            font-weight: 500;
            color: var(--bd-text-secondary);
            text-align: center;
        }

        /* ===== Keyframe Animations ===== */
        @keyframes bd-fadeInUp {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .bd-animate {
            animation: bd-fadeInUp 0.5s ease-out both;
        }
        .bd-animate-d1 { animation-delay: 0.05s; }
        .bd-animate-d2 { animation-delay: 0.1s; }
        .bd-animate-d3 { animation-delay: 0.15s; }
        .bd-animate-d4 { animation-delay: 0.2s; }
        .bd-animate-d5 { animation-delay: 0.25s; }
        .bd-animate-d6 { animation-delay: 0.3s; }
        .bd-animate-d7 { animation-delay: 0.35s; }

        /* ===== Chart.js Canvas Sizing ===== */
        #revenueChart, #donutChart {
            max-width: 100%;
        }
