/* ============================================================
   MARKETVISTA AI — GLOBAL PAGE THEME FIX
   FILE: /public_html/assets/css/mv-theme-pages-fix.css
   VERSION: 1.0
   DATE: 2026-03-28
============================================================ */

html,
body {
    --mv-surface: #ffffff;
    --mv-surface-soft: #f5f8fd;
    --mv-surface-soft-2: #edf3fb;
    --mv-surface-strong: #e8eef8;
    --mv-border: rgba(15, 23, 42, 0.1);
    --mv-border-strong: rgba(37, 99, 235, 0.18);
    --mv-text: #0f172a;
    --mv-text-soft: #526074;
    --mv-text-muted: #7b889c;
    --mv-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --mv-accent: #2563eb;
    --mv-accent-soft: rgba(37, 99, 235, 0.08);
    --mv-sidebar-bg: #f6f8fc;
    --mv-sidebar-border: rgba(15, 23, 42, 0.08);
    --mv-sidebar-card: #eef2ff;
    --mv-sidebar-icon: rgba(37, 99, 235, 0.09);
    --mv-tooltip-bg: #0f172a;
    --mv-tooltip-text: #eef4ff;
}

html[data-mv-theme="dark"],
body[data-mv-theme="dark"],
html[data-bs-theme="dark"],
body[data-bs-theme="dark"],
html.theme-dark,
body.theme-dark,
html.dark-mode,
body.dark-mode,
html.layout-dark,
body.layout-dark,
html.dark,
body.dark {
    --mv-surface: linear-gradient(135deg, rgba(9, 18, 34, 0.98), rgba(14, 28, 50, 0.96));
    --mv-surface-soft: rgba(255, 255, 255, 0.04);
    --mv-surface-soft-2: rgba(255, 255, 255, 0.06);
    --mv-surface-strong: rgba(255, 255, 255, 0.08);
    --mv-border: rgba(255, 255, 255, 0.08);
    --mv-border-strong: rgba(56, 189, 248, 0.28);
    --mv-text: #eef4ff;
    --mv-text-soft: #c8d5e7;
    --mv-text-muted: #94a6c0;
    --mv-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
    --mv-accent: #38bdf8;
    --mv-accent-soft: rgba(56, 189, 248, 0.12);
    --mv-sidebar-bg: #0a1324;
    --mv-sidebar-border: rgba(255, 255, 255, 0.08);
    --mv-sidebar-card: rgba(255, 255, 255, 0.06);
    --mv-sidebar-icon: rgba(56, 189, 248, 0.1);
    --mv-tooltip-bg: #eaf1fb;
    --mv-tooltip-text: #0f172a;
}

/* --- Sidebar theme bridge --- */
.mv-front-global-startbar,
.mv-front-source-sidebar,
.startbar .mv-front-source-sidebar {
    background: var(--mv-sidebar-bg) !important;
    border-right: 1px solid var(--mv-sidebar-border) !important;
}

.mv-front-source-brand {
    border-bottom: 1px solid var(--mv-sidebar-border) !important;
}

.mv-front-source-brand-title,
.mv-front-source-link,
.mv-front-source-account-name {
    color: var(--mv-text) !important;
}

.mv-front-source-brand-subtitle,
.mv-front-source-section-label,
.mv-front-source-account-label {
    color: var(--mv-text-muted) !important;
}

.mv-front-source-link {
    border-color: transparent !important;
}

.mv-front-source-link:hover,
.mv-front-source-link.active {
    background: var(--mv-sidebar-card) !important;
    border-color: var(--mv-border-strong) !important;
    color: var(--mv-text) !important;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08) !important;
}

.mv-front-source-icon {
    background: var(--mv-sidebar-icon) !important;
    border: 1px solid var(--mv-border-strong) !important;
    color: var(--mv-accent) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1) !important;
}

.mv-front-source-account {
    border-top: 1px solid var(--mv-sidebar-border) !important;
}

