        /* ── Efeitos Específicos do Light Theme ── */
        .light-theme .kpi-card {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border-card);
        }

        .light-theme .panel {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border-card);
        }

        .light-theme .sidebar-brand .caos {
            text-shadow: none;
            background: linear-gradient(135deg, var(--accent), #9333EA);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* ── KPI STRIP ── */
        .kpi-strip {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 12px;
            margin-bottom: 20px
        }

        .kpi-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 14px 16px;
            cursor: pointer;
            transition: all var(--transition);
            position: relative;
            overflow: hidden;
            container-type: inline-size;
        }

        .kpi-card:hover {
            border-color: rgba(139, 92, 246, 0.3);
            box-shadow: var(--accent-glow);
            transform: translateY(-2px)
        }

        .kpi-card.selected {
            border-color: var(--accent);
            box-shadow: 0 0 25px rgba(139, 92, 246, 0.2)
        }

        .kpi-card .kpi-label {
            font-size: 0.625rem;
            /* 10px */
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600
        }

        .kpi-card .kpi-price {
            font-size: 1.125rem;
            /* 18px */
            font-weight: 700;
            margin: 4px 0 2px;
            letter-spacing: -0.5px
        }

        .kpi-card .kpi-change {
            font-size: 11px;
            font-weight: 600
        }

        .kpi-card .kpi-change.up {
            color: var(--neon-green)
        }

        .kpi-card .kpi-change.down {
            color: var(--neon-red)
        }

        .kpi-card .kpi-sparkline {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 80px;
            height: 30px;
            opacity: 0.4
        }

        /* ── RSI / MACD containers ── */
        #rsi-chart-container  { position: relative; height: 130px; }
        #macd-chart-container { position: relative; height: 130px; }

        /* ── FULLSCREEN INFO PANEL (screensaver mode) ── */
        #fs-info-panel {
            display: none;
            position: absolute;
            right: 0; top: 0; bottom: 0;
            width: 268px;
            z-index: 30;
            flex-direction: column;
            gap: 0;
            overflow: hidden;
            background: linear-gradient(180deg, rgba(7,7,26,0.92) 0%, rgba(10,10,32,0.96) 100%);
            backdrop-filter: blur(24px);
            border-left: 1px solid rgba(139,92,246,0.18);
            box-shadow: -8px 0 32px rgba(0,0,0,0.4);
        }
        .chart-main.chart-fullscreen #fs-info-panel { display: flex; }

        #fs-info-panel .fs-section {
            padding: 14px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        #fs-info-panel .fs-section:last-child { border-bottom: none; flex: 1; overflow-y: auto; }

        #fs-clock {
            font-family: 'JetBrains Mono', monospace;
            font-size: 30px; font-weight: 700;
            color: rgba(255,255,255,0.92);
            letter-spacing: 2px; text-align: center;
            text-shadow: 0 0 20px rgba(139,92,246,0.5);
        }
        #fs-date {
            font-size: 11px; color: var(--text-muted);
            text-align: center; margin-top: 3px;
            text-transform: capitalize; letter-spacing: 0.3px;
        }
        #fs-asset-name {
            font-size: 11px; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 1px;
            text-align: center; margin-bottom: 4px;
        }
        #fs-price-big {
            font-family: 'JetBrains Mono', monospace;
            font-size: 28px; font-weight: 800;
            text-align: center; color: #fff;
            letter-spacing: -0.5px;
        }
        #fs-price-change-big {
            font-size: 16px; font-weight: 700;
            text-align: center; margin-top: 4px;
            letter-spacing: 0.5px;
        }
        .fs-ind-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
        }
        .fs-ind-cell {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px; padding: 7px 6px; text-align: center;
        }
        .fs-ind-cell .fs-ind-label {
            font-size: 9px; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 3px;
        }
        .fs-ind-cell .fs-ind-val {
            font-size: 17px; font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
        }
        #fs-wl-list .fs-wl-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 5px 4px; border-radius: 6px;
            transition: background 0.15s;
        }
        #fs-wl-list .fs-wl-row:hover { background: rgba(255,255,255,0.04); }
        #fs-wl-row-active { background: rgba(139,92,246,0.12) !important; border: 1px solid rgba(139,92,246,0.25); }
        .fs-wl-ticker { font-size: 11px; font-weight: 700; width: 72px; }
        .fs-wl-price  { font-size: 10px; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; flex: 1; text-align: right; margin-right: 6px; }
        .fs-wl-chg    { font-size: 10px; font-weight: 600; width: 52px; text-align: right; font-family: 'JetBrains Mono', monospace; }
        #fs-regime-badge {
            display: inline-block; padding: 4px 10px; border-radius: 20px;
            font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
        }

        /* ── INDICATORS ROW ── */
        .indicators-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px;
            margin-bottom: 20px
        }

        .indicator-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 14px;
            container-type: inline-size;
        }

        .indicator-card h4 {
            font-size: 11px;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
            font-weight: 600
        }

        .indicator-card .ind-value {
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.5px
        }

        .indicator-card .ind-label {
            font-size: 10px;
            color: var(--text-secondary);
            margin-top: 2px
        }

        /* ── RESEARCH SEARCH PANEL ── */
        .research-search-wrap {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .research-search-input {
            flex: 1;
            min-width: 200px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            padding: 10px 16px;
            font-size: 13px;
            font-family: inherit;
            outline: none;
            transition: border-color .2s, box-shadow .2s;
        }
        .research-search-input:focus {
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3px rgba(139,92,246,.1);
        }
        .research-search-input::placeholder { color: var(--text-muted) }
        .research-type-btns {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        .research-type-btn {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: var(--text-muted);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all .15s;
            white-space: nowrap;
        }
        .research-type-btn.active {
            background: rgba(139,92,246,.15);
            border-color: var(--accent);
            color: var(--accent);
        }
        .research-results-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }
        .research-section-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
        }
        .research-count-badge {
            background: rgba(139,92,246,.12);
            border: 1px solid rgba(139,92,246,.2);
            color: var(--accent-light);
            font-size: 10px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
        }
        .research-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            transition: border-color .2s, transform .15s, box-shadow .2s;
            position: relative;
            overflow: hidden;
        }
        .research-card::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 3px;
            background: linear-gradient(180deg, var(--accent), transparent);
            border-radius: 3px 0 0 3px;
            opacity: 0;
            transition: opacity .2s;
        }
        .research-card:hover {
            border-color: rgba(139,92,246,.35);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,.15);
        }
        .research-card:hover::before { opacity: 1 }
        .research-card-news {
            border-left: 3px solid rgba(0,212,255,.3);
        }
        .research-card-news:hover { border-color: rgba(0,212,255,.5) }
        .research-card-news::before { background: linear-gradient(180deg, var(--neon-blue), transparent) }
        .research-card-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.4;
        }
        .research-card-meta {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .research-source-badge {
            font-size: 9px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 20px;
            letter-spacing: .4px;
            text-transform: uppercase;
        }
        .rsrc-arxiv    { background: rgba(183,110,0,.2);   color: #f59e0b }
        .rsrc-semantic { background: rgba(16,185,129,.15); color: #10b981 }
        .rsrc-pubmed   { background: rgba(0,149,246,.15);  color: #3b9cff }
        .rsrc-openalex { background: rgba(139,92,246,.15); color: var(--accent-light) }
        .rsrc-news     { background: rgba(0,212,255,.12);  color: var(--neon-blue) }
        .research-cit-badge {
            font-size: 9px;
            color: var(--text-secondary);
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            padding: 1px 7px;
            border-radius: 20px;
        }
        .research-year {
            font-size: 10px;
            color: var(--text-muted);
        }
        .research-authors {
            font-size: 10px;
            color: var(--text-secondary);
            font-style: italic;
        }
        .research-abstract {
            font-size: 11px;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .research-links {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 2px;
        }
        .research-link {
            font-size: 10px;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 6px;
            text-decoration: none;
            transition: all .15s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .research-link-main {
            background: rgba(139,92,246,.12);
            border: 1px solid rgba(139,92,246,.2);
            color: var(--accent-light);
        }
        .research-link-main:hover { background: rgba(139,92,246,.22); color: var(--accent-light) }
        .research-link-pdf {
            background: rgba(239,68,68,.1);
            border: 1px solid rgba(239,68,68,.2);
            color: #f87171;
        }
        .research-link-pdf:hover { background: rgba(239,68,68,.18) }
        .research-link-news {
            background: rgba(0,212,255,.1);
            border: 1px solid rgba(0,212,255,.2);
            color: var(--neon-blue);
        }
        .research-link-news:hover { background: rgba(0,212,255,.18) }
        .research-empty {
            text-align: center;
            padding: 50px 20px;
            color: var(--text-muted);
        }
        .research-empty .re-icon { font-size: 40px; margin-bottom: 12px }
        .research-empty p { font-size: 13px }
        .research-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        @media (min-width: 900px) {
            .research-grid { grid-template-columns: 1fr 1fr }
        }
        .research-news-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
        }
        @media (min-width: 700px) {
            .research-news-grid { grid-template-columns: 1fr 1fr }
        }
        .research-divider {
            border: none;
            border-top: 1px solid var(--glass-border);
            margin: 20px 0;
        }
        .research-src-summary {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }
        .research-src-chip {
            font-size: 9px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
            letter-spacing: .3px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: var(--text-secondary);
        }

        /* ── PORTFOLIO PAGE ── */
        .portfolio-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 20px
        }

        .portfolio-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 20px;
            container-type: inline-size;
        }

        .portfolio-card h3 {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 14px
        }

        .portfolio-card .chart-wrap {
            height: 260px;
            position: relative
        }

        .regime-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            border: 1px solid
        }

        /* ── SHARED COMPONENTS ── */
        .panel {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 16px;
            margin-bottom: 16px;
            backdrop-filter: blur(20px);
            container-type: inline-size;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px
        }

        .panel-header h3 {
            font-size: 14px;
            font-weight: 600
        }

        .cards-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px
        }

        .stat-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 16px;
            backdrop-filter: blur(20px);
            transition: all var(--transition);
            container-type: inline-size;
        }

        .stat-card:hover {
            border-color: rgba(139, 92, 246, 0.2);
            box-shadow: var(--accent-glow)
        }

        .stat-card .label {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px
        }

        .stat-card .value {
            font-size: 24px;
            font-weight: 700;
            margin-top: 6px;
            letter-spacing: -0.5px
        }

        .stat-card .value.accent {
            color: var(--accent-light)
        }

        .stat-card .value.success {
            color: var(--success)
        }

        .chart-container {
            height: 200px
        }

        .data-table {
            width: 100%;
            border-collapse: collapse
        }

        .data-table th {
            text-align: left;
            padding: 10px 14px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-card)
        }

        .data-table td {
            padding: 10px 14px;
            font-size: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.02)
        }

        .btn {
            padding: 8px 16px;
            border-radius: var(--radius-sm);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid transparent;
            font-family: inherit;
            transition: all var(--transition);
            min-height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn-primary {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent)
        }

        .btn-primary:hover {
            background: #7C3AED;
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.3)
        }

        .btn-secondary {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-card)
        }

        .btn-danger {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger)
        }

        .btn-sm {
            padding: 5px 10px;
            font-size: 11px;
            min-height: 32px;
        }

        .form-group {
            margin-bottom: 14px
        }

        .form-group label {
            display: block;
            font-size: 11px;
            color: var(--text-secondary);
            margin-bottom: 5px;
            font-weight: 500
        }

        .form-input {
            width: 100%;
            padding: 9px 12px;
            background: var(--bg-primary);
            border: 1px solid var(--border-card);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            font-size: 12px;
            font-family: inherit;
            transition: border var(--transition)
        }

        .form-input:focus {
            outline: none;
            border-color: var(--border-focus)
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px
        }

        .toggle-container {
            display: flex;
            align-items: center;
            gap: 10px
        }

        .toggle {
            position: relative;
            width: 42px;
            height: 22px;
            background: var(--text-muted);
            border-radius: 11px;
            cursor: pointer;
            transition: background var(--transition)
        }

        .toggle.active {
            background: var(--accent)
        }

        .toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 16px;
            height: 16px;
            background: #fff;
            border-radius: 50%;
            transition: transform var(--transition)
        }

        .toggle.active::after {
            transform: translateX(20px)
        }

        .toggle-label {
            font-size: 12px;
            color: var(--text-secondary)
        }

        .badge-active {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 600
        }

        .badge-inactive {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 600
        }

        .badge-soon {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 600
        }

        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 12px 20px;
            font-size: 12px;
            z-index: 9999;
            transform: translateY(80px);
            opacity: 0;
            transition: all 300ms ease
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1
        }

        .empty-state {
            text-align: center;
            padding: 40px;
            color: var(--text-secondary)
        }

        .empty-state .empty-icon {
            font-size: 36px;
            margin-bottom: 10px;
            opacity: 0.5
        }

        .empty-state p {
            font-size: 12px
        }

        .restart-warning {
            display: none;
            background: rgba(245, 158, 11, 0.08);
            border: 1px solid rgba(245, 158, 11, 0.2);
            border-radius: var(--radius-sm);
            padding: 10px 14px;
            margin-bottom: 14px;
            font-size: 11px;
            color: var(--warning)
        }

        .integrations-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px
        }

        .integration-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 16px;
            text-align: center;
            transition: all var(--transition)
        }

        .integration-card:hover {
            border-color: rgba(139, 92, 246, 0.2)
        }

        .integration-card .int-icon {
            font-size: 28px;
            margin-bottom: 8px
        }

        .integration-card .int-name {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 4px
        }

        .integration-card .int-status {
            font-size: 10px
        }

        .activity-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.02);
            font-size: 12px
        }

        .activity-item .activity-time {
            font-size: 10px;
            color: var(--text-muted);
            min-width: 50px
        }

        /* ── MODAL ── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center
        }

        .modal-overlay.show {
            display: flex
        }

        .modal {
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            padding: 24px;
            width: 480px;
            max-height: 80vh;
            overflow-y: auto
        }

        .modal h3 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 16px
        }

        .wl-edit-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0
        }

        .wl-edit-item input[type=checkbox] {
            accent-color: var(--accent)
        }

        .wl-edit-item label {
            font-size: 12px
        }

        @media(max-width:1200px) {
            .kpi-strip {
                grid-template-columns: repeat(3, 1fr)
            }

            .chart-grid {
                grid-template-columns: 1fr
            }

            .indicators-row {
                grid-template-columns: 1fr 1fr
            }

            #indicators-row {
                grid-template-columns: repeat(3, 1fr) !important;
            }
        }

        @media(max-width:768px) {
            .mobile-header {
                display: flex !important;
            }

            .sidebar {
                position: fixed;
                left: -260px;
                top: 0;
                height: 100vh;
                z-index: 2000;
                transition: left 0.3s ease;
                display: flex;
                box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
            }

            .sidebar.open {
                left: 0;
            }

            .sidebar-overlay {
                display: none;
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.6);
                z-index: 1500;
                backdrop-filter: blur(2px);
            }

            .sidebar-overlay.open {
                display: block;
            }

            .main {
                padding: 16px;
                padding-top: 70px;
                padding-bottom: 80px;
                /* Safe space for bottom scrolling */
            }

            .kpi-strip {
                grid-template-columns: 1fr 1fr
            }

            .cards-grid {
                grid-template-columns: 1fr !important;
            }

            .news-grid {
                grid-template-columns: 1fr
            }

            .portfolio-grid {
                grid-template-columns: 1fr
            }

            #indicators-row {
                grid-template-columns: 1fr 1fr;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .page-header>div:last-child {
                width: 100%;
                justify-content: space-between;
                flex-wrap: wrap;
            }

            .btn,
            button.btn-sm,
            .form-input {
                min-height: 44px;
                /* Touch target size */
            }

            .chart-periods button {
                min-height: 38px;
                padding: 8px 12px;
            }

            .chart-toolbar {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 12px;
            }

            .chart-periods {
                width: 100%;
                justify-content: space-between;
            }

            /* Responsive tables within containers */
            .data-table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }

            /* Container Queries optimizations */
            @container (max-width: 400px) {
                .kpi-price {
                    font-size: 1.5rem !important;
                }

                .stat-card .value {
                    font-size: 1.8rem !important;
                }
            }
        }


        @media(max-width:550px) {
            .kpi-strip {
                grid-template-columns: 1fr !important;
            }

            #indicators-row,
            .indicators-row {
                grid-template-columns: 1fr !important;
            }
        }

        /* ── PDF Export Mode (layout only, no color overrides) ── */
        .pdf-capturing .btn,
        .pdf-capturing button:not(.chart-periods button) {
            display: none !important;
        }

        .pdf-capturing .panel {
            page-break-inside: avoid;
        }

        .pdf-capturing canvas {
            max-width: 100% !important;
        }

        /* ═══ PREMIUM LOGIN SCREEN — movido para main.css (Onda K, 26/05/2026, redesign emerald)
           Bloco antigo removido daqui para não sobrescrever os tokens novos com cores roxas.
           Apenas o @keyframes loginCardEntrance permanece, pois é reusado pelo .modal-premium-card. */
        @keyframes loginCardEntrance {
            from { opacity: 0; transform: translateY(30px) scale(.97); }
            to   { opacity: 1; transform: translateY(0)   scale(1);   }
        }

        /* Role hiding & User profile badge */
        .admin-only.hidden {
            display: none !important;
        }

        .owner-only.hidden {
            display: none !important;
        }

        .user-profile-badge {
            margin-top: auto;
            padding: 20px 16px;
            border-top: 1px solid var(--border-card);
            font-size: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .user-profile-badge strong {
            color: var(--text-primary);
        }

        /* Password modal premium */
        .modal-premium-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(6, 6, 10, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 90000;
            display: none;
            justify-content: center;
            align-items: center;
        }

        .modal-premium-card {
            background: rgba(12, 12, 18, 0.92);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid rgba(139, 92, 246, 0.15);
            border-radius: 24px;
            padding: 40px;
            width: 100%;
            max-width: 420px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6),
                0 0 60px rgba(139, 92, 246, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
            animation: loginCardEntrance .5s cubic-bezier(.16, 1, .3, 1) forwards;
        }

        .modal-premium-card .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 28px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(139, 92, 246, 0.1);
        }

        .modal-premium-card .modal-title {
            font-size: 20px;
            font-weight: 700;
            color: #F1F5F9;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modal-premium-card .modal-title .title-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(0, 212, 255, 0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .modal-premium-card .modal-close {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.06);
            color: #64748B;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all .2s ease;
        }

        .modal-premium-card .modal-close:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.3);
            color: #FCA5A5;
        }

        .modal-premium-card .modal-input-group {
            position: relative;
            margin-bottom: 16px;
        }

        .modal-premium-card .modal-input-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: #4B5563;
            pointer-events: none;
            transition: color .3s;
        }

        .modal-premium-card .modal-input {
            width: 100%;
            padding: 13px 14px 13px 42px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            color: #F1F5F9;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            outline: none;
            transition: all .3s ease;
        }

        .modal-premium-card .modal-input::placeholder {
            color: #4B5563;
        }

        .modal-premium-card .modal-input:focus {
            border-color: rgba(139, 92, 246, 0.5);
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
            background: rgba(255, 255, 255, 0.06);
        }

        .modal-premium-card .modal-input:focus~.modal-input-icon {
            color: #A78BFA;
        }

        .modal-premium-card .cp-msg {
            font-size: 13px;
            margin: 14px 0 0;
            padding: 10px 14px;
            border-radius: 10px;
            display: none;
        }

        .modal-premium-card .cp-msg.error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #FCA5A5;
        }

        .modal-premium-card .cp-msg.success {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            color: #6EE7B7;
        }

        @media (max-width: 480px) {
            .modal-premium-card {
                margin: 0 16px;
                padding: 28px 20px;
            }
        }

        /* ══════ CHAT VOICE CALL PREMIUM ══════ */
        .voice-call-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(6, 6, 10, 0.85);
            backdrop-filter: blur(15px);
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .voice-call-overlay.active {
            display: flex;
            opacity: 1;
        }
        .voice-call-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), #C084FC);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 50px;
            box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
            position: relative;
            margin-bottom: 30px;
        }
        .voice-call-avatar.speaking {
            animation: pulse-speak 1s infinite alternate;
        }
        @keyframes pulse-speak {
            from { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); transform: scale(1); }
            to { box-shadow: 0 0 60px rgba(139, 92, 246, 0.8), 0 0 100px var(--neon-purple); transform: scale(1.05); }
        }
        .voice-call-status {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 10px;
            letter-spacing: 0.5px;
        }
        .voice-call-timer {
            font-size: 14px;
            color: var(--neon-green);
            margin-bottom: 40px;
            font-variant-numeric: tabular-nums;
        }
        .voice-call-visualizer {
            display: flex;
            gap: 4px;
            height: 40px;
            align-items: center;
            margin-bottom: 40px;
        }
        .voice-bd {
            width: 6px;
            height: 10px;
            background: var(--accent-light);
            border-radius: 3px;
            transition: height 0.1s ease;
        }
        .voice-call-actions {
            display: flex;
            gap: 20px;
        }
        .btn-end-call {
            background: var(--neon-red);
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: none;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
        }
        .btn-end-call:hover {
            transform: scale(1.1);
            box-shadow: 0 0 30px rgba(239, 68, 68, 0.7);
        }
        .btn-mute-call {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .btn-mute-call.muted {
            background: rgba(239, 68, 68, 0.2);
            color: var(--neon-red);
            border-color: rgba(239, 68, 68, 0.4);
        }

        /* ══════ CHAT AI PREMIUM ══════ */
        .chat-container {
            display: flex;
            flex-direction: column;
            height: calc(100vh - 80px);
            max-height: calc(100vh - 80px);
            position: relative;
            overflow: hidden;
        }

        .chat-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 20px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius) var(--radius) 0 0;
            backdrop-filter: blur(20px);
        }

        .chat-header .chat-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), #C084FC);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
            animation: avatarPulse 3s ease-in-out infinite;
        }

        @keyframes avatarPulse {

            0%,
            100% {
                box-shadow: 0 0 20px rgba(139, 92, 246, 0.3)
            }

            50% {
                box-shadow: 0 0 30px rgba(139, 92, 246, 0.5)
            }
        }

        .chat-header .chat-info h3 {
            font-size: 15px;
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .chat-header .chat-info p {
            font-size: 11px;
            color: var(--neon-green);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .chat-header .chat-info p::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--neon-green);
            animation: pulse 2s infinite;
        }

        .chat-header-actions {
            margin-left: auto;
            display: flex;
            gap: 8px;
        }

        .chat-header-actions button {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            padding: 6px 10px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            transition: all var(--transition);
        }

        .chat-header-actions button:hover {
            border-color: var(--accent);
            background: rgba(139, 92, 246, 0.1);
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            scroll-behavior: smooth;
        }

        .chat-messages::-webkit-scrollbar {
            width: 4px;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: var(--text-muted);
            border-radius: 4px;
        }

        .chat-msg {
            display: flex;
            gap: 10px;
            animation: msgSlideIn 300ms ease;
            max-width: 85%;
            min-width: 0;
        }

        .chat-msg.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        @keyframes msgSlideIn {
            from {
                opacity: 0;
                transform: translateY(12px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        .chat-msg .msg-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .chat-msg.ai .msg-avatar {
            background: linear-gradient(135deg, var(--accent), #C084FC);
        }

        .chat-msg.user .msg-avatar {
            background: linear-gradient(135deg, #00D4FF, #0EA5E9);
        }

        .chat-msg .msg-bubble {
            padding: 12px 16px;
            border-radius: 16px;
            font-size: 13.5px;
            line-height: 1.65;
            position: relative;
            word-wrap: break-word;
            overflow-wrap: anywhere;
            word-break: break-word;
            min-width: 0;
            max-width: 100%;
        }

        .chat-msg.ai .msg-bubble {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(16px);
            border-top-left-radius: 4px;
            color: var(--text-primary);
        }

        .chat-msg.user .msg-bubble {
            background: linear-gradient(135deg, var(--accent), rgba(139, 92, 246, 0.7));
            border: none;
            border-top-right-radius: 4px;
            color: #fff;
        }

        .chat-msg .msg-bubble .msg-time {
            display: block;
            font-size: 10px;
            margin-top: 6px;
            opacity: 0.5;
            text-align: right;
        }

        .chat-msg .msg-bubble pre {
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            padding: 12px;
            margin: 8px 0;
            overflow-x: auto;
            position: relative;
            font-size: 12px;
        }

        .chat-msg .msg-bubble pre code {
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
            font-size: 12px;
        }

        .chat-msg .msg-bubble .code-copy-btn {
            position: absolute;
            top: 6px;
            right: 6px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            color: var(--text-secondary);
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 10px;
            cursor: pointer;
            opacity: 0;
            transition: opacity 200ms;
        }

        .chat-msg .msg-bubble pre:hover .code-copy-btn {
            opacity: 1;
        }

        .chat-msg .msg-bubble strong {
            font-weight: 600;
        }

        .chat-msg .msg-bubble em {
            font-style: italic;
            opacity: 0.9;
        }

        .chat-msg .msg-bubble ul,
        .chat-msg .msg-bubble ol {
            padding-left: 20px;
            margin: 4px 0;
        }

        .chat-msg .msg-bubble a {
            color: var(--neon-blue);
            text-decoration: underline;
        }

        .chat-msg .msg-bubble img {
            max-width: 100%;
            border-radius: 8px;
            margin: 8px 0;
            cursor: pointer;
        }

        .chat-msg .msg-bubble .msg-audio {
            margin: 8px 0;
        }

        .chat-msg .msg-bubble .msg-audio audio {
            width: 100%;
            height: 36px;
            border-radius: 20px;
        }

        .chat-msg .msg-bubble .msg-tts-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: var(--text-secondary);
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 11px;
            cursor: pointer;
            margin-top: 6px;
            transition: all var(--transition);
        }

        .chat-msg .msg-bubble .msg-tts-btn:hover {
            background: rgba(139, 92, 246, 0.2);
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .chat-msg .msg-file-card {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--glass-border);
            border-radius: 10px;
            padding: 10px 14px;
            margin: 6px 0;
            cursor: pointer;
            transition: all var(--transition);
        }

        .chat-msg .msg-file-card:hover {
            border-color: var(--accent);
        }

        .chat-msg .msg-file-card .file-icon {
            font-size: 24px;
        }

        .chat-msg .msg-file-card .file-info {
            font-size: 12px;
        }

        .chat-msg .msg-file-card .file-info .file-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .chat-msg .msg-file-card .file-info .file-size {
            color: var(--text-secondary);
        }

        .chat-typing {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 0 20px;
        }

        .chat-typing.active {
            display: flex;
        }

        .chat-typing .typing-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), #C084FC);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .chat-typing .typing-dots {
            display: flex;
            gap: 4px;
            align-items: center;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            padding: 10px 16px;
            border-radius: 16px;
            border-top-left-radius: 4px;
        }

        .chat-typing .typing-dots span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--text-secondary);
            animation: typingBounce 1.4s ease-in-out infinite;
        }

        .chat-typing .typing-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .chat-typing .typing-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

        .chat-typing .typing-status {
            font-size: 11px;
            color: var(--text-secondary);
            font-style: italic;
        }

        @keyframes typingBounce {

            0%,
            60%,
            100% {
                transform: translateY(0)
            }

            30% {
                transform: translateY(-6px)
            }
        }

        .chat-streaming-cursor::after {
            content: '▌';
            animation: blink 0.8s step-end infinite;
            color: var(--accent);
        }

        @keyframes blink {

            0%,
            100% {
                opacity: 1
            }

            50% {
                opacity: 0
            }
        }

        .chat-memory-row {
            display: flex;
            align-items: center;
            padding: 4px 16px 2px;
        }
        .chat-memory-toggle-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 600;
            user-select: none;
            transition: opacity 0.2s;
        }
        .chat-memory-toggle-wrap input[type="checkbox"] {
            width: 14px; height: 14px;
            accent-color: #10b981;
            cursor: pointer;
        }
        .chat-memory-toggle-wrap:hover { opacity: 0.8; }

        .chat-attach-preview {
            display: none;
            padding: 8px 20px;
            gap: 8px;
            flex-wrap: wrap;
            border-top: 1px solid var(--glass-border);
        }

        .chat-attach-preview.active {
            display: flex;
        }

        .chat-attach-preview .attach-item {
            position: relative;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 10px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            animation: msgSlideIn 200ms ease;
        }

        .chat-attach-preview .attach-item img {
            width: 48px;
            height: 48px;
            object-fit: cover;
            border-radius: 6px;
        }

        .chat-attach-preview .attach-remove {
            position: absolute;
            top: -6px;
            right: -6px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--danger);
            color: #fff;
            border: none;
            font-size: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chat-input-area {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            padding: 12px 16px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-top: none;
            border-radius: 0 0 var(--radius) var(--radius);
            backdrop-filter: blur(20px);
        }

        .chat-input-area .chat-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid var(--glass-border);
            background: var(--glass-bg);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all var(--transition);
            flex-shrink: 0;
        }

        .chat-input-area .chat-btn:hover {
            border-color: var(--accent);
            background: rgba(139, 92, 246, 0.15);
            transform: scale(1.05);
        }

        .chat-input-area .chat-btn.recording {
            background: rgba(239, 68, 68, 0.2);
            border-color: var(--danger);
            animation: recordPulse 1.5s infinite;
        }

        @keyframes recordPulse {

            0%,
            100% {
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3)
            }

            50% {
                box-shadow: 0 0 0 8px rgba(239, 68, 68, 0)
            }
        }

        .chat-input-area .chat-btn.send-btn {
            background: linear-gradient(135deg, var(--accent), #C084FC);
            border: none;
            color: #fff;
        }

        .chat-input-area .chat-btn.send-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
        }

        .chat-input-area textarea {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 13.5px;
            resize: none;
            outline: none;
            max-height: 120px;
            min-height: 40px;
            line-height: 1.5;
            padding: 8px 0;
        }

        .chat-input-area textarea::placeholder {
            color: var(--text-muted);
        }

        .chat-drop-overlay {
            position: absolute;
            inset: 0;
            background: rgba(139, 92, 246, 0.1);
            backdrop-filter: blur(8px);
            border: 3px dashed var(--accent);
            border-radius: var(--radius);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
        }

        .chat-drop-overlay.active {
            display: flex;
        }

        .chat-drop-overlay .drop-text {
            font-size: 18px;
            font-weight: 700;
            color: var(--accent);
            text-align: center;
        }

        .chat-scroll-fab {
            position: absolute;
            bottom: 80px;
            right: 20px;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--accent);
            color: #fff;
            border: none;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
            z-index: 10;
            transition: all var(--transition);
        }

        .chat-scroll-fab.visible {
            display: flex;
        }

        .chat-scroll-fab:hover {
            transform: scale(1.1);
        }

        /* Chat Popup Mode */
        .chat-popup-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 420px;
            height: 600px;
            z-index: 9999;
            display: none;
            flex-direction: column;
            border-radius: var(--radius);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(16px);
            border: 1px solid var(--glass-border);
            overflow: hidden;
        }

        .chat-popup-container.active {
            display: flex;
            animation: popupSlideIn 300ms ease;
        }

        @keyframes popupSlideIn {
            from {
                opacity: 0;
                transform: translateY(20px) scale(0.95)
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1)
            }
        }

        .chat-popup-fab {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), #C084FC);
            color: #fff;
            border: none;
            cursor: pointer;
            font-size: 24px;
            z-index: 9998;
            display: none;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
            transition: all 300ms ease;
        }

        .chat-popup-fab:hover {
            transform: scale(1.1) rotate(10deg);
        }

        .chat-popup-fab.visible {
            display: flex;
        }

        @media (max-width: 768px) {
            .chat-container {
                height: calc(100vh - 70px);
            }

            .chat-msg {
                max-width: 92%;
            }

            .chat-popup-container {
                width: 100vw;
                height: 100vh;
                bottom: 0;
                right: 0;
                border-radius: 0;
            }
        }

        /* ══════ PREDICTIONS TAB — PREMIUM MOBILE SYSTEM ══════ */

        /* ── Horizon Breakdown Cards ── */
        .horizon-breakdown-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }
        .horizon-card {
            background: var(--bg-card);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 14px;
            padding: 16px;
            position: relative;
            overflow: hidden;
            transition: border-color 0.2s;
        }
        .horizon-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 2px;
        }
        .horizon-card.h1d::before { background: linear-gradient(to right, #00D4FF, #0099BB); }
        .horizon-card.h3d::before { background: linear-gradient(to right, #8B5CF6, #6D28D9); }
        .horizon-card.h7d::before { background: linear-gradient(to right, #FF6B35, #CC4400); }
        .horizon-card-label {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 10px;
        }
        .horizon-card-metric {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }
        .horizon-card-metric-name {
            font-size: 10px;
            color: var(--text-muted);
        }
        .horizon-card-metric-value {
            font-size: 13px;
            font-weight: 700;
        }
        .horizon-progress {
            height: 3px;
            background: rgba(255,255,255,0.06);
            border-radius: 99px;
            margin-top: 2px;
            overflow: hidden;
        }
        .horizon-progress-bar {
            height: 100%;
            border-radius: 99px;
            transition: width 0.6s ease;
        }

        /* ── Deep Stats Grid ── */
        .deep-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }

        /* ── Ticker Heatmap Table ── */
        .ticker-perf-table {
            width: 100%;
            border-collapse: collapse;
        }
        .ticker-perf-table th {
            font-size: 9px;
            font-weight: 700;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            color: var(--text-muted);
            padding: 6px 10px;
            text-align: right;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .ticker-perf-table th:first-child { text-align: left; }
        .ticker-perf-table td {
            padding: 8px 10px;
            font-size: 11px;
            text-align: right;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .ticker-perf-table td:first-child { text-align: left; font-weight: 600; }
        .ticker-perf-table tr:hover td { background: rgba(255,255,255,0.025); }
        .heat-cell {
            display: inline-block;
            padding: 2px 7px;
            border-radius: 5px;
            font-weight: 700;
            font-size: 11px;
        }
        .heat-great  { background: rgba(0,255,136,0.15);  color: #00FF88; }
        .heat-good   { background: rgba(0,212,255,0.12);  color: #00D4FF; }
        .heat-ok     { background: rgba(255,215,0,0.12);  color: #FFD700; }
        .heat-poor   { background: rgba(255,51,102,0.12); color: #FF3366; }
        .heat-cell.na { background: rgba(148,163,184,0.10); color: var(--text-muted); font-weight: 500; }

        /* ── Calibration Pills ── */
        .calibration-strip {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 4px;
        }
        .cal-pill {
            flex: 1;
            min-width: 70px;
            text-align: center;
            padding: 10px 6px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.07);
        }
        .cal-pill-val {
            font-size: 18px;
            font-weight: 800;
            letter-spacing: -0.5px;
            display: block;
        }
        .cal-pill-label {
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            color: var(--text-muted);
            margin-top: 3px;
            display: block;
        }
        .cal-ultra { border-color: rgba(0,255,136,0.3);  background: rgba(0,255,136,0.06); }
        .cal-ultra .cal-pill-val { color: #00FF88; }
        .cal-precise { border-color: rgba(0,212,255,0.25); background: rgba(0,212,255,0.06); }
        .cal-precise .cal-pill-val { color: #00D4FF; }
        .cal-ok { border-color: rgba(255,215,0,0.2); background: rgba(255,215,0,0.05); }
        .cal-ok .cal-pill-val { color: #FFD700; }
        .cal-poor { border-color: rgba(255,51,102,0.2); background: rgba(255,51,102,0.05); }
        .cal-poor .cal-pill-val { color: #FF3366; }

        /* ── Percentile Stat Box ── */
        .percentile-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            margin-top: 8px;
        }
        .percentile-box {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 8px;
            padding: 8px 4px;
            text-align: center;
        }
        .percentile-box-label {
            font-size: 9px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.6px;
        }
        .percentile-box-val {
            font-size: 14px;
            font-weight: 800;
            color: var(--neon-blue);
            margin-top: 4px;
        }

        /* ── Day of Week Bars ── */
        .dow-grid {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            height: 90px;
            padding-top: 10px;
        }
        .dow-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }
        .dow-bar-wrap {
            width: 100%;
            flex: 1;
            display: flex;
            align-items: flex-end;
        }
        .dow-bar {
            width: 100%;
            border-radius: 4px 4px 0 0;
            transition: height 0.5s ease;
            min-height: 2px;
        }
        .dow-label {
            font-size: 9px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        .dow-val {
            font-size: 9px;
            font-weight: 700;
            color: var(--text-primary);
        }

        /* ── Sharpe/Sortino badges ── */
        .ratio-badge {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 10px 16px;
            min-width: 80px;
        }
        .ratio-badge-val {
            font-size: 20px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }
        .ratio-badge-label {
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-muted);
            margin-top: 3px;
        }

        /* ═══════════════════════════════════════════
           RESPONSIVE — PREDICTIONS PAGE (MOBILE)
           ═══════════════════════════════════════════ */
        @media (max-width: 768px) {
            /* Header */
            #page-predictions .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            #page-predictions .page-header > div:last-child {
                width: 100%;
                flex-wrap: wrap;
                gap: 8px;
            }
            #page-predictions .page-header select,
            #page-predictions .page-header button {
                flex: 1;
                min-width: 120px;
            }

            /* KPI cards — 2 colunas no mobile */
            #pred-kpi-cards {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            /* Chart principal — empilha verticalmente */
            #page-predictions > div:nth-child(3) {
                grid-template-columns: 1fr !important;
            }
            #pred-chart-container {
                height: 260px !important;
            }
            #xai-wrapper {
                height: 260px !important;
            }

            /* Tracker header */
            #page-predictions .page-header + * .page-header {
                flex-direction: column;
                gap: 10px;
            }

            /* Scorecard — 2 colunas */
            #tracker-scorecard {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            #tracker-scorecard .kpi-card:last-child {
                grid-column: 1 / -1;
            }

            /* Premium metrics */
            #page-predictions .kpi-strip {
                grid-template-columns: 1fr !important;
            }

            /* Horizon breakdown — 1 coluna */
            .horizon-breakdown-grid {
                grid-template-columns: 1fr !important;
            }

            /* Deep stats — 1 coluna */
            .deep-stats-grid {
                grid-template-columns: 1fr !important;
            }

            /* History: esconde tabela, mostra cards */
            .pred-history-table-wrap { display: none !important; }
            .pred-history-cards { display: block !important; }

            /* Bottom grid (historico + evolução) — empilha */
            #page-predictions > div > div[style*="grid-template-columns: 2fr 1fr"] {
                grid-template-columns: 1fr !important;
            }

            /* Calibration strip — 2 por linha */
            .calibration-strip .cal-pill {
                min-width: calc(50% - 8px);
            }

            /* Percentile grid — scroll */
            .percentile-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            /* Ratios */
            .ratio-badge {
                padding: 8px 10px;
                min-width: 60px;
            }
        }
        @media (max-width: 480px) {
            #pred-kpi-cards {
                grid-template-columns: 1fr 1fr !important;
                gap: 8px;
            }
            .horizon-breakdown-grid {
                gap: 8px;
            }
            .horizon-card { padding: 12px; }
            .percentile-grid { grid-template-columns: repeat(2, 1fr); }
        }

        /* ══════ INFO TOOLTIP SYSTEM ══════ */
        .info-tip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            font-size: 9px;
            font-weight: 700;
            font-style: normal;
            color: var(--accent-light);
            border: 1px solid rgba(139, 92, 246, 0.25);
            cursor: help;
            opacity: 0.4;
            transition: all 0.3s ease;
            vertical-align: middle;
            margin-left: 5px;
            flex-shrink: 0;
            position: relative;
            user-select: none;
            line-height: 1;
        }

        .info-tip:hover,
        .info-tip.active {
            opacity: 1;
            background: rgba(139, 92, 246, 0.15);
            border-color: var(--accent-light);
            box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
            transform: scale(1.15);
        }

        .info-tip .tip-text {
            display: none;
        }

        #global-tooltip {
            position: fixed;
            min-width: 220px;
            max-width: 300px;
            padding: 12px 14px;
            background: #0d0d16;
            border: 1px solid rgba(139, 92, 246, 0.45);
            border-radius: 12px;
            color: #e8ecf4;
            font-size: 11.5px;
            font-weight: 400;
            line-height: 1.55;
            text-align: left;
            z-index: 2147483647;
            pointer-events: none;
            box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(139, 92, 246, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
            visibility: hidden;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
            top: -9999px;
            left: -9999px;
        }

        #global-tooltip.visible {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
        }

        #global-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: var(--arrow-left, 50%);
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: rgba(139, 92, 246, 0.4);
        }

        #global-tooltip.below::after {
            top: auto;
            bottom: 100%;
            border-top-color: transparent;
            border-bottom-color: rgba(139, 92, 246, 0.4);
        }

        /* Light theme */
        .light-theme #global-tooltip {
            background: #fefeff;
            border-color: rgba(139, 92, 246, 0.2);
            color: #1E293B;
            box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        }

        .light-theme #global-tooltip::after {
            border-top-color: rgba(139, 92, 246, 0.2);
        }

        .light-theme #global-tooltip.below::after {
            border-top-color: transparent;
            border-bottom-color: rgba(139, 92, 246, 0.2);
        }

        .light-theme .info-tip {
            color: var(--accent);
            border-color: rgba(139, 92, 246, 0.2);
        }


        /* ── Oculta logo de atribuição do TradingView LWC ── */
        .tv-attr-logo { display: none !important; }

        /* ── Terminal Log Filter Buttons ── */
        .log-filter-btn {
            padding: 4px 12px;
            border-radius: 4px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.04);
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .log-filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
        .log-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
        .log-filter-btn.log-filter-error.active  { background: #ef4444; border-color: #ef4444; }
        .log-filter-btn.log-filter-warning.active { background: #f59e0b; border-color: #f59e0b; color: #000; }
        .log-filter-btn.log-filter-info.active    { background: #64748b; border-color: #64748b; }

        /* ── Vault Modal Backdrop ── */
        #vault-modal { backdrop-filter: blur(4px); }
