        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .loader {
            border: 4px solid #f3f3f3;
            border-radius: 50%;
            border-top: 4px solid var(--primary);
            width: 30px;
            height: 30px;
            -webkit-animation: spin 1s linear infinite;
            /* Safari */
            animation: spin 1s linear infinite;
        }

        /* --- משתני עיצוב מעודכנים (כחול כהה ולבן) --- */
        :root {
            --primary: #002366;
            /* כחול כהה מלכותי (Navy Blue) */
            --primary-light: #f0f4f8;
            --secondary: #0056b3;
            /* כחול בהיר יותר לכפתורים משניים */
            --risk-btn-color: #004080;
            --compare-color: #e67e22;
            /* כתום להשוואה - נשאר לניגודיות */
            --bg: #f4f7f6;
            --card: #ffffff;
            --text: #333;
            --text-muted: #7f8c8d;
            --gold: #ffc107;
            --tooltip-bg: #1a1a1a;
            --sticky-bg: #f1f1f1;
            --avg-row-bg: #e8f5e9;
            --avg-row-text: #1b5e20;
            --success-color: #27ae60;
            --border-radius: 12px;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

        body {
            font-family: 'Rubik', sans-serif;
            background-color: var(--bg);
            margin: 0;
            padding: 20px;
            color: var(--text);
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: var(--card);
            padding: 30px;
            border-radius: 16px;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            min-height: 90vh;
            position: relative;
            border-top: 5px solid var(--primary);
        }

        /* Simple Mode V5 Refactored Styles */
        .simple-input-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: center;
        }
        .simple-label {
            font-size: 13px;
            font-weight: 900;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            text-align: center;
        }
        .simple-input-v5 {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            text-align: center !important;
            font-weight: 900 !important;
            color: #1e1b4b !important;
            font-size: 1.125rem !important; /* text-lg */
            width: 100% !important;
            height: 100% !important;
            padding: 0 !important;
        }
        .simple-pct {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-weight: 800;
            font-size: 12px;
            pointer-events: none;
        }
        .yield-box {
            background: #eef2ff !important; /* bg-indigo-50 */
            border: 1px solid #c7d2fe !important; /* border-indigo-200 */
            position: relative;
            width: 150px;
            height: 48px;
            border-radius: 12px;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            transition: all 0.2s;
        }
        .fee-box {
            background: #fffbeb !important; /* bg-amber-50 */
            border: 1px solid #fecaca !important; /* border-amber-200 (wait amber-200 is #fde68a, amber-50 is #fffbeb) */
            border-color: #fde68a !important;
            position: relative;
            width: 140px;
            height: 48px;
            border-radius: 12px;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            transition: all 0.2s;
        }
        .yield-box:focus-within {
            background: #ffffff !important;
            border-color: #6366f1 !important;
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }
        .fee-box:focus-within {
            background: #ffffff !important;
            border-color: #f59e0b !important;
            box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
        }
        .yield-box .simple-pct { color: #818cf8; }
        .fee-box .simple-pct { color: #fbbf24; }

        /* --- Interest Calculator Premium Styles --- */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-fade-in {
            animation: fadeIn 0.4s ease-out forwards;
        }

        /* --- Premium Mode Selector --- */
        .calc-mode-selector {
            display: flex;
            background: #f1f5f9;
            padding: 5px;
            border-radius: 20px;
            gap: 5px;
            width: fit-content;
            margin: 0 auto 30px;
            border: 1px solid #e2e8f0;
        }

        .calc-mode-btn {
            border: none !important;
            background: transparent !important;
            padding: 10px 24px !important;
            border-radius: 16px !important;
            font-family: 'Rubik', sans-serif !important;
            font-size: 14px !important;
            font-weight: 800 !important;
            color: #64748b !important;
            cursor: pointer !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        /* Iron-Clad Box Stability */
        .calc-v5-fixed-box {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            min-height: 52px !important;
            height: auto !important;
            overflow: visible !important;
        }
        .calc-v5-fixed-box .select2-selection {
            min-height: 52px !important;
            height: auto !important;
            max-height: none !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 4px !important;
            border-radius: 12px !important;
        }
        .calc-v5-fixed-box .select2-selection__rendered {
            white-space: normal !important;
            line-height: 1 !important;
            text-align: center !important;
            font-size: 11px !important;
            padding: 0 !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            height: 100% !important;
            word-break: break-all !important;
            hyphens: auto !important;
        }
        .calc-v5-fixed-box .select2-selection__arrow {
            display: none !important;
        }

        /* Fixed Grid for Filters */
        .calc-grid-filters {
            display: grid !important;
            grid-template-columns: repeat(3, 1fr) !important;
            gap: 4px !important;
            width: 100% !important;
            align-items: center !important;
        }

        .text-gradient-indigo {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Dashboard-style Select2 overrides */
        .calc-select2-container .select2-selection--single {
            background-color: #f8fafc !important;
            border: none !important;
            border-radius: 1rem !important;
            height: 48px !important;
            display: flex !important;
            align-items: center !important;
        }

        .calc-select2-container .select2-selection__rendered {
            font-weight: 800 !important;
            color: #1E1B4B !important;
            padding-right: 1.5rem !important;
        }

        .calc-select2-container .select2-selection__arrow {
            height: 46px !important;
        }

        /* --- Common UI Elements --- */
        .modal-overlay {
            z-index: 2000 !important;
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            justify-content: center;
            align-items: center;
        }

        .select2-dropdown {
            z-index: 3000 !important;
        }

        /* Path Filter 2-Column Layout */
        .path-dropdown-columns .select2-results>.select2-results__options {
            display: flex;
            flex-direction: row;
            /* RTL sets right-to-left, so right is first flex child */
            overflow-y: auto;
            max-height: 400px;
        }

        .path-dropdown-columns .select2-results__option[role="group"] {
            flex: 1;
            width: 50%;
            min-width: 0;
            border-left: 1px solid #e2e8f0;
            padding: 0;
            margin: 0;
        }

        .path-dropdown-columns .select2-results__option[role="group"]:last-child {
            border-left: none;
        }

        .modal-validity-banner {
            display: none;
            /* Hidden by default, shown by JS */
            text-align: center;
            margin-bottom: 25px;
            font-size: 1.1rem;
            color: #475569;
            font-weight: 800;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .path-dropdown-columns .select2-results__group {
            font-weight: 800;
            text-align: center;
            background: #f8fafc;
            color: var(--primary);
            position: sticky;
            top: 0;
            z-index: 10;
            font-size: 1rem;
            padding: 10px;
            border-bottom: 2px solid #e2e8f0;
            margin-bottom: 5px;
        }

        /* Logos */
        /* שינוי גודל לוגו עליון ל-120px (תוספת 50%) */
        .company-logo-top {
            position: absolute;
            top: 20px;
            left: 25px;
            height: 120px;
            width: auto;
            z-index: 10;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .company-logo-top:hover {
            transform: scale(1.05);
        }

        .company-logo-footer {
            display: block;
            margin: 5px auto 0 auto;
            height: 60px;
            width: auto;
            opacity: 0.9;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .company-logo-footer:hover {
            opacity: 1;
        }

        /* Header - Clickable & Interactive */
        .header {
            text-align: center;
            margin-bottom: 20px;
        }

        .header-content {
            display: inline-block;
            cursor: pointer;
            padding: 10px 20px;
            border-radius: 16px;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        .header-content:hover {
            background-color: rgba(0, 35, 102, 0.04);
            transform: translateY(-3px);
        }

        .header-content:active {
            transform: scale(0.98);
        }

        .header img.main-logo {
            height: 150px;
            width: auto;
            margin-bottom: 10px;
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        /* כותרת בכחול כהה */
        h1 {
            color: var(--primary);
            margin: 0;
            font-size: 2.2rem;
            font-weight: 700;
            user-select: none;
        }

        .blue-star {
            color: var(--secondary);
            font-size: 1.2em;
            vertical-align: bottom;
        }

        /* עיצוב לכוכב הכחול */
        h2 {
            color: #666;
            font-weight: 300;
            font-size: 1.4rem;
            margin-top: 5px;
            user-select: none;
        }

        /* Buttons */
        button {
            font-family: 'Rubik', sans-serif;
        }

        button.action-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            font-size: 1.25rem;
            transition: 0.3s;
            white-space: nowrap;
            height: 47px;
        }

        button.action-btn:hover {
            background: #001a4d;
            transform: translateY(-2px);
        }

        /* כפתור מסלול משולב - עיצוב מותאם לשורה העליונה */
        button.synth-btn-top {
            background: var(--secondary);
            color: white;
            border: none;
            padding: 10px 25px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            font-size: 1.15rem;
            transition: 0.3s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            white-space: nowrap;
            height: auto;
        }

        button.synth-btn-top:hover {
            background: #004494;
            transform: translateY(-2px);
        }

        .rating-toggle-btn {
            background-color: transparent;
            color: #64748b;
            border: 1px solid #e2e8f0;
            padding: 8px 12px;
            font-size: 1.1rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: none;
            min-width: 140px;
            height: 48px;
            white-space: nowrap;
        }

        .rating-toggle-btn i,
        .rating-toggle-btn svg {
            width: 24px !important;
            height: 24px !important;
            min-width: 24px;
            min-height: 24px;
        }

        .rating-toggle-btn:hover {
            background-color: #f8fafc;
            color: var(--primary);
            border-color: var(--primary);
        }

        .rating-toggle-btn i {
            width: 20px;
            height: 20px;
        }

        button.secondary-btn {
            background: #6c757d;
            padding: 0 20px;
            font-size: 0.95rem;
            margin-left: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        button.risk-btn {
            background: var(--risk-btn-color);
            padding: 10px 25px;
            font-size: 1.15rem;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            height: auto;
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
        }

        button.calc-btn {
            background: var(--primary);
            padding: 10px 25px;
            font-size: 1.15rem;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            height: auto;
            margin-right: 10px;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.3s;
        }

        /* Tiny Reset Button - Modified location style handled in container */
        .reset-tiny-btn {
            background: #ffffff;
            border: 1px solid #ddd;
            color: var(--text-muted);
            padding: 6px 12px;
            border-radius: 50px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-weight: 500;
            white-space: nowrap;
        }

        .reset-tiny-btn:hover {
            border-color: #bbb;
            color: var(--text);
            background: #f9f9f9;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        /* --- V5 CSS Grid Filters & Column Stability --- */
        .calc-v5-stack-filters {
            display: flex !important;
            flex-direction: column !important;
            gap: 6px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            padding: 4px 0 !important;
            /* background and border removed per user request to avoid "square within square" */
        }

        .calc-v5-row-filters {
            display: flex !important;
            flex-direction: row !important;
            gap: 12px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            padding: 4px 0 !important;
            align-items: center !important;
        }

        .calc-v5-row-filters .select2-container,
        .calc-v5-row-filters select {
            flex: 1 !important;
            min-width: 0 !important;
        }

        .calc-v5-stack-filters .select2-container {
            width: 100% !important;
            display: block !important;
            position: relative !important;
            height: auto !important; /* Let content define height */
            margin-bottom: 0 !important;
        }

        .comparison-table-v5 {
            table-layout: fixed !important;
            width: 100% !important;
        }

        /* Wide dropdown overlay for better readability on narrow triggers */
        .path-dropdown-columns.select2-dropdown {
            min-width: 350px !important;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
            border: 1px solid #e2e8f0 !important;
            z-index: 3000 !important;
        }

        /* Selection box truncation */
        .select2-selection__rendered {
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            padding-right: 25px !important;
        }

        .filter-col-header {
            display: flex !important;
            justify-content: space-between !important;
            align-items: center !important;
            margin-bottom: 8px !important;
            padding: 0 4px !important;
        }

        /* Scale down selection boxes globally */
        .calc-v5-stack-filters .select2-container--default .select2-selection--single,
        .filter-square-select, 
        .v5-fund-select {
            font-size: 11px !important;
            height: 28px !important;
            min-height: 28px !important;
            line-height: 28px !important;
            max-width: 100% !important;
            border-radius: 6px !important;
        }

        .calc-v5-stack-filters .select2-container--default .select2-selection--single .select2-selection__rendered {
            line-height: 26px !important;
            font-size: 11px !important;
            padding-right: 12px !important;
        }

        .calc-v5-stack-filters .select2-container--default .select2-selection--single .select2-selection__arrow {
            height: 26px !important;
            width: 18px !important;
        }

        .comparison-table-v5 td[data-row="filters"] {
            padding: 8px 4px !important;
        }

        .comparison-table-v5 {
            table-layout: fixed !important;
            width: 100% !important;
        }

        .filter-square-select {
            appearance: none;
            background-color: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 0 10px;
            color: #475569;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            text-overflow: ellipsis;
            height: 28px !important;
        }

        /* Legacy classes maintained for print/mobile compatibility */
        .filters-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 2rem;
            margin-bottom: 0;
            margin-top: 0;
            align-items: stretch;
        }

        .filter-box {
            display: flex;
            flex-direction: column;
            width: 100%;
            justify-content: flex-end;
        }

        .filter-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            height: auto;
            min-height: 32px;
        }

        .filter-box label {
            font-weight: 900;
            color: #0f172a;
            margin: 0;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            font-size: 0.95rem;
        }

        /* Select2 Premium Customization */
        .select2-container {
            width: 100% !important;
        }

        .select2-container .select2-selection--single,
        .select2-container .select2-selection--multiple {
            height: 64px !important;
            min-height: 64px !important;
            max-height: 64px !important;
            border: 1px solid #cbd5e1 !important;
            border-radius: 1.25rem !important;
            display: flex !important;
            align-items: center !important;
            background-color: #ffffff !important;
            box-sizing: border-box;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
            transition: all 0.2s;
        }

        .select2-container .select2-selection--single:focus-within,
        .select2-container .select2-selection--multiple:focus-within {
            border-color: rgba(99, 102, 241, 0.4) !important;
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05) !important;
        }

        .select2-container--default .select2-selection--single .select2-selection__rendered {
            line-height: 64px !important;
            padding-right: 24px !important;
            padding-left: 40px !important;
            color: #1e293b !important;
            font-weight: 700 !important;
            font-size: 1.05rem !important;
            width: 100%;
        }

        .select2-container--default .select2-selection--single .select2-selection__arrow {
            height: 62px !important;
            left: 12px !important;
            top: 1px !important;
        }

        .select2-container--default .select2-selection--multiple {
            padding: 8px 24px 8px 40px !important;
            overflow-y: auto;
        }

        .select2-container--default .select2-selection--multiple .select2-selection__rendered {
            display: flex !important;
            flex-wrap: wrap;
            gap: 3px;
            padding-right: 5px !important;
            margin-top: 0;
        }

        .select2-container--default .select2-selection--multiple .select2-selection__choice {
            background-color: #eef2ff !important;
            border: 1px solid #c7d2fe !important;
            border-radius: 0.5rem !important;
            color: #4338ca !important;
            font-size: 0.95rem !important;
            font-weight: 700 !important;
            padding: 2px 8px !important;
        }

        /* Toggles & Search */
        .toggle-wrapper {
            display: flex;
            align-items: center;
            font-size: 0.9rem;
            color: #64748b;
            font-weight: 700;
            gap: 0.625rem;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 32px;
            height: 16px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #cbd5e1;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 9999px;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 12px;
            width: 12px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 50%;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
        }

        input:checked+.slider {
            background: linear-gradient(to right, #4f46e5, #2563eb);
        }

        /* Hover: reset icon turns rose */
        .reset-tiny-btn:hover .reset-icon {
            color: #e11d48 !important;
        }

        input:checked+.slider:before {
            transform: translateX(16px);
        }

        .search-row-container {
            display: flex;
            gap: 1.5rem;
            align-items: stretch;
            padding-top: 1.5rem;
            border-top: 1px solid #e2e8f0;
        }

        .search-input-wrapper {
            flex-grow: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }

        .select-container {
            width: 100%;
        }

        /* Search select2 override for the free search */
        #fundSelect+.select2-container .select2-selection--multiple {
            min-height: 64px !important;
            max-height: 64px !important;
            border-radius: 1.5rem !important;
            background: white !important;
            border: 1px solid #cbd5e1 !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
            padding: 8px 56px 8px 24px !important;
        }

        /* Action button submit premium */
        #btnRun {
            border-radius: 1.5rem !important;
            background: #0f172a;
            position: relative;
            overflow: hidden;
            font-size: 1rem !important;
            font-weight: 900 !important;
            letter-spacing: 0.05em;
            transition: all 0.3s;
        }

        #btnRun:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35) !important;
        }

        #btnRun::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, #6366f1, #4338ca);
            opacity: 0;
            transition: opacity 0.3s;
            border-radius: inherit;
        }

        #btnRun:hover::after {
            opacity: 1;
        }

        #btnRun>* {
            position: relative;
            z-index: 1;
        }

        /* Reset button premium */
        .reset-tiny-btn {
            background: rgba(255, 255, 255, 0.6) !important;
            border: none !important;
            border-radius: 0.75rem !important;
            padding: 8px 16px !important;
            font-size: 0.625rem !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.2em !important;
            color: #64748b !important;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        .reset-tiny-btn:hover {
            background: white !important;
        }

        .reset-tiny-btn:active {
            transform: scale(0.95);
        }

        /* Risk Wizard */
        .risk-top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding: 0 10px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .active-filter-badge {
            background: var(--risk-btn-color);
            color: white;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-weight: bold;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .wizard-container {
            text-align: center;
        }

        .wizard-question {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 20px;
            color: var(--primary);
        }

        .wizard-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .wizard-option {
            background: #f8f9fa;
            border: 1px solid #ddd;
            padding: 15px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.2s;
            text-align: right;
            font-size: 1rem;
        }

        .wizard-option:hover {
            background: #e9ecef;
            border-color: var(--secondary);
        }

        .wizard-result-box {
            background: #e8f5e9;
            padding: 20px;
            border-radius: 12px;
            margin-top: 10px;
            border: 1px solid #c8e6c9;
        }

        .wizard-score {
            font-size: 3rem;
            font-weight: bold;
            color: var(--primary);
            margin: 10px 0;
        }

        .wizard-desc {
            font-size: 1.2rem;
            color: #333;
            margin-bottom: 20px;
        }

        /* Progress Bar */
        .wizard-progress {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-bottom: 20px;
            margin-top: 10px;
        }

        .progress-step {
            width: 30px;
            height: 8px;
            background: #eee;
            border: 1px solid #ddd;
            border-radius: 2px;
            transition: 0.3s;
        }

        .progress-step.active {
            background: var(--secondary);
            border-color: var(--secondary);
        }

        /* Table Styles (Premium Glassmorphism) */
        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-bottom: 24px;
        }

        th,
        td {
            padding: 16px 14px;
            text-align: center;
            border-bottom: 1px solid #cbd5e1;
            vertical-align: middle;
            transition: background 0.2s;
        }

        th {
            background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
            color: #0f172a;
            font-weight: 800;
            font-size: 0.95rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 2px solid #94a3b8;
        }

        .fund-link {
            transition: color 0.2s;
            cursor: pointer;
        }

        .detailed-fund-header .fund-link,
        .detailed-fund-header small {
            color: white !important;
        }

        table.comparison-table th.detailed-fund-header:hover .fund-link,
        table.comparison-table th.detailed-fund-header:hover small,
        .fund-link:hover {
            color: #3b82f6 !important;
        }


        table.comparison-table tbody tr {
            background: white;
            transition: all 0.2s;
        }

        table.comparison-table tbody tr:hover {
            background: #f8fafc;
            transform: scale(1.001);
            box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
            position: relative;
            z-index: 10;
        }

        table.comparison-table th:first-child,
        table.comparison-table td:first-child {
            position: sticky;
            right: 0;
            background: rgba(241, 245, 249, 0.95);
            backdrop-filter: blur(8px);
            font-weight: 800;
            text-align: right;
            width: 260px;
            min-width: 260px;
            z-index: 110;
            border-left: 1px solid #cbd5e1;
            box-shadow: -4px 0 10px rgba(0, 0, 0, 0.05);
            color: #0f172a;
            font-size: 0.95rem;
        }

        table.comparison-table th:first-child {
            z-index: 120;
            box-shadow: -4px 0 10px rgba(0, 0, 0, 0.05);
            border-left: 2px solid #cbd5e1;
            border-bottom: 2px solid #cbd5e1;
        }

        .metric-cell-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .best-val {
            background-color: rgba(34, 197, 94, 0.1);
            color: #15803d;
            font-weight: 800;
            border-radius: 6px;
            padding: 4px 8px;
            box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
        }

        .stars-container {
            font-size: 1.3rem;
            letter-spacing: 2px;
            white-space: nowrap;
            display: inline-block;
        }

        /* Company Focus Modal */
        /* Company Focus Modal */
        .company-focus-modal {
            max-width: 500px;
            width: 90%;
            background: white;
            border-radius: 12px;
            padding: 0;
            display: flex;
            flex-direction: column;
            max-height: 80vh;
        }

        .focus-search-bar {
            padding: 15px;
            border-bottom: 1px solid #eee;
            background: #f9f9f9;
            border-radius: 12px 12px 0 0;
        }

        .focus-search-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
        }

        .focus-list-container {
            flex: 1;
            overflow-y: auto;
            padding: 10px 20px;
        }

        .focus-item {
            display: flex;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #f5f5f5;
        }

        .focus-item:last-child {
            border-bottom: none;
        }

        .focus-item label {
            margin-right: 10px;
            cursor: pointer;
            flex: 1;
        }

        .focus-actions {
            padding: 15px;
            border-top: 1px solid #eee;
            background: #f9f9f9;
            border-radius: 0 0 12px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .star-filled {
            color: var(--gold);
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
        }

        .star-empty {
            color: #e0e0e0;
        }

        .cell-medal {
            font-size: 1.2em;
            cursor: help;
            margin-left: 5px;
        }

        /* Mass View & Tooltips (Premium Table) */
        table.mass-table {
            border-collapse: separate;
            border-spacing: 0;
            width: 100%;
        }

        table.mass-table th {
            text-align: center;
            cursor: pointer;
            padding: 16px 12px;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #ffffff;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            border-bottom: 2px solid #1e3a8a;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
            transition: background 0.2s, opacity 0.2s;
        }

        table.mass-table th:nth-child(1),
        table.mass-table th:nth-child(2) {
            background: #f8fafc;
            color: #475569;
            text-shadow: none;
            border-bottom: 2px solid #e2e8f0;
        }

        table.mass-table th:hover {
            opacity: 0.9;
        }

        table.mass-table th[style*="background-color"] {
            color: #ffffff !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
            background-image: none !important;
            /* Force inline flat colors to override the gradient */
        }

        table.mass-table td {
            text-align: center;
            padding: 14px 12px;
            font-size: 0.95rem;
            color: #334155;
            border-bottom: 1px solid #f1f5f9;
            transition: all 0.2s;
        }

        /* Override for Fund Name (Second Column) */
        table.mass-table th:nth-child(2),
        table.mass-table td:nth-child(2) {
            text-align: right;
            padding-right: 20px;
            font-weight: 600;
        }

        /* Override for Star Rating */
        table.mass-table th[data-col-type="stars"],
        table.mass-table td[data-col-type="stars"] {
            text-align: right;
            padding-right: 16px;
        }

        table.mass-table tbody tr {
            background-color: white;
            transition: all 0.2s ease;
        }

        table.mass-table tbody tr:hover {
            background-color: #f8fafc;
            transform: scale(1.002);
            box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
            position: relative;
            z-index: 10;
        }

        tr.avg-row td {
            background-color: rgba(241, 245, 249, 0.8) !important;
            backdrop-filter: blur(8px);
            color: #0f172a !important;
            font-weight: 800;
            border-top: 2px solid #94a3b8;
            border-bottom: 2px solid #94a3b8;
            font-size: 1rem;
        }

        /* --- Hide Ratings Feature --- */
        .hide-ratings #winnerSection,
        .hide-ratings .runner-ups-container {
            display: none !important;
        }

        .hide-ratings tr[data-key="דירוג כוכבים"],
        .hide-ratings tr[data-key="risk_level"] {
            display: none !important;
        }

        .hide-ratings .mass-table th[data-col-type="stars"],
        .hide-ratings .mass-table td[data-col-type="stars"],
        .hide-ratings .mass-table th[data-col-key="risk_level"],
        .hide-ratings .mass-table td[data-col-key="risk_level"] {
            display: none !important;
        }

        .mass-view-header {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 1rem;
            padding: 20px 24px;
            margin-bottom: 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .view-toggle-btn {
            background: white;
            color: #475569;
            border: 1px solid #cbd5e1;
            padding: 8px 16px;
            border-radius: 0.5rem;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            min-width: 110px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 1.1rem;
            white-space: nowrap;
        }

        .view-toggle-btn i,
        .view-toggle-btn svg {
            width: 24px !important;
            height: 24px !important;
            min-width: 24px;
            min-height: 24px;
        }

        .view-toggle-btn:hover,
        .view-toggle-btn.active {
            background: #f8fafc;
            color: #0f172a;
            border-color: var(--primary);
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .view-toggle-btn.active {
            background: var(--primary-light);
            border-width: 2px;
        }

        .rating-toggle-btn.header-aligned {
            margin: 0 !important;
            padding: 6px 14px !important;
            font-size: 0.85rem !important;
            height: 36px !important;
            min-width: 0 !important;
            background: rgba(255, 255, 255, 0.8) !important;
            border: 1px solid #cbd5e1 !important;
            color: #475569 !important;
        }

        .rating-toggle-btn.header-aligned:hover {
            background: white !important;
            border-color: var(--primary) !important;
            color: var(--primary) !important;
        }

        .rating-toggle-btn.header-aligned i,
        .rating-toggle-btn.header-aligned svg {
            width: 16px !important;
            height: 16px !important;
        }

        /* --- Date Badges --- */
        .date-badge-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .date-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: 800;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            white-space: nowrap;
        }

        .date-badge.blue {
            background: #eef2ff;
            color: #4338ca;
            border: 1px solid #c7d2fe;
        }

        .date-badge.green {
            background: #f0fdf4;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .date-badge i {
            width: 16px;
            height: 16px;
        }

        .view-toggle-group-full {
            display: flex;
            gap: 6px;
            width: 100%;
        }

        .view-toggle-group-full .view-toggle-btn,
        .view-toggle-group-full .rating-toggle-btn {
            flex: 1;
            min-width: 0;
            /* Allow shrinking */
        }

        .select-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        #globalTooltip {
            position: fixed;
            visibility: hidden;
            background-color: var(--tooltip-bg);
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            font-size: 0.85rem;
            z-index: 4000 !important;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
            pointer-events: none;
            white-space: normal;
            max-width: 280px;
            text-align: center;
            transform: translate(-50%, -120%);
        }

        #globalTooltip::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            border-width: 6px;
            border-style: solid;
            border-color: var(--tooltip-bg) transparent transparent transparent;
            transform: translateX(-50%);
        }

        /* Mix Generator Period Selector */
        .period-selector-group {
            display: flex;
            background: #e0f2f1;
            border-radius: 8px;
            padding: 4px;
            gap: 4px;
            margin-top: 5px;
        }

        .period-selector-group input[type="radio"] {
            display: none;
        }

        .period-selector-group label {
            flex: 1;
            text-align: center;
            padding: 8px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            color: #00695c;
            transition: all 0.2s;
            user-select: none;
        }

        .period-selector-group input[type="radio"]:checked+label {
            background: #00897b;
            color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* Modal Overlay Base Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            justify-content: center;
            align-items: center;
        }

        /* Modal Z-Index Fix - Force Fund Card Above Mix Generator */
        #fundModal {
            z-index: 2200 !important;
        }

        #mixGeneratorModal {
            z-index: 2100 !important;
        }

        #mixGeneratorModal .select2-container--default .select2-selection--multiple,
        #mixGeneratorModal .select2-container--default .select2-selection--single {
            height: 48px !important;
            min-height: 48px !important;
            max-height: 48px !important;
            display: flex !important;
            align-items: flex-start !important;
            /* Start from top for better scrolling visibility */
            overflow-y: auto !important;
            border-radius: 10px !important;
            border: 1px solid #cbd5e1 !important;
            padding-top: 4px !important;
            padding-bottom: 4px !important;
        }

        #mixGeneratorModal .select2-container--default .select2-selection--multiple .select2-selection__rendered,
        #mixGeneratorModal .select2-container--default .select2-selection--single .select2-selection__rendered {
            line-height: 1.4 !important;
            /* Reduced from 38px to allow multi-line fit */
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 4px !important;
            padding: 0 10px !important;
            font-size: 0.95rem !important;
        }

        #mixGeneratorModal .select2-container--default .select2-selection--multiple .select2-selection__choice {
            font-size: 0.65rem !important;
            padding: 0 2px !important;
            margin-top: 2px !important;
            font-weight: 500 !important;
        }

        #mixGeneratorModal .select2-container--default .select2-selection--single .select2-selection__arrow {
            height: 46px !important;
        }

        .mandatory-highlight {
            border: 2px solid #00897b !important;
            background: #e0f2f1 !important;
            box-shadow: 0 0 10px rgba(0, 137, 123, 0.2) !important;
        }

        .metric-tooltip {
            display: inline-flex;
            justify-content: center;
            align-items: center;
            width: 18px;
            height: 18px;
            background: #999;
            color: white;
            border-radius: 50%;
            font-size: 11px;
            font-weight: bold;
            cursor: help;
            margin-right: 10px;
            position: relative;
            flex-shrink: 0;
        }

        .metric-tooltip:hover {
            background: var(--secondary);
        }

        /* Updated Info Icon Container to hold Reset Button */
        .info-icon-container {
            position: absolute;
            top: 15px;
            left: 15px;
            z-index: 10;
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .user-guide-btn {
            background: white !important;
            border: 1px solid #e2e8f0 !important;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: 'Rubik', sans-serif;
            text-decoration: none;
            outline: none;
        }

        .user-guide-btn:hover {
            border-color: var(--primary) !important;
            background: #f8fafc !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
        }

        .user-guide-btn span {
            color: #334155;
            font-size: 0.625rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.15em;
        }

        .user-guide-btn .info-icon {
            margin: 0;
            width: 20px;
            height: 20px;
            line-height: 20px;
            font-size: 14px;
        }

        .info-icon {
            background-color: var(--primary);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            text-align: center;
            line-height: 24px;
            font-weight: bold;
            cursor: help;
        }

        .fund-link {
            cursor: pointer;
            text-decoration: none;
            color: #0f172a !important;
            font-weight: 600;
            transition: 0.2s;
        }

        .fund-link:hover {
            color: #3b82f6 !important;
            text-decoration: underline !important;
        }

        th .fund-link {
            color: #0f172a !important;
        }

        /* Winner & Runner Ups */
        .winner-card {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 1);
            border-radius: 1.5rem;
            padding: 24px;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 24px;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .winner-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.05));
            z-index: 0;
            pointer-events: none;
        }

        .winner-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
            border-color: rgba(99, 102, 241, 0.3);
        }

        .medal {
            font-size: 4rem;
            position: relative;
            z-index: 1;
            filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
        }

        .winner-info {
            flex-grow: 1;
            position: relative;
            z-index: 1;
        }

        .winner-info h3 {
            margin: 0 0 8px 0;
            color: #0f172a;
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .winner-desc {
            font-size: 1rem;
            line-height: 1.6;
            color: #475569;
        }

        .winner-disclaimer {
            font-size: 0.85rem;
            color: #94a3b8;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            font-weight: 500;
        }

        /* --- New Calculator Toggle --- */
        .calc-mode-selector {
            display: flex;
            background: #e2e8f0;
            padding: 4px;
            border-radius: 12px;
            margin-bottom: 20px;
            gap: 4px;
        }

        .calc-mode-btn {
            flex: 1;
            padding: 10px;
            border: none;
            background: transparent;
            color: #64748b;
            font-weight: 700;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.95rem;
        }

        .calc-mode-btn.active {
            background: #6366f1 !important;
            color: white !important;
            box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3) !important;
        }

        /* --- Statistics Grid in Calculator --- */
        .calc-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 20px;
        }

        .calc-stat-card {
            background: #f8fafc;
            padding: 12px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }

        .calc-stat-label {
            display: block;
            font-size: 0.75rem;
            color: #64748b;
            margin-bottom: 4px;
            font-weight: 600;
        }

        .calc-stat-value {
            display: block;
            font-size: 1rem;
            font-weight: 800;
            color: #0f172a;
        }

        .calc-stat-value.positive {
            color: #10b981;
        }

        .calc-stat-value.negative {
            color: #ef4444;
        }

        .runner-ups-container {
            margin-bottom: 30px;
        }

        .runner-ups-title {
            font-size: 1.1rem;
            color: #64748b;
            margin-bottom: 12px;
            padding-bottom: 8px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .runner-ups-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .runner-up-card {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 1rem;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            cursor: pointer;
            transition: all 0.3s;
        }

        .runner-up-card:hover {
            transform: translateX(-4px) scale(1.01);
            background: rgba(255, 255, 255, 0.95);
            border-color: rgba(99, 102, 241, 0.2);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        .runner-up-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .rank-badge {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #f1f5f9;
            color: #475569;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: 800;
            font-size: 1rem;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .rank-2 {
            background: #f8fafc;
            color: #334155;
            border: 2px solid #cbd5e1;
        }

        .rank-3 {
            background: #fff7ed;
            color: #9a3412;
            border: 2px solid #fed7aa;
        }

        .runner-up-name {
            font-weight: 700;
            color: #0f172a;
            font-size: 1.05rem;
        }

        .runner-up-right {
            display: flex;
            align-items: center;
        }

        /* Accordion & Chat */
        /* Accordion Sections */
        .report-section-wrapper {
            page-break-inside: avoid;
            break-inside: avoid;
            margin-bottom: 32px;
            width: 100%;
            box-sizing: border-box;
            background: rgba(255, 255, 255, 0.4);
            border-radius: 1.5rem;
            padding: 0 24px 24px;
            border: 1px solid rgba(255, 255, 255, 0.8);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
            backdrop-filter: blur(8px);
        }

        .section-header {
            display: flex;
            align-items: center;
            cursor: pointer;
            margin-top: 32px;
            margin-bottom: 16px;
            border-bottom: 1px solid #e2e8f0;
            padding-bottom: 12px;
            transition: opacity 0.2s;
        }

        .section-header:hover {
            opacity: 0.8;
        }

        .section-vis-btn {
            background: rgba(255, 255, 255, 0.7);
            color: #3b82f6;
            border: 1px solid rgba(59, 130, 246, 0.3);
            padding: 8px 16px;
            border-radius: 2rem;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.9rem;
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            backdrop-filter: blur(8px);
        }

        .section-vis-btn:hover {
            background: #3b82f6;
            color: white;
            box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
            transform: translateY(-1px);
        }

        .section-title {
            color: #0f172a;
            font-size: 1.6rem;
            font-weight: 900;
            letter-spacing: -0.02em;
            margin: 0;
            display: inline-block;
        }

        .toggle-icon {
            font-size: 1em;
            margin-right: 12px;
            color: #94a3b8;
            transition: transform 0.3s;
        }

        .toggle-icon.open {
            transform: rotate(180deg);
        }

        .section-desc {
            display: none;
            background: rgba(248, 250, 252, 0.8);
            backdrop-filter: blur(8px);
            padding: 16px;
            border-left: 4px solid #6366f1;
            margin-bottom: 20px;
            border-radius: 0 12px 12px 0;
            font-size: 0.95rem;
            line-height: 1.6;
            color: #475569;
        }

        /* AI Section Glassmorphism */
        .ai-section {
            background: rgba(240, 249, 255, 0.6);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 1.5rem;
            padding: 24px;
            margin-top: 40px;
            box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.15);
        }

        .chat-box {
            background: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            height: 300px;
            overflow-y: auto;
            padding: 15px;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .message {
            padding: 10px;
            border-radius: 8px;
            max-width: 85%;
            line-height: 1.5;
        }

        .msg-ai {
            background: #f1f8ff;
            align-self: flex-start;
        }

        .msg-user {
            background: var(--primary);
            color: white;
            align-self: flex-end;
        }

        .chat-input-area {
            display: flex;
            gap: 10px;
        }

        .chat-input-area input {
            flex-grow: 1;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        .print-btn {
            background: linear-gradient(135deg, #4f46e5, #3b82f6) !important;
            color: white !important;
            border: none;
            border-radius: 1rem;
            margin-top: 30px;
            width: 100%;
            padding: 16px;
            font-size: 1.15rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.25);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .print-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.35);
        }

        .print-btn:active {
            transform: scale(0.98);
        }

        .footer-disclaimer {
            margin-top: auto;
            padding-top: 40px;
            border-top: 1px solid #ddd;
            font-size: 0.85rem;
            color: #666;
            text-align: center;
            line-height: 1.6;
        }

        .loader {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #00897b;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        /* Modals General */

        .modal-content {
            background: white;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: slideUp 0.3s ease-out;
        }

        .modal-header {
            background: var(--primary);
            color: white;
            padding: 15px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            flex-shrink: 0;
            min-height: 60px;
        }

        .modal-header h2 {
            color: white !important;
            margin: 0;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .modal-header .fund-id-badge {
            margin-bottom: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            background: rgba(255,255,255,0.16) !important;
            color: white !important;
            border: 1px solid rgba(255,255,255,0.2) !important;
            height: 24px !important;
            font-size: 0.75rem !important;
            padding: 0 10px !important;
            border-radius: 12px !important;
            font-weight: 500 !important;
            pointer-events: auto !important;
            margin-right: 10px !important;
            flex-shrink: 0;
        }

        .modal-body {
            padding: 15px;
            overflow-y: auto;
        }

        .modal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .modal-card {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #eee;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .modal-card h3 {
            color: var(--secondary);
            margin-top: 0;
            border-bottom: 1px solid #eee;
            padding-bottom: 8px;
            font-size: 1.1rem;
        }

        .data-row {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid #f9f9f9;
            font-size: 0.9rem;
        }

        .data-label {
            color: #000;
            font-weight: 700;
        }

        /* FIX: Bold Black Label */
        .data-value {
            color: #333;
            font-weight: 400;
        }

        /* FIX: Normal Value */
        .close-modal {
            background: transparent;
            border: none;
            color: white;
            font-size: 2rem;
            cursor: pointer;
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Synthetic Builder (Original) */
        .synth-controls {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
        }

        .synth-controls select {
            width: 100%;
            padding: 8px;
            border-radius: 4px;
            border: 1px solid #ccc;
        }

        .synth-list {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 10px;
        }

        .synth-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #f1f1f1;
        }

        .synth-item:last-child {
            border-bottom: none;
        }

        .synth-item-name {
            flex-grow: 1;
            font-weight: bold;
        }

        .synth-item-inputs {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .synth-weight-input {
            width: 60px;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
            text-align: center;
        }

        .synth-add-btn {
            background: var(--secondary);
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 4px;
            cursor: pointer;
        }

        .selected-synth-list {
            margin-top: 20px;
            background: #e8f5e9;
            padding: 15px;
            border-radius: 8px;
        }

        .total-weight {
            font-weight: bold;
            margin-top: 10px;
            text-align: left;
            color: var(--primary);
        }

        .total-weight.error {
            color: red;
        }

        /* --- Legacy/Common Calculator Layout (Used by Portfolio Check) --- */
        .calc-layout {
            display: flex;
            gap: 30px;
            align-items: flex-start;
        }

        .calc-sidebar {
            flex: 0 0 320px;
            min-width: 320px;
        }

        .calc-main {
            flex: 1;
            min-width: 0;
        }

        .calc-card {
            background: white;
            padding: 24px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            margin-bottom: 20px;
        }

        .calc-card-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* --- Empty State --- */
        .empty-state-modern {
            text-align: center;
            padding: 60px 20px;
            background: white;
            border-radius: 24px;
            border: 2px dashed #e2e8f0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin-top: 20px;
        }

        .empty-icon-circle {
            width: 80px;
            height: 80px;
            background: #f1f5f9;
            border-radius: 50%;
            margin-bottom: 20px;
            position: relative;
        }

        .empty-icon-circle::after {
            content: '📊';
            font-size: 40px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        @media (max-width: 1024px) {
            .calc-layout {
                flex-direction: column;
            }

            .calc-sidebar {
                flex: none;
                width: 100%;
                min-width: 0;
            }
        }

        /* ====================================================================================
           🔥 NEW CALCULATOR CSS (UPGRADED LAYOUT V4 PREMIUM) 
           ==================================================================================== */
        .text-gradient-indigo {
            background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .calc-layout-v2 {
            display: flex;
            flex-direction: column;
            gap: 25px;
            height: auto;
        }

        .calc-inputs-v2 {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .calc-header-v2 {
            background: transparent;
            padding: 10px 0;
            border-radius: 0;
            margin-bottom: 5px;
            border: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            text-align: center;
            box-shadow: none;
            position: relative;
        }

        .calc-header-v2 h3 {
            margin: 0;
            font-weight: 900;
            font-size: 1.5rem;
            color: #1e293b;
            letter-spacing: -0.02em;
        }

        .calc-badge-activity {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            background: #f0f7ff;
            color: #1d4ed8;
            border: 1px solid #dbeafe;
            border-radius: 9999px;
            font-size: 0.85rem;
            font-weight: 800;
            box-shadow: 0 2px 4px rgba(29, 78, 216, 0.05);
        }

        .calc-section-v2 {
            background: #fff;
            padding: 20px;
            border-radius: 1.5rem;
            border: 1px solid #f1f5f9;
            box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.04);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .calc-section-v2::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: transparent;
            z-index: 10;
        }

        .fund-section-a::before {
            background: #6366f1;
        }

        .fund-section-b::before {
            background: #f59e0b;
        }

        .calc-section-v2:hover {
            transform: translateY(-6px);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
            border-color: #cbd5e1;
        }

        .calc-input-group-v2 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
        }

        .input-row label {
            font-size: 0.85rem;
            font-weight: 800;
            color: #475569;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.025em;
        }

        .input-wrapper input,
        .calc-inputs-v2 select {
            width: 100%;
            padding: 16px 16px 16px 48px;
            border: 1px solid #e2e8f0;
            border-radius: 1.25rem;
            font-size: 1.1rem;
            font-weight: 700;
            color: #0f172a;
            outline: none;
            transition: all 0.2s;
            box-sizing: border-box;
            background: #f8fafc;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
        }

        .input-wrapper input:focus,
        .calc-inputs-v2 select:focus {
            background: #fff;
            border-color: #6366f1;
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.02);
        }

        .input-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 0.9rem;
            font-weight: 800;
            pointer-events: none;
            background: white;
            padding: 4px 8px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        /* Fund Comparison Grid */
        .calc-fund-comparison-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 25px;
            width: 100%;
        }

        /* Result Box Restoration */
        .box-result-summary {
            margin-top: 25px;
            padding-top: 25px;
            border-top: 2px dashed #f1f5f9;
        }

        .box-result-main-val {
            font-size: 3rem;
            font-weight: 950;
            color: #1e1b4b;
            margin-bottom: 15px;
            letter-spacing: -0.04em;
        }

        .fund-section-b .box-result-main-val {
            color: #92400e;
        }

        .box-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        .box-stat-item {
            background: white;
            padding: 15px;
            border-radius: 1.25rem;
            border: 1px solid #f1f5f9;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
            text-align: right;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .box-stat-label {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .box-stat-val {
            font-size: 1.25rem;
            font-weight: 900;
            color: #0f172a;
        }

        /* Chart Bottom Row Cleanup */
        .calc-bottom-row {
            margin-top: 15px;
            background: white;
            padding: 40px;
            border-radius: 2.5rem;
            border: 1px solid #f1f5f9;
            box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.05);
        }

        /* Mode Selector High End */
        .calc-mode-selector {
            display: flex;
            background: #f1f5f9;
            padding: 4px;
            border-radius: 0.75rem;
            gap: 4px;
            border: 1px solid #e2e8f0;
            width: fit-content;
        }

        .calc-mode-btn {
            border: none;
            padding: 8px 20px;
            border-radius: 0.6rem;
            font-size: 0.85rem;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #64748b;
            background: transparent;
            white-space: nowrap;
        }

        .calc-mode-btn.active {
            background: #6366f1;
            color: white;
            box-shadow: 0 4px 10px -2px rgba(99, 102, 241, 0.3);
        }

        /* Comparison Button V4 */
        /* Comparison Table V5 */
        .comparison-table-v5-wrapper {
            width: 100%;
            overflow-x: auto;
            overflow-y: visible;
            background: white;
            border-radius: 1.5rem;
            border: 1px solid #f1f5f9;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
            margin-top: 20px;
            padding: 15px 0;
        }

        .calc-comparison-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed; /* Strict column widths */
            min-width: 950px; /* Ensure space for 3 columns */
        }

        .calc-comparison-table th,
        .calc-comparison-table td {
            padding: 15px;
            border-bottom: 2px solid #e2e8f0;
            border-left: 2px solid #e2e8f0;
            text-align: center;
            vertical-align: middle;
        }

        .calc-comparison-table tr:hover td {
            background-color: #f8fafc;
        }

        .premium-hero-row td {
            background-color: #f0f7ff !important;
            font-weight: 900 !important;
            color: #1e293b !important;
            border-bottom: 2px solid #6366f1 !important;
        }

        .premium-hero-row td:first-child {
            color: #6366f1 !important;
        }

        .main-val-cell {
            font-size: 1.2rem;
            color: #6366f1;
            font-weight: 950;
        }

        /* V2 Single Row Input Layout */
        .calc-input-group-v2 {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 20px;
            justify-content: space-between;
            align-items: flex-end;
            background: #fff;
            padding: 24px;
            border-radius: 1.5rem;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
        }

        .calc-input-group-v2 .input-row {
            flex: 1;
            min-width: 0;
            margin-bottom: 0 !important;
        }

        .calc-input-group-v2 .input-row label {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            margin-bottom: 8px;
            font-size: 0.8rem;
            font-weight: 800;
            color: #64748b;
        }

        @media (max-width: 900px) {
            .calc-input-group-v2 {
                flex-wrap: wrap;
            }

            .calc-input-group-v2 .input-row {
                flex: 1 1 calc(50% - 10px);
            }
        }

        /* Simple Mode Cards - Refined Premium Design */
        .simple-results-v5 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
            gap: 24px;
            margin-bottom: 30px;
            padding: 10px;
        }

        .simple-card-v5 {
            background: #ffffff;
            border-radius: 24px;
            padding: 24px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.02);
            border: 1px solid #f1f5f9;
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .simple-card-v5:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
            border-color: #e2e8f0;
        }

        .simple-card-v5::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 6px;
            height: 100%;
            background: var(--primary);
            border-radius: 0 4px 4px 0;
        }

        .simple-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid #f8fafc;
        }

        .simple-card-title {
            font-weight: 900;
            font-size: 1.25rem;
            color: #1e293b;
            letter-spacing: -0.02em;
        }

        .simple-card-metrics {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .simple-metric-item {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }

        .simple-metric-label {
            color: #64748b;
            font-size: 0.95rem;
            font-weight: 500;
        }

        .simple-metric-val {
            font-weight: 800;
            font-size: 1.1rem;
            color: #334155;
        }

        .simple-metric-val.hero {
            font-size: 1.75rem;
            color: #6366f1;
            font-weight: 950;
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .simple-metric-val.profit {
            color: #10b981;
            font-size: 1.25rem;
        }

        .simple-card-footer-note {
            margin-top: 15px;
            font-size: 0.75rem;
            color: #94a3b8;
            font-style: italic;
        }

        /* Fee Inputs inside Simple Cards */
        .simple-card-fees {
            display: flex;
            gap: 12px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px dashed #e2e8f0;
        }

        .simple-fee-item {
            flex: 1;
        }

        .simple-fee-label {
            display: block;
            font-size: 0.7rem;
            font-weight: 800;
            color: #94a3b8;
            margin-bottom: 4px;
        }

        .simple-fee-input-wrapper {
            position: relative;
        }

        .simple-fee-input-wrapper input {
            width: 100%;
            padding: 8px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 700;
            color: #1e293b;
            background: #f8fafc;
            text-align: center;
        }

        .simple-fee-input-wrapper .input-icon {
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.65rem;
            color: #94a3b8;
            pointer-events: none;
        }

        .calc-comparison-table th:first-child,
        .calc-comparison-table td:first-child {
            width: 200px;
            text-align: right;
            background: #f1f5f9;
            border-left: 2px solid #e2e8f0;
            font-weight: 800;
            color: #475569;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            position: sticky;
            right: 0;
            z-index: 5;
        }

        .calc-comparison-table tr:last-child td {
            border-bottom: 2px solid #e2e8f0;
        }

        .calc-comparison-table th {
            border-top: 2px solid #e2e8f0;
        }

        .calc-comparison-table .fund-col-header {
            position: relative;
            background: #fff;
            padding: 20px 15px;
        }

        .calc-comparison-table .fund-id-badge {
            font-size: 0.7rem;
            background: #f1f5f9;
            padding: 2px 8px;
            border-radius: 4px;
            color: #64748b;
            margin-bottom: 5px;
            display: inline-block;
        }

        .calc-comparison-table .remove-fund-btn {
            position: absolute;
            top: 5px;
            left: 5px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #fee2e2;
            color: #ef4444;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .calc-comparison-table .remove-fund-btn:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.1);
        }

        .calc-comparison-table .main-val-cell {
            font-size: 1.25rem;
            font-weight: 900;
            color: #1e1b4b;
        }

        .calc-comparison-table .stat-val-cell {
            font-size: 1rem;
            font-weight: 800;
            color: #334155;
        }

        #addCompareBtnContainer button {
            background: #f1f5f9;
            border: 2px dashed #cbd5e1;
            color: #64748b;
            font-weight: 800;
            font-size: 0.95rem;
            padding: 14px 28px;
            border-radius: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        #addCompareBtnContainer button:hover {
            border-color: #6366f1;
            background: #f8fafc;
            color: #6366f1;
            transform: translateY(-2px);
        }

        @media (max-width: 1024px) {
            .calc-fund-comparison-row {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .calc-top-row {
                grid-template-columns: 1fr;
            }
        }

        @media print {
            body {
                margin: 0;
                padding: 0;
                background: white;
                color: black;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            .controls-wrapper,
            .risk-top-bar,
            .search-row-container,
            .chat-input-area,
            .print-btn,
            .view-toggle-btn,
            .info-icon-container,
            .select2-container,
            .select-checkbox,
            .metric-tooltip,
            .toggle-icon,
            button,
            .fees-toggle-btn,
            .close-comp-btn {
                display: none !important;
            }

            .company-logo-top {
                display: block !important;
                position: absolute;
                top: 0;
                left: 0;
                height: 70px;
                width: auto;
            }

            header,
            footer,
            .url-header,
            .date-footer {
                display: none !important;
            }

            .container {
                box-shadow: none;
                border: none;
                padding: 0;
                width: 100%;
                max-width: 100%;
                margin: 0;
                min-height: auto;
                display: block;
                position: relative;
                border-top: none;
            }

            .header {
                display: block !important;
                margin-bottom: 20px;
                margin-top: 20px;
            }

            .header img.main-logo {
                display: block !important;
                height: 120px;
                width: auto;
                margin: 0 auto 10px auto;
            }

            .header h1 {
                display: block !important;
                font-size: 2rem;
                color: var(--primary) !important;
                margin: 0;
            }

            .header h2 {
                display: block !important;
                font-size: 1rem;
                color: #666 !important;
                margin-top: 5px;
            }

            #reportContent {
                display: block !important;
            }

            table {
                page-break-inside: auto;
                width: 100%;
                border: 1px solid #e2e8f0;
                font-size: 0.85rem;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            tr {
                page-break-inside: avoid;
            }

            thead {
                display: table-header-group;
            }

            tfoot {
                display: table-footer-group;
            }

            th {
                background-color: #f1f5f9 !important;
                color: #0f172a !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            td {
                color: #334155 !important;
                border-bottom: 1px solid #e2e8f0 !important;
            }

            tr.avg-row td {
                background-color: #f8fafc !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            table.comparison-table th:first-child,
            table.comparison-table td:first-child {
                background-color: #f8fafc !important;
                color: #0f172a !important;
                position: static !important;
                display: table-cell;
                width: auto !important;
                min-width: auto !important;
                border: 1px solid #cbd5e1;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            table.mass-table th:first-child,
            table.mass-table td:first-child {
                display: none;
            }

            .winner-card,
            .ai-section,
            .report-section-wrapper {
                page-break-inside: avoid;
                border: 1px solid #eee;
                box-shadow: none;
                margin-bottom: 20px;
            }

            .section-desc {
                display: block !important;
                border: none;
                padding: 5px 0;
                margin-bottom: 10px;
            }

            [id^="table-container-"] {
                display: block !important;
                visibility: visible !important;
            }

            table.comparison-table,
            .tab-content,
            #reportTabs {
                display: block !important;
                visibility: visible !important;
                opacity: 1 !important;
            }

            .chat-box {
                height: auto !important;
                max-height: none !important;
                overflow: visible !important;
                border: none;
                padding: 0;
            }

            .star-filled {
                color: #ffc107 !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }

            .star-empty {
                color: #ccc !important;
            }

            .footer-disclaimer {
                display: block !important;
                margin-top: 30px;
                page-break-inside: avoid;
                text-align: center;
                font-size: 0.75rem;
                color: #555;
                border-top: 1px solid #ddd;
                padding-top: 15px;
            }

            .footer-disclaimer img {
                height: 45px;
                margin-top: 10px;
                opacity: 1;
            }

            a {
                text-decoration: none;
                color: black;
            }

            .calc-card,
            .chart-wrapper {
                border: 1px solid #ccc;
                box-shadow: none;
            }

            canvas {
                max-width: 100% !important;
            }
        }

        /* Non-tradable Modal Styles */
        .nontradable-modal {
            width: 90%;
            max-width: 1000px;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
            animation: modalSlide 0.3s ease-out;
        }

        .nontradable-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
        }

        .nontradable-table thead th {
            background: #000 !important;
            color: #fff !important;
            font-weight: 700;
            padding: 15px;
            text-align: right;
            border-bottom: 2px solid #eee;
        }

        .nontradable-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #eee;
            color: #444;
        }

        .nontradable-table tr:hover {
            background: #f1f7ff;
        }

        /* Trigger Row Effects - Specific to comparison-table tbody tr */
        table.comparison-table tbody tr.clickable-row {
            cursor: pointer !important;
            transition: all 0.2s;
            position: relative;
        }

        table.comparison-table tbody tr.clickable-row td {
            cursor: pointer !important;
        }

        table.comparison-table tbody tr.clickable-row:hover td {
            color: #007bff !important;
            background: #f0f7ff !important;
            box-shadow: inset 0 0 0 1px rgba(0, 123, 255, 0.1);
        }

        table.comparison-table tbody tr.clickable-row:active {
            transform: scale(0.99);
            background: #e1efff !important;
        }

        .clickable-row td:first-child {
            color: var(--primary);
            font-weight: 600;
            text-decoration: underline;
        }

        .modal-subtitle {
            font-size: 0.9rem;
            color: #666;
            margin-top: 5px;
        }

        /* --- Portfolio Redesign CSS --- */
        .kpi-container {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .kpi-card {
            background: linear-gradient(135deg, #ffffff 0%, #f9fbfd 100%);
            padding: 15px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            text-align: center;
            border: 1px solid #eef2f6;
            position: relative;
            overflow: hidden;
            transition: transform 0.2s;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .kpi-card:hover {
            transform: translateY(-2px);
        }

        .kpi-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: var(--primary);
        }

        .kpi-card:nth-child(2)::before {
            background: #9b59b6;
        }

        .kpi-card:nth-child(3)::before {
            background: #e67e22;
        }

        .kpi-label {
            font-size: 1.05rem;
            color: #000000;
            font-weight: 700;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            min-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1.2;
        }

        .kpi-value {
            font-size: 1.6rem;
            font-weight: 800;
            color: #2c3e50;
            font-family: 'Rubik', sans-serif;
            letter-spacing: -0.5px;
        }

        .kpi-sub {
            font-size: 0.75rem;
            color: #95a5a6;
            margin-top: 3px;
        }

        .charts-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .chart-box {
            background: white;
            border-radius: 12px;
            padding: 10px 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
            border: 1px solid #f0f0f0;
            display: flex;
            flex-direction: column;
            height: auto;
            min-height: 320px;
        }

        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            border-bottom: 1px solid #f5f5f5;
            padding-bottom: 10px;
        }

        .chart-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #34495e;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .chart-icon {
            background: #eef2f6;
            padding: 6px;
            border-radius: 8px;
        }

        .modern-table-container {
            background: white;
            border-radius: 16px;
            padding: 0;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
            overflow: hidden;
            border: 1px solid #f0f0f0;
        }

        .modern-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 600px;
        }

        .modern-table thead {
            border-bottom: 2px solid #eef2f6;
        }

        .modern-table th {
            background: #000000;
            padding: 15px 20px;
            text-align: right;
            font-size: 0.85rem;
            font-weight: 700;
            color: white;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .modern-table td {
            padding: 15px 20px;
            border-bottom: 1px solid #f5f5f5;
            color: #2c3e50;
            font-size: 0.95rem;
            font-weight: 500;
        }

        .modern-table tr:last-child td {
            border-bottom: none;
        }

        .modern-table tr:hover td {
            background: #fbfbfb;
        }

        .modal-content.portfolio-modal {
            max-width: 1400px !important;
            background: #f4f6f9 !important;
        }

        .empty-state-modern {
            text-align: center;
            padding: 60px 20px;
            color: #bdc3c7;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            border: 2px dashed #e0e0e0;
            border-radius: 16px;
            margin: 20px;
            background: rgba(255, 255, 255, 0.5);
        }

        .empty-icon-circle {
            width: 100px;
            height: 100px;
            background: #ecedf0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            margin-bottom: 20px;
            color: #95a5a6;
        }

        @media (max-width: 1100px) {
            .kpi-container {
                grid-template-columns: 1fr;
            }

            .charts-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Fix for Fund Modal overlap */
        #fundModal {
            z-index: 2200 !important;
        }

        /* --- New Buttons Grid Layout --- */
        .buttons-grid-row {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 15px;
            width: 100%;
            align-items: center;
            margin-top: 5px;
        }

        #mixGeneratorModal {
            z-index: 2100 !important;
        }

        /* Mix Generator Select2 Font Fix */
        #mixGeneratorModal .select2-search__field {
            font-size: 0.85rem !important;
        }

        .buttons-grid-row button {
            width: 100%;
            height: 52px;
            /* Fixed height for uniformity */
            margin: 0 !important;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0;
            /* Let flex center the content */
            font-size: 1rem;
            white-space: nowrap;
        }


        /* Default Desktop Style for Currency Text */
        .geo-exposure-text {
            font-size: 1.1rem;
            font-weight: bold;
            color: #2c3e50;
            margin-top: 10px;
            text-align: center;
        }

        /* =========================================
   📱 Mobile Responsive Styles (Refined)
   ========================================= */
        @media (max-width: 900px) {

            /* --- Global Reductions for Overview --- */
            body {
                padding: 5px;
            }

            /* Minimized padding */
            h1 {
                font-size: 1.3rem;
                margin-bottom: 5px;
            }

            /* Smaller Title */
            h2 {
                font-size: 0.9rem;
                margin-top: 2px;
            }

            .header img.main-logo {
                height: 80px;
            }

            /* Smaller Logo */

            .company-logo-top {
                height: 40px;
                top: 5px;
                left: 5px;
            }

            /* Compact Buttons */
            .buttons-grid-row button,
            button.action-btn,
            button.synth-btn-top,
            button.risk-btn,
            button.calc-btn {
                height: 42px;
                /* Reduced height */
                font-size: 0.95rem;
            }

            /* Basic Layout Adjustments */
            .container {
                padding: 10px;
                width: 100%;
                border-radius: 0;
                box-shadow: none;
                border-top: none;
                min-height: auto;
            }

            /* Top Action Bar (Buttons) */
            .risk-top-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                padding: 0;
            }

            .buttons-grid-row {
                grid-template-columns: 1fr;
                gap: 8px;
                width: 100%;
                margin-top: 0;
            }

            /* Filters Section - Compact */
            .controls-wrapper {
                padding: 10px;
                margin-bottom: 15px;
            }

            .filters-row {
                grid-template-columns: 1fr;
                gap: 10px;
                margin-bottom: 15px;
            }

            .search-row-container {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }

            /* Select2 Size Fix */
            .select2-container .select2-selection--single,
            .select2-container .select2-selection--multiple {
                height: 42px !important;
                min-height: 42px !important;
                max-height: 42px !important;
            }

            .select2-container--default .select2-selection--single .select2-selection__rendered {
                line-height: 42px !important;
            }

            .select2-container--default .select2-selection--single .select2-selection__arrow {
                height: 40px !important;
            }

            /* Info Icon & Reset */
            .info-icon-container {
                position: relative;
                top: auto;
                left: auto;
                margin-bottom: 10px;
                justify-content: flex-end;
            }

            /* --- Sticky Fund Names (Mass View - Only for main table) --- */
            .mass-table th:nth-child(2),
            .mass-table td:nth-child(2) {
                position: sticky;
                right: 0;
                z-index: 5;
                background-color: #fff;
                border-right: 2px solid #ddd;
            }

            .mass-table th:nth-child(2) {
                background-color: var(--primary);
                color: white;
                z-index: 6;
            }

            .mass-table th:nth-child(1),
            .mass-table td:nth-child(1) {
                position: sticky;
                right: -1px;
                background-color: #f9f9f9;
                z-index: 5;
            }

            .mass-table th:nth-child(1) {
                z-index: 6;
                background-color: var(--primary);
            }


            /* --- Compact Modals (Mix & Portfolio) --- */
            .modal-content {
                width: 98% !important;
                max-width: 98% !important;
                margin: 5px auto;
                max-height: 90vh;
                /* More height */
            }

            .modal-body {
                padding: 10px;
                overflow-y: auto;
            }

            /* FORCE Column Layout for Mix Generator & Portfolio Analysis */
            /* Removed forced column layout to allow side-by-side on desktop/large tablets */
            #mixGeneratorModal .modal-body>div,
            #portfolioModal .modal-body .calc-layout {
                flex-direction: column !important;
                gap: 15px !important;
            }

            #mixGeneratorModal .modal-body>div>div:first-child,
            #portfolioModal .calc-sidebar {
                width: 100% !important;
                flex: none !important;
                max-width: none !important;
                min-width: 0 !important;
            }

            /* --- TABLE CARD VIEW (For Modals Only) --- */
            /* This transforms tables in modals to cards to avoid horizontal scroll */
            .modal-content .modern-table-container table,
            .modal-content .modern-table-container thead,
            .modal-content .modern-table-container tbody,
            .modal-content .modern-table-container th,
            .modal-content .modern-table-container td,
            .modal-content .modern-table-container tr {
                display: block;
            }

            .modal-content .modern-table-container thead {
                display: none;
            }

            .modal-content .modern-table-container tr {
                margin-bottom: 12px;
                border: 1px solid #e0e0e0;
                border-radius: 8px;
                padding: 10px;
                background: #fff;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }

            .modal-content .modern-table-container td {
                border: none !important;
                padding: 4px !important;
                position: relative;
                flex: 1 1 45%;
                /* 2 columns of data */
                display: flex;
                flex-direction: column;
                align-items: center;
                /* Center align for card look */
                text-align: center !important;
                font-size: 0.9rem;
            }

            /* Name Row - Full Width */
            .modal-content .modern-table-container td:first-child {
                flex: 1 1 100%;
                border-bottom: 1px solid #f0f0f0 !important;
                padding-bottom: 8px !important;
                margin-bottom: 5px;
                font-weight: bold;
                color: var(--primary);
                text-align: right !important;
                /* Keep name right aligned */
                align-items: flex-start;
            }

            .modal-content .modern-table-container td:first-child:before {
                content: none;
            }

            /* Add labels via CSS - Fix Direction */
            .modal-content .modern-table-container td:before {
                direction: rtl;
                unicode-bidi: embed;
                text-align: right;
            }

            .modal-content .modern-table-container td:nth-child(2):before {
                content: "משקל";
                font-size: 0.7em;
                color: #888;
                display: block;
                margin-bottom: 2px;
            }

            .modal-content .modern-table-container td:nth-child(3):before {
                content: "חודש";
                font-size: 0.7em;
                color: #888;
                display: block;
                margin-bottom: 2px;
            }

            .modal-content .modern-table-container td:nth-child(4):before {
                content: "שנה";
                font-size: 0.7em;
                color: #888;
                display: block;
                margin-bottom: 2px;
            }

            .modal-content .modern-table-container td:nth-child(5):before {
                content: "3 שנים";
                font-size: 0.7em;
                color: #888;
                display: block;
                margin-bottom: 2px;
            }

            .modal-content .modern-table-container td:nth-child(6):before {
                content: "5 שנים";
                font-size: 0.7em;
                color: #888;
                display: block;
                margin-bottom: 2px;
            }

            /* Reset specific table styles that conflict */
            .modal-content table {
                min-width: 0 !important;
                width: 100% !important;
            }

            .modal-content .modern-table-container {
                overflow-x: visible !important;
            }

            /* Allow flow */

            /* --- End of Card View --- */

            /* Compact Inputs within Modals */
            .calc-card {
                padding: 10px;
                margin-bottom: 10px;
            }

            .input-row {
                margin-bottom: 8px;
            }

            .input-row label {
                font-size: 0.85rem;
            }

            .input-wrapper input {
                padding: 8px;
                font-size: 1rem;
            }

            /* Touch friendly inputs */

            /* Allow Side-by-Side Inputs on Mobile for Density - IF it fits */
            #interestCalculatorModal .input-row,
            #portfolioModal .input-row {
                display: flex;
                flex-wrap: wrap;
                /* Wrap if too small */
                align-items: center;
                justify-content: space-between;
                gap: 5px;
            }

            #interestCalculatorModal .input-row label {
                flex: 1 0 auto;
                margin-bottom: 0;
            }

            #interestCalculatorModal .input-wrapper {
                flex: 1 1 120px;
            }

            /* Min width for input */


            /* Polish: Reduced Chart Size for Mobile */
            .chart-wrapper {
                height: 200px;
                padding: 5px;
            }

            .chart-title {
                font-size: 0.95rem;
            }

            /* Polish: Stack Mix Generator Inputs */
            .synth-controls {
                flex-direction: column !important;
                gap: 10px !important;
            }

            .synth-controls>div {
                width: 100% !important;
            }

            /* KPI Compact */
            .kpi-container {
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }

            .kpi-card {
                padding: 8px;
            }

            .kpi-value {
                font-size: 1.2rem;
            }

            .kpi-label {
                font-size: 0.7rem;
                min-height: auto;
            }

            /* Resize Portfolio Charts to Small Squares (Center Aligned) */
            /* User wants reduced WIDTH and HEIGHT equally */
            .charts-grid {
                grid-template-columns: 1fr;
                /* Stacked */
                gap: 15px;
            }

            .chart-box {
                width: 240px !important;
                /* Fixed width small square */
                height: 240px !important;
                /* Fixed height square */
                margin: 0 auto;
                /* Center it */
                display: flex;
                flex-direction: column;
            }

            /* Ensure internal canvas container fits */
            .chart-box>div:last-child {
                flex: 1;
                position: relative;
                height: 100%;
            }

            /* Currency Exposure Text on Mobile */
            .geo-exposure-text {
                font-size: 0.9rem !important;
                margin-top: 5px;
            }

            /* Report */
            #reportContent>div:not(.ai-section):not(.winner-card):not(.risk-warning-banner) {
                overflow-x: auto;
            }

            table {
                min-width: 600px;
            }

            /* Comparison Table keep scroll, but sticky */
            table.comparison-table th:first-child,
            table.comparison-table td:first-child {
                position: sticky;
                right: 0;
                background: #f1f1f1;
                z-index: 10;
                max-width: 110px;
                min-width: 110px;
                font-size: 0.85rem;
            }

            table.comparison-table th:first-child {
                background: var(--primary);
                color: white;
            }
        }

        @media (max-width: 480px) {
            .buttons-grid-row button {
                font-size: 0.85rem;
            }

            h1 {
                font-size: 1.1rem;
            }

            /* On very small screens, maybe single KPi? */
            .kpi-container {
                grid-template-columns: 1fr 1fr;
            }

            /* stick to 2cols, usually fine */

            /* Ensure card data items don't squash */
            .modal-content .modern-table-container td {
                flex: 1 1 40%;
            }
        }

        /* === Animated ProData Logo === */
        .animated-prodata-wrapper {
            width: 100%;
            max-width: 56rem;
            margin: 0.25rem auto 0 auto;
            position: relative;
            display: block;
        }

        .animated-prodata-wrapper svg {
            display: block;
            width: 100%;
            height: auto;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
            transition: transform 0.2s ease;
        }

        .animated-prodata-header-wrapper:hover .animated-prodata-wrapper svg {
            transform: scale(1.02);
        }

        .animated-prodata-header-wrapper {
            cursor: pointer;
            border-radius: 16px;
            display: block;
            max-width: 56rem;
            margin: 0 auto;
            padding: 6px 8px;
            transition: background 0.2s;
        }

        .animated-prodata-header-wrapper:hover {
            background: rgba(0, 35, 102, 0.04);
        }

        .animated-bar {
            transition: all 1200ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        .animated-subtitle {
            text-align: center;
            color: #111;
            font-weight: 600;
            font-size: 1rem;
            letter-spacing: 0.05em;
            margin: 2px 0 8px 0;
            font-family: system-ui, -apple-system, sans-serif;
        }

        /* === End Animated ProData Logo === */

        /* === Default Dashboard Styles === */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 30px;
            animation: fadeIn 0.8s ease-out;
        }

        @media (max-width: 1024px) {
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .dashboard-grid {
                grid-template-columns: 1fr;
            }
        }

        .mini-table-card {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 1.5rem;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .mini-table-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15);
        }

        .mini-table-header {
            padding: 15px;
            background: rgba(248, 250, 252, 0.8);
            border-bottom: 1px solid #e2e8f0;
        }

        .mini-table-header select {
            width: 100%;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid #cbd5e1;
            font-size: 0.85rem;
            margin-bottom: 8px;
            background: white;
            color: #1e293b;
            font-weight: 600;
        }

        /* Select2 Fix for Mini-Table Header (Definitive Override) */
        .select2-container.mini-table-select2-container .select2-selection--single {
            height: 35px !important;
            min-height: 35px !important;
            max-height: 35px !important;
            border-radius: 8px !important;
            border: 1px solid #cbd5e1 !important;
            margin-bottom: 8px !important;
            background: white !important;
            display: flex !important;
            align-items: center !important;
            box-shadow: none !important;
        }

        .select2-container.mini-table-select2-container .select2-selection--single .select2-selection__rendered {
            line-height: 33px !important;
            padding: 0 10px !important;
            font-size: 0.85rem !important;
            font-weight: 600 !important;
            color: #1e293b !important;
            text-align: right !important;
        }

        .select2-container.mini-table-select2-container .select2-selection--single .select2-selection__arrow {
            height: 33px !important;
            top: 1px !important;
            left: 5px !important;
            right: auto !important;
        }

        /* Remove Scrollbar from Mini-Table Dropdowns */
        .mini-table-results-no-scroll .select2-results > .select2-results__options {
            max-height: none !important;
        }

        .mini-table-container {
            flex: 1;
            overflow-x: auto;
            overflow-y: auto;
            max-height: 500px;
            padding: 0;
        }

        .mini-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }

        .mini-table th {
            background: #f1f5f9;
            color: #475569;
            font-weight: 700;
            text-align: right;
            padding: 10px 12px;
            white-space: nowrap;
            position: sticky;
            top: 0;
        }

        .mini-table td {
            padding: 10px 8px;
            border-bottom: 1px solid #e2e8f0;
            color: #334155;
            font-size: 0.95rem;
        }

        .mini-table tr:hover {
            background: rgba(99, 102, 241, 0.05);
        }

        .mini-table .fund-name {
            font-weight: 700;
            color: #1e293b;
            cursor: pointer;
            transition: color 0.2s;
        }

        .mini-table .fund-name:hover {
            color: #6366f1;
            text-decoration: underline;
        }

        .mini-table .yield-val {
            font-family: 'Rubik', sans-serif;
            font-weight: 800;
            font-size: 1.1rem;
            text-align: center;
        }

        .mini-table .yield-positive {
            color: #10b981;
        }

        .mini-table .yield-negative {
            color: #f43f5e;
        }

        .mini-table-footer {
            padding: 10px;
            text-align: center;
            background: #f8fafc;
            border-top: 1px solid #f1f5f9;
        }

        .add-to-search-btn {
            background: #6366f1;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s;
        }

        .add-to-search-btn:hover {
            background: #4f46e5;
        }