/* --- Shared surfaces for the pages shown in the screenshots --- */
.mv-widget,
.mv-ai-widget-card,
.mv-ai-page-panel,
.mv-analysis-hero,
.mv-analysis-panel,
.mv-analysis-doc,
.mv-analysis-mini-card,
.mv-analysis-history-item,
.mv-ai-mini-card,
.mv-ai-empty-card,
.mv-ai-summary-card,
.mv-ai-info-card,
.mv-ai-chip-card,
.mv-ai-inline-chat .card-body,
#mvAiWatchlistSignalsCard .card,
#mvAiAutoTraderCopilot .card,
#mvAiSignalsDesk .card,
.mv-pm-hero,
.mv-pm-hero-panel,
.mv-pm-stat-card,
.mv-pm-toolbar,
.mv-pm-top-card,
.mv-pm-card,
.mv-pm-side-card,
.mv-pm-page .card,
.mv-pm-empty {
    background: var(--mv-surface) !important;
    color: var(--mv-text) !important;
    border-color: var(--mv-border) !important;
    box-shadow: var(--mv-shadow) !important;
}

.mv-widget .card-header,
.mv-ai-widget-card .card-header,
.mv-analysis-panel-head,
.mv-analysis-head,
.mv-pm-page .card-header {
    background: transparent !important;
    color: var(--mv-text) !important;
    border-bottom-color: var(--mv-border) !important;
}

.mv-widget .card-body,
.mv-ai-widget-card .card-body,
.mv-analysis-output,
.mv-analysis-side,
.mv-analysis-doc,
.mv-ai-page-panel,
.mv-ai-inline-chat .card-body {
    color: var(--mv-text) !important;
}

.mv-widget .text-muted,
.mv-ai-widget-card .text-muted,
.mv-ai-mini-card .text-muted,
.mv-analysis-panel .text-muted,
.mv-pm-page .text-muted,
.mv-ai-meta,
.mv-ai-subtitle,
.mv-ai-summary-note,
.mv-ai-info-eyebrow,
.mv-ai-chip-card span,
.mv-analysis-subtitle,
.mv-analysis-status,
.mv-analysis-history-meta,
.mv-analysis-history-copy,
.mv-pm-stat-note,
.mv-pm-side-copy,
.mv-pm-method,
.mv-pm-copy,
.mv-pm-top-copy,
.mv-pm-coverage-row {
    color: var(--mv-text-muted) !important;
}

.mv-widget h1,
.mv-widget h2,
.mv-widget h3,
.mv-widget h4,
.mv-widget h5,
.mv-widget h6,
.mv-ai-widget-card h1,
.mv-ai-widget-card h2,
.mv-ai-widget-card h3,
.mv-ai-widget-card h4,
.mv-ai-widget-card h5,
.mv-ai-widget-card h6,
.mv-analysis-title,
.mv-analysis-panel h5,
.mv-analysis-mini-card h6,
.mv-pm-title,
.mv-pm-page h1,
.mv-pm-page h2,
.mv-pm-page h3,
.mv-pm-page h4,
.mv-pm-page h5,
.mv-pm-page h6 {
    color: var(--mv-text) !important;
}

/* chat / desks */
.mv-ai-bubble,
.mv-ai-empty-card,
.mv-ai-summary-card,
.mv-ai-info-card,
.mv-ai-chip-card,
.mv-ai-mini-card,
.mv-ai-inline-pinned,
.mv-ai-inline-chat .mv-ai-helper-copy,
.mv-ai-tools,
.mv-ai-pinned-chip,
.mv-ai-inline-chat textarea,
.mv-ai-page-panel textarea.form-control,
.mv-ai-page-panel input.form-control,
#mvAiPageInput {
    background: var(--mv-surface-soft) !important;
    color: var(--mv-text) !important;
    border-color: var(--mv-border) !important;
}

.mv-ai-bubble.is-user {
    background: color-mix(in srgb, var(--mv-accent) 12%, transparent) !important;
    border-color: color-mix(in srgb, var(--mv-accent) 26%, transparent) !important;
}

