﻿/* REPORTS - LIGHT THEME - Toyota Professional */
.theme-light, :root {
    --rpt-toyota-red: #eb0a1e;
    --rpt-toyota-red-dark: #c20818;
    --rpt-bg: #f8fafc;
    --rpt-card: #ffffff;
    --rpt-border: #e2e8f0;
    --rpt-text: #1e293b;
    --rpt-text-sec: #64748b;
    --rpt-text-muted: #94a3b8;
    --rpt-success: #10b981;
    --rpt-warning: #f59e0b;
    --rpt-info: #3b82f6;
    --rpt-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --rpt-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --rpt-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

    /* Page Loading */
    .theme-light .page-loading-container, .page-loading-container {
        background: var(--rpt-bg);
    }

    .theme-light .page-loading-content h3, .page-loading-content h3 {
        color: var(--rpt-text);
    }

    .theme-light .page-loading-content p, .page-loading-content p {
        color: var(--rpt-text-sec);
    }

    .theme-light .spinner, .spinner {
        border-color: var(--rpt-border);
        border-top-color: var(--rpt-toyota-red);
    }

    /* Dashboard */
    .theme-light .dashboard-container, .dashboard-container {
        background: var(--rpt-bg);
        color: var(--rpt-text);
    }

    .theme-light .dashboard-header, .dashboard-header {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        box-shadow: var(--rpt-shadow-lg);
    }

    /* Stats */
    .theme-light .stat-card, .stat-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

        .theme-light .stat-card:hover, .stat-card:hover {
            box-shadow: var(--rpt-shadow-lg);
        }

    .theme-light .stat-icon, .stat-icon {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
    }

    .theme-light .stat-value, .stat-value {
        color: var(--rpt-text);
    }

    .theme-light .stat-label, .stat-label {
        color: var(--rpt-text-sec);
    }

    /* Section Headers */
    .theme-light .section-header h2, .section-header h2 {
        color: var(--rpt-text);
    }

    .theme-light .section-header p, .section-header p {
        color: var(--rpt-text-sec);
    }

    /* Report Cards */
    .theme-light .report-card, .report-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

        .theme-light .report-card:not(.coming-soon):hover, .report-card:not(.coming-soon):hover {
            box-shadow: var(--rpt-shadow-lg);
        }

    .theme-light .report-card-header, .report-card-header {
        background: linear-gradient(to bottom, rgba(248, 250, 252, 1), rgba(241, 245, 249, 1));
    }

    .theme-light .report-icon, .report-icon {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
    }

    .theme-light .report-badge, .report-badge {
        background: linear-gradient(135deg, var(--rpt-success) 0%, #059669 100%);
        color: white;
    }

        .theme-light .report-badge.coming-soon, .report-badge.coming-soon {
            background: var(--rpt-warning);
            color: white;
        }

    .theme-light .report-card-content h3, .report-card-content h3 {
        color: var(--rpt-text);
    }

    .theme-light .report-card-content p, .report-card-content p {
        color: var(--rpt-text-sec);
    }

    /* Broker Selection */
    .theme-light .broker-selection, .broker-selection {
        background: rgba(248, 250, 252, 1);
        border-color: var(--rpt-border);
    }

        .theme-light .broker-selection .form-label, .broker-selection .form-label {
            color: var(--rpt-text);
        }

        .theme-light .broker-selection .form-select, .broker-selection .form-select {
            background: white;
            border-color: var(--rpt-border);
            color: var(--rpt-text);
        }

            .theme-light .broker-selection .form-select:focus, .broker-selection .form-select:focus {
                border-color: var(--rpt-toyota-red);
                box-shadow: 0 0 0 3px rgba(235,10,30,0.1);
            }

    /* Features */
    .theme-light .feature-item, .feature-item {
        color: var(--rpt-text);
    }

        .theme-light .feature-item i, .feature-item i {
            color: var(--rpt-success);
        }

    .theme-light .report-card.coming-soon .feature-item i, .report-card.coming-soon .feature-item i {
        color: var(--rpt-text-muted);
    }

    /* Footer */
    .theme-light .report-card-footer, .report-card-footer {
        background: rgba(248, 250, 252, 1);
        border-top-color: var(--rpt-border);
    }

    .theme-light .btn-primary, .btn-primary {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(235,10,30,0.25);
    }

        .theme-light .btn-primary:not(:disabled):hover, .btn-primary:not(:disabled):hover {
            background: linear-gradient(135deg, var(--rpt-toyota-red-dark) 0%, #a00614 100%);
            box-shadow: 0 6px 16px rgba(235,10,30,0.35);
        }

    .theme-light .btn-secondary, .btn-secondary {
        background: var(--rpt-border);
        color: var(--rpt-text-sec);
    }

    .theme-light .btn-spinner, .btn-spinner {
        border-color: rgba(255,255,255,0.3);
        border-top-color: white;
    }

    /* Loading Overlay */
    .theme-light .loading-overlay, .loading-overlay {
        background: rgba(255,255,255,0.95);
    }

    .theme-light .loading-content p, .loading-content p {
        color: var(--rpt-text);
    }

    /* Help Section */
    .theme-light .dashboard-card, .dashboard-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

    .theme-light .card-header, .card-header {
        background: linear-gradient(to bottom, rgba(248, 250, 252, 1), rgba(241, 245, 249, 1));
        border-bottom-color: var(--rpt-border);
    }

        .theme-light .card-header h2, .card-header h2 {
            color: var(--rpt-text);
        }

    .theme-light .help-icon, .help-icon {
        background: linear-gradient(135deg, var(--rpt-info) 0%, #2563eb 100%);
        color: white;
    }

    .theme-light .help-content h4, .help-content h4 {
        color: var(--rpt-text);
    }

    .theme-light .help-content p, .help-content p {
        color: var(--rpt-text-sec);
    }

    /* Scrollbar */
    .theme-light ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .theme-light ::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .theme-light ::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

        .theme-light ::-webkit-scrollbar-thumb:hover {
            background: var(--rpt-toyota-red);
        }

    /* Focus */
    .theme-light *:focus-visible, *:focus-visible {
        outline: 2px solid var(--rpt-toyota-red);
        outline-offset: 2px;
    }

/* Print */
@media print {
    .theme-light .dashboard-header, .dashboard-header {
        background: white !important;
        color: var(--rpt-text) !important;
        border-bottom: 2px solid var(--rpt-toyota-red) !important;
    }

    .theme-light .header-content h1, .header-content h1 {
        color: var(--rpt-toyota-red) !important;
    }

    .theme-light .btn, .btn {
        display: none !important;
    }
}
/* REPORTS - DARK THEME - Toyota Professional */
.theme-dark {
    --rpt-toyota-red: #eb0a1e;
    --rpt-toyota-red-dark: #c20818;
    --rpt-toyota-red-light: #ff1a2e;
    --rpt-bg: #0f0f0f;
    --rpt-card: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    --rpt-card-solid: #1a1a1a;
    --rpt-border: rgba(255,255,255,0.1);
    --rpt-border-light: rgba(255,255,255,0.05);
    --rpt-text: rgba(255,255,255,0.95);
    --rpt-text-sec: rgba(255,255,255,0.7);
    --rpt-text-muted: rgba(255,255,255,0.5);
    --rpt-success: #22c55e;
    --rpt-warning: #f59e0b;
    --rpt-info: #3b82f6;
    --rpt-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --rpt-shadow-md: 0 4px 12px rgb(0 0 0 / 0.3);
    --rpt-shadow-lg: 0 10px 30px rgb(0 0 0 / 0.5);
}

    /* Page Loading */
    .theme-dark .page-loading-container {
        background: var(--rpt-bg);
    }

    .theme-dark .page-loading-content h3 {
        color: var(--rpt-text);
    }

    .theme-dark .page-loading-content p {
        color: var(--rpt-text-sec);
    }

    .theme-dark .spinner {
        border-color: var(--rpt-border);
        border-top-color: var(--rpt-toyota-red);
        filter: drop-shadow(0 0 8px rgba(235,10,30,0.5));
    }

    /* Dashboard */
    .theme-dark .dashboard-container {
        background: var(--rpt-bg);
        color: var(--rpt-text);
    }

    .theme-dark .dashboard-header {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        border-bottom: 1px solid var(--rpt-border);
        box-shadow: var(--rpt-shadow-lg);
    }

        .theme-dark .dashboard-header::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, rgba(235,10,30,0.1) 0%, transparent 70%);
            border-radius: 50%;
            transform: translate(100px, -100px);
        }

    /* Stats */
    .theme-dark .stat-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

        .theme-dark .stat-card:hover {
            box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 30px rgba(235,10,30,0.1);
            transform: translateY(-6px);
        }

    .theme-dark .stat-icon {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
        box-shadow: 0 0 20px rgba(235,10,30,0.4);
    }

    .theme-dark .stat-value {
        color: var(--rpt-text);
    }

    .theme-dark .stat-label {
        color: var(--rpt-text-sec);
    }

    /* Section Headers */
    .theme-dark .section-header h2 {
        color: var(--rpt-text);
    }

        .theme-dark .section-header h2 i {
            color: var(--rpt-toyota-red);
        }

    .theme-dark .section-header p {
        color: var(--rpt-text-sec);
    }

    /* Report Cards */
    .theme-dark .report-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

        .theme-dark .report-card:not(.coming-soon):hover {
            box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 40px rgba(235,10,30,0.15);
        }

    .theme-dark .report-card-header {
        background: rgba(0,0,0,0.2);
    }

    .theme-dark .report-icon {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
        box-shadow: 0 0 20px rgba(235,10,30,0.4);
    }

    .theme-dark .report-badge {
        background: linear-gradient(135deg, var(--rpt-success) 0%, #16a34a 100%);
        color: white;
        box-shadow: 0 0 15px rgba(34,197,94,0.3);
    }

        .theme-dark .report-badge.coming-soon {
            background: linear-gradient(135deg, var(--rpt-warning) 0%, #d97706 100%);
            color: white;
            box-shadow: 0 0 15px rgba(245,158,11,0.3);
        }

    .theme-dark .report-card-content h3 {
        color: var(--rpt-text);
    }

    .theme-dark .report-card-content p {
        color: var(--rpt-text-sec);
    }

    /* Broker Selection */
    .theme-dark .broker-selection {
        background: rgba(255,255,255,0.03);
        border-color: var(--rpt-border);
    }

        .theme-dark .broker-selection .form-label {
            color: var(--rpt-text);
        }

        .theme-dark .broker-selection .form-select {
            background: rgba(255,255,255,0.05);
            border-color: var(--rpt-border);
            color: var(--rpt-text);
        }

            .theme-dark .broker-selection .form-select:focus {
                border-color: var(--rpt-toyota-red);
                box-shadow: 0 0 0 3px rgba(235,10,30,0.2);
                background: rgba(255,255,255,0.08);
            }

    /* Features */
    .theme-dark .feature-item {
        color: var(--rpt-text);
    }

        .theme-dark .feature-item i {
            color: var(--rpt-success);
            filter: drop-shadow(0 0 4px rgba(34,197,94,0.4));
        }

    .theme-dark .report-card.coming-soon .feature-item i {
        color: var(--rpt-text-muted);
        filter: none;
    }

    /* Footer */
    .theme-dark .report-card-footer {
        background: rgba(0,0,0,0.2);
        border-top-color: var(--rpt-border);
    }

    .theme-dark .btn-primary {
        background: linear-gradient(135deg, var(--rpt-toyota-red) 0%, var(--rpt-toyota-red-dark) 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(235,10,30,0.3);
    }

        .theme-dark .btn-primary:not(:disabled):hover {
            background: linear-gradient(135deg, var(--rpt-toyota-red-light) 0%, var(--rpt-toyota-red) 100%);
            box-shadow: 0 6px 16px rgba(235,10,30,0.4), 0 0 25px rgba(235,10,30,0.2);
        }

    .theme-dark .btn-secondary {
        background: rgba(255,255,255,0.1);
        color: var(--rpt-text-sec);
    }

    .theme-dark .btn-spinner {
        border-color: rgba(255,255,255,0.3);
        border-top-color: white;
    }

    /* Loading Overlay */
    .theme-dark .loading-overlay {
        background: rgba(15,15,15,0.95);
        backdrop-filter: blur(8px);
    }

    .theme-dark .loading-content p {
        color: var(--rpt-text);
    }

    .theme-dark .loading-spinner .spinner {
        filter: drop-shadow(0 0 10px rgba(235,10,30,0.6));
    }

    /* Help Section */
    .theme-dark .dashboard-card {
        background: var(--rpt-card);
        border-color: var(--rpt-border);
        box-shadow: var(--rpt-shadow-sm);
    }

        .theme-dark .dashboard-card:hover {
            box-shadow: 0 8px 20px rgba(0,0,0,0.5);
        }

    .theme-dark .card-header {
        background: rgba(0,0,0,0.2);
        border-bottom-color: var(--rpt-border);
    }

        .theme-dark .card-header h2 {
            color: var(--rpt-text);
        }

            .theme-dark .card-header h2 i {
                color: var(--rpt-info);
            }

    .theme-dark .help-icon {
        background: linear-gradient(135deg, var(--rpt-info) 0%, #2563eb 100%);
        color: white;
        box-shadow: 0 0 20px rgba(59,130,246,0.3);
    }

    .theme-dark .help-content h4 {
        color: var(--rpt-text);
    }

    .theme-dark .help-content p {
        color: var(--rpt-text-sec);
    }

    /* Scrollbar */
    .theme-dark ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .theme-dark ::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    .theme-dark ::-webkit-scrollbar-thumb {
        background: rgba(235,10,30,0.5);
        border-radius: 4px;
    }

        .theme-dark ::-webkit-scrollbar-thumb:hover {
            background: var(--rpt-toyota-red);
        }

    /* Focus */
    .theme-dark *:focus-visible {
        outline: 2px solid var(--rpt-toyota-red);
        outline-offset: 2px;
    }

/* Print */
@media print {
    .theme-dark .dashboard-container {
        background: white !important;
        color: black !important;
    }

    .theme-dark .dashboard-header {
        background: white !important;
        border-bottom: 2px solid var(--rpt-toyota-red) !important;
    }

    .theme-dark .header-content h1 {
        color: var(--rpt-toyota-red) !important;
    }

    .theme-dark .stat-card, .theme-dark .report-card, .theme-dark .dashboard-card {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: none !important;
    }

    .theme-dark .btn {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-contrast: high) {
    .theme-dark {
        --rpt-border: rgba(255,255,255,0.3);
        --rpt-text: #ffffff;
        --rpt-text-sec: rgba(255,255,255,0.85);
    }

        .theme-dark .stat-card, .theme-dark .report-card, .theme-dark .dashboard-card {
            border-width: 2px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .theme-dark * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .theme-dark .spinner {
        animation: none;
        border-top-color: var(--rpt-toyota-red);
    }
}