
        /* ===== Navbar-Schutz: Globale Link-/Color-Overrides aus layout.html neutralisieren ===== */
        /* Auf nicht-Portal-Seiten faerbt layout.html alle <a> blau und erzwingt color:inherit
           via !important auf .inline-flex und [class*="hover:text"]. Diese Regeln hier sind
           spezifischer (#main-navbar ...) und stellen die Tailwind-Klassen der Nav-Buttons wieder her. */

        /* ===== Markenzeichen "Aionity Markets": Wortmarke in der Farbe des Icons ===== */
        #main-navbar .nav-brand {
            gap: 0;
            color: #159FEA;
        }
        #main-navbar .nav-brand-wordmark {
            width: 11.762rem;
            height: 2.182rem;
            margin-bottom: -0.082rem;
            flex: none;
            display: block;
            object-fit: contain;
        }
        html.theme-light #main-navbar .nav-brand { color: #159FEA; }

        /* 1) Nav-Links sollen NICHT global blau sein */
        #main-navbar a {
            color: inherit;
            text-decoration: none;
        }

        /* 2) Nav-Buttons: Tailwind-Farben wiederherstellen (schlaegt globale !important) */
        #main-navbar .nav-buttons-group a {
            color: #cbd5e1 !important; /* slate-300 */
            transition: all 0.2s ease;
        }
        #main-navbar .nav-buttons-group a:hover {
            color: #ffffff !important; /* white */
        }
        #main-navbar .nav-buttons-group a[aria-current="page"] {
            color: #ffffff !important; /* white */
        }

        /* Aktiver Nav-Punkt in Markets-Blau. Bewusst als eigene Regel und nicht ueber
           Tailwind-Utilities: in der kompilierten tailwind.css stehen nur die frueher
           benutzten Farbklassen zur Verfuegung. */
        #main-navbar .nav-buttons-group a.nav-pill-active {
            background-image: linear-gradient(90deg, rgba(37,99,235,0.30), rgba(56,189,248,0.16)) !important;
            border-color: rgba(59,130,246,0.38) !important;
            box-shadow: 0 0 14px rgba(59,130,246,0.13) !important;
        }
        /* Attribut zusaetzlich, damit diese Regel die weiter unten stehende
           lila Light-Theme-Regel fuer a[aria-current="page"] sicher schlaegt. */
        html.theme-light #main-navbar .nav-buttons-group a.nav-pill-active[aria-current="page"] {
            background-image: linear-gradient(90deg, rgba(37,99,235,0.12), rgba(56,189,248,0.08)) !important;
            border-color: rgba(37,99,235,0.30) !important;
            box-shadow: 0 0 10px rgba(37,99,235,0.08) !important;
            color: #1e293b !important;
            font-weight: 600 !important;
        }

        /* 3) Login-Button, Discord-Button und Sprach-Selector schuetzen */
        #main-navbar a[data-portal-login-link],
        #main-navbar a[data-portal-login-link] *,
        #main-navbar #portal_discord_menu_button,
        #main-navbar #portal_discord_menu_button *,
        #main-navbar #language_selector_button,
        #main-navbar #language_selector_button * {
            color: inherit !important;
        }

        /* 4) Discord-Dropdown-Links schuetzen */
        #main-navbar #portal_discord_dropdown a,
        #main-navbar #portal_discord_dropdown button {
            color: #cbd5e1 !important; /* slate-300 */
            text-decoration: none !important;
        }
        #main-navbar #portal_discord_dropdown a:hover,
        #main-navbar #portal_discord_dropdown button:hover {
            color: #ffffff !important;
        }

        /* Light theme: Discord dropdown text colors */
        html.theme-light #main-navbar #portal_discord_dropdown a,
        html.theme-light #main-navbar #portal_discord_dropdown button {
            color: #334155 !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown a:hover,
        html.theme-light #main-navbar #portal_discord_dropdown button:hover {
            color: #0f172a !important;
            background-color: rgba(139, 92, 246, 0.06) !important;
        }

        /* Light theme: Logout-Link rot sichtbar (überschreibt generischen Slate-Override) */
        html.theme-light #main-navbar #portal_discord_dropdown a[data-portal-logout-btn],
        html.theme-light #main-navbar #portal_discord_dropdown a[href="/portal/logout"] {
            color: #dc2626 !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown a[data-portal-logout-btn] svg,
        html.theme-light #main-navbar #portal_discord_dropdown a[href="/portal/logout"] svg {
            color: #dc2626 !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown a[data-portal-logout-btn]:hover,
        html.theme-light #main-navbar #portal_discord_dropdown a[href="/portal/logout"]:hover {
            color: #b91c1c !important;
            background-color: rgba(220, 38, 38, 0.10) !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown a[data-portal-logout-btn]:hover svg,
        html.theme-light #main-navbar #portal_discord_dropdown a[href="/portal/logout"]:hover svg {
            color: #b91c1c !important;
        }

        /* Light theme: navbar buttons + discord + language */
        html.theme-light #main-navbar .nav-buttons-group a {
            color: #334155 !important;
            background: transparent !important;
            border-color: transparent !important;
        }
        html.theme-light #main-navbar .nav-buttons-group a:hover {
            color: #4f46e5 !important;
            background: rgba(139, 92, 246, 0.08) !important;
            border-color: rgba(139, 92, 246, 0.18) !important;
        }
        /* Theme-Toggle Button (ausgeloggt) im Light-Mode */
        html.theme-light #main-navbar #navbar-theme-toggle {
            background: rgba(255, 255, 255, 0.85) !important;
            border-color: rgba(15, 23, 42, 0.12) !important;
            color: #475569 !important;
        }
        html.theme-light #main-navbar #navbar-theme-toggle:hover {
            background: rgba(139, 92, 246, 0.08) !important;
            border-color: rgba(139, 92, 246, 0.25) !important;
            color: #7c3aed !important;
        }
        /* Standard (dark): Subtiler Hover */
        #main-navbar #navbar-theme-toggle:hover {
            background: rgba(30, 41, 59, 0.7) !important;
            color: #ffffff !important;
        }
        /* Kein Focus-Ring nach Klick (sonst bleibt nach Theme-Wechsel ein Outline). */
        #main-navbar #navbar-theme-toggle:focus,
        #main-navbar #navbar-theme-toggle:focus-visible,
        #main-navbar #navbar-theme-toggle:active {
            outline: none !important;
            box-shadow: none !important;
        }

        html.theme-light #main-navbar .nav-buttons-group a[aria-current="page"] {
            color: #1e293b !important;
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1)) !important;
            border-color: rgba(139, 92, 246, 0.3) !important;
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.08) !important;
            font-weight: 600 !important;
        }
        html.theme-light #main-navbar #portal_discord_menu_button {
            background-color: rgba(88, 101, 242, 0.08) !important;
            border-width: 0 !important;
            border-color: transparent !important;
            cursor: pointer !important;
        }
        html.theme-light #main-navbar #portal_discord_menu_button:hover {
            background-color: rgba(88, 101, 242, 0.15) !important;
            border-width: 2px !important;
            border-color: rgba(88, 101, 242, 0.6) !important;
            box-shadow: 0 0 15px rgba(88, 101, 242, 0.3) !important;
        }
        html.theme-light #main-navbar #portal_discord_menu_button.dropdown-open,
        html.theme-light #main-navbar #portal_discord_menu_button.dropdown-open:hover {
            background-color: rgba(88, 101, 242, 0.15) !important;
            border-width: 2px !important;
            border-color: rgba(88, 101, 242, 0.8) !important;
            box-shadow: 0 0 15px rgba(88, 101, 242, 0.3) !important;
        }
        html.theme-light #main-navbar #portal_discord_menu_button span {
            color: #4f54c4 !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown {
            background: #ffffff !important;
            border-color: rgba(15, 23, 42, 0.12) !important;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown .border-slate-700\/60 {
            border-color: rgba(15, 23, 42, 0.08) !important;
        }
        html.theme-light #main-navbar #portal_discord_dropdown svg {
            color: #64748b !important;
        }
        html.theme-light #main-navbar #language_selector_button {
            color: #475569 !important;
            background: transparent !important;
            border-color: transparent !important;
        }
        html.theme-light #main-navbar #language_selector_button:hover {
            background: rgba(15, 23, 42, 0.06) !important;
            border-color: rgba(15, 23, 42, 0.08) !important;
        }
        html.theme-light #main-navbar #language_selector_dropdown {
            background: #ffffff !important;
            border-color: rgba(15, 23, 42, 0.12) !important;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
        }
        html.theme-light #main-navbar #language_selector_dropdown button {
            color: #334155 !important;
        }
        html.theme-light #main-navbar #language_selector_dropdown button:hover {
            color: #0f172a !important;
            background-color: rgba(139, 92, 246, 0.06) !important;
        }
        /* Light theme: gradient title remains colorful */
        html.theme-light .gradient-title {
            -webkit-text-fill-color: transparent !important;
        }

        /* 5) Sprach-Dropdown schuetzen */
        #main-navbar #language_selector_dropdown button {
            color: #cbd5e1 !important;
        }
        #main-navbar #language_selector_dropdown button:hover {
            color: #ffffff !important;
        }

        #main-navbar .nav-shell {
            max-width: 1400px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
        #main-navbar > .nav-shell.nav-shell {
            max-width: 1400px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
        #main-navbar .nav-main-container {
            justify-content: space-between !important;
        }
        #main-navbar .nav-buttons-group {
            flex: 1 1 auto;
            justify-content: center;
        }
        #main-navbar .nav-right-group {
            margin-left: auto;
            justify-content: flex-end;
        }

        /* ===== Responsive Rules ===== */
        @media (max-width: 759px) {
            #main-navbar .nav-shell {
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }
            #main-navbar .nav-main-container {
                justify-content: space-between !important;
                gap: 1rem !important;
            }
            #main-navbar .nav-buttons-group {
                display: none !important;
            }
            #main-navbar .nav-buttons-group > :not([hidden]) ~ :not([hidden]) {
                margin-left: 0.5rem !important;
            }
            #main-navbar .nav-buttons-group a {
                padding-left: 0.85rem !important;
                padding-right: 0.85rem !important;
                font-size: 0.875rem !important;
                white-space: nowrap;
            }
        }
        @media (max-width: 879px) {
            #main-navbar .nav-main-container {
                gap: 0.75rem !important;
            }
            #main-navbar .nav-buttons-group > :not([hidden]) ~ :not([hidden]) {
                margin-left: 0.25rem !important;
            }
            #main-navbar .nav-buttons-group a {
                padding-left: 0.7rem !important;
                padding-right: 0.7rem !important;
                font-size: 0.82rem !important;
            }
        }
        /* Unter 700px: Alle Nav-Buttons ausblenden */
        @media (max-width: 699px) {
            .nav-buttons-group {
                display: none !important;
            }
        }
        /* Unter 480px: Login-Button kleiner */
        @media (max-width: 479px) {
            #main-navbar {
                min-width: 0 !important;
            }
            #main-navbar .nav-shell {
                padding-left: 0.5rem !important;
                padding-right: 0.5rem !important;
            }
            #main-navbar .nav-main-container {
                justify-content: space-between !important;
                gap: 0.5rem !important;
            }
            #main-navbar .nav-brand-wordmark {
                width: 8.94rem !important;
                height: auto !important;
                max-width: 143px !important;
            }
            #main-navbar .nav-brand { gap: 0 !important; }
            a[data-portal-login-link] {
                padding: 0.375rem 0.75rem !important;
                height: 34px !important;
                font-size: 0.75rem !important;
                gap: 0.375rem !important;
            }
            #main-navbar #navbar-theme-toggle,
            #main-navbar #language_selector_button {
                width: 34px !important;
                height: 34px !important;
                min-width: 34px !important;
            }
            #main-navbar #language_selector_button {
                padding-left: 0.25rem !important;
                padding-right: 0.25rem !important;
            }
            a[data-portal-login-link] svg {
                width: 1rem !important;
                height: 1rem !important;
            }
        }

        /* ===== Disabled Nav Tooltip (e.g. Charts locked) ===== */
        .nav-disabled-tooltip {
            position: relative;
        }
        .nav-disabled-tooltip::before,
        .nav-disabled-tooltip::after {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: calc(100% + 8px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.14s ease, transform 0.14s ease;
            z-index: 9999;
        }
        .nav-disabled-tooltip::before {
            content: "";
            top: calc(100% + 2px);
            width: 0; height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-bottom: 6px solid rgba(30, 41, 59, 0.95);
        }
        .nav-disabled-tooltip::after {
            content: attr(data-tooltip);
            padding: 6px 12px;
            border-radius: 6px;
            background: rgba(30, 41, 59, 0.95);
            color: #f1f5f9;
            font-size: 0.75rem;
            font-weight: 500;
            white-space: nowrap;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        }
        .nav-disabled-tooltip:hover::before,
        .nav-disabled-tooltip:hover::after {
            opacity: 1;
        }
        /* Light mode: heller Tooltip */
        html.theme-light .nav-disabled-tooltip::before {
            border-bottom-color: rgba(255, 255, 255, 0.98);
            filter: drop-shadow(0 -1px 0 rgba(15, 23, 42, 0.08));
        }
        html.theme-light .nav-disabled-tooltip::after {
            background: #ffffff;
            color: #334155;
            border: 1px solid rgba(15, 23, 42, 0.10);
            box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
        }

        /* ===== Notification Bell ===== */
        #notif-badge:not(.hidden) {
            display: flex !important;
        }
        #notif-dropdown {
            scrollbar-width: thin;
            scrollbar-color: rgba(148,163,184,0.2) transparent;
        }
        #notif-list::-webkit-scrollbar { width: 4px; }
        #notif-list::-webkit-scrollbar-track { background: transparent; }
        #notif-list::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.2); border-radius: 2px; }
        .notif-item {
            --notif-accent: #8b5cf6;
            transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
            cursor: pointer;
            border-radius: 10px;
            margin: 2px 6px;
            background: rgba(15, 23, 42, 0.42);
            border: 1px solid rgba(148, 163, 184, 0.14);
        }
        .notif-item:hover {
            background: rgba(30, 41, 59, 0.62);
            transform: translateX(2px);
            box-shadow: inset 3px 0 0 var(--notif-accent);
            border-color: rgba(148, 163, 184, 0.3);
        }
        .notif-item.notif-unread {
            background: rgba(30, 41, 59, 0.56);
            box-shadow: inset 3px 0 0 var(--notif-accent);
            border-color: rgba(148, 163, 184, 0.28);
        }
        .notif-item .notif-title { color: #e2e8f0; }
        .notif-item.notif-cat-news { --notif-accent: #38bdf8; }
        .notif-item.notif-cat-board { --notif-accent: #f59e0b; }
        .notif-item.notif-cat-aion { --notif-accent: #a78bfa; }
        .notif-item.notif-cat-charts { --notif-accent: #34d399; }
        .notif-item.notif-cat-appointment { --notif-accent: #22d3ee; }
        .notif-item.notif-cat-task { --notif-accent: #34d399; }
        .notif-item.notif-cat-news .notif-title { color: #bae6fd; }
        .notif-item.notif-cat-board .notif-title { color: #fde68a; }
        .notif-item.notif-cat-aion .notif-title { color: #ddd6fe; }
        .notif-item.notif-cat-charts .notif-title { color: #bbf7d0; }
        .notif-item.notif-cat-appointment .notif-title { color: #a5f3fc; }
        .notif-item.notif-cat-task .notif-title { color: #bbf7d0; }
        .notif-item-action {
            width: 26px;
            height: 26px;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 7px;
            color: #64748b;
            opacity: 0.72;
            transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
            cursor: pointer;
        }
        .notif-item:hover .notif-item-action,
        .notif-item-action:focus-visible {
            opacity: 1;
        }
        .notif-item-action:hover {
            color: #c4b5fd;
            background: rgba(139, 92, 246, 0.12);
        }
        .notif-item-action svg {
            width: 15px;
            height: 15px;
            display: block;
        }
        .notif-header-action {
            width: 26px;
            height: 26px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 7px;
            color: #94a3b8;
            transition: color 0.15s ease, background 0.15s ease;
            cursor: pointer;
            text-decoration: none;
        }
        .notif-header-action:hover,
        .notif-header-action:focus-visible {
            color: #c4b5fd;
            background: rgba(139, 92, 246, 0.12);
            outline: none;
        }
        .notif-header-action svg {
            width: 16px;
            height: 16px;
            display: block;
        }
        .notif-event-icon {
            display: inline-flex; align-items: center; justify-content: center;
            width: 28px; height: 28px; flex-shrink: 0;
            border-radius: 7px; background: rgba(30, 41, 59, 0.6);
        }
        .notif-event-icon svg { width: 18px; height: 18px; display: block; stroke-width: 1.5; }
        .notif-event-icon--bull { color: #22c55e; }
        .notif-event-icon--bear { color: #ef4444; }
        .notif-event-icon--neutral { color: #94a3b8; }
        html.theme-light .notif-event-icon { background: rgba(241, 245, 249, 0.9); }
        html.theme-light .notif-event-icon--bull { color: #16a34a; }
        html.theme-light .notif-event-icon--bear { color: #dc2626; }
        html.theme-light .notif-event-icon--neutral { color: #64748b; }
        .notif-chart-exchange {
            display: inline-flex; align-items: center; gap: 6px;
            margin-top: 4px; font-size: 10px; line-height: 1.4;
            color: #94a3b8; font-weight: 500;
        }
        .notif-chart-exchange-icon-wrap {
            width: 14px; height: 14px; border-radius: 999px;
            display: inline-flex; align-items: center; justify-content: center;
            background: rgba(51, 65, 85, 0.75); overflow: hidden; flex-shrink: 0;
        }
        .notif-chart-exchange-icon-wrap img {
            width: 100%; height: 100%; object-fit: contain; display: block;
        }
        .notif-chart-exchange-fallback {
            display: none; width: 100%; height: 100%;
            align-items: center; justify-content: center;
            font-size: 9px; font-weight: 700; color: #e2e8f0;
            text-transform: uppercase;
        }
        .notif-chart-exchange-label { color: #aab6ca; }
        html.theme-light .notif-chart-exchange { color: #64748b; }
        html.theme-light .notif-chart-exchange-icon-wrap { background: rgba(226, 232, 240, 0.95); }
        html.theme-light .notif-chart-exchange-fallback { color: #334155; }
        html.theme-light .notif-chart-exchange-label { color: #475569; }
        .notif-outcome { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 500; border-radius: 4px; padding: 1px 5px; line-height: 1.4; vertical-align: middle; }
        .notif-outcome--pending { color: #facc15; background: rgba(250,204,21,0.1); }
        .notif-outcome--win { color: #4ade80; background: rgba(74,222,128,0.1); }
        .notif-outcome--loss { color: #f87171; background: rgba(248,113,113,0.1); }
        .notif-outcome--neutral { color: #94a3b8; background: rgba(148,163,184,0.1); }
        .notif-winrate { display: inline-flex; align-items: center; font-size: 10px; border-radius: 4px; padding: 1px 5px; line-height: 1.4; color: #94a3b8; background: rgba(148,163,184,0.1); margin-left: 4px; }
        .notif-sltp { display: inline-flex; align-items: center; font-size: 10px; margin-left: 4px; gap: 2px; }
        .notif-sl { color: #f87171; }
        .notif-tp { color: #4ade80; }
        .notif-avg-tp { color: #86efac; opacity: 0.85; }
        .notif-avg-sl { color: #fca5a5; opacity: 0.85; }
        html.theme-light .notif-sl { color: #dc2626; }
        html.theme-light .notif-tp { color: #16a34a; }
        html.theme-light .notif-avg-tp { color: #16a34a; opacity: 0.7; }
        html.theme-light .notif-avg-sl { color: #dc2626; opacity: 0.7; }
        html.theme-light .notif-outcome--pending { color: #ca8a04; background: rgba(202,138,4,0.12); }
        html.theme-light .notif-outcome--win { color: #16a34a; background: rgba(22,163,74,0.1); }
        html.theme-light .notif-outcome--loss { color: #dc2626; background: rgba(220,38,38,0.1); }
        html.theme-light .notif-outcome--neutral { color: #64748b; background: rgba(100,116,139,0.1); }
        .notif-chart-desc { font-size: 11px; color: #94a3b8; line-height: 1.4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
        .notif-chart-entry { font-size: 11px; color: #cbd5e1; line-height: 1.4; margin-top: 3px; font-variant-numeric: tabular-nums; }
        .notif-chart-entry .notif-entry-label { color: #64748b; margin-right: 4px; }
        .notif-chart-entry .notif-entry-value { color: #e2e8f0; font-weight: 500; }
        .notif-chart-entry .notif-indicator { color: #a78bfa; font-weight: 500; }
        .notif-chart-sltp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 10px; margin-top: 4px; line-height: 1.4; font-variant-numeric: tabular-nums; }
        .notif-chart-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 10px; margin-top: 4px; line-height: 1.4; font-variant-numeric: tabular-nums; }
        .notif-sltp-dot { width: 2px; height: 2px; border-radius: 50%; background: rgba(148,163,184,0.4); flex-shrink: 0; }
        .notif-chart-outcome .notif-max-gain { color: #4ade80; display: inline-flex; align-items: center; gap: 2px; }
        .notif-chart-outcome .notif-hold { color: #94a3b8; display: inline-flex; align-items: center; gap: 2px; }
        html.theme-light .notif-chart-desc { color: #64748b; }
        html.theme-light .notif-chart-entry { color: #475569; }
        html.theme-light .notif-chart-entry .notif-entry-label { color: #94a3b8; }
        html.theme-light .notif-chart-entry .notif-entry-value { color: #1e293b; }
        html.theme-light .notif-chart-entry .notif-indicator { color: #7c3aed; }
        html.theme-light .notif-sltp-dot { background: rgba(100,116,139,0.4); }
        html.theme-light .notif-chart-outcome .notif-max-gain { color: #16a34a; }
        html.theme-light .notif-chart-outcome .notif-hold { color: #64748b; }
        html.theme-light .notif-item-action { color: #64748b; }
        html.theme-light .notif-item-action:hover { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }
        html.theme-light .notif-header-action { color: #64748b; }
        html.theme-light .notif-header-action:hover,
        html.theme-light .notif-header-action:focus-visible { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }

        /* Trading-Style colors for chart event notifications */
        .notif-style-badge { display:inline-flex;align-items:center;gap:3px;font-size:9px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:4px;padding:1px 5px;line-height:1.5; }
        .notif-style-badge--scalp    { color:#f97316; background:rgba(249,115,22,.14); }
        .notif-style-badge--intraday { color:#3b82f6; background:rgba(59,130,246,.14); }
        .notif-style-badge--swing    { color:#a855f7; background:rgba(168,85,247,.14); }
        .notif-style-badge--invest   { color:#10b981; background:rgba(16,185,129,.14); }
        .notif-chart-meta-row { display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:3px; }
        .notif-direction-badge { display:inline-flex;align-items:center;gap:2px;font-size:9px;font-weight:700;border-radius:4px;padding:1px 5px;line-height:1.5;text-transform:uppercase;letter-spacing:.04em; }
        .notif-direction-badge--long  { color:#4ade80; background:rgba(74,222,128,.12); }
        .notif-direction-badge--short { color:#f87171; background:rgba(248,113,113,.12); }
        html.theme-light .notif-style-badge--scalp    { color:#ea580c; background:rgba(249,115,22,.1); }
        html.theme-light .notif-style-badge--intraday { color:#2563eb; background:rgba(59,130,246,.1); }
        html.theme-light .notif-style-badge--swing    { color:#9333ea; background:rgba(168,85,247,.1); }
        html.theme-light .notif-style-badge--invest   { color:#059669; background:rgba(16,185,129,.1); }
        html.theme-light .notif-direction-badge--long  { color:#16a34a; background:rgba(22,163,74,.1); }
        html.theme-light .notif-direction-badge--short { color:#dc2626; background:rgba(220,38,38,.1); }

        /* Light theme: improve contrast of chart-event meta row & stats
           (those spans use inline dark-theme colors like #94a3b8/#64748b
           which are unreadable on the light background). */
        html.theme-light .notif-chart-meta-row > span:not(.notif-style-badge):not(.notif-direction-badge) {
            color: #334155 !important;
            font-weight: 600 !important;
        }
        /* Override hard-coded inline colors on muted spans inside notif items */
        html.theme-light .notif-item span[style*="#94a3b8"] { color: #475569 !important; }
        html.theme-light .notif-item span[style*="#64748b"] { color: #475569 !important; }
        /* Body text for news/aion items */
        html.theme-light .notif-item .text-slate-400 { color: #475569 !important; }

        /* Notification dropdown responsive */
        .notif-dropdown-responsive {
            width: 400px;
            max-width: calc(100vw - 1rem);
        }
        #notif-list { max-height: 420px; }
        @media (max-width: 639px) {
            .notif-dropdown-responsive {
                position: fixed !important;
                bottom: auto !important;
                top: var(--shared-mobile-topbar-height, 3rem) !important;
                left: 0 !important;
                right: 0 !important;
                width: 100% !important;
                max-width: 100% !important;
                border-radius: 0 0 1rem 1rem !important;
                margin-top: 0 !important;
                border-top: none !important;
                z-index: 9999 !important;
            }
            #notif-list { max-height: 60vh; }
        }
        @media (min-width: 640px) and (max-width: 759px) {
            .notif-dropdown-responsive {
                position: fixed !important;
                bottom: auto !important;
                top: calc(var(--shared-mobile-topbar-height, 3rem) + 0.5rem) !important;
                left: auto !important;
                right: 0.75rem !important;
                width: min(400px, calc(100vw - 1.5rem)) !important;
                max-width: calc(100vw - 1.5rem) !important;
                border-radius: 1rem !important;
                margin-top: 0 !important;
                z-index: 9999 !important;
            }
            #notif-list { max-height: min(420px, 62vh); }
        }

        /* Light theme bell */
        html.theme-light #notif-bell {
            background-color: transparent !important;
            border-color: rgba(15, 23, 42, 0.1) !important;
            color: #475569 !important;
        }
        html.theme-light #notif-bell:hover {
            background-color: transparent !important;
            color: #1e293b !important;
        }

        /* Mobile (<= 759px): match the bell button's optics to the hamburger
           (#global-mobile-nav-hamburger) so both buttons in #main-navbar's
           right group look identical. */
        @media (max-width: 759px) {
            #main-navbar #notif-bell {
                width: 2.25rem !important;
                height: 2.25rem !important;
                min-width: 2.25rem !important;
                min-height: 2.25rem !important;
                border-radius: 0.5rem !important;
                background: rgba(30, 41, 59, 0.8) !important;
                border: 1px solid rgba(71, 85, 105, 0.55) !important;
                color: #c4b5fd !important;
                transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
            }
            #main-navbar #notif-bell:active {
                transform: scale(0.95);
            }
            #main-navbar #notif-bell svg {
                width: 1.25rem !important;
                height: 1.25rem !important;
            }
            #main-navbar #notif-bell #notif-badge {
                transform: translate(35%, -35%) !important;
                min-width: 16px;
                height: 16px;
                font-size: 9px;
            }
            html.theme-light #main-navbar #notif-bell {
                background: rgba(15, 23, 42, 0.04) !important;
                border-color: rgba(15, 23, 42, 0.12) !important;
                color: #0f172a !important;
            }
        }
        html.theme-light #notif-badge {
            ring-color: #ffffff !important;
            --tw-ring-color: #ffffff !important;
            background-color: #e11d48 !important;  /* rose-600 — weniger grell als red-500 */
            color: #ffffff !important;
            box-shadow:
                0 0 0 2px #ffffff,
                0 2px 6px rgba(225, 29, 72, 0.30) !important;
        }
        /* Mobile topbar bell badge (markets.html, board.html, news.html) */
        html.theme-light .mobile-topbar-notif-badge {
            background: #e11d48 !important;
            box-shadow:
                0 0 0 2px #ffffff,
                0 2px 5px rgba(225, 29, 72, 0.28) !important;
        }
        /* Chart page bell badge */
        html.theme-light #chart-notif-badge {
            background: #e11d48 !important;
            box-shadow:
                0 0 0 2px #ffffff,
                0 2px 5px rgba(225, 29, 72, 0.28) !important;
        }
        html.theme-light #notif-dropdown {
            background: #ffffff !important;
            border-color: rgba(15, 23, 42, 0.12) !important;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
        }
        html.theme-light #notif-dropdown .border-slate-700\/60 {
            border-color: rgba(15, 23, 42, 0.08) !important;
        }
        html.theme-light #notif-dropdown .text-white {
            color: #1e293b !important;
        }
        html.theme-light #notif-dropdown .text-slate-400,
        html.theme-light #notif-dropdown .text-slate-500 {
            color: #64748b !important;
        }
        html.theme-light .notif-item {
            background: rgba(248, 250, 252, 0.96);
            border: 1px solid rgba(148, 163, 184, 0.28);
        }
        html.theme-light .notif-item:hover {
            background: rgba(241, 245, 249, 0.95) !important;
            box-shadow: inset 3px 0 0 var(--notif-accent) !important;
            border-color: rgba(148, 163, 184, 0.4) !important;
        }
        html.theme-light .notif-item.notif-unread {
            background: rgba(241, 245, 249, 0.9) !important;
            box-shadow: inset 3px 0 0 var(--notif-accent) !important;
            border-color: rgba(148, 163, 184, 0.42) !important;
        }
        html.theme-light .notif-item .notif-title { color: #0f172a; }
        html.theme-light .notif-item.notif-cat-news .notif-title { color: #0369a1; }
        html.theme-light .notif-item.notif-cat-board .notif-title { color: #b45309; }
        html.theme-light .notif-item.notif-cat-aion .notif-title { color: #6d28d9; }
        html.theme-light .notif-item.notif-cat-charts .notif-title { color: #047857; }
        html.theme-light .notif-item.notif-cat-appointment .notif-title { color: #0e7490; }
        html.theme-light .notif-item.notif-cat-task .notif-title { color: #047857; }
        /* Calendar event list inside board notifications */
        .notif-cal-events {
            margin-top: 5px;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .notif-cal-event-row {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 10px;
            line-height: 1.3;
            color: #cbd5e1;
        }
        .notif-cal-impact-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .notif-cal-flag { flex-shrink: 0; font-size: 11px; }
        .notif-country-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            min-width: 0;
            color: inherit;
        }
        .notif-country-flag {
            width: 16px;
            height: 12px;
            flex: 0 0 auto;
            border-radius: 2px;
            object-fit: cover;
            background: rgba(148, 163, 184, 0.18);
            box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
        }
        .notif-country-code {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.02em;
            line-height: 1;
            text-transform: uppercase;
        }
        .notif-title-cal {
            display: flex;
            align-items: flex-start;
            gap: 6px;
        }
        .notif-title-cal .notif-country-flag { margin-top: 2px; }
        .notif-cal-event-name {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: #cbd5e1;
        }
        .notif-cal-event-time {
            flex-shrink: 0;
            color: #64748b;
            font-variant-numeric: tabular-nums;
        }
        .notif-cal-event-more {
            font-size: 10px;
            color: #64748b;
            padding-left: 10px;
        }
        .notif-cal-live-meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 5px;
            margin-top: 4px;
            font-size: 10px;
            line-height: 1.35;
            color: #94a3b8;
        }
        .notif-cal-live-values {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-top: 5px;
            font-size: 11px;
            line-height: 1.35;
            font-variant-numeric: tabular-nums;
        }
        .notif-cal-live-value {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }
        .notif-cal-live-label { color: #64748b; }
        .notif-cal-live-num {
            color: #cbd5e1;
            font-weight: 700;
            text-align: right;
            word-break: break-word;
        }
        .notif-cal-live-num--actual { color: #bfdbfe; }
        html.theme-light .notif-cal-event-name { color: #475569; }
        html.theme-light .notif-cal-event-time { color: #94a3b8; }
        html.theme-light .notif-cal-event-more { color: #94a3b8; }
        html.theme-light .notif-cal-live-meta { color: #64748b; }
        html.theme-light .notif-cal-live-label { color: #64748b; }
        html.theme-light .notif-cal-live-num { color: #334155; }
        html.theme-light .notif-cal-live-num--actual { color: #1d4ed8; }
        html.theme-light .notif-country-flag {
            box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14);
        }
        html.theme-light #notif-list {
            scrollbar-color: rgba(15,23,42,0.1) transparent;
        }
        html.theme-light #notif-mark-all {
            color: #64748b !important;
        }
        html.theme-light #notif-mark-all:hover {
            color: #7c3aed !important;
        }
        #main-navbar #notif-bell.dropdown-open svg,
        #main-navbar #notif-bell.dropdown-open:hover svg {
            filter: drop-shadow(0 0 8px rgba(196, 210, 230, 1)) drop-shadow(0 0 18px rgba(148, 163, 184, 0.7)) drop-shadow(0 0 30px rgba(148, 163, 184, 0.35)) !important;
            color: #ffffff !important;
        }
        #main-navbar #notif-bell:hover svg {
            filter: drop-shadow(0 0 5px rgba(196, 210, 230, 0.7)) drop-shadow(0 0 12px rgba(148, 163, 184, 0.4)) !important;
        }
        html.theme-light #main-navbar #notif-bell.dropdown-open svg,
        html.theme-light #main-navbar #notif-bell.dropdown-open:hover svg {
            filter: drop-shadow(0 0 6px rgba(30, 41, 59, 0.8)) drop-shadow(0 0 16px rgba(71, 85, 105, 0.5)) drop-shadow(0 0 26px rgba(71, 85, 105, 0.25)) !important;
            color: #0f172a !important;
        }
        html.theme-light #main-navbar #notif-bell:hover svg {
            filter: drop-shadow(0 0 4px rgba(30, 41, 59, 0.5)) drop-shadow(0 0 10px rgba(71, 85, 105, 0.3)) !important;
        }
        /* Light theme: language section in avatar dropdown */
        html.theme-light #avatar-lang-section {
            border-color: rgba(15, 23, 42, 0.08) !important;
        }
        html.theme-light #avatar-lang-section .text-slate-500 {
            color: #94a3b8 !important;
        }
        html.theme-light .notif-lang-btn {
            color: #334155 !important;
        }
        html.theme-light .notif-lang-btn:hover {
            color: #0f172a !important;
            background: rgba(139, 92, 246, 0.06) !important;
        }
        html.theme-light .notif-lang-btn.lang-active {
            background: rgba(139, 92, 246, 0.08) !important;
            color: #1e293b !important;
        }
        /* Active language indicator */
        .notif-lang-btn.lang-active {
            background: rgba(139, 92, 246, 0.12);
            color: #e2e8f0;
            font-weight: 500;
        }

        /* Mobile: Dropdown volle Breite */
        @media (max-width: 479px) {
            #notif-dropdown {
                position: fixed !important;
                left: 8px !important;
                right: 8px !important;
                top: auto !important;
                width: auto !important;
                min-width: 0 !important;
                max-height: 70vh !important;
            }
            #notif-bell-container { position: static !important; }
        }

        /* ===== Toast Notifications ===== */
        #aionity-toast-container {
            position: fixed;
            top: 10px; /* in navbar, top right */
            right: 16px;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            gap: 8px;
            pointer-events: none;
            max-width: 380px;
            width: calc(100% - 32px);
        }
        @media (min-width: 640px) {
            #aionity-toast-container {
                top: 10px;
                right: 16px;
            }
        }
        .aionity-toast {
            pointer-events: auto;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 14px;
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(139,92,246,0.1);
            backdrop-filter: blur(16px);
            cursor: pointer;
            transform: translateX(110%);
            opacity: 0;
            animation: toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            transition: opacity 0.25s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .aionity-toast.toast-out {
            animation: none;
            opacity: 0;
            transform: translateX(110%);
        }
        @keyframes toast-in {
            from { transform: translateX(110%); opacity: 0; }
            to   { transform: translateX(0);    opacity: 1; }
        }
        .aionity-toast .toast-icon {
            font-size: 1.25rem;
            line-height: 1;
            flex-shrink: 0;
            margin-top: 1px;
        }
        .aionity-toast .toast-content {
            flex: 1;
            min-width: 0;
        }
        .aionity-toast .toast-title {
            font-size: 0.8125rem;
            font-weight: 600;
            color: #e2e8f0;
            line-height: 1.3;
        }
        .aionity-toast .toast-body {
            font-size: 0.75rem;
            color: #94a3b8;
            margin-top: 2px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .aionity-toast .toast-close {
            flex-shrink: 0;
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            color: #64748b;
            transition: color 0.15s, background 0.15s;
            margin-top: 1px;
        }
        .aionity-toast .toast-close:hover {
            color: #e2e8f0;
            background: rgba(255,255,255,0.1);
        }
        .aionity-toast .toast-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 2px;
            background: linear-gradient(90deg, #8b5cf6, #3b82f6);
            border-radius: 0 0 12px 12px;
            animation: toast-progress 6s linear forwards;
        }
        @keyframes toast-progress {
            from { width: 100%; }
            to   { width: 0%; }
        }

        /* Light theme toast */
        html.theme-light .aionity-toast {
            background: rgba(255, 255, 255, 0.97);
            border-color: rgba(139, 92, 246, 0.2);
            box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 0 1px rgba(15,23,42,0.05);
        }
        html.theme-light .aionity-toast .toast-title { color: #1e293b; }
        html.theme-light .aionity-toast .toast-body { color: #64748b; }
        html.theme-light .aionity-toast .toast-close { color: #94a3b8; }
        html.theme-light .aionity-toast .toast-close:hover { color: #1e293b; background: rgba(0,0,0,0.06); }

        @media (max-width: 479px) {
            #aionity-toast-container {
                top: max(6px, env(safe-area-inset-top, 0px));
                right: 8px;
                left: 8px;
                width: auto;
                max-width: none;
            }
        }

        /* ===== News Popup ===== */
        #aionity-news-popup-backdrop {
            position: fixed;
            inset: 0;
            z-index: 100000;
            background: rgba(2, 6, 23, 0.76);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: aionity-news-popup-fade 0.2s ease forwards;
        }
        .aionity-news-popup {
            width: min(100%, 560px);
            max-height: min(88vh, 900px);
            overflow: auto;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 20px;
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 32px rgba(59, 130, 246, 0.12);
            color: #e2e8f0;
            transform: translateY(10px) scale(0.985);
            animation: aionity-news-popup-card-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .aionity-news-popup__media {
            aspect-ratio: 16 / 9;
            width: 100%;
            object-fit: cover;
            display: block;
            background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
            border-radius: 20px 20px 0 0;
        }
        .aionity-news-popup__fallback {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            color: #cbd5e1;
        }
        .aionity-news-popup__body {
            padding: 20px 22px 22px;
        }
        .aionity-news-popup__eyebrow {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }
        .aionity-news-popup__cat-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px 4px 7px;
            border-radius: 6px;
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            line-height: 1;
            color: var(--popup-cat-color, #60a5fa);
            background: color-mix(in srgb, var(--popup-cat-color, #60a5fa) 12%, transparent);
            border: 1px solid color-mix(in srgb, var(--popup-cat-color, #60a5fa) 25%, transparent);
        }
        .aionity-news-popup__cat-pill svg {
            color: var(--popup-cat-color, #60a5fa);
            flex-shrink: 0;
        }
        .aionity-news-popup__sentiment-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            line-height: 1;
        }
        .aionity-news-popup__sentiment-pill.sentiment-positive {
            background: rgba(52, 211, 153, 0.12);
            border: 1px solid rgba(52, 211, 153, 0.25);
            color: #34d399;
        }
        .aionity-news-popup__sentiment-pill.sentiment-negative {
            background: rgba(251, 113, 133, 0.12);
            border: 1px solid rgba(251, 113, 133, 0.25);
            color: #fb7185;
        }
        .aionity-news-popup__sentiment-pill.sentiment-neutral {
            background: rgba(148, 163, 184, 0.1);
            border: 1px solid rgba(148, 163, 184, 0.2);
            color: #94a3b8;
        }
        .aionity-news-popup__sentiment-pill svg { flex-shrink: 0; }
        .aionity-news-popup__score-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1;
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.28);
            color: #fbbf24;
            white-space: nowrap;
        }
        .aionity-news-popup__score-stars {
            display: inline-flex;
            align-items: center;
            gap: 1px;
            line-height: 1;
        }
        .aionity-news-popup__star.is-on { color: #fbbf24; }
        .aionity-news-popup__star.is-off { color: #64748b; opacity: 0.5; }
        .aionity-news-popup__score-value {
            color: #fde68a;
            font-weight: 800;
        }
        .aionity-news-popup__title {
            margin: 0;
            font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem);
            line-height: 1.35;
            color: #f8fafc;
            font-weight: 700;
        }
        .aionity-news-popup__bodytext {
            margin: 14px 0 0;
            color: #cbd5e1;
            font-size: 0.92rem;
            line-height: 1.65;
            white-space: pre-wrap;
        }
        .aionity-news-popup__meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px 10px;
            margin-top: 16px;
            color: #94a3b8;
            font-size: 0.75rem;
        }
        .aionity-news-popup__meta-dot { opacity: 0.4; }
        .aionity-news-popup__source-favicon {
            width: 14px;
            height: 14px;
            border-radius: 3px;
            flex-shrink: 0;
            opacity: 0.8;
        }
        .aionity-news-popup__original-link {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: #38bdf8;
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.16s ease, opacity 0.16s ease;
        }
        .aionity-news-popup__original-link:hover {
            color: #7dd3fc;
            text-decoration: none;
        }
        .aionity-news-popup__original-link svg {
            flex-shrink: 0;
            opacity: 0.85;
        }
        .aionity-news-popup__close {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 34px;
            height: 34px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(15, 23, 42, 0.72);
            color: #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.16s ease, transform 0.16s ease;
        }
        .aionity-news-popup__close:hover {
            background: rgba(37, 99, 235, 0.3);
            transform: scale(1.04);
        }
        @keyframes aionity-news-popup-fade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes aionity-news-popup-card-in {
            from { opacity: 0; transform: translateY(10px) scale(0.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        html.theme-light .aionity-news-popup {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
            border-color: rgba(15, 23, 42, 0.08);
            color: #1e293b;
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
        }
        html.theme-light .aionity-news-popup__title {
            color: #0f172a;
        }
        html.theme-light .aionity-news-popup__bodytext,
        html.theme-light .aionity-news-popup__meta {
            color: #475569;
        }
        html.theme-light .aionity-news-popup__meta-dot { opacity: 0.3; }
        html.theme-light .aionity-news-popup__original-link {
            color: #0284c7;
        }
        html.theme-light .aionity-news-popup__original-link:hover {
            color: #0369a1;
        }
        html.theme-light .aionity-news-popup__close {
            background: rgba(255, 255, 255, 0.9);
            color: #334155;
            border-color: rgba(15, 23, 42, 0.1);
        }
        @media (max-width: 639px) {
            #aionity-news-popup-backdrop {
                padding: 10px;
                align-items: flex-end;
            }
            .aionity-news-popup {
                width: 100%;
                max-height: 92vh;
                border-radius: 18px;
            }
            .aionity-news-popup__media {
                border-radius: 18px 18px 0 0;
            }
            .aionity-news-popup__body {
                padding: 16px 16px 18px;
            }
        }

        /* ===== Calendar Event Popup (from notifications) ===== */
        #aionity-cal-popup-backdrop {
            position: fixed;
            inset: 0;
            z-index: 100000;
            background: rgba(2, 6, 23, 0.76);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: aionity-news-popup-fade 0.2s ease forwards;
        }
        .aionity-cal-popup {
            width: min(100%, 520px);
            max-height: min(88vh, 800px);
            overflow: auto;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 20px;
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 32px rgba(139, 92, 246, 0.12);
            color: #e2e8f0;
            transform: translateY(10px) scale(0.985);
            animation: aionity-news-popup-card-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .aionity-cal-popup__header {
            position: relative;
            padding: 24px 24px 16px;
            border-bottom: 1px solid rgba(148, 163, 184, 0.1);
        }
        .aionity-cal-popup__pills {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }
        .aionity-cal-popup__pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            line-height: 1;
        }
        .aionity-cal-popup__pill--high {
            color: #fb923c;
            background: rgba(251, 146, 60, 0.12);
            border: 1px solid rgba(251, 146, 60, 0.3);
        }
        .aionity-cal-popup__pill--medium {
            color: #60a5fa;
            background: rgba(96, 165, 250, 0.12);
            border: 1px solid rgba(96, 165, 250, 0.3);
        }
        .aionity-cal-popup__pill--low {
            color: #94a3b8;
            background: rgba(148, 163, 184, 0.1);
            border: 1px solid rgba(148, 163, 184, 0.2);
        }
        .aionity-cal-popup__pill--holiday {
            color: #34d399;
            background: rgba(52, 211, 153, 0.12);
            border: 1px solid rgba(52, 211, 153, 0.3);
        }
        .aionity-cal-popup__pill--country {
            color: #a78bfa;
            background: rgba(167, 139, 250, 0.12);
            border: 1px solid rgba(167, 139, 250, 0.25);
        }
        .aionity-cal-popup__pill--currency {
            color: #c084fc;
            background: rgba(192, 132, 252, 0.12);
            border: 1px solid rgba(192, 132, 252, 0.25);
        }
        .aionity-cal-popup__title {
            margin: 0;
            font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
            line-height: 1.35;
            color: #f8fafc;
            font-weight: 700;
        }
        .aionity-cal-popup__body {
            padding: 20px 24px 24px;
        }
        .aionity-cal-popup__datetime {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            color: #94a3b8;
            font-size: 0.85rem;
        }
        .aionity-cal-popup__datetime svg { flex-shrink: 0; color: #a78bfa; }
        .aionity-cal-popup__values {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 12px;
        }
        .aionity-cal-popup__value-card {
            padding: 14px 16px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(148, 163, 184, 0.1);
        }
        .aionity-cal-popup__value-label {
            font-size: 0.68rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #64748b;
            margin-bottom: 6px;
        }
        .aionity-cal-popup__value-num {
            font-size: 1.35rem;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
        }
        .aionity-cal-popup__value-num--actual { color: #34d399; }
        .aionity-cal-popup__value-num--forecast { color: #a78bfa; }
        .aionity-cal-popup__value-num--previous { color: #94a3b8; }
        .aionity-cal-popup__value-num--empty { color: #475569; font-size: 1rem; font-weight: 500; }
        .aionity-aion-popup__value {
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1.45;
            color: #e2e8f0;
            white-space: pre-wrap;
            word-break: break-word;
        }
        html.theme-light .aionity-cal-popup {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
            border-color: rgba(15, 23, 42, 0.08);
            color: #1e293b;
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
        }
        html.theme-light .aionity-cal-popup__title { color: #0f172a; }
        html.theme-light .aionity-cal-popup__datetime { color: #475569; }
        html.theme-light .aionity-cal-popup__value-card {
            background: rgba(0, 0, 0, 0.03);
            border-color: rgba(15, 23, 42, 0.08);
        }
        html.theme-light .aionity-aion-popup__value { color: #1e293b; }
        @media (max-width: 639px) {
            #aionity-cal-popup-backdrop {
                padding: 10px;
                align-items: flex-end;
            }
            .aionity-cal-popup {
                width: 100%;
                max-height: 92vh;
                border-radius: 18px;
            }
            .aionity-cal-popup__header { padding: 20px 18px 14px; }
            .aionity-cal-popup__body { padding: 16px 18px 20px; }
        }
    