.mv-ai-page-panel textarea.form-control::placeholder,
#mvAiPageInput::placeholder,
.mv-analysis-form textarea::placeholder,
.mv-ai-inline-chat textarea::placeholder {
    color: var(--mv-text-muted) !important;
}

.mv-ai-inline-chat .btn-outline-light,
.mv-ai-page-panel .btn-outline-light,
.mv-analysis-hero .btn-outline-light,
.mv-analysis-panel .btn-outline-light,
.mv-pm-page .btn-outline-light {
    color: var(--mv-text) !important;
    border-color: var(--mv-border-strong) !important;
    background: transparent !important;
}

.mv-ai-inline-chat .btn-outline-light:hover,
.mv-ai-page-panel .btn-outline-light:hover,
.mv-analysis-hero .btn-outline-light:hover,
.mv-analysis-panel .btn-outline-light:hover,
.mv-pm-page .btn-outline-light:hover {
    background: var(--mv-accent-soft) !important;
    color: var(--mv-text) !important;
}

/* analysis */
.mv-analysis-form textarea,
.mv-analysis-doc,
.mv-analysis-section,
.mv-analysis-mini-card,
.mv-analysis-history-item {
    background: var(--mv-surface-soft) !important;
    color: var(--mv-text) !important;
    border-color: var(--mv-border) !important;
}

.mv-analysis-chip {
    background: var(--mv-surface-soft) !important;
    color: var(--mv-text) !important;
    border-color: var(--mv-border) !important;
}

/* tables on watchlist/auto trader/AI signals */
.card table,
.mv-widget table,
.mv-ai-widget-card table {
    color: var(--mv-text) !important;
}

.card .table-light,
.mv-widget .table-light,
.mv-ai-widget-card .table-light,
.card .table-light th,
.mv-widget .table-light th,
.mv-ai-widget-card .table-light th {
    background: var(--mv-surface-soft) !important;
    color: var(--mv-text) !important;
    border-color: var(--mv-border) !important;
}

.card .table-hover tbody tr,
.mv-widget .table-hover tbody tr,
.mv-ai-widget-card .table-hover tbody tr {
    background: transparent !important;
}

.card .table-hover tbody tr:hover,
.mv-widget .table-hover tbody tr:hover,
.mv-ai-widget-card .table-hover tbody tr:hover {
    background: var(--mv-surface-soft) !important;
}

/* prediction market light-mode normalization */
html[data-mv-theme="light"] .mv-pm-hero,
body[data-mv-theme="light"] .mv-pm-hero,
html[data-bs-theme="light"] .mv-pm-hero,
body[data-bs-theme="light"] .mv-pm-hero,
html[data-mv-theme="light"] .mv-pm-hero-panel,
body[data-mv-theme="light"] .mv-pm-hero-panel,
html[data-bs-theme="light"] .mv-pm-hero-panel,
body[data-bs-theme="light"] .mv-pm-hero-panel,
html[data-mv-theme="light"] .mv-pm-card,
body[data-mv-theme="light"] .mv-pm-card,
html[data-bs-theme="light"] .mv-pm-card,
body[data-bs-theme="light"] .mv-pm-card,
html[data-mv-theme="light"] .mv-pm-top-card,
body[data-mv-theme="light"] .mv-pm-top-card,
html[data-bs-theme="light"] .mv-pm-top-card,
body[data-bs-theme="light"] .mv-pm-top-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

html[data-mv-theme="light"] .mv-pm-card,
body[data-mv-theme="light"] .mv-pm-card,
html[data-bs-theme="light"] .mv-pm-card,
body[data-bs-theme="light"] .mv-pm-card,
html[data-mv-theme="light"] .mv-pm-top-card,
body[data-mv-theme="light"] .mv-pm-top-card,
html[data-bs-theme="light"] .mv-pm-top-card,
body[data-bs-theme="light"] .mv-pm-top-card,
html[data-mv-theme="light"] .mv-pm-hero,
body[data-mv-theme="light"] .mv-pm-hero,
html[data-bs-theme="light"] .mv-pm-hero,
body[data-bs-theme="light"] .mv-pm-hero {
    color: #0f172a !important;
}