/* === Mix Generator Modal Styles (Extracted from inline) === */
.section-vis-btn {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}
.section-vis-btn:hover { background: var(--primary); color: white; }
.section-vis-btn.active-vis { background: var(--secondary); color: white; border-color: var(--secondary); }
.section-chart-container { background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eee; margin-top: 10px; height: 350px; position: relative; }
#mixGeneratorModal .modal-body { padding: 12px !important; }
#mixGeneratorModal .calc-card { padding: 12px !important; margin-bottom: 8px !important; }
.mix-sidebar { flex: 0 0 320px; display: flex; flex-direction: column; gap: 8px !important; }
.mix-manager-row { display: flex !important; gap: 10px !important; align-items: center !important; }
#mixGeneratorModal .select2-container--default .select2-selection--single,
#mixGeneratorModal .select2-container--default .select2-selection--multiple { border-radius: 12px !important; border-color: #e0f2f1 !important; min-height: 36px !important; display: flex !important; align-items: center !important; }
#mixGeneratorModal .select2-selection__rendered { line-height: normal !important; display: flex !important; align-items: center !important; padding-top: 0 !important; padding-bottom: 0 !important; }
.mix-period-row { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; padding: 6px 10px !important; background: #00796b !important; border-radius: 10px !important; margin-bottom: 10px !important; }
.mix-period-row label { color: white !important; margin-bottom: 0 !important; font-size: 0.75rem !important; white-space: nowrap !important; }
.period-selector-group { background: rgba(255,255,255,0.2) !important; padding: 2px !important; }
.period-selector-group label { padding: 3px 6px !important; font-size: 0.7rem !important; color: white !important; }
.period-selector-group input[type="radio"]:checked+label { background: white !important; color: #00796b !important; }
.mix-exposure-list { display: flex; flex-direction: column; gap: 6px !important; margin-bottom: 8px !important; }
.compact-row { padding: 6px 10px !important; background: white; border-radius: 10px; border: 1px solid #e0f2f1; display: flex; justify-content: space-between; align-items: center; }
.compact-row .row-header { display: flex; align-items: center; gap: 8px; flex: 1; }
.compact-row label { font-size: 0.8rem !important; color: #00695c !important; margin: 0 !important; font-weight: 700 !important; }
.small-wrapper { width: 80px; position: relative; }
.small-wrapper input { height: 28px !important; font-size: 0.85rem !important; padding: 4px 8px !important; text-align: center; }
.small-wrapper .input-icon { left: 6px !important; font-size: 0.7rem !important; color: #00695c !important; }
#mixGeneratorModal .input-row:not(.compact-row):not(.mix-period-row) { background: white; padding: 8px 12px; border-radius: 12px; border: 1px solid #e0f2f1; margin-bottom: 8px; position: relative; }
#mixGeneratorModal .input-row label { display: block; margin-bottom: 4px; color: #00695c; font-weight: 700; font-size: 0.8rem; }
.mix-num-funds-wrapper .select2-selection__rendered { font-size: 0.78rem !important; padding-right: 4px !important; padding-left: 15px !important; display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; }
#mixGeneratorModal .select2-selection--multiple { max-height: 80px !important; overflow-y: auto !important; padding: 2px 4px !important; }
#mixGeneratorModal .select2-selection--single { height: 36px !important; }
#mixGeneratorModal .input-row { position: relative !important; }
#mixGeneratorModal .small-wrapper { position: relative !important; }
#mixGeneratorModal .input-icon { position: absolute !important; top: 50% !important; transform: translateY(-50%) !important; z-index: 5; }

/* --- System Info Modal Styles --- */
#systemInfoModal .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.info-accordion-item.active {
    border-color: #6366f1 !important;
    box-shadow: 0 4px 15px -1px rgba(99, 102, 241, 0.1);
}

.info-accordion-item.active button i[data-lucide="chevron-down"] {
    transform: rotate(180deg);
}

.info-accordion-content {
    transition: all 0.3s ease;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-section h3 {
    letter-spacing: -0.01em;
}

.info-icon {
    transition: all 0.2s;
}

.info-icon:hover {
    transform: scale(1.1);
    background-color: var(--secondary);
    cursor: pointer;
}

/* --- Driver.js Tutorial Overrides --- */
.driver-popover {
    max-width: 450px !important; /* Slightly wider for better readability */
}

.driver-popover-title {
    font-size: 1.5rem !important; /* Larger title */
    font-weight: 800 !important;
    margin-bottom: 15px !important;
    color: var(--primary) !important;
}

.driver-popover-description {
    font-size: 1.25rem !important; /* Larger description text */
    line-height: 1.6 !important;
    color: #334155 !important;
}

.driver-popover-footer button {
    font-size: 1.1rem !important; /* Larger button text */
    padding: 8px 16px !important;
    font-family: 'Rubik', sans-serif !important;
}

.driver-popover-progress-text {
    font-size: 1rem !important; /* Larger progress text */
    font-weight: 600 !important;
}

/* Why ProData? Button */
.why-prodata-container {
    margin: 25px auto 10px;
    text-align: center;
}

.why-prodata-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #002366 0%, #0056b3 100%);
    color: white !important;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 35, 102, 0.2);
    border: none;
    cursor: pointer;
}

.why-prodata-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 35, 102, 0.3);
    background: linear-gradient(135deg, #001a4d 0%, #004494 100%);
}