html[data-mv-theme="light"] .mv-pm-pill,
body[data-mv-theme="light"] .mv-pm-pill,
html[data-bs-theme="light"] .mv-pm-pill,
body[data-bs-theme="light"] .mv-pm-pill,
html[data-mv-theme="light"] .mv-pm-source-pill,
body[data-mv-theme="light"] .mv-pm-source-pill,
html[data-bs-theme="light"] .mv-pm-source-pill,
body[data-bs-theme="light"] .mv-pm-source-pill,
html[data-mv-theme="light"] .mv-pm-asset-pill,
body[data-mv-theme="light"] .mv-pm-asset-pill,
html[data-bs-theme="light"] .mv-pm-asset-pill,
body[data-bs-theme="light"] .mv-pm-asset-pill {
    background: #eef4ff !important;
    color: #344055 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-mv-theme="light"] .mv-pm-tip-btn,
body[data-mv-theme="light"] .mv-pm-tip-btn,
html[data-bs-theme="light"] .mv-pm-tip-btn,
body[data-bs-theme="light"] .mv-pm-tip-btn {
    background: #fff !important;
    color: #64748b !important;
    border-color: rgba(15,23,42,.12) !important;
}

html[data-mv-theme="light"] .mv-pm-tip-btn:hover,
body[data-mv-theme="light"] .mv-pm-tip-btn:hover,
html[data-bs-theme="light"] .mv-pm-tip-btn:hover,
body[data-bs-theme="light"] .mv-pm-tip-btn:hover {
    background: var(--mv-accent-soft) !important;
}

/* shared enhancement controls */
.mv-theme-fix-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
}

.mv-theme-fix-info,
.mv-theme-fix-collapse {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    border: 1px solid var(--mv-border);
    background: var(--mv-surface-soft);
    color: var(--mv-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    box-shadow: none;
}

.mv-theme-fix-info:hover,
.mv-theme-fix-info:focus-visible,
.mv-theme-fix-collapse:hover,
.mv-theme-fix-collapse:focus-visible {
    color: var(--mv-accent);
    border-color: var(--mv-border-strong);
    background: var(--mv-accent-soft);
    outline: none;
}

.mv-theme-fix-target.is-collapsed .mv-theme-fix-body {
    display: none !important;
}

.mv-theme-fix-tooltip {
    position: absolute;
    z-index: 2500;
    max-width: 280px;
    padding: 0.6rem 0.72rem;
    border-radius: 12px;
    background: var(--mv-tooltip-bg);
    color: var(--mv-tooltip-text);
    font-size: 0.78rem;
    line-height: 1.45;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    border: 1px solid var(--mv-border);
}

.mv-theme-fix-tooltip[hidden] {
    display: none !important;
}

/* keep buttons readable in light mode */
html[data-mv-theme="light"] .btn-outline-light,
body[data-mv-theme="light"] .btn-outline-light,
html[data-bs-theme="light"] .btn-outline-light,
body[data-bs-theme="light"] .btn-outline-light {
    color: #334155 !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

html[data-mv-theme="light"] .btn-outline-light:hover,
body[data-mv-theme="light"] .btn-outline-light:hover,
html[data-bs-theme="light"] .btn-outline-light:hover,
body[data-bs-theme="light"] .btn-outline-light:hover {
    color: #0f172a !important;
    background: rgba(37,99,235,.06) !important;
}

@media (max-width: 991px) {
    .mv-front-source-sidebar {
        background: var(--mv-sidebar-bg) !important;
    }
}


/* --- Sidebar / content edge flatten --- */
.startbar,
.mv-front-global-startbar,
.mv-front-source-sidebar,
.page-wrapper,
.page-wrapper .page-content{
box-shadow:none !important;
filter:none !important;
}
